@aztec/simulator 0.0.0-test.1 → 0.0.1-fake-ceab37513c
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 +6 -0
- package/dest/client.d.ts +5 -3
- package/dest/client.d.ts.map +1 -1
- package/dest/client.js +4 -2
- package/dest/common/errors.d.ts +4 -7
- package/dest/common/errors.d.ts.map +1 -1
- package/dest/common/errors.js +51 -32
- package/dest/common/index.d.ts +0 -1
- package/dest/common/index.d.ts.map +1 -1
- package/dest/common/index.js +0 -1
- package/dest/private/acvm/acvm.d.ts +11 -5
- package/dest/private/acvm/acvm.d.ts.map +1 -1
- package/dest/private/acvm/acvm.js +10 -16
- package/dest/private/acvm/acvm_types.d.ts +1 -1
- package/dest/private/acvm/acvm_types.d.ts.map +1 -1
- package/dest/private/acvm/deserialize.d.ts +17 -18
- package/dest/private/acvm/deserialize.d.ts.map +1 -1
- package/dest/private/acvm/deserialize.js +31 -23
- package/dest/private/acvm/index.d.ts +0 -1
- package/dest/private/acvm/index.d.ts.map +1 -1
- package/dest/private/acvm/index.js +0 -1
- package/dest/private/acvm/serialize.d.ts +19 -2
- package/dest/private/acvm/serialize.d.ts.map +1 -1
- package/dest/private/acvm/serialize.js +53 -0
- package/dest/private/{providers/acvm_native.d.ts → acvm_native.d.ts} +10 -10
- package/dest/private/acvm_native.d.ts.map +1 -0
- package/dest/private/{providers/acvm_native.js → acvm_native.js} +11 -7
- package/dest/private/acvm_wasm.d.ts +15 -0
- package/dest/private/acvm_wasm.d.ts.map +1 -0
- package/dest/private/{providers/acvm_wasm.js → acvm_wasm.js} +22 -19
- package/dest/private/acvm_wasm_with_blobs.d.ts +20 -0
- package/dest/private/acvm_wasm_with_blobs.d.ts.map +1 -0
- package/dest/private/acvm_wasm_with_blobs.js +35 -0
- package/dest/private/circuit_recording/circuit_recorder.d.ts +108 -0
- package/dest/private/circuit_recording/circuit_recorder.d.ts.map +1 -0
- package/dest/private/circuit_recording/circuit_recorder.js +209 -0
- package/dest/private/circuit_recording/file_circuit_recorder.d.ts +31 -0
- package/dest/private/circuit_recording/file_circuit_recorder.d.ts.map +1 -0
- package/dest/private/circuit_recording/file_circuit_recorder.js +135 -0
- package/dest/private/circuit_recording/memory_circuit_recorder.d.ts +5 -0
- package/dest/private/circuit_recording/memory_circuit_recorder.d.ts.map +1 -0
- package/dest/private/circuit_recording/memory_circuit_recorder.js +9 -0
- package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts +21 -0
- package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -0
- package/dest/private/circuit_recording/simulator_recorder_wrapper.js +44 -0
- package/dest/private/circuit_simulator.d.ts +35 -0
- package/dest/private/circuit_simulator.d.ts.map +1 -0
- package/dest/private/circuit_simulator.js +43 -0
- package/dest/private/factory.d.ts +12 -0
- package/dest/private/factory.d.ts.map +1 -0
- package/dest/private/{providers/factory.js → factory.js} +2 -2
- package/dest/public/avm/avm_context.d.ts +5 -5
- package/dest/public/avm/avm_context.d.ts.map +1 -1
- package/dest/public/avm/avm_contract_call_result.d.ts +4 -2
- package/dest/public/avm/avm_contract_call_result.d.ts.map +1 -1
- package/dest/public/avm/avm_contract_call_result.js +11 -7
- package/dest/public/avm/avm_execution_environment.d.ts +2 -1
- package/dest/public/avm/avm_execution_environment.d.ts.map +1 -1
- package/dest/public/avm/avm_execution_environment.js +4 -2
- package/dest/public/avm/avm_gas.d.ts +4 -20
- package/dest/public/avm/avm_gas.d.ts.map +1 -1
- package/dest/public/avm/avm_gas.js +27 -35
- package/dest/public/avm/avm_machine_state.d.ts +2 -0
- package/dest/public/avm/avm_machine_state.d.ts.map +1 -1
- package/dest/public/avm/avm_machine_state.js +2 -0
- package/dest/public/avm/avm_memory_types.d.ts +98 -87
- package/dest/public/avm/avm_memory_types.d.ts.map +1 -1
- package/dest/public/avm/avm_memory_types.js +17 -6
- package/dest/public/avm/avm_simulator.d.ts +4 -5
- package/dest/public/avm/avm_simulator.d.ts.map +1 -1
- package/dest/public/avm/avm_simulator.js +13 -18
- package/dest/public/avm/avm_simulator_interface.d.ts +9 -0
- package/dest/public/avm/avm_simulator_interface.d.ts.map +1 -0
- package/dest/public/avm/avm_simulator_interface.js +3 -0
- package/dest/public/avm/errors.d.ts +1 -16
- package/dest/public/avm/errors.d.ts.map +1 -1
- package/dest/public/avm/errors.js +0 -37
- package/dest/public/avm/fixtures/avm_simulation_tester.d.ts +3 -3
- package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +1 -1
- package/dest/public/avm/fixtures/avm_simulation_tester.js +10 -11
- package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts +4 -4
- package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +1 -1
- package/dest/public/avm/fixtures/base_avm_simulation_tester.js +16 -15
- package/dest/public/avm/fixtures/initializers.d.ts +43 -0
- package/dest/public/avm/fixtures/initializers.d.ts.map +1 -0
- package/dest/public/avm/fixtures/initializers.js +42 -0
- package/dest/public/avm/fixtures/utils.d.ts +38 -0
- package/dest/public/avm/fixtures/utils.d.ts.map +1 -0
- package/dest/public/avm/fixtures/utils.js +95 -0
- package/dest/public/avm/index.d.ts +0 -2
- package/dest/public/avm/index.d.ts.map +1 -1
- package/dest/public/avm/index.js +0 -2
- package/dest/public/avm/opcodes/accrued_substate.d.ts.map +1 -1
- package/dest/public/avm/opcodes/accrued_substate.js +22 -19
- package/dest/public/avm/opcodes/addressing_mode.d.ts +11 -7
- package/dest/public/avm/opcodes/addressing_mode.d.ts.map +1 -1
- package/dest/public/avm/opcodes/addressing_mode.js +48 -27
- package/dest/public/avm/opcodes/arithmetic.d.ts +11 -1
- package/dest/public/avm/opcodes/arithmetic.d.ts.map +1 -1
- package/dest/public/avm/opcodes/arithmetic.js +16 -2
- package/dest/public/avm/opcodes/bitwise.d.ts +5 -13
- package/dest/public/avm/opcodes/bitwise.d.ts.map +1 -1
- package/dest/public/avm/opcodes/bitwise.js +19 -26
- package/dest/public/avm/opcodes/comparators.d.ts.map +1 -1
- package/dest/public/avm/opcodes/comparators.js +3 -3
- package/dest/public/avm/opcodes/contract.d.ts +1 -2
- package/dest/public/avm/opcodes/contract.d.ts.map +1 -1
- package/dest/public/avm/opcodes/contract.js +9 -10
- package/dest/public/avm/opcodes/control_flow.d.ts.map +1 -1
- package/dest/public/avm/opcodes/control_flow.js +10 -8
- package/dest/public/avm/opcodes/conversion.d.ts +1 -0
- package/dest/public/avm/opcodes/conversion.d.ts.map +1 -1
- package/dest/public/avm/opcodes/conversion.js +264 -3
- package/dest/public/avm/opcodes/ec_add.d.ts.map +1 -1
- package/dest/public/avm/opcodes/ec_add.js +2 -2
- package/dest/public/avm/opcodes/environment_getters.d.ts +2 -2
- package/dest/public/avm/opcodes/environment_getters.d.ts.map +1 -1
- package/dest/public/avm/opcodes/environment_getters.js +12 -12
- package/dest/public/avm/opcodes/external_calls.d.ts +8 -7
- package/dest/public/avm/opcodes/external_calls.d.ts.map +1 -1
- package/dest/public/avm/opcodes/external_calls.js +39 -33
- package/dest/public/avm/opcodes/hashing.d.ts.map +1 -1
- package/dest/public/avm/opcodes/hashing.js +6 -6
- package/dest/public/avm/opcodes/instruction.d.ts +14 -10
- package/dest/public/avm/opcodes/instruction.d.ts.map +1 -1
- package/dest/public/avm/opcodes/instruction.js +18 -13
- package/dest/public/avm/opcodes/memory.d.ts +4 -4
- package/dest/public/avm/opcodes/memory.d.ts.map +1 -1
- package/dest/public/avm/opcodes/memory.js +37 -33
- package/dest/public/avm/opcodes/misc.d.ts.map +1 -1
- package/dest/public/avm/opcodes/misc.js +17 -12
- package/dest/public/avm/opcodes/storage.d.ts.map +1 -1
- package/dest/public/avm/opcodes/storage.js +7 -5
- package/dest/public/avm/revert_reason.d.ts +18 -0
- package/dest/public/avm/revert_reason.d.ts.map +1 -0
- package/dest/public/avm/revert_reason.js +38 -0
- package/dest/public/avm/serialization/buffer_cursor.d.ts +0 -2
- package/dest/public/avm/serialization/buffer_cursor.d.ts.map +1 -1
- package/dest/public/avm/serialization/bytecode_serialization.d.ts +2 -6
- package/dest/public/avm/serialization/bytecode_serialization.d.ts.map +1 -1
- package/dest/public/avm/serialization/bytecode_serialization.js +70 -69
- package/dest/public/avm/serialization/instruction_serialization.d.ts +5 -4
- package/dest/public/avm/serialization/instruction_serialization.d.ts.map +1 -1
- package/dest/public/avm/serialization/instruction_serialization.js +60 -35
- package/dest/public/avm/test_utils.d.ts +10 -13
- package/dest/public/avm/test_utils.d.ts.map +1 -1
- package/dest/public/avm/test_utils.js +12 -17
- package/dest/public/db_interfaces.d.ts +56 -0
- package/dest/public/db_interfaces.d.ts.map +1 -0
- package/dest/public/db_interfaces.js +3 -0
- package/dest/public/debug_fn_name.d.ts +5 -0
- package/dest/public/debug_fn_name.d.ts.map +1 -0
- package/dest/public/debug_fn_name.js +9 -0
- package/dest/public/executor_metrics.d.ts +10 -3
- package/dest/public/executor_metrics.d.ts.map +1 -1
- package/dest/public/executor_metrics.js +37 -6
- package/dest/public/executor_metrics_interface.d.ts +9 -0
- package/dest/public/executor_metrics_interface.d.ts.map +1 -0
- package/dest/public/executor_metrics_interface.js +1 -0
- package/dest/public/fixtures/amm_test.d.ts +10 -0
- package/dest/public/fixtures/amm_test.d.ts.map +1 -0
- package/dest/public/fixtures/amm_test.js +213 -0
- package/dest/public/fixtures/bulk_test.d.ts +6 -0
- package/dest/public/fixtures/bulk_test.d.ts.map +1 -0
- package/dest/public/fixtures/bulk_test.js +393 -0
- package/dest/public/fixtures/index.d.ts +6 -0
- package/dest/public/fixtures/index.d.ts.map +1 -1
- package/dest/public/fixtures/index.js +6 -0
- package/dest/public/fixtures/minimal_public_tx.d.ts +9 -0
- package/dest/public/fixtures/minimal_public_tx.d.ts.map +1 -0
- package/dest/public/fixtures/minimal_public_tx.js +43 -0
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts +33 -13
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +1 -1
- package/dest/public/fixtures/public_tx_simulation_tester.js +90 -70
- package/dest/public/{avm/fixtures → fixtures}/simple_contract_data_source.d.ts +6 -6
- package/dest/public/fixtures/simple_contract_data_source.d.ts.map +1 -0
- package/dest/public/{avm/fixtures → fixtures}/simple_contract_data_source.js +31 -10
- package/dest/public/fixtures/token_test.d.ts +8 -0
- package/dest/public/fixtures/token_test.d.ts.map +1 -0
- package/dest/public/fixtures/token_test.js +95 -0
- package/dest/public/fixtures/utils.d.ts +16 -3
- package/dest/public/fixtures/utils.d.ts.map +1 -1
- package/dest/public/fixtures/utils.js +100 -58
- package/dest/public/hinting_db_sources.d.ts +68 -0
- package/dest/public/hinting_db_sources.d.ts.map +1 -0
- package/dest/public/hinting_db_sources.js +294 -0
- package/dest/public/index.d.ts +4 -8
- package/dest/public/index.d.ts.map +1 -1
- package/dest/public/index.js +4 -7
- package/dest/public/public_db_sources.d.ts +30 -39
- package/dest/public/public_db_sources.d.ts.map +1 -1
- package/dest/public/public_db_sources.js +141 -67
- package/dest/public/public_processor/guarded_merkle_tree.d.ts +47 -0
- package/dest/public/public_processor/guarded_merkle_tree.d.ts.map +1 -0
- package/dest/public/public_processor/guarded_merkle_tree.js +105 -0
- package/dest/public/public_processor/public_processor.d.ts +19 -29
- package/dest/public/public_processor/public_processor.d.ts.map +1 -1
- package/dest/public/public_processor/public_processor.js +133 -94
- package/dest/public/public_processor/public_processor_metrics.d.ts +2 -2
- package/dest/public/public_processor/public_processor_metrics.d.ts.map +1 -1
- package/dest/public/public_processor/public_processor_metrics.js +1 -1
- package/dest/public/public_tx_simulator/index.d.ts +3 -0
- package/dest/public/public_tx_simulator/index.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/index.js +2 -0
- package/dest/public/public_tx_simulator/measured_public_tx_simulator.d.ts +23 -0
- package/dest/public/public_tx_simulator/measured_public_tx_simulator.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/measured_public_tx_simulator.js +52 -0
- package/dest/public/public_tx_simulator/public_tx_context.d.ts +17 -29
- package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_context.js +59 -91
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts +27 -42
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_simulator.js +128 -171
- package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.d.ts +20 -0
- package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.js +39 -0
- package/dest/public/side_effect_trace.d.ts +10 -62
- package/dest/public/side_effect_trace.d.ts.map +1 -1
- package/dest/public/side_effect_trace.js +43 -108
- package/dest/public/side_effect_trace_interface.d.ts +5 -22
- package/dest/public/side_effect_trace_interface.d.ts.map +1 -1
- package/dest/public/state_manager/index.d.ts +2 -0
- package/dest/public/state_manager/index.d.ts.map +1 -0
- package/dest/public/state_manager/index.js +1 -0
- package/dest/public/{avm/journal → state_manager}/nullifiers.d.ts +2 -2
- package/dest/public/state_manager/nullifiers.d.ts.map +1 -0
- package/dest/public/{avm/journal → state_manager}/nullifiers.js +2 -2
- package/dest/public/{avm/journal → state_manager}/public_storage.d.ts +2 -2
- package/dest/public/state_manager/public_storage.d.ts.map +1 -0
- package/dest/public/{avm/journal/journal.d.ts → state_manager/state_manager.d.ts} +37 -85
- package/dest/public/state_manager/state_manager.d.ts.map +1 -0
- package/dest/public/state_manager/state_manager.js +352 -0
- package/dest/public/test_executor_metrics.d.ts +54 -0
- package/dest/public/test_executor_metrics.d.ts.map +1 -0
- package/dest/public/test_executor_metrics.js +306 -0
- package/dest/public/unique_class_ids.d.ts.map +1 -1
- package/dest/public/utils.d.ts +2 -4
- package/dest/public/utils.d.ts.map +1 -1
- package/dest/public/utils.js +4 -21
- package/dest/server.d.ts +6 -3
- package/dest/server.d.ts.map +1 -1
- package/dest/server.js +5 -2
- package/dest/testing.d.ts +2 -0
- package/dest/testing.d.ts.map +1 -0
- package/dest/testing.js +1 -0
- package/package.json +31 -30
- package/src/client.ts +5 -3
- package/src/common/errors.ts +79 -44
- package/src/common/index.ts +0 -1
- package/src/private/acvm/acvm.ts +17 -32
- package/src/private/acvm/acvm_types.ts +1 -1
- package/src/private/acvm/deserialize.ts +35 -29
- package/src/private/acvm/index.ts +0 -1
- package/src/private/acvm/serialize.ts +63 -0
- package/src/private/{providers/acvm_native.ts → acvm_native.ts} +31 -15
- package/src/private/acvm_wasm.ts +72 -0
- package/src/private/acvm_wasm_with_blobs.ts +54 -0
- package/src/private/circuit_recording/circuit_recorder.ts +260 -0
- package/src/private/circuit_recording/file_circuit_recorder.ts +158 -0
- package/src/private/circuit_recording/memory_circuit_recorder.ts +11 -0
- package/src/private/circuit_recording/simulator_recorder_wrapper.ts +91 -0
- package/src/private/circuit_simulator.ts +90 -0
- package/src/private/{providers/factory.ts → factory.ts} +6 -6
- package/src/public/avm/avm_context.ts +4 -4
- package/src/public/avm/avm_contract_call_result.ts +17 -5
- package/src/public/avm/avm_execution_environment.ts +7 -1
- package/src/public/avm/avm_gas.ts +23 -35
- package/src/public/avm/avm_machine_state.ts +5 -0
- package/src/public/avm/avm_memory_types.ts +19 -6
- package/src/public/avm/avm_simulator.ts +30 -29
- package/src/public/avm/avm_simulator_interface.ts +8 -0
- package/src/public/avm/errors.ts +1 -53
- package/src/public/avm/fixtures/avm_simulation_tester.ts +19 -18
- package/src/public/avm/fixtures/base_avm_simulation_tester.ts +15 -14
- package/src/public/avm/fixtures/initializers.ts +103 -0
- package/src/public/avm/fixtures/utils.ts +150 -0
- package/src/public/avm/index.ts +0 -2
- package/src/public/avm/opcodes/accrued_substate.ts +62 -27
- package/src/public/avm/opcodes/addressing_mode.ts +57 -33
- package/src/public/avm/opcodes/arithmetic.ts +24 -2
- package/src/public/avm/opcodes/bitwise.ts +33 -29
- package/src/public/avm/opcodes/comparators.ts +6 -3
- package/src/public/avm/opcodes/contract.ts +10 -7
- package/src/public/avm/opcodes/control_flow.ts +19 -10
- package/src/public/avm/opcodes/conversion.ts +23 -3
- package/src/public/avm/opcodes/ec_add.ts +5 -2
- package/src/public/avm/opcodes/environment_getters.ts +22 -15
- package/src/public/avm/opcodes/external_calls.ts +61 -28
- package/src/public/avm/opcodes/hashing.ts +28 -8
- package/src/public/avm/opcodes/instruction.ts +23 -15
- package/src/public/avm/opcodes/memory.ts +71 -32
- package/src/public/avm/opcodes/misc.ts +24 -16
- package/src/public/avm/opcodes/storage.ts +22 -6
- package/src/public/avm/revert_reason.ts +55 -0
- package/src/public/avm/serialization/buffer_cursor.ts +4 -1
- package/src/public/avm/serialization/bytecode_serialization.ts +72 -74
- package/src/public/avm/serialization/instruction_serialization.ts +63 -34
- package/src/public/avm/test_utils.ts +23 -32
- package/src/public/db_interfaces.ts +61 -0
- package/src/{common → public}/debug_fn_name.ts +7 -7
- package/src/public/executor_metrics.ts +55 -6
- package/src/public/executor_metrics_interface.ts +14 -0
- package/src/public/fixtures/amm_test.ts +331 -0
- package/src/public/fixtures/bulk_test.ts +151 -0
- package/src/public/fixtures/index.ts +6 -0
- package/src/public/fixtures/minimal_public_tx.ts +59 -0
- package/src/public/fixtures/public_tx_simulation_tester.ts +154 -113
- package/src/public/{avm/fixtures → fixtures}/simple_contract_data_source.ts +36 -18
- package/src/public/fixtures/token_test.ts +140 -0
- package/src/public/fixtures/utils.ts +141 -68
- package/src/public/hinting_db_sources.ts +500 -0
- package/src/public/index.ts +4 -8
- package/src/public/public_db_sources.ts +179 -96
- package/src/public/public_processor/guarded_merkle_tree.ts +149 -0
- package/src/public/public_processor/public_processor.ts +179 -139
- package/src/public/public_processor/public_processor_metrics.ts +2 -2
- package/src/public/public_tx_simulator/index.ts +2 -0
- package/src/public/public_tx_simulator/measured_public_tx_simulator.ts +106 -0
- package/src/public/public_tx_simulator/public_tx_context.ts +153 -193
- package/src/public/public_tx_simulator/public_tx_simulator.ts +167 -211
- package/src/public/public_tx_simulator/telemetry_public_tx_simulator.ts +72 -0
- package/src/public/side_effect_trace.ts +52 -303
- package/src/public/side_effect_trace_interface.ts +4 -58
- package/src/public/state_manager/index.ts +1 -0
- package/src/public/{avm/journal → state_manager}/nullifiers.ts +4 -4
- package/src/public/{avm/journal → state_manager}/public_storage.ts +2 -2
- package/src/public/state_manager/state_manager.ts +512 -0
- package/src/public/test_executor_metrics.ts +395 -0
- package/src/public/utils.ts +5 -21
- package/src/server.ts +6 -3
- package/src/testing.ts +1 -0
- package/dest/common/db_interfaces.d.ts +0 -80
- package/dest/common/db_interfaces.d.ts.map +0 -1
- package/dest/common/db_interfaces.js +0 -1
- package/dest/common/debug_fn_name.d.ts +0 -5
- package/dest/common/debug_fn_name.d.ts.map +0 -1
- package/dest/common/debug_fn_name.js +0 -6
- package/dest/common/message_load_oracle_inputs.d.ts +0 -15
- package/dest/common/message_load_oracle_inputs.d.ts.map +0 -1
- package/dest/common/message_load_oracle_inputs.js +0 -15
- package/dest/private/acvm/oracle/index.d.ts +0 -14
- package/dest/private/acvm/oracle/index.d.ts.map +0 -1
- package/dest/private/acvm/oracle/index.js +0 -2
- package/dest/private/acvm/oracle/oracle.d.ts +0 -49
- package/dest/private/acvm/oracle/oracle.d.ts.map +0 -1
- package/dest/private/acvm/oracle/oracle.js +0 -263
- package/dest/private/acvm/oracle/typed_oracle.d.ts +0 -83
- package/dest/private/acvm/oracle/typed_oracle.d.ts.map +0 -1
- package/dest/private/acvm/oracle/typed_oracle.js +0 -132
- package/dest/private/execution_data_provider.d.ts +0 -261
- package/dest/private/execution_data_provider.d.ts.map +0 -1
- package/dest/private/execution_data_provider.js +0 -14
- package/dest/private/execution_note_cache.d.ts +0 -93
- package/dest/private/execution_note_cache.d.ts.map +0 -1
- package/dest/private/execution_note_cache.js +0 -180
- package/dest/private/hashed_values_cache.d.ts +0 -28
- package/dest/private/hashed_values_cache.d.ts.map +0 -1
- package/dest/private/hashed_values_cache.js +0 -46
- package/dest/private/index.d.ts +0 -13
- package/dest/private/index.d.ts.map +0 -1
- package/dest/private/index.js +0 -12
- package/dest/private/pick_notes.d.ts +0 -85
- package/dest/private/pick_notes.d.ts.map +0 -1
- package/dest/private/pick_notes.js +0 -51
- package/dest/private/private_execution.d.ts +0 -25
- package/dest/private/private_execution.d.ts.map +0 -1
- package/dest/private/private_execution.js +0 -92
- package/dest/private/private_execution_oracle.d.ts +0 -215
- package/dest/private/private_execution_oracle.d.ts.map +0 -1
- package/dest/private/private_execution_oracle.js +0 -382
- package/dest/private/providers/acvm_native.d.ts.map +0 -1
- package/dest/private/providers/acvm_wasm.d.ts +0 -15
- package/dest/private/providers/acvm_wasm.d.ts.map +0 -1
- package/dest/private/providers/acvm_wasm_with_blobs.d.ts +0 -19
- package/dest/private/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
- package/dest/private/providers/acvm_wasm_with_blobs.js +0 -32
- package/dest/private/providers/factory.d.ts +0 -12
- package/dest/private/providers/factory.d.ts.map +0 -1
- package/dest/private/providers/simulation_provider.d.ts +0 -19
- package/dest/private/providers/simulation_provider.d.ts.map +0 -1
- package/dest/private/providers/simulation_provider.js +0 -24
- package/dest/private/simulator.d.ts +0 -34
- package/dest/private/simulator.d.ts.map +0 -1
- package/dest/private/simulator.js +0 -76
- package/dest/private/unconstrained_execution.d.ts +0 -10
- package/dest/private/unconstrained_execution.d.ts.map +0 -1
- package/dest/private/unconstrained_execution.js +0 -27
- package/dest/private/unconstrained_execution_oracle.d.ts +0 -161
- package/dest/private/unconstrained_execution_oracle.d.ts.map +0 -1
- package/dest/private/unconstrained_execution_oracle.js +0 -258
- package/dest/public/avm/bytecode_utils.d.ts +0 -5
- package/dest/public/avm/bytecode_utils.d.ts.map +0 -1
- package/dest/public/avm/bytecode_utils.js +0 -17
- package/dest/public/avm/fixtures/index.d.ts +0 -84
- package/dest/public/avm/fixtures/index.d.ts.map +0 -1
- package/dest/public/avm/fixtures/index.js +0 -175
- package/dest/public/avm/fixtures/simple_contract_data_source.d.ts.map +0 -1
- package/dest/public/avm/journal/index.d.ts +0 -2
- package/dest/public/avm/journal/index.d.ts.map +0 -1
- package/dest/public/avm/journal/index.js +0 -1
- package/dest/public/avm/journal/journal.d.ts.map +0 -1
- package/dest/public/avm/journal/journal.js +0 -486
- package/dest/public/avm/journal/nullifiers.d.ts.map +0 -1
- package/dest/public/avm/journal/public_storage.d.ts.map +0 -1
- package/dest/public/execution.d.ts +0 -108
- package/dest/public/execution.d.ts.map +0 -1
- package/dest/public/execution.js +0 -9
- package/dest/test/utils.d.ts +0 -13
- package/dest/test/utils.d.ts.map +0 -1
- package/dest/test/utils.js +0 -22
- package/src/common/db_interfaces.ts +0 -94
- package/src/common/message_load_oracle_inputs.ts +0 -15
- package/src/private/acvm/oracle/index.ts +0 -16
- package/src/private/acvm/oracle/oracle.ts +0 -455
- package/src/private/acvm/oracle/typed_oracle.ts +0 -259
- package/src/private/execution_data_provider.ts +0 -323
- package/src/private/execution_note_cache.ts +0 -217
- package/src/private/hashed_values_cache.ts +0 -55
- package/src/private/index.ts +0 -16
- package/src/private/pick_notes.ts +0 -141
- package/src/private/private_execution.ts +0 -151
- package/src/private/private_execution_oracle.ts +0 -614
- package/src/private/providers/acvm_wasm.ts +0 -63
- package/src/private/providers/acvm_wasm_with_blobs.ts +0 -50
- package/src/private/providers/simulation_provider.ts +0 -45
- package/src/private/simulator.ts +0 -147
- package/src/private/unconstrained_execution.ts +0 -50
- package/src/private/unconstrained_execution_oracle.ts +0 -373
- package/src/public/avm/bytecode_utils.ts +0 -17
- package/src/public/avm/fixtures/index.ts +0 -296
- package/src/public/avm/journal/index.ts +0 -1
- package/src/public/avm/journal/journal.ts +0 -742
- package/src/public/avm/opcodes/.eslintrc.cjs +0 -8
- package/src/public/execution.ts +0 -140
- package/src/test/utils.ts +0 -36
- /package/dest/public/{avm/journal → state_manager}/public_storage.js +0 -0
|
@@ -1,41 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
}
|
|
1
|
+
import { AVM_MAX_PROCESSABLE_L2_GAS } from '@aztec/constants';
|
|
7
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
8
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
9
3
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
10
4
|
import { computeFeePayerBalanceStorageSlot } from '@aztec/protocol-contracts/fee-juice';
|
|
5
|
+
import { AvmCircuitInputs, AvmExecutionHints, AvmTxHint } from '@aztec/stdlib/avm';
|
|
11
6
|
import { SimulationError } from '@aztec/stdlib/errors';
|
|
7
|
+
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
12
8
|
import { NestedProcessReturnValues, TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
13
|
-
import { Attributes, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
14
|
-
import { strict as assert } from 'assert';
|
|
15
|
-
import { getPublicFunctionDebugName } from '../../common/debug_fn_name.js';
|
|
16
9
|
import { AvmSimulator } from '../avm/index.js';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
10
|
+
import { getPublicFunctionDebugName } from '../debug_fn_name.js';
|
|
11
|
+
import { HintingMerkleWriteOperations, HintingPublicContractsDB } from '../hinting_db_sources.js';
|
|
12
|
+
import { PublicTreesDB } from '../public_db_sources.js';
|
|
19
13
|
import { PublicTxContext } from './public_tx_context.js';
|
|
20
14
|
export class PublicTxSimulator {
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
merkleTree;
|
|
16
|
+
contractsDB;
|
|
23
17
|
globalVariables;
|
|
24
18
|
doMerkleOperations;
|
|
25
19
|
skipFeeEnforcement;
|
|
26
|
-
|
|
20
|
+
clientInitiatedSimulation;
|
|
27
21
|
log;
|
|
28
|
-
constructor(
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
22
|
+
constructor(merkleTree, contractsDB, globalVariables, doMerkleOperations = false, skipFeeEnforcement = false, clientInitiatedSimulation = false){
|
|
23
|
+
this.merkleTree = merkleTree;
|
|
24
|
+
this.contractsDB = contractsDB;
|
|
31
25
|
this.globalVariables = globalVariables;
|
|
32
26
|
this.doMerkleOperations = doMerkleOperations;
|
|
33
27
|
this.skipFeeEnforcement = skipFeeEnforcement;
|
|
28
|
+
this.clientInitiatedSimulation = clientInitiatedSimulation;
|
|
34
29
|
this.log = createLogger(`simulator:public_tx_simulator`);
|
|
35
|
-
this.metrics = new ExecutorMetrics(telemetryClient, 'PublicTxSimulator');
|
|
36
|
-
}
|
|
37
|
-
get tracer() {
|
|
38
|
-
return this.metrics.tracer;
|
|
39
30
|
}
|
|
40
31
|
/**
|
|
41
32
|
* Simulate a transaction's public portion including all of its phases.
|
|
@@ -43,57 +34,79 @@ export class PublicTxSimulator {
|
|
|
43
34
|
* @returns The result of the transaction's public execution.
|
|
44
35
|
*/ async simulate(tx) {
|
|
45
36
|
try {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
this.log.debug(`Simulating ${tx.enqueuedPublicFunctionCalls.length} public calls for tx ${txHash}`, {
|
|
37
|
+
const txHash = this.computeTxHash(tx);
|
|
38
|
+
this.log.debug(`Simulating ${tx.publicFunctionCalldata.length} public calls for tx ${txHash}`, {
|
|
49
39
|
txHash
|
|
50
40
|
});
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
await this.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
await this.
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
// Create hinting DBs.
|
|
42
|
+
const hints = new AvmExecutionHints(this.globalVariables, AvmTxHint.fromTx(tx, this.globalVariables.gasFees));
|
|
43
|
+
const hintingMerkleTree = await HintingMerkleWriteOperations.create(this.merkleTree, hints);
|
|
44
|
+
const hintingTreesDB = new PublicTreesDB(hintingMerkleTree);
|
|
45
|
+
const hintingContractsDB = new HintingPublicContractsDB(this.contractsDB, hints);
|
|
46
|
+
const context = await PublicTxContext.create(hintingTreesDB, hintingContractsDB, tx, this.globalVariables, this.doMerkleOperations);
|
|
47
|
+
// This will throw if there is a nullifier collision.
|
|
48
|
+
// In that case the transaction will be thrown out.
|
|
49
|
+
await this.insertNonRevertiblesFromPrivate(context, tx);
|
|
59
50
|
const processedPhases = [];
|
|
60
51
|
if (context.hasPhase(TxExecutionPhase.SETUP)) {
|
|
61
|
-
|
|
52
|
+
// This will throw if the setup phase reverts.
|
|
53
|
+
// In that case the transaction will be thrown out.
|
|
54
|
+
const setupResult = await this.simulatePhase(TxExecutionPhase.SETUP, context);
|
|
55
|
+
if (setupResult.reverted) {
|
|
56
|
+
throw new Error(`Setup phase reverted! The transaction will be thrown out. ${setupResult.revertReason?.message}`);
|
|
57
|
+
}
|
|
62
58
|
processedPhases.push(setupResult);
|
|
63
59
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
//
|
|
68
|
-
await this.
|
|
69
|
-
|
|
70
|
-
this.metrics.recordPrivateEffectsInsertion(Number(revertEnd - revertStart) / 1_000, 'revertible');
|
|
71
|
-
// Only proceed with app logic if there was no revert during revertible insertion
|
|
60
|
+
// The checkpoint we should go back to if anything from now on reverts.
|
|
61
|
+
await context.state.fork();
|
|
62
|
+
try {
|
|
63
|
+
// This will throw if there is a nullifier collision.
|
|
64
|
+
await this.insertRevertiblesFromPrivate(context, tx);
|
|
65
|
+
// Only proceed with app logic if there was no revert during revertible insertion.
|
|
72
66
|
if (context.hasPhase(TxExecutionPhase.APP_LOGIC)) {
|
|
73
|
-
const appLogicResult = await this.
|
|
67
|
+
const appLogicResult = await this.simulatePhase(TxExecutionPhase.APP_LOGIC, context);
|
|
74
68
|
processedPhases.push(appLogicResult);
|
|
69
|
+
if (appLogicResult.reverted) {
|
|
70
|
+
throw new Error(`App logic phase reverted! ${appLogicResult.revertReason?.message}`);
|
|
71
|
+
}
|
|
75
72
|
}
|
|
76
|
-
}
|
|
77
|
-
this.log.debug(
|
|
73
|
+
} catch (e) {
|
|
74
|
+
this.log.debug(String(e));
|
|
75
|
+
// We revert to the post-setup state.
|
|
76
|
+
await context.state.discardForkedState();
|
|
77
|
+
// But we also create a new fork so that the teardown phase can transparently
|
|
78
|
+
// commit or rollback at the end of teardown.
|
|
79
|
+
await context.state.fork();
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
try {
|
|
82
|
+
if (context.hasPhase(TxExecutionPhase.TEARDOWN)) {
|
|
83
|
+
const teardownResult = await this.simulatePhase(TxExecutionPhase.TEARDOWN, context);
|
|
84
|
+
processedPhases.push(teardownResult);
|
|
85
|
+
if (teardownResult.reverted) {
|
|
86
|
+
throw new Error(`Teardown phase reverted! ${teardownResult.revertReason?.message}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// We commit the forked state and we are done.
|
|
90
|
+
await context.state.mergeForkedState();
|
|
91
|
+
} catch (e) {
|
|
92
|
+
this.log.debug(String(e));
|
|
93
|
+
// We rollback to the post-setup state.
|
|
94
|
+
await context.state.discardForkedState();
|
|
95
|
+
}
|
|
96
|
+
context.halt();
|
|
97
|
+
if (context.getActualGasUsed().l2Gas > AVM_MAX_PROCESSABLE_L2_GAS) {
|
|
98
|
+
throw new Error(`Transaction consumes ${context.getActualGasUsed().l2Gas} L2 gas, which exceeds the AVM maximum processable gas of ${AVM_MAX_PROCESSABLE_L2_GAS}`);
|
|
82
99
|
}
|
|
83
|
-
await context.halt();
|
|
84
100
|
await this.payFee(context);
|
|
85
|
-
const
|
|
86
|
-
const avmProvingRequest =
|
|
101
|
+
const publicInputs = await context.generateAvmCircuitPublicInputs();
|
|
102
|
+
const avmProvingRequest = PublicTxSimulator.generateProvingRequest(publicInputs, hints);
|
|
87
103
|
const revertCode = context.getFinalRevertCode();
|
|
88
|
-
if (!revertCode.isOK()) {
|
|
89
|
-
await tx.filterRevertedLogs();
|
|
90
|
-
}
|
|
91
104
|
// Commit contracts from this TX to the block-level cache and clear tx cache
|
|
92
105
|
// If the tx reverted, only commit non-revertible contracts
|
|
93
106
|
// NOTE: You can't create contracts in public, so this is only relevant for private-created contracts
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.
|
|
107
|
+
// FIXME(fcarreiro): this should conceptually use the hinted contracts db.
|
|
108
|
+
// However things should work as they are now because the hinted db would still pick up the new contracts.
|
|
109
|
+
this.contractsDB.commitContractsForTx(/*onlyNonRevertibles=*/ !revertCode.isOK());
|
|
97
110
|
return {
|
|
98
111
|
avmProvingRequest,
|
|
99
112
|
gasUsed: {
|
|
@@ -109,79 +122,34 @@ export class PublicTxSimulator {
|
|
|
109
122
|
} finally{
|
|
110
123
|
// Make sure there are no new contracts in the tx-level cache.
|
|
111
124
|
// They should either be committed to block-level cache or cleared.
|
|
112
|
-
this.
|
|
125
|
+
// FIXME(fcarreiro): this should conceptually use the hinted contracts db.
|
|
126
|
+
// However things should work as they are now because the hinted db would still pick up the new contracts.
|
|
127
|
+
this.contractsDB.clearContractsForTx();
|
|
113
128
|
}
|
|
114
129
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
* @param context - WILL BE MUTATED. The context of the currently executing public transaction portion
|
|
118
|
-
* @returns The phase result.
|
|
119
|
-
*/ async simulateSetupPhase(context) {
|
|
120
|
-
return await this.simulatePhase(TxExecutionPhase.SETUP, context);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Simulate the app logic phase of a transaction's public execution.
|
|
124
|
-
* @param context - WILL BE MUTATED. The context of the currently executing public transaction portion
|
|
125
|
-
* @returns The phase result.
|
|
126
|
-
*/ async simulateAppLogicPhase(context) {
|
|
127
|
-
assert(context.state.isForked(), 'App logic phase should operate with forked state.');
|
|
128
|
-
const result = await this.simulatePhase(TxExecutionPhase.APP_LOGIC, context);
|
|
129
|
-
if (result.reverted) {
|
|
130
|
-
// Drop the currently active forked state manager and rollback to end of setup.
|
|
131
|
-
await context.state.discardForkedState();
|
|
132
|
-
} else {
|
|
133
|
-
if (!context.hasPhase(TxExecutionPhase.TEARDOWN)) {
|
|
134
|
-
// Nothing to do after this (no teardown), so merge state updates now instead of letting teardown handle it.
|
|
135
|
-
await context.state.mergeForkedState();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Simulate the teardown phase of a transaction's public execution.
|
|
142
|
-
* @param context - WILL BE MUTATED. The context of the currently executing public transaction portion
|
|
143
|
-
* @returns The phase result.
|
|
144
|
-
*/ async simulateTeardownPhase(context) {
|
|
145
|
-
if (!context.state.isForked()) {
|
|
146
|
-
// If state isn't forked (app logic reverted), fork now
|
|
147
|
-
// so we can rollback to the end of setup if teardown reverts.
|
|
148
|
-
await context.state.fork();
|
|
149
|
-
}
|
|
150
|
-
const result = await this.simulatePhase(TxExecutionPhase.TEARDOWN, context);
|
|
151
|
-
if (result.reverted) {
|
|
152
|
-
// Drop the currently active forked state manager and rollback to end of setup.
|
|
153
|
-
await context.state.discardForkedState();
|
|
154
|
-
} else {
|
|
155
|
-
// Merge state updates from teardown,
|
|
156
|
-
await context.state.mergeForkedState();
|
|
157
|
-
}
|
|
158
|
-
return result;
|
|
130
|
+
computeTxHash(tx) {
|
|
131
|
+
return tx.getTxHash();
|
|
159
132
|
}
|
|
160
133
|
/**
|
|
161
|
-
* Simulate
|
|
162
|
-
* @param phase - The current phase
|
|
134
|
+
* Simulate the setup phase of a transaction's public execution.
|
|
163
135
|
* @param context - WILL BE MUTATED. The context of the currently executing public transaction portion
|
|
164
136
|
* @returns The phase result.
|
|
165
137
|
*/ async simulatePhase(phase, context) {
|
|
166
138
|
const callRequests = context.getCallRequestsForPhase(phase);
|
|
167
|
-
const executionRequests = context.getExecutionRequestsForPhase(phase);
|
|
168
139
|
this.log.debug(`Processing phase ${TxExecutionPhase[phase]} for tx ${context.txHash}`, {
|
|
169
140
|
txHash: context.txHash.toString(),
|
|
170
141
|
phase: TxExecutionPhase[phase],
|
|
171
|
-
callRequests: callRequests.length
|
|
172
|
-
executionRequests: executionRequests.length
|
|
142
|
+
callRequests: callRequests.length
|
|
173
143
|
});
|
|
174
144
|
const returnValues = [];
|
|
175
145
|
let reverted = false;
|
|
176
146
|
let revertReason;
|
|
177
|
-
|
|
178
|
-
for(let i = callRequests.length - 1; i >= 0; i--){
|
|
147
|
+
for(let i = 0; i < callRequests.length; i++){
|
|
179
148
|
if (reverted) {
|
|
180
149
|
break;
|
|
181
150
|
}
|
|
182
151
|
const callRequest = callRequests[i];
|
|
183
|
-
const
|
|
184
|
-
const enqueuedCallResult = await this.simulateEnqueuedCall(phase, context, callRequest, executionRequest);
|
|
152
|
+
const enqueuedCallResult = await this.simulateEnqueuedCall(phase, context, callRequest);
|
|
185
153
|
returnValues.push(new NestedProcessReturnValues(enqueuedCallResult.output));
|
|
186
154
|
if (enqueuedCallResult.reverted) {
|
|
187
155
|
reverted = true;
|
|
@@ -190,7 +158,6 @@ export class PublicTxSimulator {
|
|
|
190
158
|
}
|
|
191
159
|
return {
|
|
192
160
|
phase,
|
|
193
|
-
durationMs: phaseTimer.ms(),
|
|
194
161
|
returnValues,
|
|
195
162
|
reverted,
|
|
196
163
|
revertReason
|
|
@@ -200,22 +167,20 @@ export class PublicTxSimulator {
|
|
|
200
167
|
* Simulate an enqueued public call.
|
|
201
168
|
* @param phase - The current phase of public execution
|
|
202
169
|
* @param context - WILL BE MUTATED. The context of the currently executing public transaction portion
|
|
203
|
-
* @param callRequest - The
|
|
204
|
-
* @param executionRequest - The execution request (includes args)
|
|
170
|
+
* @param callRequest - The public function call request, including the calldata.
|
|
205
171
|
* @returns The result of execution.
|
|
206
|
-
*/ async simulateEnqueuedCall(phase, context, callRequest
|
|
172
|
+
*/ async simulateEnqueuedCall(phase, context, callRequest) {
|
|
207
173
|
const stateManager = context.state.getActiveStateManager();
|
|
208
|
-
const
|
|
209
|
-
const fnName = await getPublicFunctionDebugName(this.
|
|
174
|
+
const contractAddress = callRequest.request.contractAddress;
|
|
175
|
+
const fnName = await getPublicFunctionDebugName(this.contractsDB, contractAddress, callRequest.calldata);
|
|
210
176
|
const allocatedGas = context.getGasLeftAtPhase(phase);
|
|
211
|
-
const result = await this.simulateEnqueuedCallInternal(
|
|
177
|
+
const result = await this.simulateEnqueuedCallInternal(stateManager, callRequest, allocatedGas, /*transactionFee=*/ context.getTransactionFee(phase), fnName);
|
|
212
178
|
const gasUsed = allocatedGas.sub(result.gasLeft); // by enqueued call
|
|
213
179
|
context.consumeGas(phase, gasUsed);
|
|
214
180
|
this.log.debug(`Simulated enqueued public call (${fnName}) consumed ${gasUsed.l2Gas} L2 gas ending with ${result.gasLeft.l2Gas} L2 gas left.`);
|
|
215
|
-
stateManager.traceEnqueuedCall(callRequest, executionRequest.args, result.reverted);
|
|
216
181
|
if (result.reverted) {
|
|
217
|
-
const culprit = `${
|
|
218
|
-
context.revert(phase, result.revertReason, culprit);
|
|
182
|
+
const culprit = `${contractAddress}:${callRequest.functionSelector}`;
|
|
183
|
+
context.revert(phase, result.revertReason, culprit);
|
|
219
184
|
}
|
|
220
185
|
return result;
|
|
221
186
|
}
|
|
@@ -227,65 +192,53 @@ export class PublicTxSimulator {
|
|
|
227
192
|
* while still simulating phases and generating a proving request.
|
|
228
193
|
*
|
|
229
194
|
* @param stateManager - The state manager for AvmSimulation
|
|
230
|
-
* @param
|
|
231
|
-
* @param executionRequest - The execution request (includes args)
|
|
195
|
+
* @param callRequest - The public function call request, including the calldata.
|
|
232
196
|
* @param allocatedGas - The gas allocated to the enqueued call
|
|
233
197
|
* @param fnName - The name of the function
|
|
234
198
|
* @returns The result of execution.
|
|
235
|
-
*/ async simulateEnqueuedCallInternal(stateManager,
|
|
236
|
-
const address =
|
|
237
|
-
const sender =
|
|
199
|
+
*/ async simulateEnqueuedCallInternal(stateManager, { request, calldata }, allocatedGas, transactionFee, fnName) {
|
|
200
|
+
const address = request.contractAddress;
|
|
201
|
+
const sender = request.msgSender;
|
|
238
202
|
this.log.debug(`Executing enqueued public call to external function ${fnName}@${address} with ${allocatedGas.l2Gas} allocated L2 gas.`);
|
|
239
|
-
const
|
|
240
|
-
const simulator = await AvmSimulator.create(stateManager, address, sender, transactionFee, this.globalVariables, executionRequest.callContext.isStaticCall, executionRequest.args, allocatedGas);
|
|
203
|
+
const simulator = await AvmSimulator.create(stateManager, address, sender, transactionFee, this.globalVariables, request.isStaticCall, calldata, allocatedGas, this.clientInitiatedSimulation);
|
|
241
204
|
const avmCallResult = await simulator.execute();
|
|
242
|
-
|
|
243
|
-
this.log.verbose(result.reverted ? `Simulation of enqueued public call ${fnName} reverted with reason ${result.revertReason}.` : `Simulation of enqueued public call ${fnName} completed successfully.`, {
|
|
244
|
-
eventName: 'avm-simulation',
|
|
245
|
-
appCircuitName: fnName,
|
|
246
|
-
duration: timer.ms()
|
|
247
|
-
});
|
|
248
|
-
if (result.reverted) {
|
|
249
|
-
this.metrics.recordFunctionSimulationFailure();
|
|
250
|
-
} else {
|
|
251
|
-
this.metrics.recordFunctionSimulation(timer.ms(), allocatedGas.sub(result.gasLeft).l2Gas, fnName);
|
|
252
|
-
}
|
|
253
|
-
return result;
|
|
205
|
+
return avmCallResult.finalize();
|
|
254
206
|
}
|
|
255
207
|
/**
|
|
256
208
|
* Insert the non-revertible accumulated data from private into the public state.
|
|
257
|
-
*/ async insertNonRevertiblesFromPrivate(context) {
|
|
209
|
+
*/ async insertNonRevertiblesFromPrivate(context, tx) {
|
|
258
210
|
const stateManager = context.state.getActiveStateManager();
|
|
259
|
-
|
|
260
|
-
await stateManager.
|
|
261
|
-
} catch (e) {
|
|
262
|
-
if (e instanceof NullifierCollisionError) {
|
|
263
|
-
throw new NullifierCollisionError(`Nullifier collision encountered when inserting non-revertible nullifiers from private.\nDetails: ${e.message}\nStack:${e.stack}`);
|
|
264
|
-
}
|
|
211
|
+
for (const siloedNullifier of context.nonRevertibleAccumulatedDataFromPrivate.nullifiers.filter((n)=>!n.isEmpty())){
|
|
212
|
+
await stateManager.writeSiloedNullifier(siloedNullifier);
|
|
265
213
|
}
|
|
266
214
|
for (const noteHash of context.nonRevertibleAccumulatedDataFromPrivate.noteHashes){
|
|
267
215
|
if (!noteHash.isEmpty()) {
|
|
268
216
|
await stateManager.writeUniqueNoteHash(noteHash);
|
|
269
217
|
}
|
|
270
218
|
}
|
|
219
|
+
for (const l2ToL1Message of context.nonRevertibleAccumulatedDataFromPrivate.l2ToL1Msgs){
|
|
220
|
+
if (!l2ToL1Message.isEmpty()) {
|
|
221
|
+
stateManager.writeScopedL2ToL1Message(l2ToL1Message);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
// add new contracts to the contracts db so that their functions may be found and called
|
|
225
|
+
// TODO(#6464): Should we allow emitting contracts in the private setup phase?
|
|
226
|
+
// FIXME(fcarreiro): this should conceptually use the hinted contracts db.
|
|
227
|
+
// However things should work as they are now because the hinted db would still pick up the new contracts.
|
|
228
|
+
await this.contractsDB.addNewNonRevertibleContracts(tx);
|
|
271
229
|
}
|
|
272
230
|
/**
|
|
273
231
|
* Insert the revertible accumulated data from private into the public state.
|
|
274
232
|
* Start by forking state so we can rollback to the end of setup if app logic or teardown reverts.
|
|
275
|
-
*/ async insertRevertiblesFromPrivate(context) {
|
|
276
|
-
// Fork the state manager so we can rollback to end of setup if app logic reverts.
|
|
277
|
-
await context.state.fork();
|
|
233
|
+
*/ async insertRevertiblesFromPrivate(context, tx) {
|
|
278
234
|
const stateManager = context.state.getActiveStateManager();
|
|
279
235
|
try {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
if (e instanceof NullifierCollisionError) {
|
|
283
|
-
// Instead of throwing, revert the app_logic phase
|
|
284
|
-
context.revert(TxExecutionPhase.APP_LOGIC, new SimulationError(`Nullifier collision encountered when inserting revertible nullifiers from private\nDetails: ${e.message}\nError stack: ${e.stack}`, []), /*culprit=*/ 'insertRevertiblesFromPrivate');
|
|
285
|
-
return /*success=*/ false;
|
|
286
|
-
} else {
|
|
287
|
-
throw e;
|
|
236
|
+
for (const siloedNullifier of context.revertibleAccumulatedDataFromPrivate.nullifiers.filter((n)=>!n.isEmpty())){
|
|
237
|
+
await stateManager.writeSiloedNullifier(siloedNullifier);
|
|
288
238
|
}
|
|
239
|
+
} catch (e) {
|
|
240
|
+
context.revert(TxExecutionPhase.APP_LOGIC, new SimulationError(`Nullifier collision encountered when inserting revertible nullifiers from private.\nDetails: ${String(e)}`, []));
|
|
241
|
+
throw e;
|
|
289
242
|
}
|
|
290
243
|
for (const noteHash of context.revertibleAccumulatedDataFromPrivate.noteHashes){
|
|
291
244
|
if (!noteHash.isEmpty()) {
|
|
@@ -293,6 +246,15 @@ export class PublicTxSimulator {
|
|
|
293
246
|
await stateManager.writeSiloedNoteHash(noteHash);
|
|
294
247
|
}
|
|
295
248
|
}
|
|
249
|
+
for (const l2ToL1Message of context.revertibleAccumulatedDataFromPrivate.l2ToL1Msgs){
|
|
250
|
+
if (!l2ToL1Message.isEmpty()) {
|
|
251
|
+
stateManager.writeScopedL2ToL1Message(l2ToL1Message);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// add new contracts to the contracts db so that their functions may be found and called
|
|
255
|
+
// FIXME(fcarreiro): this should conceptually use the hinted contracts db.
|
|
256
|
+
// However things should work as they are now because the hinted db would still pick up the new contracts.
|
|
257
|
+
await this.contractsDB.addNewRevertibleContracts(tx);
|
|
296
258
|
return /*success=*/ true;
|
|
297
259
|
}
|
|
298
260
|
async payFee(context) {
|
|
@@ -318,17 +280,12 @@ export class PublicTxSimulator {
|
|
|
318
280
|
const updatedBalance = currentBalance.sub(txFee);
|
|
319
281
|
await stateManager.writeStorage(feeJuiceAddress, balanceSlot, updatedBalance, true);
|
|
320
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Generate the proving request for the AVM circuit.
|
|
285
|
+
*/ static generateProvingRequest(publicInputs, hints) {
|
|
286
|
+
return {
|
|
287
|
+
type: ProvingRequestType.PUBLIC_VM,
|
|
288
|
+
inputs: new AvmCircuitInputs(hints, publicInputs)
|
|
289
|
+
};
|
|
290
|
+
}
|
|
321
291
|
}
|
|
322
|
-
_ts_decorate([
|
|
323
|
-
trackSpan('PublicTxSimulator.simulateEnqueuedCall', (phase, context, _callRequest, executionRequest)=>({
|
|
324
|
-
[Attributes.TX_HASH]: context.txHash.toString(),
|
|
325
|
-
[Attributes.TARGET_ADDRESS]: executionRequest.callContext.contractAddress.toString(),
|
|
326
|
-
[Attributes.SENDER_ADDRESS]: executionRequest.callContext.msgSender.toString(),
|
|
327
|
-
[Attributes.SIMULATOR_PHASE]: TxExecutionPhase[phase].toString()
|
|
328
|
-
}))
|
|
329
|
-
], PublicTxSimulator.prototype, "simulateEnqueuedCall", null);
|
|
330
|
-
_ts_decorate([
|
|
331
|
-
trackSpan('PublicTxSimulator.simulateEnqueuedCallInternal', (_stateManager, _executionRequest, _allocatedGas, _transactionFee, fnName)=>({
|
|
332
|
-
[Attributes.APP_CIRCUIT_NAME]: fnName
|
|
333
|
-
}))
|
|
334
|
-
], PublicTxSimulator.prototype, "simulateEnqueuedCallInternal", null);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import type { Gas } from '@aztec/stdlib/gas';
|
|
3
|
+
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
|
|
4
|
+
import { type GlobalVariables, PublicCallRequestWithCalldata, TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
5
|
+
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
6
|
+
import type { AvmFinalizedCallResult } from '../avm/avm_contract_call_result.js';
|
|
7
|
+
import type { PublicContractsDB } from '../public_db_sources.js';
|
|
8
|
+
import type { PublicPersistableStateManager } from '../state_manager/state_manager.js';
|
|
9
|
+
import { MeasuredPublicTxSimulator } from './measured_public_tx_simulator.js';
|
|
10
|
+
import { PublicTxContext } from './public_tx_context.js';
|
|
11
|
+
/**
|
|
12
|
+
* A public tx simulator that tracks runtime/production metrics with telemetry.
|
|
13
|
+
*/
|
|
14
|
+
export declare class TelemetryPublicTxSimulator extends MeasuredPublicTxSimulator {
|
|
15
|
+
readonly tracer: Tracer;
|
|
16
|
+
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, doMerkleOperations?: boolean, skipFeeEnforcement?: boolean, clientInitiatedSimulation?: boolean, telemetryClient?: TelemetryClient);
|
|
17
|
+
protected simulateEnqueuedCall(phase: TxExecutionPhase, context: PublicTxContext, callRequest: PublicCallRequestWithCalldata): Promise<AvmFinalizedCallResult>;
|
|
18
|
+
protected simulateEnqueuedCallInternal(stateManager: PublicPersistableStateManager, callRequest: PublicCallRequestWithCalldata, allocatedGas: Gas, transactionFee: Fr, fnName: string): Promise<AvmFinalizedCallResult>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=telemetry_public_tx_simulator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry_public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/telemetry_public_tx_simulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,KAAK,eAAe,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzG,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,MAAM,EAAiC,MAAM,yBAAyB,CAAC;AAEvH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,yBAAyB;IAEvE,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAG7B,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EAChC,kBAAkB,GAAE,OAAe,EACnC,kBAAkB,GAAE,OAAe,EACnC,yBAAyB,GAAE,OAAe,EAC1C,eAAe,GAAE,eAAsC;cAqBhC,oBAAoB,CAC3C,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,6BAA6B,GACzC,OAAO,CAAC,sBAAsB,CAAC;cAUT,4BAA4B,CACnD,YAAY,EAAE,6BAA6B,EAC3C,WAAW,EAAE,6BAA6B,EAC1C,YAAY,EAAE,GAAG,EACjB,cAAc,EAAE,EAAE,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,sBAAsB,CAAC;CAGnC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
}
|
|
7
|
+
import { TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
8
|
+
import { Attributes, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
9
|
+
import { ExecutorMetrics } from '../executor_metrics.js';
|
|
10
|
+
import { MeasuredPublicTxSimulator } from './measured_public_tx_simulator.js';
|
|
11
|
+
/**
|
|
12
|
+
* A public tx simulator that tracks runtime/production metrics with telemetry.
|
|
13
|
+
*/ export class TelemetryPublicTxSimulator extends MeasuredPublicTxSimulator {
|
|
14
|
+
/* tracer needed by trackSpans */ tracer;
|
|
15
|
+
constructor(merkleTree, contractsDB, globalVariables, doMerkleOperations = false, skipFeeEnforcement = false, clientInitiatedSimulation = false, telemetryClient = getTelemetryClient()){
|
|
16
|
+
const metrics = new ExecutorMetrics(telemetryClient, 'PublicTxSimulator');
|
|
17
|
+
super(merkleTree, contractsDB, globalVariables, doMerkleOperations, skipFeeEnforcement, clientInitiatedSimulation, metrics);
|
|
18
|
+
this.tracer = metrics.tracer;
|
|
19
|
+
}
|
|
20
|
+
async simulateEnqueuedCall(phase, context, callRequest) {
|
|
21
|
+
return await super.simulateEnqueuedCall(phase, context, callRequest);
|
|
22
|
+
}
|
|
23
|
+
async simulateEnqueuedCallInternal(stateManager, callRequest, allocatedGas, transactionFee, fnName) {
|
|
24
|
+
return await super.simulateEnqueuedCallInternal(stateManager, callRequest, allocatedGas, transactionFee, fnName);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
_ts_decorate([
|
|
28
|
+
trackSpan('PublicTxSimulator.simulateEnqueuedCall', (phase, context, callRequest)=>({
|
|
29
|
+
[Attributes.TX_HASH]: context.txHash.toString(),
|
|
30
|
+
[Attributes.TARGET_ADDRESS]: callRequest.request.contractAddress.toString(),
|
|
31
|
+
[Attributes.SENDER_ADDRESS]: callRequest.request.msgSender.toString(),
|
|
32
|
+
[Attributes.SIMULATOR_PHASE]: TxExecutionPhase[phase].toString()
|
|
33
|
+
}))
|
|
34
|
+
], TelemetryPublicTxSimulator.prototype, "simulateEnqueuedCall", null);
|
|
35
|
+
_ts_decorate([
|
|
36
|
+
trackSpan('PublicTxSimulator.simulateEnqueuedCallInternal', (_stateManager, _callRequest, _allocatedGas, _transactionFee, fnName)=>({
|
|
37
|
+
[Attributes.APP_CIRCUIT_NAME]: fnName
|
|
38
|
+
}))
|
|
39
|
+
], TelemetryPublicTxSimulator.prototype, "simulateEnqueuedCallInternal", null);
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import {
|
|
2
|
+
import { PublicDataUpdateRequest } from '@aztec/stdlib/avm';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import {
|
|
5
|
-
import type { Gas, GasSettings } from '@aztec/stdlib/gas';
|
|
6
|
-
import { NoteHash, Nullifier, PublicCallRequest } from '@aztec/stdlib/kernel';
|
|
4
|
+
import { NoteHash, Nullifier } from '@aztec/stdlib/kernel';
|
|
7
5
|
import { PublicLog } from '@aztec/stdlib/logs';
|
|
8
6
|
import { ScopedL2ToL1Message } from '@aztec/stdlib/messaging';
|
|
9
|
-
import { NullifierLeafPreimage, PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees';
|
|
10
|
-
import type { GlobalVariables, TreeSnapshots } from '@aztec/stdlib/tx';
|
|
11
7
|
import type { PublicSideEffectTraceInterface } from './side_effect_trace_interface.js';
|
|
12
8
|
import { UniqueClassIds } from './unique_class_ids.js';
|
|
13
9
|
/**
|
|
@@ -16,7 +12,6 @@ import { UniqueClassIds } from './unique_class_ids.js';
|
|
|
16
12
|
* This struct is helpful for testing and checking array lengths.
|
|
17
13
|
**/
|
|
18
14
|
export type SideEffects = {
|
|
19
|
-
enqueuedCalls: PublicCallRequest[];
|
|
20
15
|
publicDataWrites: PublicDataUpdateRequest[];
|
|
21
16
|
noteHashes: NoteHash[];
|
|
22
17
|
nullifiers: Nullifier[];
|
|
@@ -45,10 +40,10 @@ export declare class SideEffectTrace implements PublicSideEffectTraceInterface {
|
|
|
45
40
|
private readonly previousSideEffectArrayLengths;
|
|
46
41
|
/** We need to track the set of class IDs used, to enforce limits. */
|
|
47
42
|
private uniqueClassIds;
|
|
43
|
+
private writtenPublicDataSlots;
|
|
48
44
|
log: import("@aztec/foundation/log").Logger;
|
|
49
45
|
/** The side effect counter increments with every call to the trace. */
|
|
50
46
|
private sideEffectCounter;
|
|
51
|
-
private enqueuedCalls;
|
|
52
47
|
private publicDataWrites;
|
|
53
48
|
private protocolPublicDataWritesLength;
|
|
54
49
|
private userPublicDataWritesLength;
|
|
@@ -56,7 +51,6 @@ export declare class SideEffectTrace implements PublicSideEffectTraceInterface {
|
|
|
56
51
|
private nullifiers;
|
|
57
52
|
private l2ToL1Messages;
|
|
58
53
|
private publicLogs;
|
|
59
|
-
private avmCircuitHints;
|
|
60
54
|
/** Make sure a forked trace is never merged twice. */
|
|
61
55
|
private alreadyMergedIntoParent;
|
|
62
56
|
constructor(
|
|
@@ -67,66 +61,20 @@ export declare class SideEffectTrace implements PublicSideEffectTraceInterface {
|
|
|
67
61
|
*/
|
|
68
62
|
previousSideEffectArrayLengths?: SideEffectArrayLengths,
|
|
69
63
|
/** We need to track the set of class IDs used, to enforce limits. */
|
|
70
|
-
uniqueClassIds?: UniqueClassIds);
|
|
64
|
+
uniqueClassIds?: UniqueClassIds, writtenPublicDataSlots?: Set<string>);
|
|
71
65
|
fork(): SideEffectTrace;
|
|
72
66
|
merge(forkedTrace: this, reverted?: boolean): void;
|
|
73
|
-
private mergeHints;
|
|
74
67
|
getCounter(): number;
|
|
75
68
|
private incrementSideEffectCounter;
|
|
76
69
|
getNoteHashCount(): number;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
traceNewNoteHash(noteHash: Fr
|
|
81
|
-
|
|
82
|
-
traceNewNullifier(siloedNullifier: Fr, lowLeafPreimage?: NullifierLeafPreimage, lowLeafIndex?: Fr, lowLeafPath?: Fr[], insertionPath?: Fr[]): void;
|
|
83
|
-
traceL1ToL2MessageCheck(_contractAddress: AztecAddress, msgHash: Fr, msgLeafIndex: Fr, _exists: boolean, path?: Fr[]): void;
|
|
70
|
+
tracePublicStorageWrite(contractAddress: AztecAddress, slot: Fr, value: Fr, protocolWrite: boolean): Promise<void>;
|
|
71
|
+
private computePublicDataSlotKey;
|
|
72
|
+
isStorageCold(contractAddress: AztecAddress, slot: Fr): boolean;
|
|
73
|
+
traceNewNoteHash(noteHash: Fr): void;
|
|
74
|
+
traceNewNullifier(siloedNullifier: Fr): void;
|
|
84
75
|
traceNewL2ToL1Message(contractAddress: AztecAddress, recipient: Fr, content: Fr): void;
|
|
85
76
|
tracePublicLog(contractAddress: AztecAddress, log: Fr[]): void;
|
|
86
|
-
|
|
87
|
-
traceGetContractClass(contractClassId: Fr, exists: boolean, contractClass?: ContractClassWithCommitment): void;
|
|
88
|
-
/**
|
|
89
|
-
* Trace an enqueued call.
|
|
90
|
-
* Accept some results from a finished call's trace into this one.
|
|
91
|
-
*/
|
|
92
|
-
traceEnqueuedCall(
|
|
93
|
-
/** The call request from private that enqueued this call. */
|
|
94
|
-
publicCallRequest: PublicCallRequest,
|
|
95
|
-
/** The call's calldata */
|
|
96
|
-
calldata: Fr[],
|
|
97
|
-
/** Did the call revert? */
|
|
98
|
-
_reverted: boolean): void;
|
|
77
|
+
traceGetContractClass(contractClassId: Fr, exists: boolean): void;
|
|
99
78
|
getSideEffects(): SideEffects;
|
|
100
|
-
toAvmCircuitPublicInputs(
|
|
101
|
-
/** Globals. */
|
|
102
|
-
globalVariables: GlobalVariables,
|
|
103
|
-
/** Start tree snapshots. */
|
|
104
|
-
startTreeSnapshots: TreeSnapshots,
|
|
105
|
-
/** Gas used at start of TX. */
|
|
106
|
-
startGasUsed: Gas,
|
|
107
|
-
/** How much gas was available for this public execution. */
|
|
108
|
-
gasLimits: GasSettings,
|
|
109
|
-
/** Address of the fee payer. */
|
|
110
|
-
feePayer: AztecAddress,
|
|
111
|
-
/** Call requests for setup phase. */
|
|
112
|
-
publicSetupCallRequests: PublicCallRequest[],
|
|
113
|
-
/** Call requests for app logic phase. */
|
|
114
|
-
publicAppLogicCallRequests: PublicCallRequest[],
|
|
115
|
-
/** Call request for teardown phase. */
|
|
116
|
-
publicTeardownCallRequest: PublicCallRequest,
|
|
117
|
-
/** End tree snapshots. */
|
|
118
|
-
endTreeSnapshots: TreeSnapshots,
|
|
119
|
-
/**
|
|
120
|
-
* Gas used by the whole transaction, assuming entire teardown limit is used.
|
|
121
|
-
* This is the gas used when computing transaction fee.
|
|
122
|
-
*/
|
|
123
|
-
endGasUsed: Gas,
|
|
124
|
-
/** Transaction fee. */
|
|
125
|
-
transactionFee: Fr,
|
|
126
|
-
/** The call's results */
|
|
127
|
-
reverted: boolean): AvmCircuitPublicInputs;
|
|
128
|
-
getPublicLogs(): PublicLog[];
|
|
129
|
-
getAvmCircuitHints(): AvmExecutionHints;
|
|
130
|
-
private getAvmAccumulatedData;
|
|
131
79
|
}
|
|
132
80
|
//# sourceMappingURL=side_effect_trace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side_effect_trace.d.ts","sourceRoot":"","sources":["../../src/public/side_effect_trace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"side_effect_trace.d.ts","sourceRoot":"","sources":["../../src/public/side_effect_trace.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAiB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAK7E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;IAII;AACJ,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;IAC5C,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,qBAAa,sBAAsB;aAEf,gBAAgB,EAAE,MAAM;aACxB,wBAAwB,EAAE,MAAM;aAChC,UAAU,EAAE,MAAM;aAClB,UAAU,EAAE,MAAM;aAClB,UAAU,EAAE,MAAM;aAClB,UAAU,EAAE,MAAM;gBALlB,gBAAgB,EAAE,MAAM,EACxB,wBAAwB,EAAE,MAAM,EAChC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM;IAGpC,MAAM,CAAC,KAAK;CAGb;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,8BAA8B;IAkBlE,qDAAqD;aACrC,sBAAsB,EAAE,MAAM;IAC9C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,8BAA8B;IAC/C,qEAAqE;IACrE,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,sBAAsB;IAzBzB,GAAG,yCAA+C;IAEzD,uEAAuE;IACvE,OAAO,CAAC,iBAAiB,CAAS;IAElC,OAAO,CAAC,gBAAgB,CAAiC;IACzD,OAAO,CAAC,8BAA8B,CAAa;IACnD,OAAO,CAAC,0BAA0B,CAAa;IAC/C,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,UAAU,CAAmB;IAErC,sDAAsD;IACtD,OAAO,CAAC,uBAAuB,CAAS;;IAGtC,qDAAqD;IACrC,sBAAsB,GAAE,MAAU;IAClD;;OAEG;IACc,8BAA8B,GAAE,sBAAuD;IACxG,qEAAqE;IAC7D,cAAc,GAAE,cAAqC,EACrD,sBAAsB,GAAE,GAAG,CAAC,MAAM,CAAa;IAKlD,IAAI;IAgBJ,KAAK,CAAC,WAAW,EAAE,IAAI,EAAE,QAAQ,GAAE,OAAe;IAyBlD,UAAU;IAIjB,OAAO,CAAC,0BAA0B;IAI3B,gBAAgB;IAIV,uBAAuB,CAClC,eAAe,EAAE,YAAY,EAC7B,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,EAAE,EACT,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,IAAI,CAAC;IAsChB,OAAO,CAAC,wBAAwB;IAIzB,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO;IAI/D,gBAAgB,CAAC,QAAQ,EAAE,EAAE;IAU7B,iBAAiB,CAAC,eAAe,EAAE,EAAE;IAWrC,qBAAqB,CAAC,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;IAW/E,cAAc,CAAC,eAAe,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,EAAE;IAcvD,qBAAqB,CAAC,eAAe,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO;IAgB1D,cAAc,IAAI,WAAW;CASrC"}
|