Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation Namespace Reference

Namespaces

namespace  testonly
 

Classes

class  AddressDerivation
 
struct  AddressDerivationEvent
 
class  AddressDerivationInterface
 
class  Addressing
 
struct  AddressingEvent
 
struct  AddressingException
 
class  AddressingInterface
 
class  Alu
 
struct  AluEvent
 
class  AluException
 
class  AluInterface
 
struct  AppendLeafResult
 
class  BaseContext
 
class  Bitwise
 
struct  BitwiseEvent
 
class  BitwiseException
 
class  BitwiseInterface
 
struct  BytecodeDecompositionEvent
 
class  BytecodeHasher
 
struct  BytecodeHashingEvent
 
class  BytecodeHashingInterface
 
class  BytecodeManager
 
class  BytecodeManagerInterface
 
struct  BytecodeNotFoundError
 
struct  BytecodeRetrievalEvent
 
struct  CalldataEvent
 
class  CalldataHasher
 
class  CalldataHashingInterface
 
class  CalldataHashingProvider
 
class  CalldataHashingProviderInterface
 
class  CheckpointNotifiable
 
class  ClassIdDerivation
 
struct  ClassIdDerivationEvent
 
class  ClassIdDerivationInterface
 
struct  CleanupEvent
 
struct  CollectGasFeeEvent
 
struct  ContextEvent
 
class  ContextInterface
 
class  ContextProvider
 
class  ContextProviderInterface
 
struct  ContextStackEvent
 
class  ContractDB
 
class  ContractDBInterface
 
class  ContractInstanceManager
 
class  ContractInstanceManagerInterface
 Core shared component for contract instance retrieval and validation. More...
 
struct  ContractInstanceNotFoundError
 
struct  ContractInstanceRetrievalEvent
 
class  DataCopy
 
struct  DataCopyEvent
 
struct  DataCopyException
 
class  DataCopyInterface
 
class  DeduplicatingEventEmitter
 
class  Ecc
 
struct  EccAddEvent
 
struct  EccAddMemoryEvent
 
struct  EccException
 
class  EccInterface
 
class  EmitUnencryptedLog
 
struct  EmitUnencryptedLogException
 
class  EmitUnencryptedLogInterface
 
struct  EmitUnencryptedLogWriteEvent
 
class  EnqueuedCallContext
 
struct  EnqueuedCallEvent
 
class  EventEmitter
 
class  EventEmitterInterface
 
struct  EventsContainer
 
class  Execution
 
class  ExecutionComponentsProvider
 
class  ExecutionComponentsProviderInterface
 
struct  ExecutionEvent
 
class  ExecutionIdGetterInterface
 
class  ExecutionIdManager
 
class  ExecutionIdManagerInterface
 
class  ExecutionInterface
 
struct  ExecutionResult
 
class  FakeBitwise
 
class  FakeGreaterThan
 
class  FakePoseidon2
 
class  FakeToRadix
 
class  FieldGreaterThan
 
struct  FieldGreaterThanEvent
 
class  FieldGreaterThanInterface
 
struct  GasEvent
 
class  GasTracker
 
class  GasTrackerInterface
 
class  GetContractInstance
 
struct  GetContractInstanceEvent
 
struct  GetContractInstanceException
 
class  GetContractInstanceInterface
 
class  GreaterThan
 
struct  GreaterThanEvent
 
class  GreaterThanInterface
 
class  HighLevelMerkleDBInterface
 
class  HintedRawContractDB
 
class  HintedRawMerkleDB
 
class  IndexedMemoryTree
 
struct  Instruction
 
struct  InstructionFetchingError
 
struct  InstructionFetchingEvent
 
class  InstructionInfoDB
 
class  InstructionInfoDBInterface
 
struct  InternalCallPtr
 
struct  InternalCallStackEvent
 
class  InternalCallStackManager
 
class  InternalCallStackManagerInterface
 
class  InternalCallStackManagerProvider
 
class  InternalCallStackManagerProviderInterface
 
