@aztec/simulator 0.0.1-commit.b6e433891 → 0.0.1-commit.b9865e97
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/dest/private/acvm_wasm.d.ts +1 -1
- package/dest/private/acvm_wasm.d.ts.map +1 -1
- package/dest/private/acvm_wasm.js +3 -1
- package/dest/public/avm/testing/account_proof_fetcher.d.ts +2 -0
- package/dest/public/avm/testing/account_proof_fetcher.d.ts.map +1 -0
- package/dest/public/avm/{fixtures → testing}/base_avm_simulation_tester.d.ts +2 -1
- package/dest/public/avm/testing/base_avm_simulation_tester.d.ts.map +1 -0
- package/dest/public/avm/{fixtures → testing}/base_avm_simulation_tester.js +17 -2
- package/dest/public/avm/testing/utils.d.ts +32 -0
- package/dest/public/avm/testing/utils.d.ts.map +1 -0
- package/dest/public/avm/{fixtures → testing}/utils.js +3 -33
- package/dest/public/contracts_db_checkpoint.d.ts +2 -2
- package/dest/public/contracts_db_checkpoint.d.ts.map +1 -1
- package/dest/public/contracts_db_checkpoint.js +1 -1
- package/dest/public/fixtures/bulk_test.d.ts +1 -1
- package/dest/public/fixtures/bulk_test.d.ts.map +1 -1
- package/dest/public/fixtures/bulk_test.js +31 -4
- package/dest/public/fixtures/index.d.ts +1 -4
- package/dest/public/fixtures/index.d.ts.map +1 -1
- package/dest/public/fixtures/index.js +0 -3
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts +3 -3
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +1 -1
- package/dest/public/fixtures/public_tx_simulation_tester.js +9 -10
- package/dest/public/fixtures/simple_contract_data_source.js +1 -1
- package/dest/public/fixtures/utils.d.ts +1 -1
- package/dest/public/fixtures/utils.d.ts.map +1 -1
- package/dest/public/fixtures/utils.js +14 -15
- package/dest/public/fuzzing/avm_fuzzer_simulator.d.ts +6 -4
- package/dest/public/fuzzing/avm_fuzzer_simulator.d.ts.map +1 -1
- package/dest/public/fuzzing/avm_fuzzer_simulator.js +12 -7
- package/dest/public/fuzzing/avm_simulator_bin.js +4 -4
- package/dest/public/index.d.ts +2 -2
- package/dest/public/index.d.ts.map +1 -1
- package/dest/public/index.js +1 -1
- package/dest/public/public_db_sources.d.ts +6 -3
- package/dest/public/public_db_sources.d.ts.map +1 -1
- package/dest/public/public_db_sources.js +16 -10
- package/dest/public/public_processor/guarded_merkle_tree.d.ts +4 -3
- package/dest/public/public_processor/guarded_merkle_tree.d.ts.map +1 -1
- package/dest/public/public_processor/guarded_merkle_tree.js +3 -0
- package/dest/public/public_processor/public_processor.d.ts +4 -3
- package/dest/public/public_processor/public_processor.d.ts.map +1 -1
- package/dest/public/public_processor/public_processor.js +60 -35
- package/dest/public/public_processor/public_processor_metrics.d.ts +4 -1
- package/dest/public/public_processor/public_processor_metrics.d.ts.map +1 -1
- package/dest/public/public_processor/public_processor_metrics.js +8 -0
- package/dest/public/public_tx_simulator/contract_provider_for_cpp.d.ts +1 -1
- package/dest/public/public_tx_simulator/contract_provider_for_cpp.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/contract_provider_for_cpp.js +3 -2
- package/dest/public/public_tx_simulator/dumping_public_tx_simulator.d.ts +23 -0
- package/dest/public/public_tx_simulator/dumping_public_tx_simulator.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/{dumping_cpp_public_tx_simulator.js → dumping_public_tx_simulator.js} +2 -2
- package/dest/public/public_tx_simulator/factories.d.ts +6 -6
- package/dest/public/public_tx_simulator/factories.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/factories.js +6 -6
- package/dest/public/public_tx_simulator/index.d.ts +3 -5
- package/dest/public/public_tx_simulator/index.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/index.js +2 -4
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts +41 -70
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_simulator.js +98 -319
- package/dest/public/public_tx_simulator/public_tx_simulator_base.d.ts +22 -0
- package/dest/public/public_tx_simulator/public_tx_simulator_base.d.ts.map +1 -0
- package/dest/public/public_tx_simulator/public_tx_simulator_base.js +28 -0
- package/package.json +17 -17
- package/src/private/acvm_wasm.ts +4 -1
- package/src/public/avm/{fixtures → testing}/base_avm_simulation_tester.ts +22 -2
- package/src/public/avm/{fixtures → testing}/utils.ts +3 -39
- package/src/public/contracts_db_checkpoint.ts +1 -1
- package/src/public/fixtures/bulk_test.ts +29 -4
- package/src/public/fixtures/index.ts +0 -3
- package/src/public/fixtures/public_tx_simulation_tester.ts +10 -18
- package/src/public/fixtures/simple_contract_data_source.ts +1 -1
- package/src/public/fixtures/utils.ts +21 -18
- package/src/public/fuzzing/avm_fuzzer_simulator.ts +15 -18
- package/src/public/fuzzing/avm_simulator_bin.ts +3 -5
- package/src/public/index.ts +3 -3
- package/src/public/public_db_sources.ts +21 -14
- package/src/public/public_processor/guarded_merkle_tree.ts +5 -2
- package/src/public/public_processor/public_processor.ts +78 -42
- package/src/public/public_processor/public_processor_metrics.ts +12 -0
- package/src/public/public_tx_simulator/contract_provider_for_cpp.ts +3 -2
- package/src/public/public_tx_simulator/{dumping_cpp_public_tx_simulator.ts → dumping_public_tx_simulator.ts} +2 -2
- package/src/public/public_tx_simulator/factories.ts +6 -6
- package/src/public/public_tx_simulator/index.ts +2 -4
- package/src/public/public_tx_simulator/public_tx_simulator.ts +150 -476
- package/src/public/public_tx_simulator/public_tx_simulator_base.ts +35 -0
- package/dest/public/avm/avm_context.d.ts +0 -41
- package/dest/public/avm/avm_context.d.ts.map +0 -1
- package/dest/public/avm/avm_context.js +0 -44
- package/dest/public/avm/avm_contract_call_result.d.ts +0 -32
- package/dest/public/avm/avm_contract_call_result.d.ts.map +0 -1
- package/dest/public/avm/avm_contract_call_result.js +0 -54
- package/dest/public/avm/avm_execution_environment.d.ts +0 -24
- package/dest/public/avm/avm_execution_environment.d.ts.map +0 -1
- package/dest/public/avm/avm_execution_environment.js +0 -33
- package/dest/public/avm/avm_gas.d.ts +0 -44
- package/dest/public/avm/avm_gas.d.ts.map +0 -1
- package/dest/public/avm/avm_gas.js +0 -195
- package/dest/public/avm/avm_machine_state.d.ts +0 -98
- package/dest/public/avm/avm_machine_state.d.ts.map +0 -1
- package/dest/public/avm/avm_machine_state.js +0 -110
- package/dest/public/avm/avm_memory_types.d.ts +0 -275
- package/dest/public/avm/avm_memory_types.d.ts.map +0 -1
- package/dest/public/avm/avm_memory_types.js +0 -354
- package/dest/public/avm/avm_simulator.d.ts +0 -41
- package/dest/public/avm/avm_simulator.d.ts.map +0 -1
- package/dest/public/avm/avm_simulator.js +0 -192
- package/dest/public/avm/avm_simulator_interface.d.ts +0 -9
- package/dest/public/avm/avm_simulator_interface.d.ts.map +0 -1
- package/dest/public/avm/avm_simulator_interface.js +0 -3
- package/dest/public/avm/calldata.d.ts +0 -51
- package/dest/public/avm/calldata.d.ts.map +0 -1
- package/dest/public/avm/calldata.js +0 -63
- package/dest/public/avm/errors.d.ts +0 -104
- package/dest/public/avm/errors.d.ts.map +0 -1
- package/dest/public/avm/errors.js +0 -141
- package/dest/public/avm/fixtures/account_proof_fetcher.d.ts +0 -2
- package/dest/public/avm/fixtures/account_proof_fetcher.d.ts.map +0 -1
- package/dest/public/avm/fixtures/avm_simulation_tester.d.ts +0 -22
- package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +0 -1
- package/dest/public/avm/fixtures/avm_simulation_tester.js +0 -84
- package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +0 -1
- package/dest/public/avm/fixtures/initializers.d.ts +0 -42
- package/dest/public/avm/fixtures/initializers.d.ts.map +0 -1
- package/dest/public/avm/fixtures/initializers.js +0 -45
- package/dest/public/avm/fixtures/utils.d.ts +0 -39
- package/dest/public/avm/fixtures/utils.d.ts.map +0 -1
- package/dest/public/avm/index.d.ts +0 -2
- package/dest/public/avm/index.d.ts.map +0 -1
- package/dest/public/avm/index.js +0 -1
- package/dest/public/avm/opcodes/accrued_substate.d.ts +0 -74
- package/dest/public/avm/opcodes/accrued_substate.d.ts.map +0 -1
- package/dest/public/avm/opcodes/accrued_substate.js +0 -254
- package/dest/public/avm/opcodes/addressing_mode.d.ts +0 -31
- package/dest/public/avm/opcodes/addressing_mode.d.ts.map +0 -1
- package/dest/public/avm/opcodes/addressing_mode.js +0 -94
- package/dest/public/avm/opcodes/arithmetic.d.ts +0 -49
- package/dest/public/avm/opcodes/arithmetic.d.ts.map +0 -1
- package/dest/public/avm/opcodes/arithmetic.js +0 -97
- package/dest/public/avm/opcodes/bitwise.d.ts +0 -42
- package/dest/public/avm/opcodes/bitwise.d.ts.map +0 -1
- package/dest/public/avm/opcodes/bitwise.js +0 -99
- package/dest/public/avm/opcodes/comparators.d.ts +0 -25
- package/dest/public/avm/opcodes/comparators.d.ts.map +0 -1
- package/dest/public/avm/opcodes/comparators.js +0 -43
- package/dest/public/avm/opcodes/contract.d.ts +0 -20
- package/dest/public/avm/opcodes/contract.d.ts.map +0 -1
- package/dest/public/avm/opcodes/contract.js +0 -65
- package/dest/public/avm/opcodes/control_flow.d.ts +0 -41
- package/dest/public/avm/opcodes/control_flow.d.ts.map +0 -1
- package/dest/public/avm/opcodes/control_flow.js +0 -107
- package/dest/public/avm/opcodes/conversion.d.ts +0 -18
- package/dest/public/avm/opcodes/conversion.d.ts.map +0 -1
- package/dest/public/avm/opcodes/conversion.js +0 -333
- package/dest/public/avm/opcodes/ec_add.d.ts +0 -19
- package/dest/public/avm/opcodes/ec_add.d.ts.map +0 -1
- package/dest/public/avm/opcodes/ec_add.js +0 -93
- package/dest/public/avm/opcodes/environment_getters.d.ts +0 -28
- package/dest/public/avm/opcodes/environment_getters.d.ts.map +0 -1
- package/dest/public/avm/opcodes/environment_getters.js +0 -77
- package/dest/public/avm/opcodes/external_calls.d.ts +0 -59
- package/dest/public/avm/opcodes/external_calls.d.ts.map +0 -1
- package/dest/public/avm/opcodes/external_calls.js +0 -210
- package/dest/public/avm/opcodes/hashing.d.ts +0 -36
- package/dest/public/avm/opcodes/hashing.d.ts.map +0 -1
- package/dest/public/avm/opcodes/hashing.js +0 -119
- package/dest/public/avm/opcodes/index.d.ts +0 -16
- package/dest/public/avm/opcodes/index.d.ts.map +0 -1
- package/dest/public/avm/opcodes/index.js +0 -15
- package/dest/public/avm/opcodes/instruction.d.ts +0 -74
- package/dest/public/avm/opcodes/instruction.d.ts.map +0 -1
- package/dest/public/avm/opcodes/instruction.js +0 -95
- package/dest/public/avm/opcodes/instruction_impl.d.ts +0 -19
- package/dest/public/avm/opcodes/instruction_impl.d.ts.map +0 -1
- package/dest/public/avm/opcodes/instruction_impl.js +0 -30
- package/dest/public/avm/opcodes/memory.d.ts +0 -74
- package/dest/public/avm/opcodes/memory.d.ts.map +0 -1
- package/dest/public/avm/opcodes/memory.js +0 -257
- package/dest/public/avm/opcodes/misc.d.ts +0 -18
- package/dest/public/avm/opcodes/misc.d.ts.map +0 -1
- package/dest/public/avm/opcodes/misc.js +0 -73
- package/dest/public/avm/opcodes/storage.d.ts +0 -25
- package/dest/public/avm/opcodes/storage.d.ts.map +0 -1
- package/dest/public/avm/opcodes/storage.js +0 -78
- package/dest/public/avm/revert_reason.d.ts +0 -18
- package/dest/public/avm/revert_reason.d.ts.map +0 -1
- package/dest/public/avm/revert_reason.js +0 -39
- package/dest/public/avm/serialization/buffer_cursor.d.ts +0 -26
- package/dest/public/avm/serialization/buffer_cursor.d.ts.map +0 -1
- package/dest/public/avm/serialization/buffer_cursor.js +0 -99
- package/dest/public/avm/serialization/bytecode_serialization.d.ts +0 -17
- package/dest/public/avm/serialization/bytecode_serialization.d.ts.map +0 -1
- package/dest/public/avm/serialization/bytecode_serialization.js +0 -336
- package/dest/public/avm/serialization/instruction_serialization.d.ts +0 -114
- package/dest/public/avm/serialization/instruction_serialization.d.ts.map +0 -1
- package/dest/public/avm/serialization/instruction_serialization.js +0 -261
- package/dest/public/avm/test_utils.d.ts +0 -15
- package/dest/public/avm/test_utils.d.ts.map +0 -1
- package/dest/public/avm/test_utils.js +0 -44
- package/dest/public/debug_fn_name.d.ts +0 -18
- package/dest/public/debug_fn_name.d.ts.map +0 -1
- package/dest/public/debug_fn_name.js +0 -37
- package/dest/public/fixtures/custom_bytecode_tests.d.ts +0 -12
- package/dest/public/fixtures/custom_bytecode_tests.d.ts.map +0 -1
- package/dest/public/fixtures/custom_bytecode_tests.js +0 -174
- package/dest/public/fixtures/minimal_public_tx.d.ts +0 -4
- package/dest/public/fixtures/minimal_public_tx.d.ts.map +0 -1
- package/dest/public/fixtures/minimal_public_tx.js +0 -19
- package/dest/public/fixtures/opcode_spammer.d.ts +0 -122
- package/dest/public/fixtures/opcode_spammer.d.ts.map +0 -1
- package/dest/public/fixtures/opcode_spammer.js +0 -1653
- package/dest/public/hinting_db_sources.d.ts +0 -80
- package/dest/public/hinting_db_sources.d.ts.map +0 -1
- package/dest/public/hinting_db_sources.js +0 -356
- package/dest/public/public_tx_simulator/cpp_public_tx_simulator.d.ts +0 -53
- package/dest/public/public_tx_simulator/cpp_public_tx_simulator.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/cpp_public_tx_simulator.js +0 -131
- package/dest/public/public_tx_simulator/cpp_public_tx_simulator_with_hinted_dbs.d.ts +0 -42
- package/dest/public/public_tx_simulator/cpp_public_tx_simulator_with_hinted_dbs.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/cpp_public_tx_simulator_with_hinted_dbs.js +0 -86
- package/dest/public/public_tx_simulator/cpp_vs_ts_public_tx_simulator.d.ts +0 -30
- package/dest/public/public_tx_simulator/cpp_vs_ts_public_tx_simulator.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/cpp_vs_ts_public_tx_simulator.js +0 -171
- package/dest/public/public_tx_simulator/dumping_cpp_public_tx_simulator.d.ts +0 -23
- package/dest/public/public_tx_simulator/dumping_cpp_public_tx_simulator.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/measured_public_tx_simulator.d.ts +0 -31
- package/dest/public/public_tx_simulator/measured_public_tx_simulator.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/measured_public_tx_simulator.js +0 -51
- package/dest/public/public_tx_simulator/public_tx_context.d.ts +0 -131
- package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/public_tx_context.js +0 -300
- package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.d.ts +0 -21
- package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.d.ts.map +0 -1
- package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.js +0 -415
- package/dest/public/side_effect_trace.d.ts +0 -87
- package/dest/public/side_effect_trace.d.ts.map +0 -1
- package/dest/public/side_effect_trace.js +0 -199
- package/dest/public/side_effect_trace_interface.d.ts +0 -22
- package/dest/public/side_effect_trace_interface.d.ts.map +0 -1
- package/dest/public/side_effect_trace_interface.js +0 -1
- package/dest/public/state_manager/index.d.ts +0 -2
- package/dest/public/state_manager/index.d.ts.map +0 -1
- package/dest/public/state_manager/index.js +0 -1
- package/dest/public/state_manager/nullifiers.d.ts +0 -61
- package/dest/public/state_manager/nullifiers.d.ts.map +0 -1
- package/dest/public/state_manager/nullifiers.js +0 -92
- package/dest/public/state_manager/public_storage.d.ts +0 -66
- package/dest/public/state_manager/public_storage.d.ts.map +0 -1
- package/dest/public/state_manager/public_storage.js +0 -145
- package/dest/public/state_manager/state_manager.d.ts +0 -170
- package/dest/public/state_manager/state_manager.d.ts.map +0 -1
- package/dest/public/state_manager/state_manager.js +0 -402
- package/src/public/avm/avm_context.ts +0 -61
- package/src/public/avm/avm_contract_call_result.ts +0 -69
- package/src/public/avm/avm_execution_environment.ts +0 -51
- package/src/public/avm/avm_gas.ts +0 -183
- package/src/public/avm/avm_machine_state.ts +0 -170
- package/src/public/avm/avm_memory_types.ts +0 -440
- package/src/public/avm/avm_simulator.ts +0 -279
- package/src/public/avm/avm_simulator_interface.ts +0 -8
- package/src/public/avm/calldata.ts +0 -100
- package/src/public/avm/errors.ts +0 -177
- package/src/public/avm/fixtures/avm_simulation_tester.ts +0 -122
- package/src/public/avm/fixtures/initializers.ts +0 -103
- package/src/public/avm/index.ts +0 -1
- package/src/public/avm/opcodes/accrued_substate.ts +0 -285
- package/src/public/avm/opcodes/addressing_mode.ts +0 -111
- package/src/public/avm/opcodes/arithmetic.ts +0 -129
- package/src/public/avm/opcodes/bitwise.ts +0 -113
- package/src/public/avm/opcodes/comparators.ts +0 -55
- package/src/public/avm/opcodes/contract.ts +0 -72
- package/src/public/avm/opcodes/control_flow.ts +0 -123
- package/src/public/avm/opcodes/conversion.ts +0 -104
- package/src/public/avm/opcodes/ec_add.ts +0 -105
- package/src/public/avm/opcodes/environment_getters.ts +0 -87
- package/src/public/avm/opcodes/external_calls.ts +0 -262
- package/src/public/avm/opcodes/hashing.ts +0 -151
- package/src/public/avm/opcodes/index.ts +0 -15
- package/src/public/avm/opcodes/instruction.ts +0 -136
- package/src/public/avm/opcodes/instruction_impl.ts +0 -36
- package/src/public/avm/opcodes/memory.ts +0 -293
- package/src/public/avm/opcodes/misc.ts +0 -102
- package/src/public/avm/opcodes/storage.ts +0 -95
- package/src/public/avm/revert_reason.ts +0 -58
- package/src/public/avm/serialization/buffer_cursor.ts +0 -118
- package/src/public/avm/serialization/bytecode_serialization.ts +0 -215
- package/src/public/avm/serialization/instruction_serialization.ts +0 -249
- package/src/public/avm/test_utils.ts +0 -64
- package/src/public/debug_fn_name.ts +0 -52
- package/src/public/fixtures/custom_bytecode_tests.ts +0 -228
- package/src/public/fixtures/minimal_public_tx.ts +0 -26
- package/src/public/fixtures/opcode_spammer.ts +0 -1717
- package/src/public/hinting_db_sources.ts +0 -609
- package/src/public/public_tx_simulator/cpp_public_tx_simulator.ts +0 -210
- package/src/public/public_tx_simulator/cpp_public_tx_simulator_with_hinted_dbs.ts +0 -134
- package/src/public/public_tx_simulator/cpp_vs_ts_public_tx_simulator.ts +0 -239
- package/src/public/public_tx_simulator/measured_public_tx_simulator.ts +0 -105
- package/src/public/public_tx_simulator/public_tx_context.ts +0 -484
- package/src/public/public_tx_simulator/telemetry_public_tx_simulator.ts +0 -63
- package/src/public/side_effect_trace.ts +0 -293
- package/src/public/side_effect_trace_interface.ts +0 -28
- package/src/public/state_manager/index.ts +0 -1
- package/src/public/state_manager/nullifiers.ts +0 -103
- package/src/public/state_manager/public_storage.ts +0 -174
- package/src/public/state_manager/state_manager.ts +0 -569
- /package/dest/public/avm/{fixtures → testing}/account_proof_fetcher.js +0 -0
- /package/src/public/avm/{fixtures → testing}/account_proof.json +0 -0
- /package/src/public/avm/{fixtures → testing}/account_proof_fetcher.ts +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type Logger, type LoggerBindings } from '@aztec/foundation/log';
|
|
2
|
-
import { type PublicSimulatorConfig, PublicTxResult } from '@aztec/stdlib/avm';
|
|
3
|
-
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
|
|
4
|
-
import type { GlobalVariables, Tx } from '@aztec/stdlib/tx';
|
|
5
|
-
import type { ExecutorMetricsInterface } from '../executor_metrics_interface.js';
|
|
6
|
-
import type { PublicContractsDB } from '../public_db_sources.js';
|
|
7
|
-
import { PublicTxSimulator } from './public_tx_simulator.js';
|
|
8
|
-
import type { MeasuredPublicTxSimulatorInterface, PublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
|
|
9
|
-
/**
|
|
10
|
-
* C++ implementation of PublicTxSimulator using pre-collected hints.
|
|
11
|
-
* This implementation runs TS simulation first to collect all hints,
|
|
12
|
-
* then passes the complete AvmCircuitInputs (hints + public inputs)
|
|
13
|
-
* to C++ to run hinted simulation.
|
|
14
|
-
*/
|
|
15
|
-
export declare class CppPublicTxSimulatorHintedDbs extends PublicTxSimulator implements PublicTxSimulatorInterface {
|
|
16
|
-
protected log: Logger;
|
|
17
|
-
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, config?: Partial<PublicSimulatorConfig>, bindings?: LoggerBindings);
|
|
18
|
-
/**
|
|
19
|
-
* Simulate a transaction's public portion using the C++ vm2 simulator with hinted DBs.
|
|
20
|
-
*
|
|
21
|
-
* This implementation:
|
|
22
|
-
* 1. Runs the full TypeScript simulation to generate AvmCircuitInputs (hints + public inputs)
|
|
23
|
-
* 2. Passes the complete AvmCircuitInputs to C++ to run hinted simulation
|
|
24
|
-
*
|
|
25
|
-
* @param tx - The transaction to simulate.
|
|
26
|
-
* @returns The result of the transaction's public execution.
|
|
27
|
-
*/
|
|
28
|
-
simulate(tx: Tx): Promise<PublicTxResult>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Class to record metrics for simulation.
|
|
32
|
-
*
|
|
33
|
-
* Note(dbanks12): We might not be able to collect all the same metrics in C++ as we do in TS!
|
|
34
|
-
* Unless we move some of the metrics collection to C++, we don't have inner functions exposed
|
|
35
|
-
* to TS for tracking.
|
|
36
|
-
*/
|
|
37
|
-
export declare class MeasuredCppPublicTxSimulatorHintedDbs extends CppPublicTxSimulatorHintedDbs implements MeasuredPublicTxSimulatorInterface {
|
|
38
|
-
protected readonly metrics: ExecutorMetricsInterface;
|
|
39
|
-
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, metrics: ExecutorMetricsInterface, config?: Partial<PublicSimulatorConfig>, bindings?: LoggerBindings);
|
|
40
|
-
simulate(tx: Tx, txLabel?: string): Promise<PublicTxResult>;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BwX3B1YmxpY190eF9zaW11bGF0b3Jfd2l0aF9oaW50ZWRfZGJzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcHVibGljL3B1YmxpY190eF9zaW11bGF0b3IvY3BwX3B1YmxpY190eF9zaW11bGF0b3Jfd2l0aF9oaW50ZWRfZGJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE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CAAoC,CAAC;AAE5C;;;;;GAKG;AACH,qBAAa,6BAA8B,SAAQ,iBAAkB,YAAW,0BAA0B;IACxG,UAAmB,GAAG,EAAE,MAAM,CAAC;IAE/B,YACE,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EAChC,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EACvC,QAAQ,CAAC,EAAE,cAAc,EAI1B;IAED;;;;;;;;;OASG;IACmB,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA8C9D;CACF;AAED;;;;;;GAMG;AACH,qBAAa,qCACX,SAAQ,6BACR,YAAW,kCAAkC;IAM3C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,wBAAwB;IAJtD,YACE,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EACb,OAAO,EAAE,wBAAwB,EACpD,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EACvC,QAAQ,CAAC,EAAE,cAAc,EAG1B;IAEqB,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CAS/F;CACF"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
-
import { avmSimulateWithHintedDbs } from '@aztec/native';
|
|
3
|
-
import { AvmCircuitInputs, PublicTxResult, deserializeFromMessagePack } from '@aztec/stdlib/avm';
|
|
4
|
-
import { SimulationError } from '@aztec/stdlib/errors';
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
|
-
import { PublicTxSimulator } from './public_tx_simulator.js';
|
|
7
|
-
/**
|
|
8
|
-
* C++ implementation of PublicTxSimulator using pre-collected hints.
|
|
9
|
-
* This implementation runs TS simulation first to collect all hints,
|
|
10
|
-
* then passes the complete AvmCircuitInputs (hints + public inputs)
|
|
11
|
-
* to C++ to run hinted simulation.
|
|
12
|
-
*/ export class CppPublicTxSimulatorHintedDbs extends PublicTxSimulator {
|
|
13
|
-
log;
|
|
14
|
-
constructor(merkleTree, contractsDB, globalVariables, config, bindings){
|
|
15
|
-
super(merkleTree, contractsDB, globalVariables, config, undefined, bindings);
|
|
16
|
-
this.log = createLogger(`simulator:cpp_public_tx_simulator_hinted_dbs`, bindings);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Simulate a transaction's public portion using the C++ vm2 simulator with hinted DBs.
|
|
20
|
-
*
|
|
21
|
-
* This implementation:
|
|
22
|
-
* 1. Runs the full TypeScript simulation to generate AvmCircuitInputs (hints + public inputs)
|
|
23
|
-
* 2. Passes the complete AvmCircuitInputs to C++ to run hinted simulation
|
|
24
|
-
*
|
|
25
|
-
* @param tx - The transaction to simulate.
|
|
26
|
-
* @returns The result of the transaction's public execution.
|
|
27
|
-
*/ async simulate(tx) {
|
|
28
|
-
const txHash = this.computeTxHash(tx);
|
|
29
|
-
this.log.debug(`C++ hinted DB simulation of ${tx.publicFunctionCalldata.length} public calls for tx ${txHash}`, {
|
|
30
|
-
txHash
|
|
31
|
-
});
|
|
32
|
-
// First, run TS simulation to generate hints and public inputs
|
|
33
|
-
this.log.debug(`Running TS simulation for tx ${txHash}`);
|
|
34
|
-
// Run the full TypeScript simulation using the parent class
|
|
35
|
-
// This will modify the merkle tree with the transaction's state changes
|
|
36
|
-
const tsResult = await super.simulate(tx);
|
|
37
|
-
this.log.debug(`TS simulation succeeded for tx ${txHash}`);
|
|
38
|
-
// Extract the full AvmCircuitInputs from the TS result
|
|
39
|
-
const avmCircuitInputs = new AvmCircuitInputs(tsResult.hints, tsResult.publicInputs);
|
|
40
|
-
// Second, run C++ simulation with hinted DBs
|
|
41
|
-
this.log.debug(`Running C++ simulation with hinted DBs for tx ${txHash}`);
|
|
42
|
-
// Serialize to msgpack and call the C++ simulator
|
|
43
|
-
const inputBuffer = avmCircuitInputs.serializeWithMessagePack();
|
|
44
|
-
let resultBuffer;
|
|
45
|
-
try {
|
|
46
|
-
resultBuffer = await avmSimulateWithHintedDbs(inputBuffer, this.log.level);
|
|
47
|
-
} catch (error) {
|
|
48
|
-
throw new SimulationError(`C++ hinted simulation failed: ${error.message}`, []);
|
|
49
|
-
}
|
|
50
|
-
// Deserialize the msgpack result
|
|
51
|
-
const cppResultJSON = deserializeFromMessagePack(resultBuffer);
|
|
52
|
-
const cppResult = PublicTxResult.fromPlainObject(cppResultJSON);
|
|
53
|
-
assert(cppResult.revertCode.equals(tsResult.revertCode));
|
|
54
|
-
assert(cppResult.gasUsed.totalGas.equals(tsResult.gasUsed.totalGas));
|
|
55
|
-
this.log.debug(`C++ hinted simulation completed for tx ${txHash}`, {
|
|
56
|
-
txHash,
|
|
57
|
-
reverted: !tsResult.revertCode.isOK(),
|
|
58
|
-
tsGasUsed: tsResult.gasUsed.totalGas.l2Gas,
|
|
59
|
-
cppGasUsed: tsResult.gasUsed.totalGas.l2Gas
|
|
60
|
-
});
|
|
61
|
-
// TODO(fcarreiro): complete this.
|
|
62
|
-
return tsResult;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Class to record metrics for simulation.
|
|
67
|
-
*
|
|
68
|
-
* Note(dbanks12): We might not be able to collect all the same metrics in C++ as we do in TS!
|
|
69
|
-
* Unless we move some of the metrics collection to C++, we don't have inner functions exposed
|
|
70
|
-
* to TS for tracking.
|
|
71
|
-
*/ export class MeasuredCppPublicTxSimulatorHintedDbs extends CppPublicTxSimulatorHintedDbs {
|
|
72
|
-
metrics;
|
|
73
|
-
constructor(merkleTree, contractsDB, globalVariables, metrics, config, bindings){
|
|
74
|
-
super(merkleTree, contractsDB, globalVariables, config, bindings), this.metrics = metrics;
|
|
75
|
-
}
|
|
76
|
-
async simulate(tx, txLabel = 'unlabeledTx') {
|
|
77
|
-
this.metrics.startRecordingTxSimulation(txLabel);
|
|
78
|
-
let result;
|
|
79
|
-
try {
|
|
80
|
-
result = await super.simulate(tx);
|
|
81
|
-
} finally{
|
|
82
|
-
this.metrics.stopRecordingTxSimulation(txLabel, result?.gasUsed, result?.revertCode);
|
|
83
|
-
}
|
|
84
|
-
return result;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Logger, type LoggerBindings } from '@aztec/foundation/log';
|
|
2
|
-
import { type PublicSimulatorConfig, PublicTxResult } from '@aztec/stdlib/avm';
|
|
3
|
-
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
|
|
4
|
-
import type { GlobalVariables, Tx } from '@aztec/stdlib/tx';
|
|
5
|
-
import type { ExecutorMetricsInterface } from '../executor_metrics_interface.js';
|
|
6
|
-
import type { PublicContractsDB } from '../public_db_sources.js';
|
|
7
|
-
import { PublicTxSimulator } from './public_tx_simulator.js';
|
|
8
|
-
import type { MeasuredPublicTxSimulatorInterface, PublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
|
|
9
|
-
/**
|
|
10
|
-
* An implementation of PublicTxSimulator that first simulates in C++, then TS, an compares the results.
|
|
11
|
-
* The C++ simulator accesses the world state directly/natively within C++.
|
|
12
|
-
* For contract DB accesses, it makes callbacks through NAPI back to the TS PublicContractsDB cache.
|
|
13
|
-
*/
|
|
14
|
-
export declare class CppVsTsPublicTxSimulator extends PublicTxSimulator implements PublicTxSimulatorInterface {
|
|
15
|
-
protected log: Logger;
|
|
16
|
-
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, config?: Partial<PublicSimulatorConfig>, bindings?: LoggerBindings);
|
|
17
|
-
/**
|
|
18
|
-
* Simulate a transaction's public portion using the C++ avvm simulator.
|
|
19
|
-
*
|
|
20
|
-
* @param tx - The transaction to simulate.
|
|
21
|
-
* @returns The result of the transaction's public execution.
|
|
22
|
-
*/
|
|
23
|
-
simulate(tx: Tx): Promise<PublicTxResult>;
|
|
24
|
-
}
|
|
25
|
-
export declare class MeasuredCppVsTsPublicTxSimulator extends CppVsTsPublicTxSimulator implements MeasuredPublicTxSimulatorInterface {
|
|
26
|
-
protected readonly metrics: ExecutorMetricsInterface;
|
|
27
|
-
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, metrics: ExecutorMetricsInterface, config?: Partial<PublicSimulatorConfig>, bindings?: LoggerBindings);
|
|
28
|
-
simulate(tx: Tx, txLabel?: string): Promise<PublicTxResult>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3BwX3ZzX3RzX3B1YmxpY190eF9zaW11bGF0b3IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaWMvcHVibGljX3R4X3NpbXVsYXRvci9jcHBfdnNfdHNfcHVibGljX3R4X3NpbXVsYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQUUsS0FBSyxjQUFjLEVBQTBCLE1BQU0sdUJBQXVCLENBQUM7QUFHakcsT0FBTyxFQUdMLEtBQUsscUJBQXFCLEVBQzFCLGNBQWMsRUFFZixNQUFNLG1CQUFtQixDQUFDO0FBRTNCLE9BQU8sS0FBSyxFQUFFLHlCQUF5QixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDckUsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFrQixFQUFFLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUs1RSxPQUFPLEtBQUssRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2pGLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFakUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMEJBQT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,qBAAqB,CAAC,EACvC,QAAQ,CAAC,EAAE,cAAc,EAG1B;IAEqB,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CAS/F;CACF"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { createLogger, logLevel } from '@aztec/foundation/log';
|
|
2
|
-
import { avmSimulate } from '@aztec/native';
|
|
3
|
-
import { ProtocolContractsList } from '@aztec/protocol-contracts';
|
|
4
|
-
import { AvmFastSimulationInputs, AvmTxHint, PublicTxResult, deserializeFromMessagePack } from '@aztec/stdlib/avm';
|
|
5
|
-
import { SimulationError } from '@aztec/stdlib/errors';
|
|
6
|
-
import { WorldStateRevisionWithHandle } from '@aztec/stdlib/world-state';
|
|
7
|
-
import { strict as assert } from 'assert';
|
|
8
|
-
import { ContractProviderForCpp } from './contract_provider_for_cpp.js';
|
|
9
|
-
import { PublicTxSimulator } from './public_tx_simulator.js';
|
|
10
|
-
/**
|
|
11
|
-
* An implementation of PublicTxSimulator that first simulates in C++, then TS, an compares the results.
|
|
12
|
-
* The C++ simulator accesses the world state directly/natively within C++.
|
|
13
|
-
* For contract DB accesses, it makes callbacks through NAPI back to the TS PublicContractsDB cache.
|
|
14
|
-
*/ export class CppVsTsPublicTxSimulator extends PublicTxSimulator {
|
|
15
|
-
log;
|
|
16
|
-
constructor(merkleTree, contractsDB, globalVariables, config, bindings){
|
|
17
|
-
super(merkleTree, contractsDB, globalVariables, config, undefined, bindings);
|
|
18
|
-
this.log = createLogger(`simulator:cpp_vs_public_tx_simulator`, bindings);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Simulate a transaction's public portion using the C++ avvm simulator.
|
|
22
|
-
*
|
|
23
|
-
* @param tx - The transaction to simulate.
|
|
24
|
-
* @returns The result of the transaction's public execution.
|
|
25
|
-
*/ async simulate(tx) {
|
|
26
|
-
const txHash = this.computeTxHash(tx);
|
|
27
|
-
this.log.debug(`C++ simulation of ${tx.publicFunctionCalldata.length} public calls for tx ${txHash}`, {
|
|
28
|
-
txHash
|
|
29
|
-
});
|
|
30
|
-
// Run TS simulation to generate hints and public inputs
|
|
31
|
-
this.log.debug(`Running TS simulation for tx ${txHash}`);
|
|
32
|
-
// create checkpoint for ws
|
|
33
|
-
let tsResult;
|
|
34
|
-
let tsStateRef;
|
|
35
|
-
await this.merkleTree.createCheckpoint();
|
|
36
|
-
this.contractsDB.createCheckpoint();
|
|
37
|
-
try {
|
|
38
|
-
// Run the full TypeScript simulation using the parent class
|
|
39
|
-
// This will modify the merkle tree with the transaction's state changes
|
|
40
|
-
tsResult = await super.simulate(tx);
|
|
41
|
-
this.log.debug(`TS simulation completed for tx ${txHash}`);
|
|
42
|
-
tsStateRef = await this.merkleTree.getStateReference(); // capture tree roots for later comparsion
|
|
43
|
-
} catch (error) {
|
|
44
|
-
this.log.warn(`TS simulation failed, but still continuing with C++ simulation: ${error.message} ${error.stack}`);
|
|
45
|
-
} finally{
|
|
46
|
-
// revert checkpoint for ws and clear contract db changes
|
|
47
|
-
// (cpp should reapply exactly the same changes if there are no bugs)
|
|
48
|
-
await this.merkleTree.revertCheckpoint();
|
|
49
|
-
this.contractsDB.revertCheckpoint();
|
|
50
|
-
}
|
|
51
|
-
this.log.debug(`Running C++ simulation for tx ${txHash}`);
|
|
52
|
-
// Using the "as WorldStateRevisionWithHandle" is a bit of a "trust me bro", hence the assert.
|
|
53
|
-
let wsRevision = this.merkleTree.getRevision();
|
|
54
|
-
assert(wsRevision instanceof WorldStateRevisionWithHandle, 'CppPublicTxSimulator a real NativeWorldStateInstance with a handle to the C++ WorldState object');
|
|
55
|
-
const wsCppHandle = wsRevision.handle;
|
|
56
|
-
wsRevision = wsRevision.toWorldStateRevision(); // for msgpack serialization, we don't include the handle in the type
|
|
57
|
-
this.log.debug(`Running C++ simulation with world state revision ${JSON.stringify(wsRevision)}`);
|
|
58
|
-
// Create the fast simulation inputs
|
|
59
|
-
const txHint = AvmTxHint.fromTx(tx, this.globalVariables.gasFees);
|
|
60
|
-
const protocolContracts = ProtocolContractsList;
|
|
61
|
-
const fastSimInputs = new AvmFastSimulationInputs(wsRevision, this.config, txHint, this.globalVariables, protocolContracts);
|
|
62
|
-
// Create contract provider for callbacks to TypeScript PublicContractsDB from C++
|
|
63
|
-
const contractProvider = new ContractProviderForCpp(this.contractsDB, this.globalVariables, this.bindings);
|
|
64
|
-
// Serialize to msgpack and call the C++ simulator
|
|
65
|
-
this.log.debug(`Serializing fast simulation inputs to msgpack...`);
|
|
66
|
-
const inputBuffer = fastSimInputs.serializeWithMessagePack();
|
|
67
|
-
let resultBuffer;
|
|
68
|
-
try {
|
|
69
|
-
this.log.debug(`Calling C++ simulator for tx ${txHash}`);
|
|
70
|
-
resultBuffer = await avmSimulate(inputBuffer, contractProvider, wsCppHandle, logLevel);
|
|
71
|
-
} catch (error) {
|
|
72
|
-
throw new SimulationError(`C++ simulation failed: ${error.message}`, []);
|
|
73
|
-
}
|
|
74
|
-
// If we've reached this point, C++ succeeded during simulation,
|
|
75
|
-
// so we assert that TS also succeeded.
|
|
76
|
-
assert(tsResult !== undefined, 'TS simulation should have succeeded if C++ succeeded');
|
|
77
|
-
assert(tsStateRef !== undefined, 'TS state reference should have been captured if C++ succeeded');
|
|
78
|
-
// Deserialize the msgpack result
|
|
79
|
-
this.log.debug(`Deserializing C++ from buffer (size: ${resultBuffer.length})...`);
|
|
80
|
-
const cppResultJSON = deserializeFromMessagePack(resultBuffer);
|
|
81
|
-
this.log.debug(`Deserializing C++ result to PublicTxResult...`);
|
|
82
|
-
const cppResult = PublicTxResult.fromPlainObject(cppResultJSON);
|
|
83
|
-
this.log.debug(`Done.`);
|
|
84
|
-
assert(cppResult.revertCode.equals(tsResult.revertCode));
|
|
85
|
-
assert(cppResult.gasUsed.totalGas.equals(tsResult.gasUsed.totalGas));
|
|
86
|
-
assert(cppResult.gasUsed.publicGas.equals(tsResult.gasUsed.publicGas));
|
|
87
|
-
assert(cppResult.gasUsed.teardownGas.equals(tsResult.gasUsed.teardownGas));
|
|
88
|
-
assert(cppResult.gasUsed.billedGas.equals(tsResult.gasUsed.billedGas));
|
|
89
|
-
assert(cppResult.publicTxEffect.equals(tsResult.publicTxEffect));
|
|
90
|
-
if (cppResult.publicInputs !== undefined) {
|
|
91
|
-
assert(cppResult.publicInputs.toBuffer().equals(tsResult.publicInputs.toBuffer()));
|
|
92
|
-
}
|
|
93
|
-
// TODO(fcarreiro): complete this.
|
|
94
|
-
// Check that C++ hints are a strict subset of TS hints.
|
|
95
|
-
// Then enable for misc tests and validate hints.
|
|
96
|
-
//if (this.config?.collectHints) {
|
|
97
|
-
//}
|
|
98
|
-
if (this.config?.collectCallMetadata) {
|
|
99
|
-
assert(cppResult.getAppLogicReturnValues().length === tsResult.getAppLogicReturnValues().length);
|
|
100
|
-
for(let i = 0; i < cppResult.getAppLogicReturnValues().length; i++){
|
|
101
|
-
assert(cppResult.getAppLogicReturnValues()[i].equals(tsResult.getAppLogicReturnValues()[i]));
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
// Messages are still not ok for exceptional halts (they are not plumbed in C++).
|
|
105
|
-
const cppRevertReason = cppResult.findRevertReason() || {};
|
|
106
|
-
const tsRevertReason = tsResult.findRevertReason() || {};
|
|
107
|
-
const cppRevertReasonAsObject = JSON.parse(JSON.stringify(cppRevertReason));
|
|
108
|
-
const tsRevertReasonAsObject = JSON.parse(JSON.stringify(tsRevertReason));
|
|
109
|
-
if (JSON.stringify(cppRevertReasonAsObject) !== JSON.stringify(tsRevertReasonAsObject)) {
|
|
110
|
-
this.log.debug('cppResult.findRevertReason()', cppRevertReasonAsObject);
|
|
111
|
-
this.log.debug('tsResult.findRevertReason()', tsRevertReasonAsObject);
|
|
112
|
-
}
|
|
113
|
-
// TODO: dont compare the strings since this is not deterministic.
|
|
114
|
-
// Sometimes error messages are different between C++ and TS, so we omit in the default comparison
|
|
115
|
-
const cppRevertReasonWithoutMessage = {
|
|
116
|
-
...cppRevertReasonAsObject,
|
|
117
|
-
originalMessage: undefined
|
|
118
|
-
};
|
|
119
|
-
const tsRevertReasonWithoutMessage = {
|
|
120
|
-
...tsRevertReasonAsObject,
|
|
121
|
-
originalMessage: undefined
|
|
122
|
-
};
|
|
123
|
-
assert(JSON.stringify(cppRevertReasonWithoutMessage) === JSON.stringify(tsRevertReasonWithoutMessage));
|
|
124
|
-
const cppHasRevertMessage = cppRevertReasonAsObject.originalMessage && cppRevertReasonAsObject.originalMessage.length > 0;
|
|
125
|
-
const tsHasRevertMessage = tsRevertReasonAsObject.originalMessage && tsRevertReasonAsObject.originalMessage.length > 0;
|
|
126
|
-
// assert that if one of the error messages is non-empty, the other is
|
|
127
|
-
assert(cppHasRevertMessage === tsHasRevertMessage, 'One of the AVM simulators (C++ or TS) produced a revert message, but the other did not');
|
|
128
|
-
// Ideally, we'd love to be able to compare full error messages, but without a lot of work
|
|
129
|
-
// the two simulators will always be able to produce some differing errors.
|
|
130
|
-
// Commenting out the code below will enforce that the error messages are at least
|
|
131
|
-
// similar (one contains the other). Even this is not something we can guarantee.
|
|
132
|
-
//if (cppHasRevertMessage) {
|
|
133
|
-
// const cppRevertMessageContainsTs = cppRevertReasonAsObject.originalMessage.includes(
|
|
134
|
-
// tsRevertReasonAsObject.originalMessage,
|
|
135
|
-
// );
|
|
136
|
-
// const tsRevertMessageContainsCpp = tsRevertReasonAsObject.originalMessage.includes(
|
|
137
|
-
// cppRevertReasonAsObject.originalMessage,
|
|
138
|
-
// );
|
|
139
|
-
// assert(
|
|
140
|
-
// cppRevertMessageContainsTs || tsRevertMessageContainsCpp,
|
|
141
|
-
// 'The AVM simulators (C++ and TS) produced different revert messages (neither was a substring of the other)',
|
|
142
|
-
// );
|
|
143
|
-
//}
|
|
144
|
-
// Confirm that tree roots match
|
|
145
|
-
const cppStateRef = await this.merkleTree.getStateReference();
|
|
146
|
-
assert(cppStateRef.equals(tsStateRef), `Tree roots mismatch between TS and C++ public simulations for tx ${txHash}`);
|
|
147
|
-
this.log.debug(`C++ simulation completed for tx ${txHash}`, {
|
|
148
|
-
txHash,
|
|
149
|
-
reverted: !cppResult.revertCode.isOK(),
|
|
150
|
-
cppGasUsed: cppResult.gasUsed.totalGas.l2Gas
|
|
151
|
-
});
|
|
152
|
-
// Return cpp result as it has more detailed metadata / revert reasons
|
|
153
|
-
return cppResult;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
export class MeasuredCppVsTsPublicTxSimulator extends CppVsTsPublicTxSimulator {
|
|
157
|
-
metrics;
|
|
158
|
-
constructor(merkleTree, contractsDB, globalVariables, metrics, config, bindings){
|
|
159
|
-
super(merkleTree, contractsDB, globalVariables, config, bindings), this.metrics = metrics;
|
|
160
|
-
}
|
|
161
|
-
async simulate(tx, txLabel = 'unlabeledTx') {
|
|
162
|
-
this.metrics.startRecordingTxSimulation(txLabel);
|
|
163
|
-
let result;
|
|
164
|
-
try {
|
|
165
|
-
result = await super.simulate(tx);
|
|
166
|
-
} finally{
|
|
167
|
-
this.metrics.stopRecordingTxSimulation(txLabel, result?.gasUsed, result?.revertCode);
|
|
168
|
-
}
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { LoggerBindings } from '@aztec/foundation/log';
|
|
2
|
-
import { type PublicSimulatorConfig, PublicTxResult } from '@aztec/stdlib/avm';
|
|
3
|
-
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
|
|
4
|
-
import type { GlobalVariables, Tx } from '@aztec/stdlib/tx';
|
|
5
|
-
import type { PublicContractsDB } from '../public_db_sources.js';
|
|
6
|
-
import { CppPublicTxSimulator } from './cpp_public_tx_simulator.js';
|
|
7
|
-
/**
|
|
8
|
-
* A C++ public tx simulator that dumps AVM circuit inputs to disk after simulation.
|
|
9
|
-
* Used during nightly CI runs to collect circuit inputs for benchmarking.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DumpingCppPublicTxSimulator extends CppPublicTxSimulator {
|
|
12
|
-
private readonly outputDir;
|
|
13
|
-
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, config: Partial<PublicSimulatorConfig>, outputDir: string, bindings?: LoggerBindings);
|
|
14
|
-
simulate(tx: Tx): Promise<PublicTxResult>;
|
|
15
|
-
/**
|
|
16
|
-
* Dumps AVM circuit inputs to disk.
|
|
17
|
-
*
|
|
18
|
-
* @param result - The simulation result containing hints and public inputs
|
|
19
|
-
* @param txHash - The transaction hash to use in the filename
|
|
20
|
-
*/
|
|
21
|
-
private dumpAvmCircuitInputs;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHVtcGluZ19jcHBfcHVibGljX3R4X3NpbXVsYXRvci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3B1YmxpYy9wdWJsaWNfdHhfc2ltdWxhdG9yL2R1bXBpbmdfY3BwX3B1YmxpY190eF9zaW11bGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsY0FBYyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDNUQsT0FBTyxFQUlMLEtBQUsscUJBQXFCLEVBQzFCLGNBQWMsRUFFZixNQUFNLG1CQUFtQixDQUFDO0FBQzNCLE9BQU8sS0FBSyxFQUFFLHlCQUF5QixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDckUsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLEVBQUUsRUFBVSxNQUFNLGtCQUFrQixDQUFDO0FBTXBFLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDakUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFcEU7OztHQUdHO0FBQ0gscUJBQWEsMkJBQTRCLFNBQVEsb0JBQW9CO0lBQ25FLE9BQU8sQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFTO0lBRW5DLFlBQ0UsVUFBVSxFQUFFLHlCQUF5QixFQUNyQyxXQUFXLEVBQUUsaUJBQWlCLEVBQzlCLGVBQWUsRUFBRSxlQUFlLEVBQ2hDLE1BQU0sRUFBRSxPQUFPLENBQUMscUJBQXFCLENBQUMsRUFDdEMsU0FBUyxFQUFFLE1BQU0sRUFDakIsUUFBUSxDQUFDLEVBQUUsY0FBYyxFQU0xQjtJQUVxQixRQUFRLENBQUMsRUFBRSxFQUFFLEVBQUUsR0FBRyxPQUFPLENBQUMsY0FBYyxDQUFDLENBUTlEO0lBRUQ7Ozs7O09BS0c7SUFDSCxPQUFPLENBQUMsb0JBQW9CO0NBMEI3QiJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dumping_cpp_public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/dumping_cpp_public_tx_simulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAIL,KAAK,qBAAqB,EAC1B,cAAc,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,EAAE,EAAU,MAAM,kBAAkB,CAAC;AAMpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,qBAAa,2BAA4B,SAAQ,oBAAoB;IACnE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IAEnC,YACE,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,EACtC,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,cAAc,EAM1B;IAEqB,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAQ9D;IAED;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;CA0B7B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import type { PublicSimulatorConfig, PublicTxResult } from '@aztec/stdlib/avm';
|
|
3
|
-
import type { Gas } from '@aztec/stdlib/gas';
|
|
4
|
-
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
|
|
5
|
-
import { type GlobalVariables, PublicCallRequestWithCalldata, Tx, TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
6
|
-
import type { AvmFinalizedCallResult } from '../avm/avm_contract_call_result.js';
|
|
7
|
-
import type { ExecutorMetricsInterface } from '../executor_metrics_interface.js';
|
|
8
|
-
import type { PublicContractsDB } from '../public_db_sources.js';
|
|
9
|
-
import type { PublicPersistableStateManager } from '../state_manager/state_manager.js';
|
|
10
|
-
import { PublicTxContext } from './public_tx_context.js';
|
|
11
|
-
import { PublicTxSimulator } from './public_tx_simulator.js';
|
|
12
|
-
import type { MeasuredPublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
|
|
13
|
-
/**
|
|
14
|
-
* A public tx simulator that tracks miscellaneous simulation metrics without telemetry.
|
|
15
|
-
*/
|
|
16
|
-
export declare class MeasuredPublicTxSimulator extends PublicTxSimulator implements MeasuredPublicTxSimulatorInterface {
|
|
17
|
-
protected readonly metrics: ExecutorMetricsInterface;
|
|
18
|
-
constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, metrics: ExecutorMetricsInterface, config?: Partial<PublicSimulatorConfig>);
|
|
19
|
-
simulate(tx: Tx, txLabel?: string): Promise<PublicTxResult>;
|
|
20
|
-
protected insertNonRevertiblesFromPrivate(context: PublicTxContext): Promise<void>;
|
|
21
|
-
protected insertRevertiblesFromPrivate(context: PublicTxContext): Promise<void>;
|
|
22
|
-
protected simulatePhase(phase: TxExecutionPhase, context: PublicTxContext): Promise<{
|
|
23
|
-
phase: TxExecutionPhase;
|
|
24
|
-
durationMs?: number | undefined;
|
|
25
|
-
returnValues: import("@aztec/stdlib/tx").NestedProcessReturnValues[];
|
|
26
|
-
reverted: boolean;
|
|
27
|
-
revertReason?: import("@aztec/stdlib/errors").SimulationError | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
protected simulateEnqueuedCallInternal(stateManager: PublicPersistableStateManager, callRequest: PublicCallRequestWithCalldata, allocatedGas: Gas, transactionFee: Fr, fnName: string): Promise<AvmFinalizedCallResult>;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVhc3VyZWRfcHVibGljX3R4X3NpbXVsYXRvci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3B1YmxpYy9wdWJsaWNfdHhfc2ltdWxhdG9yL21lYXN1cmVkX3B1YmxpY190eF9zaW11bGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFekQsT0FBTyxLQUFLLEVBQUUscUJBQXFCLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDL0UsT0FBTyxLQUFLLEVBQUUsR0FBRyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFN0MsT0FBTyxLQUFLLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNyRSxPQUFPLEVBQUUsS0FBSyxlQUFlLEVBQUUsNkJBQTZCLEVBQUUsRUFBRSxFQUFFL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QsVUFBeUIsYUFBYSxDQUFDLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxPQUFPLEVBQUUsZUFBZTs7Ozs7O09BS3ZGO0lBRUQsVUFBeUIsNEJBQTRCLENBQ25ELFlBQVksRUFBRSw2QkFBNkIsRUFDM0MsV0FBVyxFQUFFLDZCQUE2QixFQUMxQyxZQUFZLEVBQUUsR0FBRyxFQUNqQixjQUFjLEVBQUUsRUFBRSxFQUNsQixNQUFNLEVBQUUsTUFBTSxHQUNiLE9BQU8sQ0FBQyxzQkFBc0IsQ0FBQyxDQXFDakM7Q0FDRiJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"measured_public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/measured_public_tx_simulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,KAAK,eAAe,EAAE,6BAA6B,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE7G,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AAE7F;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,iBAAkB,YAAW,kCAAkC;IAK1G,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,wBAAwB;IAJtD,YACE,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EACb,OAAO,EAAE,wBAAwB,EACpD,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EAGxC;IAEqB,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CAS/F;IAED,UAAyB,+BAA+B,CAAC,OAAO,EAAE,eAAe,iBAIhF;IAED,UAAyB,4BAA4B,CAAC,OAAO,EAAE,eAAe,iBAI7E;IAED,UAAyB,aAAa,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe;;;;;;OAKvF;IAED,UAAyB,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,CAqCjC;CACF"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
2
|
-
import { PublicTxSimulator } from './public_tx_simulator.js';
|
|
3
|
-
/**
|
|
4
|
-
* A public tx simulator that tracks miscellaneous simulation metrics without telemetry.
|
|
5
|
-
*/ export class MeasuredPublicTxSimulator extends PublicTxSimulator {
|
|
6
|
-
metrics;
|
|
7
|
-
constructor(merkleTree, contractsDB, globalVariables, metrics, config){
|
|
8
|
-
super(merkleTree, contractsDB, globalVariables, config), this.metrics = metrics;
|
|
9
|
-
}
|
|
10
|
-
async simulate(tx, txLabel = 'unlabeledTx') {
|
|
11
|
-
this.metrics.startRecordingTxSimulation(txLabel);
|
|
12
|
-
let avmResult;
|
|
13
|
-
try {
|
|
14
|
-
avmResult = await super.simulate(tx);
|
|
15
|
-
} finally{
|
|
16
|
-
this.metrics.stopRecordingTxSimulation(txLabel, avmResult?.gasUsed, avmResult?.revertCode);
|
|
17
|
-
}
|
|
18
|
-
return avmResult;
|
|
19
|
-
}
|
|
20
|
-
async insertNonRevertiblesFromPrivate(context) {
|
|
21
|
-
const timer = new Timer();
|
|
22
|
-
await super.insertNonRevertiblesFromPrivate(context);
|
|
23
|
-
this.metrics.recordPrivateEffectsInsertion(timer.us(), 'non-revertible');
|
|
24
|
-
}
|
|
25
|
-
async insertRevertiblesFromPrivate(context) {
|
|
26
|
-
const timer = new Timer();
|
|
27
|
-
await super.insertRevertiblesFromPrivate(context);
|
|
28
|
-
this.metrics.recordPrivateEffectsInsertion(timer.us(), 'revertible');
|
|
29
|
-
}
|
|
30
|
-
async simulatePhase(phase, context) {
|
|
31
|
-
const timer = new Timer();
|
|
32
|
-
const result = await super.simulatePhase(phase, context);
|
|
33
|
-
result.durationMs = timer.ms();
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
async simulateEnqueuedCallInternal(stateManager, callRequest, allocatedGas, transactionFee, fnName) {
|
|
37
|
-
const timer = new Timer();
|
|
38
|
-
const result = await super.simulateEnqueuedCallInternal(stateManager, callRequest, allocatedGas, transactionFee, fnName);
|
|
39
|
-
this.log.verbose(result.reverted ? `Simulation of enqueued public call ${fnName} reverted with reason ${result.revertReason?.message}.` : `Simulation of enqueued public call ${fnName} completed successfully.`, {
|
|
40
|
-
eventName: 'avm-simulation',
|
|
41
|
-
appCircuitName: fnName,
|
|
42
|
-
duration: timer.ms()
|
|
43
|
-
});
|
|
44
|
-
if (result.reverted) {
|
|
45
|
-
this.metrics.recordEnqueuedCallSimulationFailure(fnName, timer.ms(), allocatedGas.sub(result.gasLeft).l2Gas, result.totalInstructions);
|
|
46
|
-
} else {
|
|
47
|
-
this.metrics.recordEnqueuedCallSimulation(fnName, timer.ms(), allocatedGas.sub(result.gasLeft).l2Gas, result.totalInstructions);
|
|
48
|
-
}
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
-
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
3
|
-
import { AvmCircuitPublicInputs, RevertCode } from '@aztec/stdlib/avm';
|
|
4
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
import { type ContractDeploymentData } from '@aztec/stdlib/contract';
|
|
6
|
-
import type { SimulationError } from '@aztec/stdlib/errors';
|
|
7
|
-
import { Gas } from '@aztec/stdlib/gas';
|
|
8
|
-
import { PrivateToPublicAccumulatedData } from '@aztec/stdlib/kernel';
|
|
9
|
-
import { type GlobalVariables, ProtocolContracts, PublicCallRequestWithCalldata, type Tx, TxExecutionPhase, type TxHash } from '@aztec/stdlib/tx';
|
|
10
|
-
import type { PublicContractsDBInterface } from '../db_interfaces.js';
|
|
11
|
-
import type { PublicTreesDB } from '../public_db_sources.js';
|
|
12
|
-
import { PublicPersistableStateManager } from '../state_manager/state_manager.js';
|
|
13
|
-
/**
|
|
14
|
-
* The transaction-level context for public execution.
|
|
15
|
-
*/
|
|
16
|
-
export declare class PublicTxContext {
|
|
17
|
-
readonly txHash: TxHash;
|
|
18
|
-
readonly state: PhaseStateManager;
|
|
19
|
-
private readonly startTreeSnapshots;
|
|
20
|
-
private readonly globalVariables;
|
|
21
|
-
private readonly protocolContracts;
|
|
22
|
-
private readonly proverId;
|
|
23
|
-
private readonly gasSettings;
|
|
24
|
-
private readonly gasUsedByPrivate;
|
|
25
|
-
private readonly gasAllocatedToPublic;
|
|
26
|
-
private readonly gasAllocatedToPublicTeardown;
|
|
27
|
-
private readonly setupCallRequests;
|
|
28
|
-
private readonly appLogicCallRequests;
|
|
29
|
-
private readonly teardownCallRequests;
|
|
30
|
-
readonly nonRevertibleContractDeploymentData: ContractDeploymentData;
|
|
31
|
-
readonly revertibleContractDeploymentData: ContractDeploymentData;
|
|
32
|
-
readonly nonRevertibleAccumulatedDataFromPrivate: PrivateToPublicAccumulatedData;
|
|
33
|
-
readonly revertibleAccumulatedDataFromPrivate: PrivateToPublicAccumulatedData;
|
|
34
|
-
readonly feePayer: AztecAddress;
|
|
35
|
-
private readonly trace;
|
|
36
|
-
private log;
|
|
37
|
-
private gasUsedByPublic;
|
|
38
|
-
teardownGasUsed: Gas;
|
|
39
|
-
private halted;
|
|
40
|
-
private revertCode;
|
|
41
|
-
revertReason: SimulationError | undefined;
|
|
42
|
-
private constructor();
|
|
43
|
-
static create(treesDB: PublicTreesDB, contractsDB: PublicContractsDBInterface, tx: Tx, globalVariables: GlobalVariables, protocolContracts: ProtocolContracts, proverId: Fr, bindings?: LoggerBindings): Promise<PublicTxContext>;
|
|
44
|
-
/**
|
|
45
|
-
* Signal that the entire transaction execution is done.
|
|
46
|
-
* All phases have been processed.
|
|
47
|
-
* Actual transaction fee and actual total consumed gas can now be queried.
|
|
48
|
-
*/
|
|
49
|
-
halt(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Revert execution a phase. Populate revertReason & revertCode.
|
|
52
|
-
* If in setup, throw an error (transaction will be thrown out).
|
|
53
|
-
* NOTE: this does not "halt" the entire transaction execution.
|
|
54
|
-
*/
|
|
55
|
-
revert(phase: TxExecutionPhase, revertReason?: SimulationError | undefined, culprit?: string): void;
|
|
56
|
-
/**
|
|
57
|
-
* Get the revert code.
|
|
58
|
-
* @returns The revert code.
|
|
59
|
-
*/
|
|
60
|
-
getFinalRevertCode(): RevertCode;
|
|
61
|
-
/**
|
|
62
|
-
* Are there any call requests for the speciiied phase?
|
|
63
|
-
*/
|
|
64
|
-
hasPhase(phase: TxExecutionPhase): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Get the call requests for the specified phase (including args hashes).
|
|
67
|
-
*/
|
|
68
|
-
getCallRequestsForPhase(phase: TxExecutionPhase): PublicCallRequestWithCalldata[];
|
|
69
|
-
/**
|
|
70
|
-
* How much gas is left as of the specified phase?
|
|
71
|
-
*/
|
|
72
|
-
getGasLeftAtPhase(phase: TxExecutionPhase): Gas;
|
|
73
|
-
/**
|
|
74
|
-
* Consume gas. Track gas for teardown phase separately.
|
|
75
|
-
*/
|
|
76
|
-
consumeGas(phase: TxExecutionPhase, gas: Gas): void;
|
|
77
|
-
/**
|
|
78
|
-
* The gasUsed by public and private,
|
|
79
|
-
* as if the entire teardown gas limit was consumed.
|
|
80
|
-
*/
|
|
81
|
-
getTotalGasUsed(): Gas;
|
|
82
|
-
/**
|
|
83
|
-
* Compute the gas used using the actual gas used during teardown instead
|
|
84
|
-
* of the teardown gas limit.
|
|
85
|
-
* Note that this.gasUsed is initialized from private's gasUsed which includes
|
|
86
|
-
* teardown gas limit.
|
|
87
|
-
*/
|
|
88
|
-
getActualGasUsed(): Gas;
|
|
89
|
-
/**
|
|
90
|
-
* Compute the public gas used using the actual gas used during teardown instead
|
|
91
|
-
* of the teardown gas limit.
|
|
92
|
-
*/
|
|
93
|
-
getActualPublicGasUsed(): Gas;
|
|
94
|
-
/**
|
|
95
|
-
* Get the transaction fee as is available to the specified phase.
|
|
96
|
-
* Only teardown should have access to the actual transaction fee.
|
|
97
|
-
*/
|
|
98
|
-
getTransactionFee(phase: TxExecutionPhase): Fr;
|
|
99
|
-
/**
|
|
100
|
-
* Compute the transaction fee.
|
|
101
|
-
* Should only be called during or after teardown.
|
|
102
|
-
*/
|
|
103
|
-
private getTransactionFeeUnsafe;
|
|
104
|
-
/**
|
|
105
|
-
* Generate the public inputs for the AVM circuit.
|
|
106
|
-
*/
|
|
107
|
-
generateAvmCircuitPublicInputs(): Promise<AvmCircuitPublicInputs>;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Thin wrapper around the state manager to handle forking and merging for phases.
|
|
111
|
-
*
|
|
112
|
-
* This lets us keep track of whether the state has already been forked
|
|
113
|
-
* so that we can conditionally fork at the start of a phase.
|
|
114
|
-
*
|
|
115
|
-
* There is a state manager that lives at the level of the entire transaction,
|
|
116
|
-
* but for app logic and teardown the active state manager will be a fork of the
|
|
117
|
-
* transaction level one.
|
|
118
|
-
*/
|
|
119
|
-
declare class PhaseStateManager {
|
|
120
|
-
private readonly txStateManager;
|
|
121
|
-
private log;
|
|
122
|
-
private currentlyActiveStateManager;
|
|
123
|
-
constructor(txStateManager: PublicPersistableStateManager, bindings?: LoggerBindings);
|
|
124
|
-
fork(): Promise<void>;
|
|
125
|
-
getActiveStateManager(): PublicPersistableStateManager;
|
|
126
|
-
isForked(): boolean;
|
|
127
|
-
mergeForkedState(): Promise<void>;
|
|
128
|
-
discardForkedState(): Promise<void>;
|
|
129
|
-
}
|
|
130
|
-
export {};
|
|
131
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX3R4X2NvbnRleHQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wdWJsaWMvcHVibGljX3R4X3NpbXVsYXRvci9wdWJsaWNfdHhfY29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxFQUFlLEtBQUssY0FBYyxFQUFnQixNQUFNLHVCQUF1QixDQUFDO0FBQ3ZGLE9BQU8sRUFHTCxzQkFBc0IsRUFFdEIsVUFBVSxFQUNYLE1BQU0sbUJBQW1CLENBQUM7QUFDM0IsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxFQUE2QixLQUFLLHNCQUFzQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDaEcsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFNUQsT0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