12#include "msgpack/adaptor/define_decl.hpp"
48 "TransactionPhase::LAST must match AVM_TX_PHASE_VALUE_SETUP");
50 "TransactionPhase::NR_NULLIFIER_INSERTION must match AVM_TX_PHASE_VALUE_START");
52 "TransactionPhase::LAST must match AVM_TX_PHASE_VALUE_LAST");
105 pack_fn(
"masterNullifierPublicKey",
107 "masterIncomingViewingPublicKey",
109 "masterOutgoingViewingPublicKey",
111 "masterTaggingPublicKey",
133 "currentContractClassId",
135 "originalContractClassId",
137 "initializationHash",
164 "privateFunctionsRoot",
168 "publicBytecodeCommitment",
192 "privateFunctionsRoot",
205 .public_bytecode_commitment = public_bytecode_commitment,
243 std::array<FF, FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH>
payload{};
261 for (
size_t i = 0; i < log.
fields.size(); ++i) {
270 for (
const auto& log : logs) {
279 for (uint32_t i = 0; i <
length;) {
280 uint32_t log_length =
static_cast<uint32_t
>(
payload[i]);
282 std::vector<FF> fields;
283 for (uint32_t j = 0; j < log_length; ++j) {
284 fields.push_back(
payload[i + 2 + j]);
606 protocol_contracts.
derived_addresses.at(
static_cast<uint32_t
>(canonical_address) - 1);
607 if (derived_address.is_zero()) {
610 return derived_address;
#define AVM_TX_PHASE_VALUE_LAST
#define PUBLIC_LOG_HEADER_LENGTH
#define AVM_TX_PHASE_VALUE_SETUP
#define AVM_TX_PHASE_VALUE_START
#define MAX_PROTOCOL_CONTRACTS
group_elements::affine_element< Fq, Fr, Params > affine_element
AztecAddress contract_address
bool is_valid_debug_log_level(uint8_t v)
std::optional< AztecAddress > get_derived_address(const ProtocolContracts &protocol_contracts, const AztecAddress &canonical_address)
bool is_protocol_contract_address(const AztecAddress &address)
std::string debug_log_level_to_string(DebugLogLevel lvl)
size_t hash_as_tuple(const Ts &... ts)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
unsigned __int128 uint128_t
bool operator==(const AppendOnlyTreeSnapshot &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(root, next_available_leaf_index)
std::size_t hash() const noexcept
uint64_t next_available_leaf_index
uint32_t public_data_writes
bool operator==(const AvmAccumulatedDataArrayLengths &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(note_hashes, nullifiers, l2_to_l1_msgs, public_data_writes)
std::array< FF, MAX_NULLIFIERS_PER_TX > nullifiers
std::array< PublicDataWrite, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX > public_data_writes
MSGPACK_CAMEL_CASE_FIELDS(note_hashes, nullifiers, l2_to_l1_msgs, public_logs, public_data_writes)
std::array< ScopedL2ToL1Message, MAX_L2_TO_L1_MSGS_PER_TX > l2_to_l1_msgs
std::array< FF, MAX_NOTE_HASHES_PER_TX > note_hashes
bool operator==(const AvmAccumulatedData &other) const =default
void msgpack(auto pack_fn)
std::vector< uint8_t > packed_bytecode
FF private_functions_root
bool operator==(const ContractClass &other) const =default
ContractClassWithCommitment with_commitment(const FF &public_bytecode_commitment) const
bool operator==(const ContractClassLogFields &other) const =default
bool operator==(const ContractClassLog &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(contract_address, fields, emitted_length)
ContractClassLogFields fields
AztecAddress contract_address
FF private_functions_root
bool operator==(const ContractClassWithCommitment &other) const =default
FF public_bytecode_commitment
std::vector< uint8_t > packed_bytecode
void msgpack(auto pack_fn)
bool operator==(const ContractDeploymentData &other) const =default
std::vector< PrivateLog > private_logs
std::vector< ContractClassLog > contract_class_logs
MSGPACK_CAMEL_CASE_FIELDS(contract_class_logs, private_logs)
bool operator==(const ContractInstance &other) const =default
ContractClassId current_contract_class_id
void msgpack(auto pack_fn)
ContractClassId original_contract_class_id
bool operator==(const DebugLog &other) const =default
AztecAddress contract_address
MSGPACK_CAMEL_CASE_FIELDS(contract_address, level, message, fields)
bool operator==(const GasFees &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(fee_per_da_gas, fee_per_l2_gas)
Gas operator+(const Gas &other) const
MSGPACK_CAMEL_CASE_FIELDS(l2_gas, da_gas)
Gas operator-(const Gas &other) const
bool operator==(const Gas &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(gas_limits, teardown_gas_limits, max_fees_per_gas, max_priority_fees_per_gas)
GasFees max_priority_fees_per_gas
bool operator==(const GasSettings &other) const =default
bool operator==(const GasUsed &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(total_gas, teardown_gas, public_gas, billed_gas)
MSGPACK_CAMEL_CASE_FIELDS(chain_id, version, block_number, slot_number, timestamp, coinbase, fee_recipient, gas_fees)
bool operator==(const GlobalVariables &other) const =default
AztecAddress fee_recipient
MSGPACK_FIELDS(recipient, content)
bool operator==(const L2ToL1Message &other) const =default
bool operator==(const PrivateLog &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(fields, emitted_length)
MSGPACK_CAMEL_CASE_FIELDS(note_hashes, nullifiers, l2_to_l1_msgs)
bool operator==(const PrivateToAvmAccumulatedDataArrayLengths &other) const =default
std::array< FF, MAX_NOTE_HASHES_PER_TX > note_hashes
MSGPACK_CAMEL_CASE_FIELDS(note_hashes, nullifiers, l2_to_l1_msgs)
std::array< ScopedL2ToL1Message, MAX_L2_TO_L1_MSGS_PER_TX > l2_to_l1_msgs
std::array< FF, MAX_NULLIFIERS_PER_TX > nullifiers
bool operator==(const PrivateToAvmAccumulatedData &other) const =default
bool operator==(const ProtocolContracts &other) const =default
std::array< AztecAddress, MAX_PROTOCOL_CONTRACTS > derived_addresses
MSGPACK_CAMEL_CASE_FIELDS(derived_addresses)
MSGPACK_CAMEL_CASE_FIELDS(setup_calls, app_logic_calls, teardown_call)
bool operator==(const PublicCallRequestArrayLengths &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(msg_sender, contract_address, is_static_call, calldata_hash)
AztecAddress contract_address
bool operator==(const PublicCallRequest &other) const =default
MSGPACK_CAMEL_CASE_FIELDS(leaf_slot, value)
bool operator==(const PublicDataWrite &other) const =default
AffinePoint nullifier_key
void msgpack(auto pack_fn)
AffinePoint incoming_viewing_key
bool operator==(const PublicKeys &other) const =default
AffinePoint outgoing_viewing_key
std::vector< FF > to_fields() const
MSGPACK_CAMEL_CASE_FIELDS(fields, contract_address)
bool operator==(const PublicLog &other) const =default
AztecAddress contract_address
std::array< FF, FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH > payload
static PublicLogs from_logs(const std::vector< PublicLog > &logs)
MSGPACK_FIELDS(length, payload)
PublicLogs(const std::vector< PublicLog > &logs)
PublicLogs(uint32_t length, const std::array< FF, FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH > &payload)
void add_log(const PublicLog &log)
bool operator==(const PublicLogs &other) const =default
std::vector< PublicLog > to_logs() const
bool operator==(const ScopedL2ToL1Message &other) const =default
AztecAddress contract_address
MSGPACK_CAMEL_CASE_FIELDS(message, contract_address)
AppendOnlyTreeSnapshot public_data_tree
bool operator==(const TreeSnapshots &other) const =default
AppendOnlyTreeSnapshot l1_to_l2_message_tree
AppendOnlyTreeSnapshot nullifier_tree
MSGPACK_CAMEL_CASE_FIELDS(l1_to_l2_message_tree, note_hash_tree, nullifier_tree, public_data_tree)
AppendOnlyTreeSnapshot note_hash_tree
MSGPACK_FIELDS(tree, counter)
bool operator==(const TreeState &other) const =default
AppendOnlyTreeSnapshot tree
MSGPACK_CAMEL_CASE_FIELDS(note_hash_tree, nullifier_tree, l1_to_l2_message_tree, public_data_tree)
TreeState l1_to_l2_message_tree
bool operator==(const TreeStates &other) const =default
TreeState public_data_tree