@aztec/simulator 0.77.0-testnet-ignition.26 → 0.77.0-testnet-ignition.27

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 (198) hide show
  1. package/dest/private/index.js +2 -2
  2. package/dest/private/private_execution.js +18 -16
  3. package/dest/private/{client_execution_context.js → private_execution_oracle.js} +24 -19
  4. package/dest/private/simulator.js +12 -14
  5. package/dest/private/{view_data_oracle.js → unconstrained_execution_oracle.js} +32 -34
  6. package/dest/public/public_tx_simulator/public_tx_simulator.js +21 -12
  7. package/package.json +14 -14
  8. package/src/private/{db_oracle.ts → execution_data_provider.ts} +28 -2
  9. package/src/private/index.ts +6 -2
  10. package/src/private/private_execution.ts +21 -20
  11. package/src/private/{client_execution_context.ts → private_execution_oracle.ts} +41 -26
  12. package/src/private/simulator.ts +20 -24
  13. package/src/private/unconstrained_execution.ts +2 -2
  14. package/src/private/{view_data_oracle.ts → unconstrained_execution_oracle.ts} +42 -35
  15. package/src/public/public_tx_simulator/public_tx_simulator.ts +29 -16
  16. package/dest/client.d.ts +0 -5
  17. package/dest/client.d.ts.map +0 -1
  18. package/dest/common/db_interfaces.d.ts +0 -80
  19. package/dest/common/db_interfaces.d.ts.map +0 -1
  20. package/dest/common/debug_fn_name.d.ts +0 -5
  21. package/dest/common/debug_fn_name.d.ts.map +0 -1
  22. package/dest/common/errors.d.ts +0 -54
  23. package/dest/common/errors.d.ts.map +0 -1
  24. package/dest/common/index.d.ts +0 -4
  25. package/dest/common/index.d.ts.map +0 -1
  26. package/dest/common/message_load_oracle_inputs.d.ts +0 -15
  27. package/dest/common/message_load_oracle_inputs.d.ts.map +0 -1
  28. package/dest/common/stats/index.d.ts +0 -2
  29. package/dest/common/stats/index.d.ts.map +0 -1
  30. package/dest/common/stats/stats.d.ts +0 -4
  31. package/dest/common/stats/stats.d.ts.map +0 -1
  32. package/dest/private/acvm/acvm.d.ts +0 -35
  33. package/dest/private/acvm/acvm.d.ts.map +0 -1
  34. package/dest/private/acvm/acvm_types.d.ts +0 -10
  35. package/dest/private/acvm/acvm_types.d.ts.map +0 -1
  36. package/dest/private/acvm/deserialize.d.ts +0 -36
  37. package/dest/private/acvm/deserialize.d.ts.map +0 -1
  38. package/dest/private/acvm/index.d.ts +0 -6
  39. package/dest/private/acvm/index.d.ts.map +0 -1
  40. package/dest/private/acvm/oracle/index.d.ts +0 -14
  41. package/dest/private/acvm/oracle/index.d.ts.map +0 -1
  42. package/dest/private/acvm/oracle/oracle.d.ts +0 -49
  43. package/dest/private/acvm/oracle/oracle.d.ts.map +0 -1
  44. package/dest/private/acvm/oracle/typed_oracle.d.ts +0 -83
  45. package/dest/private/acvm/oracle/typed_oracle.d.ts.map +0 -1
  46. package/dest/private/acvm/serialize.d.ts +0 -24
  47. package/dest/private/acvm/serialize.d.ts.map +0 -1
  48. package/dest/private/client_execution_context.d.ts +0 -217
  49. package/dest/private/client_execution_context.d.ts.map +0 -1
  50. package/dest/private/db_oracle.d.ts +0 -238
  51. package/dest/private/db_oracle.d.ts.map +0 -1
  52. package/dest/private/execution_note_cache.d.ts +0 -93
  53. package/dest/private/execution_note_cache.d.ts.map +0 -1
  54. package/dest/private/hashed_values_cache.d.ts +0 -28
  55. package/dest/private/hashed_values_cache.d.ts.map +0 -1
  56. package/dest/private/index.d.ts +0 -13
  57. package/dest/private/index.d.ts.map +0 -1
  58. package/dest/private/pick_notes.d.ts +0 -85
  59. package/dest/private/pick_notes.d.ts.map +0 -1
  60. package/dest/private/private_execution.d.ts +0 -24
  61. package/dest/private/private_execution.d.ts.map +0 -1
  62. package/dest/private/providers/acvm_native.d.ts +0 -40
  63. package/dest/private/providers/acvm_native.d.ts.map +0 -1
  64. package/dest/private/providers/acvm_wasm.d.ts +0 -15
  65. package/dest/private/providers/acvm_wasm.d.ts.map +0 -1
  66. package/dest/private/providers/acvm_wasm_with_blobs.d.ts +0 -19
  67. package/dest/private/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
  68. package/dest/private/providers/factory.d.ts +0 -12
  69. package/dest/private/providers/factory.d.ts.map +0 -1
  70. package/dest/private/providers/simulation_provider.d.ts +0 -19
  71. package/dest/private/providers/simulation_provider.d.ts.map +0 -1
  72. package/dest/private/simulator.d.ts +0 -36
  73. package/dest/private/simulator.d.ts.map +0 -1
  74. package/dest/private/unconstrained_execution.d.ts +0 -10
  75. package/dest/private/unconstrained_execution.d.ts.map +0 -1
  76. package/dest/private/view_data_oracle.d.ts +0 -164
  77. package/dest/private/view_data_oracle.d.ts.map +0 -1
  78. package/dest/public/avm/avm_context.d.ts +0 -41
  79. package/dest/public/avm/avm_context.d.ts.map +0 -1
  80. package/dest/public/avm/avm_contract_call_result.d.ts +0 -30
  81. package/dest/public/avm/avm_contract_call_result.d.ts.map +0 -1
  82. package/dest/public/avm/avm_execution_environment.d.ts +0 -21
  83. package/dest/public/avm/avm_execution_environment.d.ts.map +0 -1
  84. package/dest/public/avm/avm_gas.d.ts +0 -60
  85. package/dest/public/avm/avm_gas.d.ts.map +0 -1
  86. package/dest/public/avm/avm_machine_state.d.ts +0 -93
  87. package/dest/public/avm/avm_machine_state.d.ts.map +0 -1
  88. package/dest/public/avm/avm_memory_types.d.ts +0 -264
  89. package/dest/public/avm/avm_memory_types.d.ts.map +0 -1
  90. package/dest/public/avm/avm_simulator.d.ts +0 -40
  91. package/dest/public/avm/avm_simulator.d.ts.map +0 -1
  92. package/dest/public/avm/bytecode_utils.d.ts +0 -5
  93. package/dest/public/avm/bytecode_utils.d.ts.map +0 -1
  94. package/dest/public/avm/errors.d.ts +0 -122
  95. package/dest/public/avm/errors.d.ts.map +0 -1
  96. package/dest/public/avm/fixtures/avm_simulation_tester.d.ts +0 -21
  97. package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +0 -1
  98. package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts +0 -36
  99. package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +0 -1
  100. package/dest/public/avm/fixtures/index.d.ts +0 -84
  101. package/dest/public/avm/fixtures/index.d.ts.map +0 -1
  102. package/dest/public/avm/fixtures/simple_contract_data_source.d.ts +0 -35
  103. package/dest/public/avm/fixtures/simple_contract_data_source.d.ts.map +0 -1
  104. package/dest/public/avm/index.d.ts +0 -4
  105. package/dest/public/avm/index.d.ts.map +0 -1
  106. package/dest/public/avm/journal/index.d.ts +0 -2
  107. package/dest/public/avm/journal/index.d.ts.map +0 -1
  108. package/dest/public/avm/journal/journal.d.ts +0 -209
  109. package/dest/public/avm/journal/journal.d.ts.map +0 -1
  110. package/dest/public/avm/journal/nullifiers.d.ts +0 -64
  111. package/dest/public/avm/journal/nullifiers.d.ts.map +0 -1
  112. package/dest/public/avm/journal/public_storage.d.ts +0 -66
  113. package/dest/public/avm/journal/public_storage.d.ts.map +0 -1
  114. package/dest/public/avm/opcodes/accrued_substate.d.ts +0 -75
  115. package/dest/public/avm/opcodes/accrued_substate.d.ts.map +0 -1
  116. package/dest/public/avm/opcodes/addressing_mode.d.ts +0 -27
  117. package/dest/public/avm/opcodes/addressing_mode.d.ts.map +0 -1
  118. package/dest/public/avm/opcodes/arithmetic.d.ts +0 -37
  119. package/dest/public/avm/opcodes/arithmetic.d.ts.map +0 -1
  120. package/dest/public/avm/opcodes/bitwise.d.ts +0 -50
  121. package/dest/public/avm/opcodes/bitwise.d.ts.map +0 -1
  122. package/dest/public/avm/opcodes/comparators.d.ts +0 -25
  123. package/dest/public/avm/opcodes/comparators.d.ts.map +0 -1
  124. package/dest/public/avm/opcodes/contract.d.ts +0 -21
  125. package/dest/public/avm/opcodes/contract.d.ts.map +0 -1
  126. package/dest/public/avm/opcodes/control_flow.d.ts +0 -41
  127. package/dest/public/avm/opcodes/control_flow.d.ts.map +0 -1
  128. package/dest/public/avm/opcodes/conversion.d.ts +0 -17
  129. package/dest/public/avm/opcodes/conversion.d.ts.map +0 -1
  130. package/dest/public/avm/opcodes/ec_add.d.ts +0 -19
  131. package/dest/public/avm/opcodes/ec_add.d.ts.map +0 -1
  132. package/dest/public/avm/opcodes/environment_getters.d.ts +0 -28
  133. package/dest/public/avm/opcodes/environment_getters.d.ts.map +0 -1
  134. package/dest/public/avm/opcodes/external_calls.d.ts +0 -50
  135. package/dest/public/avm/opcodes/external_calls.d.ts.map +0 -1
  136. package/dest/public/avm/opcodes/hashing.d.ts +0 -36
  137. package/dest/public/avm/opcodes/hashing.d.ts.map +0 -1
  138. package/dest/public/avm/opcodes/index.d.ts +0 -16
  139. package/dest/public/avm/opcodes/index.d.ts.map +0 -1
  140. package/dest/public/avm/opcodes/instruction.d.ts +0 -70
  141. package/dest/public/avm/opcodes/instruction.d.ts.map +0 -1
  142. package/dest/public/avm/opcodes/instruction_impl.d.ts +0 -19
  143. package/dest/public/avm/opcodes/instruction_impl.d.ts.map +0 -1
  144. package/dest/public/avm/opcodes/memory.d.ts +0 -74
  145. package/dest/public/avm/opcodes/memory.d.ts.map +0 -1
  146. package/dest/public/avm/opcodes/misc.d.ts +0 -17
  147. package/dest/public/avm/opcodes/misc.d.ts.map +0 -1
  148. package/dest/public/avm/opcodes/storage.d.ts +0 -24
  149. package/dest/public/avm/opcodes/storage.d.ts.map +0 -1
  150. package/dest/public/avm/serialization/buffer_cursor.d.ts +0 -28
  151. package/dest/public/avm/serialization/buffer_cursor.d.ts.map +0 -1
  152. package/dest/public/avm/serialization/bytecode_serialization.d.ts +0 -21
  153. package/dest/public/avm/serialization/bytecode_serialization.d.ts.map +0 -1
  154. package/dest/public/avm/serialization/instruction_serialization.d.ts +0 -104
  155. package/dest/public/avm/serialization/instruction_serialization.d.ts.map +0 -1
  156. package/dest/public/avm/test_utils.d.ts +0 -18
  157. package/dest/public/avm/test_utils.d.ts.map +0 -1
  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/execution.d.ts +0 -108
  161. package/dest/public/execution.d.ts.map +0 -1
  162. package/dest/public/executor_metrics.d.ts +0 -13
  163. package/dest/public/executor_metrics.d.ts.map +0 -1
  164. package/dest/public/fixtures/index.d.ts +0 -3
  165. package/dest/public/fixtures/index.d.ts.map +0 -1
  166. package/dest/public/fixtures/public_tx_simulation_tester.d.ts +0 -32
  167. package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +0 -1
  168. package/dest/public/fixtures/utils.d.ts +0 -13
  169. package/dest/public/fixtures/utils.d.ts.map +0 -1
  170. package/dest/public/index.d.ts +0 -10
  171. package/dest/public/index.d.ts.map +0 -1
  172. package/dest/public/public_db_sources.d.ts +0 -129
  173. package/dest/public/public_db_sources.d.ts.map +0 -1
  174. package/dest/public/public_processor/public_processor.d.ts +0 -74
  175. package/dest/public/public_processor/public_processor.d.ts.map +0 -1
  176. package/dest/public/public_processor/public_processor_metrics.d.ts +0 -27
  177. package/dest/public/public_processor/public_processor_metrics.d.ts.map +0 -1
  178. package/dest/public/public_tx_simulator/public_tx_context.d.ts +0 -137
  179. package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +0 -1
  180. package/dest/public/public_tx_simulator/public_tx_simulator.d.ts +0 -102
  181. package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +0 -1
  182. package/dest/public/side_effect_errors.d.ts +0 -4
  183. package/dest/public/side_effect_errors.d.ts.map +0 -1
  184. package/dest/public/side_effect_trace.d.ts +0 -132
  185. package/dest/public/side_effect_trace.d.ts.map +0 -1
  186. package/dest/public/side_effect_trace_interface.d.ts +0 -34
  187. package/dest/public/side_effect_trace_interface.d.ts.map +0 -1
  188. package/dest/public/tx_contract_cache.d.ts +0 -41
  189. package/dest/public/tx_contract_cache.d.ts.map +0 -1
  190. package/dest/public/unique_class_ids.d.ts +0 -37
  191. package/dest/public/unique_class_ids.d.ts.map +0 -1
  192. package/dest/public/utils.d.ts +0 -5
  193. package/dest/public/utils.d.ts.map +0 -1
  194. package/dest/server.d.ts +0 -6
  195. package/dest/server.d.ts.map +0 -1
  196. package/dest/test/utils.d.ts +0 -13
  197. package/dest/test/utils.d.ts.map +0 -1
  198. /package/dest/private/{db_oracle.js → execution_data_provider.js} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"simple_contract_data_source.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/fixtures/simple_contract_data_source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,cAAc,EACf,MAAM,wBAAwB,CAAC;AAIhC;;;;;;GAMG;AACH,qBAAa,wBAAyB,YAAW,kBAAkB;IAC1D,MAAM,yCAA+C;IAG5D,OAAO,CAAC,eAAe,CAA+C;IAEtE,OAAO,CAAC,iBAAiB,CAAuD;IAEhF,OAAO,CAAC,iBAAiB,CAA4C;IAIrE;;;OAGG;IACG,cAAc,CAClB,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,mBAAmB,EAClC,gBAAgB,EAAE,2BAA2B;IAO/C,mBAAmB,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAMlE,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC;IAI/F,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC,gBAAgB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAIlE,qBAAqB,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAIvD,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC;IAIpF,mBAAmB,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;IAI9B,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAWvF,uBAAuB,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAI7F,kCAAkC,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhG,gBAAgB,CAAC,aAAa,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnE,mBAAmB,CAAC,gBAAgB,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;CAIlF"}