class  KeccakF1600
 
struct  KeccakF1600Event
 
struct  KeccakF1600Exception
 
class  KeccakF1600Interface
 
struct  KeccakF1600RoundData
 
class  L1ToL2MessageTreeCheck
 
struct  L1ToL2MessageTreeCheckEvent
 
class  L1ToL2MessageTreeCheckInterface
 
struct  LimbsComparisonWitness
 
class  LowLevelMerkleDBInterface
 
class  Memory
 
struct  MemoryEvent
 
class  MemoryInterface
 
class  MemoryProvider
 
class  MemoryProviderInterface
 
class  MemoryStore
 
class  MerkleCheck
 
struct  MerkleCheckEvent
 
class  MerkleCheckInterface
 
class  MerkleDB
 
class  MockAddressing
 
class  MockAlu
 
class  MockBitwise
 
class  MockBytecodeManager
 
class  MockCalldataHasher
 
class  MockClassIdDerivation
 
class  MockContext
 
class  MockContextProvider
 
class  MockContractDB
 
class  MockDataCopy
 
class  MockEcc
 
class  MockEmitUnencryptedLog
 
class  MockExecution
 
class  MockExecutionComponentsProvider
 
class  MockExecutionIdManager
 
class  MockFieldGreaterThan
 
class  MockGasTracker
 
class  MockGetContractInstance
 
class  MockGreaterThan
 
class  MockHighLevelMerkleDB
 
class  MockInternalCallStackManager
 
class  MockKeccakF1600
 
class  MockL1ToL2MessageTreeCheck
 
class  MockLowLevelMerkleDB
 
class  MockMemory
 
class  MockMerkleCheck
 
class  MockNoteHashTreeCheck
 
class  MockNullifierTreeCheck
 
class  MockPoseidon2
 
class  MockRangeCheck
 
class  MockSha256
 
class  MockToRadix
 
class  MockWrittenPublicDataSlotsTreeCheck
 
class  NestedContext
 
class  NoopEventEmitter
 
struct  NoteHashAppendData
 
struct  NoteHashSiloingData
 
class  NoteHashTreeCheck
 
class  NoteHashTreeCheckInterface
 
struct  NoteHashTreeReadWriteEvent
 
struct  NoteHashUniquenessData
 
struct  NullifierAppendData
 
struct  NullifierSiloingData
 
class  NullifierTreeCheck
 
class  NullifierTreeCheckInterface
 
struct  NullifierTreeReadWriteEvent
 
class  OneShotEventEmitter
 
struct  OperandResolutionInfo
 
struct  OutOfGasException
 
struct  PadTreesEvent
 
class  Poseidon2
 
struct  Poseidon2Exception
 
struct  Poseidon2HashEvent
 
class  Poseidon2Interface
 
struct  Poseidon2PermutationEvent
 
struct  Poseidon2PermutationMemoryEvent
 
struct  PrivateAppendTreeEvent
 
struct  PrivateEmitL2L1MessageEvent
 
class  PublicDataTreeCheck
 
class  PublicDataTreeCheckInterface
 
struct  PublicDataTreeReadWriteEvent
 
struct  PublicDataWriteData
 
class  RangeCheck
 
struct  RangeCheckEvent
 
class  RangeCheckInterface
 
struct  ScalarMulEvent
 
struct  ScalarMulIntermediateState
 
class  Sha256
 
struct  Sha256CompressionEvent
 
struct  Sha256CompressionException
 
class  Sha256Interface
 
class  Siloing
 
struct  SiloingEvent
 
class  SiloingInterface
 
struct  SlotAppendData
 
class  TagCheckError
 
class  ToRadix
 
struct  ToRadixEvent
 
class  ToRadixException
 
class  ToRadixInterface
 
struct  ToRadixMemoryEvent
 
struct  TreeCounters
 
class  TxBytecodeManager
 
class  TxBytecodeManagerInterface
 
struct  TxContext
 
struct  TxContextEvent
 
class  TxExecution
 
