@aztec/simulator 2.1.0-rc.9 → 3.0.0-devnet.2

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.
Files changed (161) hide show
  1. package/dest/private/acvm_native.d.ts +1 -2
  2. package/dest/private/acvm_native.d.ts.map +1 -1
  3. package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts +1 -1
  4. package/dest/private/circuit_recording/simulator_recorder_wrapper.d.ts.map +1 -1
  5. package/dest/public/avm/avm_execution_environment.d.ts +2 -1
  6. package/dest/public/avm/avm_execution_environment.d.ts.map +1 -1
  7. package/dest/public/avm/avm_execution_environment.js +5 -2
  8. package/dest/public/avm/avm_gas.js +2 -2
  9. package/dest/public/avm/avm_simulator.d.ts +1 -1
  10. package/dest/public/avm/avm_simulator.d.ts.map +1 -1
  11. package/dest/public/avm/avm_simulator.js +14 -21
  12. package/dest/public/avm/errors.d.ts +5 -14
  13. package/dest/public/avm/errors.d.ts.map +1 -1
  14. package/dest/public/avm/errors.js +7 -20
  15. package/dest/public/avm/fixtures/avm_simulation_tester.d.ts +2 -1
  16. package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +1 -1
  17. package/dest/public/avm/fixtures/avm_simulation_tester.js +2 -3
  18. package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts +2 -0
  19. package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +1 -1
  20. package/dest/public/avm/fixtures/base_avm_simulation_tester.js +22 -0
  21. package/dest/public/avm/fixtures/initializers.d.ts.map +1 -1
  22. package/dest/public/avm/fixtures/initializers.js +2 -2
  23. package/dest/public/avm/opcodes/accrued_substate.d.ts +2 -2
  24. package/dest/public/avm/opcodes/accrued_substate.d.ts.map +1 -1
  25. package/dest/public/avm/opcodes/accrued_substate.js +7 -7
  26. package/dest/public/avm/opcodes/addressing_mode.d.ts.map +1 -1
  27. package/dest/public/avm/opcodes/addressing_mode.js +2 -3
  28. package/dest/public/avm/opcodes/conversion.d.ts.map +1 -1
  29. package/dest/public/avm/opcodes/conversion.js +3 -0
  30. package/dest/public/avm/opcodes/ec_add.d.ts.map +1 -1
  31. package/dest/public/avm/opcodes/ec_add.js +3 -2
  32. package/dest/public/avm/opcodes/environment_getters.d.ts.map +1 -1
  33. package/dest/public/avm/opcodes/environment_getters.js +5 -7
  34. package/dest/public/avm/opcodes/instruction.d.ts.map +1 -1
  35. package/dest/public/avm/opcodes/instruction.js +5 -6
  36. package/dest/public/avm/opcodes/misc.d.ts +2 -1
  37. package/dest/public/avm/opcodes/misc.d.ts.map +1 -1
  38. package/dest/public/avm/opcodes/misc.js +28 -8
  39. package/dest/public/avm/serialization/instruction_serialization.d.ts +8 -0
  40. package/dest/public/avm/serialization/instruction_serialization.d.ts.map +1 -1
  41. package/dest/public/avm/serialization/instruction_serialization.js +10 -0
  42. package/dest/public/avm/test_utils.d.ts +2 -2
  43. package/dest/public/avm/test_utils.d.ts.map +1 -1
  44. package/dest/public/avm/test_utils.js +6 -9
  45. package/dest/public/fixtures/bulk_test.d.ts.map +1 -1
  46. package/dest/public/fixtures/bulk_test.js +63 -130
  47. package/dest/public/fixtures/custom_bytecode_tester.d.ts +12 -0
  48. package/dest/public/fixtures/custom_bytecode_tester.d.ts.map +1 -0
  49. package/dest/public/fixtures/custom_bytecode_tester.js +29 -0
  50. package/dest/public/fixtures/custom_bytecode_tests.d.ts +9 -0
  51. package/dest/public/fixtures/custom_bytecode_tests.d.ts.map +1 -0
  52. package/dest/public/fixtures/custom_bytecode_tests.js +109 -0
  53. package/dest/public/fixtures/index.d.ts +2 -1
  54. package/dest/public/fixtures/index.d.ts.map +1 -1
  55. package/dest/public/fixtures/index.js +2 -1
  56. package/dest/public/fixtures/minimal_public_tx.d.ts +2 -1
  57. package/dest/public/fixtures/minimal_public_tx.d.ts.map +1 -1
  58. package/dest/public/fixtures/minimal_public_tx.js +8 -22
  59. package/dest/public/fixtures/public_tx_simulation_tester.d.ts +4 -2
  60. package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +1 -1
  61. package/dest/public/fixtures/public_tx_simulation_tester.js +11 -6
  62. package/dest/public/fixtures/utils.js +1 -1
  63. package/dest/public/hinting_db_sources.d.ts +2 -0
  64. package/dest/public/hinting_db_sources.d.ts.map +1 -1
  65. package/dest/public/hinting_db_sources.js +3 -0
  66. package/dest/public/index.d.ts +1 -1
  67. package/dest/public/index.d.ts.map +1 -1
  68. package/dest/public/public_db_sources.d.ts +2 -2
  69. package/dest/public/public_db_sources.d.ts.map +1 -1
  70. package/dest/public/public_db_sources.js +11 -1
  71. package/dest/public/public_errors.d.ts +12 -0
  72. package/dest/public/public_errors.d.ts.map +1 -0
  73. package/dest/public/public_errors.js +13 -0
  74. package/dest/public/public_processor/guarded_merkle_tree.d.ts +2 -0
  75. package/dest/public/public_processor/guarded_merkle_tree.d.ts.map +1 -1
  76. package/dest/public/public_processor/guarded_merkle_tree.js +3 -0
  77. package/dest/public/public_processor/public_processor.d.ts +9 -4
  78. package/dest/public/public_processor/public_processor.d.ts.map +1 -1
  79. package/dest/public/public_processor/public_processor.js +12 -6
  80. package/dest/public/public_tx_simulator/cpp_public_tx_simulator.d.ts +41 -0
  81. package/dest/public/public_tx_simulator/cpp_public_tx_simulator.d.ts.map +1 -0
  82. package/dest/public/public_tx_simulator/cpp_public_tx_simulator.js +89 -0
  83. package/dest/public/public_tx_simulator/index.d.ts +1 -0
  84. package/dest/public/public_tx_simulator/index.d.ts.map +1 -1
  85. package/dest/public/public_tx_simulator/measured_public_tx_simulator.d.ts +5 -4
  86. package/dest/public/public_tx_simulator/measured_public_tx_simulator.d.ts.map +1 -1
  87. package/dest/public/public_tx_simulator/measured_public_tx_simulator.js +3 -4
  88. package/dest/public/public_tx_simulator/public_tx_context.d.ts +4 -2
  89. package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +1 -1
  90. package/dest/public/public_tx_simulator/public_tx_context.js +12 -8
  91. package/dest/public/public_tx_simulator/public_tx_simulator.d.ts +24 -11
  92. package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +1 -1
  93. package/dest/public/public_tx_simulator/public_tx_simulator.js +112 -44
  94. package/dest/public/public_tx_simulator/public_tx_simulator_interface.d.ts +9 -0
  95. package/dest/public/public_tx_simulator/public_tx_simulator_interface.d.ts.map +1 -0
  96. package/dest/public/public_tx_simulator/public_tx_simulator_interface.js +1 -0
  97. package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.d.ts +2 -1
  98. package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.d.ts.map +1 -1
  99. package/dest/public/public_tx_simulator/telemetry_public_tx_simulator.js +2 -2
  100. package/dest/public/side_effect_errors.d.ts +41 -1
  101. package/dest/public/side_effect_errors.d.ts.map +1 -1
  102. package/dest/public/side_effect_errors.js +70 -1
  103. package/dest/public/side_effect_trace.d.ts +11 -4
  104. package/dest/public/side_effect_trace.d.ts.map +1 -1
  105. package/dest/public/side_effect_trace.js +35 -20
  106. package/dest/public/side_effect_trace_interface.d.ts +6 -0
  107. package/dest/public/side_effect_trace_interface.d.ts.map +1 -1
  108. package/dest/public/state_manager/nullifiers.d.ts +0 -3
  109. package/dest/public/state_manager/nullifiers.d.ts.map +1 -1
  110. package/dest/public/state_manager/nullifiers.js +1 -6
  111. package/dest/public/state_manager/state_manager.d.ts +7 -2
  112. package/dest/public/state_manager/state_manager.d.ts.map +1 -1
  113. package/dest/public/state_manager/state_manager.js +54 -15
  114. package/package.json +21 -17
  115. package/src/private/acvm_native.ts +1 -2
  116. package/src/private/circuit_recording/simulator_recorder_wrapper.ts +1 -1
  117. package/src/public/avm/avm_execution_environment.ts +4 -1
  118. package/src/public/avm/avm_gas.ts +2 -2
  119. package/src/public/avm/avm_simulator.ts +16 -27
  120. package/src/public/avm/errors.ts +7 -24
  121. package/src/public/avm/fixtures/avm_simulation_tester.ts +4 -2
  122. package/src/public/avm/fixtures/base_avm_simulation_tester.ts +32 -0
  123. package/src/public/avm/fixtures/initializers.ts +2 -1
  124. package/src/public/avm/opcodes/accrued_substate.ts +4 -4
  125. package/src/public/avm/opcodes/addressing_mode.ts +3 -3
  126. package/src/public/avm/opcodes/conversion.ts +4 -0
  127. package/src/public/avm/opcodes/ec_add.ts +3 -2
  128. package/src/public/avm/opcodes/environment_getters.ts +6 -8
  129. package/src/public/avm/opcodes/instruction.ts +8 -6
  130. package/src/public/avm/opcodes/misc.ts +41 -7
  131. package/src/public/avm/serialization/instruction_serialization.ts +12 -0
  132. package/src/public/avm/test_utils.ts +6 -14
  133. package/src/public/fixtures/bulk_test.ts +41 -23
  134. package/src/public/fixtures/custom_bytecode_tester.ts +49 -0
  135. package/src/public/fixtures/custom_bytecode_tests.ts +135 -0
  136. package/src/public/fixtures/index.ts +2 -1
  137. package/src/public/fixtures/minimal_public_tx.ts +8 -31
  138. package/src/public/fixtures/public_tx_simulation_tester.ts +16 -12
  139. package/src/public/fixtures/utils.ts +1 -1
  140. package/src/public/hinting_db_sources.ts +5 -0
  141. package/src/public/index.ts +6 -1
  142. package/src/public/public_db_sources.ts +19 -3
  143. package/src/public/public_errors.ts +14 -0
  144. package/src/public/public_processor/guarded_merkle_tree.ts +4 -0
  145. package/src/public/public_processor/public_processor.ts +23 -25
  146. package/src/public/public_tx_simulator/cpp_public_tx_simulator.ts +128 -0
  147. package/src/public/public_tx_simulator/index.ts +1 -0
  148. package/src/public/public_tx_simulator/measured_public_tx_simulator.ts +12 -9
  149. package/src/public/public_tx_simulator/public_tx_context.ts +11 -4
  150. package/src/public/public_tx_simulator/public_tx_simulator.ts +178 -60
  151. package/src/public/public_tx_simulator/public_tx_simulator_interface.ts +11 -0
  152. package/src/public/public_tx_simulator/telemetry_public_tx_simulator.ts +3 -12
  153. package/src/public/side_effect_errors.ts +91 -1
  154. package/src/public/side_effect_trace.ts +48 -23
  155. package/src/public/side_effect_trace_interface.ts +6 -0
  156. package/src/public/state_manager/nullifiers.ts +1 -7
  157. package/src/public/state_manager/state_manager.ts +73 -25
  158. package/dest/public/bytecode_errors.d.ts +0 -4
  159. package/dest/public/bytecode_errors.d.ts.map +0 -1
  160. package/dest/public/bytecode_errors.js +0 -6
  161. package/src/public/bytecode_errors.ts +0 -6
