@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.
- package/dest/acvm/acvm.d.ts +5 -5
- package/dest/acvm/acvm.d.ts.map +1 -1
- package/dest/acvm/acvm_types.d.ts +1 -1
- package/dest/acvm/acvm_types.d.ts.map +1 -1
- package/dest/acvm/deserialize.d.ts +1 -1
- package/dest/acvm/deserialize.d.ts.map +1 -1
- package/dest/acvm/oracle/debug.d.ts +2 -2
- package/dest/acvm/oracle/debug.d.ts.map +1 -1
- package/dest/acvm/oracle/index.d.ts +1 -1
- package/dest/acvm/oracle/index.d.ts.map +1 -1
- package/dest/acvm/oracle/oracle.d.ts +2 -2
- package/dest/acvm/oracle/oracle.d.ts.map +1 -1
- package/dest/acvm/oracle/typed_oracle.d.ts +6 -6
- package/dest/acvm/oracle/typed_oracle.d.ts.map +1 -1
- package/dest/acvm/serialize.d.ts +4 -4
- package/dest/acvm/serialize.d.ts.map +1 -1
- package/dest/acvm/serialize.js +1 -1
- package/dest/avm/avm_context.d.ts +4 -4
- package/dest/avm/avm_context.d.ts.map +1 -1
- package/dest/avm/avm_context.js +1 -1
- package/dest/avm/avm_execution_environment.d.ts +4 -4
- package/dest/avm/avm_execution_environment.d.ts.map +1 -1
- package/dest/avm/avm_execution_environment.js +1 -1
- package/dest/avm/avm_machine_state.d.ts +2 -2
- package/dest/avm/avm_machine_state.d.ts.map +1 -1
- package/dest/avm/avm_machine_state.js +1 -1
- package/dest/avm/avm_memory_types.d.ts +1 -1
- package/dest/avm/avm_memory_types.d.ts.map +1 -1
- package/dest/avm/avm_memory_types.js +1 -1
- package/dest/avm/avm_message_call_result.d.ts +1 -1
- package/dest/avm/avm_message_call_result.d.ts.map +1 -1
- package/dest/avm/avm_simulator.js +1 -1
- package/dest/avm/errors.d.ts +1 -1
- package/dest/avm/errors.d.ts.map +1 -1
- package/dest/avm/fixtures/index.d.ts +1 -1
- package/dest/avm/fixtures/index.d.ts.map +1 -1
- package/dest/avm/fixtures/index.js +2 -2
- package/dest/avm/journal/host_storage.d.ts +1 -1
- package/dest/avm/journal/host_storage.d.ts.map +1 -1
- package/dest/avm/journal/journal.d.ts +2 -2
- package/dest/avm/journal/journal.d.ts.map +1 -1
- package/dest/avm/journal/trace.d.ts +1 -1
- package/dest/avm/journal/trace.d.ts.map +1 -1
- package/dest/avm/journal/trace_types.d.ts +1 -1
- package/dest/avm/journal/trace_types.d.ts.map +1 -1
- package/dest/avm/opcodes/addressing_mode.d.ts +1 -1
- package/dest/avm/opcodes/addressing_mode.d.ts.map +1 -1
- package/dest/avm/opcodes/arithmetic.d.ts +2 -2
- package/dest/avm/opcodes/arithmetic.d.ts.map +1 -1
- package/dest/avm/opcodes/arithmetic.js +1 -1
- package/dest/avm/opcodes/environment_getters.d.ts +1 -1
- package/dest/avm/opcodes/environment_getters.d.ts.map +1 -1
- package/dest/avm/opcodes/hashing.d.ts +1 -1
- package/dest/avm/opcodes/hashing.d.ts.map +1 -1
- package/dest/avm/opcodes/instruction.d.ts +3 -3
- package/dest/avm/opcodes/instruction.d.ts.map +1 -1
- package/dest/avm/opcodes/instruction.js +1 -1
- package/dest/avm/opcodes/memory.d.ts +1 -1
- package/dest/avm/opcodes/memory.d.ts.map +1 -1
- package/dest/avm/opcodes/memory.js +1 -1
- package/dest/avm/temporary_executor_migration.d.ts +4 -4
- package/dest/avm/temporary_executor_migration.d.ts.map +1 -1
- package/dest/client/client_execution_context.d.ts +11 -11
- package/dest/client/client_execution_context.d.ts.map +1 -1
- package/dest/client/client_execution_context.js +1 -1
- package/dest/client/db_oracle.d.ts +9 -9
- package/dest/client/db_oracle.d.ts.map +1 -1
- package/dest/client/db_oracle.js +1 -1
- package/dest/client/execution_note_cache.d.ts +2 -2
- package/dest/client/execution_note_cache.d.ts.map +1 -1
- package/dest/client/execution_result.d.ts +5 -5
- package/dest/client/execution_result.d.ts.map +1 -1
- package/dest/client/execution_result.js +1 -1
- package/dest/client/pick_notes.d.ts +1 -1
- package/dest/client/pick_notes.d.ts.map +1 -1
- package/dest/client/pick_notes.js +1 -1
- package/dest/client/private_execution.d.ts +5 -5
- package/dest/client/private_execution.d.ts.map +1 -1
- package/dest/client/private_execution.js +1 -1
- package/dest/client/simulator.d.ts +6 -6
- package/dest/client/simulator.d.ts.map +1 -1
- package/dest/client/simulator.js +1 -1
- package/dest/client/unconstrained_execution.d.ts +5 -5
- package/dest/client/unconstrained_execution.d.ts.map +1 -1
- package/dest/client/unconstrained_execution.js +1 -1
- package/dest/client/view_data_oracle.d.ts +6 -6
- package/dest/client/view_data_oracle.d.ts.map +1 -1
- package/dest/client/view_data_oracle.js +1 -1
- package/dest/common/errors.d.ts +1 -1
- package/dest/common/errors.d.ts.map +1 -1
- package/dest/common/errors.js +1 -1
- package/dest/public/db.d.ts +6 -6
- package/dest/public/db.d.ts.map +1 -1
- package/dest/public/execution.d.ts +2 -2
- package/dest/public/execution.d.ts.map +1 -1
- package/dest/public/executor.d.ts +3 -3
- package/dest/public/executor.d.ts.map +1 -1
- package/dest/public/executor.js +1 -1
- package/dest/public/public_execution_context.d.ts +7 -7
- package/dest/public/public_execution_context.d.ts.map +1 -1
- package/dest/public/public_execution_context.js +3 -3
- package/dest/public/state_actions.d.ts +2 -2
- package/dest/public/state_actions.d.ts.map +1 -1
- package/dest/simulator/acvm_native.d.ts +3 -3
- package/dest/simulator/acvm_native.d.ts.map +1 -1
- package/dest/simulator/acvm_wasm.d.ts +3 -3
- package/dest/simulator/acvm_wasm.d.ts.map +1 -1
- package/dest/simulator/acvm_wasm.js +2 -2
- package/dest/simulator/simulation_provider.d.ts +2 -2
- package/dest/simulator/simulation_provider.d.ts.map +1 -1
- package/dest/test/utils.d.ts +1 -1
- package/dest/test/utils.d.ts.map +1 -1
- package/dest/test/utils.js +1 -1
- package/dest/utils.d.ts +1 -1
- package/dest/utils.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/acvm/acvm.ts +8 -8
- package/src/acvm/acvm_types.ts +1 -1
- package/src/acvm/deserialize.ts +1 -1
- package/src/acvm/oracle/debug.ts +2 -2
- package/src/acvm/oracle/index.ts +1 -1
- package/src/acvm/oracle/oracle.ts +2 -2
- package/src/acvm/oracle/typed_oracle.ts +18 -18
- package/src/acvm/serialize.ts +4 -4
- package/src/avm/avm_context.ts +4 -4
- package/src/avm/avm_execution_environment.ts +4 -4
- package/src/avm/avm_machine_state.ts +2 -2
- package/src/avm/avm_memory_types.ts +1 -1
- package/src/avm/avm_message_call_result.ts +1 -1
- package/src/avm/avm_simulator.ts +1 -1
- package/src/avm/errors.ts +1 -1
- package/src/avm/fixtures/index.ts +6 -1
- package/src/avm/journal/host_storage.ts +1 -1
- package/src/avm/journal/journal.ts +2 -2
- package/src/avm/journal/trace.ts +1 -1
- package/src/avm/journal/trace_types.ts +1 -1
- package/src/avm/opcodes/addressing_mode.ts +1 -1
- package/src/avm/opcodes/arithmetic.ts +2 -2
- package/src/avm/opcodes/bitwise.ts +1 -1
- package/src/avm/opcodes/control_flow.ts +1 -1
- package/src/avm/opcodes/environment_getters.ts +1 -1
- package/src/avm/opcodes/hashing.ts +1 -1
- package/src/avm/opcodes/instruction.ts +3 -3
- package/src/avm/opcodes/memory.ts +1 -1
- package/src/avm/temporary_executor_migration.ts +6 -6
- package/src/client/client_execution_context.ts +15 -15
- package/src/client/db_oracle.ts +16 -10
- package/src/client/execution_note_cache.ts +2 -2
- package/src/client/execution_result.ts +9 -5
- package/src/client/pick_notes.ts +1 -1
- package/src/client/private_execution.ts +5 -5
- package/src/client/simulator.ts +8 -8
- package/src/client/unconstrained_execution.ts +5 -5
- package/src/client/view_data_oracle.ts +11 -11
- package/src/common/errors.ts +1 -1
- package/src/public/db.ts +6 -6
- package/src/public/execution.ts +10 -10
- package/src/public/executor.ts +3 -3
- package/src/public/public_execution_context.ts +17 -7
- package/src/public/state_actions.ts +2 -2
- package/src/simulator/acvm_native.ts +3 -3
- package/src/simulator/acvm_wasm.ts +8 -4
- package/src/simulator/simulation_provider.ts +2 -2
- package/src/test/utils.ts +1 -1
- package/src/utils.ts +1 -1
package/src/public/execution.ts
CHANGED
|
@@ -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
|
|
package/src/public/executor.ts
CHANGED
|
@@ -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 {
|
|
2
|
-
|
|
3
|
-
|
|
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 {
|
|
4
|
-
|
|
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