struct  TxPhaseEvent
 
struct  TxStartupEvent
 
struct  U128Decomposition
 
struct  U256Decomposition
 
class  UpdateCheck
 
struct  UpdateCheckEvent
 
class  UpdateCheckInterface
 
struct  WrittenPublicDataSlotLeafValue
 
class  WrittenPublicDataSlotsInterface
 
class  WrittenPublicDataSlotsTreeCheck
 
struct  WrittenPublicDataSlotsTreeCheckEvent
 
class  WrittenPublicDataSlotsTreeCheckInterface
 

Typedefs

using BytecodeId = FF
 
using EmitUnencryptedLogEvent = std::variant< EmitUnencryptedLogWriteEvent, CheckPointEventType >
 
using KeccakF1600State = std::array< std::array< uint64_t, 5 >, 5 >
 
using KeccakF1600StateMemValues = std::array< std::array< MemoryValue, 5 >, 5 >
 
using NoteHashTreeCheckEvent = std::variant< NoteHashTreeReadWriteEvent, CheckPointEventType >
 
using NullifierTreeLeafPreimage = IndexedLeaf< NullifierLeafValue >
 
using NullifierTreeCheckEvent = std::variant< NullifierTreeReadWriteEvent, CheckPointEventType >
 
using PublicDataTreeLeafPreimage = IndexedLeaf< PublicDataLeafValue >
 
using PublicDataTreeCheckEvent = std::variant< PublicDataTreeReadWriteEvent, CheckPointEventType >
 
using TxPhaseEventType = std::variant< EnqueuedCallEvent, PrivateAppendTreeEvent, PrivateEmitL2L1MessageEvent, CollectGasFeeEvent, PadTreesEvent, CleanupEvent >
 
using TxEvent = std::variant< TxStartupEvent, TxPhaseEvent >
 
using RawPoseidon2 = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
 
using poseidon2 = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
 
using MerkleTreeId = ::bb::world_state::MerkleTreeId
 
using SiblingPath = ::bb::crypto::merkle_tree::fr_sibling_path
 
using index_t = ::bb::crypto::merkle_tree::index_t
 
using PublicDataLeafValue = ::bb::crypto::merkle_tree::PublicDataLeafValue
 
using NullifierLeafValue = ::bb::crypto::merkle_tree::NullifierLeafValue
 
template<typename LeafValueType >
using IndexedLeaf = ::bb::crypto::merkle_tree::IndexedLeaf< LeafValueType >
 
template<typename LeafValueType >
using SequentialInsertionResult = ::bb::world_state::SequentialInsertionResult< LeafValueType >
 
using Poseidon2 = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
 
using Operand = TaggedValue
 
using WrittenPublicDataSlotsTree = IndexedMemoryTree< WrittenPublicDataSlotLeafValue, Poseidon2HashPolicy >
 
using WrittenPublicDataSlotsTreeLeafPreimage = IndexedLeaf< WrittenPublicDataSlotLeafValue >
 
using Poseidon2Hash = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
 
using Poseidon2Perm = crypto::Poseidon2Permutation< crypto::Poseidon2Bn254ScalarFieldParams >
 

Enumerations

enum class  AddressingEventError { BASE_ADDRESS_INVALID , RELATIVE_COMPUTATION_OOB , INVALID_ADDRESS_AFTER_INDIRECTION }
 
enum class  AluOperation {
  ADD , SUB , MUL , DIV ,
  FDIV , EQ , LT , LTE ,
  NOT , SHL , SHR , TRUNCATE
}
 
enum class  AluError { TAG_ERROR , DIV_0_ERROR }
 
enum  CheckPointEventType { CREATE_CHECKPOINT , COMMIT_CHECKPOINT , REVERT_CHECKPOINT }
 
enum class  DataCopyOperation { CD_COPY = 1 , RD_COPY = 2 }
 
enum class  ExecutionError {
  NONE , BYTECODE_NOT_FOUND , INSTRUCTION_FETCHING , ADDRESSING ,
  REGISTER_READ , GAS , OPCODE_EXECUTION
}
 
