@aztec/simulator 0.73.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2

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 (309) hide show
  1. package/dest/acvm/acvm.js +18 -21
  2. package/dest/acvm/acvm_types.js +3 -2
  3. package/dest/acvm/deserialize.js +9 -13
  4. package/dest/acvm/index.js +0 -1
  5. package/dest/acvm/oracle/index.js +0 -1
  6. package/dest/acvm/oracle/oracle.js +42 -23
  7. package/dest/acvm/oracle/typed_oracle.js +36 -38
  8. package/dest/acvm/serialize.js +7 -14
  9. package/dest/avm/avm_context.js +24 -27
  10. package/dest/avm/avm_contract_call_result.js +12 -7
  11. package/dest/avm/avm_execution_environment.js +10 -7
  12. package/dest/avm/avm_gas.js +93 -56
  13. package/dest/avm/avm_machine_state.js +60 -61
  14. package/dest/avm/avm_memory_types.js +166 -255
  15. package/dest/avm/avm_simulator.js +68 -47
  16. package/dest/avm/avm_tree.js +282 -276
  17. package/dest/avm/bytecode_utils.js +8 -6
  18. package/dest/avm/errors.js +46 -63
  19. package/dest/avm/fixtures/avm_simulation_tester.js +20 -20
  20. package/dest/avm/fixtures/base_avm_simulation_tester.js +21 -16
  21. package/dest/avm/fixtures/index.js +49 -22
  22. package/dest/avm/fixtures/simple_contract_data_source.js +9 -13
  23. package/dest/avm/index.js +0 -1
  24. package/dest/avm/journal/index.js +0 -1
  25. package/dest/avm/journal/journal.js +147 -200
  26. package/dest/avm/journal/nullifiers.js +43 -46
  27. package/dest/avm/journal/public_storage.js +73 -87
  28. package/dest/avm/opcodes/accrued_substate.js +140 -110
  29. package/dest/avm/opcodes/addressing_mode.js +29 -31
  30. package/dest/avm/opcodes/arithmetic.js +17 -15
  31. package/dest/avm/opcodes/bitwise.js +40 -26
  32. package/dest/avm/opcodes/comparators.js +12 -10
  33. package/dest/avm/opcodes/contract.js +31 -29
  34. package/dest/avm/opcodes/control_flow.js +47 -43
  35. package/dest/avm/opcodes/conversion.js +30 -26
  36. package/dest/avm/opcodes/ec_add.js +35 -34
  37. package/dest/avm/opcodes/environment_getters.js +33 -33
  38. package/dest/avm/opcodes/external_calls.js +83 -74
  39. package/dest/avm/opcodes/hashing.js +69 -61
  40. package/dest/avm/opcodes/index.js +0 -1
  41. package/dest/avm/opcodes/instruction.js +31 -40
  42. package/dest/avm/opcodes/instruction_impl.js +12 -15
  43. package/dest/avm/opcodes/memory.js +177 -156
  44. package/dest/avm/opcodes/misc.js +27 -25
  45. package/dest/avm/opcodes/multi_scalar_mul.js +43 -41
  46. package/dest/avm/opcodes/storage.js +28 -25
  47. package/dest/avm/serialization/buffer_cursor.js +4 -4
  48. package/dest/avm/serialization/bytecode_serialization.js +292 -89
  49. package/dest/avm/serialization/instruction_serialization.js +67 -28
  50. package/dest/avm/test_utils.js +6 -9
  51. package/dest/client/client_execution_context.js +197 -219
  52. package/dest/client/db_oracle.js +4 -7
  53. package/dest/client/execution_note_cache.js +80 -81
  54. package/dest/client/index.js +0 -1
  55. package/dest/client/pick_notes.js +27 -30
  56. package/dest/client/private_execution.js +13 -14
  57. package/dest/client/simulator.js +44 -48
  58. package/dest/client/unconstrained_execution.js +8 -11
  59. package/dest/client/view_data_oracle.js +130 -139
  60. package/dest/common/debug_fn_name.js +1 -4
  61. package/dest/common/errors.js +30 -39
  62. package/dest/common/hashed_values_cache.js +16 -20
  63. package/dest/common/index.js +0 -1
  64. package/dest/common/message_load_oracle_inputs.js +7 -7
  65. package/dest/common/simulation_provider.js +3 -6
  66. package/dest/common.js +0 -1
  67. package/dest/providers/acvm_native.js +46 -32
  68. package/dest/providers/acvm_wasm.js +18 -10
  69. package/dest/providers/acvm_wasm_with_blobs.js +2 -5
  70. package/dest/providers/factory.js +5 -5
  71. package/dest/providers/index.js +0 -1
  72. package/dest/public/bytecode_errors.js +1 -2
  73. package/dest/public/db_interfaces.js +1 -2
  74. package/dest/public/execution.js +2 -4
  75. package/dest/public/executor_metrics.js +16 -12
  76. package/dest/public/fee_payment.js +2 -5
  77. package/dest/public/fixtures/index.js +0 -1
  78. package/dest/public/fixtures/public_tx_simulation_tester.js +15 -20
  79. package/dest/public/fixtures/utils.js +11 -14
  80. package/dest/public/index.js +0 -1
  81. package/dest/public/public_db_sources.js +79 -87
  82. package/dest/public/public_processor.js +310 -306
  83. package/dest/public/public_processor_metrics.js +46 -27
  84. package/dest/public/public_tx_context.js +97 -118
  85. package/dest/public/public_tx_simulator.js +299 -314
  86. package/dest/public/side_effect_errors.js +1 -2
  87. package/dest/public/side_effect_trace.js +44 -105
  88. package/dest/public/side_effect_trace_interface.js +1 -2
  89. package/dest/public/unique_class_ids.js +22 -27
  90. package/dest/public/utils.js +16 -11
  91. package/dest/server.js +0 -1
  92. package/dest/stats/index.js +0 -1
  93. package/dest/stats/stats.js +1 -2
  94. package/dest/test/utils.js +5 -4
  95. package/package.json +11 -11
  96. package/src/acvm/oracle/typed_oracle.ts +34 -34
  97. package/src/avm/avm_machine_state.ts +18 -14
  98. package/src/avm/avm_memory_types.ts +43 -183
  99. package/src/avm/avm_simulator.ts +37 -11
  100. package/src/avm/fixtures/avm_simulation_tester.ts +2 -3
  101. package/src/avm/fixtures/index.ts +39 -0
  102. package/src/avm/opcodes/accrued_substate.ts +7 -21
  103. package/src/avm/opcodes/addressing_mode.ts +9 -2
  104. package/src/avm/opcodes/arithmetic.ts +1 -3
  105. package/src/avm/opcodes/bitwise.ts +2 -6
  106. package/src/avm/opcodes/comparators.ts +1 -3
  107. package/src/avm/opcodes/contract.ts +1 -3
  108. package/src/avm/opcodes/control_flow.ts +1 -9
  109. package/src/avm/opcodes/conversion.ts +1 -3
  110. package/src/avm/opcodes/ec_add.ts +1 -3
  111. package/src/avm/opcodes/environment_getters.ts +1 -3
  112. package/src/avm/opcodes/external_calls.ts +3 -6
  113. package/src/avm/opcodes/hashing.ts +3 -9
  114. package/src/avm/opcodes/memory.ts +6 -20
  115. package/src/avm/opcodes/misc.ts +1 -3
  116. package/src/avm/opcodes/multi_scalar_mul.ts +1 -7
  117. package/src/avm/opcodes/storage.ts +2 -6
  118. package/src/client/index.ts +2 -2
  119. package/src/public/fixtures/public_tx_simulation_tester.ts +2 -3
  120. package/src/public/side_effect_trace.ts +1 -42
  121. package/src/public/side_effect_trace_interface.ts +0 -21
  122. package/dest/acvm/acvm.d.ts +0 -35
  123. package/dest/acvm/acvm.d.ts.map +0 -1
  124. package/dest/acvm/acvm_types.d.ts +0 -10
  125. package/dest/acvm/acvm_types.d.ts.map +0 -1
  126. package/dest/acvm/deserialize.d.ts +0 -36
  127. package/dest/acvm/deserialize.d.ts.map +0 -1
  128. package/dest/acvm/index.d.ts +0 -6
  129. package/dest/acvm/index.d.ts.map +0 -1
  130. package/dest/acvm/oracle/index.d.ts +0 -14
  131. package/dest/acvm/oracle/index.d.ts.map +0 -1
  132. package/dest/acvm/oracle/oracle.d.ts +0 -49
  133. package/dest/acvm/oracle/oracle.d.ts.map +0 -1
  134. package/dest/acvm/oracle/typed_oracle.d.ts +0 -75
  135. package/dest/acvm/oracle/typed_oracle.d.ts.map +0 -1
  136. package/dest/acvm/serialize.d.ts +0 -20
  137. package/dest/acvm/serialize.d.ts.map +0 -1
  138. package/dest/avm/avm_context.d.ts +0 -39
  139. package/dest/avm/avm_context.d.ts.map +0 -1
  140. package/dest/avm/avm_contract_call_result.d.ts +0 -30
  141. package/dest/avm/avm_contract_call_result.d.ts.map +0 -1
  142. package/dest/avm/avm_execution_environment.d.ts +0 -21
  143. package/dest/avm/avm_execution_environment.d.ts.map +0 -1
  144. package/dest/avm/avm_gas.d.ts +0 -60
  145. package/dest/avm/avm_gas.d.ts.map +0 -1
  146. package/dest/avm/avm_machine_state.d.ts +0 -93
  147. package/dest/avm/avm_machine_state.d.ts.map +0 -1
  148. package/dest/avm/avm_memory_types.d.ts +0 -310
  149. package/dest/avm/avm_memory_types.d.ts.map +0 -1
  150. package/dest/avm/avm_simulator.d.ts +0 -37
  151. package/dest/avm/avm_simulator.d.ts.map +0 -1
  152. package/dest/avm/avm_tree.d.ts +0 -281
  153. package/dest/avm/avm_tree.d.ts.map +0 -1
  154. package/dest/avm/bytecode_utils.d.ts +0 -5
  155. package/dest/avm/bytecode_utils.d.ts.map +0 -1
  156. package/dest/avm/errors.d.ts +0 -121
  157. package/dest/avm/errors.d.ts.map +0 -1
  158. package/dest/avm/fixtures/avm_simulation_tester.d.ts +0 -21
  159. package/dest/avm/fixtures/avm_simulation_tester.d.ts.map +0 -1
  160. package/dest/avm/fixtures/base_avm_simulation_tester.d.ts +0 -35
  161. package/dest/avm/fixtures/base_avm_simulation_tester.d.ts.map +0 -1
  162. package/dest/avm/fixtures/index.d.ts +0 -63
  163. package/dest/avm/fixtures/index.d.ts.map +0 -1
  164. package/dest/avm/fixtures/simple_contract_data_source.d.ts +0 -31
  165. package/dest/avm/fixtures/simple_contract_data_source.d.ts.map +0 -1
  166. package/dest/avm/index.d.ts +0 -4
  167. package/dest/avm/index.d.ts.map +0 -1
  168. package/dest/avm/journal/index.d.ts +0 -2
  169. package/dest/avm/journal/index.d.ts.map +0 -1
  170. package/dest/avm/journal/journal.d.ts +0 -176
  171. package/dest/avm/journal/journal.d.ts.map +0 -1
  172. package/dest/avm/journal/nullifiers.d.ts +0 -62
  173. package/dest/avm/journal/nullifiers.d.ts.map +0 -1
  174. package/dest/avm/journal/public_storage.d.ts +0 -66
  175. package/dest/avm/journal/public_storage.d.ts.map +0 -1
  176. package/dest/avm/opcodes/accrued_substate.d.ts +0 -75
  177. package/dest/avm/opcodes/accrued_substate.d.ts.map +0 -1
  178. package/dest/avm/opcodes/addressing_mode.d.ts +0 -27
  179. package/dest/avm/opcodes/addressing_mode.d.ts.map +0 -1
  180. package/dest/avm/opcodes/arithmetic.d.ts +0 -37
  181. package/dest/avm/opcodes/arithmetic.d.ts.map +0 -1
  182. package/dest/avm/opcodes/bitwise.d.ts +0 -50
  183. package/dest/avm/opcodes/bitwise.d.ts.map +0 -1
  184. package/dest/avm/opcodes/comparators.d.ts +0 -25
  185. package/dest/avm/opcodes/comparators.d.ts.map +0 -1
  186. package/dest/avm/opcodes/contract.d.ts +0 -21
  187. package/dest/avm/opcodes/contract.d.ts.map +0 -1
  188. package/dest/avm/opcodes/control_flow.d.ts +0 -41
  189. package/dest/avm/opcodes/control_flow.d.ts.map +0 -1
  190. package/dest/avm/opcodes/conversion.d.ts +0 -17
  191. package/dest/avm/opcodes/conversion.d.ts.map +0 -1
  192. package/dest/avm/opcodes/ec_add.d.ts +0 -19
  193. package/dest/avm/opcodes/ec_add.d.ts.map +0 -1
  194. package/dest/avm/opcodes/environment_getters.d.ts +0 -28
  195. package/dest/avm/opcodes/environment_getters.d.ts.map +0 -1
  196. package/dest/avm/opcodes/external_calls.d.ts +0 -50
  197. package/dest/avm/opcodes/external_calls.d.ts.map +0 -1
  198. package/dest/avm/opcodes/hashing.d.ts +0 -36
  199. package/dest/avm/opcodes/hashing.d.ts.map +0 -1
  200. package/dest/avm/opcodes/index.d.ts +0 -16
  201. package/dest/avm/opcodes/index.d.ts.map +0 -1
  202. package/dest/avm/opcodes/instruction.d.ts +0 -70
  203. package/dest/avm/opcodes/instruction.d.ts.map +0 -1
  204. package/dest/avm/opcodes/instruction_impl.d.ts +0 -19
  205. package/dest/avm/opcodes/instruction_impl.d.ts.map +0 -1
  206. package/dest/avm/opcodes/memory.d.ts +0 -74
  207. package/dest/avm/opcodes/memory.d.ts.map +0 -1
  208. package/dest/avm/opcodes/misc.d.ts +0 -17
  209. package/dest/avm/opcodes/misc.d.ts.map +0 -1
  210. package/dest/avm/opcodes/multi_scalar_mul.d.ts +0 -16
  211. package/dest/avm/opcodes/multi_scalar_mul.d.ts.map +0 -1
  212. package/dest/avm/opcodes/storage.d.ts +0 -24
  213. package/dest/avm/opcodes/storage.d.ts.map +0 -1
  214. package/dest/avm/serialization/buffer_cursor.d.ts +0 -28
  215. package/dest/avm/serialization/buffer_cursor.d.ts.map +0 -1
  216. package/dest/avm/serialization/bytecode_serialization.d.ts +0 -21
  217. package/dest/avm/serialization/bytecode_serialization.d.ts.map +0 -1
  218. package/dest/avm/serialization/instruction_serialization.d.ts +0 -105
  219. package/dest/avm/serialization/instruction_serialization.d.ts.map +0 -1
  220. package/dest/avm/test_utils.d.ts +0 -16
  221. package/dest/avm/test_utils.d.ts.map +0 -1
  222. package/dest/client/client_execution_context.d.ts +0 -214
  223. package/dest/client/client_execution_context.d.ts.map +0 -1
  224. package/dest/client/db_oracle.d.ts +0 -229
  225. package/dest/client/db_oracle.d.ts.map +0 -1
  226. package/dest/client/execution_note_cache.d.ts +0 -93
  227. package/dest/client/execution_note_cache.d.ts.map +0 -1
  228. package/dest/client/index.d.ts +0 -15
  229. package/dest/client/index.d.ts.map +0 -1
  230. package/dest/client/pick_notes.d.ts +0 -85
  231. package/dest/client/pick_notes.d.ts.map +0 -1
  232. package/dest/client/private_execution.d.ts +0 -19
  233. package/dest/client/private_execution.d.ts.map +0 -1
  234. package/dest/client/simulator.d.ts +0 -60
  235. package/dest/client/simulator.d.ts.map +0 -1
  236. package/dest/client/unconstrained_execution.d.ts +0 -10
  237. package/dest/client/unconstrained_execution.d.ts.map +0 -1
  238. package/dest/client/view_data_oracle.d.ts +0 -159
  239. package/dest/client/view_data_oracle.d.ts.map +0 -1
  240. package/dest/common/debug_fn_name.d.ts +0 -4
  241. package/dest/common/debug_fn_name.d.ts.map +0 -1
  242. package/dest/common/errors.d.ts +0 -54
  243. package/dest/common/errors.d.ts.map +0 -1
  244. package/dest/common/hashed_values_cache.d.ts +0 -28
  245. package/dest/common/hashed_values_cache.d.ts.map +0 -1
  246. package/dest/common/index.d.ts +0 -3
  247. package/dest/common/index.d.ts.map +0 -1
  248. package/dest/common/message_load_oracle_inputs.d.ts +0 -15
  249. package/dest/common/message_load_oracle_inputs.d.ts.map +0 -1
  250. package/dest/common/simulation_provider.d.ts +0 -19
  251. package/dest/common/simulation_provider.d.ts.map +0 -1
  252. package/dest/common.d.ts +0 -2
  253. package/dest/common.d.ts.map +0 -1
  254. package/dest/providers/acvm_native.d.ts +0 -40
  255. package/dest/providers/acvm_native.d.ts.map +0 -1
  256. package/dest/providers/acvm_wasm.d.ts +0 -15
  257. package/dest/providers/acvm_wasm.d.ts.map +0 -1
  258. package/dest/providers/acvm_wasm_with_blobs.d.ts +0 -19
  259. package/dest/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
  260. package/dest/providers/factory.d.ts +0 -12
  261. package/dest/providers/factory.d.ts.map +0 -1
  262. package/dest/providers/index.d.ts +0 -5
  263. package/dest/providers/index.d.ts.map +0 -1
  264. package/dest/public/bytecode_errors.d.ts +0 -4
  265. package/dest/public/bytecode_errors.d.ts.map +0 -1
  266. package/dest/public/db_interfaces.d.ts +0 -105
  267. package/dest/public/db_interfaces.d.ts.map +0 -1
  268. package/dest/public/execution.d.ts +0 -102
  269. package/dest/public/execution.d.ts.map +0 -1
  270. package/dest/public/executor_metrics.d.ts +0 -13
  271. package/dest/public/executor_metrics.d.ts.map +0 -1
  272. package/dest/public/fee_payment.d.ts +0 -11
  273. package/dest/public/fee_payment.d.ts.map +0 -1
  274. package/dest/public/fixtures/index.d.ts +0 -3
  275. package/dest/public/fixtures/index.d.ts.map +0 -1
  276. package/dest/public/fixtures/public_tx_simulation_tester.d.ts +0 -21
  277. package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +0 -1
  278. package/dest/public/fixtures/utils.d.ts +0 -17
  279. package/dest/public/fixtures/utils.d.ts.map +0 -1
  280. package/dest/public/index.d.ts +0 -9
  281. package/dest/public/index.d.ts.map +0 -1
  282. package/dest/public/public_db_sources.d.ts +0 -81
  283. package/dest/public/public_db_sources.d.ts.map +0 -1
  284. package/dest/public/public_processor.d.ts +0 -72
  285. package/dest/public/public_processor.d.ts.map +0 -1
  286. package/dest/public/public_processor_metrics.d.ts +0 -27
  287. package/dest/public/public_processor_metrics.d.ts.map +0 -1
  288. package/dest/public/public_tx_context.d.ts +0 -131
  289. package/dest/public/public_tx_context.d.ts.map +0 -1
  290. package/dest/public/public_tx_simulator.d.ts +0 -99
  291. package/dest/public/public_tx_simulator.d.ts.map +0 -1
  292. package/dest/public/side_effect_errors.d.ts +0 -4
  293. package/dest/public/side_effect_errors.d.ts.map +0 -1
  294. package/dest/public/side_effect_trace.d.ts +0 -146
  295. package/dest/public/side_effect_trace.d.ts.map +0 -1
  296. package/dest/public/side_effect_trace_interface.d.ts +0 -49
  297. package/dest/public/side_effect_trace_interface.d.ts.map +0 -1
  298. package/dest/public/unique_class_ids.d.ts +0 -37
  299. package/dest/public/unique_class_ids.d.ts.map +0 -1
  300. package/dest/public/utils.d.ts +0 -5
  301. package/dest/public/utils.d.ts.map +0 -1
  302. package/dest/server.d.ts +0 -6
  303. package/dest/server.d.ts.map +0 -1
  304. package/dest/stats/index.d.ts +0 -2
  305. package/dest/stats/index.d.ts.map +0 -1
  306. package/dest/stats/stats.d.ts +0 -4
  307. package/dest/stats/stats.d.ts.map +0 -1
  308. package/dest/test/utils.d.ts +0 -12
  309. package/dest/test/utils.d.ts.map +0 -1
