@aztec/simulator 0.76.4 → 0.77.0-testnet-ignition.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dest/client.d.ts +5 -0
- package/dest/client.d.ts.map +1 -0
- package/dest/client.js +3 -0
- package/dest/{public → common}/db_interfaces.d.ts +8 -33
- package/dest/common/db_interfaces.d.ts.map +1 -0
- package/dest/common/db_interfaces.js +1 -0
- package/dest/common/debug_fn_name.d.ts +3 -2
- package/dest/common/debug_fn_name.d.ts.map +1 -1
- package/dest/common/debug_fn_name.js +2 -5
- package/dest/common/errors.d.ts +4 -4
- package/dest/common/errors.d.ts.map +1 -1
- package/dest/common/errors.js +30 -39
- package/dest/common/index.d.ts +2 -1
- package/dest/common/index.d.ts.map +1 -1
- package/dest/common/index.js +2 -2
- package/dest/common/message_load_oracle_inputs.d.ts +2 -2
- package/dest/common/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/common/message_load_oracle_inputs.js +8 -8
- package/dest/common/stats/index.d.ts.map +1 -0
- package/dest/{stats → common/stats}/stats.d.ts +2 -2
- package/dest/common/stats/stats.d.ts.map +1 -0
- package/dest/common/stats/stats.js +10 -0
- package/dest/{acvm → private/acvm}/acvm.d.ts +4 -4
- package/dest/private/acvm/acvm.d.ts.map +1 -0
- package/dest/private/acvm/acvm.js +70 -0
- package/dest/{acvm → private/acvm}/acvm_types.d.ts +1 -1
- package/dest/private/acvm/acvm_types.d.ts.map +1 -0
- package/dest/private/acvm/acvm_types.js +3 -0
- package/dest/{acvm → private/acvm}/deserialize.d.ts +2 -2
- package/dest/private/acvm/deserialize.d.ts.map +1 -0
- package/dest/private/acvm/deserialize.js +42 -0
- package/dest/private/acvm/index.d.ts.map +1 -0
- package/dest/private/acvm/index.js +5 -0
- package/dest/{acvm → private/acvm}/oracle/index.d.ts +1 -1
- package/dest/private/acvm/oracle/index.d.ts.map +1 -0
- package/dest/private/acvm/oracle/index.js +2 -0
- package/dest/{acvm → private/acvm}/oracle/oracle.d.ts +4 -3
- package/dest/private/acvm/oracle/oracle.d.ts.map +1 -0
- package/dest/private/acvm/oracle/oracle.js +263 -0
- package/dest/{acvm → private/acvm}/oracle/typed_oracle.d.ts +12 -6
- package/dest/private/acvm/oracle/typed_oracle.d.ts.map +1 -0
- package/dest/private/acvm/oracle/typed_oracle.js +132 -0
- package/dest/{acvm → private/acvm}/serialize.d.ts +7 -3
- package/dest/private/acvm/serialize.d.ts.map +1 -0
- package/dest/private/acvm/serialize.js +46 -0
- package/dest/{client → private}/client_execution_context.d.ts +20 -17
- package/dest/private/client_execution_context.d.ts.map +1 -0
- package/dest/private/client_execution_context.js +378 -0
- package/dest/{client → private}/db_oracle.d.ts +19 -7
- package/dest/private/db_oracle.d.ts.map +1 -0
- package/dest/private/db_oracle.js +14 -0
- package/dest/{client → private}/execution_note_cache.d.ts +2 -2
- package/dest/private/execution_note_cache.d.ts.map +1 -0
- package/dest/private/execution_note_cache.js +180 -0
- package/dest/{common → private}/hashed_values_cache.d.ts +2 -2
- package/dest/private/hashed_values_cache.d.ts.map +1 -0
- package/dest/private/hashed_values_cache.js +46 -0
- package/dest/private/index.d.ts +13 -0
- package/dest/private/index.d.ts.map +1 -0
- package/dest/private/index.js +12 -0
- package/dest/{client → private}/pick_notes.d.ts +1 -1
- package/dest/private/pick_notes.d.ts.map +1 -0
- package/dest/private/pick_notes.js +51 -0
- package/dest/private/private_execution.d.ts +24 -0
- package/dest/private/private_execution.d.ts.map +1 -0
- package/dest/private/private_execution.js +90 -0
- package/dest/{providers → private/providers}/acvm_native.d.ts +5 -5
- package/dest/private/providers/acvm_native.d.ts.map +1 -0
- package/dest/private/providers/acvm_native.js +139 -0
- package/dest/{providers → private/providers}/acvm_wasm.d.ts +4 -4
- package/dest/private/providers/acvm_wasm.d.ts.map +1 -0
- package/dest/private/providers/acvm_wasm.js +62 -0
- package/dest/{providers → private/providers}/acvm_wasm_with_blobs.d.ts +5 -5
- package/dest/private/providers/acvm_wasm_with_blobs.d.ts.map +1 -0
- package/dest/{providers → private/providers}/acvm_wasm_with_blobs.js +3 -6
- package/dest/{providers → private/providers}/factory.d.ts +1 -1
- package/dest/private/providers/factory.d.ts.map +1 -0
- package/dest/private/providers/factory.js +27 -0
- package/dest/{common → private/providers}/simulation_provider.d.ts +5 -5
- package/dest/private/providers/simulation_provider.d.ts.map +1 -0
- package/dest/private/providers/simulation_provider.js +24 -0
- package/dest/private/simulator.d.ts +36 -0
- package/dest/private/simulator.d.ts.map +1 -0
- package/dest/private/simulator.js +78 -0
- package/dest/{client → private}/unconstrained_execution.d.ts +5 -5
- package/dest/private/unconstrained_execution.d.ts.map +1 -0
- package/dest/private/unconstrained_execution.js +27 -0
- package/dest/{client → private}/view_data_oracle.d.ts +15 -7
- package/dest/private/view_data_oracle.d.ts.map +1 -0
- package/dest/private/view_data_oracle.js +260 -0
- package/dest/{avm → public/avm}/avm_context.d.ts +7 -5
- package/dest/public/avm/avm_context.d.ts.map +1 -0
- package/dest/public/avm/avm_context.js +44 -0
- package/dest/{avm → public/avm}/avm_contract_call_result.d.ts +5 -5
- package/dest/public/avm/avm_contract_call_result.d.ts.map +1 -0
- package/dest/public/avm/avm_contract_call_result.js +50 -0
- package/dest/{avm → public/avm}/avm_execution_environment.d.ts +2 -2
- package/dest/public/avm/avm_execution_environment.d.ts.map +1 -0
- package/dest/public/avm/avm_execution_environment.js +31 -0
- package/dest/public/avm/avm_gas.d.ts.map +1 -0
- package/dest/public/avm/avm_gas.js +202 -0
- package/dest/{avm → public/avm}/avm_machine_state.d.ts +2 -2
- package/dest/public/avm/avm_machine_state.d.ts.map +1 -0
- package/dest/public/avm/avm_machine_state.js +106 -0
- package/dest/{avm → public/avm}/avm_memory_types.d.ts +2 -2
- package/dest/public/avm/avm_memory_types.d.ts.map +1 -0
- package/dest/public/avm/avm_memory_types.js +340 -0
- package/dest/{avm → public/avm}/avm_simulator.d.ts +5 -3
- package/dest/public/avm/avm_simulator.d.ts.map +1 -0
- package/dest/public/avm/avm_simulator.js +202 -0
- package/dest/public/avm/bytecode_utils.d.ts.map +1 -0
- package/dest/public/avm/bytecode_utils.js +17 -0
- package/dest/{avm → public/avm}/errors.d.ts +5 -4
- package/dest/public/avm/errors.d.ts.map +1 -0
- package/dest/public/avm/errors.js +179 -0
- package/dest/{avm → public/avm}/fixtures/avm_simulation_tester.d.ts +6 -6
- package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +1 -0
- package/dest/public/avm/fixtures/avm_simulation_tester.js +76 -0
- package/dest/{avm → public/avm}/fixtures/base_avm_simulation_tester.d.ts +13 -12
- package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +1 -0
- package/dest/public/avm/fixtures/base_avm_simulation_tester.js +83 -0
- package/dest/{avm → public/avm}/fixtures/index.d.ts +24 -7
- package/dest/public/avm/fixtures/index.d.ts.map +1 -0
- package/dest/public/avm/fixtures/index.js +175 -0
- package/dest/{avm → public/avm}/fixtures/simple_contract_data_source.d.ts +10 -6
- package/dest/public/avm/fixtures/simple_contract_data_source.d.ts.map +1 -0
- package/dest/public/avm/fixtures/simple_contract_data_source.js +74 -0
- package/dest/public/avm/index.d.ts +4 -0
- package/dest/public/avm/index.d.ts.map +1 -0
- package/dest/{avm/index.d.ts → public/avm/index.js} +1 -2
- package/dest/public/avm/journal/index.d.ts.map +1 -0
- package/dest/{avm → public/avm}/journal/journal.d.ts +51 -18
- package/dest/public/avm/journal/journal.d.ts.map +1 -0
- package/dest/public/avm/journal/journal.js +486 -0
- package/dest/{avm → public/avm}/journal/nullifiers.d.ts +8 -6
- package/dest/public/avm/journal/nullifiers.d.ts.map +1 -0
- package/dest/public/avm/journal/nullifiers.js +97 -0
- package/dest/{avm → public/avm}/journal/public_storage.d.ts +2 -2
- package/dest/public/avm/journal/public_storage.d.ts.map +1 -0
- package/dest/public/avm/journal/public_storage.js +145 -0
- package/dest/public/avm/opcodes/accrued_substate.d.ts.map +1 -0
- package/dest/public/avm/opcodes/accrued_substate.js +252 -0
- package/dest/public/avm/opcodes/addressing_mode.d.ts.map +1 -0
- package/dest/public/avm/opcodes/addressing_mode.js +74 -0
- package/dest/public/avm/opcodes/arithmetic.d.ts.map +1 -0
- package/dest/public/avm/opcodes/arithmetic.js +73 -0
- package/dest/public/avm/opcodes/bitwise.d.ts.map +1 -0
- package/dest/public/avm/opcodes/bitwise.js +106 -0
- package/dest/public/avm/opcodes/comparators.d.ts.map +1 -0
- package/dest/public/avm/opcodes/comparators.js +43 -0
- package/dest/public/avm/opcodes/contract.d.ts.map +1 -0
- package/dest/public/avm/opcodes/contract.js +66 -0
- package/dest/public/avm/opcodes/control_flow.d.ts.map +1 -0
- package/dest/public/avm/opcodes/control_flow.js +105 -0
- package/dest/{avm → public/avm}/opcodes/conversion.d.ts +1 -1
- package/dest/public/avm/opcodes/conversion.d.ts.map +1 -0
- package/dest/public/avm/opcodes/conversion.js +69 -0
- package/dest/{avm → public/avm}/opcodes/ec_add.d.ts +1 -1
- package/dest/public/avm/opcodes/ec_add.d.ts.map +1 -0
- package/dest/public/avm/opcodes/ec_add.js +84 -0
- package/dest/public/avm/opcodes/environment_getters.d.ts.map +1 -0
- package/dest/public/avm/opcodes/environment_getters.js +79 -0
- package/dest/public/avm/opcodes/external_calls.d.ts.map +1 -0
- package/dest/public/avm/opcodes/external_calls.js +180 -0
- package/dest/{avm → public/avm}/opcodes/hashing.d.ts +1 -1
- package/dest/public/avm/opcodes/hashing.d.ts.map +1 -0
- package/dest/public/avm/opcodes/hashing.js +114 -0
- package/dest/public/avm/opcodes/index.d.ts.map +1 -0
- package/dest/{avm → public/avm}/opcodes/instruction.d.ts +2 -2
- package/dest/public/avm/opcodes/instruction.d.ts.map +1 -0
- package/dest/public/avm/opcodes/instruction.js +91 -0
- package/dest/public/avm/opcodes/instruction_impl.d.ts.map +1 -0
- package/dest/public/avm/opcodes/instruction_impl.js +30 -0
- package/dest/public/avm/opcodes/memory.d.ts.map +1 -0
- package/dest/public/avm/opcodes/memory.js +253 -0
- package/dest/{avm → public/avm}/opcodes/misc.d.ts +1 -1
- package/dest/public/avm/opcodes/misc.d.ts.map +1 -0
- package/dest/public/avm/opcodes/misc.js +48 -0
- package/dest/public/avm/opcodes/storage.d.ts.map +1 -0
- package/dest/public/avm/opcodes/storage.js +66 -0
- package/dest/public/avm/serialization/buffer_cursor.d.ts.map +1 -0
- package/dest/public/avm/serialization/buffer_cursor.js +99 -0
- package/dest/{avm → public/avm}/serialization/bytecode_serialization.d.ts +1 -1
- package/dest/public/avm/serialization/bytecode_serialization.d.ts.map +1 -0
- package/dest/public/avm/serialization/bytecode_serialization.js +328 -0
- package/dest/{avm → public/avm}/serialization/instruction_serialization.d.ts +1 -2
- package/dest/public/avm/serialization/instruction_serialization.d.ts.map +1 -0
- package/dest/public/avm/serialization/instruction_serialization.js +225 -0
- package/dest/{avm → public/avm}/test_utils.d.ts +6 -4
- package/dest/public/avm/test_utils.d.ts.map +1 -0
- package/dest/public/avm/test_utils.js +52 -0
- package/dest/public/bytecode_errors.js +1 -2
- package/dest/public/execution.d.ts +8 -2
- package/dest/public/execution.d.ts.map +1 -1
- package/dest/public/execution.js +4 -5
- package/dest/public/executor_metrics.js +16 -12
- package/dest/public/fixtures/index.js +0 -1
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts +15 -9
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +1 -1
- package/dest/public/fixtures/public_tx_simulation_tester.js +54 -53
- package/dest/public/fixtures/utils.d.ts +7 -11
- package/dest/public/fixtures/utils.d.ts.map +1 -1
- package/dest/public/fixtures/utils.js +92 -32
- package/dest/public/index.d.ts +5 -4
- package/dest/public/index.d.ts.map +1 -1
- package/dest/public/index.js +5 -5
- package/dest/public/public_db_sources.d.ts +82 -34
- package/dest/public/public_db_sources.d.ts.map +1 -1
- package/dest/public/public_db_sources.js +171 -196
- package/dest/public/{public_processor.d.ts → public_processor/public_processor.d.ts} +10 -8
- package/dest/public/public_processor/public_processor.d.ts.map +1 -0
- package/dest/public/public_processor/public_processor.js +379 -0
- package/dest/public/{public_processor_metrics.d.ts → public_processor/public_processor_metrics.d.ts} +3 -3
- package/dest/public/public_processor/public_processor_metrics.d.ts.map +1 -0
- package/dest/public/public_processor/public_processor_metrics.js +125 -0
- package/dest/public/{public_tx_context.d.ts → public_tx_simulator/public_tx_context.d.ts} +14 -8
- package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/public_tx_context.js +320 -0
- package/dest/public/{public_tx_simulator.d.ts → public_tx_simulator/public_tx_simulator.d.ts} +10 -7
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/public_tx_simulator.js +325 -0
- package/dest/public/side_effect_errors.js +1 -2
- package/dest/public/side_effect_trace.d.ts +16 -10
- package/dest/public/side_effect_trace.d.ts.map +1 -1
- package/dest/public/side_effect_trace.js +82 -149
- package/dest/public/side_effect_trace_interface.d.ts +9 -7
- package/dest/public/side_effect_trace_interface.d.ts.map +1 -1
- package/dest/public/side_effect_trace_interface.js +1 -2
- package/dest/public/tx_contract_cache.d.ts +41 -0
- package/dest/public/tx_contract_cache.d.ts.map +1 -0
- package/dest/public/tx_contract_cache.js +49 -0
- package/dest/public/unique_class_ids.js +23 -28
- package/dest/public/utils.d.ts +2 -2
- package/dest/public/utils.d.ts.map +1 -1
- package/dest/public/utils.js +17 -12
- package/dest/server.d.ts +4 -4
- package/dest/server.d.ts.map +1 -1
- package/dest/server.js +3 -5
- package/dest/test/utils.d.ts +3 -2
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +9 -7
- package/package.json +19 -21
- package/src/client.ts +4 -0
- package/src/{public → common}/db_interfaces.ts +8 -40
- package/src/common/debug_fn_name.ts +4 -2
- package/src/common/errors.ts +5 -5
- package/src/common/index.ts +2 -1
- package/src/common/message_load_oracle_inputs.ts +2 -2
- package/src/common/stats/index.ts +1 -0
- package/src/{stats → common/stats}/stats.ts +2 -2
- package/src/{acvm → private/acvm}/acvm.ts +5 -5
- package/src/{acvm → private/acvm}/acvm_types.ts +1 -1
- package/src/{acvm → private/acvm}/deserialize.ts +2 -2
- package/src/{acvm → private/acvm}/oracle/index.ts +1 -1
- package/src/{acvm → private/acvm}/oracle/oracle.ts +22 -12
- package/src/{acvm → private/acvm}/oracle/typed_oracle.ts +50 -55
- package/src/{acvm → private/acvm}/serialize.ts +10 -3
- package/src/{client → private}/client_execution_context.ts +54 -37
- package/src/{client → private}/db_oracle.ts +20 -20
- package/src/{client → private}/execution_note_cache.ts +3 -3
- package/src/{common → private}/hashed_values_cache.ts +2 -2
- package/src/private/index.ts +12 -0
- package/src/{client → private}/pick_notes.ts +1 -1
- package/src/{client → private}/private_execution.ts +46 -14
- package/src/{providers → private/providers}/acvm_native.ts +6 -6
- package/src/{providers → private/providers}/acvm_wasm.ts +4 -4
- package/src/{providers → private/providers}/acvm_wasm_with_blobs.ts +5 -5
- package/src/{providers → private/providers}/factory.ts +1 -1
- package/src/{common → private/providers}/simulation_provider.ts +5 -5
- package/src/{client → private}/simulator.ts +31 -123
- package/src/{client → private}/unconstrained_execution.ts +7 -7
- package/src/{client → private}/view_data_oracle.ts +25 -28
- package/src/{avm → public/avm}/avm_context.ts +12 -7
- package/src/{avm → public/avm}/avm_contract_call_result.ts +6 -6
- package/src/{avm → public/avm}/avm_execution_environment.ts +2 -2
- package/src/{avm → public/avm}/avm_gas.ts +1 -3
- package/src/{avm → public/avm}/avm_machine_state.ts +2 -2
- package/src/{avm → public/avm}/avm_memory_types.ts +4 -4
- package/src/{avm → public/avm}/avm_simulator.ts +12 -6
- package/src/{avm → public/avm}/errors.ts +5 -4
- package/src/{avm → public/avm}/fixtures/avm_simulation_tester.ts +16 -15
- package/src/{avm → public/avm}/fixtures/base_avm_simulation_tester.ts +45 -40
- package/src/{avm → public/avm}/fixtures/index.ts +77 -12
- package/src/{avm → public/avm}/fixtures/simple_contract_data_source.ts +26 -19
- package/src/{avm → public/avm}/index.ts +1 -1
- package/src/public/avm/journal/index.ts +1 -0
- package/src/{avm → public/avm}/journal/journal.ts +330 -305
- package/src/{avm → public/avm}/journal/nullifiers.ts +20 -19
- package/src/{avm → public/avm}/journal/public_storage.ts +2 -2
- package/src/{avm → public/avm}/opcodes/contract.ts +1 -1
- package/src/{avm → public/avm}/opcodes/control_flow.ts +1 -1
- package/src/{avm → public/avm}/opcodes/conversion.ts +1 -1
- package/src/{avm → public/avm}/opcodes/ec_add.ts +2 -2
- package/src/{avm → public/avm}/opcodes/external_calls.ts +5 -6
- package/src/{avm → public/avm}/opcodes/hashing.ts +1 -1
- package/src/public/avm/opcodes/index.ts +15 -0
- package/src/{avm → public/avm}/opcodes/instruction.ts +2 -2
- package/src/{avm → public/avm}/opcodes/misc.ts +1 -1
- package/src/public/avm/serialization/bytecode_serialization.ts +204 -0
- package/src/{avm → public/avm}/serialization/instruction_serialization.ts +0 -1
- package/src/{avm → public/avm}/test_utils.ts +10 -7
- package/src/public/execution.ts +9 -12
- package/src/public/fixtures/public_tx_simulation_tester.ts +66 -72
- package/src/public/fixtures/utils.ts +122 -33
- package/src/public/index.ts +5 -4
- package/src/public/public_db_sources.ts +216 -222
- package/src/public/{public_processor.ts → public_processor/public_processor.ts} +78 -53
- package/src/public/{public_processor_metrics.ts → public_processor/public_processor_metrics.ts} +3 -3
- package/src/public/{public_tx_context.ts → public_tx_simulator/public_tx_context.ts} +70 -75
- package/src/public/{public_tx_simulator.ts → public_tx_simulator/public_tx_simulator.ts} +104 -91
- package/src/public/side_effect_trace.ts +85 -160
- package/src/public/side_effect_trace_interface.ts +10 -23
- package/src/public/tx_contract_cache.ts +69 -0
- package/src/public/unique_class_ids.ts +1 -1
- package/src/public/utils.ts +2 -2
- package/src/server.ts +4 -4
- package/src/test/utils.ts +5 -3
- package/dest/acvm/acvm.d.ts.map +0 -1
- package/dest/acvm/acvm.js +0 -73
- package/dest/acvm/acvm_types.d.ts.map +0 -1
- package/dest/acvm/acvm_types.js +0 -2
- package/dest/acvm/deserialize.d.ts.map +0 -1
- package/dest/acvm/deserialize.js +0 -46
- package/dest/acvm/index.d.ts.map +0 -1
- package/dest/acvm/index.js +0 -6
- package/dest/acvm/oracle/index.d.ts.map +0 -1
- package/dest/acvm/oracle/index.js +0 -3
- package/dest/acvm/oracle/oracle.d.ts.map +0 -1
- package/dest/acvm/oracle/oracle.js +0 -230
- package/dest/acvm/oracle/typed_oracle.d.ts.map +0 -1
- package/dest/acvm/oracle/typed_oracle.js +0 -131
- package/dest/acvm/serialize.d.ts.map +0 -1
- package/dest/acvm/serialize.js +0 -48
- package/dest/avm/avm_context.d.ts.map +0 -1
- package/dest/avm/avm_context.js +0 -44
- package/dest/avm/avm_contract_call_result.d.ts.map +0 -1
- package/dest/avm/avm_contract_call_result.js +0 -45
- package/dest/avm/avm_execution_environment.d.ts.map +0 -1
- package/dest/avm/avm_execution_environment.js +0 -28
- package/dest/avm/avm_gas.d.ts.map +0 -1
- package/dest/avm/avm_gas.js +0 -170
- package/dest/avm/avm_machine_state.d.ts.map +0 -1
- package/dest/avm/avm_machine_state.js +0 -112
- package/dest/avm/avm_memory_types.d.ts.map +0 -1
- package/dest/avm/avm_memory_types.js +0 -327
- package/dest/avm/avm_simulator.d.ts.map +0 -1
- package/dest/avm/avm_simulator.js +0 -193
- package/dest/avm/avm_tree.d.ts +0 -282
- package/dest/avm/avm_tree.d.ts.map +0 -1
- package/dest/avm/avm_tree.js +0 -684
- package/dest/avm/bytecode_utils.d.ts.map +0 -1
- package/dest/avm/bytecode_utils.js +0 -15
- package/dest/avm/errors.d.ts.map +0 -1
- package/dest/avm/errors.js +0 -196
- package/dest/avm/fixtures/avm_simulation_tester.d.ts.map +0 -1
- package/dest/avm/fixtures/avm_simulation_tester.js +0 -73
- package/dest/avm/fixtures/base_avm_simulation_tester.d.ts.map +0 -1
- package/dest/avm/fixtures/base_avm_simulation_tester.js +0 -76
- package/dest/avm/fixtures/index.d.ts.map +0 -1
- package/dest/avm/fixtures/index.js +0 -134
- package/dest/avm/fixtures/simple_contract_data_source.d.ts.map +0 -1
- package/dest/avm/fixtures/simple_contract_data_source.js +0 -75
- package/dest/avm/index.d.ts.map +0 -1
- package/dest/avm/index.js +0 -4
- package/dest/avm/journal/index.d.ts.map +0 -1
- package/dest/avm/journal/index.js +0 -2
- package/dest/avm/journal/journal.d.ts.map +0 -1
- package/dest/avm/journal/journal.js +0 -499
- package/dest/avm/journal/nullifiers.d.ts.map +0 -1
- package/dest/avm/journal/nullifiers.js +0 -99
- package/dest/avm/journal/public_storage.d.ts.map +0 -1
- package/dest/avm/journal/public_storage.js +0 -159
- package/dest/avm/opcodes/accrued_substate.d.ts.map +0 -1
- package/dest/avm/opcodes/accrued_substate.js +0 -215
- package/dest/avm/opcodes/addressing_mode.d.ts.map +0 -1
- package/dest/avm/opcodes/addressing_mode.js +0 -81
- package/dest/avm/opcodes/arithmetic.d.ts.map +0 -1
- package/dest/avm/opcodes/arithmetic.js +0 -70
- package/dest/avm/opcodes/bitwise.d.ts.map +0 -1
- package/dest/avm/opcodes/bitwise.js +0 -90
- package/dest/avm/opcodes/comparators.d.ts.map +0 -1
- package/dest/avm/opcodes/comparators.js +0 -40
- package/dest/avm/opcodes/contract.d.ts.map +0 -1
- package/dest/avm/opcodes/contract.js +0 -63
- package/dest/avm/opcodes/control_flow.d.ts.map +0 -1
- package/dest/avm/opcodes/control_flow.js +0 -97
- package/dest/avm/opcodes/conversion.d.ts.map +0 -1
- package/dest/avm/opcodes/conversion.js +0 -64
- package/dest/avm/opcodes/ec_add.d.ts.map +0 -1
- package/dest/avm/opcodes/ec_add.js +0 -82
- package/dest/avm/opcodes/environment_getters.d.ts.map +0 -1
- package/dest/avm/opcodes/environment_getters.js +0 -78
- package/dest/avm/opcodes/external_calls.d.ts.map +0 -1
- package/dest/avm/opcodes/external_calls.js +0 -169
- package/dest/avm/opcodes/hashing.d.ts.map +0 -1
- package/dest/avm/opcodes/hashing.js +0 -103
- package/dest/avm/opcodes/index.d.ts.map +0 -1
- package/dest/avm/opcodes/index.js +0 -16
- package/dest/avm/opcodes/instruction.d.ts.map +0 -1
- package/dest/avm/opcodes/instruction.js +0 -100
- package/dest/avm/opcodes/instruction_impl.d.ts.map +0 -1
- package/dest/avm/opcodes/instruction_impl.js +0 -33
- package/dest/avm/opcodes/memory.d.ts.map +0 -1
- package/dest/avm/opcodes/memory.js +0 -226
- package/dest/avm/opcodes/misc.d.ts.map +0 -1
- package/dest/avm/opcodes/misc.js +0 -45
- package/dest/avm/opcodes/multi_scalar_mul.d.ts +0 -16
- package/dest/avm/opcodes/multi_scalar_mul.d.ts.map +0 -1
- package/dest/avm/opcodes/multi_scalar_mul.js +0 -112
- package/dest/avm/opcodes/storage.d.ts.map +0 -1
- package/dest/avm/opcodes/storage.js +0 -61
- package/dest/avm/serialization/buffer_cursor.d.ts.map +0 -1
- package/dest/avm/serialization/buffer_cursor.js +0 -99
- package/dest/avm/serialization/bytecode_serialization.d.ts.map +0 -1
- package/dest/avm/serialization/bytecode_serialization.js +0 -132
- package/dest/avm/serialization/instruction_serialization.d.ts.map +0 -1
- package/dest/avm/serialization/instruction_serialization.js +0 -187
- package/dest/avm/test_utils.d.ts.map +0 -1
- package/dest/avm/test_utils.js +0 -52
- package/dest/client/client_execution_context.d.ts.map +0 -1
- package/dest/client/client_execution_context.js +0 -392
- package/dest/client/db_oracle.d.ts.map +0 -1
- package/dest/client/db_oracle.js +0 -17
- package/dest/client/execution_note_cache.d.ts.map +0 -1
- package/dest/client/execution_note_cache.js +0 -181
- package/dest/client/index.d.ts +0 -16
- package/dest/client/index.d.ts.map +0 -1
- package/dest/client/index.js +0 -15
- package/dest/client/pick_notes.d.ts.map +0 -1
- package/dest/client/pick_notes.js +0 -54
- package/dest/client/private_execution.d.ts +0 -19
- package/dest/client/private_execution.d.ts.map +0 -1
- package/dest/client/private_execution.js +0 -72
- package/dest/client/simulator.d.ts +0 -60
- package/dest/client/simulator.d.ts.map +0 -1
- package/dest/client/simulator.js +0 -136
- package/dest/client/unconstrained_execution.d.ts.map +0 -1
- package/dest/client/unconstrained_execution.js +0 -30
- package/dest/client/view_data_oracle.d.ts.map +0 -1
- package/dest/client/view_data_oracle.js +0 -268
- package/dest/common/hashed_values_cache.d.ts.map +0 -1
- package/dest/common/hashed_values_cache.js +0 -50
- package/dest/common/simulation_provider.d.ts.map +0 -1
- package/dest/common/simulation_provider.js +0 -27
- package/dest/common.d.ts +0 -2
- package/dest/common.d.ts.map +0 -1
- package/dest/common.js +0 -2
- package/dest/providers/acvm_native.d.ts.map +0 -1
- package/dest/providers/acvm_native.js +0 -125
- package/dest/providers/acvm_wasm.d.ts.map +0 -1
- package/dest/providers/acvm_wasm.js +0 -54
- package/dest/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
- package/dest/providers/factory.d.ts.map +0 -1
- package/dest/providers/factory.js +0 -27
- package/dest/providers/index.d.ts +0 -5
- package/dest/providers/index.d.ts.map +0 -1
- package/dest/providers/index.js +0 -5
- package/dest/public/db_interfaces.d.ts.map +0 -1
- package/dest/public/db_interfaces.js +0 -2
- package/dest/public/fee_payment.d.ts +0 -11
- package/dest/public/fee_payment.d.ts.map +0 -1
- package/dest/public/fee_payment.js +0 -21
- package/dest/public/public_processor.d.ts.map +0 -1
- package/dest/public/public_processor.js +0 -352
- package/dest/public/public_processor_metrics.d.ts.map +0 -1
- package/dest/public/public_processor_metrics.js +0 -106
- package/dest/public/public_tx_context.d.ts.map +0 -1
- package/dest/public/public_tx_context.js +0 -341
- package/dest/public/public_tx_simulator.d.ts.map +0 -1
- package/dest/public/public_tx_simulator.js +0 -333
- package/dest/stats/index.d.ts.map +0 -1
- package/dest/stats/index.js +0 -2
- package/dest/stats/stats.d.ts.map +0 -1
- package/dest/stats/stats.js +0 -11
- package/src/avm/avm_tree.ts +0 -887
- package/src/avm/opcodes/multi_scalar_mul.ts +0 -121
- package/src/avm/serialization/bytecode_serialization.ts +0 -212
- package/src/client/index.ts +0 -15
- package/src/common.ts +0 -1
- package/src/providers/index.ts +0 -4
- package/src/public/fee_payment.ts +0 -23
- /package/dest/{stats → common/stats}/index.d.ts +0 -0
- /package/{src/stats/index.ts → dest/common/stats/index.js} +0 -0
- /package/dest/{acvm → private/acvm}/index.d.ts +0 -0
- /package/dest/{avm → public/avm}/avm_gas.d.ts +0 -0
- /package/dest/{avm → public/avm}/bytecode_utils.d.ts +0 -0
- /package/dest/{avm → public/avm}/journal/index.d.ts +0 -0
- /package/{src/avm/journal/index.ts → dest/public/avm/journal/index.js} +0 -0
- /package/dest/{avm → public/avm}/opcodes/accrued_substate.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/addressing_mode.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/arithmetic.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/bitwise.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/comparators.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/contract.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/control_flow.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/environment_getters.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/external_calls.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/index.d.ts +0 -0
- /package/{src/avm/opcodes/index.ts → dest/public/avm/opcodes/index.js} +0 -0
- /package/dest/{avm → public/avm}/opcodes/instruction_impl.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/memory.d.ts +0 -0
- /package/dest/{avm → public/avm}/opcodes/storage.d.ts +0 -0
- /package/dest/{avm → public/avm}/serialization/buffer_cursor.d.ts +0 -0
- /package/src/{acvm → private/acvm}/index.ts +0 -0
- /package/src/{avm → public/avm}/bytecode_utils.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/.eslintrc.cjs +0 -0
- /package/src/{avm → public/avm}/opcodes/accrued_substate.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/addressing_mode.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/arithmetic.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/bitwise.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/comparators.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/environment_getters.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/instruction_impl.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/memory.ts +0 -0
- /package/src/{avm → public/avm}/opcodes/storage.ts +0 -0
- /package/src/{avm → public/avm}/serialization/buffer_cursor.ts +0 -0
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type CompleteAddress,
|
|
3
|
-
type MerkleTreeId,
|
|
4
|
-
type Note,
|
|
5
|
-
type NoteStatus,
|
|
6
|
-
type NullifierMembershipWitness,
|
|
7
|
-
type PublicDataWitness,
|
|
8
|
-
type UnencryptedL2Log,
|
|
9
|
-
} from '@aztec/circuit-types';
|
|
10
|
-
import {
|
|
11
|
-
type BlockHeader,
|
|
12
|
-
type ContractInstance,
|
|
13
|
-
type IndexedTaggingSecret,
|
|
14
|
-
type KeyValidationRequest,
|
|
15
|
-
type L1_TO_L2_MSG_TREE_HEIGHT,
|
|
16
|
-
} from '@aztec/circuits.js';
|
|
17
|
-
import { type FunctionSelector, type NoteSelector } from '@aztec/foundation/abi';
|
|
18
|
-
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
1
|
+
import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
19
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import type { FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
|
|
4
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
6
|
+
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
7
|
+
import type { ContractClassLog, IndexedTaggingSecret, LogWithTxData } from '@aztec/stdlib/logs';
|
|
8
|
+
import type { Note, NoteStatus } from '@aztec/stdlib/note';
|
|
9
|
+
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
10
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
20
11
|
|
|
21
|
-
import {
|
|
12
|
+
import type { MessageLoadOracleInputs } from '../../../common/message_load_oracle_inputs.js';
|
|
22
13
|
|
|
23
14
|
/**
|
|
24
15
|
* Information about a note needed during execution.
|
|
@@ -57,66 +48,66 @@ export abstract class TypedOracle {
|
|
|
57
48
|
}
|
|
58
49
|
|
|
59
50
|
storeInExecutionCache(_values: Fr[]): Promise<Fr> {
|
|
60
|
-
|
|
51
|
+
return Promise.reject(new OracleMethodNotAvailableError('storeInExecutionCache'));
|
|
61
52
|
}
|
|
62
53
|
|
|
63
54
|
loadFromExecutionCache(_hash: Fr): Promise<Fr[]> {
|
|
64
|
-
|
|
55
|
+
return Promise.reject(new OracleMethodNotAvailableError('loadFromExecutionCache'));
|
|
65
56
|
}
|
|
66
57
|
|
|
67
58
|
getBlockNumber(): Promise<number> {
|
|
68
|
-
|
|
59
|
+
return Promise.reject(new OracleMethodNotAvailableError('getBlockNumber'));
|
|
69
60
|
}
|
|
70
61
|
|
|
71
62
|
getContractAddress(): Promise<AztecAddress> {
|
|
72
|
-
|
|
63
|
+
return Promise.reject(new OracleMethodNotAvailableError('getContractAddress'));
|
|
73
64
|
}
|
|
74
65
|
|
|
75
66
|
getChainId(): Promise<Fr> {
|
|
76
|
-
|
|
67
|
+
return Promise.reject(new OracleMethodNotAvailableError('getChainId'));
|
|
77
68
|
}
|
|
78
69
|
|
|
79
70
|
getVersion(): Promise<Fr> {
|
|
80
|
-
|
|
71
|
+
return Promise.reject(new OracleMethodNotAvailableError('getVersion'));
|
|
81
72
|
}
|
|
82
73
|
|
|
83
74
|
getKeyValidationRequest(_pkMHash: Fr): Promise<KeyValidationRequest> {
|
|
84
|
-
|
|
75
|
+
return Promise.reject(new OracleMethodNotAvailableError('getKeyValidationRequest'));
|
|
85
76
|
}
|
|
86
77
|
|
|
87
78
|
getContractInstance(_address: AztecAddress): Promise<ContractInstance> {
|
|
88
|
-
|
|
79
|
+
return Promise.reject(new OracleMethodNotAvailableError('getContractInstance'));
|
|
89
80
|
}
|
|
90
81
|
|
|
91
82
|
getMembershipWitness(_blockNumber: number, _treeId: MerkleTreeId, _leafValue: Fr): Promise<Fr[] | undefined> {
|
|
92
|
-
|
|
83
|
+
return Promise.reject(new OracleMethodNotAvailableError('getMembershipWitness'));
|
|
93
84
|
}
|
|
94
85
|
|
|
95
86
|
getNullifierMembershipWitness(_blockNumber: number, _nullifier: Fr): Promise<NullifierMembershipWitness | undefined> {
|
|
96
|
-
|
|
87
|
+
return Promise.reject(new OracleMethodNotAvailableError('getNullifierMembershipWitness'));
|
|
97
88
|
}
|
|
98
89
|
|
|
99
90
|
getPublicDataTreeWitness(_blockNumber: number, _leafSlot: Fr): Promise<PublicDataWitness | undefined> {
|
|
100
|
-
|
|
91
|
+
return Promise.reject(new OracleMethodNotAvailableError('getPublicDataTreeWitness'));
|
|
101
92
|
}
|
|
102
93
|
|
|
103
94
|
getLowNullifierMembershipWitness(
|
|
104
95
|
_blockNumber: number,
|
|
105
96
|
_nullifier: Fr,
|
|
106
97
|
): Promise<NullifierMembershipWitness | undefined> {
|
|
107
|
-
|
|
98
|
+
return Promise.reject(new OracleMethodNotAvailableError('getLowNullifierMembershipWitness'));
|
|
108
99
|
}
|
|
109
100
|
|
|
110
101
|
getBlockHeader(_blockNumber: number): Promise<BlockHeader | undefined> {
|
|
111
|
-
|
|
102
|
+
return Promise.reject(new OracleMethodNotAvailableError('getBlockHeader'));
|
|
112
103
|
}
|
|
113
104
|
|
|
114
105
|
getCompleteAddress(_account: AztecAddress): Promise<CompleteAddress> {
|
|
115
|
-
|
|
106
|
+
return Promise.reject(new OracleMethodNotAvailableError('getCompleteAddress'));
|
|
116
107
|
}
|
|
117
108
|
|
|
118
109
|
getAuthWitness(_messageHash: Fr): Promise<Fr[] | undefined> {
|
|
119
|
-
|
|
110
|
+
return Promise.reject(new OracleMethodNotAvailableError('getAuthWitness'));
|
|
120
111
|
}
|
|
121
112
|
|
|
122
113
|
getNotes(
|
|
@@ -135,7 +126,7 @@ export abstract class TypedOracle {
|
|
|
135
126
|
_offset: number,
|
|
136
127
|
_status: NoteStatus,
|
|
137
128
|
): Promise<NoteData[]> {
|
|
138
|
-
|
|
129
|
+
return Promise.reject(new OracleMethodNotAvailableError('getNotes'));
|
|
139
130
|
}
|
|
140
131
|
|
|
141
132
|
notifyCreatedNote(_storageSlot: Fr, _noteTypeId: NoteSelector, _note: Fr[], _noteHash: Fr, _counter: number): void {
|
|
@@ -143,15 +134,15 @@ export abstract class TypedOracle {
|
|
|
143
134
|
}
|
|
144
135
|
|
|
145
136
|
notifyNullifiedNote(_innerNullifier: Fr, _noteHash: Fr, _counter: number): Promise<void> {
|
|
146
|
-
|
|
137
|
+
return Promise.reject(new OracleMethodNotAvailableError('notifyNullifiedNote'));
|
|
147
138
|
}
|
|
148
139
|
|
|
149
140
|
notifyCreatedNullifier(_innerNullifier: Fr): Promise<void> {
|
|
150
|
-
|
|
141
|
+
return Promise.reject(new OracleMethodNotAvailableError('notifyCreatedNullifier'));
|
|
151
142
|
}
|
|
152
143
|
|
|
153
144
|
checkNullifierExists(_innerNullifier: Fr): Promise<boolean> {
|
|
154
|
-
|
|
145
|
+
return Promise.reject(new OracleMethodNotAvailableError('checkNullifierExists'));
|
|
155
146
|
}
|
|
156
147
|
|
|
157
148
|
getL1ToL2MembershipWitness(
|
|
@@ -159,7 +150,7 @@ export abstract class TypedOracle {
|
|
|
159
150
|
_messageHash: Fr,
|
|
160
151
|
_secret: Fr,
|
|
161
152
|
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>> {
|
|
162
|
-
|
|
153
|
+
return Promise.reject(new OracleMethodNotAvailableError('getL1ToL2MembershipWitness'));
|
|
163
154
|
}
|
|
164
155
|
|
|
165
156
|
storageRead(
|
|
@@ -168,15 +159,15 @@ export abstract class TypedOracle {
|
|
|
168
159
|
_blockNumber: number,
|
|
169
160
|
_numberOfElements: number,
|
|
170
161
|
): Promise<Fr[]> {
|
|
171
|
-
|
|
162
|
+
return Promise.reject(new OracleMethodNotAvailableError('storageRead'));
|
|
172
163
|
}
|
|
173
164
|
|
|
174
165
|
storageWrite(_startStorageSlot: Fr, _values: Fr[]): Promise<Fr[]> {
|
|
175
|
-
|
|
166
|
+
return Promise.reject(new OracleMethodNotAvailableError('storageWrite'));
|
|
176
167
|
}
|
|
177
168
|
|
|
178
|
-
emitContractClassLog(_log:
|
|
179
|
-
throw new OracleMethodNotAvailableError('
|
|
169
|
+
emitContractClassLog(_log: ContractClassLog, _counter: number): void {
|
|
170
|
+
throw new OracleMethodNotAvailableError('emitContractClassLog');
|
|
180
171
|
}
|
|
181
172
|
|
|
182
173
|
callPrivateFunction(
|
|
@@ -186,7 +177,7 @@ export abstract class TypedOracle {
|
|
|
186
177
|
_sideEffectCounter: number,
|
|
187
178
|
_isStaticCall: boolean,
|
|
188
179
|
): Promise<{ endSideEffectCounter: Fr; returnsHash: Fr }> {
|
|
189
|
-
|
|
180
|
+
return Promise.reject(new OracleMethodNotAvailableError('callPrivateFunction'));
|
|
190
181
|
}
|
|
191
182
|
|
|
192
183
|
enqueuePublicFunctionCall(
|
|
@@ -196,7 +187,7 @@ export abstract class TypedOracle {
|
|
|
196
187
|
_sideEffectCounter: number,
|
|
197
188
|
_isStaticCall: boolean,
|
|
198
189
|
): Promise<Fr> {
|
|
199
|
-
|
|
190
|
+
return Promise.reject(new OracleMethodNotAvailableError('enqueuePublicFunctionCall'));
|
|
200
191
|
}
|
|
201
192
|
|
|
202
193
|
setPublicTeardownFunctionCall(
|
|
@@ -206,7 +197,7 @@ export abstract class TypedOracle {
|
|
|
206
197
|
_sideEffectCounter: number,
|
|
207
198
|
_isStaticCall: boolean,
|
|
208
199
|
): Promise<Fr> {
|
|
209
|
-
|
|
200
|
+
return Promise.reject(new OracleMethodNotAvailableError('setPublicTeardownFunctionCall'));
|
|
210
201
|
}
|
|
211
202
|
|
|
212
203
|
notifySetMinRevertibleSideEffectCounter(_minRevertibleSideEffectCounter: number): void {
|
|
@@ -218,15 +209,15 @@ export abstract class TypedOracle {
|
|
|
218
209
|
}
|
|
219
210
|
|
|
220
211
|
getIndexedTaggingSecretAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<IndexedTaggingSecret> {
|
|
221
|
-
|
|
212
|
+
return Promise.reject(new OracleMethodNotAvailableError('getIndexedTaggingSecretAsSender'));
|
|
222
213
|
}
|
|
223
214
|
|
|
224
215
|
incrementAppTaggingSecretIndexAsSender(_sender: AztecAddress, _recipient: AztecAddress): Promise<void> {
|
|
225
|
-
|
|
216
|
+
return Promise.reject(new OracleMethodNotAvailableError('incrementAppTaggingSecretIndexAsSender'));
|
|
226
217
|
}
|
|
227
218
|
|
|
228
219
|
syncNotes(): Promise<void> {
|
|
229
|
-
|
|
220
|
+
return Promise.reject(new OracleMethodNotAvailableError('syncNotes'));
|
|
230
221
|
}
|
|
231
222
|
|
|
232
223
|
deliverNote(
|
|
@@ -239,26 +230,30 @@ export abstract class TypedOracle {
|
|
|
239
230
|
_txHash: Fr,
|
|
240
231
|
_recipient: AztecAddress,
|
|
241
232
|
): Promise<void> {
|
|
242
|
-
|
|
233
|
+
return Promise.reject(new OracleMethodNotAvailableError('deliverNote'));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
getLogByTag(_tag: Fr): Promise<LogWithTxData | null> {
|
|
237
|
+
throw new OracleMethodNotAvailableError('getLogByTag');
|
|
243
238
|
}
|
|
244
239
|
|
|
245
240
|
storeCapsule(_contractAddress: AztecAddress, _key: Fr, _capsule: Fr[]): Promise<void> {
|
|
246
|
-
|
|
241
|
+
return Promise.reject(new OracleMethodNotAvailableError('storeCapsule'));
|
|
247
242
|
}
|
|
248
243
|
|
|
249
244
|
loadCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<Fr[] | null> {
|
|
250
|
-
|
|
245
|
+
return Promise.reject(new OracleMethodNotAvailableError('loadCapsule'));
|
|
251
246
|
}
|
|
252
247
|
|
|
253
248
|
deleteCapsule(_contractAddress: AztecAddress, _key: Fr): Promise<void> {
|
|
254
|
-
|
|
249
|
+
return Promise.reject(new OracleMethodNotAvailableError('deleteCapsule'));
|
|
255
250
|
}
|
|
256
251
|
|
|
257
252
|
copyCapsule(_contractAddress: AztecAddress, _srcKey: Fr, _dstKey: Fr, _numEntries: number): Promise<void> {
|
|
258
|
-
|
|
253
|
+
return Promise.reject(new OracleMethodNotAvailableError('copyCapsule'));
|
|
259
254
|
}
|
|
260
255
|
|
|
261
256
|
aes128Decrypt(_ciphertext: Buffer, _iv: Buffer, _symKey: Buffer): Promise<Buffer> {
|
|
262
|
-
|
|
257
|
+
return Promise.reject(new OracleMethodNotAvailableError('aes128Decrypt'));
|
|
263
258
|
}
|
|
264
259
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type EthAddress } from '@aztec/foundation/eth-address';
|
|
1
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import type { ACVMField } from './acvm_types.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Adapts the buffer to the field size.
|
|
@@ -39,6 +39,13 @@ export function toACVMField(
|
|
|
39
39
|
return `0x${adaptBufferSize(buffer).toString('hex')}`;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Converts a single value or an array of single values into the equivalent ACVM field representation.
|
|
44
|
+
*/
|
|
45
|
+
export function toACVMFieldSingleOrArray(value: Fr | Fr[]) {
|
|
46
|
+
return Array.isArray(value) ? value.map(toACVMField) : toACVMField(value);
|
|
47
|
+
}
|
|
48
|
+
|
|
42
49
|
/**
|
|
43
50
|
* Inserts a list of ACVM fields to a witness.
|
|
44
51
|
* @param witnessStartIndex - The index where to start inserting the fields.
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
+
import { PRIVATE_CONTEXT_INPUTS_LENGTH, PUBLIC_DISPATCH_SELECTOR } from '@aztec/constants';
|
|
2
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
1
4
|
import {
|
|
2
|
-
type
|
|
3
|
-
type
|
|
5
|
+
type FunctionAbi,
|
|
6
|
+
type FunctionArtifact,
|
|
7
|
+
FunctionSelector,
|
|
8
|
+
type NoteSelector,
|
|
9
|
+
countArgumentsSize,
|
|
10
|
+
} from '@aztec/stdlib/abi';
|
|
11
|
+
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
12
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
13
|
+
import { computeUniqueNoteHash, siloNoteHash } from '@aztec/stdlib/hash';
|
|
14
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
15
|
+
import { PrivateContextInputs } from '@aztec/stdlib/kernel';
|
|
16
|
+
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
17
|
+
import { Note, type NoteStatus } from '@aztec/stdlib/note';
|
|
18
|
+
import {
|
|
19
|
+
type BlockHeader,
|
|
20
|
+
CallContext,
|
|
21
|
+
Capsule,
|
|
4
22
|
CountedContractClassLog,
|
|
5
23
|
CountedPublicExecutionRequest,
|
|
6
|
-
Note,
|
|
7
24
|
NoteAndSlot,
|
|
8
|
-
|
|
9
|
-
type PrivateCallExecutionResult,
|
|
25
|
+
PrivateCallExecutionResult,
|
|
10
26
|
PublicExecutionRequest,
|
|
11
|
-
type UnencryptedL2Log,
|
|
12
|
-
} from '@aztec/circuit-types';
|
|
13
|
-
import {
|
|
14
|
-
type BlockHeader,
|
|
15
|
-
CallContext,
|
|
16
|
-
FunctionSelector,
|
|
17
|
-
PRIVATE_CONTEXT_INPUTS_LENGTH,
|
|
18
|
-
PUBLIC_DISPATCH_SELECTOR,
|
|
19
|
-
PrivateContextInputs,
|
|
20
27
|
type TxContext,
|
|
21
|
-
} from '@aztec/
|
|
22
|
-
import { computeUniqueNoteHash, siloNoteHash } from '@aztec/circuits.js/hash';
|
|
23
|
-
import { type FunctionAbi, type FunctionArtifact, type NoteSelector, countArgumentsSize } from '@aztec/foundation/abi';
|
|
24
|
-
import { AztecAddress } from '@aztec/foundation/aztec-address';
|
|
25
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
26
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
28
|
+
} from '@aztec/stdlib/tx';
|
|
27
29
|
|
|
28
|
-
import { type NoteData, toACVMWitness } from '
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { type ExecutionNoteCache } from './execution_note_cache.js';
|
|
30
|
+
import { type NoteData, toACVMWitness } from './acvm/index.js';
|
|
31
|
+
import type { DBOracle } from './db_oracle.js';
|
|
32
|
+
import type { ExecutionNoteCache } from './execution_note_cache.js';
|
|
33
|
+
import type { HashedValuesCache } from './hashed_values_cache.js';
|
|
33
34
|
import { pickNotes } from './pick_notes.js';
|
|
34
|
-
import { executePrivateFunction } from './private_execution.js';
|
|
35
|
+
import { executePrivateFunction, verifyCurrentClassId } from './private_execution.js';
|
|
36
|
+
import type { SimulationProvider } from './providers/simulation_provider.js';
|
|
35
37
|
import { ViewDataOracle } from './view_data_oracle.js';
|
|
36
38
|
|
|
37
39
|
/**
|
|
@@ -70,6 +72,7 @@ export class ClientExecutionContext extends ViewDataOracle {
|
|
|
70
72
|
protected readonly historicalHeader: BlockHeader,
|
|
71
73
|
/** List of transient auth witnesses to be used during this simulation */
|
|
72
74
|
authWitnesses: AuthWitness[],
|
|
75
|
+
capsules: Capsule[],
|
|
73
76
|
private readonly executionCache: HashedValuesCache,
|
|
74
77
|
private readonly noteCache: ExecutionNoteCache,
|
|
75
78
|
db: DBOracle,
|
|
@@ -79,7 +82,7 @@ export class ClientExecutionContext extends ViewDataOracle {
|
|
|
79
82
|
log = createLogger('simulator:client_execution_context'),
|
|
80
83
|
scopes?: AztecAddress[],
|
|
81
84
|
) {
|
|
82
|
-
super(callContext.contractAddress, authWitnesses, db, node, log, scopes);
|
|
85
|
+
super(callContext.contractAddress, authWitnesses, capsules, db, node, log, scopes);
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
// We still need this function until we can get user-defined ordering of structs for fn arguments
|
|
@@ -278,6 +281,13 @@ export class ClientExecutionContext extends ViewDataOracle {
|
|
|
278
281
|
noteHash: Fr,
|
|
279
282
|
counter: number,
|
|
280
283
|
) {
|
|
284
|
+
this.log.debug(`Notified of new note with inner hash ${noteHash}`, {
|
|
285
|
+
contractAddress: this.callContext.contractAddress,
|
|
286
|
+
storageSlot,
|
|
287
|
+
noteTypeId,
|
|
288
|
+
counter,
|
|
289
|
+
});
|
|
290
|
+
|
|
281
291
|
const note = new Note(noteItems);
|
|
282
292
|
this.noteCache.addNewNote(
|
|
283
293
|
{
|
|
@@ -321,20 +331,19 @@ export class ClientExecutionContext extends ViewDataOracle {
|
|
|
321
331
|
}
|
|
322
332
|
|
|
323
333
|
/**
|
|
324
|
-
* Emit a contract class
|
|
325
|
-
* This fn exists because
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* @param
|
|
334
|
+
* Emit a contract class log.
|
|
335
|
+
* This fn exists because we only carry a poseidon hash through the kernels, and need to
|
|
336
|
+
* keep the preimage in ts for later.
|
|
337
|
+
* We could also return the hash here if we must save extra gates.
|
|
338
|
+
* @param log - The contract class log to be emitted.
|
|
339
|
+
* @param counter - The contract class log's counter.
|
|
330
340
|
*/
|
|
331
|
-
public override emitContractClassLog(log:
|
|
341
|
+
public override emitContractClassLog(log: ContractClassLog, counter: number) {
|
|
332
342
|
this.contractClassLogs.push(new CountedContractClassLog(log, counter));
|
|
333
|
-
const text = log.
|
|
343
|
+
const text = log.toBuffer().toString('hex');
|
|
334
344
|
this.log.verbose(
|
|
335
345
|
`Emitted log from ContractClassRegisterer: "${text.length > 100 ? text.slice(0, 100) + '...' : text}"`,
|
|
336
346
|
);
|
|
337
|
-
return Fr.fromBuffer(log.hash());
|
|
338
347
|
}
|
|
339
348
|
|
|
340
349
|
#checkValidStaticCall(childExecutionResult: PrivateCallExecutionResult) {
|
|
@@ -366,11 +375,18 @@ export class ClientExecutionContext extends ViewDataOracle {
|
|
|
366
375
|
isStaticCall: boolean,
|
|
367
376
|
) {
|
|
368
377
|
this.log.debug(
|
|
369
|
-
`Calling private function ${
|
|
378
|
+
`Calling private function ${targetContractAddress}:${functionSelector} from ${this.callContext.contractAddress}`,
|
|
370
379
|
);
|
|
371
380
|
|
|
372
381
|
isStaticCall = isStaticCall || this.callContext.isStaticCall;
|
|
373
382
|
|
|
383
|
+
await verifyCurrentClassId(
|
|
384
|
+
targetContractAddress,
|
|
385
|
+
await this.db.getContractInstance(targetContractAddress),
|
|
386
|
+
this.node,
|
|
387
|
+
this.historicalHeader.globalVariables.blockNumber.toNumber(),
|
|
388
|
+
);
|
|
389
|
+
|
|
374
390
|
const targetArtifact = await this.db.getFunctionArtifact(targetContractAddress, functionSelector);
|
|
375
391
|
|
|
376
392
|
const derivedTxContext = this.txContext.clone();
|
|
@@ -383,6 +399,7 @@ export class ClientExecutionContext extends ViewDataOracle {
|
|
|
383
399
|
derivedCallContext,
|
|
384
400
|
this.historicalHeader,
|
|
385
401
|
this.authWitnesses,
|
|
402
|
+
this.capsules,
|
|
386
403
|
this.executionCache,
|
|
387
404
|
this.noteCache,
|
|
388
405
|
this.db,
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from '@aztec/
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
type CompleteAddress,
|
|
12
|
-
type ContractInstance,
|
|
13
|
-
type IndexedTaggingSecret,
|
|
14
|
-
type KeyValidationRequest,
|
|
15
|
-
} from '@aztec/circuits.js';
|
|
16
|
-
import { type FunctionArtifact, type FunctionSelector } from '@aztec/foundation/abi';
|
|
17
|
-
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
18
|
-
import { type Fr } from '@aztec/foundation/fields';
|
|
1
|
+
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import type { FunctionArtifact, FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import type { L2Block } from '@aztec/stdlib/block';
|
|
5
|
+
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
6
|
+
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
7
|
+
import { IndexedTaggingSecret, LogWithTxData, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
8
|
+
import type { NoteStatus } from '@aztec/stdlib/note';
|
|
9
|
+
import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
10
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
19
11
|
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
12
|
+
import type { CommitmentsDB } from '../common/db_interfaces.js';
|
|
13
|
+
import type { NoteData } from './acvm/index.js';
|
|
22
14
|
|
|
23
15
|
/**
|
|
24
16
|
* Error thrown when a contract is not found in the database.
|
|
@@ -250,6 +242,14 @@ export interface DBOracle extends CommitmentsDB {
|
|
|
250
242
|
recipient: AztecAddress,
|
|
251
243
|
): Promise<void>;
|
|
252
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Searches for a log with the corresponding `tag` and returns it along with contextual transaction information.
|
|
247
|
+
* Returns null if no such log exists, and throws if more than one exists.
|
|
248
|
+
*
|
|
249
|
+
* @param tag - The log tag to search for.
|
|
250
|
+
*/
|
|
251
|
+
getLogByTag(tag: Fr): Promise<LogWithTxData | null>;
|
|
252
|
+
|
|
253
253
|
/**
|
|
254
254
|
* Removes all of a contract's notes that have been nullified from the note database.
|
|
255
255
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/circuits.js/hash';
|
|
2
|
-
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
3
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import type { NoteData } from './acvm/index.js';
|
|
6
6
|
|
|
7
7
|
interface PendingNote {
|
|
8
8
|
note: NoteData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { HashedValues } from '@aztec/stdlib/tx';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A cache for hashed values (arguments, returns) during transaction execution.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { AcirSimulator } from './simulator.js';
|
|
2
|
+
export { ViewDataOracle } from './view_data_oracle.js';
|
|
3
|
+
export { type DBOracle, ContractClassNotFoundError, ContractNotFoundError } from './db_oracle.js';
|
|
4
|
+
export * from './pick_notes.js';
|
|
5
|
+
export { ExecutionNoteCache } from './execution_note_cache.js';
|
|
6
|
+
export { extractPrivateCircuitPublicInputs, readCurrentClassId } from './private_execution.js';
|
|
7
|
+
export { witnessMapToFields } from './acvm/deserialize.js';
|
|
8
|
+
export { toACVMWitness } from './acvm/serialize.js';
|
|
9
|
+
export { extractCallStack } from './acvm/acvm.js';
|
|
10
|
+
export { type NoteData, TypedOracle } from './acvm/oracle/typed_oracle.js';
|
|
11
|
+
export { Oracle } from './acvm/oracle/oracle.js';
|
|
12
|
+
export { HashedValuesCache } from './hashed_values_cache.js';
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
Fr,
|
|
5
|
-
PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH,
|
|
6
|
-
PRIVATE_CONTEXT_INPUTS_LENGTH,
|
|
7
|
-
PrivateCircuitPublicInputs,
|
|
8
|
-
} from '@aztec/circuits.js';
|
|
9
|
-
import { type FunctionArtifact, type FunctionSelector, countArgumentsSize } from '@aztec/foundation/abi';
|
|
10
|
-
import { type AztecAddress } from '@aztec/foundation/aztec-address';
|
|
1
|
+
import { PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH, PRIVATE_CONTEXT_INPUTS_LENGTH } from '@aztec/constants';
|
|
2
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
11
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
12
4
|
import { Timer } from '@aztec/foundation/timer';
|
|
5
|
+
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
6
|
+
import { type FunctionArtifact, type FunctionSelector, countArgumentsSize } from '@aztec/stdlib/abi';
|
|
7
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
+
import type { ContractInstance } from '@aztec/stdlib/contract';
|
|
9
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
10
|
+
import { PrivateCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
11
|
+
import { SharedMutableValues, SharedMutableValuesWithHash } from '@aztec/stdlib/shared-mutable';
|
|
12
|
+
import type { CircuitWitnessGenerationStats } from '@aztec/stdlib/stats';
|
|
13
|
+
import { PrivateCallExecutionResult } from '@aztec/stdlib/tx';
|
|
13
14
|
|
|
14
|
-
import { fromACVMField, witnessMapToFields } from '../acvm/deserialize.js';
|
|
15
|
-
import { type ACVMWitness, Oracle, extractCallStack } from '../acvm/index.js';
|
|
16
15
|
import { ExecutionError, resolveAssertionMessageFromError } from '../common/errors.js';
|
|
17
|
-
import {
|
|
18
|
-
import { type
|
|
16
|
+
import { fromACVMField, witnessMapToFields } from './acvm/deserialize.js';
|
|
17
|
+
import { type ACVMWitness, Oracle, extractCallStack } from './acvm/index.js';
|
|
18
|
+
import type { ClientExecutionContext } from './client_execution_context.js';
|
|
19
|
+
import type { SimulationProvider } from './providers/simulation_provider.js';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Execute a private function and return the execution result.
|
|
@@ -115,3 +116,34 @@ export function extractPrivateCircuitPublicInputs(
|
|
|
115
116
|
}
|
|
116
117
|
return PrivateCircuitPublicInputs.fromFields(returnData);
|
|
117
118
|
}
|
|
119
|
+
|
|
120
|
+
export async function readCurrentClassId(
|
|
121
|
+
contractAddress: AztecAddress,
|
|
122
|
+
instance: ContractInstance,
|
|
123
|
+
node: AztecNode,
|
|
124
|
+
blockNumber: number,
|
|
125
|
+
) {
|
|
126
|
+
const { sharedMutableSlot } = await SharedMutableValuesWithHash.getContractUpdateSlots(contractAddress);
|
|
127
|
+
const sharedMutableValues = await SharedMutableValues.readFromTree(sharedMutableSlot, slot =>
|
|
128
|
+
node.getPublicStorageAt(ProtocolContractAddress.ContractInstanceDeployer, slot, blockNumber),
|
|
129
|
+
);
|
|
130
|
+
let currentClassId = sharedMutableValues.svc.getCurrentAt(blockNumber)[0];
|
|
131
|
+
if (currentClassId.isZero()) {
|
|
132
|
+
currentClassId = instance.originalContractClassId;
|
|
133
|
+
}
|
|
134
|
+
return currentClassId;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export async function verifyCurrentClassId(
|
|
138
|
+
contractAddress: AztecAddress,
|
|
139
|
+
instance: ContractInstance,
|
|
140
|
+
node: AztecNode,
|
|
141
|
+
blockNumber: number,
|
|
142
|
+
) {
|
|
143
|
+
const currentClassId = await readCurrentClassId(contractAddress, instance, node, blockNumber);
|
|
144
|
+
if (!instance.currentContractClassId.equals(currentClassId)) {
|
|
145
|
+
throw new Error(
|
|
146
|
+
`Contract ${contractAddress} is outdated, current class id is ${currentClassId}, local class id is ${instance.currentContractClassId}`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { runInDirectory } from '@aztec/foundation/fs';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { Timer } from '@aztec/foundation/timer';
|
|
4
|
-
import {
|
|
4
|
+
import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import type { WitnessMap } from '@noir-lang/types';
|
|
7
7
|
import * as proc from 'child_process';
|
|
8
8
|
import { promises as fs } from 'fs';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import type { ACIRCallback, ACIRExecutionResult } from '../acvm/acvm.js';
|
|
11
|
+
import type { ACVMWitness } from '../acvm/acvm_types.js';
|
|
12
|
+
import type { SimulationProvider } from './simulation_provider.js';
|
|
13
13
|
|
|
14
14
|
const logger = createLogger('simulator:acvm-native');
|
|
15
15
|
|
|
@@ -158,7 +158,7 @@ export class NativeACVMSimulator implements SimulationProvider {
|
|
|
158
158
|
return result.witness;
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
return await runInDirectory(this.workingDirectory, operation, false);
|
|
161
|
+
return await runInDirectory(this.workingDirectory, operation, false, logger);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
executeUserCircuit(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { foreignCallHandler } from '@aztec/noir-protocol-circuits-types/client';
|
|
3
|
-
import {
|
|
3
|
+
import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
|
|
4
4
|
|
|
5
5
|
import initACVM, { type ExecutionError, executeCircuit } from '@noir-lang/acvm_js';
|
|
6
6
|
import initAbi from '@noir-lang/noirc_abi';
|
|
7
|
-
import {
|
|
7
|
+
import type { WitnessMap } from '@noir-lang/types';
|
|
8
8
|
|
|
9
9
|
import { type ACIRCallback, acvm } from '../acvm/acvm.js';
|
|
10
|
-
import {
|
|
11
|
-
import { type SimulationProvider, parseErrorPayload } from '
|
|
10
|
+
import type { ACVMWitness } from '../acvm/acvm_types.js';
|
|
11
|
+
import { type SimulationProvider, parseErrorPayload } from './simulation_provider.js';
|
|
12
12
|
|
|
13
13
|
export class WASMSimulator implements SimulationProvider {
|
|
14
14
|
constructor(protected log = createLogger('wasm-simulator')) {}
|