enum class  FieldGreaterOperation : uint8_t { GREATER_THAN , CANONICAL_DECOMPOSITION }
 
enum class  MemoryMode { READ , WRITE }
 
enum class  SiloingType { NULLIFIER }
 
enum class  OperandType : uint8_t {
  INDIRECT8 , INDIRECT16 , TAG , UINT8 ,
  UINT16 , UINT32 , UINT64 , UINT128 ,
  FF
}
 
enum class  InstrDeserializationError : uint8_t {
  PC_OUT_OF_RANGE , OPCODE_OUT_OF_RANGE , INSTRUCTION_OUT_OF_RANGE , TAG_OUT_OF_RANGE ,
  INVALID_EXECUTION_OPCODE
}
 

Functions

 TEST (EmitUnencryptedLogTest, Basic)
 
 TEST (EmitUnencryptedLogTest, NegativeTooLarge)
 
 TEST (EmitUnencryptedLogTest, NegativeMemoryOutOfBounds)
 
 TEST (EmitUnencryptedLogTest, NegativeTooManyLogs)
 
 TEST (EmitUnencryptedLogTest, NegativeTagMismatch)
 
 TEST (EmitUnencryptedLogTest, NegativeStatic)
 
 TEST (EmitUnencryptedLogTest, CheckpointListener)
 
std::string to_string (AddressingEventError e)
 
std::string to_string (AluError e)
 
std::vector< FFencode_bytecode (std::span< const uint8_t > bytecode)
 
FF compute_public_bytecode_commitment (std::span< const uint8_t > bytecode)
 
FF compute_contract_class_id (const FF &artifact_hash, const FF &private_fn_root, const FF &public_bytecode_commitment)
 
FF hash_public_keys (const PublicKeys &public_keys)
 
FF compute_contract_address (const ContractInstance &contract_instance)
 
FF unconstrained_root_from_path (const FF &leaf_value, const uint64_t leaf_index, std::span< const FF > path)
 
FF unconstrained_compute_leaf_slot (const AztecAddress &contract_address, const FF &slot)
 
FF unconstrained_silo_nullifier (const AztecAddress &contract_address, const FF &nullifier)
 
FF unconstrained_silo_note_hash (const AztecAddress &contract_address, const FF &note_hash)
 
FF unconstrained_make_unique_note_hash (const FF &siloed_note_hash, const FF &first_nullifier, uint64_t note_hash_counter)
 
Instruction deserialize_instruction (std::span< const uint8_t > bytecode, size_t pos)
 Parsing of an instruction in the supplied bytecode at byte position pos. This checks that the WireOpCode value is in the defined range and extracts the operands for each WireOpCode based on the specification from OPCODE_WIRE_FORMAT.
 
bool check_tag (const Instruction &instruction)
 Check whether the instruction must have a tag operand and whether the operand value is in the value tag range. This is specified by OPCODE_WIRE_FORMAT. If the instruction does not have a valid wire opcode or the relevant tag operand is missing, we return false. However, we do not fully validate the instruction.
 
std::array< uint32_t, 8 > sha256_block (const std::array< uint32_t, 8 > &h_init, const std::array< uint32_t, 16 > &input)
 
constexpr uint32_t ror (uint32_t val, uint32_t shift)
 
U256Decomposition decompose (const uint256_t &x)
 
U128Decomposition decompose (const uint128_t &x)
 
 BENCHMARK (BM_WrittenSlotsTreeStack) -> Arg(1000) ->Arg(3000) ->Arg(6000) ->Arg(9000) ->Unit(benchmark::kMicrosecond)
 
std::ostream & operator<< (std::ostream &os, const WrittenPublicDataSlotLeafValue &v)
 
WrittenPublicDataSlotsTree build_public_data_slots_tree ()
 

Variables

constexpr uint32_t MAX_MEM_ADDR = AVM_HIGHEST_MEM_ADDRESS
 
