@aztec/txe 3.0.0-nightly.20251013 → 3.0.0-nightly.20251015
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/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +3 -2
- package/dest/rpc_translator.js +1 -1
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +10 -7
- package/dest/util/encoding.d.ts +1 -1
- package/package.json +15 -15
- package/src/oracle/txe_oracle_top_level_context.ts +3 -0
- package/src/rpc_translator.ts +1 -1
- package/src/txe_session.ts +10 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txe_oracle_top_level_context.d.ts","sourceRoot":"","sources":["../../src/oracle/txe_oracle_top_level_context.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,mBAAmB,EAEnB,kBAAkB,EAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"txe_oracle_top_level_context.d.ts","sourceRoot":"","sources":["../../src/oracle/txe_oracle_top_level_context.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,mBAAmB,EAEnB,kBAAkB,EAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIL,KAAK,WAAW,EAMjB,MAAM,sBAAsB,CAAC;AAgB9B,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,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, applyStringFormatting, createLogger } from '@aztec/foundation/log';
|
|
5
5
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
6
6
|
import { ORACLE_VERSION, enrichPublicSimulationError } from '@aztec/pxe/server';
|
|
7
|
-
import { ExecutionNoteCache, HashedValuesCache, Oracle, PrivateExecutionOracle, UtilityExecutionOracle, executePrivateFunction, generateSimulatedProvingResult } from '@aztec/pxe/simulator';
|
|
7
|
+
import { ExecutionNoteCache, ExecutionTaggingIndexCache, HashedValuesCache, Oracle, PrivateExecutionOracle, UtilityExecutionOracle, executePrivateFunction, generateSimulatedProvingResult } from '@aztec/pxe/simulator';
|
|
8
8
|
import { ExecutionError, WASMSimulator, createSimulationError, extractCallStack, resolveAssertionMessageFromError, toACVMWitness, witnessMapToFields } from '@aztec/simulator/client';
|
|
9
9
|
import { GuardedMerkleTreeOperations, PublicContractsDB, PublicProcessor, PublicTxSimulator } from '@aztec/simulator/server';
|
|
10
10
|
import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
|
|
@@ -186,10 +186,11 @@ export class TXEOracleTopLevelContext {
|
|
|
186
186
|
const blockHeader = await this.pxeOracleInterface.getAnchorBlockHeader();
|
|
187
187
|
const txRequestHash = getSingleTxBlockRequestHash(blockNumber);
|
|
188
188
|
const noteCache = new ExecutionNoteCache(txRequestHash);
|
|
189
|
+
const taggingIndexCache = new ExecutionTaggingIndexCache();
|
|
189
190
|
const simulator = new WASMSimulator();
|
|
190
191
|
const privateExecutionOracle = new PrivateExecutionOracle(argsHash, txContext, callContext, /** Header of a block whose state is used during private execution (not the block the transaction is included in). */ blockHeader, /** List of transient auth witnesses to be used during this simulation */ Array.from(this.authwits.values()), /** List of transient auth witnesses to be used during this simulation */ [], HashedValuesCache.create([
|
|
191
192
|
new HashedValues(args, argsHash)
|
|
192
|
-
]), noteCache, this.pxeOracleInterface, 0, 1, undefined, undefined, /**
|
|
193
|
+
]), noteCache, taggingIndexCache, this.pxeOracleInterface, 0, 1, undefined, undefined, /**
|
|
193
194
|
* In TXE, the typical transaction entrypoint is skipped, so we need to simulate the actions that such a
|
|
194
195
|
* contract would perform, including setting senderForTags.
|
|
195
196
|
*/ from, simulator);
|
package/dest/rpc_translator.js
CHANGED
|
@@ -611,7 +611,7 @@ export class RPCTranslator {
|
|
|
611
611
|
const recipient = AztecAddress.fromField(fromSingle(foreignRecipient));
|
|
612
612
|
const nextAppTag = await this.handlerAsPrivate().privateGetNextAppTagAsSender(sender, recipient);
|
|
613
613
|
return toForeignCallResult([
|
|
614
|
-
toSingle(nextAppTag)
|
|
614
|
+
toSingle(nextAppTag.value)
|
|
615
615
|
]);
|
|
616
616
|
}
|
|
617
617
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txe_session.d.ts","sourceRoot":"","sources":["../src/txe_session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,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,mBAAmB,EAGnB,kBAAkB,EAGnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"txe_session.d.ts","sourceRoot":"","sources":["../src/txe_session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,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,mBAAmB,EAGnB,kBAAkB,EAGnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIL,KAAK,uBAAuB,EAC5B,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B,eAAe;IAS7B,OAAO,CAAC,kBAAkB;CAK3B"}
|
package/dest/txe_session.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
3
3
|
import { KeyStore } from '@aztec/key-store';
|
|
4
4
|
import { openTmpStore } from '@aztec/kv-store/lmdb-v2';
|
|
5
5
|
import { AddressDataProvider, CapsuleDataProvider, NoteDataProvider, PXEOracleInterface, PrivateEventDataProvider, TaggingDataProvider } from '@aztec/pxe/server';
|
|
6
|
-
import { ExecutionNoteCache, HashedValuesCache, PrivateExecutionOracle, UtilityExecutionOracle } from '@aztec/pxe/simulator';
|
|
6
|
+
import { ExecutionNoteCache, ExecutionTaggingIndexCache, HashedValuesCache, PrivateExecutionOracle, UtilityExecutionOracle } from '@aztec/pxe/simulator';
|
|
7
7
|
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
8
8
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
9
|
import { Body, L2Block } from '@aztec/stdlib/block';
|
|
@@ -152,16 +152,19 @@ const DEFAULT_ADDRESS = AztecAddress.fromNumber(42);
|
|
|
152
152
|
});
|
|
153
153
|
const txRequestHash = getSingleTxBlockRequestHash(nextBlockGlobalVariables.blockNumber);
|
|
154
154
|
const noteCache = new ExecutionNoteCache(txRequestHash);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
//
|
|
158
|
-
// in
|
|
159
|
-
//
|
|
155
|
+
const taggingIndexCache = new ExecutionTaggingIndexCache();
|
|
156
|
+
this.oracleHandler = new PrivateExecutionOracle(Fr.ZERO, new TxContext(this.chainId, this.version, GasSettings.empty()), new CallContext(AztecAddress.ZERO, contractAddress, FunctionSelector.empty(), false), anchorBlock, [], [], new HashedValuesCache(), noteCache, taggingIndexCache, this.pxeOracleInterface);
|
|
157
|
+
// We store the note and tagging index caches fed into the PrivateExecutionOracle (along with some other auxiliary
|
|
158
|
+
// data) in order to refer to it later, mimicking the way this object is used by the ContractFunctionSimulator. The
|
|
159
|
+
// difference resides in that the simulator has all information needed in order to run the simulation, while ours
|
|
160
|
+
// will be ongoing as the different oracles will be invoked from the Noir test, until eventually the private
|
|
161
|
+
// execution finishes.
|
|
160
162
|
this.state = {
|
|
161
163
|
name: 'PRIVATE',
|
|
162
164
|
nextBlockGlobalVariables,
|
|
163
165
|
txRequestHash,
|
|
164
|
-
noteCache
|
|
166
|
+
noteCache,
|
|
167
|
+
taggingIndexCache
|
|
165
168
|
};
|
|
166
169
|
this.logger.debug(`Entered state ${this.state.name}`);
|
|
167
170
|
return this.oracleHandler.getPrivateContextInputs();
|
package/dest/util/encoding.d.ts
CHANGED
|
@@ -86,11 +86,11 @@ export declare const ForeignCallArgsSchema: z.ZodArray<z.ZodUnion<[z.ZodString,
|
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
version: 1;
|
|
88
88
|
salt: Fr;
|
|
89
|
-
publicKeys: import("@aztec/stdlib/keys").PublicKeys;
|
|
90
89
|
deployer: AztecAddress;
|
|
91
90
|
currentContractClassId: Fr;
|
|
92
91
|
originalContractClassId: Fr;
|
|
93
92
|
initializationHash: Fr;
|
|
93
|
+
publicKeys: import("@aztec/stdlib/keys").PublicKeys;
|
|
94
94
|
}, {
|
|
95
95
|
version: 1;
|
|
96
96
|
publicKeys: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/txe",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251015",
|
|
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": "3.0.0-nightly.
|
|
65
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
66
|
-
"@aztec/aztec-node": "3.0.0-nightly.
|
|
67
|
-
"@aztec/aztec.js": "3.0.0-nightly.
|
|
68
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
69
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
70
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
71
|
-
"@aztec/key-store": "3.0.0-nightly.
|
|
72
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
73
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
74
|
-
"@aztec/pxe": "3.0.0-nightly.
|
|
75
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
76
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
77
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
64
|
+
"@aztec/accounts": "3.0.0-nightly.20251015",
|
|
65
|
+
"@aztec/archiver": "3.0.0-nightly.20251015",
|
|
66
|
+
"@aztec/aztec-node": "3.0.0-nightly.20251015",
|
|
67
|
+
"@aztec/aztec.js": "3.0.0-nightly.20251015",
|
|
68
|
+
"@aztec/bb-prover": "3.0.0-nightly.20251015",
|
|
69
|
+
"@aztec/constants": "3.0.0-nightly.20251015",
|
|
70
|
+
"@aztec/foundation": "3.0.0-nightly.20251015",
|
|
71
|
+
"@aztec/key-store": "3.0.0-nightly.20251015",
|
|
72
|
+
"@aztec/kv-store": "3.0.0-nightly.20251015",
|
|
73
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251015",
|
|
74
|
+
"@aztec/pxe": "3.0.0-nightly.20251015",
|
|
75
|
+
"@aztec/simulator": "3.0.0-nightly.20251015",
|
|
76
|
+
"@aztec/stdlib": "3.0.0-nightly.20251015",
|
|
77
|
+
"@aztec/world-state": "3.0.0-nightly.20251015",
|
|
78
78
|
"zod": "^3.23.8"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
} from '@aztec/pxe/server';
|
|
20
20
|
import {
|
|
21
21
|
ExecutionNoteCache,
|
|
22
|
+
ExecutionTaggingIndexCache,
|
|
22
23
|
HashedValuesCache,
|
|
23
24
|
type IMiscOracle,
|
|
24
25
|
Oracle,
|
|
@@ -292,6 +293,7 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
292
293
|
|
|
293
294
|
const txRequestHash = getSingleTxBlockRequestHash(blockNumber);
|
|
294
295
|
const noteCache = new ExecutionNoteCache(txRequestHash);
|
|
296
|
+
const taggingIndexCache = new ExecutionTaggingIndexCache();
|
|
295
297
|
|
|
296
298
|
const simulator = new WASMSimulator();
|
|
297
299
|
|
|
@@ -307,6 +309,7 @@ export class TXEOracleTopLevelContext implements IMiscOracle, ITxeExecutionOracl
|
|
|
307
309
|
[],
|
|
308
310
|
HashedValuesCache.create([new HashedValues(args, argsHash)]),
|
|
309
311
|
noteCache,
|
|
312
|
+
taggingIndexCache,
|
|
310
313
|
this.pxeOracleInterface,
|
|
311
314
|
0,
|
|
312
315
|
1,
|
package/src/rpc_translator.ts
CHANGED
|
@@ -1007,6 +1007,6 @@ export class RPCTranslator {
|
|
|
1007
1007
|
|
|
1008
1008
|
const nextAppTag = await this.handlerAsPrivate().privateGetNextAppTagAsSender(sender, recipient);
|
|
1009
1009
|
|
|
1010
|
-
return toForeignCallResult([toSingle(nextAppTag)]);
|
|
1010
|
+
return toForeignCallResult([toSingle(nextAppTag.value)]);
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
package/src/txe_session.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from '@aztec/pxe/server';
|
|
14
14
|
import {
|
|
15
15
|
ExecutionNoteCache,
|
|
16
|
+
ExecutionTaggingIndexCache,
|
|
16
17
|
HashedValuesCache,
|
|
17
18
|
type IPrivateExecutionOracle,
|
|
18
19
|
type IUtilityExecutionOracle,
|
|
@@ -67,6 +68,7 @@ type SessionState =
|
|
|
67
68
|
nextBlockGlobalVariables: GlobalVariables;
|
|
68
69
|
txRequestHash: Fr;
|
|
69
70
|
noteCache: ExecutionNoteCache;
|
|
71
|
+
taggingIndexCache: ExecutionTaggingIndexCache;
|
|
70
72
|
}
|
|
71
73
|
/**
|
|
72
74
|
* The public state is entered via the `public_context` function. In this state the AVM opcodes that `#[public]`
|
|
@@ -294,6 +296,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
294
296
|
|
|
295
297
|
const txRequestHash = getSingleTxBlockRequestHash(nextBlockGlobalVariables.blockNumber);
|
|
296
298
|
const noteCache = new ExecutionNoteCache(txRequestHash);
|
|
299
|
+
const taggingIndexCache = new ExecutionTaggingIndexCache();
|
|
297
300
|
|
|
298
301
|
this.oracleHandler = new PrivateExecutionOracle(
|
|
299
302
|
Fr.ZERO,
|
|
@@ -304,14 +307,16 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
304
307
|
[],
|
|
305
308
|
new HashedValuesCache(),
|
|
306
309
|
noteCache,
|
|
310
|
+
taggingIndexCache,
|
|
307
311
|
this.pxeOracleInterface,
|
|
308
312
|
);
|
|
309
313
|
|
|
310
|
-
// We store the note
|
|
311
|
-
// refer to it later, mimicking the way this object is used by the ContractFunctionSimulator. The
|
|
312
|
-
// in that the simulator has all information needed in order to run the simulation, while ours
|
|
313
|
-
// the different oracles will be invoked from the Noir test, until eventually the private
|
|
314
|
-
|
|
314
|
+
// We store the note and tagging index caches fed into the PrivateExecutionOracle (along with some other auxiliary
|
|
315
|
+
// data) in order to refer to it later, mimicking the way this object is used by the ContractFunctionSimulator. The
|
|
316
|
+
// difference resides in that the simulator has all information needed in order to run the simulation, while ours
|
|
317
|
+
// will be ongoing as the different oracles will be invoked from the Noir test, until eventually the private
|
|
318
|
+
// execution finishes.
|
|
319
|
+
this.state = { name: 'PRIVATE', nextBlockGlobalVariables, txRequestHash, noteCache, taggingIndexCache };
|
|
315
320
|
this.logger.debug(`Entered state ${this.state.name}`);
|
|
316
321
|
|
|
317
322
|
return (this.oracleHandler as PrivateExecutionOracle).getPrivateContextInputs();
|