@aztec/txe 0.0.1-commit.d431d1c → 0.0.1-commit.e2b2873ed
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/oracle/interfaces.d.ts +3 -3
- package/dest/oracle/interfaces.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_public_context.d.ts +5 -5
- package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_public_context.js +6 -6
- package/dest/oracle/txe_oracle_top_level_context.d.ts +2 -2
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +86 -24
- package/dest/rpc_translator.d.ts +14 -8
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +58 -34
- package/dest/state_machine/archiver.d.ts +2 -2
- package/dest/state_machine/archiver.d.ts.map +1 -1
- package/dest/state_machine/archiver.js +7 -6
- package/dest/state_machine/dummy_p2p_client.d.ts +9 -8
- package/dest/state_machine/dummy_p2p_client.d.ts.map +1 -1
- package/dest/state_machine/dummy_p2p_client.js +15 -12
- package/dest/state_machine/index.d.ts +7 -7
- package/dest/state_machine/index.d.ts.map +1 -1
- package/dest/state_machine/index.js +30 -16
- package/dest/state_machine/mock_epoch_cache.d.ts +6 -2
- package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
- package/dest/state_machine/mock_epoch_cache.js +6 -1
- package/dest/state_machine/synchronizer.d.ts +3 -3
- package/dest/state_machine/synchronizer.d.ts.map +1 -1
- package/dest/txe_session.d.ts +1 -1
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +69 -11
- package/dest/utils/block_creation.d.ts +5 -5
- package/dest/utils/block_creation.d.ts.map +1 -1
- package/dest/utils/block_creation.js +7 -5
- package/package.json +15 -15
- package/src/oracle/interfaces.ts +2 -2
- package/src/oracle/txe_oracle_public_context.ts +8 -10
- package/src/oracle/txe_oracle_top_level_context.ts +104 -72
- package/src/rpc_translator.ts +60 -28
- package/src/state_machine/archiver.ts +6 -8
- package/src/state_machine/dummy_p2p_client.ts +21 -15
- package/src/state_machine/index.ts +48 -19
- package/src/state_machine/mock_epoch_cache.ts +7 -1
- package/src/state_machine/synchronizer.ts +2 -2
- package/src/txe_session.ts +74 -66
- package/src/utils/block_creation.ts +8 -6
package/dest/txe_session.d.ts
CHANGED
|
@@ -72,4 +72,4 @@ export declare class TXESession implements TXESessionStateHandler {
|
|
|
72
72
|
private utilityExecutorForContractSync;
|
|
73
73
|
}
|
|
74
74
|
export {};
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHhlX3Nlc3Npb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy90eGVfc2Vzc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDOUQsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBZ0IsTUFBTSx1QkFBdUIsQ0FBQztBQUNsRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFNUMsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNsRSxPQUFPLEVBQ0wsWUFBWSxFQUVaLFlBQVksRUFDWixjQUFjLEVBRWQsU0FBUyxFQUNULGlCQUFpQixFQUNqQixxQkFBcUIsRUFDckIsc0JBQXNCLEVBQ3RCLGtCQUFrQixFQUNuQixNQUFNLG1CQUFtQixDQUFDO0FBQzNCLE9BQU8sRUFJTCxLQUFLLHVCQUF1QixFQUM1QixLQUFLLHVCQUF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ZQWlCWCxnQkFBZ0I7WUE2QmhCLGVBQWU7SUFTN0IsT0FBTyxDQUFDLGtCQUFrQjtJQU0xQixPQUFPLENBQUMsOEJBQThCO0NBNEN2QyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txe_session.d.ts","sourceRoot":"","sources":["../src/txe_session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"txe_session.d.ts","sourceRoot":"","sources":["../src/txe_session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,YAAY,EAEZ,YAAY,EACZ,cAAc,EAEd,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAI7B,MAAM,sBAAsB,CAAC;AAW9B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAO5D,OAAO,KAAK,EAAE,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,CAAC,CA4D/B;IAEK,gBAAgB,CAAC,eAAe,CAAC,EAAE,YAAY,iBAsBpD;IAEK,iBAAiB,CAAC,eAAe,GAAE,YAA8B,iBAoCtE;IAED,OAAO,CAAC,iBAAiB;YAiBX,gBAAgB;YA6BhB,eAAe;IAS7B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,8BAA8B;CA4CvC"}
|
package/dest/txe_session.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { KeyStore } from '@aztec/key-store';
|
|
5
5
|
import { openTmpStore } from '@aztec/kv-store/lmdb-v2';
|
|
6
|
-
import { AddressStore, CapsuleStore, JobCoordinator, NoteService, NoteStore, PrivateEventStore, RecipientTaggingStore, SenderAddressBookStore, SenderTaggingStore } from '@aztec/pxe/server';
|
|
6
|
+
import { AddressStore, AnchorBlockStore, CapsuleStore, JobCoordinator, NoteService, NoteStore, PrivateEventStore, RecipientTaggingStore, SenderAddressBookStore, SenderTaggingStore } from '@aztec/pxe/server';
|
|
7
7
|
import { ExecutionNoteCache, ExecutionTaggingIndexCache, HashedValuesCache, Oracle, PrivateExecutionOracle, UtilityExecutionOracle } from '@aztec/pxe/simulator';
|
|
8
8
|
import { ExecutionError, WASMSimulator, createSimulationError, extractCallStack, resolveAssertionMessageFromError, toACVMWitness } from '@aztec/simulator/client';
|
|
9
9
|
import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
|
|
@@ -17,6 +17,7 @@ import { DEFAULT_ADDRESS } from './constants.js';
|
|
|
17
17
|
import { TXEOraclePublicContext } from './oracle/txe_oracle_public_context.js';
|
|
18
18
|
import { TXEOracleTopLevelContext } from './oracle/txe_oracle_top_level_context.js';
|
|
19
19
|
import { RPCTranslator } from './rpc_translator.js';
|
|
20
|
+
import { TXEArchiver } from './state_machine/archiver.js';
|
|
20
21
|
import { TXEStateMachine } from './state_machine/index.js';
|
|
21
22
|
import { TXEAccountStore } from './util/txe_account_store.js';
|
|
22
23
|
import { TXEContractStore } from './util/txe_contract_store.js';
|
|
@@ -75,7 +76,7 @@ import { makeTxEffect } from './utils/tx_effect_creation.js';
|
|
|
75
76
|
const addressStore = new AddressStore(store);
|
|
76
77
|
const privateEventStore = new PrivateEventStore(store);
|
|
77
78
|
const contractStore = new TXEContractStore(store);
|
|
78
|
-
const noteStore =
|
|
79
|
+
const noteStore = new NoteStore(store);
|
|
79
80
|
const senderTaggingStore = new SenderTaggingStore(store);
|
|
80
81
|
const recipientTaggingStore = new RecipientTaggingStore(store);
|
|
81
82
|
const senderAddressBookStore = new SenderAddressBookStore(store);
|
|
@@ -88,14 +89,17 @@ import { makeTxEffect } from './utils/tx_effect_creation.js';
|
|
|
88
89
|
capsuleStore,
|
|
89
90
|
senderTaggingStore,
|
|
90
91
|
recipientTaggingStore,
|
|
91
|
-
privateEventStore
|
|
92
|
+
privateEventStore,
|
|
93
|
+
noteStore
|
|
92
94
|
]);
|
|
93
95
|
// Register protocol contracts.
|
|
94
96
|
for (const { contractClass, instance, artifact } of protocolContracts){
|
|
95
97
|
await contractStore.addContractArtifact(contractClass.id, artifact);
|
|
96
98
|
await contractStore.addContractInstance(instance);
|
|
97
99
|
}
|
|
98
|
-
const
|
|
100
|
+
const archiver = new TXEArchiver(store);
|
|
101
|
+
const anchorBlockStore = new AnchorBlockStore(store);
|
|
102
|
+
const stateMachine = await TXEStateMachine.create(archiver, anchorBlockStore, contractStore, noteStore);
|
|
99
103
|
const nextBlockTimestamp = BigInt(Math.floor(new Date().getTime() / 1000));
|
|
100
104
|
const version = new Fr(await stateMachine.node.getVersion());
|
|
101
105
|
const chainId = new Fr(await stateMachine.node.getChainId());
|
|
@@ -162,11 +166,11 @@ import { makeTxEffect } from './utils/tx_effect_creation.js';
|
|
|
162
166
|
}
|
|
163
167
|
async enterPrivateState(contractAddress = DEFAULT_ADDRESS, anchorBlockNumber) {
|
|
164
168
|
this.exitTopLevelState();
|
|
165
|
-
await new NoteService(this.noteStore, this.stateMachine.node, this.stateMachine.anchorBlockStore).syncNoteNullifiers(contractAddress);
|
|
166
169
|
// Private execution has two associated block numbers: the anchor block (i.e. the historical block that is used to
|
|
167
170
|
// build the proof), and the *next* block, i.e. the one we'll create once the execution ends, and which will contain
|
|
168
171
|
// a single transaction with the effects of what was done in the test.
|
|
169
172
|
const anchorBlock = await this.stateMachine.node.getBlockHeader(anchorBlockNumber ?? 'latest');
|
|
173
|
+
await new NoteService(this.noteStore, this.stateMachine.node, anchorBlock, this.currentJobId).syncNoteNullifiers(contractAddress);
|
|
170
174
|
const latestBlock = await this.stateMachine.node.getBlockHeader('latest');
|
|
171
175
|
const nextBlockGlobalVariables = makeGlobalVariables(undefined, {
|
|
172
176
|
blockNumber: BlockNumber(latestBlock.globalVariables.blockNumber + 1),
|
|
@@ -179,7 +183,30 @@ import { makeTxEffect } from './utils/tx_effect_creation.js';
|
|
|
179
183
|
const noteCache = new ExecutionNoteCache(protocolNullifier);
|
|
180
184
|
const taggingIndexCache = new ExecutionTaggingIndexCache();
|
|
181
185
|
const utilityExecutor = this.utilityExecutorForContractSync(anchorBlock);
|
|
182
|
-
this.oracleHandler = new PrivateExecutionOracle(
|
|
186
|
+
this.oracleHandler = new PrivateExecutionOracle({
|
|
187
|
+
argsHash: Fr.ZERO,
|
|
188
|
+
txContext: new TxContext(this.chainId, this.version, GasSettings.empty()),
|
|
189
|
+
callContext: new CallContext(AztecAddress.ZERO, contractAddress, FunctionSelector.empty(), false),
|
|
190
|
+
anchorBlockHeader: anchorBlock,
|
|
191
|
+
utilityExecutor,
|
|
192
|
+
authWitnesses: [],
|
|
193
|
+
capsules: [],
|
|
194
|
+
executionCache: new HashedValuesCache(),
|
|
195
|
+
noteCache,
|
|
196
|
+
taggingIndexCache,
|
|
197
|
+
contractStore: this.contractStore,
|
|
198
|
+
noteStore: this.noteStore,
|
|
199
|
+
keyStore: this.keyStore,
|
|
200
|
+
addressStore: this.addressStore,
|
|
201
|
+
aztecNode: this.stateMachine.node,
|
|
202
|
+
senderTaggingStore: this.senderTaggingStore,
|
|
203
|
+
recipientTaggingStore: this.recipientTaggingStore,
|
|
204
|
+
senderAddressBookStore: this.senderAddressBookStore,
|
|
205
|
+
capsuleStore: this.capsuleStore,
|
|
206
|
+
privateEventStore: this.privateEventStore,
|
|
207
|
+
contractSyncService: this.stateMachine.contractSyncService,
|
|
208
|
+
jobId: this.currentJobId
|
|
209
|
+
});
|
|
183
210
|
// We store the note and tagging index caches fed into the PrivateExecutionOracle (along with some other auxiliary
|
|
184
211
|
// data) in order to refer to it later, mimicking the way this object is used by the ContractFunctionSimulator. The
|
|
185
212
|
// difference resides in that the simulator has all information needed in order to run the simulation, while ours
|
|
@@ -213,14 +240,29 @@ import { makeTxEffect } from './utils/tx_effect_creation.js';
|
|
|
213
240
|
}
|
|
214
241
|
async enterUtilityState(contractAddress = DEFAULT_ADDRESS) {
|
|
215
242
|
this.exitTopLevelState();
|
|
243
|
+
const anchorBlockHeader = await this.stateMachine.anchorBlockStore.getBlockHeader();
|
|
216
244
|
// There is no automatic message discovery and contract-driven syncing process in inlined private or utility
|
|
217
245
|
// contexts, which means that known nullifiers are also not searched for, since it is during the tagging sync that
|
|
218
246
|
// we perform this. We therefore search for known nullifiers now, as otherwise notes that were nullified would not
|
|
219
247
|
// be removed from the database.
|
|
220
248
|
// TODO(#12553): make the synchronizer sync here instead and remove this
|
|
221
|
-
await new NoteService(this.noteStore, this.stateMachine.node, this.
|
|
222
|
-
|
|
223
|
-
|
|
249
|
+
await new NoteService(this.noteStore, this.stateMachine.node, anchorBlockHeader, this.currentJobId).syncNoteNullifiers(contractAddress);
|
|
250
|
+
this.oracleHandler = new UtilityExecutionOracle({
|
|
251
|
+
contractAddress,
|
|
252
|
+
authWitnesses: [],
|
|
253
|
+
capsules: [],
|
|
254
|
+
anchorBlockHeader,
|
|
255
|
+
contractStore: this.contractStore,
|
|
256
|
+
noteStore: this.noteStore,
|
|
257
|
+
keyStore: this.keyStore,
|
|
258
|
+
addressStore: this.addressStore,
|
|
259
|
+
aztecNode: this.stateMachine.node,
|
|
260
|
+
recipientTaggingStore: this.recipientTaggingStore,
|
|
261
|
+
senderAddressBookStore: this.senderAddressBookStore,
|
|
262
|
+
capsuleStore: this.capsuleStore,
|
|
263
|
+
privateEventStore: this.privateEventStore,
|
|
264
|
+
jobId: this.currentJobId
|
|
265
|
+
});
|
|
224
266
|
this.state = {
|
|
225
267
|
name: 'UTILITY'
|
|
226
268
|
};
|
|
@@ -277,13 +319,29 @@ import { makeTxEffect } from './utils/tx_effect_creation.js';
|
|
|
277
319
|
}
|
|
278
320
|
}
|
|
279
321
|
utilityExecutorForContractSync(anchorBlock) {
|
|
280
|
-
return async (call)=>{
|
|
322
|
+
return async (call, scopes)=>{
|
|
281
323
|
const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(call.to, call.selector);
|
|
282
324
|
if (entryPointArtifact.functionType !== FunctionType.UTILITY) {
|
|
283
325
|
throw new Error(`Cannot run ${entryPointArtifact.functionType} function as utility`);
|
|
284
326
|
}
|
|
285
327
|
try {
|
|
286
|
-
const oracle = new UtilityExecutionOracle(
|
|
328
|
+
const oracle = new UtilityExecutionOracle({
|
|
329
|
+
contractAddress: call.to,
|
|
330
|
+
authWitnesses: [],
|
|
331
|
+
capsules: [],
|
|
332
|
+
anchorBlockHeader: anchorBlock,
|
|
333
|
+
contractStore: this.contractStore,
|
|
334
|
+
noteStore: this.noteStore,
|
|
335
|
+
keyStore: this.keyStore,
|
|
336
|
+
addressStore: this.addressStore,
|
|
337
|
+
aztecNode: this.stateMachine.node,
|
|
338
|
+
recipientTaggingStore: this.recipientTaggingStore,
|
|
339
|
+
senderAddressBookStore: this.senderAddressBookStore,
|
|
340
|
+
capsuleStore: this.capsuleStore,
|
|
341
|
+
privateEventStore: this.privateEventStore,
|
|
342
|
+
jobId: this.currentJobId,
|
|
343
|
+
scopes
|
|
344
|
+
});
|
|
287
345
|
await new WASMSimulator().executeUserCircuit(toACVMWitness(0, call.args), entryPointArtifact, new Oracle(oracle).toACIRCallback()).catch((err)=>{
|
|
288
346
|
err.message = resolveAssertionMessageFromError(err, entryPointArtifact);
|
|
289
347
|
throw new ExecutionError(err.message, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
-
import {
|
|
3
|
+
import { L2Block } from '@aztec/stdlib/block';
|
|
4
4
|
import { type MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
|
|
5
5
|
import { BlockHeader, GlobalVariables, TxEffect } from '@aztec/stdlib/tx';
|
|
6
6
|
/**
|
|
@@ -12,7 +12,7 @@ export declare function getSingleTxBlockRequestHash(blockNumber: BlockNumber): F
|
|
|
12
12
|
export declare function insertTxEffectIntoWorldTrees(txEffect: TxEffect, worldTrees: MerkleTreeWriteOperations): Promise<void>;
|
|
13
13
|
export declare function makeTXEBlockHeader(worldTrees: MerkleTreeWriteOperations, globalVariables: GlobalVariables): Promise<BlockHeader>;
|
|
14
14
|
/**
|
|
15
|
-
* Creates an
|
|
15
|
+
* Creates an L2Block with proper archive chaining.
|
|
16
16
|
* This function:
|
|
17
17
|
* 1. Gets the current archive state as lastArchive for the header
|
|
18
18
|
* 2. Creates the block header
|
|
@@ -22,7 +22,7 @@ export declare function makeTXEBlockHeader(worldTrees: MerkleTreeWriteOperations
|
|
|
22
22
|
* @param worldTrees - The world trees to read/write from
|
|
23
23
|
* @param globalVariables - Global variables for the block
|
|
24
24
|
* @param txEffects - Transaction effects to include in the block
|
|
25
|
-
* @returns The created
|
|
25
|
+
* @returns The created L2Block with proper archive chaining
|
|
26
26
|
*/
|
|
27
|
-
export declare function makeTXEBlock(worldTrees: MerkleTreeWriteOperations, globalVariables: GlobalVariables, txEffects: TxEffect[]): Promise<
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
export declare function makeTXEBlock(worldTrees: MerkleTreeWriteOperations, globalVariables: GlobalVariables, txEffects: TxEffect[]): Promise<L2Block>;
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfY3JlYXRpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9ibG9ja19jcmVhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxPQUFPLEVBQUUsV0FBVyxFQUEyQyxNQUFNLGlDQUFpQyxDQUFDO0FBRXZHLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQVEsT0FBTyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDcEQsT0FBTyxFQUF3QyxLQUFLLHlCQUF5QixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDM0csT0FBTyxFQUFFLFdBQVcsRUFBRSxlQUFlLEVBQUUsUUFBUSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFMUU7Ozs7R0FJRztBQUNILHdCQUFnQiwyQkFBMkIsQ0FBQyxXQUFXLEVBQUUsV0FBVyxHQUFHLEVBQUUsQ0FFeEU7QUFFRCx3QkFBc0IsNEJBQTRCLENBQ2hELFFBQVEsRUFBRSxRQUFRLEVBQ2xCLFVBQVUsRUFBRSx5QkFBeUIsR0FDcEMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQWtCZjtBQUVELHdCQUFzQixrQkFBa0IsQ0FDdEMsVUFBVSxFQUFFLHlCQUF5QixFQUNyQyxlQUFlLEVBQUUsZUFBZSxHQUMvQixPQUFPLENBQUMsV0FBVyxDQUFDLENBWXRCO0FBRUQ7Ozs7Ozs7Ozs7OztHQVlHO0FBQ0gsd0JBQXNCLFlBQVksQ0FDaEMsVUFBVSxFQUFFLHlCQUF5QixFQUNyQyxlQUFlLEVBQUUsZUFBZSxFQUNoQyxTQUFTLEVBQUUsUUFBUSxFQUFFLEdBQ3BCLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FpQmxCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_creation.d.ts","sourceRoot":"","sources":["../../src/utils/block_creation.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAA2C,MAAM,iCAAiC,CAAC;AAEvG,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAQ,
|
|
1
|
+
{"version":3,"file":"block_creation.d.ts","sourceRoot":"","sources":["../../src/utils/block_creation.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAA2C,MAAM,iCAAiC,CAAC;AAEvG,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAQ,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAwC,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,WAAW,GAAG,EAAE,CAExE;AAED,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,yBAAyB,EACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,WAAW,CAAC,CAYtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,yBAAyB,EACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,QAAQ,EAAE,GACpB,OAAO,CAAC,OAAO,CAAC,CAiBlB"}
|
|
@@ -2,7 +2,7 @@ import { MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, NULLIFIER_SUBTREE_HEIGHT
|
|
|
2
2
|
import { CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
|
|
3
3
|
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
4
4
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
|
-
import { Body,
|
|
5
|
+
import { Body, L2Block } from '@aztec/stdlib/block';
|
|
6
6
|
import { AppendOnlyTreeSnapshot, MerkleTreeId } from '@aztec/stdlib/trees';
|
|
7
7
|
import { BlockHeader } from '@aztec/stdlib/tx';
|
|
8
8
|
/**
|
|
@@ -31,7 +31,7 @@ export async function makeTXEBlockHeader(worldTrees, globalVariables) {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Creates an
|
|
34
|
+
* Creates an L2Block with proper archive chaining.
|
|
35
35
|
* This function:
|
|
36
36
|
* 1. Gets the current archive state as lastArchive for the header
|
|
37
37
|
* 2. Creates the block header
|
|
@@ -41,7 +41,7 @@ export async function makeTXEBlockHeader(worldTrees, globalVariables) {
|
|
|
41
41
|
* @param worldTrees - The world trees to read/write from
|
|
42
42
|
* @param globalVariables - Global variables for the block
|
|
43
43
|
* @param txEffects - Transaction effects to include in the block
|
|
44
|
-
* @returns The created
|
|
44
|
+
* @returns The created L2Block with proper archive chaining
|
|
45
45
|
*/ export async function makeTXEBlock(worldTrees, globalVariables, txEffects) {
|
|
46
46
|
const header = await makeTXEBlockHeader(worldTrees, globalVariables);
|
|
47
47
|
// Update the archive tree with this block's header hash
|
|
@@ -49,8 +49,10 @@ export async function makeTXEBlockHeader(worldTrees, globalVariables) {
|
|
|
49
49
|
// Get the new archive state after updating
|
|
50
50
|
const newArchiveInfo = await worldTrees.getTreeInfo(MerkleTreeId.ARCHIVE);
|
|
51
51
|
const newArchive = new AppendOnlyTreeSnapshot(new Fr(newArchiveInfo.root), Number(newArchiveInfo.size));
|
|
52
|
-
//
|
|
52
|
+
// L2Block requires checkpointNumber and indexWithinCheckpoint.
|
|
53
|
+
// TXE uses 1-block-per-checkpoint for testing simplicity, so we can use block number as checkpoint number.
|
|
54
|
+
// This uses the deprecated fromBlockNumber method intentionally for the TXE testing environment.
|
|
53
55
|
const checkpointNumber = CheckpointNumber.fromBlockNumber(globalVariables.blockNumber);
|
|
54
56
|
const indexWithinCheckpoint = IndexWithinCheckpoint(0);
|
|
55
|
-
return new
|
|
57
|
+
return new L2Block(newArchive, header, new Body(txEffects), checkpointNumber, indexWithinCheckpoint);
|
|
56
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/txe",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.e2b2873ed",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"bin": "./dest/bin/index.js",
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
65
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
66
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
67
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
68
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
69
|
-
"@aztec/constants": "0.0.1-commit.
|
|
70
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
71
|
-
"@aztec/key-store": "0.0.1-commit.
|
|
72
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
73
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
74
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
75
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
76
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
77
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
64
|
+
"@aztec/accounts": "0.0.1-commit.e2b2873ed",
|
|
65
|
+
"@aztec/archiver": "0.0.1-commit.e2b2873ed",
|
|
66
|
+
"@aztec/aztec-node": "0.0.1-commit.e2b2873ed",
|
|
67
|
+
"@aztec/aztec.js": "0.0.1-commit.e2b2873ed",
|
|
68
|
+
"@aztec/bb-prover": "0.0.1-commit.e2b2873ed",
|
|
69
|
+
"@aztec/constants": "0.0.1-commit.e2b2873ed",
|
|
70
|
+
"@aztec/foundation": "0.0.1-commit.e2b2873ed",
|
|
71
|
+
"@aztec/key-store": "0.0.1-commit.e2b2873ed",
|
|
72
|
+
"@aztec/kv-store": "0.0.1-commit.e2b2873ed",
|
|
73
|
+
"@aztec/protocol-contracts": "0.0.1-commit.e2b2873ed",
|
|
74
|
+
"@aztec/pxe": "0.0.1-commit.e2b2873ed",
|
|
75
|
+
"@aztec/simulator": "0.0.1-commit.e2b2873ed",
|
|
76
|
+
"@aztec/stdlib": "0.0.1-commit.e2b2873ed",
|
|
77
|
+
"@aztec/world-state": "0.0.1-commit.e2b2873ed",
|
|
78
78
|
"zod": "^3.23.8"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
package/src/oracle/interfaces.ts
CHANGED
|
@@ -33,9 +33,9 @@ export interface IAvmExecutionOracle {
|
|
|
33
33
|
avmOpcodeVersion(): Promise<Fr>;
|
|
34
34
|
avmOpcodeEmitNullifier(nullifier: Fr): Promise<void>;
|
|
35
35
|
avmOpcodeEmitNoteHash(noteHash: Fr): Promise<void>;
|
|
36
|
-
avmOpcodeNullifierExists(
|
|
36
|
+
avmOpcodeNullifierExists(siloedNullifier: Fr): Promise<boolean>;
|
|
37
37
|
avmOpcodeStorageWrite(slot: Fr, value: Fr): Promise<void>;
|
|
38
|
-
avmOpcodeStorageRead(slot: Fr): Promise<Fr>;
|
|
38
|
+
avmOpcodeStorageRead(slot: Fr, contractAddress: AztecAddress): Promise<Fr>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -3,7 +3,7 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
3
3
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { PublicDataWrite } from '@aztec/stdlib/avm';
|
|
5
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
-
import type {
|
|
6
|
+
import type { L2Block } from '@aztec/stdlib/block';
|
|
7
7
|
import { computePublicDataTreeLeafSlot, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
|
|
8
8
|
import {
|
|
9
9
|
MerkleTreeId,
|
|
@@ -78,13 +78,11 @@ export class TXEOraclePublicContext implements IAvmExecutionOracle {
|
|
|
78
78
|
this.transientUniqueNoteHashes.push(siloedNoteHash);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
async avmOpcodeNullifierExists(
|
|
82
|
-
const nullifier = await siloNullifier(targetAddress, innerNullifier!);
|
|
83
|
-
|
|
81
|
+
async avmOpcodeNullifierExists(siloedNullifier: Fr): Promise<boolean> {
|
|
84
82
|
const treeIndex = (
|
|
85
|
-
await this.forkedWorldTrees.findLeafIndices(MerkleTreeId.NULLIFIER_TREE, [
|
|
83
|
+
await this.forkedWorldTrees.findLeafIndices(MerkleTreeId.NULLIFIER_TREE, [siloedNullifier.toBuffer()])
|
|
86
84
|
)[0];
|
|
87
|
-
const transientIndex = this.transientSiloedNullifiers.find(n => n.equals(
|
|
85
|
+
const transientIndex = this.transientSiloedNullifiers.find(n => n.equals(siloedNullifier));
|
|
88
86
|
|
|
89
87
|
return treeIndex !== undefined || transientIndex !== undefined;
|
|
90
88
|
}
|
|
@@ -101,8 +99,8 @@ export class TXEOraclePublicContext implements IAvmExecutionOracle {
|
|
|
101
99
|
]);
|
|
102
100
|
}
|
|
103
101
|
|
|
104
|
-
async avmOpcodeStorageRead(slot: Fr): Promise<Fr> {
|
|
105
|
-
const leafSlot = await computePublicDataTreeLeafSlot(
|
|
102
|
+
async avmOpcodeStorageRead(slot: Fr, contractAddress: AztecAddress): Promise<Fr> {
|
|
103
|
+
const leafSlot = await computePublicDataTreeLeafSlot(contractAddress, slot);
|
|
106
104
|
|
|
107
105
|
const lowLeafResult = await this.forkedWorldTrees.getPreviousValueIndex(
|
|
108
106
|
MerkleTreeId.PUBLIC_DATA_TREE,
|
|
@@ -119,12 +117,12 @@ export class TXEOraclePublicContext implements IAvmExecutionOracle {
|
|
|
119
117
|
)) as PublicDataTreeLeafPreimage
|
|
120
118
|
).leaf.value;
|
|
121
119
|
|
|
122
|
-
this.logger.debug('AVM storage read', { slot, value });
|
|
120
|
+
this.logger.debug('AVM storage read', { slot, contractAddress, value });
|
|
123
121
|
|
|
124
122
|
return value;
|
|
125
123
|
}
|
|
126
124
|
|
|
127
|
-
async close(): Promise<
|
|
125
|
+
async close(): Promise<L2Block> {
|
|
128
126
|
this.logger.debug('Exiting Public Context, building block with collected side effects', {
|
|
129
127
|
blockNumber: this.globalVariables.blockNumber,
|
|
130
128
|
});
|