constexpr std::array< std::array< uint8_t, 5 >, 5 > keccak_rotation_len
 
constexpr std::array< std::array< uint8_t, 5 >, 5 > keccak_pi_rho_x_coords
 
constexpr std::array< uint64_t, 24 > keccak_round_constants
 
const std::unordered_map< OperandType, uint32_t > OPERAND_TYPE_SIZE_BYTES
 
const std::vector< OperandTypethree_operand_format8
 
const std::vector< OperandTypethree_operand_format16
 
const std::vector< OperandTypekernel_input_operand_format = { OperandType::INDIRECT8, OperandType::UINT16 }
 
const std::vector< OperandTypeexternal_call_format
 
const std::unordered_map< WireOpCode, std::vector< OperandType > > WireOpCode_WIRE_FORMAT
 
constexpr uint32_t round_constants [64]
 
const uint256_t TWO_POW_128 = uint256_t(1) << 128
 
const uint128_t TWO_POW_64 = static_cast<uint128_t>(1) << 64
 

Typedef Documentation

◆ BytecodeId

Definition at line 16 of file bytecode_events.hpp.

◆ EmitUnencryptedLogEvent

◆ index_t

◆ IndexedLeaf

◆ KeccakF1600State

using bb::avm2::simulation::KeccakF1600State = typedef std::array<std::array<uint64_t, 5>, 5>

Definition at line 19 of file keccakf1600_event.hpp.

◆ KeccakF1600StateMemValues

using bb::avm2::simulation::KeccakF1600StateMemValues = typedef std::array<std::array<MemoryValue, 5>, 5>

Definition at line 20 of file keccakf1600_event.hpp.

◆ MerkleTreeId

◆ NoteHashTreeCheckEvent

◆ NullifierLeafValue

◆ NullifierTreeCheckEvent

◆ NullifierTreeLeafPreimage

◆ Operand

Definition at line 28 of file serialization.hpp.

◆ poseidon2

◆ Poseidon2

◆ Poseidon2Hash

◆ Poseidon2Perm

◆ PublicDataLeafValue

◆ PublicDataTreeCheckEvent

◆ PublicDataTreeLeafPreimage

◆ RawPoseidon2

◆ SequentialInsertionResult

◆ SiblingPath

◆ TxEvent

◆ TxPhaseEventType

◆ WrittenPublicDataSlotsTree

◆ WrittenPublicDataSlotsTreeLeafPreimage

Enumeration Type Documentation

◆ AddressingEventError

Enumerator
BASE_ADDRESS_INVALID 
RELATIVE_COMPUTATION_OOB 
INVALID_ADDRESS_AFTER_INDIRECTION 

Definition at line 14 of file addressing_event.hpp.

◆ AluError

enum class bb::avm2::simulation::AluError
strong
Enumerator
TAG_ERROR 
DIV_0_ERROR 

Definition at line 27 of file alu_event.hpp.

◆ AluOperation

Enumerator
ADD 
SUB 
MUL 
DIV 
FDIV 
EQ 
LT 
LTE 
NOT 
SHL 
SHR 
TRUNCATE 

Definition at line 12 of file alu_event.hpp.

◆ CheckPointEventType

Enumerator
CREATE_CHECKPOINT 
COMMIT_CHECKPOINT 
REVERT_CHECKPOINT 

Definition at line 7 of file checkpoint_event_type.hpp.

◆ DataCopyOperation

Enumerator
CD_COPY 
RD_COPY 

Definition at line 16 of file data_copy_events.hpp.

◆ ExecutionError

Enumerator
NONE 
BYTECODE_NOT_FOUND 
INSTRUCTION_FETCHING 
ADDRESSING 
REGISTER_READ 
GAS 
OPCODE_EXECUTION 

Definition at line 21 of file execution_event.hpp.

◆ FieldGreaterOperation

enum class bb::avm2::simulation::FieldGreaterOperation : uint8_t
strong
Enumerator
GREATER_THAN 
CANONICAL_DECOMPOSITION 

