@aztec/simulator 0.32.0 → 0.32.1

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 (165) hide show
  1. package/dest/acvm/acvm.d.ts +5 -5
  2. package/dest/acvm/acvm.d.ts.map +1 -1
  3. package/dest/acvm/acvm_types.d.ts +1 -1
  4. package/dest/acvm/acvm_types.d.ts.map +1 -1
  5. package/dest/acvm/deserialize.d.ts +1 -1
  6. package/dest/acvm/deserialize.d.ts.map +1 -1
  7. package/dest/acvm/oracle/debug.d.ts +2 -2
  8. package/dest/acvm/oracle/debug.d.ts.map +1 -1
  9. package/dest/acvm/oracle/index.d.ts +1 -1
  10. package/dest/acvm/oracle/index.d.ts.map +1 -1
  11. package/dest/acvm/oracle/oracle.d.ts +2 -2
  12. package/dest/acvm/oracle/oracle.d.ts.map +1 -1
  13. package/dest/acvm/oracle/typed_oracle.d.ts +6 -6
  14. package/dest/acvm/oracle/typed_oracle.d.ts.map +1 -1
  15. package/dest/acvm/serialize.d.ts +4 -4
  16. package/dest/acvm/serialize.d.ts.map +1 -1
  17. package/dest/acvm/serialize.js +1 -1
  18. package/dest/avm/avm_context.d.ts +4 -4
  19. package/dest/avm/avm_context.d.ts.map +1 -1
  20. package/dest/avm/avm_context.js +1 -1
  21. package/dest/avm/avm_execution_environment.d.ts +4 -4
  22. package/dest/avm/avm_execution_environment.d.ts.map +1 -1
  23. package/dest/avm/avm_execution_environment.js +1 -1
  24. package/dest/avm/avm_machine_state.d.ts +2 -2
  25. package/dest/avm/avm_machine_state.d.ts.map +1 -1
  26. package/dest/avm/avm_machine_state.js +1 -1
  27. package/dest/avm/avm_memory_types.d.ts +1 -1
  28. package/dest/avm/avm_memory_types.d.ts.map +1 -1
  29. package/dest/avm/avm_memory_types.js +1 -1
  30. package/dest/avm/avm_message_call_result.d.ts +1 -1
  31. package/dest/avm/avm_message_call_result.d.ts.map +1 -1
  32. package/dest/avm/avm_simulator.js +1 -1
  33. package/dest/avm/errors.d.ts +1 -1
  34. package/dest/avm/errors.d.ts.map +1 -1
  35. package/dest/avm/fixtures/index.d.ts +1 -1
  36. package/dest/avm/fixtures/index.d.ts.map +1 -1
  37. package/dest/avm/fixtures/index.js +2 -2
  38. package/dest/avm/journal/host_storage.d.ts +1 -1
  39. package/dest/avm/journal/host_storage.d.ts.map +1 -1
  40. package/dest/avm/journal/journal.d.ts +2 -2
  41. package/dest/avm/journal/journal.d.ts.map +1 -1
  42. package/dest/avm/journal/trace.d.ts +1 -1
  43. package/dest/avm/journal/trace.d.ts.map +1 -1
  44. package/dest/avm/journal/trace_types.d.ts +1 -1
  45. package/dest/avm/journal/trace_types.d.ts.map +1 -1
  46. package/dest/avm/opcodes/addressing_mode.d.ts +1 -1
  47. package/dest/avm/opcodes/addressing_mode.d.ts.map +1 -1
  48. package/dest/avm/opcodes/arithmetic.d.ts +2 -2
  49. package/dest/avm/opcodes/arithmetic.d.ts.map +1 -1
  50. package/dest/avm/opcodes/arithmetic.js +1 -1
  51. package/dest/avm/opcodes/environment_getters.d.ts +1 -1
  52. package/dest/avm/opcodes/environment_getters.d.ts.map +1 -1
  53. package/dest/avm/opcodes/hashing.d.ts +1 -1
  54. package/dest/avm/opcodes/hashing.d.ts.map +1 -1
  55. package/dest/avm/opcodes/instruction.d.ts +3 -3
  56. package/dest/avm/opcodes/instruction.d.ts.map +1 -1
  57. package/dest/avm/opcodes/instruction.js +1 -1
  58. package/dest/avm/opcodes/memory.d.ts +1 -1
  59. package/dest/avm/opcodes/memory.d.ts.map +1 -1
  60. package/dest/avm/opcodes/memory.js +1 -1
  61. package/dest/avm/temporary_executor_migration.d.ts +4 -4
  62. package/dest/avm/temporary_executor_migration.d.ts.map +1 -1
  63. package/dest/client/client_execution_context.d.ts +11 -11
  64. package/dest/client/client_execution_context.d.ts.map +1 -1
  65. package/dest/client/client_execution_context.js +1 -1
  66. package/dest/client/db_oracle.d.ts +9 -9
  67. package/dest/client/db_oracle.d.ts.map +1 -1
  68. package/dest/client/db_oracle.js +1 -1
  69. package/dest/client/execution_note_cache.d.ts +2 -2
  70. package/dest/client/execution_note_cache.d.ts.map +1 -1
  71. package/dest/client/execution_result.d.ts +5 -5
  72. package/dest/client/execution_result.d.ts.map +1 -1
  73. package/dest/client/execution_result.js +1 -1
  74. package/dest/client/pick_notes.d.ts +1 -1
  75. package/dest/client/pick_notes.d.ts.map +1 -1
  76. package/dest/client/pick_notes.js +1 -1
  77. package/dest/client/private_execution.d.ts +5 -5
  78. package/dest/client/private_execution.d.ts.map +1 -1
  79. package/dest/client/private_execution.js +1 -1
  80. package/dest/client/simulator.d.ts +6 -6
  81. package/dest/client/simulator.d.ts.map +1 -1
  82. package/dest/client/simulator.js +1 -1
  83. package/dest/client/unconstrained_execution.d.ts +5 -5
  84. package/dest/client/unconstrained_execution.d.ts.map +1 -1
  85. package/dest/client/unconstrained_execution.js +1 -1
  86. package/dest/client/view_data_oracle.d.ts +6 -6
  87. package/dest/client/view_data_oracle.d.ts.map +1 -1
  88. package/dest/client/view_data_oracle.js +1 -1
  89. package/dest/common/errors.d.ts +1 -1
  90. package/dest/common/errors.d.ts.map +1 -1
  91. package/dest/common/errors.js +1 -1
  92. package/dest/public/db.d.ts +6 -6
  93. package/dest/public/db.d.ts.map +1 -1
  94. package/dest/public/execution.d.ts +2 -2
  95. package/dest/public/execution.d.ts.map +1 -1
  96. package/dest/public/executor.d.ts +3 -3
  97. package/dest/public/executor.d.ts.map +1 -1
  98. package/dest/public/executor.js +1 -1
  99. package/dest/public/public_execution_context.d.ts +7 -7
  100. package/dest/public/public_execution_context.d.ts.map +1 -1
  101. package/dest/public/public_execution_context.js +3 -3
  102. package/dest/public/state_actions.d.ts +2 -2
  103. package/dest/public/state_actions.d.ts.map +1 -1
  104. package/dest/simulator/acvm_native.d.ts +3 -3
  105. package/dest/simulator/acvm_native.d.ts.map +1 -1
  106. package/dest/simulator/acvm_wasm.d.ts +3 -3
  107. package/dest/simulator/acvm_wasm.d.ts.map +1 -1
  108. package/dest/simulator/acvm_wasm.js +2 -2
  109. package/dest/simulator/simulation_provider.d.ts +2 -2
  110. package/dest/simulator/simulation_provider.d.ts.map +1 -1
  111. package/dest/test/utils.d.ts +1 -1
  112. package/dest/test/utils.d.ts.map +1 -1
  113. package/dest/test/utils.js +1 -1
  114. package/dest/utils.d.ts +1 -1
  115. package/dest/utils.d.ts.map +1 -1
  116. package/package.json +5 -5
  117. package/src/acvm/acvm.ts +8 -8
  118. package/src/acvm/acvm_types.ts +1 -1
  119. package/src/acvm/deserialize.ts +1 -1
  120. package/src/acvm/oracle/debug.ts +2 -2
  121. package/src/acvm/oracle/index.ts +1 -1
  122. package/src/acvm/oracle/oracle.ts +2 -2
  123. package/src/acvm/oracle/typed_oracle.ts +18 -18
  124. package/src/acvm/serialize.ts +4 -4
  125. package/src/avm/avm_context.ts +4 -4
  126. package/src/avm/avm_execution_environment.ts +4 -4
  127. package/src/avm/avm_machine_state.ts +2 -2
  128. package/src/avm/avm_memory_types.ts +1 -1
  129. package/src/avm/avm_message_call_result.ts +1 -1
  130. package/src/avm/avm_simulator.ts +1 -1
  131. package/src/avm/errors.ts +1 -1
  132. package/src/avm/fixtures/index.ts +6 -1
  133. package/src/avm/journal/host_storage.ts +1 -1
  134. package/src/avm/journal/journal.ts +2 -2
  135. package/src/avm/journal/trace.ts +1 -1
  136. package/src/avm/journal/trace_types.ts +1 -1
  137. package/src/avm/opcodes/addressing_mode.ts +1 -1
  138. package/src/avm/opcodes/arithmetic.ts +2 -2
  139. package/src/avm/opcodes/bitwise.ts +1 -1
  140. package/src/avm/opcodes/control_flow.ts +1 -1
  141. package/src/avm/opcodes/environment_getters.ts +1 -1
  142. package/src/avm/opcodes/hashing.ts +1 -1
  143. package/src/avm/opcodes/instruction.ts +3 -3
  144. package/src/avm/opcodes/memory.ts +1 -1
  145. package/src/avm/temporary_executor_migration.ts +6 -6
  146. package/src/client/client_execution_context.ts +15 -15
  147. package/src/client/db_oracle.ts +16 -10
  148. package/src/client/execution_note_cache.ts +2 -2
  149. package/src/client/execution_result.ts +9 -5
  150. package/src/client/pick_notes.ts +1 -1
  151. package/src/client/private_execution.ts +5 -5
  152. package/src/client/simulator.ts +8 -8
  153. package/src/client/unconstrained_execution.ts +5 -5
  154. package/src/client/view_data_oracle.ts +11 -11
  155. package/src/common/errors.ts +1 -1
  156. package/src/public/db.ts +6 -6
  157. package/src/public/execution.ts +10 -10
  158. package/src/public/executor.ts +3 -3
  159. package/src/public/public_execution_context.ts +17 -7
  160. package/src/public/state_actions.ts +2 -2
  161. package/src/simulator/acvm_native.ts +3 -3
  162. package/src/simulator/acvm_wasm.ts +8 -4
  163. package/src/simulator/simulation_provider.ts +2 -2
  164. package/src/test/utils.ts +1 -1
  165. package/src/utils.ts +1 -1