@@ -1,12 +0,0 @@
1
- import { type Logger } from '@aztec/foundation/log';
2
- import { type SimulationProvider } from '../common/simulation_provider.js';
3
- export type SimulationProviderConfig = {
4
- acvmBinaryPath?: string;
5
- acvmWorkingDirectory?: string;
6
- };
7
- export declare function getSimulationProviderConfigFromEnv(): {
8
- acvmWorkingDirectory: string | undefined;
9
- acvmBinaryPath: string | undefined;
10
- };
11
- export declare function createSimulationProvider(config: SimulationProviderConfig, logger?: Logger): Promise<SimulationProvider>;
12
- //# sourceMappingURL=factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/providers/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAIlE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAI3E,MAAM,MAAM,wBAAwB,GAAG;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,wBAAgB,kCAAkC;;;EAMjD;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,wBAAwB,EAChC,MAAM,GAAE,MAAkC,GACzC,OAAO,CAAC,kBAAkB,CAAC,CAa7B"}
@@ -1,5 +0,0 @@
1
- export * from './acvm_native.js';
2
- export * from './acvm_wasm_with_blobs.js';
3
- export * from '../common/simulation_provider.js';
4
- export * from './factory.js';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,cAAc,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare class ContractClassBytecodeError extends Error {
2
- constructor(contractAddress: string);
3
- }
4
- //# sourceMappingURL=bytecode_errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bytecode_errors.d.ts","sourceRoot":"","sources":["../../src/public/bytecode_errors.ts"],"names":[],"mappings":"AAAA,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,eAAe,EAAE,MAAM;CAIpC"}
@@ -1,105 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type NullifierMembershipWitness } from '@aztec/circuit-types';
4
- import { type ContractInstanceWithAddress, type FunctionSelector, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
5
- import { type AztecAddress } from '@aztec/foundation/aztec-address';
6
- import { type Fr } from '@aztec/foundation/fields';
7
- import { type MessageLoadOracleInputs } from '../common/message_load_oracle_inputs.js';
8
- /**
9
- * Database interface for providing access to public state.
10
- */
11
- export interface PublicStateDB {
12
- /**
13
- * Reads a value from public storage, returning zero if none.
14
- * @param contract - Owner of the storage.
15
- * @param slot - Slot to read in the contract storage.
16
- * @returns The current value in the storage slot.
17
- */
18
- storageRead(contract: AztecAddress, slot: Fr): Promise<Fr>;
19
- /**
20
- * Records a write to public storage.
21
- * @param contract - Owner of the storage.
22
- * @param slot - Slot to read in the contract storage.
23
- * @param newValue - The new value to store.
24
- * @returns The slot of the written leaf in the public data tree.
25
- */
26
- storageWrite(contract: AztecAddress, slot: Fr, newValue: Fr): Promise<bigint>;
27
- /**
28
- * Mark the uncommitted changes in this TX as a checkpoint.
29
- */
30
- checkpoint(): Promise<void>;
31
- /**
32
- * Rollback to the last checkpoint.
33
- */
34
- rollbackToCheckpoint(): Promise<void>;
35
- /**
36
- * Commit the changes in this TX. Includes all changes since the last commit,
37
- * even if they haven't been covered by a checkpoint.
38
- */
39
- commit(): Promise<void>;
40
- /**
41
- * Rollback to the last commit.
42
- */
43
- rollbackToCommit(): Promise<void>;
44
- }
45
- /**
46
- * Database interface for providing access to public contract data.
47
- */
48
- export interface PublicContractsDB {
49
- /**
50
- * Returns the brillig (public bytecode) of a function.
51
- * @param address - The contract address that owns this function.
52
- * @param selector - The selector for the function.
53
- * @returns The bytecode or undefined if not found.
54
- */
55
- getBytecode(address: AztecAddress, selector: FunctionSelector): Promise<Buffer | undefined>;
56
- /**
57
- * Returns a publicly deployed contract instance.
58
- * @param address - Address of the contract.
59
- * @returns The contract instance or undefined if not found.
60
- */
61
- getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
62
- getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
63
- }
64
- /** Database interface for providing access to commitment tree, l1 to l2 message tree, and nullifier tree. */
65
- export interface CommitmentsDB {
66
- /**
67
- * Fetches a message from the db, given its key.
68
- * @param contractAddress - Address of a contract by which the message was emitted.
69
- * @param messageHash - Hash of the message.
70
- * @param secret - Secret used to compute a nullifier.
71
- * @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
72
- * @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
73
- */
74
- getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
75
- /**
76
- * @param leafIndex the leaf to look up
77
- * @returns The l1 to l2 leaf value or undefined if not found.
78
- */
79
- getL1ToL2LeafValue(leafIndex: bigint): Promise<Fr | undefined>;
80
- /**
81
- * Gets the index of a commitment in the note hash tree.
82
- * @param commitment - The commitment.
83
- * @returns - The index of the commitment. Undefined if it does not exist in the tree.
84
- */
85
- getCommitmentIndex(commitment: Fr): Promise<bigint | undefined>;
86
- /**
87
- * Gets commitment in the note hash tree given a leaf index.
88
- * @param leafIndex - the leaf to look up.
89
- * @returns - The commitment at that index. Undefined if leaf index is not found.
90
- */
91
- getCommitmentValue(leafIndex: bigint): Promise<Fr | undefined>;
92
- /**
93
- * Gets the index of a nullifier in the nullifier tree.
94
- * @param nullifier - The nullifier.
95
- * @returns - The index of the nullifier. Undefined if it does not exist in the tree.
96
- */
97
- getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
98
- /**
99
- * Returns a nullifier membership witness for the given nullifier or undefined if not found.
100
- * REFACTOR: Same as getL1ToL2MembershipWitness, can be combined with aztec-node method that does almost the same thing.
101
- * @param nullifier - Nullifier we're looking for.
102
- */
103
- getNullifierMembershipWitnessAtLatestBlock(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
104
- }
105
- //# sourceMappingURL=db_interfaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"db_interfaces.d.ts","sourceRoot":"","sources":["../../src/public/db_interfaces.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,YAAY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T,OAAO,CAAC,uBAAuB,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;IAErE;;;OAGG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAE/D;;;;OAIG;IACH,kBAAkB,CAAC,UAAU,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEhE;;;;OAIG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IAE/D;;;;OAIG;IACH,iBAAiB,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE9D;;;;OAIG;IACH,0CAA0C,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;CAC5G"}
@@ -1,102 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type PublicExecutionRequest, type SimulationError } from '@aztec/circuit-types';
4
- import { type AvmExecutionHints, type ContractStorageRead, type ContractStorageUpdateRequest, type Fr, Gas, type L2ToL1Message, type NoteHash, type Nullifier, type PublicDataUpdateRequest, PublicInnerCallRequest, type PublicLog, type ReadRequest, type ScopedL2ToL1Message, type TreeLeafReadRequest } from '@aztec/circuits.js';
5
- export interface PublicSideEffects {
6
- /** The contract storage update requests performed. */
7
- publicDataWrites: PublicDataUpdateRequest[];
8
- /** The new note hashes to be inserted into the note hashes tree. */
9
- noteHashes: NoteHash[];
10
- /** The new nullifiers to be inserted into the nullifier tree. */
11
- nullifiers: Nullifier[];
12
- /** The new l2 to l1 messages generated to be inserted into the messages tree. */
13
- l2ToL1Messages: ScopedL2ToL1Message[];
14
- /** Public logs emitted during execution. */
15
- publicLogs: PublicLog[];
16
- }
17
- export interface EnqueuedPublicCallExecutionResult {
18
- /** How much gas was left after this public execution. */
19
- endGasLeft: Gas;
20
- /** The side effect counter after execution */
21
- endSideEffectCounter: Fr;
22
- /** The return values of the function. */
23
- returnValues: Fr[];
24
- /** Whether the execution reverted. */
25
- reverted: boolean;
26
- /** The revert reason if the execution reverted. */
27
- revertReason?: SimulationError;
28
- }
29
- export interface EnqueuedPublicCallExecutionResultWithSideEffects {
30
- /** How much gas was left after this public execution. */
31
- endGasLeft: Gas;
32
- /** The side effect counter after execution */
33
- endSideEffectCounter: Fr;
34
- /** The return values of the function. */
35
- returnValues: Fr[];
36
- /** Whether the execution reverted. */
37
- reverted: boolean;
38
- /** The revert reason if the execution reverted. */
39
- revertReason?: SimulationError;
40
- /** The public side effects of the function. */
41
- sideEffects: PublicSideEffects;
42
- }
43
- /**
44
- * The public function execution result.
45
- */
46
- export interface PublicFunctionCallResult {
47
- /** The execution request that triggered this result. */
48
- executionRequest: PublicExecutionRequest;
49
- /** The side effect counter at the start of the function call. */
50
- startSideEffectCounter: Fr;
51
- /** The side effect counter after executing this function call */
52
- endSideEffectCounter: Fr;
53
- /** How much gas was available for this public execution. */
54
- startGasLeft: Gas;
55
- /** How much gas was left after this public execution. */
56
- endGasLeft: Gas;
57
- /** Transaction fee set for this tx. */
58
- transactionFee: Fr;
59
- /** Bytecode used for this execution. */
60
- bytecode?: Buffer;
61
- /** Calldata used for this execution. */
62
- calldata: Fr[];
63
- /** The return values of the function. */
64
- returnValues: Fr[];
65
- /** Whether the execution reverted. */
66
- reverted: boolean;
67
- /** The revert reason if the execution reverted. */
68
- revertReason?: SimulationError;
69
- /** The contract storage reads performed by the function. */
70
- contractStorageReads: ContractStorageRead[];
71
- /** The contract storage update requests performed by the function. */
72
- contractStorageUpdateRequests: ContractStorageUpdateRequest[];
73
- /** The new note hashes to be inserted into the note hashes tree. */
74
- noteHashes: NoteHash[];
75
- /** The new l2 to l1 messages generated in this call. */
76
- l2ToL1Messages: L2ToL1Message[];
77
- /** The new nullifiers to be inserted into the nullifier tree. */
78
- nullifiers: Nullifier[];
79
- /** The note hash read requests emitted in this call. */
80
- noteHashReadRequests: TreeLeafReadRequest[];
81
- /** The nullifier read requests emitted in this call. */
82
- nullifierReadRequests: ReadRequest[];
83
- /** The nullifier non existent read requests emitted in this call. */
84
- nullifierNonExistentReadRequests: ReadRequest[];
85
- /** L1 to L2 message read requests emitted in this call. */
86
- l1ToL2MsgReadRequests: TreeLeafReadRequest[];
87
- /**
88
- * The public logs emitted in this call.
89
- * Note: PublicLog has no counter - unsure if this is needed bc this struct is unused
90
- */
91
- publicLogs: PublicLog[];
92
- /** The requests to call public functions made by this call. */
93
- publicCallRequests: PublicInnerCallRequest[];
94
- /** The results of nested calls. */
95
- nestedExecutions: this[];
96
- /** Hints for proving AVM execution. */
97
- avmCircuitHints: AvmExecutionHints;
98
- /** The name of the function that was executed. Only used for logging. */
99
- functionName: string;
100
- }
101
- export declare function resultToPublicCallRequest(result: PublicFunctionCallResult): Promise<PublicInnerCallRequest>;
102
- //# sourceMappingURL=execution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/public/execution.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,EAAE,EACP,GAAG,EACH,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,SAAS,EAEd,KAAK,uBAAuB,EAC5B,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,WAAW,EAEhB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;IAC5C,oEAAoE;IACpE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,iE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;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,YAAY,CAAC,EAAE,eAAe,CAAC;IAE/B,4DAA4D;IAC5D,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,sEAAsE;IACtE,6BAA6B,EAAE,4BAA4B,EAAE,CAAC;IAC9D,oEAAoE;IACpE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,wDAAwD;IACxD,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,iEAAiE;IACjE,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,wDAAwD;IACxD,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,wDAAwD;IACxD,qBAAqB,EAAE,WAAW,EAAE,CAAC;IACrC,qEAAqE;IACrE,gCAAgC,EAAE,WAAW,EAAE,CAAC;IAChD,2DAA2D;IAC3D,qBAAqB,EAAE,mBAAmB,EAAE,CAAC;IAC7C;;;OAGG;IACH,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,+DAA+D;IAC/D,kBAAkB,EAAE,sBAAsB,EAAE,CAAC;IAC7C,mCAAmC;IACnC,gBAAgB,EAAE,IAAI,EAAE,CAAC;IAEzB,uCAAuC;IACvC,eAAe,EAAE,iBAAiB,CAAC;IAEnC,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,wBAAwB,mCAa/E"}
@@ -1,13 +0,0 @@
1
- import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
2
- export declare class ExecutorMetrics {
3
- readonly tracer: Tracer;
4
- private fnCount;
5
- private fnDuration;
6
- private manaPerSecond;
7
- private privateEffectsInsertions;
8
- constructor(client: TelemetryClient, name?: string);
9
- recordFunctionSimulation(durationMs: number, manaUsed: number, fnName: string): void;
10
- recordFunctionSimulationFailure(): void;
11
- recordPrivateEffectsInsertion(durationUs: number, type: 'revertible' | 'non-revertible'): void;
12
- }
13
- //# sourceMappingURL=executor_metrics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor_metrics.d.ts","sourceRoot":"","sources":["../../src/public/executor_metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,MAAM,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,eAAe;IAC1B,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,wBAAwB,CAAY;gBAEhC,MAAM,EAAE,eAAe,EAAE,IAAI,SAAmB;IA2B5D,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAe7E,+BAA+B;IAM/B,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB;CAKxF"}
@@ -1,11 +0,0 @@
1
- import { type AztecAddress } from '@aztec/foundation/aztec-address';
2
- import { Fr } from '@aztec/foundation/fields';
3
- /**
4
- * Computes the storage slot within the Fee Juice contract for the balance of the fee payer.
5
- */
6
- export declare function computeFeePayerBalanceStorageSlot(feePayer: AztecAddress): Promise<Fr>;
7
- /**
8
- * Computes the leaf slot in the public data tree for the balance of the fee payer in the Fee Juice.
9
- */
10
- export declare function computeFeePayerBalanceLeafSlot(feePayer: AztecAddress): Promise<Fr>;
11
- //# sourceMappingURL=fee_payment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fee_payment.d.ts","sourceRoot":"","sources":["../../src/public/fee_payment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,YAAY,eAEvE;AAED;;GAEG;AACH,wBAAsB,8BAA8B,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,EAAE,CAAC,CAMxF"}
@@ -1,3 +0,0 @@
1
- export * from './public_tx_simulation_tester.js';
2
- export * from './utils.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/public/fixtures/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,YAAY,CAAC"}
@@ -1,21 +0,0 @@
1
- import { AztecAddress } from '@aztec/foundation/aztec-address';
2
- import { BaseAvmSimulationTester } from '../../avm/fixtures/base_avm_simulation_tester.js';
3
- import { type PublicTxResult } from '../public_tx_simulator.js';
4
- export type TestEnqueuedCall = {
5
- address: AztecAddress;
6
- fnName: string;
7
- args: any[];
8
- isStaticCall?: boolean;
9
- };
10
- /**
11
- * A test class that extends the BaseAvmSimulationTester to enable real-app testing of the PublicTxSimulator.
12
- * It provides an interface for simulating one transaction at a time and maintains state between subsequent
13
- * transactions.
14
- */
15
- export declare class PublicTxSimulationTester extends BaseAvmSimulationTester {
16
- private txCount;
17
- static create(skipContractDeployments?: boolean): Promise<PublicTxSimulationTester>;
18
- simulateTx(sender: AztecAddress, setupCalls?: TestEnqueuedCall[], appCalls?: TestEnqueuedCall[], teardownCall?: TestEnqueuedCall, feePayer?: AztecAddress): Promise<PublicTxResult>;
19
- private commitTxStateUpdates;
20
- }
21
- //# sourceMappingURL=public_tx_simulation_tester.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_tx_simulation_tester.d.ts","sourceRoot":"","sources":["../../../src/public/fixtures/public_tx_simulation_tester.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAO/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAI3F,OAAO,EAAE,KAAK,cAAc,EAAqB,MAAM,2BAA2B,CAAC;AAMnF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,uBAAuB;IACnE,OAAO,CAAC,OAAO,CAAK;WAEA,MAAM,CAAC,uBAAuB,UAAQ,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAMjF,UAAU,CACrB,MAAM,EAAE,YAAY,EACpB,UAAU,GAAE,gBAAgB,EAAO,EACnC,QAAQ,GAAE,gBAAgB,EAAO,EACjC,YAAY,CAAC,EAAE,gBAAgB,EAC/B,QAAQ,GAAE,YAAkC,GAC3C,OAAO,CAAC,cAAc,CAAC;YAwEZ,oBAAoB;CAqBnC"}
@@ -1,17 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type PublicExecutionRequest, Tx } from '@aztec/circuit-types';
4
- import { FunctionSelector, Gas } from '@aztec/circuits.js';
5
- import { type FunctionArtifact } from '@aztec/foundation/abi';
6
- import { AztecAddress } from '@aztec/foundation/aztec-address';
7
- import { Fr } from '@aztec/foundation/fields';
8
- export declare const PUBLIC_DISPATCH_FN_NAME = "public_dispatch";
9
- /**
10
- * Craft a carrier transaction for some public calls for simulation by PublicTxSimulator.
11
- */
12
- export declare function createTxForPublicCalls(firstNullifier: Fr, setupExecutionRequests: PublicExecutionRequest[], appExecutionRequests: PublicExecutionRequest[], teardownExecutionRequest?: PublicExecutionRequest, feePayer?: AztecAddress, gasUsedByPrivate?: Gas): Promise<Tx>;
13
- export declare function getAvmTestContractFunctionSelector(functionName: string): Promise<FunctionSelector>;
14
- export declare function getAvmTestContractArtifact(functionName: string): FunctionArtifact;
15
- export declare function getAvmTestContractBytecode(functionName: string): Buffer;
16
- export declare function getAvmTestContractPublicDispatchBytecode(): Buffer;
17
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/public/fixtures/utils.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAGL,gBAAgB,EAChB,GAAG,EASJ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAK9C,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AAEzD;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,EAAE,EAClB,sBAAsB,EAAE,sBAAsB,EAAE,EAChD,oBAAoB,EAAE,sBAAsB,EAAE,EAC9C,wBAAwB,CAAC,EAAE,sBAAsB,EACjD,QAAQ,eAAsB,EAC9B,gBAAgB,GAAE,GAAiB,GAClC,OAAO,CAAC,EAAE,CAAC,CAkDb;AAED,wBAAgB,kCAAkC,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAKlG;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB,CAOjF;AAED,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAGvE;AAED,wBAAgB,wCAAwC,IAAI,MAAM,CAEjE"}
@@ -1,9 +0,0 @@
1
- export * from './db_interfaces.js';
2
- export * from './public_tx_simulator.js';
3
- export { type EnqueuedPublicCallExecutionResult, type PublicFunctionCallResult } from './execution.js';
4
- export * from './fee_payment.js';
5
- export * from './public_db_sources.js';
6
- export { PublicProcessor, PublicProcessorFactory } from './public_processor.js';
7
- export { SideEffectTrace } from './side_effect_trace.js';
8
- export { getExecutionRequestsByPhase } from './utils.js';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/public/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,KAAK,iCAAiC,EAAE,KAAK,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AACvG,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC"}
@@ -1,81 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type MerkleTreeReadOperations, type MerkleTreeWriteOperations, NullifierMembershipWitness, type Tx } from '@aztec/circuit-types';
4
- import { type AztecAddress, type ContractClassPublic, type ContractDataSource, type ContractInstanceWithAddress, Fr, type FunctionSelector, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
5
- import { MessageLoadOracleInputs } from '../common/message_load_oracle_inputs.js';
6
- import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db_interfaces.js';
7
- /**
8
- * Implements the PublicContractsDB using a ContractDataSource.
9
- * Progressively records contracts in transaction as they are processed in a block.
10
- */
11
- export declare class ContractsDataSourcePublicDB implements PublicContractsDB {
12
- private dataSource;
13
- private instanceCache;
14
- private classCache;
15
- private bytecodeCommitmentCache;
16
- private log;
17
- constructor(dataSource: ContractDataSource);
18
- /**
19
- * Add new contracts from a transaction
20
- * @param tx - The transaction to add contracts from.
21
- */
22
- addNewContracts(tx: Tx): Promise<void>;
23
- /**
24
- * Removes new contracts added from transactions
25
- * @param tx - The tx's contracts to be removed
26
- * @param onlyRevertible - Whether to only remove contracts added from revertible contract class logs
27
- */
28
- removeNewContracts(tx: Tx, onlyRevertible?: boolean): Promise<void>;
29
- getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
30
- getContractClass(contractClassId: Fr): Promise<ContractClassPublic | undefined>;
31
- getBytecodeCommitment(contractClassId: Fr): Promise<Fr | undefined>;
32
- getBytecode(address: AztecAddress, selector: FunctionSelector): Promise<Buffer | undefined>;
33
- getDebugFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
34
- }
35
- /**
36
- * A public state DB that reads and writes to the world state.
37
- */
38
- export declare class WorldStateDB extends ContractsDataSourcePublicDB implements PublicStateDB, CommitmentsDB {
39
- private db;
40
- private logger;
41
- private publicCommittedWriteCache;
42
- private publicCheckpointedWriteCache;
43
- private publicUncommittedWriteCache;
44
- constructor(db: MerkleTreeWriteOperations, dataSource: ContractDataSource);
45
- getMerkleInterface(): MerkleTreeWriteOperations;
46
- /**
47
- * Reads a value from public storage, returning zero if none.
48
- * @param contract - Owner of the storage.
49
- * @param slot - Slot to read in the contract storage.
50
- * @returns The current value in the storage slot.
51
- */
52
- storageRead(contract: AztecAddress, slot: Fr): Promise<Fr>;
53
- /**
54
- * Records a write to public storage.
55
- * @param contract - Owner of the storage.
56
- * @param slot - Slot to read in the contract storage.
57
- * @param newValue - The new value to store.
58
- * @returns The slot of the written leaf in the public data tree.
59
- */
60
- storageWrite(contract: AztecAddress, slot: Fr, newValue: Fr): Promise<bigint>;
61
- getNullifierMembershipWitnessAtLatestBlock(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
62
- getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
63
- getL1ToL2LeafValue(leafIndex: bigint): Promise<Fr | undefined>;
64
- getCommitmentIndex(commitment: Fr): Promise<bigint | undefined>;
65
- getCommitmentValue(leafIndex: bigint): Promise<Fr | undefined>;
66
- getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
67
- /**
68
- * Commit the pending public changes to the DB.
69
- * @returns Nothing.
70
- */
71
- commit(): Promise<void>;
72
- /**
73
- * Rollback the pending public changes.
74
- * @returns Nothing.
75
- */
76
- rollbackToCommit(): Promise<void>;
77
- checkpoint(): Promise<void>;
78
- rollbackToCheckpoint(): Promise<void>;
79
- }
80
- export declare function readPublicState(db: MerkleTreeReadOperations, contract: AztecAddress, slot: Fr): Promise<Fr>;
81
- //# sourceMappingURL=public_db_sources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_db_sources.d.ts","sourceRoot":"","sources":["../../src/public/public_db_sources.ts"],"names":[],"mappings":";;AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,0BAA0B,EAC1B,KAAK,EAAE,EACR,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,EAAE,EACF,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAK9B,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEpG;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,iBAAiB;IAOvD,OAAO,CAAC,UAAU;IAN9B,OAAO,CAAC,aAAa,CAAkD;IACvE,OAAO,CAAC,UAAU,CAA0C;IAC5D,OAAO,CAAC,uBAAuB,CAAyB;IAExD,OAAO,CAAC,GAAG,CAAmD;gBAE1C,UAAU,EAAE,kBAAkB;IAClD;;;OAGG;IACU,eAAe,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BnD;;;;OAIG;IACI,kBAAkB,CAAC,EAA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7B,WAAW,EAAE,EAAE,EACf,MAAM,EAAE,EAAE,GACT,OAAO,CAAC,uBAAuB,CAAC,OAAO,wBAAwB,CAAC,CAAC;IA6BvD,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAW9D,kBAAkB,CAAC,UAAU,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAW/D,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAW9D,iBAAiB,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAW1E;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAYvB;;;OAGG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAMvC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;CAItC;AAED,wBAAsB,eAAe,CAAC,EAAE,EAAE,wBAAwB,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAcjH"}
@@ -1,72 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type FailedTx, type MerkleTreeWriteOperations, NestedProcessReturnValues, type ProcessedTx, Tx, type TxValidator } from '@aztec/circuit-types';
4
- import { type ContractDataSource, Gas, type GlobalVariables } from '@aztec/circuits.js';
5
- import { type DateProvider } from '@aztec/foundation/timer';
6
- import { type TelemetryClient, type Traceable, type Tracer } from '@aztec/telemetry-client';
7
- import { WorldStateDB } from './public_db_sources.js';
8
- import { PublicTxSimulator } from './public_tx_simulator.js';
9
- /**
10
- * Creates new instances of PublicProcessor given the provided merkle tree db and contract data source.
11
- */
12
- export declare class PublicProcessorFactory {
13
- private contractDataSource;
14
- private dateProvider;
15
- private telemetryClient;
16
- constructor(contractDataSource: ContractDataSource, dateProvider: DateProvider, telemetryClient?: TelemetryClient);
17
- /**
18
- * Creates a new instance of a PublicProcessor.
19
- * @param historicalHeader - The header of a block previous to the one in which the tx is included.
20
- * @param globalVariables - The global variables for the block being processed.
21
- * @param enforceFeePayment - Allows disabling balance checks for fee estimations.
22
- * @returns A new instance of a PublicProcessor.
23
- */
24
- create(merkleTree: MerkleTreeWriteOperations, globalVariables: GlobalVariables, enforceFeePayment: boolean): PublicProcessor;
25
- protected createPublicTxSimulator(db: MerkleTreeWriteOperations, worldStateDB: WorldStateDB, globalVariables: GlobalVariables, doMerkleOperations: boolean, enforceFeePayment: boolean, telemetryClient: TelemetryClient): PublicTxSimulator;
26
- }
27
- /**
28
- * Converts Txs lifted from the P2P module into ProcessedTx objects by executing
29
- * any public function calls in them. Txs with private calls only are unaffected.
30
- */
31
- export declare class PublicProcessor implements Traceable {
32
- protected db: MerkleTreeWriteOperations;
33
- protected globalVariables: GlobalVariables;
34
- protected worldStateDB: WorldStateDB;
35
- protected publicTxSimulator: PublicTxSimulator;
36
- private dateProvider;
37
- private log;
38
- private metrics;
39
- constructor(db: MerkleTreeWriteOperations, globalVariables: GlobalVariables, worldStateDB: WorldStateDB, publicTxSimulator: PublicTxSimulator, dateProvider: DateProvider, telemetryClient?: TelemetryClient, log?: import("@aztec/foundation/log").Logger);
40
- get tracer(): Tracer;
41
- /**
42
- * Run each tx through the public circuit and the public kernel circuit if needed.
43
- * @param txs - Txs to process.
44
- * @param processedTxHandler - Handler for processed txs in the context of block building or proving.
45
- * @returns The list of processed txs with their circuit simulation outputs.
46
- */
47
- process(txs: Iterable<Tx> | AsyncIterable<Tx>, limits?: {
48
- maxTransactions?: number;
49
- maxBlockSize?: number;
50
- maxBlockGas?: Gas;
51
- deadline?: Date;
52
- }, validators?: {
53
- preprocessValidator?: TxValidator<Tx>;
54
- postprocessValidator?: TxValidator<ProcessedTx>;
55
- nullifierCache?: {
56
- addNullifiers: (nullifiers: Buffer[]) => void;
57
- };
58
- }): Promise<[ProcessedTx[], FailedTx[], NestedProcessReturnValues[]]>;
59
- private processTx;
60
- private commitTxState;
61
- /** Processes the given tx within deadline. Returns timeout if deadline is hit. */
62
- private processTxWithinDeadline;
63
- /**
64
- * Creates the public data write for paying the tx fee.
65
- * This is used in private only txs, since for txs with public calls
66
- * the avm handles the fee payment itself.
67
- */
68
- private getFeePaymentPublicDataWrite;
69
- private processPrivateOnlyTx;
70
- private processTxWithPublicCalls;
71
- }
72
- //# sourceMappingURL=public_processor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_processor.d.ts","sourceRoot":"","sources":["../../src/public/public_processor.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,yBAAyB,EAC9B,yBAAyB,EACzB,KAAK,WAAW,EAChB,EAAE,EAEF,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,kBAAkB,EAEvB,GAAG,EACH,KAAK,eAAe,EAKrB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,yBAAyB,CAAC;AAG5F,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,MAAM,EAGZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,sBAAsB;IAE/B,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,eAAe;gBAFf,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,eAAe,GAAE,eAAsC;IAGjE;;;;;;OAMG;IACI,MAAM,CACX,UAAU,EAAE,yBAAyB,EACrC,eAAe,EAAE,eAAe,EAChC,iBA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AAO,CAAC,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,EAAE,yBAAyB,EAAE,CAAC,CAAC;YAgJtD,SAAS;YA2BT,aAAa;IAwC3B,kFAAkF;YACpE,uBAAuB;IA+BrC;;;;OAIG;YACW,4BAA4B;YA6B5B,oBAAoB;YAyBpB,wBAAwB;CA0CvC"}
@@ -1,27 +0,0 @@
1
- import { type TxExecutionPhase } from '@aztec/circuit-types';
2
- import { type Gas } from '@aztec/circuits.js';
3
- import { type ContractClassRegisteredEvent } from '@aztec/protocol-contracts/class-registerer';
4
- import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
5
- export declare class PublicProcessorMetrics {
6
- readonly tracer: Tracer;
7
- private txDuration;
8
- private txCount;
9
- private txPhaseCount;
10
- private phaseDuration;
11
- private phaseCount;
12
- private bytecodeDeployed;
13
- private totalGas;
14
- private totalGasHistogram;
15
- private gasRate;
16
- private txGas;
17
- private treeInsertionDuration;
18
- constructor(client: TelemetryClient, name?: string);
19
- recordPhaseDuration(phaseName: TxExecutionPhase, durationMs: number): void;
20
- recordTx(phaseCount: number, durationMs: number, gasUsed: Gas): void;
21
- recordAllTxs(totalGas: Gas, gasRate: number): void;
22
- recordFailedTx(): void;
23
- recordRevertedPhase(phaseName: TxExecutionPhase): void;
24
- recordClassRegistration(...events: ContractClassRegisteredEvent[]): void;
25
- recordTreeInsertions(durationUs: number): void;
26
- }
27
- //# sourceMappingURL=public_processor_metrics.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_processor_metrics.d.ts","sourceRoot":"","sources":["../../src/public/public_processor_metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,sBAAsB;IACjC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,UAAU,CAAgB;IAElC,OAAO,CAAC,gBAAgB,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,iBAAiB,CAAY;IACrC,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,KAAK,CAAY;IAEzB,OAAO,CAAC,qBAAqB,CAAY;gBAE7B,MAAM,EAAE,eAAe,EAAE,IAAI,SAAoB;IA4D7D,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM;IAKnE,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;IAc7D,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM;IAkB3C,cAAc;IAMd,mBAAmB,CAAC,SAAS,EAAE,gBAAgB;IAI/C,uBAAuB,CAAC,GAAG,MAAM,EAAE,4BAA4B,EAAE;IAWjE,oBAAoB,CAAC,UAAU,EAAE,MAAM;CAGxC"}