Definition at line 9 of file field_gt_event.hpp.

◆ InstrDeserializationError

Enumerator
PC_OUT_OF_RANGE 
OPCODE_OUT_OF_RANGE 
INSTRUCTION_OUT_OF_RANGE 
TAG_OUT_OF_RANGE 
INVALID_EXECUTION_OPCODE 

Definition at line 50 of file serialization.hpp.

◆ MemoryMode

Enumerator
READ 
WRITE 

Definition at line 9 of file memory_event.hpp.

◆ OperandType

enum class bb::avm2::simulation::OperandType : uint8_t
strong
Enumerator
INDIRECT8 
INDIRECT16 
TAG 
UINT8 
UINT16 
UINT32 
UINT64 
UINT128 
FF 

Definition at line 19 of file serialization.hpp.

◆ SiloingType

Enumerator
NULLIFIER 

Definition at line 7 of file siloing_event.hpp.

Function Documentation

◆ BENCHMARK()

bb::avm2::simulation::BENCHMARK ( BM_WrittenSlotsTreeStack  ) -> Arg(1000) ->Arg(3000) ->Arg(6000) ->Arg(9000) ->Unit(benchmark::kMicrosecond)

◆ build_public_data_slots_tree()

WrittenPublicDataSlotsTree bb::avm2::simulation::build_public_data_slots_tree ( )

Definition at line 58 of file written_slots_tree.cpp.

◆ check_tag()

bool bb::avm2::simulation::check_tag ( const Instruction instruction)

Check whether the instruction must have a tag operand and whether the operand value is in the value tag range. This is specified by OPCODE_WIRE_FORMAT. If the instruction does not have a valid wire opcode or the relevant tag operand is missing, we return false. However, we do not fully validate the instruction.

Parameters
instructionThe instruction to be checked upon.
Returns
Boolean telling whether instruction complies with the tag specification.

Definition at line 403 of file serialization.cpp.

◆ compute_contract_address()

FF bb::avm2::simulation::compute_contract_address ( const ContractInstance contract_instance)

Definition at line 68 of file contract_crypto.cpp.

◆ compute_contract_class_id()

FF bb::avm2::simulation::compute_contract_class_id ( const FF artifact_hash,
const FF private_fn_root,
const FF public_bytecode_commitment 
)

Definition at line 48 of file contract_crypto.cpp.

◆ compute_public_bytecode_commitment()

FF bb::avm2::simulation::compute_public_bytecode_commitment ( std::span< const uint8_t >  bytecode)

Definition at line 40 of file contract_crypto.cpp.

◆ decompose() [1/2]

U128Decomposition bb::avm2::simulation::decompose ( const uint128_t x)

Definition at line 16 of file uint_decomposition.cpp.

◆ decompose() [2/2]

U256Decomposition bb::avm2::simulation::decompose ( const uint256_t x)

Definition at line 9 of file uint_decomposition.cpp.

◆ deserialize_instruction()

Instruction bb::avm2::simulation::deserialize_instruction ( std::span< const uint8_t >  bytecode,
size_t  pos 
)

Parsing of an instruction in the supplied bytecode at byte position pos. This checks that the WireOpCode value is in the defined range and extracts the operands for each WireOpCode based on the specification from OPCODE_WIRE_FORMAT.

Parameters
bytecodeThe bytecode to be parsed as a vector of bytes/uint8_t
posBytecode position
Exceptions
runtime_errorexception when the bytecode is invalid or pos is out-of-range
Returns
The instruction

Definition at line 213 of file serialization.cpp.

◆ encode_bytecode()

std::vector< FF > bb::avm2::simulation::encode_bytecode ( std::span< const uint8_t >  bytecode)

Definition at line 11 of file contract_crypto.cpp.

◆ hash_public_keys()

FF bb::avm2::simulation::hash_public_keys ( const PublicKeys public_keys)

Definition at line 54 of file contract_crypto.cpp.

◆ operator<<()