@@ -1,16 +1,16 @@
1
- import { SimulationError, UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
1
+ import { type SimulationError, type UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
2
2
  import {
3
- AztecAddress,
4
- ContractStorageRead,
5
- ContractStorageUpdateRequest,
6
- Fr,
7
- L2ToL1Message,
8
- PublicCallRequest,
3
+ type AztecAddress,
4
+ type ContractStorageRead,
5
+ type ContractStorageUpdateRequest,
6
+ type Fr,
7
+ type L2ToL1Message,
8
+ type PublicCallRequest,
9
9
  PublicDataRead,
10
10
  PublicDataUpdateRequest,
11
- ReadRequest,
12
- SideEffect,
13
- SideEffectLinkedToNoteHash,
11
+ type ReadRequest,
12
+ type SideEffect,
13
+ type SideEffectLinkedToNoteHash,
14
14
  } from '@aztec/circuits.js';
15
15
  import { computePublicDataTreeLeafSlot, computePublicDataTreeValue } from '@aztec/circuits.js/hash';
16
16
 
@@ -1,5 +1,5 @@
1
1
  import { UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
2
- import { Fr, GlobalVariables, Header, PublicCircuitPublicInputs } from '@aztec/circuits.js';
2
+ import { Fr, type GlobalVariables, type Header, PublicCircuitPublicInputs } from '@aztec/circuits.js';
3
3
  import { createDebugLogger } from '@aztec/foundation/log';
4
4
 
5
5
  import { spawn } from 'child_process';
@@ -20,8 +20,8 @@ import { AcirSimulator } from '../client/simulator.js';
20
20
  import { ExecutionError, createSimulationError } from '../common/errors.js';
21
21
  import { SideEffectCounter } from '../common/index.js';
22
22
  import { PackedArgsCache } from '../common/packed_args_cache.js';
23
- import { CommitmentsDB, PublicContractsDB, PublicStateDB } from './db.js';
24
- import { PublicExecution, PublicExecutionResult, checkValidStaticCall } from './execution.js';
23
+ import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js';
24
+ import { type PublicExecution, type PublicExecutionResult, checkValidStaticCall } from './execution.js';
25
25
  import { PublicExecutionContext } from './public_execution_context.js';
26
26
 
27
27
  /**
@@ -1,15 +1,25 @@
1
- import { NullifierMembershipWitness, UnencryptedFunctionL2Logs, UnencryptedL2Log } from '@aztec/circuit-types';
2
- import { CallContext, FunctionData, FunctionSelector, GlobalVariables, Header } from '@aztec/circuits.js';
3
- import { AztecAddress } from '@aztec/foundation/aztec-address';
1
+ import {
2
+ type NullifierMembershipWitness,
3
+ UnencryptedFunctionL2Logs,
4
+ type UnencryptedL2Log,
5
+ } from '@aztec/circuit-types';
6
+ import {
7
+ CallContext,
8
+ FunctionData,
9
+ type FunctionSelector,
10
+ type GlobalVariables,
11
+ type Header,
12
+ } from '@aztec/circuits.js';
13
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
4
14
  import { EthAddress } from '@aztec/foundation/eth-address';
5
15
  import { Fr } from '@aztec/foundation/fields';
6
16
  import { createDebugLogger } from '@aztec/foundation/log';
7
- import { ContractInstance } from '@aztec/types/contracts';
17
+ import { type ContractInstance } from '@aztec/types/contracts';
8
18
 
9
19
  import { TypedOracle, toACVMWitness } from '../acvm/index.js';
10
- import { PackedArgsCache, SideEffectCounter } from '../common/index.js';
11
- import { CommitmentsDB, PublicContractsDB, PublicStateDB } from './db.js';
12
- import { PublicExecution, PublicExecutionResult, checkValidStaticCall } from './execution.js';
20
+ import { type PackedArgsCache, type SideEffectCounter } from '../common/index.js';
21
+ import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js';
22
+ import { type PublicExecution, type PublicExecutionResult, checkValidStaticCall } from './execution.js';
13
23
  import { executePublicFunction } from './executor.js';
14
24
  import { ContractStorageActionsCollector } from './state_actions.js';
15
25
 
@@ -1,8 +1,8 @@
1
1
  import { ContractStorageRead, ContractStorageUpdateRequest } from '@aztec/circuits.js';
2
- import { AztecAddress } from '@aztec/foundation/aztec-address';
2
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
3
3
  import { Fr } from '@aztec/foundation/fields';
4
4
 
5
- import { PublicStateDB } from './db.js';
5
+ import { type PublicStateDB } from './db.js';
6
6
 
7
7
  /**
8
8
  * Implements read/write operations on a contract public storage, collecting
@@ -1,11 +1,11 @@
1
1
  import { randomBytes } from '@aztec/foundation/crypto';
2
- import { NoirCompiledCircuit } from '@aztec/types/noir';
2
+ import { type NoirCompiledCircuit } from '@aztec/types/noir';
3
3
 
4
- import { WitnessMap } from '@noir-lang/types';
4
+ import { type WitnessMap } from '@noir-lang/types';
5
5
  import * as proc from 'child_process';
6
6
  import fs from 'fs/promises';
7
7
 
8
- import { SimulationProvider } from './simulation_provider.js';
8
+ import { type SimulationProvider } from './simulation_provider.js';
9
9
 
10
10
  /**
11
11
  * Parses a TOML format witness map string into a Map structure
@@ -1,9 +1,13 @@
1
- import { NoirCompiledCircuit } from '@aztec/types/noir';
1
+ import { type NoirCompiledCircuit } from '@aztec/types/noir';
2
2
 
3
- import { WasmBlackBoxFunctionSolver, createBlackBoxSolver, executeCircuitWithBlackBoxSolver } from '@noir-lang/acvm_js';
4
- import { WitnessMap } from '@noir-lang/types';
3
+ import {
4
+ type WasmBlackBoxFunctionSolver,
5
+ createBlackBoxSolver,
6
+ executeCircuitWithBlackBoxSolver,
7
+ } from '@noir-lang/acvm_js';
8
+ import { type WitnessMap } from '@noir-lang/types';
5
9
 
6
- import { SimulationProvider } from './simulation_provider.js';
10
+ import { type SimulationProvider } from './simulation_provider.js';
7
11
 
8
12
  let solver: Promise<WasmBlackBoxFunctionSolver>;
9
13
 
@@ -1,6 +1,6 @@
1
- import { NoirCompiledCircuit } from '@aztec/types/noir';
1
+ import { type NoirCompiledCircuit } from '@aztec/types/noir';
2
2
 
3
- import { WitnessMap } from '@noir-lang/types';
3
+ import { type WitnessMap } from '@noir-lang/types';
4
4
 
5
5
  /**
6
6
  * Low level simulation interface
package/src/test/utils.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/circuit-types';
2
- import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js';
2
+ import { type AztecAddress, EthAddress, type Fr } from '@aztec/circuits.js';
3
3
  import { computeMessageSecretHash } from '@aztec/circuits.js/hash';
4
4
  import { sha256ToField } from '@aztec/foundation/crypto';
5
5
 
package/src/utils.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { pedersenHash } from '@aztec/foundation/crypto';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { type Fr } from '@aztec/foundation/fields';
3
3
 
4
4
  /**
5
5
  * Computes the resulting storage slot for an entry in a mapping.