@@ -0,0 +1,41 @@
1
+ import { type Logger } from '@aztec/foundation/log';
2
+ import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
3
+ import type { GlobalVariables, Tx } from '@aztec/stdlib/tx';
4
+ import type { ExecutorMetricsInterface } from '../executor_metrics_interface.js';
5
+ import type { PublicContractsDB } from '../public_db_sources.js';
6
+ import { type PublicTxResult, PublicTxSimulator, type PublicTxSimulatorConfig } from './public_tx_simulator.js';
7
+ import type { MeasuredPublicTxSimulatorInterface, PublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
8
+ /**
9
+ * C++ implementation of PublicTxSimulator using pre-collected hints.
10
+ * This implementation runs TS simulation first to collect all hints,
11
+ * then passes the complete AvmCircuitInputs (hints + public inputs)
12
+ * to C++ to run hinted simulation.
13
+ */
14
+ export declare class CppPublicTxSimulatorHintedDbs extends PublicTxSimulator implements PublicTxSimulatorInterface {
15
+ protected log: Logger;
16
+ constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, config?: Partial<PublicTxSimulatorConfig>);
17
+ /**
18
+ * Simulate a transaction's public portion using the C++ vm2 simulator with hinted DBs.
19
+ *
20
+ * This implementation:
21
+ * 1. Runs the full TypeScript simulation to generate AvmCircuitInputs (hints + public inputs)
22
+ * 2. Passes the complete AvmCircuitInputs to C++ to run hinted simulation
23
+ *
24
+ * @param tx - The transaction to simulate.
25
+ * @returns The result of the transaction's public execution.
26
+ */
27
+ simulate(tx: Tx): Promise<PublicTxResult>;
28
+ }
29
+ /**
30
+ * Class to record metrics for simulation.
31
+ *
32
+ * Note(dbanks12): We might not be able to collect all the same metrics in C++ as we do in TS!
33
+ * Unless we move some of the metrics collection to C++, we don't have inner functions exposed
34
+ * to TS for tracking.
35
+ */
36
+ export declare class MeasuredCppPublicTxSimulatorHintedDbs extends CppPublicTxSimulatorHintedDbs implements MeasuredPublicTxSimulatorInterface {
37
+ protected readonly metrics: ExecutorMetricsInterface;
38
+ constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, metrics: ExecutorMetricsInterface, config?: Partial<PublicTxSimulatorConfig>);
39
+ simulate(tx: Tx, txLabel?: string): Promise<PublicTxResult>;
40
+ }
41
+ //# sourceMappingURL=cpp_public_tx_simulator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cpp_public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/cpp_public_tx_simulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,KAAK,cAAc,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAChH,OAAO,KAAK,EACV,kCAAkC,EAClC,0BAA0B,EAC3B,MAAM,oCAAoC,CAAC;AAE5C;;;;;GAKG;AACH,qBAAa,6BAA8B,SAAQ,iBAAkB,YAAW,0BAA0B;IACxG,UAAmB,GAAG,EAAE,MAAM,CAAC;gBAG7B,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EAChC,MAAM,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC;IAM3C;;;;;;;;;OASG;IACmB,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;CAkDhE;AAED;;;;;;GAMG;AACH,qBAAa,qCACX,SAAQ,6BACR,YAAW,kCAAkC;IAM3C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,wBAAwB;gBAHpD,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,iBAAiB,EAC9B,eAAe,EAAE,eAAe,EACb,OAAO,EAAE,wBAAwB,EACpD,MAAM,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC;IAKrB,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,cAAc,CAAC;CAUjG"}
@@ -0,0 +1,89 @@
1
+ import { createLogger } from '@aztec/foundation/log';
2
+ import { avmSimulateWithHintedDbs } from '@aztec/native';
3
+ import { deserializeFromMessagePack } from '@aztec/stdlib/avm';
4
+ import { SimulationError } from '@aztec/stdlib/errors';
5
+ import { PublicTxSimulator } from './public_tx_simulator.js';
6
+ /**
7
+ * C++ implementation of PublicTxSimulator using pre-collected hints.
8
+ * This implementation runs TS simulation first to collect all hints,
9
+ * then passes the complete AvmCircuitInputs (hints + public inputs)
10
+ * to C++ to run hinted simulation.
11
+ */ export class CppPublicTxSimulatorHintedDbs extends PublicTxSimulator {
12
+ log;
13
+ constructor(merkleTree, contractsDB, globalVariables, config){
14
+ super(merkleTree, contractsDB, globalVariables, config);
15
+ this.log = createLogger(`simulator:cpp_public_tx_simulator_hinted_dbs`);
16
+ }
17
+ /**
18
+ * Simulate a transaction's public portion using the C++ vm2 simulator with hinted DBs.
19
+ *
20
+ * This implementation:
21
+ * 1. Runs the full TypeScript simulation to generate AvmCircuitInputs (hints + public inputs)
22
+ * 2. Passes the complete AvmCircuitInputs to C++ to run hinted simulation
23
+ *
24
+ * @param tx - The transaction to simulate.
25
+ * @returns The result of the transaction's public execution.
26
+ */ async simulate(tx) {
27
+ const txHash = this.computeTxHash(tx);
28
+ this.log.debug(`C++ hinted DB simulation of ${tx.publicFunctionCalldata.length} public calls for tx ${txHash}`, {
29
+ txHash
30
+ });
31
+ // First, run TS simulation to generate hints and public inputs
32
+ this.log.debug(`Running TS simulation for tx ${txHash}`);
33
+ let tsResult;
34
+ try {
35
+ // Run the full TypeScript simulation using the parent class
36
+ // This will modify the merkle tree with the transaction's state changes
37
+ tsResult = await super.simulate(tx);
38
+ this.log.debug(`TS simulation succeeded for tx ${txHash}`);
39
+ } catch (error) {
40
+ // If TS simulation fails, clear any partial contract additions and re-throw the error
41
+ this.contractsDB.clearContractsForTx();
42
+ throw error;
43
+ }
44
+ // Extract the full AvmCircuitInputs from the TS result
45
+ const avmCircuitInputs = tsResult.avmProvingRequest.inputs;
46
+ // Second, run C++ simulation with hinted DBs
47
+ this.log.debug(`Running C++ simulation with hinted DBs for tx ${txHash}`);
48
+ // Serialize to msgpack and call the C++ simulator
49
+ const inputBuffer = avmCircuitInputs.serializeWithMessagePack();
50
+ let resultBuffer;
51
+ try {
52
+ resultBuffer = await avmSimulateWithHintedDbs(inputBuffer);
53
+ } catch (error) {
54
+ throw new SimulationError(`C++ hinted simulation failed: ${error.message}`, []);
55
+ }
56
+ // Deserialize the msgpack result
57
+ const _success = deserializeFromMessagePack(resultBuffer);
58
+ this.log.debug(`C++ hinted simulation completed for tx ${txHash}`, {
59
+ txHash,
60
+ reverted: !tsResult.revertCode.isOK(),
61
+ tsGasUsed: tsResult.gasUsed.totalGas.l2Gas,
62
+ cppGasUsed: tsResult.gasUsed.totalGas.l2Gas
63
+ });
64
+ // TODO(dbanks12): C++ should return PublicTxResult (or something similar)
65
+ return tsResult;
66
+ }
67
+ }
68
+ /**
69
+ * Class to record metrics for simulation.
70
+ *
71
+ * Note(dbanks12): We might not be able to collect all the same metrics in C++ as we do in TS!
72
+ * Unless we move some of the metrics collection to C++, we don't have inner functions exposed
73
+ * to TS for tracking.
74
+ */ export class MeasuredCppPublicTxSimulatorHintedDbs extends CppPublicTxSimulatorHintedDbs {
75
+ metrics;
76
+ constructor(merkleTree, contractsDB, globalVariables, metrics, config){
77
+ super(merkleTree, contractsDB, globalVariables, config), this.metrics = metrics;
78
+ }
79
+ async simulate(tx, txLabel = 'unlabeledTx') {
80
+ this.metrics.startRecordingTxSimulation(txLabel);
81
+ let result;
82
+ try {
83
+ result = await super.simulate(tx);
84
+ } finally{
85
+ this.metrics.stopRecordingTxSimulation(txLabel, result?.revertCode);
86
+ }
87
+ return result;
88
+ }
89
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './public_tx_simulator.js';
2
+ export type { PublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
2
3
  export { TelemetryPublicTxSimulator } from './telemetry_public_tx_simulator.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,YAAY,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC"}
@@ -7,16 +7,17 @@ import type { ExecutorMetricsInterface } from '../executor_metrics_interface.js'
7
7
  import type { PublicContractsDB } from '../public_db_sources.js';
8
8
  import type { PublicPersistableStateManager } from '../state_manager/state_manager.js';
9
9
  import { PublicTxContext } from './public_tx_context.js';
10
- import { type ProcessedPhase, type PublicTxResult, PublicTxSimulator } from './public_tx_simulator.js';
10
+ import { type ProcessedPhase, type PublicTxResult, PublicTxSimulator, type PublicTxSimulatorConfig } from './public_tx_simulator.js';
11
+ import type { MeasuredPublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
11
12
  /**
12
13
  * A public tx simulator that tracks miscellaneous simulation metrics without telemetry.
13
14
  */
14
- export declare class MeasuredPublicTxSimulator extends PublicTxSimulator {
15
+ export declare class MeasuredPublicTxSimulator extends PublicTxSimulator implements MeasuredPublicTxSimulatorInterface {
15
16
  protected readonly metrics: ExecutorMetricsInterface;
16
- constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, doMerkleOperations: boolean | undefined, skipFeeEnforcement: boolean | undefined, clientInitiatedSimulation: boolean | undefined, metrics: ExecutorMetricsInterface);
17
+ constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, metrics: ExecutorMetricsInterface, config?: Partial<PublicTxSimulatorConfig>);
17
18
  simulate(tx: Tx, txLabel?: string): Promise<PublicTxResult>;
18
19
  protected insertNonRevertiblesFromPrivate(context: PublicTxContext, tx: Tx): Promise<void>;
19
- protected insertRevertiblesFromPrivate(context: PublicTxContext, tx: Tx): Promise<boolean>;
20
+ protected insertRevertiblesFromPrivate(context: PublicTxContext, tx: Tx): Promise<void>;
20
21
  protected simulatePhase(phase: TxExecutionPhase, context: PublicTxContext): Promise<ProcessedPhase>;
21
22
  protected simulateEnqueuedCallInternal(stateManager: PublicPersistableStateManager, callRequest: PublicCallRequestWithCalldata, allocatedGas: Gas, transactionFee: Fr, fnName: string): Promise<AvmFinalizedCallResult>;
22
23
  }
@@ -1 +1 @@
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,0BAA0B,CAAC;AAEnD,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,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,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE;cAM7D,aAAa,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC;cAOzF,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;CAsCnC"}
@@ -4,8 +4,8 @@ import { PublicTxSimulator } from './public_tx_simulator.js';
4
4
  * A public tx simulator that tracks miscellaneous simulation metrics without telemetry.
5
5
  */ export class MeasuredPublicTxSimulator extends PublicTxSimulator {
6
6
  metrics;
7
- constructor(merkleTree, contractsDB, globalVariables, doMerkleOperations = false, skipFeeEnforcement = false, clientInitiatedSimulation = false, metrics){
8
- super(merkleTree, contractsDB, globalVariables, doMerkleOperations, skipFeeEnforcement, clientInitiatedSimulation), this.metrics = metrics;
7
+ constructor(merkleTree, contractsDB, globalVariables, metrics, config){
8
+ super(merkleTree, contractsDB, globalVariables, config), this.metrics = metrics;
9
9
  }
10
10
  async simulate(tx, txLabel = 'unlabeledTx') {
11
11
  this.metrics.startRecordingTxSimulation(txLabel);
@@ -24,9 +24,8 @@ import { PublicTxSimulator } from './public_tx_simulator.js';
24
24
  }
25
25
  async insertRevertiblesFromPrivate(context, tx) {
26
26
  const timer = new Timer();
27
- const result = await super.insertRevertiblesFromPrivate(context, tx);
27
+ await super.insertRevertiblesFromPrivate(context, tx);
28
28
  this.metrics.recordPrivateEffectsInsertion(timer.us(), 'revertible');
29
- return result;
30
29
  }
31
30
  async simulatePhase(phase, context) {
32
31
  const timer = new Timer();
@@ -4,7 +4,7 @@ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { SimulationError } from '@aztec/stdlib/errors';
5
5
  import { Gas } from '@aztec/stdlib/gas';
6
6
  import { PrivateToPublicAccumulatedData } from '@aztec/stdlib/kernel';
7
- import { type GlobalVariables, PublicCallRequestWithCalldata, type Tx, TxExecutionPhase, type TxHash } from '@aztec/stdlib/tx';
7
+ import { type GlobalVariables, ProtocolContracts, PublicCallRequestWithCalldata, type Tx, TxExecutionPhase, type TxHash } from '@aztec/stdlib/tx';
8
8
  import type { PublicContractsDBInterface } from '../db_interfaces.js';
9
9
  import type { PublicTreesDB } from '../public_db_sources.js';
10
10
  import { PublicPersistableStateManager } from '../state_manager/state_manager.js';
@@ -16,6 +16,8 @@ export declare class PublicTxContext {
16
16
  readonly state: PhaseStateManager;
17
17
  private readonly startTreeSnapshots;
18
18
  private readonly globalVariables;
19
+ private readonly protocolContracts;
20
+ private readonly proverId;
19
21
  private readonly gasSettings;
20
22
  private readonly gasUsedByPrivate;
21
23
  private readonly gasAllocatedToPublic;
@@ -34,7 +36,7 @@ export declare class PublicTxContext {
34
36
  private revertCode;
35
37
  revertReason: SimulationError | undefined;
36
38
  private constructor();
37
- static create(treesDB: PublicTreesDB, contractsDB: PublicContractsDBInterface, tx: Tx, globalVariables: GlobalVariables, doMerkleOperations: boolean): Promise<PublicTxContext>;
39
+ static create(treesDB: PublicTreesDB, contractsDB: PublicContractsDBInterface, tx: Tx, globalVariables: GlobalVariables, protocolContracts: ProtocolContracts, doMerkleOperations: boolean, proverId: Fr): Promise<PublicTxContext>;
38
40
  /**
39
41
  * Signal that the entire transaction execution is done.
40
42
  * All phases have been processed.
@@ -1 +1 @@
1
- {"version":3,"file":"public_tx_context.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_context.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAGL,sBAAsB,EAEtB,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB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AAQ,CAAC,cAAc;IAJ3C,OAAO,CAAC,GAAG,CAAS;IAEpB,OAAO,CAAC,2BAA2B,CAA4C;gBAElD,cAAc,EAAE,6BAA6B;IAIpE,IAAI;IAMV,qBAAqB;IAIrB,QAAQ;IAIF,gBAAgB;IAQhB,kBAAkB;CAOzB"}
@@ -1,4 +1,4 @@
1
- import { MAX_ENQUEUED_CALLS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PUBLIC_LOGS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX } from '@aztec/constants';
1
+ import { MAX_ENQUEUED_CALLS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX } from '@aztec/constants';
2
2
  import { padArrayEnd } from '@aztec/foundation/collection';
3
3
  import { Fr } from '@aztec/foundation/fields';
4
4
  import { createLogger } from '@aztec/foundation/log';
@@ -6,7 +6,7 @@ import { AvmAccumulatedData, AvmAccumulatedDataArrayLengths, AvmCircuitPublicInp
6
6
  import { computeEffectiveGasFees, computeTransactionFee } from '@aztec/stdlib/fees';
7
7
  import { Gas } from '@aztec/stdlib/gas';
8
8
  import { PrivateToAvmAccumulatedData, PrivateToAvmAccumulatedDataArrayLengths, PublicCallRequest, PublicCallRequestArrayLengths, countAccumulatedItems } from '@aztec/stdlib/kernel';
9
- import { PublicLog } from '@aztec/stdlib/logs';
9
+ import { FlatPublicLogs } from '@aztec/stdlib/logs';
10
10
  import { ScopedL2ToL1Message } from '@aztec/stdlib/messaging';
11
11
  import { MerkleTreeId } from '@aztec/stdlib/trees';
12
12
  import { TxExecutionPhase } from '@aztec/stdlib/tx';
@@ -22,6 +22,8 @@ import { getCallRequestsWithCalldataByPhase } from '../utils.js';
22
22
  state;
23
23
  startTreeSnapshots;
24
24
  globalVariables;
25
+ protocolContracts;
26
+ proverId;
25
27
  gasSettings;
26
28
  gasUsedByPrivate;
27
29
  gasAllocatedToPublic;
@@ -39,11 +41,13 @@ import { getCallRequestsWithCalldataByPhase } from '../utils.js';
39
41
  /* Entire transaction execution is done. */ halted;
40
42
  /* Where did reverts happen (if at all)? */ revertCode;
41
43
  /* What caused a revert (if one occurred)? */ revertReason;
42
- constructor(txHash, state, startTreeSnapshots, globalVariables, gasSettings, gasUsedByPrivate, gasAllocatedToPublic, gasAllocatedToPublicTeardown, setupCallRequests, appLogicCallRequests, teardownCallRequests, nonRevertibleAccumulatedDataFromPrivate, revertibleAccumulatedDataFromPrivate, feePayer, trace){
44
+ constructor(txHash, state, startTreeSnapshots, globalVariables, protocolContracts, proverId, gasSettings, gasUsedByPrivate, gasAllocatedToPublic, gasAllocatedToPublicTeardown, setupCallRequests, appLogicCallRequests, teardownCallRequests, nonRevertibleAccumulatedDataFromPrivate, revertibleAccumulatedDataFromPrivate, feePayer, trace){
43
45
  this.txHash = txHash;
44
46
  this.state = state;
45
47
  this.startTreeSnapshots = startTreeSnapshots;
46
48
  this.globalVariables = globalVariables;
49
+ this.protocolContracts = protocolContracts;
50
+ this.proverId = proverId;
47
51
  this.gasSettings = gasSettings;
48
52
  this.gasUsedByPrivate = gasUsedByPrivate;
49
53
  this.gasAllocatedToPublic = gasAllocatedToPublic;
@@ -61,7 +65,7 @@ import { getCallRequestsWithCalldataByPhase } from '../utils.js';
61
65
  this.revertCode = RevertCode.OK;
62
66
  this.log = createLogger(`simulator:public_tx_context`);
63
67
  }
64
- static async create(treesDB, contractsDB, tx, globalVariables, doMerkleOperations) {
68
+ static async create(treesDB, contractsDB, tx, globalVariables, protocolContracts, doMerkleOperations, proverId) {
65
69
  const nonRevertibleAccumulatedDataFromPrivate = tx.data.forPublic.nonRevertibleAccumulatedData;
66
70
  const trace = new SideEffectTrace();
67
71
  const firstNullifier = nonRevertibleAccumulatedDataFromPrivate.nullifiers[0];
@@ -71,7 +75,7 @@ import { getCallRequestsWithCalldataByPhase } from '../utils.js';
71
75
  const gasUsedByPrivate = tx.data.gasUsed;
72
76
  const gasAllocatedToPublic = gasSettings.gasLimits.sub(gasUsedByPrivate);
73
77
  const gasAllocatedToPublicTeardown = gasSettings.teardownGasLimits;
74
- return new PublicTxContext(tx.getTxHash(), new PhaseStateManager(txStateManager), await txStateManager.getTreeSnapshots(), globalVariables, gasSettings, gasUsedByPrivate, gasAllocatedToPublic, gasAllocatedToPublicTeardown, getCallRequestsWithCalldataByPhase(tx, TxExecutionPhase.SETUP), getCallRequestsWithCalldataByPhase(tx, TxExecutionPhase.APP_LOGIC), getCallRequestsWithCalldataByPhase(tx, TxExecutionPhase.TEARDOWN), tx.data.forPublic.nonRevertibleAccumulatedData, tx.data.forPublic.revertibleAccumulatedData, tx.data.feePayer, trace);
78
+ return new PublicTxContext(tx.getTxHash(), new PhaseStateManager(txStateManager), await txStateManager.getTreeSnapshots(), globalVariables, protocolContracts, proverId, gasSettings, gasUsedByPrivate, gasAllocatedToPublic, gasAllocatedToPublicTeardown, getCallRequestsWithCalldataByPhase(tx, TxExecutionPhase.SETUP), getCallRequestsWithCalldataByPhase(tx, TxExecutionPhase.APP_LOGIC), getCallRequestsWithCalldataByPhase(tx, TxExecutionPhase.TEARDOWN), tx.data.forPublic.nonRevertibleAccumulatedData, tx.data.forPublic.revertibleAccumulatedData, tx.data.feePayer, trace);
75
79
  }
76
80
  /**
77
81
  * Signal that the entire transaction execution is done.
@@ -227,8 +231,8 @@ import { getCallRequestsWithCalldataByPhase } from '../utils.js';
227
231
  return Array.from(squashedPublicDataWrites.entries()).map(([slot, value])=>new PublicDataWrite(new Fr(slot), value));
228
232
  })();
229
233
  // Count before padding.
230
- const accumulatedDataArrayLengths = new AvmAccumulatedDataArrayLengths(avmNoteHashes.length, avmNullifiers.length, avmL2ToL1Msgs.length, finalPublicLogs.length, finalPublicDataWrites.length);
231
- const accumulatedData = new AvmAccumulatedData(/*noteHashes=*/ padArrayEnd(avmNoteHashes.map((n)=>n.value), Fr.zero(), MAX_NOTE_HASHES_PER_TX), /*nullifiers=*/ padArrayEnd(avmNullifiers.map((n)=>n.value), Fr.zero(), MAX_NULLIFIERS_PER_TX), /*l2ToL1Msgs=*/ padArrayEnd(avmL2ToL1Msgs, ScopedL2ToL1Message.empty(), MAX_L2_TO_L1_MSGS_PER_TX), /*publicLogs=*/ padArrayEnd(finalPublicLogs, PublicLog.empty(), MAX_PUBLIC_LOGS_PER_TX), /*publicDataWrites=*/ padArrayEnd(finalPublicDataWrites, PublicDataWrite.empty(), MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX));
234
+ const accumulatedDataArrayLengths = new AvmAccumulatedDataArrayLengths(avmNoteHashes.length, avmNullifiers.length, avmL2ToL1Msgs.length, finalPublicDataWrites.length);
235
+ const accumulatedData = new AvmAccumulatedData(/*noteHashes=*/ padArrayEnd(avmNoteHashes.map((n)=>n.value), Fr.zero(), MAX_NOTE_HASHES_PER_TX), /*nullifiers=*/ padArrayEnd(avmNullifiers.map((n)=>n.value), Fr.zero(), MAX_NULLIFIERS_PER_TX), /*l2ToL1Msgs=*/ padArrayEnd(avmL2ToL1Msgs, ScopedL2ToL1Message.empty(), MAX_L2_TO_L1_MSGS_PER_TX), /*publicLogs=*/ FlatPublicLogs.fromLogs(finalPublicLogs), /*publicDataWrites=*/ padArrayEnd(finalPublicDataWrites, PublicDataWrite.empty(), MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX));
232
236
  // Now we finally have enough information to pad the trees.
233
237
  // NOTE(fcarreiro): a bit weird that a method that generates the PIs does this,
234
238
  // but we do need the end tree snapshots. We can consider moving things to the caller.
@@ -240,7 +244,7 @@ import { getCallRequestsWithCalldataByPhase } from '../utils.js';
240
244
  // This converts the private accumulated data to the avm accumulated data format.
241
245
  const convertAccumulatedData = (from)=>new PrivateToAvmAccumulatedData(from.noteHashes, from.nullifiers, from.l2ToL1Msgs);
242
246
  const getPreviousAccumulatedDataArrayLengths = (from)=>new PrivateToAvmAccumulatedDataArrayLengths(countAccumulatedItems(from.noteHashes), countAccumulatedItems(from.nullifiers), countAccumulatedItems(from.l2ToL1Msgs));
243
- return new AvmCircuitPublicInputs(this.globalVariables, this.startTreeSnapshots, /*startGasUsed=*/ this.gasUsedByPrivate, this.gasSettings, computeEffectiveGasFees(this.globalVariables.gasFees, this.gasSettings), this.feePayer, /*publicCallRequestArrayLengths=*/ new PublicCallRequestArrayLengths(this.setupCallRequests.length, this.appLogicCallRequests.length, this.teardownCallRequests.length > 0), /*publicSetupCallRequests=*/ padArrayEnd(this.setupCallRequests.map((r)=>r.request), PublicCallRequest.empty(), MAX_ENQUEUED_CALLS_PER_TX), /*publicAppLogicCallRequests=*/ padArrayEnd(this.appLogicCallRequests.map((r)=>r.request), PublicCallRequest.empty(), MAX_ENQUEUED_CALLS_PER_TX), /*publicTeardownCallRequests=*/ this.teardownCallRequests.length > 0 ? this.teardownCallRequests[0].request : PublicCallRequest.empty(), getPreviousAccumulatedDataArrayLengths(this.nonRevertibleAccumulatedDataFromPrivate), getPreviousAccumulatedDataArrayLengths(this.revertibleAccumulatedDataFromPrivate), convertAccumulatedData(this.nonRevertibleAccumulatedDataFromPrivate), convertAccumulatedData(this.revertibleAccumulatedDataFromPrivate), endTreeSnapshots, this.getTotalGasUsed(), accumulatedDataArrayLengths, accumulatedData, /*transactionFee=*/ this.getTransactionFeeUnsafe(), /*isReverted=*/ !this.revertCode.isOK());
247
+ return new AvmCircuitPublicInputs(this.globalVariables, this.protocolContracts, this.startTreeSnapshots, /*startGasUsed=*/ this.gasUsedByPrivate, this.gasSettings, computeEffectiveGasFees(this.globalVariables.gasFees, this.gasSettings), this.feePayer, this.proverId, /*publicCallRequestArrayLengths=*/ new PublicCallRequestArrayLengths(this.setupCallRequests.length, this.appLogicCallRequests.length, this.teardownCallRequests.length > 0), /*publicSetupCallRequests=*/ padArrayEnd(this.setupCallRequests.map((r)=>r.request), PublicCallRequest.empty(), MAX_ENQUEUED_CALLS_PER_TX), /*publicAppLogicCallRequests=*/ padArrayEnd(this.appLogicCallRequests.map((r)=>r.request), PublicCallRequest.empty(), MAX_ENQUEUED_CALLS_PER_TX), /*publicTeardownCallRequests=*/ this.teardownCallRequests.length > 0 ? this.teardownCallRequests[0].request : PublicCallRequest.empty(), getPreviousAccumulatedDataArrayLengths(this.nonRevertibleAccumulatedDataFromPrivate), getPreviousAccumulatedDataArrayLengths(this.revertibleAccumulatedDataFromPrivate), convertAccumulatedData(this.nonRevertibleAccumulatedDataFromPrivate), convertAccumulatedData(this.revertibleAccumulatedDataFromPrivate), endTreeSnapshots, this.getTotalGasUsed(), accumulatedDataArrayLengths, accumulatedData, /*transactionFee=*/ this.getTransactionFeeUnsafe(), /*isReverted=*/ !this.revertCode.isOK());
244
248
  }
245
249
  }
246
250
  /**
@@ -1,14 +1,16 @@
1
- import type { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/fields';
2
2
  import { type Logger } from '@aztec/foundation/log';
3
3
  import { type AvmProvingRequest, type RevertCode } from '@aztec/stdlib/avm';
4
4
  import { SimulationError } from '@aztec/stdlib/errors';
5
5
  import type { Gas, GasUsed } from '@aztec/stdlib/gas';
6
+ import type { DebugLog } from '@aztec/stdlib/logs';
6
7
  import type { MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
7
8
  import { type GlobalVariables, NestedProcessReturnValues, PublicCallRequestWithCalldata, Tx, TxExecutionPhase } from '@aztec/stdlib/tx';
8
9
  import type { AvmFinalizedCallResult } from '../avm/avm_contract_call_result.js';
9
10
  import { type PublicContractsDB } from '../public_db_sources.js';
10
11
  import type { PublicPersistableStateManager } from '../state_manager/state_manager.js';
11
12
  import { PublicTxContext } from './public_tx_context.js';
13
+ import type { PublicTxSimulatorInterface } from './public_tx_simulator_interface.js';
12
14
  export type ProcessedPhase = {
13
15
  phase: TxExecutionPhase;
14
16
  durationMs?: number;
@@ -24,16 +26,22 @@ export type PublicTxResult = {
24
26
  /** Revert reason, if any */
25
27
  revertReason?: SimulationError;
26
28
  processedPhases: ProcessedPhase[];
29
+ logs: DebugLog[];
27
30
  };
28
- export declare class PublicTxSimulator {
29
- private merkleTree;
30
- private contractsDB;
31
- private globalVariables;
32
- private doMerkleOperations;
33
- private skipFeeEnforcement;
34
- private clientInitiatedSimulation;
31
+ export type PublicTxSimulatorConfig = {
32
+ proverId: Fr;
33
+ doMerkleOperations: boolean;
34
+ skipFeeEnforcement: boolean;
35
+ clientInitiatedSimulation: boolean;
36
+ maxDebugLogMemoryReads: number;
37
+ };
38
+ export declare class PublicTxSimulator implements PublicTxSimulatorInterface {
39
+ protected merkleTree: MerkleTreeWriteOperations;
40
+ protected contractsDB: PublicContractsDB;
41
+ protected globalVariables: GlobalVariables;
35
42
  protected log: Logger;
36
- constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, doMerkleOperations?: boolean, skipFeeEnforcement?: boolean, clientInitiatedSimulation?: boolean);
43
+ private config;
44
+ constructor(merkleTree: MerkleTreeWriteOperations, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, config?: Partial<PublicTxSimulatorConfig>);
37
45
  /**
38
46
  * Simulate a transaction's public portion including all of its phases.
39
47
  * @param tx - The transaction to simulate.
@@ -75,9 +83,14 @@ export declare class PublicTxSimulator {
75
83
  protected insertNonRevertiblesFromPrivate(context: PublicTxContext, tx: Tx): Promise<void>;
76
84
  /**
77
85
  * Insert the revertible accumulated data from private into the public state.
78
- * Start by forking state so we can rollback to the end of setup if app logic or teardown reverts.
86
+ * Throws TxSimRevertibleInsertionsRevert if there is some checked error during revertible insertions.
87
+ * This function checks for the following errors:
88
+ * - NullifierLimitReachedError
89
+ * - NullifierCollisionError
90
+ * - NoteHashLimitReachedError
91
+ * - L2ToL1MessageLimitReachedError
79
92
  */
80
- protected insertRevertiblesFromPrivate(context: PublicTxContext, tx: Tx): Promise<boolean>;
93
+ protected insertRevertiblesFromPrivate(context: PublicTxContext, tx: Tx): Promise<void>;
81
94
  private payFee;
82
95
  /**
83
96
  * Generate the proving request for the AVM circuit.
@@ -1 +1 @@
1
- {"version":3,"file":"public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_simulator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAIL,KAAK,iBAAiB,EAEtB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EACL,KAAK,eAAe,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,EAAE,EACF,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIjF,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,yBAAyB,EAAE,CAAC;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,+CAA+C;IAC/C,OAAO,E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ACa,4BAA4B,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,GAAgB,OAAO,CAAC,OAAO,CAAC;YAoC/F,MAAM;IAgCpB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAStC"}
1
+ {"version":3,"file":"public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAIL,KAAK,iBAAiB,EAEtB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EACL,KAAK,eAAe,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,EAAE,EACF,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIjF,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,yBAAyB,CAAC;AAOhF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAErF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,yBAAyB,EAAE,CAAC;I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