std::ostream & bb::avm2::simulation::operator<< ( std::ostream &  os,
const WrittenPublicDataSlotLeafValue v 
)

Definition at line 17 of file written_slots_tree.cpp.

◆ ror()

constexpr uint32_t bb::avm2::simulation::ror ( uint32_t  val,
uint32_t  shift 
)
constexpr

Definition at line 11 of file sha256_compression.hpp.

◆ sha256_block()

std::array< uint32_t, 8 > bb::avm2::simulation::sha256_block ( const std::array< uint32_t, 8 > &  h_init,
const std::array< uint32_t, 16 > &  input 
)

Fill first 16 words with the message schedule

Extend the input data into the remaining 48 words

Initialize round variables with previous block output

Apply SHA-256 compression function to the message schedule

Add into previous block output and return

Definition at line 23 of file sha256_compression.cpp.

◆ TEST() [1/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
Basic   
)

Definition at line 20 of file emit_unencrypted_log.test.cpp.

◆ TEST() [2/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
CheckpointListener   
)

Definition at line 349 of file emit_unencrypted_log.test.cpp.

◆ TEST() [3/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
NegativeMemoryOutOfBounds   
)

Definition at line 135 of file emit_unencrypted_log.test.cpp.

◆ TEST() [4/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
NegativeStatic   
)

Definition at line 294 of file emit_unencrypted_log.test.cpp.

◆ TEST() [5/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
NegativeTagMismatch   
)

Definition at line 239 of file emit_unencrypted_log.test.cpp.

◆ TEST() [6/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
NegativeTooLarge   
)

Definition at line 74 of file emit_unencrypted_log.test.cpp.

◆ TEST() [7/7]

bb::avm2::simulation::TEST ( EmitUnencryptedLogTest  ,
NegativeTooManyLogs   
)

Definition at line 184 of file emit_unencrypted_log.test.cpp.

◆ to_string() [1/2]

std::string bb::avm2::simulation::to_string ( AddressingEventError  e)
inline

Definition at line 23 of file addressing_event.hpp.

◆ to_string() [2/2]

std::string bb::avm2::simulation::to_string ( AluError  e)
inline

Definition at line 32 of file alu_event.hpp.

◆ unconstrained_compute_leaf_slot()

FF bb::avm2::simulation::unconstrained_compute_leaf_slot ( const AztecAddress contract_address,
const FF slot 
)

Definition at line 26 of file merkle.cpp.

◆ unconstrained_make_unique_note_hash()

FF bb::avm2::simulation::unconstrained_make_unique_note_hash ( const FF siloed_note_hash,
const FF first_nullifier,
uint64_t  note_hash_counter 
)

Definition at line 41 of file merkle.cpp.

◆ unconstrained_root_from_path()

FF bb::avm2::simulation::unconstrained_root_from_path ( const FF leaf_value,
const uint64_t  leaf_index,
std::span< const FF path 
)

Definition at line 12 of file merkle.cpp.

◆ unconstrained_silo_note_hash()

FF bb::avm2::simulation::unconstrained_silo_note_hash ( const AztecAddress contract_address,
const FF note_hash 
)

Definition at line 36 of file merkle.cpp.

◆ unconstrained_silo_nullifier()

FF bb::avm2::simulation::unconstrained_silo_nullifier ( const AztecAddress contract_address,
const FF nullifier 
)

Definition at line 31 of file merkle.cpp.

Variable Documentation

◆ external_call_format

const std::vector<OperandType> bb::avm2::simulation::external_call_format
Initial value:
= { OperandType::INDIRECT16,
OperandType::UINT16,
OperandType::UINT16,
OperandType::UINT16,
OperandType::UINT16,
OperandType::UINT16 }

Definition at line 43 of file serialization.cpp.

◆ keccak_pi_rho_x_coords

constexpr std::array<std::array<uint8_t, 5>, 5> bb::avm2::simulation::keccak_pi_rho_x_coords
constexpr
Initial value:
= { {
{ 0, 3, 1, 4, 2 },
{ 1, 4, 2, 0, 3 },
{ 2, 0, 3, 1, 4 },
{ 3, 1, 4, 2, 0 },
{ 4, 2, 0, 3, 1 },
} }