@@ -1,4 +0,0 @@
1
- export * from './avm_simulator.js';
2
- export * from './journal/index.js';
3
- export * from './fixtures/simple_contract_data_source.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/public/avm/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2CAA2C,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './journal.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/journal/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,209 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Fr } from '@aztec/foundation/fields';
4
- import type { IndexedTreeLeafPreimage } from '@aztec/foundation/trees';
5
- import { AvmPublicDataReadTreeHint } from '@aztec/stdlib/avm';
6
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
7
- import { SerializableContractInstance } from '@aztec/stdlib/contract';
8
- import type { ContractClassWithCommitment } from '@aztec/stdlib/contract';
9
- import type { IndexedTreeId, MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
10
- import type { PublicCallRequest } from '@aztec/stdlib/kernel';
11
- import { PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees';
12
- import type { WorldStateDB } from '../../../public/public_db_sources.js';
13
- import type { PublicSideEffectTraceInterface } from '../../side_effect_trace_interface.js';
14
- import type { AvmExecutionEnvironment } from '../avm_execution_environment.js';
15
- import { NullifierManager } from './nullifiers.js';
16
- import { PublicStorage } from './public_storage.js';
17
- /**
18
- * The result of fetching a leaf from an indexed tree. Contains the preimage and wether the leaf was already present
19
- * or it's a low leaf.
20
- */
21
- type GetLeafResult<T extends IndexedTreeLeafPreimage> = {
22
- preimage: T;
23
- leafOrLowLeafIndex: bigint;
24
- alreadyPresent: boolean;
25
- };
26
- /**
27
- * A class to manage persistable AVM state for contract calls.
28
- * Maintains a cache of the current world state,
29
- * a trace of all side effects.
30
- *
31
- * The simulator should make any world state / tree queries through this object.
32
- *
33
- * Manages merging of successful/reverted child state into current state.
34
- */
35
- export declare class AvmPersistableStateManager {
36
- /** Reference to node storage */
37
- private readonly worldStateDB;
38
- /** Side effect trace */
39
- readonly trace: PublicSideEffectTraceInterface;
40
- /** Public storage, including cached writes */
41
- private readonly publicStorage;
42
- /** Nullifier set, including cached/recently-emitted nullifiers */
43
- private readonly nullifiers;
44
- private readonly doMerkleOperations;
45
- /** DB interface for merkle tree operations */
46
- db: MerkleTreeWriteOperations;
47
- readonly firstNullifier: Fr;
48
- private readonly log;
49
- /** Make sure a forked state is never merged twice. */
50
- private alreadyMergedIntoParent;
51
- constructor(
52
- /** Reference to node storage */
53
- worldStateDB: WorldStateDB,
54
- /** Side effect trace */
55
- trace: PublicSideEffectTraceInterface,
56
- /** Public storage, including cached writes */
57
- publicStorage: PublicStorage,
58
- /** Nullifier set, including cached/recently-emitted nullifiers */
59
- nullifiers: NullifierManager, doMerkleOperations: boolean,
60
- /** DB interface for merkle tree operations */
61
- db: MerkleTreeWriteOperations, firstNullifier: Fr);
62
- /**
63
- * Create a new state manager
64
- */
65
- static create(worldStateDB: WorldStateDB, trace: PublicSideEffectTraceInterface, doMerkleOperations: boolean | undefined, firstNullifier: Fr): AvmPersistableStateManager;
66
- /**
67
- * Create a new state manager forked from this one
68
- */
69
- fork(): Promise<AvmPersistableStateManager>;
70
- /**
71
- * Accept forked world state modifications & traced side effects / hints
72
- */
73
- merge(forkedState: AvmPersistableStateManager): Promise<void>;
74
- /**
75
- * Reject forked world state modifications & traced side effects, keep traced hints
76
- */
77
- reject(forkedState: AvmPersistableStateManager): Promise<void>;
78
- private _merge;
79
- /**
80
- * Write to public storage, journal/trace the write.
81
- *
82
- * @param contractAddress - the address of the contract whose storage is being written to
83
- * @param slot - the slot in the contract's storage being written to
84
- * @param value - the value being written to the slot
85
- */
86
- writeStorage(contractAddress: AztecAddress, slot: Fr, value: Fr, protocolWrite?: boolean): Promise<void>;
87
- /**
88
- * Read from public storage, trace the read.
89
- *
90
- * @param contractAddress - the address of the contract whose storage is being read from
91
- * @param slot - the slot in the contract's storage being read from
92
- * @returns the latest value written to slot, or 0 if never written to before
93
- */
94
- readStorage(contractAddress: AztecAddress, slot: Fr): Promise<Fr>;
95
- getPublicDataMembership(contractAddress: AztecAddress, slot: Fr): Promise<{
96
- value: Fr;
97
- leafPreimage: PublicDataTreeLeafPreimage;
98
- leafIndex: Fr;
99
- leafPath: Fr[];
100
- }>;
101
- /**
102
- * Read from public storage, don't trace the read.
103
- *
104
- * @param contractAddress - the address of the contract whose storage is being read from
105
- * @param slot - the slot in the contract's storage being read from
106
- * @returns the latest value written to slot, or 0 if never written to before
107
- */
108
- peekStorage(contractAddress: AztecAddress, slot: Fr): Promise<Fr>;
109
- /**
110
- * Check if a note hash exists at the given leaf index, trace the check.
111
- *
112
- * @param contractAddress - the address of the contract whose storage is being read from
113
- * @param noteHash - the unsiloed note hash being checked
114
- * @param leafIndex - the leaf index being checked
115
- * @returns true if the note hash exists at the given leaf index, false otherwise
116
- */
117
- checkNoteHashExists(contractAddress: AztecAddress, noteHash: Fr, leafIndex: Fr): Promise<boolean>;
118
- /**
119
- * Write a raw note hash, silo it and make it unique, then trace the write.
120
- * @param noteHash - the unsiloed note hash to write
121
- */
122
- writeNoteHash(contractAddress: AztecAddress, noteHash: Fr): Promise<void>;
123
- /**
124
- * Write a note hash, make it unique, trace the write.
125
- * @param siloedNoteHash - the non unique note hash to write
126
- */
127
- writeSiloedNoteHash(siloedNoteHash: Fr): Promise<void>;
128
- /**
129
- * Write a note hash, trace the write.
130
- * @param uniqueNoteHash - the siloed unique hash to write
131
- */
132
- writeUniqueNoteHash(uniqueNoteHash: Fr): Promise<void>;
133
- /**
134
- * Check if a nullifier exists, trace the check.
135
- * @param contractAddress - address of the contract that the nullifier is associated with
136
- * @param nullifier - the unsiloed nullifier to check
137
- * @returns exists - whether the nullifier exists in the nullifier set
138
- */
139
- checkNullifierExists(contractAddress: AztecAddress, nullifier: Fr): Promise<boolean>;
140
- /**
141
- * Helper to get membership information for a siloed nullifier when checking its existence.
142
- * Optionally trace the nullifier check.
143
- *
144
- * @param siloedNullifier - the siloed nullifier to get membership information for
145
- * @returns
146
- * - exists - whether the nullifier exists in the nullifier set
147
- * - leafOrLowLeafPreimage - the preimage of the nullifier leaf or its low-leaf if it doesn't exist
148
- * - leafOrLowLeafIndex - the leaf index of the nullifier leaf or its low-leaf if it doesn't exist
149
- * - leafOrLowLeafPath - the sibling path of the nullifier leaf or its low-leaf if it doesn't exist
150
- */
151
- private getNullifierMembership;
152
- /**
153
- * Write a nullifier to the nullifier set, trace the write.
154
- * @param contractAddress - address of the contract that the nullifier is associated with
155
- * @param nullifier - the unsiloed nullifier to write
156
- */
157
- writeNullifier(contractAddress: AztecAddress, nullifier: Fr): Promise<void>;
158
- /**
159
- * Write a nullifier to the nullifier set, trace the write.
160
- * @param siloedNullifier - the siloed nullifier to write
161
- */
162
- writeSiloedNullifier(siloedNullifier: Fr): Promise<void>;
163
- writeSiloedNullifiersFromPrivate(siloedNullifiers: Fr[]): Promise<void>;
164
- /**
165
- * Check if an L1 to L2 message exists, trace the check.
166
- * @param msgHash - the message hash to check existence of
167
- * @param msgLeafIndex - the message leaf index to use in the check
168
- * @returns exists - whether the message exists in the L1 to L2 Messages tree
169
- */
170
- checkL1ToL2MessageExists(contractAddress: AztecAddress, msgHash: Fr, msgLeafIndex: Fr): Promise<boolean>;
171
- /**
172
- * Write an L2 to L1 message.
173
- * @param contractAddress - L2 contract address that created this message
174
- * @param recipient - L1 contract address to send the message to.
175
- * @param content - Message content.
176
- */
177
- writeL2ToL1Message(contractAddress: AztecAddress, recipient: Fr, content: Fr): void;
178
- /**
179
- * Write a public log
180
- * @param contractAddress - address of the contract that emitted the log
181
- * @param log - log contents
182
- */
183
- writePublicLog(contractAddress: AztecAddress, log: Fr[]): void;
184
- /**
185
- * Get a contract instance.
186
- * @param contractAddress - address of the contract instance to retrieve.
187
- * @returns the contract instance or undefined if it does not exist.
188
- */
189
- getContractInstance(contractAddress: AztecAddress): Promise<SerializableContractInstance | undefined>;
190
- /**
191
- * Get a contract class.
192
- * @param classId - class id to retrieve.
193
- * @returns the contract class or undefined if it does not exist.
194
- */
195
- getContractClass(classId: Fr): Promise<ContractClassWithCommitment | undefined>;
196
- /**
197
- * Get a contract's bytecode from the contracts DB, also trace the contract class and instance indirectly.
198
- */
199
- getBytecode(contractAddress: AztecAddress): Promise<Buffer | undefined>;
200
- getContractUpdateHints(contractAddress: AztecAddress): Promise<{
201
- updateMembership: AvmPublicDataReadTreeHint;
202
- updatePreimage: Fr[];
203
- }>;
204
- traceEnqueuedCall(publicCallRequest: PublicCallRequest, calldata: Fr[], reverted: boolean): void;
205
- getPublicFunctionDebugName(avmEnvironment: AvmExecutionEnvironment): Promise<string>;
206
- getLeafOrLowLeafInfo<ID extends IndexedTreeId, T extends IndexedTreeLeafPreimage>(treeId: ID, key: bigint): Promise<GetLeafResult<T>>;
207
- }
208
- export {};
209
- //# s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AE,EAAE,EAAE;IAK9D;;;;OAIG;IACU,mBAAmB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,4BAA4B,GAAG,SAAS,CAAC;IAyClH;;;;OAIG;IACU,gBAAgB,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC;IA4B5F;;OAEG;IACU,WAAW,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAoB9E,sBAAsB,CAAC,eAAe,EAAE,YAAY;;;;IAuCnD,iBAAiB,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO;IAInF,0BAA0B,CAAC,cAAc,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIpF,oBAAoB,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC,SAAS,uBAAuB,EAC3F,MAAM,EAAE,EAAE,EACV,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAiB7B"}
@@ -1,64 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { WorldStateDB } from '../../public_db_sources.js';
3
- /**
4
- * A class to manage new nullifier staging and existence checks during a contract call's AVM simulation.
5
- * Maintains a siloed nullifier cache, and ensures that existence checks fall back to the correct source.
6
- * When a contract call completes, its cached nullifier set can be merged into its parent's.
7
- */
8
- export declare class NullifierManager {
9
- /** Reference to node storage. Checked on parent cache-miss. */
10
- private readonly hostNullifiers;
11
- /** Cache of siloed nullifiers. */
12
- private cache;
13
- /** Parent nullifier manager to fall back on */
14
- private readonly parent?;
15
- constructor(
16
- /** Reference to node storage. Checked on parent cache-miss. */
17
- hostNullifiers: WorldStateDB,
18
- /** Cache of siloed nullifiers. */
19
- cache?: Set<bigint>,
20
- /** Parent nullifier manager to fall back on */
21
- parent?: NullifierManager | undefined);
22
- /**
23
- * Create a new nullifiers manager forked from this one
24
- */
25
- fork(): NullifierManager;
26
- /**
27
- * Get a nullifier's existence in this' cache or parent's (recursively).
28
- * DOES NOT CHECK HOST STORAGE!
29
- * @param siloedNullifier - the nullifier to check for
30
- * @returns exists: whether the nullifier exists in cache here or in parent's
31
- */
32
- private checkExistsHereOrParent;
33
- /**
34
- * Get a nullifier's existence status.
35
- * 1. Check cache.
36
- * 2. Check parent cache.
37
- * 3. Fall back to the host state.
38
- * 4. Not found! Nullifier does not exist.
39
- *
40
- * @param siloedNullifier - the nullifier to check for
41
- * @returns exists: whether the nullifier exists at all,
42
- * cacheHit: whether the nullifier was found in a cache,
43
- */
44
- checkExists(siloedNullifier: Fr): Promise<{
45
- exists: boolean;
46
- cacheHit: boolean;
47
- }>;
48
- /**
49
- * Stage a new nullifier (append it to the cache).
50
- *
51
- * @param siloedNullifier - the nullifier to stage
52
- */
53
- append(siloedNullifier: Fr): Promise<void>;
54
- /**
55
- * Merges another nullifier cache into this one.
56
- *
57
- * @param incomingNullifiers - the incoming cached nullifiers to merge into this instance's
58
- */
59
- acceptAndMerge(incomingNullifiers: NullifierManager): void;
60
- }
61
- export declare class NullifierCollisionError extends Error {
62
- constructor(message: string, ...rest: any[]);
63
- }
64
- //# sourceMappingURL=nullifiers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nullifiers.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/journal/nullifiers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;GAIG;AACH,qBAAa,gBAAgB;IAEzB,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,kCAAkC;IAClC,OAAO,CAAC,KAAK;IACb,+CAA+C;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IALxB,+DAA+D;IAC9C,cAAc,EAAE,YAAY;IAC7C,kCAAkC;IAC1B,KAAK,GAAE,GAAG,CAAC,MAAM,CAAa;IACtC,+CAA+C;IAC9B,MAAM,CAAC,8BAAkB;IAG5C;;OAEG;IACI,IAAI;IAIX;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;;;;;;;;OAUG;IACU,WAAW,CAAC,eAAe,EAAE,EAAE,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAmB9F;;;;OAIG;IACU,MAAM,CAAC,eAAe,EAAE,EAAE;IAQvC;;;;OAIG;IACI,cAAc,CAAC,kBAAkB,EAAE,gBAAgB;CAU3D;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;CAI5C"}
@@ -1,66 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
- import type { PublicStateDB } from '../../../common/db_interfaces.js';
4
- type PublicStorageReadResult = {
5
- value: Fr;
6
- cached: boolean;
7
- };
8
- /**
9
- * A class to manage public storage reads and writes during a contract call's AVM simulation.
10
- * Maintains a storage write cache, and ensures that reads fall back to the correct source.
11
- * When a contract call completes, its storage cache can be merged into its parent's.
12
- */
13
- export declare class PublicStorage {
14
- /** Reference to node storage. Checked on parent cache-miss. */
15
- private readonly hostPublicStorage;
16
- /** Parent's storage. Checked on this' cache-miss. */
17
- private readonly parent?;
18
- /** Cached storage writes. */
19
- private readonly cache;
20
- constructor(
21
- /** Reference to node storage. Checked on parent cache-miss. */
22
- hostPublicStorage: PublicStateDB,
23
- /** Parent's storage. Checked on this' cache-miss. */
24
- parent?: PublicStorage | undefined);
25
- /**
26
- * Create a new public storage manager forked from this one
27
- */
28
- fork(): PublicStorage;
29
- /**
30
- * Read a storage value from this' cache or parent's (recursively).
31
- * DOES NOT CHECK HOST STORAGE!
32
- *
33
- * @param contractAddress - the address of the contract whose storage is being read from
34
- * @param slot - the slot in the contract's storage being read from
35
- * @returns value: the latest value written according to this cache or the parent's. undefined on cache miss.
36
- */
37
- readHereOrParent(contractAddress: AztecAddress, slot: Fr): Fr | undefined;
38
- /**
39
- * Read a value from storage.
40
- * 1. Check cache.
41
- * 2. Check parent cache.
42
- * 3. Fall back to the host state.
43
- * 4. Not found! Value has never been written to before. Flag it as non-existent and return value zero.
44
- *
45
- * @param contractAddress - the address of the contract whose storage is being read from
46
- * @param slot - the slot in the contract's storage being read from
47
- * @returns exists: whether the slot has EVER been written to before, value: the latest value written to slot, or 0 if never written to before
48
- */
49
- read(contractAddress: AztecAddress, slot: Fr): Promise<PublicStorageReadResult>;
50
- /**
51
- * Stage a storage write.
52
- *
53
- * @param contractAddress - the address of the contract whose storage is being written to
54
- * @param slot - the slot in the contract's storage being written to
55
- * @param value - the value being written to the slot
56
- */
57
- write(contractAddress: AztecAddress, slot: Fr, value: Fr): void;
58
- /**
59
- * Merges another PublicStorage's cache (pending writes) into this one.
60
- *
61
- * @param incomingPublicStorage - the incoming public storage to merge into this instance's
62
- */
63
- acceptAndMerge(incomingPublicStorage: PublicStorage): void;
64
- }
65
- export {};
66
- //# sourceMappingURL=public_storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_storage.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/journal/public_storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEtE,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,EAAE,CAAC;IACV,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,aAAa;IAKtB,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,qDAAqD;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAP1B,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;;IAGzC,+DAA+D;IAC9C,iBAAiB,EAAE,aAAa;IACjD,qDAAqD;IACpC,MAAM,CAAC,2BAAe;IAKzC;;OAEG;IACI,IAAI;IAIX;;;;;;;OAOG;IACI,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,SAAS;IAWhF;;;;;;;;;;OAUG;IACU,IAAI,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAmB5F;;;;;;OAMG;IACI,KAAK,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;IAI/D;;;;OAIG;IACI,cAAc,CAAC,qBAAqB,EAAE,aAAa;CAG3D"}
@@ -1,75 +0,0 @@
1
- import type { AvmContext } from '../avm_context.js';
2
- import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
3
- import { Instruction } from './instruction.js';
4
- export declare class NoteHashExists extends Instruction {
5
- private indirect;
6
- private noteHashOffset;
7
- private leafIndexOffset;
8
- private existsOffset;
9
- static type: string;
10
- static readonly opcode: Opcode;
11
- static readonly wireFormat: OperandType[];
12
- constructor(indirect: number, noteHashOffset: number, leafIndexOffset: number, existsOffset: number);
13
- execute(context: AvmContext): Promise<void>;
14
- }
15
- export declare class EmitNoteHash extends Instruction {
16
- private indirect;
17
- private noteHashOffset;
18
- static type: string;
19
- static readonly opcode: Opcode;
20
- static readonly wireFormat: OperandType[];
21
- constructor(indirect: number, noteHashOffset: number);
22
- execute(context: AvmContext): Promise<void>;
23
- }
24
- export declare class NullifierExists extends Instruction {
25
- private indirect;
26
- private nullifierOffset;
27
- private addressOffset;
28
- private existsOffset;
29
- static type: string;
30
- static readonly opcode: Opcode;
31
- static readonly wireFormat: OperandType[];
32
- constructor(indirect: number, nullifierOffset: number, addressOffset: number, existsOffset: number);
33
- execute(context: AvmContext): Promise<void>;
34
- }
35
- export declare class EmitNullifier extends Instruction {
36
- private indirect;
37
- private nullifierOffset;
38
- static type: string;
39
- static readonly opcode: Opcode;
40
- static readonly wireFormat: OperandType[];
41
- constructor(indirect: number, nullifierOffset: number);
42
- execute(context: AvmContext): Promise<void>;
43
- }
44
- export declare class L1ToL2MessageExists extends Instruction {
45
- private indirect;
46
- private msgHashOffset;
47
- private msgLeafIndexOffset;
48
- private existsOffset;
49
- static type: string;
50
- static readonly opcode: Opcode;
51
- static readonly wireFormat: OperandType[];
52
- constructor(indirect: number, msgHashOffset: number, msgLeafIndexOffset: number, existsOffset: number);
53
- execute(context: AvmContext): Promise<void>;
54
- }
55
- export declare class EmitUnencryptedLog extends Instruction {
56
- private indirect;
57
- private logOffset;
58
- private logSizeOffset;
59
- static type: string;
60
- static readonly opcode: Opcode;
61
- static readonly wireFormat: OperandType[];
62
- constructor(indirect: number, logOffset: number, logSizeOffset: number);
63
- execute(context: AvmContext): Promise<void>;
64
- }
65
- export declare class SendL2ToL1Message extends Instruction {
66
- private indirect;
67
- private recipientOffset;
68
- private contentOffset;
69
- static type: string;
70
- static readonly opcode: Opcode;
71
- static readonly wireFormat: OperandType[];
72
- constructor(indirect: number, recipientOffset: number, contentOffset: number);
73
- execute(context: AvmContext): Promise<void>;
74
- }
75
- //# sourceMappingURL=accrued_substate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accrued_substate.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/accrued_substate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CA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,IAAI,CAAC;CAoBzD;AAED,qBAAa,iBAAkB,SAAQ,WAAW;IAMpC,OAAO,CAAC,QAAQ;IAAU,OAAO,CAAC,eAAe;IAAU,OAAO,CAAC,aAAa;IAL5F,MAAM,CAAC,IAAI,EAAE,MAAM,CAAmB;IACtC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAwB;IAEtD,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAkF;gBAExF,QAAQ,EAAE,MAAM,EAAU,eAAe,EAAE,MAAM,EAAU,aAAa,EAAE,MAAM;IAIvF,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBzD"}
@@ -1,27 +0,0 @@
1
- import { type TaggedMemoryInterface } from '../avm_memory_types.js';
2
- export declare enum AddressingMode {
3
- DIRECT = 0,
4
- INDIRECT = 1,
5
- RELATIVE = 2,
6
- INDIRECT_RELATIVE = 3
7
- }
8
- /** A class to represent the addressing mode of an instruction. */
9
- export declare class Addressing {
10
- /** The addressing mode for each operand. The length of this array is the number of operands of the instruction. */
11
- private readonly modePerOperand;
12
- constructor(
13
- /** The addressing mode for each operand. The length of this array is the number of operands of the instruction. */
14
- modePerOperand: AddressingMode[]);
15
- static fromWire(wireModes: number, numOperands?: number): Addressing;
16
- toWire(): number;
17
- /** Returns how many operands use the given addressing mode. */
18
- count(mode: AddressingMode): number;
19
- /**
20
- * Resolves the offsets using the addressing mode.
21
- * @param offsets The offsets to resolve.
22
- * @param mem The memory to use for resolution.
23
- * @returns The resolved offsets. The length of the returned array is the same as the length of the input array.
24
- */
25
- resolve(offsets: number[], mem: TaggedMemoryInterface): number[];
26
- }
27
- //# sourceMappingURL=addressing_mode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addressing_mode.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/addressing_mode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,oBAAY,cAAc;IACxB,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,iBAAiB,IAAI;CACtB;AAED,kEAAkE;AAClE,qBAAa,UAAU;IAEnB,mHAAmH;IACnH,OAAO,CAAC,QAAQ,CAAC,cAAc;;IAD/B,mHAAmH;IAClG,cAAc,EAAE,cAAc,EAAE;WAIrC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,GAAE,MAAU,GAAG,UAAU;IAYvE,MAAM,IAAI,MAAM;IAevB,+DAA+D;IACxD,KAAK,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM;IAI1C;;;;;OAKG;IACI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,qBAAqB,GAAG,MAAM,EAAE;CA4BxE"}
@@ -1,37 +0,0 @@
1
- import type { AvmContext } from '../avm_context.js';
2
- import { type Field, type MemoryValue, type TaggedMemoryInterface } from '../avm_memory_types.js';
3
- import { Opcode } from '../serialization/instruction_serialization.js';
4
- import { ThreeOperandInstruction } from './instruction_impl.js';
5
- export declare abstract class ThreeOperandArithmeticInstruction extends ThreeOperandInstruction {
6
- execute(context: AvmContext): Promise<void>;
7
- protected abstract compute(a: MemoryValue, b: MemoryValue): MemoryValue;
8
- protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
9
- }
10
- export declare class Add extends ThreeOperandArithmeticInstruction {
11
- static readonly type: string;
12
- static readonly opcode = Opcode.ADD_8;
13
- protected compute(a: MemoryValue, b: MemoryValue): MemoryValue;
14
- }
15
- export declare class Sub extends ThreeOperandArithmeticInstruction {
16
- static readonly type: string;
17
- static readonly opcode = Opcode.SUB_8;
18
- protected compute(a: MemoryValue, b: MemoryValue): MemoryValue;
19
- }
20
- export declare class Mul extends ThreeOperandArithmeticInstruction {
21
- static type: string;
22
- static readonly opcode = Opcode.MUL_8;
23
- protected compute(a: MemoryValue, b: MemoryValue): MemoryValue;
24
- }
25
- export declare class Div extends ThreeOperandArithmeticInstruction {
26
- static type: string;
27
- static readonly opcode = Opcode.DIV_8;
28
- protected compute(a: MemoryValue, b: MemoryValue): MemoryValue;
29
- protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
30
- }
31
- export declare class FieldDiv extends ThreeOperandArithmeticInstruction {
32
- static type: string;
33
- static readonly opcode = Opcode.FDIV_8;
34
- protected compute(a: Field, b: Field): Field;
35
- protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
36
- }
37
- //# sourceMappingURL=arithmetic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arithmetic.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/arithmetic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,WAAW,EAEhB,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8BAAsB,iCAAkC,SAAQ,uBAAuB;IACxE,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW;IACvE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAGpF;AAED,qBAAa,GAAI,SAAQ,iCAAiC;IACxD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAS;IACrC,MAAM,CAAC,QAAQ,CAAC,MAAM,gBAAgB;IAEtC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW;CAG/D;AAED,qBAAa,GAAI,SAAQ,iCAAiC;IACxD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAS;IACrC,MAAM,CAAC,QAAQ,CAAC,MAAM,gBAAgB;IAEtC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW;CAG/D;AAED,qBAAa,GAAI,SAAQ,iCAAiC;IACxD,MAAM,CAAC,IAAI,EAAE,MAAM,CAAS;IAC5B,MAAM,CAAC,QAAQ,CAAC,MAAM,gBAAgB;IAEtC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW;CAG/D;AAED,qBAAa,GAAI,SAAQ,iCAAiC;IACxD,MAAM,CAAC,IAAI,EAAE,MAAM,CAAS;IAC5B,MAAM,CAAC,QAAQ,CAAC,MAAM,gBAAgB;IAEtC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW;cAQ3C,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI7F;AAED,qBAAa,QAAS,SAAQ,iCAAiC;IAC7D,MAAM,CAAC,IAAI,EAAE,MAAM,CAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,MAAM,iBAAiB;IAEvC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK;cAKzB,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI7F"}
@@ -1,50 +0,0 @@
1
- import type { AvmContext } from '../avm_context.js';
2
- import { type IntegralValue, type TaggedMemoryInterface } from '../avm_memory_types.js';
3
- import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
4
- import { Instruction } from './instruction.js';
5
- import { ThreeOperandInstruction } from './instruction_impl.js';
6
- declare abstract class ThreeOperandBitwiseInstruction extends ThreeOperandInstruction {
7
- execute(context: AvmContext): Promise<void>;
8
- protected abstract compute(a: IntegralValue, b: IntegralValue): IntegralValue;
9
- protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
10
- }
11
- export declare class And extends ThreeOperandBitwiseInstruction {
12
- static readonly type: string;
13
- static readonly opcode = Opcode.AND_8;
14
- protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
15
- }
16
- export declare class Or extends ThreeOperandBitwiseInstruction {
17
- static readonly type: string;
18
- static readonly opcode = Opcode.OR_8;
19
- protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
20
- }
21
- export declare class Xor extends ThreeOperandBitwiseInstruction {
22
- static readonly type: string;
23
- static readonly opcode = Opcode.XOR_8;
24
- protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
25
- }
26
- export declare class Shl extends ThreeOperandBitwiseInstruction {
27
- static readonly type: string;
28
- static readonly opcode = Opcode.SHL_8;
29
- protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
30
- protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
31
- }
32
- export declare class Shr extends ThreeOperandBitwiseInstruction {
33
- static readonly type: string;
34
- static readonly opcode = Opcode.SHR_8;
35
- protected compute(a: IntegralValue, b: IntegralValue): IntegralValue;
36
- protected checkTags(memory: TaggedMemoryInterface, aOffset: number, bOffset: number): void;
37
- }
38
- export declare class Not extends Instruction {
39
- private indirect;
40
- private srcOffset;
41
- private dstOffset;
42
- static readonly type: string;
43
- static readonly opcode = Opcode.NOT_8;
44
- static readonly wireFormat8: OperandType[];
45
- static readonly wireFormat16: OperandType[];
46
- constructor(indirect: number, srcOffset: number, dstOffset: number);
47
- execute(context: AvmContext): Promise<void>;
48
- }
49
- export {};
50
- //# sourceMappingURL=bitwise.d.ts.map
@@ -1 +0,0 @@
1
- {"version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../avm_memory_types.js';
3
- import { Opcode } from '../serialization/instruction_serialization.js';
4
- import { ThreeOperandInstruction } from './instruction_impl.js';
5
- declare abstract class ComparatorInstruction extends ThreeOperandInstruction {
6
- execute(context: AvmContext): Promise<void>;
7
- protected abstract compare(a: MemoryValue, b: MemoryValue): boolean;
8
- }
9
- export declare class Eq extends ComparatorInstruction {
10
- static readonly type: string;
11
- static readonly opcode = Opcode.EQ_8;
12
- protected compare(a: MemoryValue, b: MemoryValue): boolean;
13
- }
14
- export declare class Lt extends ComparatorInstruction {
15
- static readonly type: string;
16
- static readonly opcode = Opcode.LT_8;
17
- protected compare(a: MemoryValue, b: MemoryValue): boolean;
18
- }
19
- export declare class Lte extends ComparatorInstruction {
20
- static readonly type: string;
21
- static readonly opcode = Opcode.LTE_8;
22
- protected compare(a: MemoryValue, b: MemoryValue): boolean;
23
- }
24
- export {};
25
- //# sourceMappingURL=comparators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"comparators.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/opcodes/comparators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,uBAAe,qBAAsB,SAAQ,uBAAuB;IACrD,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO;CACpE;AAED,qBAAa,EAAG,SAAQ,qBAAqB;IAC3C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAQ;IACpC,MAAM,CAAC,QAAQ,CAAC,MAAM,e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