@aztec/simulator 0.80.0 → 0.82.0
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/common/db_interfaces.d.ts +30 -17
- package/dest/common/db_interfaces.d.ts.map +1 -1
- package/dest/common/db_interfaces.js +1 -1
- package/dest/common/debug_fn_name.d.ts +2 -2
- package/dest/common/debug_fn_name.d.ts.map +1 -1
- package/dest/common/message_load_oracle_inputs.d.ts +4 -0
- package/dest/common/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/common/message_load_oracle_inputs.js +9 -0
- package/dest/private/acvm/acvm.d.ts +6 -1
- package/dest/private/acvm/acvm.d.ts.map +1 -1
- package/dest/private/acvm/acvm.js +7 -13
- package/dest/private/acvm/deserialize.d.ts +19 -18
- package/dest/private/acvm/deserialize.d.ts.map +1 -1
- package/dest/private/acvm/deserialize.js +31 -23
- package/dest/private/acvm/oracle/oracle.d.ts +36 -34
- package/dest/private/acvm/oracle/oracle.d.ts.map +1 -1
- package/dest/private/acvm/oracle/oracle.js +134 -79
- package/dest/private/acvm/oracle/typed_oracle.d.ts +3 -2
- package/dest/private/acvm/oracle/typed_oracle.d.ts.map +1 -1
- package/dest/private/acvm/oracle/typed_oracle.js +5 -2
- package/dest/private/acvm/serialize.d.ts +11 -0
- package/dest/private/acvm/serialize.d.ts.map +1 -1
- package/dest/private/acvm/serialize.js +27 -0
- package/dest/private/execution_data_provider.d.ts +15 -13
- package/dest/private/execution_data_provider.d.ts.map +1 -1
- package/dest/private/private_execution.d.ts +2 -2
- package/dest/private/private_execution.d.ts.map +1 -1
- package/dest/private/private_execution.js +4 -5
- package/dest/private/private_execution_oracle.d.ts.map +1 -1
- package/dest/private/private_execution_oracle.js +1 -1
- package/dest/private/providers/acvm_native.d.ts +6 -4
- package/dest/private/providers/acvm_native.d.ts.map +1 -1
- package/dest/private/providers/acvm_native.js +6 -3
- package/dest/private/providers/acvm_wasm.d.ts +6 -7
- package/dest/private/providers/acvm_wasm.d.ts.map +1 -1
- package/dest/private/providers/acvm_wasm.js +13 -15
- package/dest/private/providers/acvm_wasm_with_blobs.d.ts +5 -5
- package/dest/private/providers/acvm_wasm_with_blobs.d.ts.map +1 -1
- package/dest/private/providers/acvm_wasm_with_blobs.js +7 -9
- package/dest/private/providers/circuit_recording/circuit_recorder.d.ts +90 -0
- package/dest/private/providers/circuit_recording/circuit_recorder.d.ts.map +1 -0
- package/dest/private/providers/circuit_recording/circuit_recorder.js +246 -0
- package/dest/private/providers/circuit_recording/simulation_provider_recorder_wrapper.d.ts +18 -0
- package/dest/private/providers/circuit_recording/simulation_provider_recorder_wrapper.d.ts.map +1 -0
- package/dest/private/providers/circuit_recording/simulation_provider_recorder_wrapper.js +39 -0
- package/dest/private/providers/simulation_provider.d.ts +21 -7
- package/dest/private/providers/simulation_provider.d.ts.map +1 -1
- package/dest/private/simulator.d.ts +3 -2
- package/dest/private/simulator.d.ts.map +1 -1
- package/dest/private/simulator.js +2 -2
- package/dest/private/unconstrained_execution.d.ts +2 -2
- package/dest/private/unconstrained_execution.d.ts.map +1 -1
- package/dest/private/unconstrained_execution.js +1 -2
- package/dest/private/unconstrained_execution_oracle.d.ts +5 -3
- package/dest/private/unconstrained_execution_oracle.d.ts.map +1 -1
- package/dest/private/unconstrained_execution_oracle.js +9 -5
- package/dest/public/avm/avm_simulator.d.ts.map +1 -1
- package/dest/public/avm/avm_simulator.js +0 -2
- package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +1 -1
- package/dest/public/avm/fixtures/avm_simulation_tester.js +5 -5
- package/dest/public/avm/fixtures/index.d.ts +4 -4
- package/dest/public/avm/fixtures/index.d.ts.map +1 -1
- package/dest/public/avm/fixtures/index.js +9 -6
- package/dest/public/avm/fixtures/simple_contract_data_source.d.ts +1 -2
- package/dest/public/avm/fixtures/simple_contract_data_source.d.ts.map +1 -1
- package/dest/public/avm/fixtures/simple_contract_data_source.js +0 -3
- package/dest/public/avm/journal/journal.d.ts +16 -70
- package/dest/public/avm/journal/journal.d.ts.map +1 -1
- package/dest/public/avm/journal/journal.js +88 -210
- package/dest/public/avm/journal/nullifiers.d.ts +2 -2
- package/dest/public/avm/journal/nullifiers.d.ts.map +1 -1
- package/dest/public/avm/journal/public_storage.d.ts +2 -2
- package/dest/public/avm/journal/public_storage.d.ts.map +1 -1
- package/dest/public/avm/test_utils.d.ts +10 -13
- package/dest/public/avm/test_utils.d.ts.map +1 -1
- package/dest/public/avm/test_utils.js +8 -13
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts +3 -3
- package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +1 -1
- package/dest/public/fixtures/public_tx_simulation_tester.js +10 -9
- package/dest/public/hinting_db_sources.d.ts +19 -0
- package/dest/public/hinting_db_sources.d.ts.map +1 -0
- package/dest/public/hinting_db_sources.js +36 -0
- package/dest/public/public_db_sources.d.ts +46 -22
- package/dest/public/public_db_sources.d.ts.map +1 -1
- package/dest/public/public_db_sources.js +82 -27
- package/dest/public/public_processor/public_processor.d.ts +5 -5
- package/dest/public/public_processor/public_processor.d.ts.map +1 -1
- package/dest/public/public_processor/public_processor.js +21 -20
- package/dest/public/public_tx_simulator/public_tx_context.d.ts +9 -14
- package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_context.js +15 -19
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts +9 -6
- package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +1 -1
- package/dest/public/public_tx_simulator/public_tx_simulator.js +28 -14
- package/dest/public/side_effect_trace.d.ts +6 -22
- package/dest/public/side_effect_trace.d.ts.map +1 -1
- package/dest/public/side_effect_trace.js +11 -70
- package/dest/public/side_effect_trace_interface.d.ts +5 -19
- package/dest/public/side_effect_trace_interface.d.ts.map +1 -1
- package/dest/testing.d.ts +2 -0
- package/dest/testing.d.ts.map +1 -0
- package/dest/testing.js +1 -0
- package/package.json +15 -14
- package/src/common/db_interfaces.ts +32 -18
- package/src/common/debug_fn_name.ts +2 -2
- package/src/common/message_load_oracle_inputs.ts +8 -0
- package/src/private/acvm/acvm.ts +8 -24
- package/src/private/acvm/deserialize.ts +35 -29
- package/src/private/acvm/oracle/oracle.ts +171 -129
- package/src/private/acvm/oracle/typed_oracle.ts +7 -3
- package/src/private/acvm/serialize.ts +28 -0
- package/src/private/execution_data_provider.ts +19 -14
- package/src/private/private_execution.ts +11 -7
- package/src/private/private_execution_oracle.ts +5 -1
- package/src/private/providers/acvm_native.ts +17 -6
- package/src/private/providers/acvm_wasm.ts +27 -20
- package/src/private/providers/acvm_wasm_with_blobs.ts +15 -12
- package/src/private/providers/circuit_recording/circuit_recorder.ts +283 -0
- package/src/private/providers/circuit_recording/simulation_provider_recorder_wrapper.ts +82 -0
- package/src/private/providers/simulation_provider.ts +30 -5
- package/src/private/simulator.ts +5 -3
- package/src/private/unconstrained_execution.ts +8 -4
- package/src/private/unconstrained_execution_oracle.ts +15 -9
- package/src/public/avm/avm_simulator.ts +0 -2
- package/src/public/avm/fixtures/avm_simulation_tester.ts +8 -5
- package/src/public/avm/fixtures/index.ts +16 -10
- package/src/public/avm/fixtures/simple_contract_data_source.ts +1 -10
- package/src/public/avm/journal/journal.ts +119 -353
- package/src/public/avm/journal/nullifiers.ts +2 -2
- package/src/public/avm/journal/public_storage.ts +2 -2
- package/src/public/avm/test_utils.ts +20 -29
- package/src/public/fixtures/public_tx_simulation_tester.ts +9 -12
- package/src/public/hinting_db_sources.ts +71 -0
- package/src/public/public_db_sources.ts +134 -32
- package/src/public/public_processor/public_processor.ts +22 -21
- package/src/public/public_tx_simulator/public_tx_context.ts +30 -38
- package/src/public/public_tx_simulator/public_tx_simulator.ts +47 -17
- package/src/public/side_effect_trace.ts +8 -172
- package/src/public/side_effect_trace_interface.ts +4 -55
- package/src/testing.ts +1 -0
- package/dest/public/avm/bytecode_utils.d.ts +0 -5
- package/dest/public/avm/bytecode_utils.d.ts.map +0 -1
- package/dest/public/avm/bytecode_utils.js +0 -17
- package/src/public/avm/bytecode_utils.ts +0 -17
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ForeignCallHandler } from '@aztec/noir-protocol-circuits-types/types';
|
|
2
|
+
import type { FunctionArtifactWithContractName } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { NoirCompiledCircuitWithName } from '@aztec/stdlib/noir';
|
|
4
|
+
import type { ACIRCallback, ACIRExecutionResult } from '../../acvm/acvm.js';
|
|
5
|
+
import type { ACVMWitness } from '../../acvm/acvm_types.js';
|
|
6
|
+
import type { SimulationProvider } from '../simulation_provider.js';
|
|
7
|
+
/**
|
|
8
|
+
* Takes a simulation provider and wraps it in a circuit recorder. See CircuitRecorder for more details on how circuit
|
|
9
|
+
* recording works.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SimulationProviderRecorderWrapper implements SimulationProvider {
|
|
12
|
+
#private;
|
|
13
|
+
private simulator;
|
|
14
|
+
constructor(simulator: SimulationProvider);
|
|
15
|
+
executeProtocolCircuit(input: ACVMWitness, artifact: NoirCompiledCircuitWithName, callback: ForeignCallHandler | undefined): Promise<ACVMWitness>;
|
|
16
|
+
executeUserCircuit(input: ACVMWitness, artifact: FunctionArtifactWithContractName, callback: ACIRCallback): Promise<ACIRExecutionResult>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=simulation_provider_recorder_wrapper.d.ts.map
|
package/dest/private/providers/circuit_recording/simulation_provider_recorder_wrapper.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulation_provider_recorder_wrapper.d.ts","sourceRoot":"","sources":["../../../../src/private/providers/circuit_recording/simulation_provider_recorder_wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;GAGG;AACH,qBAAa,iCAAkC,YAAW,kBAAkB;;IAC9D,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,kBAAkB;IAEjD,sBAAsB,CACpB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,2BAA2B,EACrC,QAAQ,EAAE,kBAAkB,GAAG,SAAS,GACvC,OAAO,CAAC,WAAW,CAAC;IAavB,kBAAkB,CAChB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,gCAAgC,EAC1C,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,mBAAmB,CAAC;CA4ChC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CircuitRecorder } from './circuit_recorder.js';
|
|
2
|
+
/**
|
|
3
|
+
* Takes a simulation provider and wraps it in a circuit recorder. See CircuitRecorder for more details on how circuit
|
|
4
|
+
* recording works.
|
|
5
|
+
*/ export class SimulationProviderRecorderWrapper {
|
|
6
|
+
simulator;
|
|
7
|
+
constructor(simulator){
|
|
8
|
+
this.simulator = simulator;
|
|
9
|
+
}
|
|
10
|
+
executeProtocolCircuit(input, artifact, callback) {
|
|
11
|
+
const bytecode = Buffer.from(artifact.bytecode, 'base64');
|
|
12
|
+
return this.#simulate((wrappedCallback)=>this.simulator.executeProtocolCircuit(input, artifact, wrappedCallback), input, bytecode, artifact.name, 'main', callback);
|
|
13
|
+
}
|
|
14
|
+
executeUserCircuit(input, artifact, callback) {
|
|
15
|
+
return this.#simulate((wrappedCallback)=>this.simulator.executeUserCircuit(input, artifact, wrappedCallback), input, artifact.bytecode, artifact.contractName, artifact.name, callback);
|
|
16
|
+
}
|
|
17
|
+
async #simulate(simulateFn, input, bytecode, contractName, functionName, callback) {
|
|
18
|
+
const recordDir = process.env.CIRCUIT_RECORD_DIR;
|
|
19
|
+
if (!recordDir) {
|
|
20
|
+
// Recording is not enabled so we just execute the circuit
|
|
21
|
+
return simulateFn(callback);
|
|
22
|
+
}
|
|
23
|
+
// Start recording circuit execution
|
|
24
|
+
const recorder = await CircuitRecorder.start(recordDir, input, bytecode, contractName, functionName);
|
|
25
|
+
// If callback was provided, we wrap it in a circuit recorder callback wrapper
|
|
26
|
+
const wrappedCallback = recorder.wrapCallback(callback);
|
|
27
|
+
let result;
|
|
28
|
+
try {
|
|
29
|
+
result = await simulateFn(wrappedCallback);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
// If an error occurs, we finalize the recording file with the error
|
|
32
|
+
await recorder.finishWithError(error);
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
// Witness generation is complete so we finish the circuit recorder
|
|
36
|
+
await recorder.finish();
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
import type { WitnessMap } from '@aztec/noir-types';
|
|
5
|
-
import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
|
|
1
|
+
import type { ExecutionError, ForeignCallHandler } from '@aztec/noir-acvm_js';
|
|
2
|
+
import type { FunctionArtifactWithContractName } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { NoirCompiledCircuit, NoirCompiledCircuitWithName } from '@aztec/stdlib/noir';
|
|
6
4
|
import { type ACIRCallback, type ACIRExecutionResult } from '../acvm/acvm.js';
|
|
7
5
|
import type { ACVMWitness } from '../acvm/acvm_types.js';
|
|
8
6
|
/**
|
|
9
7
|
* Low level simulation interface
|
|
10
8
|
*/
|
|
11
9
|
export interface SimulationProvider {
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Execute a protocol circuit/generate a witness
|
|
12
|
+
* @param input - The initial witness map defining all of the inputs to `circuit`.
|
|
13
|
+
* @param artifact - ACIR circuit bytecode and its metadata.
|
|
14
|
+
* @param callback - A callback to process any foreign calls from the circuit. Can be undefined as for native
|
|
15
|
+
* ACVM simulator we don't process foreign calls.
|
|
16
|
+
* @returns The solved witness calculated by executing the circuit on the provided inputs.
|
|
17
|
+
*/
|
|
18
|
+
executeProtocolCircuit(input: ACVMWitness, artifact: NoirCompiledCircuitWithName, callback: ForeignCallHandler | undefined): Promise<ACVMWitness>;
|
|
19
|
+
/**
|
|
20
|
+
* Execute a user circuit (smart contract function)/generate a witness
|
|
21
|
+
* @param input - The initial witness map defining all of the inputs to `circuit`.
|
|
22
|
+
* @param artifact - Contract function ACIR circuit bytecode and its metadata.
|
|
23
|
+
* @param callback - A callback to process any foreign calls from the circuit.
|
|
24
|
+
* @returns The solved witness calculated by executing the circuit on the provided inputs, as well as the return
|
|
25
|
+
* witness indices as specified by the circuit.
|
|
26
|
+
*/
|
|
27
|
+
executeUserCircuit(input: ACVMWitness, artifact: FunctionArtifactWithContractName, callback: ACIRCallback): Promise<ACIRExecutionResult>;
|
|
14
28
|
}
|
|
15
29
|
export type DecodedError = ExecutionError & {
|
|
16
30
|
decodedAssertionPayload?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulation_provider.d.ts","sourceRoot":"","sources":["../../../src/private/providers/simulation_provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simulation_provider.d.ts","sourceRoot":"","sources":["../../../src/private/providers/simulation_provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9E,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAE3F,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAoB,MAAM,iBAAiB,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,sBAAsB,CACpB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,2BAA2B,EACrC,QAAQ,EAAE,kBAAkB,GAAG,SAAS,GACvC,OAAO,CAAC,WAAW,CAAC,CAAC;IAExB;;;;;;;OAOG;IACH,kBAAkB,CAChB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,gCAAgC,EAC1C,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG;IAAE,uBAAuB,CAAC,EAAE,GAAG,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAIxG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,mBAAmB,EAAE,aAAa,EAAE,cAAc,GAAG,YAAY,CA4C1G"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { FunctionCall } from '@aztec/stdlib/abi';
|
|
1
|
+
import type { AbiDecoded, FunctionCall } from '@aztec/stdlib/abi';
|
|
2
2
|
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
5
|
import { PrivateExecutionResult, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
5
6
|
import type { ExecutionDataProvider } from './execution_data_provider.js';
|
|
@@ -29,6 +30,6 @@ export declare class AcirSimulator {
|
|
|
29
30
|
* @param contractAddress - The address of the contract.
|
|
30
31
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
31
32
|
*/
|
|
32
|
-
runUnconstrained(request: FunctionCall, contractAddress: AztecAddress, selector: FunctionSelector, scopes?: AztecAddress[]): Promise<
|
|
33
|
+
runUnconstrained(request: FunctionCall, contractAddress: AztecAddress, selector: FunctionSelector, authwits: AuthWitness[], scopes?: AztecAddress[]): Promise<AbiDecoded>;
|
|
33
34
|
}
|
|
34
35
|
//# sourceMappingURL=simulator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulator.d.ts","sourceRoot":"","sources":["../../src/private/simulator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"simulator.d.ts","sourceRoot":"","sources":["../../src/private/simulator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAe,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAK1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAI7E;;GAEG;AACH,qBAAa,aAAa;IAGZ,OAAO,CAAC,qBAAqB;IAAyB,OAAO,CAAC,kBAAkB;IAF5F,OAAO,CAAC,GAAG,CAAS;gBAEA,qBAAqB,EAAE,qBAAqB,EAAU,kBAAkB,EAAE,kBAAkB;IAIhH;;;;;;;;OAQG;IACU,GAAG,CACd,OAAO,EAAE,kBAAkB,EAC3B,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,eAA6C,EACtD,MAAM,CAAC,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,sBAAsB,CAAC;IA8DlC;;;;;;OAMG;IACU,gBAAgB,CAC3B,OAAO,EAAE,YAAY,EACrB,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,CAAC,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,UAAU,CAAC;CA8BvB"}
|
|
@@ -60,13 +60,13 @@ import { UnconstrainedExecutionOracle } from './unconstrained_execution_oracle.j
|
|
|
60
60
|
* @param entryPointArtifact - The artifact of the entry point function.
|
|
61
61
|
* @param contractAddress - The address of the contract.
|
|
62
62
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
63
|
-
*/ async runUnconstrained(request, contractAddress, selector, scopes) {
|
|
63
|
+
*/ async runUnconstrained(request, contractAddress, selector, authwits, scopes) {
|
|
64
64
|
await verifyCurrentClassId(contractAddress, this.executionDataProvider);
|
|
65
65
|
const entryPointArtifact = await this.executionDataProvider.getFunctionArtifact(contractAddress, selector);
|
|
66
66
|
if (entryPointArtifact.functionType !== FunctionType.UNCONSTRAINED) {
|
|
67
67
|
throw new Error(`Cannot run ${entryPointArtifact.functionType} function as unconstrained`);
|
|
68
68
|
}
|
|
69
|
-
const context = new UnconstrainedExecutionOracle(contractAddress,
|
|
69
|
+
const context = new UnconstrainedExecutionOracle(contractAddress, authwits, [], this.executionDataProvider, undefined, scopes);
|
|
70
70
|
try {
|
|
71
71
|
return await executeUnconstrainedFunction(this.simulationProvider, context, entryPointArtifact, contractAddress, request.selector, request.args);
|
|
72
72
|
} catch (err) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { type AbiDecoded, type
|
|
2
|
+
import { type AbiDecoded, type FunctionArtifactWithContractName, type FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import type { SimulationProvider } from './providers/simulation_provider.js';
|
|
5
5
|
import type { UnconstrainedExecutionOracle } from './unconstrained_execution_oracle.js';
|
|
6
6
|
/**
|
|
7
7
|
* Execute an unconstrained function and return the decoded values.
|
|
8
8
|
*/
|
|
9
|
-
export declare function executeUnconstrainedFunction(simulatorProvider: SimulationProvider, oracle: UnconstrainedExecutionOracle, artifact:
|
|
9
|
+
export declare function executeUnconstrainedFunction(simulatorProvider: SimulationProvider, oracle: UnconstrainedExecutionOracle, artifact: FunctionArtifactWithContractName, contractAddress: AztecAddress, functionSelector: FunctionSelector, args: Fr[], log?: import("@aztec/foundation/log").Logger): Promise<AbiDecoded>;
|
|
10
10
|
//# sourceMappingURL=unconstrained_execution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unconstrained_execution.d.ts","sourceRoot":"","sources":["../../src/private/unconstrained_execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,
|
|
1
|
+
{"version":3,"file":"unconstrained_execution.d.ts","sourceRoot":"","sources":["../../src/private/unconstrained_execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gCAAgC,EACrC,KAAK,gBAAgB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAGxF;;GAEG;AACH,wBAAsB,4BAA4B,CAChD,iBAAiB,EAAE,kBAAkB,EACrC,MAAM,EAAE,4BAA4B,EACpC,QAAQ,EAAE,gCAAgC,EAC1C,eAAe,EAAE,YAAY,EAC7B,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,EAAE,EAAE,EACV,GAAG,yCAAoD,GACtD,OAAO,CAAC,UAAU,CAAC,CAwBrB"}
|
|
@@ -11,9 +11,8 @@ import { Oracle, extractCallStack, toACVMWitness } from './acvm/index.js';
|
|
|
11
11
|
contract: contractAddress,
|
|
12
12
|
selector: functionSelector
|
|
13
13
|
});
|
|
14
|
-
const acir = artifact.bytecode;
|
|
15
14
|
const initialWitness = toACVMWitness(0, args);
|
|
16
|
-
const acirExecutionResult = await simulatorProvider.executeUserCircuit(
|
|
15
|
+
const acirExecutionResult = await simulatorProvider.executeUserCircuit(initialWitness, artifact, new Oracle(oracle)).catch((err)=>{
|
|
17
16
|
err.message = resolveAssertionMessageFromError(err, artifact);
|
|
18
17
|
throw new ExecutionError(err.message, {
|
|
19
18
|
contractAddress,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { Fr, Point } from '@aztec/foundation/fields';
|
|
4
4
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
5
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
@@ -24,7 +24,8 @@ export declare class UnconstrainedExecutionOracle extends TypedOracle {
|
|
|
24
24
|
protected readonly scopes?: AztecAddress[] | undefined;
|
|
25
25
|
constructor(contractAddress: AztecAddress,
|
|
26
26
|
/** List of transient auth witnesses to be used during this simulation */
|
|
27
|
-
authWitnesses: AuthWitness[], capsules: Capsule[],
|
|
27
|
+
authWitnesses: AuthWitness[], capsules: Capsule[], // TODO(#12425): Rename to transientCapsules
|
|
28
|
+
executionDataProvider: ExecutionDataProvider, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[] | undefined);
|
|
28
29
|
getBlockNumber(): Promise<number>;
|
|
29
30
|
getContractAddress(): Promise<AztecAddress>;
|
|
30
31
|
getChainId(): Promise<Fr>;
|
|
@@ -67,7 +68,7 @@ export declare class UnconstrainedExecutionOracle extends TypedOracle {
|
|
|
67
68
|
* @param leafSlot - The slot of the public data tree to get the witness for.
|
|
68
69
|
* @returns - The witness
|
|
69
70
|
*/
|
|
70
|
-
|
|
71
|
+
getPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
71
72
|
/**
|
|
72
73
|
* Fetches a block header of a given block.
|
|
73
74
|
* @param blockNumber - The number of a block of which to get the block header.
|
|
@@ -157,5 +158,6 @@ export declare class UnconstrainedExecutionOracle extends TypedOracle {
|
|
|
157
158
|
deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
|
|
158
159
|
copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
|
|
159
160
|
aes128Decrypt(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer>;
|
|
161
|
+
getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
|
|
160
162
|
}
|
|
161
163
|
//# sourceMappingURL=unconstrained_execution_oracle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unconstrained_execution_oracle.d.ts","sourceRoot":"","sources":["../../src/private/unconstrained_execution_oracle.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"unconstrained_execution_oracle.d.ts","sourceRoot":"","sources":["../../src/private/unconstrained_execution_oracle.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MA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aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrE,WAAW,CACzB,eAAe,EAAE,YAAY,EAC7B,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,EAAE,EACX,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;IASA,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK9E,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;CAGrF"}
|
|
@@ -70,8 +70,8 @@ import { pickNotes } from './pick_notes.js';
|
|
|
70
70
|
* @param blockNumber - The block number at which to get the index.
|
|
71
71
|
* @param leafSlot - The slot of the public data tree to get the witness for.
|
|
72
72
|
* @returns - The witness
|
|
73
|
-
*/ async
|
|
74
|
-
return await this.executionDataProvider.
|
|
73
|
+
*/ async getPublicDataWitness(blockNumber, leafSlot) {
|
|
74
|
+
return await this.executionDataProvider.getPublicDataWitness(blockNumber, leafSlot);
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* Fetches a block header of a given block.
|
|
@@ -105,7 +105,7 @@ import { pickNotes } from './pick_notes.js';
|
|
|
105
105
|
* @param messageHash - Hash of the message to authenticate.
|
|
106
106
|
* @returns Authentication witness for the requested message hash.
|
|
107
107
|
*/ getAuthWitness(messageHash) {
|
|
108
|
-
return Promise.resolve(this.authWitnesses.find((w)=>w.requestHash.equals(messageHash))?.witness
|
|
108
|
+
return Promise.resolve(this.authWitnesses.find((w)=>w.requestHash.equals(messageHash))?.witness);
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* Gets some notes for a contract address and storage slot.
|
|
@@ -208,7 +208,7 @@ import { pickNotes } from './pick_notes.js';
|
|
|
208
208
|
async syncNotes() {
|
|
209
209
|
const taggedLogsByRecipient = await this.executionDataProvider.syncTaggedLogs(this.contractAddress, await this.executionDataProvider.getBlockNumber(), this.scopes);
|
|
210
210
|
for (const [recipient, taggedLogs] of taggedLogsByRecipient.entries()){
|
|
211
|
-
await this.executionDataProvider.processTaggedLogs(taggedLogs, AztecAddress.fromString(recipient));
|
|
211
|
+
await this.executionDataProvider.processTaggedLogs(this.contractAddress, taggedLogs, AztecAddress.fromString(recipient));
|
|
212
212
|
}
|
|
213
213
|
await this.executionDataProvider.removeNullifiedNotes(this.contractAddress);
|
|
214
214
|
}
|
|
@@ -234,7 +234,8 @@ import { pickNotes } from './pick_notes.js';
|
|
|
234
234
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
235
235
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return(// TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
|
|
238
|
+
this.capsules.find((c)=>c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot))?.data ?? await this.executionDataProvider.loadCapsule(this.contractAddress, slot));
|
|
238
239
|
}
|
|
239
240
|
deleteCapsule(contractAddress, slot) {
|
|
240
241
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
@@ -255,4 +256,7 @@ import { pickNotes } from './pick_notes.js';
|
|
|
255
256
|
const aes128 = new Aes128();
|
|
256
257
|
return aes128.decryptBufferCBC(ciphertext, iv, symKey);
|
|
257
258
|
}
|
|
259
|
+
getSharedSecret(address, ephPk) {
|
|
260
|
+
return this.executionDataProvider.getSharedSecret(address, ephPk);
|
|
261
|
+
}
|
|
258
262
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/avm/avm_simulator.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK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BAA0B,EACxC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,EAAE,EAClB,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,EAAE,EAAE,EACd,YAAY,EAAE,GAAG;IAiBnB;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAuBtD;;OAEG;IACI,WAAW,IAAI,MAAM,GAAG,SAAS;IAIxC;;;OAGG;IACU,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;YA0GhE,+BAA+B;IAoB7C,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,kBAAkB;CAS3B"}
|
|
@@ -7,7 +7,6 @@ import { AvmContext } from './avm_context.js';
|
|
|
7
7
|
import { AvmContractCallResult } from './avm_contract_call_result.js';
|
|
8
8
|
import { AvmExecutionEnvironment } from './avm_execution_environment.js';
|
|
9
9
|
import { AvmMachineState } from './avm_machine_state.js';
|
|
10
|
-
import { isAvmBytecode } from './bytecode_utils.js';
|
|
11
10
|
import { AvmExecutionError, AvmRevertReason, InvalidProgramCounterError, revertReasonFromExceptionalHalt, revertReasonFromExplicitRevert } from './errors.js';
|
|
12
11
|
import { INSTRUCTION_SET, decodeInstructionFromBytecode } from './serialization/bytecode_serialization.js';
|
|
13
12
|
export class AvmSimulator {
|
|
@@ -82,7 +81,6 @@ export class AvmSimulator {
|
|
|
82
81
|
* This method is useful for testing and debugging.
|
|
83
82
|
*/ async executeBytecode(bytecode) {
|
|
84
83
|
const startTotalTime = performance.now();
|
|
85
|
-
assert(isAvmBytecode(bytecode), "AVM simulator can't execute non-AVM bytecode");
|
|
86
84
|
assert(bytecode.length > 0, "AVM simulator can't execute empty bytecode");
|
|
87
85
|
this.bytecode = bytecode;
|
|
88
86
|
const { machineState } = this.context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_simulation_tester.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/fixtures/avm_simulation_tester.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAKjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAQnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"avm_simulation_tester.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/fixtures/avm_simulation_tester.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAKjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAQnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAI1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAK5E;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,uBAAuB;IAI5D,OAAO,CAAC,YAAY;gBAFpB,kBAAkB,EAAE,wBAAwB,EAC5C,WAAW,EAAE,yBAAyB,EAC9B,YAAY,EAAE,0BAA0B;WAKrC,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAmBnD;;OAEG;IACG,YAAY,CAChB,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,GAAG,EAAE,EACX,YAAY,UAAQ,GACnB,OAAO,CAAC,qBAAqB,CAAC;CAsClC"}
|
|
@@ -6,7 +6,8 @@ import { NativeWorldStateService } from '@aztec/world-state';
|
|
|
6
6
|
import { SideEffectTrace } from '../../../public/side_effect_trace.js';
|
|
7
7
|
import { getContractFunctionArtifact, getFunctionSelector, initContext, initExecutionEnvironment, resolveContractAssertionMessage } from '../../avm/fixtures/index.js';
|
|
8
8
|
import { AvmPersistableStateManager } from '../../avm/journal/journal.js';
|
|
9
|
-
import {
|
|
9
|
+
import { DEFAULT_BLOCK_NUMBER } from '../../fixtures/public_tx_simulation_tester.js';
|
|
10
|
+
import { PublicContractsDB, PublicTreesDB } from '../../public_db_sources.js';
|
|
10
11
|
import { AvmSimulator } from '../avm_simulator.js';
|
|
11
12
|
import { BaseAvmSimulationTester } from './base_avm_simulation_tester.js';
|
|
12
13
|
import { SimpleContractDataSource } from './simple_contract_data_source.js';
|
|
@@ -24,12 +25,11 @@ const DEFAULT_GAS_FEES = new GasFees(2, 3);
|
|
|
24
25
|
static async create() {
|
|
25
26
|
const contractDataSource = new SimpleContractDataSource();
|
|
26
27
|
const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
|
|
27
|
-
const
|
|
28
|
+
const treesDB = new PublicTreesDB(merkleTrees);
|
|
29
|
+
const contractsDB = new PublicContractsDB(contractDataSource);
|
|
28
30
|
const trace = new SideEffectTrace();
|
|
29
31
|
const firstNullifier = new Fr(420000);
|
|
30
|
-
|
|
31
|
-
// failures on 2nd call to simulateCall with merkle ops on
|
|
32
|
-
const stateManager = AvmPersistableStateManager.create(worldStateDB, trace, /*doMerkleOperations=*/ false, firstNullifier);
|
|
32
|
+
const stateManager = AvmPersistableStateManager.create(treesDB, contractsDB, trace, /*doMerkleOperations=*/ false, firstNullifier, DEFAULT_BLOCK_NUMBER);
|
|
33
33
|
return new AvmSimulationTester(contractDataSource, merkleTrees, stateManager);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -4,9 +4,8 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
4
4
|
import { type ContractArtifact, type FunctionAbi, type FunctionArtifact, FunctionSelector } from '@aztec/stdlib/abi';
|
|
5
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
6
|
import { type ContractClassPublic, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
7
|
-
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
|
|
8
7
|
import { GlobalVariables } from '@aztec/stdlib/tx';
|
|
9
|
-
import type {
|
|
8
|
+
import type { PublicContractsDB, PublicTreesDB } from '../../public_db_sources.js';
|
|
10
9
|
import type { PublicSideEffectTraceInterface } from '../../side_effect_trace_interface.js';
|
|
11
10
|
import { AvmContext } from '../avm_context.js';
|
|
12
11
|
import { AvmExecutionEnvironment } from '../avm_execution_environment.js';
|
|
@@ -27,13 +26,14 @@ export declare function initContext(overrides?: {
|
|
|
27
26
|
}): AvmContext;
|
|
28
27
|
/** Creates an empty state manager with mocked host storage. */
|
|
29
28
|
export declare function initPersistableStateManager(overrides?: {
|
|
30
|
-
|
|
29
|
+
treesDB?: PublicTreesDB;
|
|
30
|
+
contractsDB?: PublicContractsDB;
|
|
31
31
|
trace?: PublicSideEffectTraceInterface;
|
|
32
32
|
publicStorage?: PublicStorage;
|
|
33
33
|
nullifiers?: NullifierManager;
|
|
34
34
|
doMerkleOperations?: boolean;
|
|
35
|
-
db?: MerkleTreeWriteOperations;
|
|
36
35
|
firstNullifier?: Fr;
|
|
36
|
+
blockNumber?: number;
|
|
37
37
|
}): AvmPersistableStateManager;
|
|
38
38
|
/**
|
|
39
39
|
* Create an empty instance of the Execution Environment where all values are zero, unless overridden in the overrides object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/public/avm/fixtures/index.ts"],"names":[],"mappings":";;AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AA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AE,GAC3B,OAAO,CAAC;IACT,aAAa,EAAE,mBAAmB,CAAC;IACnC,gBAAgB,EAAE,2BAA2B,CAAC;IAC9C,wBAAwB,EAAE,EAAE,CAAC;CAC9B,CAAC,CA+BD"}
|
|
@@ -9,20 +9,20 @@ import { computeInitializationHash } from '@aztec/stdlib/contract';
|
|
|
9
9
|
import { isNoirCallStackUnresolved } from '@aztec/stdlib/errors';
|
|
10
10
|
import { GasFees } from '@aztec/stdlib/gas';
|
|
11
11
|
import { siloNullifier } from '@aztec/stdlib/hash';
|
|
12
|
+
import { deriveKeys } from '@aztec/stdlib/keys';
|
|
12
13
|
import { makeContractClassPublic, makeContractInstanceFromClassId } from '@aztec/stdlib/testing';
|
|
13
14
|
import { GlobalVariables } from '@aztec/stdlib/tx';
|
|
14
15
|
import { strict as assert } from 'assert';
|
|
15
16
|
import { mock } from 'jest-mock-extended';
|
|
16
17
|
import merge from 'lodash.merge';
|
|
17
18
|
import { resolveAssertionMessageFromRevertData, traverseCauseChain } from '../../../common/index.js';
|
|
19
|
+
import { DEFAULT_BLOCK_NUMBER } from '../../fixtures/public_tx_simulation_tester.js';
|
|
18
20
|
import { AvmContext } from '../avm_context.js';
|
|
19
21
|
import { AvmExecutionEnvironment } from '../avm_execution_environment.js';
|
|
20
22
|
import { AvmMachineState } from '../avm_machine_state.js';
|
|
21
23
|
import { Field, Uint8, Uint32, Uint64 } from '../avm_memory_types.js';
|
|
22
24
|
import { AvmSimulator } from '../avm_simulator.js';
|
|
23
25
|
import { AvmPersistableStateManager } from '../journal/journal.js';
|
|
24
|
-
import { NullifierManager } from '../journal/nullifiers.js';
|
|
25
|
-
import { PublicStorage } from '../journal/public_storage.js';
|
|
26
26
|
export const PUBLIC_DISPATCH_FN_NAME = 'public_dispatch';
|
|
27
27
|
/**
|
|
28
28
|
* Create a new AVM context with default values.
|
|
@@ -32,8 +32,8 @@ export const PUBLIC_DISPATCH_FN_NAME = 'public_dispatch';
|
|
|
32
32
|
return ctx;
|
|
33
33
|
}
|
|
34
34
|
/** Creates an empty state manager with mocked host storage. */ export function initPersistableStateManager(overrides) {
|
|
35
|
-
const
|
|
36
|
-
return new AvmPersistableStateManager(
|
|
35
|
+
const treesDB = overrides?.treesDB || mock();
|
|
36
|
+
return new AvmPersistableStateManager(treesDB, overrides?.contractsDB || mock(), overrides?.trace || mock(), overrides?.firstNullifier || new Fr(27), overrides?.blockNumber || DEFAULT_BLOCK_NUMBER, overrides?.doMerkleOperations || false, overrides?.publicStorage, overrides?.nullifiers);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Create an empty instance of the Execution Environment where all values are zero, unless overridden in the overrides object
|
|
@@ -158,14 +158,17 @@ export function resolveAvmGadgetsTestContractAssertionMessage(functionName, reve
|
|
|
158
158
|
selector: new FunctionSelector(PUBLIC_DISPATCH_SELECTOR)
|
|
159
159
|
});
|
|
160
160
|
const constructorAbi = getContractFunctionArtifact('constructor', contractArtifact);
|
|
161
|
+
const { publicKeys } = await deriveKeys(Fr.random());
|
|
161
162
|
const initializationHash = await computeInitializationHash(constructorAbi, constructorArgs);
|
|
162
163
|
const contractInstance = originalContractClassId === undefined ? await makeContractInstanceFromClassId(contractClass.id, seed, {
|
|
163
164
|
deployer,
|
|
164
|
-
initializationHash
|
|
165
|
+
initializationHash,
|
|
166
|
+
publicKeys
|
|
165
167
|
}) : await makeContractInstanceFromClassId(originalContractClassId, seed, {
|
|
166
168
|
deployer,
|
|
167
169
|
initializationHash,
|
|
168
|
-
currentClassId: contractClass.id
|
|
170
|
+
currentClassId: contractClass.id,
|
|
171
|
+
publicKeys
|
|
169
172
|
});
|
|
170
173
|
const contractAddressNullifier = await siloNullifier(AztecAddress.fromNumber(DEPLOYER_CONTRACT_ADDRESS), contractInstance.address.toField());
|
|
171
174
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import { type ContractArtifact, FunctionSelector } from '@aztec/stdlib/abi';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import type { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress
|
|
4
|
+
import type { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
5
5
|
/**
|
|
6
6
|
* This class is used during public/avm testing to function as a database of
|
|
7
7
|
* contract contract classes and instances. Tests can populate it with classes
|
|
@@ -20,7 +20,6 @@ export declare class SimpleContractDataSource implements ContractDataSource {
|
|
|
20
20
|
*/
|
|
21
21
|
addNewContract(contractArtifact: ContractArtifact, contractClass: ContractClassPublic, contractInstance: ContractInstanceWithAddress): Promise<void>;
|
|
22
22
|
addContractArtifact(classId: Fr, artifact: ContractArtifact): void;
|
|
23
|
-
getPublicFunction(_address: AztecAddress, _selector: FunctionSelector): Promise<PublicFunction>;
|
|
24
23
|
getBlockNumber(): Promise<number>;
|
|
25
24
|
getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
|
|
26
25
|
getBytecodeCommitment(_id: Fr): Promise<Fr | undefined>;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CA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AC,gBAAgB,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;CAIlF"}
|
|
@@ -29,9 +29,6 @@ import { PUBLIC_DISPATCH_FN_NAME } from './index.js';
|
|
|
29
29
|
}
|
|
30
30
|
/////////////////////////////////////////////////////////////
|
|
31
31
|
// ContractDataSource function implementations
|
|
32
|
-
getPublicFunction(_address, _selector) {
|
|
33
|
-
throw new Error('Method not implemented.');
|
|
34
|
-
}
|
|
35
32
|
getBlockNumber() {
|
|
36
33
|
throw new Error('Method not implemented.');
|
|
37
34
|
}
|