Definition at line 29 of file keccakf1600.hpp.

◆ keccak_rotation_len

constexpr std::array<std::array<uint8_t, 5>, 5> bb::avm2::simulation::keccak_rotation_len
constexpr
Initial value:
= { {
{ 0, 36, 3, 41, 18 },
{ 1, 44, 10, 45, 2 },
{ 62, 6, 43, 15, 61 },
{ 28, 55, 25, 21, 56 },
{ 27, 20, 39, 8, 14 },
} }

Definition at line 18 of file keccakf1600.hpp.

◆ keccak_round_constants

constexpr std::array<uint64_t, 24> bb::avm2::simulation::keccak_round_constants
constexpr
Initial value:
= { {
0x0000000000000001, 0x0000000000008082, 0x800000000000808a, 0x8000000080008000, 0x000000000000808b,
0x0000000080000001, 0x8000000080008081, 0x8000000000008009, 0x000000000000008a, 0x0000000000000088,
0x0000000080008009, 0x000000008000000a, 0x000000008000808b, 0x800000000000008b, 0x8000000000008089,
0x8000000000008003, 0x8000000000008002, 0x8000000000000080, 0x000000000000800a, 0x800000008000000a,
0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008,
} }

Definition at line 39 of file keccakf1600.hpp.

◆ kernel_input_operand_format

const std::vector<OperandType> bb::avm2::simulation::kernel_input_operand_format = { OperandType::INDIRECT8, OperandType::UINT16 }

Definition at line 41 of file serialization.cpp.

◆ MAX_MEM_ADDR

constexpr uint32_t bb::avm2::simulation::MAX_MEM_ADDR = AVM_HIGHEST_MEM_ADDRESS
constexpr

Definition at line 12 of file data_copy.cpp.

◆ OPERAND_TYPE_SIZE_BYTES

const std::unordered_map<OperandType, uint32_t> bb::avm2::simulation::OPERAND_TYPE_SIZE_BYTES
Initial value:
= {
{ OperandType::INDIRECT8, 1 }, { OperandType::INDIRECT16, 2 }, { OperandType::TAG, 1 },
{ OperandType::UINT8, 1 }, { OperandType::UINT16, 2 }, { OperandType::UINT32, 4 },
{ OperandType::UINT64, 8 }, { OperandType::UINT128, 16 }, { OperandType::FF, 32 }
}

Definition at line 22 of file serialization.cpp.

◆ round_constants

constexpr uint32_t bb::avm2::simulation::round_constants[64]
constexpr
Initial value:
= {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
}

Definition at line 11 of file sha256_compression.cpp.

◆ three_operand_format16

const std::vector<OperandType> bb::avm2::simulation::three_operand_format16
Initial value:
= {
OperandType::INDIRECT8,
OperandType::UINT16,
OperandType::UINT16,
OperandType::UINT16,
}

Definition at line 35 of file serialization.cpp.

◆ three_operand_format8

const std::vector<OperandType> bb::avm2::simulation::three_operand_format8
Initial value:
= {
OperandType::INDIRECT8,
OperandType::UINT8,
OperandType::UINT8,
OperandType::UINT8,
}

Definition at line 29 of file serialization.cpp.

◆ TWO_POW_128

const uint256_t bb::avm2::simulation::TWO_POW_128 = uint256_t(1) << 128

Definition at line 6 of file uint_decomposition.cpp.

◆ TWO_POW_64

const uint128_t bb::avm2::simulation::TWO_POW_64 = static_cast<uint128_t>(1) << 64

Definition at line 7 of file uint_decomposition.cpp.

◆ WireOpCode_WIRE_FORMAT

const std::unordered_map<WireOpCode, std::vector<OperandType> > bb::avm2::simulation::WireOpCode_WIRE_FORMAT

Definition at line 52 of file serialization.cpp.