@aztec/simulator 0.80.0 → 0.81.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 +24 -5
- package/dest/common/db_interfaces.d.ts.map +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/private/acvm/deserialize.d.ts +19 -0
- package/dest/private/acvm/deserialize.d.ts.map +1 -1
- package/dest/private/acvm/deserialize.js +29 -0
- package/dest/private/acvm/oracle/oracle.d.ts +2 -0
- package/dest/private/acvm/oracle/oracle.d.ts.map +1 -1
- package/dest/private/acvm/oracle/oracle.js +18 -3
- package/dest/private/acvm/oracle/typed_oracle.d.ts +2 -1
- package/dest/private/acvm/oracle/typed_oracle.d.ts.map +1 -1
- package/dest/private/acvm/oracle/typed_oracle.js +3 -0
- 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 +12 -4
- package/dest/private/execution_data_provider.d.ts.map +1 -1
- package/dest/private/private_execution_oracle.d.ts.map +1 -1
- package/dest/private/private_execution_oracle.js +1 -1
- package/dest/private/unconstrained_execution_oracle.d.ts +4 -2
- package/dest/private/unconstrained_execution_oracle.d.ts.map +1 -1
- package/dest/private/unconstrained_execution_oracle.js +6 -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 +7 -12
- 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 +45 -21
- package/dest/public/public_db_sources.d.ts.map +1 -1
- package/dest/public/public_db_sources.js +79 -24
- 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/package.json +14 -14
- package/src/common/db_interfaces.ts +26 -5
- package/src/common/debug_fn_name.ts +2 -2
- package/src/private/acvm/deserialize.ts +33 -0
- package/src/private/acvm/oracle/oracle.ts +37 -3
- package/src/private/acvm/oracle/typed_oracle.ts +5 -1
- package/src/private/acvm/serialize.ts +28 -0
- package/src/private/execution_data_provider.ts +13 -4
- package/src/private/private_execution_oracle.ts +5 -1
- package/src/private/unconstrained_execution_oracle.ts +12 -3
- 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 +131 -29
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public_tx_context.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_context.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,
|
|
1
|
+
{"version":3,"file":"public_tx_context.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_context.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,sBAAsB,EAAE,iBAAiB,EAAmB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,GAA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0BAA0B;IAIjE,IAAI;IAMV,qBAAqB;IAIrB,QAAQ;IAIF,gBAAgB;IAQhB,kBAAkB;CAOzB"}
|
|
@@ -3,16 +3,16 @@ import { padArrayEnd } from '@aztec/foundation/collection';
|
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
5
5
|
import { assertLength } from '@aztec/foundation/serialize';
|
|
6
|
-
import {
|
|
6
|
+
import { AvmExecutionHints, PublicDataWrite, RevertCode } from '@aztec/stdlib/avm';
|
|
7
7
|
import { computeTransactionFee } from '@aztec/stdlib/fees';
|
|
8
8
|
import { Gas } from '@aztec/stdlib/gas';
|
|
9
9
|
import { PrivateToAvmAccumulatedData, PrivateToAvmAccumulatedDataArrayLengths, PublicCallRequest, countAccumulatedItems, mergeAccumulatedData } from '@aztec/stdlib/kernel';
|
|
10
|
-
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
11
10
|
import { MerkleTreeId } from '@aztec/stdlib/trees';
|
|
12
11
|
import { TreeSnapshots, TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
13
12
|
import { strict as assert } from 'assert';
|
|
14
13
|
import { inspect } from 'util';
|
|
15
14
|
import { AvmPersistableStateManager } from '../avm/index.js';
|
|
15
|
+
import { HintingPublicContractsDB } from '../hinting_db_sources.js';
|
|
16
16
|
import { SideEffectArrayLengths, SideEffectTrace } from '../side_effect_trace.js';
|
|
17
17
|
import { getCallRequestsByPhase, getExecutionRequestsByPhase } from '../utils.js';
|
|
18
18
|
/**
|
|
@@ -35,14 +35,14 @@ import { getCallRequestsByPhase, getExecutionRequestsByPhase } from '../utils.js
|
|
|
35
35
|
revertibleAccumulatedDataFromPrivate;
|
|
36
36
|
feePayer;
|
|
37
37
|
trace;
|
|
38
|
+
hints;
|
|
38
39
|
log;
|
|
39
40
|
/* Gas used including private, teardown gas _limit_, setup and app logic */ gasUsedByPublic;
|
|
40
41
|
/* Gas actually used during teardown (different from limit) */ teardownGasUsed;
|
|
41
42
|
/* Entire transaction execution is done. */ halted;
|
|
42
43
|
/* Where did reverts happen (if at all)? */ revertCode;
|
|
43
44
|
/* What caused a revert (if one occurred)? */ revertReason;
|
|
44
|
-
|
|
45
|
-
constructor(txHash, state, globalVariables, startStateReference, gasSettings, gasUsedByPrivate, gasAllocatedToPublic, setupCallRequests, appLogicCallRequests, teardownCallRequests, setupExecutionRequests, appLogicExecutionRequests, teardownExecutionRequests, nonRevertibleAccumulatedDataFromPrivate, revertibleAccumulatedDataFromPrivate, feePayer, trace){
|
|
45
|
+
constructor(txHash, state, globalVariables, startStateReference, gasSettings, gasUsedByPrivate, gasAllocatedToPublic, setupCallRequests, appLogicCallRequests, teardownCallRequests, setupExecutionRequests, appLogicExecutionRequests, teardownExecutionRequests, nonRevertibleAccumulatedDataFromPrivate, revertibleAccumulatedDataFromPrivate, feePayer, trace, hints){
|
|
46
46
|
this.txHash = txHash;
|
|
47
47
|
this.state = state;
|
|
48
48
|
this.globalVariables = globalVariables;
|
|
@@ -60,24 +60,29 @@ import { getCallRequestsByPhase, getExecutionRequestsByPhase } from '../utils.js
|
|
|
60
60
|
this.revertibleAccumulatedDataFromPrivate = revertibleAccumulatedDataFromPrivate;
|
|
61
61
|
this.feePayer = feePayer;
|
|
62
62
|
this.trace = trace;
|
|
63
|
+
this.hints = hints;
|
|
63
64
|
this.gasUsedByPublic = Gas.empty();
|
|
64
65
|
this.teardownGasUsed = Gas.empty();
|
|
65
66
|
this.halted = false;
|
|
66
67
|
this.revertCode = RevertCode.OK;
|
|
67
68
|
this.log = createLogger(`simulator:public_tx_context`);
|
|
68
69
|
}
|
|
69
|
-
static async create(
|
|
70
|
+
static async create(treesDB, contractsDB, tx, globalVariables, doMerkleOperations) {
|
|
70
71
|
const nonRevertibleAccumulatedDataFromPrivate = tx.data.forPublic.nonRevertibleAccumulatedData;
|
|
71
72
|
const previousAccumulatedDataArrayLengths = new SideEffectArrayLengths(/*publicDataWrites*/ 0, /*protocolPublicDataWrites*/ 0, /*noteHashes*/ 0, /*nullifiers=*/ 0, countAccumulatedItems(nonRevertibleAccumulatedDataFromPrivate.l2ToL1Msgs), /*publicLogs*/ 0);
|
|
72
73
|
const trace = new SideEffectTrace(/*startSideEffectCounter=*/ 0, previousAccumulatedDataArrayLengths);
|
|
73
74
|
const firstNullifier = nonRevertibleAccumulatedDataFromPrivate.nullifiers[0];
|
|
75
|
+
// We wrap the DB to collect AVM hints.
|
|
76
|
+
const hints = new AvmExecutionHints();
|
|
77
|
+
const hintingContractsDB = new HintingPublicContractsDB(contractsDB, hints);
|
|
78
|
+
// TODO: Wrap merkle db.
|
|
74
79
|
// Transaction level state manager that will be forked for revertible phases.
|
|
75
|
-
const txStateManager = AvmPersistableStateManager.create(
|
|
80
|
+
const txStateManager = AvmPersistableStateManager.create(treesDB, hintingContractsDB, trace, doMerkleOperations, firstNullifier, globalVariables.blockNumber.toNumber());
|
|
76
81
|
const gasSettings = tx.data.constants.txContext.gasSettings;
|
|
77
82
|
const gasUsedByPrivate = tx.data.gasUsed;
|
|
78
83
|
// Gas allocated to public is "whatever's left" after private, but with some max applied.
|
|
79
84
|
const gasAllocatedToPublic = applyMaxToAvailableGas(gasSettings.gasLimits.sub(gasUsedByPrivate));
|
|
80
|
-
return new PublicTxContext(await tx.getTxHash(), new PhaseStateManager(txStateManager), globalVariables, await
|
|
85
|
+
return new PublicTxContext(await tx.getTxHash(), new PhaseStateManager(txStateManager), globalVariables, await treesDB.getStateReference(), gasSettings, gasUsedByPrivate, gasAllocatedToPublic, getCallRequestsByPhase(tx, TxExecutionPhase.SETUP), getCallRequestsByPhase(tx, TxExecutionPhase.APP_LOGIC), getCallRequestsByPhase(tx, TxExecutionPhase.TEARDOWN), getExecutionRequestsByPhase(tx, TxExecutionPhase.SETUP), getExecutionRequestsByPhase(tx, TxExecutionPhase.APP_LOGIC), getExecutionRequestsByPhase(tx, TxExecutionPhase.TEARDOWN), tx.data.forPublic.nonRevertibleAccumulatedData, tx.data.forPublic.revertibleAccumulatedData, tx.data.feePayer, trace, hints);
|
|
81
86
|
}
|
|
82
87
|
/**
|
|
83
88
|
* Signal that the entire transaction execution is done.
|
|
@@ -253,22 +258,13 @@ import { getCallRequestsByPhase, getExecutionRequestsByPhase } from '../utils.js
|
|
|
253
258
|
}
|
|
254
259
|
avmCircuitPublicInputs.accumulatedData.publicDataWrites = padArrayEnd(Array.from(squashedPublicDataWrites.entries()).map(([slot, value])=>new PublicDataWrite(new Fr(slot), value)), PublicDataWrite.empty(), MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX);
|
|
255
260
|
const numNoteHashesToPad = MAX_NOTE_HASHES_PER_TX - countAccumulatedItems(avmCircuitPublicInputs.accumulatedData.noteHashes);
|
|
256
|
-
await stateManager.
|
|
261
|
+
await stateManager.deprecatedGetTreesForPIGeneration().appendLeaves(MerkleTreeId.NOTE_HASH_TREE, padArrayEnd([], Fr.ZERO, numNoteHashesToPad));
|
|
257
262
|
const numNullifiersToPad = MAX_NULLIFIERS_PER_TX - countAccumulatedItems(avmCircuitPublicInputs.accumulatedData.nullifiers);
|
|
258
|
-
await stateManager.
|
|
259
|
-
const paddedState = await stateManager.
|
|
263
|
+
await stateManager.deprecatedGetTreesForPIGeneration().batchInsert(MerkleTreeId.NULLIFIER_TREE, padArrayEnd([], Fr.ZERO, numNullifiersToPad).map((nullifier)=>nullifier.toBuffer()), NULLIFIER_SUBTREE_HEIGHT);
|
|
264
|
+
const paddedState = await stateManager.deprecatedGetTreesForPIGeneration().getStateReference();
|
|
260
265
|
avmCircuitPublicInputs.endTreeSnapshots = new TreeSnapshots(paddedState.l1ToL2MessageTree, paddedState.partial.noteHashTree, paddedState.partial.nullifierTree, paddedState.partial.publicDataTree);
|
|
261
266
|
return avmCircuitPublicInputs;
|
|
262
267
|
}
|
|
263
|
-
/**
|
|
264
|
-
* Generate the proving request for the AVM circuit.
|
|
265
|
-
*/ async generateProvingRequest(endStateReference) {
|
|
266
|
-
const hints = this.trace.getAvmCircuitHints();
|
|
267
|
-
return {
|
|
268
|
-
type: ProvingRequestType.PUBLIC_VM,
|
|
269
|
-
inputs: new AvmCircuitInputs('public_dispatch', [], hints, await this.generateAvmCircuitPublicInputs(endStateReference))
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
268
|
}
|
|
273
269
|
/**
|
|
274
270
|
* Thin wrapper around the state manager to handle forking and merging for phases.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AvmProvingRequest, type RevertCode } from '@aztec/stdlib/avm';
|
|
2
2
|
import { SimulationError } from '@aztec/stdlib/errors';
|
|
3
3
|
import type { GasUsed } from '@aztec/stdlib/gas';
|
|
4
|
-
import type { MerkleTreeReadOperations } from '@aztec/stdlib/interfaces/server';
|
|
5
4
|
import { type GlobalVariables, NestedProcessReturnValues, Tx, TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
6
5
|
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
7
6
|
import { ExecutorMetrics } from '../executor_metrics.js';
|
|
8
|
-
import type {
|
|
7
|
+
import type { PublicContractsDB, PublicTreesDB } from '../public_db_sources.js';
|
|
9
8
|
import { PublicTxContext } from './public_tx_context.js';
|
|
10
9
|
export type ProcessedPhase = {
|
|
11
10
|
phase: TxExecutionPhase;
|
|
@@ -24,14 +23,14 @@ export type PublicTxResult = {
|
|
|
24
23
|
processedPhases: ProcessedPhase[];
|
|
25
24
|
};
|
|
26
25
|
export declare class PublicTxSimulator {
|
|
27
|
-
private
|
|
28
|
-
private
|
|
26
|
+
private treesDB;
|
|
27
|
+
private contractsDB;
|
|
29
28
|
private globalVariables;
|
|
30
29
|
private doMerkleOperations;
|
|
31
30
|
private skipFeeEnforcement;
|
|
32
31
|
metrics: ExecutorMetrics;
|
|
33
32
|
private log;
|
|
34
|
-
constructor(
|
|
33
|
+
constructor(treesDB: PublicTreesDB, contractsDB: PublicContractsDB, globalVariables: GlobalVariables, doMerkleOperations?: boolean, skipFeeEnforcement?: boolean, telemetryClient?: TelemetryClient);
|
|
35
34
|
get tracer(): Tracer;
|
|
36
35
|
/**
|
|
37
36
|
* Simulate a transaction's public portion including all of its phases.
|
|
@@ -98,5 +97,9 @@ export declare class PublicTxSimulator {
|
|
|
98
97
|
*/
|
|
99
98
|
insertRevertiblesFromPrivate(context: PublicTxContext): Promise<boolean>;
|
|
100
99
|
private payFee;
|
|
100
|
+
/**
|
|
101
|
+
* Generate the proving request for the AVM circuit.
|
|
102
|
+
*/
|
|
103
|
+
private static generateProvingRequest;
|
|
101
104
|
}
|
|
102
105
|
//# sourceMappingURL=public_tx_simulator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_simulator.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"public_tx_simulator.d.ts","sourceRoot":"","sources":["../../../src/public/public_tx_simulator/public_tx_simulator.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAO,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAItD,OAAO,EACL,KAAK,eAAe,EACpB,yBAAyB,EAEzB,EAAE,EACF,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,MAAM,EAAiC,MAAM,yBAAyB,CAAC;AAQvH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,KAA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AO,CAAC;YA+BpF,MAAM;IAgCpB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAStC"}
|
|
@@ -8,7 +8,9 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
8
8
|
import { Timer } from '@aztec/foundation/timer';
|
|
9
9
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
10
10
|
import { computeFeePayerBalanceStorageSlot } from '@aztec/protocol-contracts/fee-juice';
|
|
11
|
+
import { AvmCircuitInputs, AvmEnqueuedCallHint } from '@aztec/stdlib/avm';
|
|
11
12
|
import { SimulationError } from '@aztec/stdlib/errors';
|
|
13
|
+
import { ProvingRequestType } from '@aztec/stdlib/proofs';
|
|
12
14
|
import { NestedProcessReturnValues, TxExecutionPhase } from '@aztec/stdlib/tx';
|
|
13
15
|
import { Attributes, getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
14
16
|
import { strict as assert } from 'assert';
|
|
@@ -18,16 +20,16 @@ import { NullifierCollisionError } from '../avm/journal/nullifiers.js';
|
|
|
18
20
|
import { ExecutorMetrics } from '../executor_metrics.js';
|
|
19
21
|
import { PublicTxContext } from './public_tx_context.js';
|
|
20
22
|
export class PublicTxSimulator {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
treesDB;
|
|
24
|
+
contractsDB;
|
|
23
25
|
globalVariables;
|
|
24
26
|
doMerkleOperations;
|
|
25
27
|
skipFeeEnforcement;
|
|
26
28
|
metrics;
|
|
27
29
|
log;
|
|
28
|
-
constructor(
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
30
|
+
constructor(treesDB, contractsDB, globalVariables, doMerkleOperations = false, skipFeeEnforcement = false, telemetryClient = getTelemetryClient()){
|
|
31
|
+
this.treesDB = treesDB;
|
|
32
|
+
this.contractsDB = contractsDB;
|
|
31
33
|
this.globalVariables = globalVariables;
|
|
32
34
|
this.doMerkleOperations = doMerkleOperations;
|
|
33
35
|
this.skipFeeEnforcement = skipFeeEnforcement;
|
|
@@ -48,12 +50,12 @@ export class PublicTxSimulator {
|
|
|
48
50
|
this.log.debug(`Simulating ${tx.enqueuedPublicFunctionCalls.length} public calls for tx ${txHash}`, {
|
|
49
51
|
txHash
|
|
50
52
|
});
|
|
51
|
-
const context = await PublicTxContext.create(this.
|
|
53
|
+
const context = await PublicTxContext.create(this.treesDB, this.contractsDB, tx, this.globalVariables, this.doMerkleOperations);
|
|
52
54
|
const nonRevertStart = process.hrtime.bigint();
|
|
53
55
|
await this.insertNonRevertiblesFromPrivate(context);
|
|
54
56
|
// add new contracts to the contracts db so that their functions may be found and called
|
|
55
57
|
// TODO(#6464): Should we allow emitting contracts in the private setup phase?
|
|
56
|
-
await this.
|
|
58
|
+
await this.contractsDB.addNewNonRevertibleContracts(tx);
|
|
57
59
|
const nonRevertEnd = process.hrtime.bigint();
|
|
58
60
|
this.metrics.recordPrivateEffectsInsertion(Number(nonRevertEnd - nonRevertStart) / 1_000, 'non-revertible');
|
|
59
61
|
const processedPhases = [];
|
|
@@ -65,7 +67,7 @@ export class PublicTxSimulator {
|
|
|
65
67
|
const success = await this.insertRevertiblesFromPrivate(context);
|
|
66
68
|
if (success) {
|
|
67
69
|
// add new contracts to the contracts db so that their functions may be found and called
|
|
68
|
-
await this.
|
|
70
|
+
await this.contractsDB.addNewRevertibleContracts(tx);
|
|
69
71
|
const revertEnd = process.hrtime.bigint();
|
|
70
72
|
this.metrics.recordPrivateEffectsInsertion(Number(revertEnd - revertStart) / 1_000, 'revertible');
|
|
71
73
|
// Only proceed with app logic if there was no revert during revertible insertion
|
|
@@ -82,8 +84,8 @@ export class PublicTxSimulator {
|
|
|
82
84
|
}
|
|
83
85
|
await context.halt();
|
|
84
86
|
await this.payFee(context);
|
|
85
|
-
const
|
|
86
|
-
const avmProvingRequest =
|
|
87
|
+
const publicInputs = await context.generateAvmCircuitPublicInputs(await this.treesDB.getStateReference());
|
|
88
|
+
const avmProvingRequest = PublicTxSimulator.generateProvingRequest(publicInputs, context.hints);
|
|
87
89
|
const revertCode = context.getFinalRevertCode();
|
|
88
90
|
if (!revertCode.isOK()) {
|
|
89
91
|
await tx.filterRevertedLogs();
|
|
@@ -91,7 +93,7 @@ export class PublicTxSimulator {
|
|
|
91
93
|
// Commit contracts from this TX to the block-level cache and clear tx cache
|
|
92
94
|
// If the tx reverted, only commit non-revertible contracts
|
|
93
95
|
// NOTE: You can't create contracts in public, so this is only relevant for private-created contracts
|
|
94
|
-
this.
|
|
96
|
+
this.contractsDB.commitContractsForTx(/*onlyNonRevertibles=*/ !revertCode.isOK());
|
|
95
97
|
const endTime = process.hrtime.bigint();
|
|
96
98
|
this.log.debug(`Public TX simulator took ${Number(endTime - startTime) / 1_000_000} ms\n`);
|
|
97
99
|
return {
|
|
@@ -109,7 +111,7 @@ export class PublicTxSimulator {
|
|
|
109
111
|
} finally{
|
|
110
112
|
// Make sure there are no new contracts in the tx-level cache.
|
|
111
113
|
// They should either be committed to block-level cache or cleared.
|
|
112
|
-
this.
|
|
114
|
+
this.contractsDB.clearContractsForTx();
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
/**
|
|
@@ -206,13 +208,17 @@ export class PublicTxSimulator {
|
|
|
206
208
|
*/ async simulateEnqueuedCall(phase, context, callRequest, executionRequest) {
|
|
207
209
|
const stateManager = context.state.getActiveStateManager();
|
|
208
210
|
const address = executionRequest.callContext.contractAddress;
|
|
209
|
-
const fnName = await getPublicFunctionDebugName(this.
|
|
211
|
+
const fnName = await getPublicFunctionDebugName(this.contractsDB, address, executionRequest.args);
|
|
210
212
|
const allocatedGas = context.getGasLeftAtPhase(phase);
|
|
213
|
+
// The reason we need enqueued hints at all (and cannot just use the public inputs) is
|
|
214
|
+
// because they don't have the actual calldata, just the hash of it.
|
|
215
|
+
// If/when we pass the whole TX to C++, we can remove this class of hints.
|
|
216
|
+
stateManager.traceEnqueuedCall(callRequest);
|
|
217
|
+
context.hints.enqueuedCalls.push(new AvmEnqueuedCallHint(executionRequest.callContext.msgSender, executionRequest.callContext.contractAddress, executionRequest.args, executionRequest.callContext.isStaticCall));
|
|
211
218
|
const result = await this.simulateEnqueuedCallInternal(context.state.getActiveStateManager(), executionRequest, allocatedGas, /*transactionFee=*/ context.getTransactionFee(phase), fnName);
|
|
212
219
|
const gasUsed = allocatedGas.sub(result.gasLeft); // by enqueued call
|
|
213
220
|
context.consumeGas(phase, gasUsed);
|
|
214
221
|
this.log.debug(`Simulated enqueued public call (${fnName}) consumed ${gasUsed.l2Gas} L2 gas ending with ${result.gasLeft.l2Gas} L2 gas left.`);
|
|
215
|
-
stateManager.traceEnqueuedCall(callRequest, executionRequest.args, result.reverted);
|
|
216
222
|
if (result.reverted) {
|
|
217
223
|
const culprit = `${executionRequest.callContext.contractAddress}:${executionRequest.callContext.functionSelector}`;
|
|
218
224
|
context.revert(phase, result.revertReason, culprit); // throws if in setup (non-revertible) phase
|
|
@@ -318,6 +324,14 @@ export class PublicTxSimulator {
|
|
|
318
324
|
const updatedBalance = currentBalance.sub(txFee);
|
|
319
325
|
await stateManager.writeStorage(feeJuiceAddress, balanceSlot, updatedBalance, true);
|
|
320
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Generate the proving request for the AVM circuit.
|
|
329
|
+
*/ static generateProvingRequest(publicInputs, hints) {
|
|
330
|
+
return {
|
|
331
|
+
type: ProvingRequestType.PUBLIC_VM,
|
|
332
|
+
inputs: new AvmCircuitInputs('public_dispatch', [], hints, publicInputs)
|
|
333
|
+
};
|
|
334
|
+
}
|
|
321
335
|
}
|
|
322
336
|
_ts_decorate([
|
|
323
337
|
trackSpan('PublicTxSimulator.simulateEnqueuedCall', (phase, context, _callRequest, executionRequest)=>({
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { AvmCircuitPublicInputs,
|
|
2
|
+
import { AvmCircuitPublicInputs, PublicDataUpdateRequest } from '@aztec/stdlib/avm';
|
|
3
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import { type ContractClassWithCommitment, SerializableContractInstance } from '@aztec/stdlib/contract';
|
|
5
4
|
import type { Gas, GasSettings } from '@aztec/stdlib/gas';
|
|
6
5
|
import { NoteHash, Nullifier, PublicCallRequest } from '@aztec/stdlib/kernel';
|
|
7
6
|
import { PublicLog } from '@aztec/stdlib/logs';
|
|
8
7
|
import { ScopedL2ToL1Message } from '@aztec/stdlib/messaging';
|
|
9
|
-
import { NullifierLeafPreimage, PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees';
|
|
10
8
|
import type { GlobalVariables, TreeSnapshots } from '@aztec/stdlib/tx';
|
|
11
9
|
import type { PublicSideEffectTraceInterface } from './side_effect_trace_interface.js';
|
|
12
10
|
import { UniqueClassIds } from './unique_class_ids.js';
|
|
@@ -56,7 +54,6 @@ export declare class SideEffectTrace implements PublicSideEffectTraceInterface {
|
|
|
56
54
|
private nullifiers;
|
|
57
55
|
private l2ToL1Messages;
|
|
58
56
|
private publicLogs;
|
|
59
|
-
private avmCircuitHints;
|
|
60
57
|
/** Make sure a forked trace is never merged twice. */
|
|
61
58
|
private alreadyMergedIntoParent;
|
|
62
59
|
constructor(
|
|
@@ -70,32 +67,20 @@ export declare class SideEffectTrace implements PublicSideEffectTraceInterface {
|
|
|
70
67
|
uniqueClassIds?: UniqueClassIds);
|
|
71
68
|
fork(): SideEffectTrace;
|
|
72
69
|
merge(forkedTrace: this, reverted?: boolean): void;
|
|
73
|
-
private mergeHints;
|
|
74
70
|
getCounter(): number;
|
|
75
71
|
private incrementSideEffectCounter;
|
|
76
72
|
getNoteHashCount(): number;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
traceNewNoteHash(noteHash: Fr, leafIndex?: Fr, path?: Fr[]): void;
|
|
81
|
-
traceNullifierCheck(_siloedNullifier: Fr, _exists: boolean, lowLeafPreimage?: NullifierLeafPreimage, lowLeafIndex?: Fr, lowLeafPath?: Fr[]): void;
|
|
82
|
-
traceNewNullifier(siloedNullifier: Fr, lowLeafPreimage?: NullifierLeafPreimage, lowLeafIndex?: Fr, lowLeafPath?: Fr[], insertionPath?: Fr[]): void;
|
|
83
|
-
traceL1ToL2MessageCheck(_contractAddress: AztecAddress, msgHash: Fr, msgLeafIndex: Fr, _exists: boolean, path?: Fr[]): void;
|
|
73
|
+
tracePublicStorageWrite(contractAddress: AztecAddress, slot: Fr, value: Fr, protocolWrite: boolean): Promise<void>;
|
|
74
|
+
traceNewNoteHash(noteHash: Fr): void;
|
|
75
|
+
traceNewNullifier(siloedNullifier: Fr): void;
|
|
84
76
|
traceNewL2ToL1Message(contractAddress: AztecAddress, recipient: Fr, content: Fr): void;
|
|
85
77
|
tracePublicLog(contractAddress: AztecAddress, log: Fr[]): void;
|
|
86
|
-
|
|
87
|
-
traceGetContractClass(contractClassId: Fr, exists: boolean, contractClass?: ContractClassWithCommitment): void;
|
|
78
|
+
traceGetContractClass(contractClassId: Fr, exists: boolean): void;
|
|
88
79
|
/**
|
|
89
80
|
* Trace an enqueued call.
|
|
90
81
|
* Accept some results from a finished call's trace into this one.
|
|
91
82
|
*/
|
|
92
|
-
traceEnqueuedCall(
|
|
93
|
-
/** The call request from private that enqueued this call. */
|
|
94
|
-
publicCallRequest: PublicCallRequest,
|
|
95
|
-
/** The call's calldata */
|
|
96
|
-
calldata: Fr[],
|
|
97
|
-
/** Did the call revert? */
|
|
98
|
-
_reverted: boolean): void;
|
|
83
|
+
traceEnqueuedCall(publicCallRequest: PublicCallRequest): void;
|
|
99
84
|
getSideEffects(): SideEffects;
|
|
100
85
|
toAvmCircuitPublicInputs(
|
|
101
86
|
/** Globals. */
|
|
@@ -126,7 +111,6 @@ export declare class SideEffectTrace implements PublicSideEffectTraceInterface {
|
|
|
126
111
|
/** The call's results */
|
|
127
112
|
reverted: boolean): AvmCircuitPublicInputs;
|
|
128
113
|
getPublicLogs(): PublicLog[];
|
|
129
|
-
getAvmCircuitHints(): AvmExecutionHints;
|
|
130
114
|
private getAvmAccumulatedData;
|
|
131
115
|
}
|
|
132
116
|
//# sourceMappingURL=side_effect_trace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side_effect_trace.d.ts","sourceRoot":"","sources":["../../src/public/side_effect_trace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"side_effect_trace.d.ts","sourceRoot":"","sources":["../../src/public/side_effect_trace.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAEL,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,QAAQ,EACR,SAAS,EAGT,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAiB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKvE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;IAII;AACJ,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,gBAAgB,EAAE,uBAAuB,EAAE,CAAC;IAC5C,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,qBAAa,sBAAsB;aAEf,gBAAgB,EAAE,MAAM;aACxB,wBAAwB,EAAE,MAAM;a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OGS_PER_TX, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, PROTOCOL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, PUBLIC_LOG_DATA_SIZE_IN_FIELDS } from '@aztec/constants';
|
|
2
2
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
5
|
import { createLogger } from '@aztec/foundation/log';
|
|
6
|
-
import { AvmAccumulatedData,
|
|
7
|
-
import { SerializableContractInstance } from '@aztec/stdlib/contract';
|
|
6
|
+
import { AvmAccumulatedData, AvmCircuitPublicInputs, PublicDataUpdateRequest, PublicDataWrite } from '@aztec/stdlib/avm';
|
|
8
7
|
import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
|
|
9
8
|
import { NoteHash, Nullifier, PrivateToAvmAccumulatedData, PrivateToAvmAccumulatedDataArrayLengths, PublicCallRequest } from '@aztec/stdlib/kernel';
|
|
10
9
|
import { PublicLog } from '@aztec/stdlib/logs';
|
|
11
10
|
import { L2ToL1Message, ScopedL2ToL1Message } from '@aztec/stdlib/messaging';
|
|
12
|
-
import { NullifierLeafPreimage, PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees';
|
|
13
11
|
import { strict as assert } from 'assert';
|
|
14
12
|
import { SideEffectLimitReachedError } from './side_effect_errors.js';
|
|
15
13
|
import { UniqueClassIds } from './unique_class_ids.js';
|
|
16
|
-
const emptyPublicDataPath = ()=>new Array(PUBLIC_DATA_TREE_HEIGHT).fill(Fr.zero());
|
|
17
|
-
const emptyNoteHashPath = ()=>new Array(NOTE_HASH_TREE_HEIGHT).fill(Fr.zero());
|
|
18
|
-
const emptyNullifierPath = ()=>new Array(NULLIFIER_TREE_HEIGHT).fill(Fr.zero());
|
|
19
|
-
const emptyL1ToL2MessagePath = ()=>new Array(L1_TO_L2_MSG_TREE_HEIGHT).fill(Fr.zero());
|
|
20
14
|
export class SideEffectArrayLengths {
|
|
21
15
|
publicDataWrites;
|
|
22
16
|
protocolPublicDataWrites;
|
|
@@ -52,7 +46,6 @@ export class SideEffectArrayLengths {
|
|
|
52
46
|
nullifiers;
|
|
53
47
|
l2ToL1Messages;
|
|
54
48
|
publicLogs;
|
|
55
|
-
avmCircuitHints;
|
|
56
49
|
/** Make sure a forked trace is never merged twice. */ alreadyMergedIntoParent;
|
|
57
50
|
constructor(/** The counter of this trace's first side effect. */ startSideEffectCounter = 0, /** Track parent's (or previous kernel's) lengths so the AVM can properly enforce TX-wide limits,
|
|
58
51
|
* otherwise the public kernel can fail to prove because TX limits are breached.
|
|
@@ -71,7 +64,6 @@ export class SideEffectArrayLengths {
|
|
|
71
64
|
this.publicLogs = [];
|
|
72
65
|
this.alreadyMergedIntoParent = false;
|
|
73
66
|
this.sideEffectCounter = startSideEffectCounter;
|
|
74
|
-
this.avmCircuitHints = AvmExecutionHints.empty();
|
|
75
67
|
}
|
|
76
68
|
fork() {
|
|
77
69
|
return new SideEffectTrace(this.sideEffectCounter, new SideEffectArrayLengths(this.previousSideEffectArrayLengths.publicDataWrites + this.userPublicDataWritesLength, this.previousSideEffectArrayLengths.protocolPublicDataWrites + this.protocolPublicDataWritesLength, this.previousSideEffectArrayLengths.noteHashes + this.noteHashes.length, this.previousSideEffectArrayLengths.nullifiers + this.nullifiers.length, this.previousSideEffectArrayLengths.l2ToL1Msgs + this.l2ToL1Messages.length, this.previousSideEffectArrayLengths.publicLogs + this.publicLogs.length), this.uniqueClassIds.fork());
|
|
@@ -82,6 +74,7 @@ export class SideEffectArrayLengths {
|
|
|
82
74
|
forkedTrace.alreadyMergedIntoParent = true;
|
|
83
75
|
this.sideEffectCounter = forkedTrace.sideEffectCounter;
|
|
84
76
|
this.enqueuedCalls.push(...forkedTrace.enqueuedCalls);
|
|
77
|
+
this.uniqueClassIds.acceptAndMerge(forkedTrace.uniqueClassIds);
|
|
85
78
|
if (!reverted) {
|
|
86
79
|
this.publicDataWrites.push(...forkedTrace.publicDataWrites);
|
|
87
80
|
this.noteHashes.push(...forkedTrace.noteHashes);
|
|
@@ -89,20 +82,6 @@ export class SideEffectArrayLengths {
|
|
|
89
82
|
this.l2ToL1Messages.push(...forkedTrace.l2ToL1Messages);
|
|
90
83
|
this.publicLogs.push(...forkedTrace.publicLogs);
|
|
91
84
|
}
|
|
92
|
-
this.mergeHints(forkedTrace);
|
|
93
|
-
}
|
|
94
|
-
mergeHints(forkedTrace) {
|
|
95
|
-
this.uniqueClassIds.acceptAndMerge(forkedTrace.uniqueClassIds);
|
|
96
|
-
this.avmCircuitHints.enqueuedCalls.push(...forkedTrace.avmCircuitHints.enqueuedCalls);
|
|
97
|
-
this.avmCircuitHints.contractInstances.push(...forkedTrace.avmCircuitHints.contractInstances);
|
|
98
|
-
this.avmCircuitHints.contractClasses.push(...forkedTrace.avmCircuitHints.contractClasses);
|
|
99
|
-
this.avmCircuitHints.publicDataReads.push(...forkedTrace.avmCircuitHints.publicDataReads);
|
|
100
|
-
this.avmCircuitHints.publicDataWrites.push(...forkedTrace.avmCircuitHints.publicDataWrites);
|
|
101
|
-
this.avmCircuitHints.nullifierReads.push(...forkedTrace.avmCircuitHints.nullifierReads);
|
|
102
|
-
this.avmCircuitHints.nullifierWrites.push(...forkedTrace.avmCircuitHints.nullifierWrites);
|
|
103
|
-
this.avmCircuitHints.noteHashReads.push(...forkedTrace.avmCircuitHints.noteHashReads);
|
|
104
|
-
this.avmCircuitHints.noteHashWrites.push(...forkedTrace.avmCircuitHints.noteHashWrites);
|
|
105
|
-
this.avmCircuitHints.l1ToL2MessageReads.push(...forkedTrace.avmCircuitHints.l1ToL2MessageReads);
|
|
106
85
|
}
|
|
107
86
|
getCounter() {
|
|
108
87
|
return this.sideEffectCounter;
|
|
@@ -113,12 +92,7 @@ export class SideEffectArrayLengths {
|
|
|
113
92
|
getNoteHashCount() {
|
|
114
93
|
return this.previousSideEffectArrayLengths.noteHashes + this.noteHashes.length;
|
|
115
94
|
}
|
|
116
|
-
|
|
117
|
-
this.avmCircuitHints.publicDataReads.push(new AvmPublicDataReadTreeHint(leafPreimage, leafIndex, path));
|
|
118
|
-
this.log.trace(`Tracing storage read (address=${contractAddress}, slot=${slot}): value=${value} (counter=${this.sideEffectCounter})`);
|
|
119
|
-
this.incrementSideEffectCounter();
|
|
120
|
-
}
|
|
121
|
-
async tracePublicStorageWrite(contractAddress, slot, value, protocolWrite, lowLeafPreimage = PublicDataTreeLeafPreimage.empty(), lowLeafIndex = Fr.zero(), lowLeafPath = emptyPublicDataPath(), newLeafPreimage = PublicDataTreeLeafPreimage.empty(), insertionPath = emptyPublicDataPath()) {
|
|
95
|
+
async tracePublicStorageWrite(contractAddress, slot, value, protocolWrite) {
|
|
122
96
|
if (protocolWrite) {
|
|
123
97
|
if (this.protocolPublicDataWritesLength + this.previousSideEffectArrayLengths.protocolPublicDataWrites >= PROTOCOL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX) {
|
|
124
98
|
throw new SideEffectLimitReachedError('protocol public data (contract storage) write', PROTOCOL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX);
|
|
@@ -132,48 +106,25 @@ export class SideEffectArrayLengths {
|
|
|
132
106
|
}
|
|
133
107
|
const leafSlot = await computePublicDataTreeLeafSlot(contractAddress, slot);
|
|
134
108
|
this.publicDataWrites.push(new PublicDataUpdateRequest(leafSlot, value, this.sideEffectCounter));
|
|
135
|
-
// New hinting
|
|
136
|
-
const readHint = new AvmPublicDataReadTreeHint(lowLeafPreimage, lowLeafIndex, lowLeafPath);
|
|
137
|
-
this.avmCircuitHints.publicDataWrites.push(new AvmPublicDataWriteTreeHint(readHint, newLeafPreimage, insertionPath));
|
|
138
109
|
this.log.trace(`Traced public data write (address=${contractAddress}, slot=${slot}): value=${value} (counter=${this.sideEffectCounter}, isProtocol:${protocolWrite})`);
|
|
139
110
|
this.incrementSideEffectCounter();
|
|
140
111
|
}
|
|
141
|
-
|
|
142
|
-
traceNoteHashCheck(_contractAddress, noteHash, leafIndex, _exists, path = emptyNoteHashPath()) {
|
|
143
|
-
// New Hinting
|
|
144
|
-
this.avmCircuitHints.noteHashReads.push(new AvmAppendTreeHint(leafIndex, noteHash, path));
|
|
145
|
-
// NOTE: counter does not increment for note hash checks (because it doesn't rely on pending note hashes)
|
|
146
|
-
this.log.trace(`Tracing note hash check (counter=${this.sideEffectCounter})`);
|
|
147
|
-
}
|
|
148
|
-
traceNewNoteHash(noteHash, leafIndex = Fr.zero(), path = emptyNoteHashPath()) {
|
|
112
|
+
traceNewNoteHash(noteHash) {
|
|
149
113
|
if (this.noteHashes.length + this.previousSideEffectArrayLengths.noteHashes >= MAX_NOTE_HASHES_PER_TX) {
|
|
150
114
|
throw new SideEffectLimitReachedError('note hash', MAX_NOTE_HASHES_PER_TX);
|
|
151
115
|
}
|
|
152
116
|
this.noteHashes.push(new NoteHash(noteHash, this.sideEffectCounter));
|
|
153
|
-
this.avmCircuitHints.noteHashWrites.push(new AvmAppendTreeHint(leafIndex, noteHash, path));
|
|
154
117
|
this.log.trace(`Tracing new note hash (counter=${this.sideEffectCounter})`);
|
|
155
118
|
this.incrementSideEffectCounter();
|
|
156
119
|
}
|
|
157
|
-
|
|
158
|
-
this.avmCircuitHints.nullifierReads.push(new AvmNullifierReadTreeHint(lowLeafPreimage, lowLeafIndex, lowLeafPath));
|
|
159
|
-
this.log.trace(`Tracing nullifier check (counter=${this.sideEffectCounter})`);
|
|
160
|
-
this.incrementSideEffectCounter();
|
|
161
|
-
}
|
|
162
|
-
traceNewNullifier(siloedNullifier, lowLeafPreimage = NullifierLeafPreimage.empty(), lowLeafIndex = Fr.zero(), lowLeafPath = emptyNullifierPath(), insertionPath = emptyNullifierPath()) {
|
|
120
|
+
traceNewNullifier(siloedNullifier) {
|
|
163
121
|
if (this.nullifiers.length + this.previousSideEffectArrayLengths.nullifiers >= MAX_NULLIFIERS_PER_TX) {
|
|
164
122
|
throw new SideEffectLimitReachedError('nullifier', MAX_NULLIFIERS_PER_TX);
|
|
165
123
|
}
|
|
166
124
|
this.nullifiers.push(new Nullifier(siloedNullifier, this.sideEffectCounter, /*noteHash=*/ Fr.ZERO));
|
|
167
|
-
const lowLeafReadHint = new AvmNullifierReadTreeHint(lowLeafPreimage, lowLeafIndex, lowLeafPath);
|
|
168
|
-
this.avmCircuitHints.nullifierWrites.push(new AvmNullifierWriteTreeHint(lowLeafReadHint, insertionPath));
|
|
169
125
|
this.log.trace(`Tracing new nullifier (counter=${this.sideEffectCounter})`);
|
|
170
126
|
this.incrementSideEffectCounter();
|
|
171
127
|
}
|
|
172
|
-
// TODO(8287): _exists can be removed once we have the vm properly handling the equality check
|
|
173
|
-
traceL1ToL2MessageCheck(_contractAddress, msgHash, msgLeafIndex, _exists, path = emptyL1ToL2MessagePath()) {
|
|
174
|
-
this.avmCircuitHints.l1ToL2MessageReads.push(new AvmAppendTreeHint(msgLeafIndex, msgHash, path));
|
|
175
|
-
this.log.trace(`Tracing l1 to l2 message check (counter=${this.sideEffectCounter})`);
|
|
176
|
-
}
|
|
177
128
|
traceNewL2ToL1Message(contractAddress, recipient, content) {
|
|
178
129
|
if (this.l2ToL1Messages.length + this.previousSideEffectArrayLengths.l2ToL1Msgs >= MAX_L2_TO_L1_MSGS_PER_TX) {
|
|
179
130
|
throw new SideEffectLimitReachedError('l2 to l1 message', MAX_L2_TO_L1_MSGS_PER_TX);
|
|
@@ -195,31 +146,24 @@ export class SideEffectArrayLengths {
|
|
|
195
146
|
this.log.trace(`Tracing new public log (counter=${this.sideEffectCounter})`);
|
|
196
147
|
this.incrementSideEffectCounter();
|
|
197
148
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
this.
|
|
201
|
-
this.incrementSideEffectCounter();
|
|
202
|
-
}
|
|
203
|
-
traceGetContractClass(contractClassId, exists, contractClass) {
|
|
204
|
-
if (!exists) {
|
|
205
|
-
this.avmCircuitHints.contractClasses.push(new AvmContractClassHint(contractClassId, exists, Fr.zero(), Fr.zero(), Fr.zero(), Buffer.alloc(0)));
|
|
206
|
-
} else if (!this.uniqueClassIds.has(contractClassId.toString())) {
|
|
149
|
+
traceGetContractClass(contractClassId, exists) {
|
|
150
|
+
// We limit the number of unique contract class IDs due to hashing and the trace length limit.
|
|
151
|
+
if (exists && !this.uniqueClassIds.has(contractClassId.toString())) {
|
|
207
152
|
if (this.uniqueClassIds.size() >= MAX_PUBLIC_CALLS_TO_UNIQUE_CONTRACT_CLASS_IDS) {
|
|
208
153
|
this.log.debug(`Bytecode retrieval failure for contract class ID ${contractClassId} (limit reached)`);
|
|
209
154
|
throw new SideEffectLimitReachedError('contract calls to unique class IDs', MAX_PUBLIC_CALLS_TO_UNIQUE_CONTRACT_CLASS_IDS);
|
|
210
155
|
}
|
|
156
|
+
this.log.trace(`Adding contract class ID ${contractClassId} (counter=${this.sideEffectCounter})`);
|
|
211
157
|
this.uniqueClassIds.add(contractClassId.toString());
|
|
212
|
-
this.avmCircuitHints.contractClasses.push(new AvmContractClassHint(contractClassId, exists, contractClass.artifactHash, contractClass.privateFunctionsRoot, contractClass.publicBytecodeCommitment, contractClass.packedBytecode));
|
|
213
158
|
this.incrementSideEffectCounter();
|
|
214
159
|
}
|
|
215
160
|
}
|
|
216
161
|
/**
|
|
217
162
|
* Trace an enqueued call.
|
|
218
163
|
* Accept some results from a finished call's trace into this one.
|
|
219
|
-
*/ traceEnqueuedCall(
|
|
164
|
+
*/ traceEnqueuedCall(publicCallRequest) {
|
|
220
165
|
// TODO(4805): check if some threshold is reached for max enqueued or nested calls (to unique contracts?)
|
|
221
166
|
this.enqueuedCalls.push(publicCallRequest);
|
|
222
|
-
this.avmCircuitHints.enqueuedCalls.push(new AvmEnqueuedCallHint(publicCallRequest.contractAddress, calldata));
|
|
223
167
|
}
|
|
224
168
|
getSideEffects() {
|
|
225
169
|
return {
|
|
@@ -240,9 +184,6 @@ export class SideEffectArrayLengths {
|
|
|
240
184
|
getPublicLogs() {
|
|
241
185
|
return this.publicLogs;
|
|
242
186
|
}
|
|
243
|
-
getAvmCircuitHints() {
|
|
244
|
-
return this.avmCircuitHints;
|
|
245
|
-
}
|
|
246
187
|
getAvmAccumulatedData() {
|
|
247
188
|
return new AvmAccumulatedData(padArrayEnd(this.noteHashes.map((n)=>n.value), Fr.zero(), MAX_NOTE_HASHES_PER_TX), padArrayEnd(this.nullifiers.map((n)=>n.value), Fr.zero(), MAX_NULLIFIERS_PER_TX), padArrayEnd(this.l2ToL1Messages, ScopedL2ToL1Message.empty(), MAX_L2_TO_L1_MSGS_PER_TX), padArrayEnd(this.publicLogs, PublicLog.empty(), MAX_PUBLIC_LOGS_PER_TX), padArrayEnd(this.publicDataWrites.map((w)=>new PublicDataWrite(w.leafSlot, w.newValue)), PublicDataWrite.empty(), MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX));
|
|
248
189
|
}
|
|
@@ -1,34 +1,20 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { AvmPublicDataReadTreeHint } from '@aztec/stdlib/avm';
|
|
3
2
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import type { ContractClassWithCommitment, SerializableContractInstance } from '@aztec/stdlib/contract';
|
|
5
3
|
import type { PublicCallRequest } from '@aztec/stdlib/kernel';
|
|
6
4
|
import type { PublicLog } from '@aztec/stdlib/logs';
|
|
7
|
-
import type { NullifierLeafPreimage, PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees';
|
|
8
5
|
export interface PublicSideEffectTraceInterface {
|
|
9
6
|
fork(): PublicSideEffectTraceInterface;
|
|
10
7
|
merge(nestedTrace: PublicSideEffectTraceInterface, reverted?: boolean): void;
|
|
11
8
|
getCounter(): number;
|
|
12
|
-
tracePublicStorageRead(contractAddress: AztecAddress, slot: Fr, value: Fr, leafPreimage?: PublicDataTreeLeafPreimage, leafIndex?: Fr, path?: Fr[]): void;
|
|
13
9
|
tracePublicStorageWrite(contractAddress: AztecAddress, slot: Fr, // This is the storage slot not the computed leaf slot
|
|
14
|
-
value: Fr, protocolWrite: boolean
|
|
15
|
-
|
|
16
|
-
traceNewNoteHash(uniqueNoteHash: Fr, leafIndex?: Fr, path?: Fr[]): void;
|
|
10
|
+
value: Fr, protocolWrite: boolean): Promise<void>;
|
|
11
|
+
traceNewNoteHash(uniqueNoteHash: Fr): void;
|
|
17
12
|
getNoteHashCount(): number;
|
|
18
|
-
|
|
19
|
-
traceNewNullifier(siloedNullifier: Fr, lowLeafPreimage?: NullifierLeafPreimage, lowLeafIndex?: Fr, lowLeafPath?: Fr[], insertionPath?: Fr[]): void;
|
|
20
|
-
traceL1ToL2MessageCheck(contractAddress: AztecAddress, msgHash: Fr, msgLeafIndex: Fr, exists: boolean, path?: Fr[]): void;
|
|
13
|
+
traceNewNullifier(siloedNullifier: Fr): void;
|
|
21
14
|
traceNewL2ToL1Message(contractAddress: AztecAddress, recipient: Fr, content: Fr): void;
|
|
22
15
|
tracePublicLog(contractAddress: AztecAddress, log: Fr[]): void;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
traceEnqueuedCall(
|
|
26
|
-
/** The call request from private that enqueued this call. */
|
|
27
|
-
publicCallRequest: PublicCallRequest,
|
|
28
|
-
/** The call's calldata */
|
|
29
|
-
calldata: Fr[],
|
|
30
|
-
/** Did the call revert? */
|
|
31
|
-
reverted: boolean): void;
|
|
16
|
+
traceGetContractClass(contractClassId: Fr, exists: boolean): void;
|
|
17
|
+
traceEnqueuedCall(publicCallRequest: PublicCallRequest): void;
|
|
32
18
|
getPublicLogs(): PublicLog[];
|
|
33
19
|
}
|
|
34
20
|
//# sourceMappingURL=side_effect_trace_interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side_effect_trace_interface.d.ts","sourceRoot":"","sources":["../../src/public/side_effect_trace_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,
|
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