@aztec/pxe 0.0.1-commit.e3c1de76 → 0.0.1-commit.e558bd1c
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/block_synchronizer/block_synchronizer.d.ts +4 -2
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +7 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +4 -2
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +4 -2
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +8 -8
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +4 -4
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +29 -17
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +4 -2
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +6 -6
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +18 -12
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +35 -27
- package/dest/contract_sync/contract_sync_service.d.ts +41 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +82 -0
- package/dest/contract_sync/helpers.d.ts +28 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/{index.js → helpers.js} +13 -12
- package/dest/debug/pxe_debug_utils.d.ts +12 -7
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +16 -12
- package/dest/entrypoints/server/index.d.ts +2 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -1
- package/dest/logs/log_service.d.ts +2 -2
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +2 -4
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +2 -2
- package/dest/pxe.d.ts +2 -1
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +23 -12
- package/dest/storage/note_store/note_store.d.ts +1 -1
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +3 -0
- package/package.json +25 -16
- package/src/block_synchronizer/block_synchronizer.ts +6 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +3 -0
- package/src/contract_function_simulator/oracle/interfaces.ts +9 -9
- package/src/contract_function_simulator/oracle/oracle.ts +32 -15
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +6 -5
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +39 -30
- package/src/contract_sync/contract_sync_service.ts +129 -0
- package/src/contract_sync/{index.ts → helpers.ts} +15 -20
- package/src/debug/pxe_debug_utils.ts +46 -13
- package/src/entrypoints/server/index.ts +1 -1
- package/src/logs/log_service.ts +2 -2
- package/src/oracle_version.ts +2 -2
- package/src/pxe.ts +33 -13
- package/src/storage/note_store/note_store.ts +4 -0
- package/dest/contract_sync/index.d.ts +0 -23
- package/dest/contract_sync/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log_service.d.ts","sourceRoot":"","sources":["../../src/logs/log_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAe,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AACvF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,E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AY,EAAE,YAAY,EAC1B,KAAK,EAAE,MAAM,EAC9B,QAAQ,CAAC,EAAE,cAAc,EAG1B;IAEY,gBAAgB,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC,CAiBnH;IAuDY,eAAe,CAC1B,eAAe,EAAE,YAAY,EAC7B,6BAA6B,EAAE,EAAE,EACjC,MAAM,CAAC,EAAE,YAAY,EAAE,iBA0CxB;CAgEF"}
|
package/dest/logs/log_service.js
CHANGED
|
@@ -66,10 +66,8 @@ export class LogService {
|
|
|
66
66
|
const scopedLog = logsForTag[0];
|
|
67
67
|
return new LogRetrievalResponse(scopedLog.logData.slice(1), scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier);
|
|
68
68
|
}
|
|
69
|
-
async
|
|
70
|
-
this.log.verbose(
|
|
71
|
-
contract: contractAddress
|
|
72
|
-
});
|
|
69
|
+
async fetchTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, scopes) {
|
|
70
|
+
this.log.verbose(`Fetching tagged logs for ${contractAddress.toString()}`);
|
|
73
71
|
// We only load logs from block up to and including the anchor block number
|
|
74
72
|
const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
|
|
75
73
|
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
package/dest/oracle_version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ORACLE_VERSION =
|
|
2
|
-
export declare const ORACLE_INTERFACE_HASH = "
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export declare const ORACLE_VERSION = 11;
|
|
2
|
+
export declare const ORACLE_INTERFACE_HASH = "20c4d02d8cd5e448c11001a5f72ea2e0927630aeda75e537550872a9627bf40b";
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxlQUFPLE1BQU0sY0FBYyxLQUFLLENBQUM7QUFLakMsZUFBTyxNQUFNLHFCQUFxQixxRUFBcUUsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,KAAK,CAAC;AAKjC,eAAO,MAAM,qBAAqB,qEAAqE,CAAC"}
|
package/dest/oracle_version.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
///
|
|
5
5
|
/// @dev Whenever a contract function or Noir test is run, the `utilityAssertCompatibleOracleVersion` oracle is called
|
|
6
6
|
/// and if the oracle version is incompatible an error is thrown.
|
|
7
|
-
export const ORACLE_VERSION =
|
|
7
|
+
export const ORACLE_VERSION = 11;
|
|
8
8
|
/// This hash is computed as by hashing the Oracle interface and it is used to detect when the Oracle interface changes,
|
|
9
9
|
/// which in turn implies that you need to update the ORACLE_VERSION constant in this file and in
|
|
10
10
|
/// `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
|
|
11
|
-
export const ORACLE_INTERFACE_HASH = '
|
|
11
|
+
export const ORACLE_INTERFACE_HASH = '20c4d02d8cd5e448c11001a5f72ea2e0927630aeda75e537550872a9627bf40b';
|
package/dest/pxe.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare class PXE {
|
|
|
34
34
|
private recipientTaggingStore;
|
|
35
35
|
private addressStore;
|
|
36
36
|
private privateEventStore;
|
|
37
|
+
private contractSyncService;
|
|
37
38
|
private simulator;
|
|
38
39
|
private proverEnabled;
|
|
39
40
|
private proofCreator;
|
|
@@ -201,4 +202,4 @@ export declare class PXE {
|
|
|
201
202
|
*/
|
|
202
203
|
stop(): Promise<void>;
|
|
203
204
|
}
|
|
204
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
205
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBcUMsTUFBTSx1QkFBdUIsQ0FBQztBQUl2RixPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpELE9BQU8sRUFBRSxLQUFLLHlCQUF5QixFQUF5QixNQUFNLDJCQUEyQixDQUFDO0FBQ2xHLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUNMLEtBQUssZ0JBQWdCLEVBQ3JCLGFBQWEsRUFDYixZQUFZLEVBR2IsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEVBQ0wsZUFBZSxFQUNmLEtBQUssMkJBQTJCLEVBQ2hDLEtBQUssY0FBYyxFQUdwQixNQUFNLHdCQUF3QixDQUFDO0FBRWhDLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxtQkFBbUIs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AC,eAAe,CAAC,CAuE1B;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,UAAU,CACf,SAAS,EAAE,kBAAkB,EAC7B,cAAc,EAAE,OAAO,EACvB,gBAAgB,GAAE,OAAe,EACjC,kBAAkB,GAAE,OAAe,EACnC,SAAS,CAAC,EAAE,mBAAmB,EAC/B,MAAM,CAAC,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,kBAAkB,CAAC,CA+H7B;IAED;;;;;;;;OAQG;IACI,eAAe,CACpB,IAAI,EAAE,YAAY,EAClB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,MAAM,CAAC,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,uBAAuB,CAAC,CAsDlC;IAED;;;;;;;;;;;;OAYG;IACU,gBAAgB,CAC3B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CA6B/B;IAED;;OAEG;IACI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;CACF"}
|
package/dest/pxe.js
CHANGED
|
@@ -13,7 +13,8 @@ import { BlockSynchronizer } from './block_synchronizer/index.js';
|
|
|
13
13
|
import { BenchmarkedNodeFactory } from './contract_function_simulator/benchmarked_node.js';
|
|
14
14
|
import { ContractFunctionSimulator, generateSimulatedProvingResult } from './contract_function_simulator/contract_function_simulator.js';
|
|
15
15
|
import { ProxiedContractStoreFactory } from './contract_function_simulator/proxied_contract_data_source.js';
|
|
16
|
-
import {
|
|
16
|
+
import { ContractSyncService } from './contract_sync/contract_sync_service.js';
|
|
17
|
+
import { readCurrentClassId } from './contract_sync/helpers.js';
|
|
17
18
|
import { PXEDebugUtils } from './debug/pxe_debug_utils.js';
|
|
18
19
|
import { enrichPublicSimulationError, enrichSimulationError } from './error_enriching.js';
|
|
19
20
|
import { PrivateEventFilterValidator } from './events/private_event_filter_validator.js';
|
|
@@ -45,6 +46,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
45
46
|
recipientTaggingStore;
|
|
46
47
|
addressStore;
|
|
47
48
|
privateEventStore;
|
|
49
|
+
contractSyncService;
|
|
48
50
|
simulator;
|
|
49
51
|
proverEnabled;
|
|
50
52
|
proofCreator;
|
|
@@ -53,7 +55,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
53
55
|
jobQueue;
|
|
54
56
|
jobCoordinator;
|
|
55
57
|
debug;
|
|
56
|
-
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
58
|
+
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
57
59
|
this.node = node;
|
|
58
60
|
this.blockStateSynchronizer = blockStateSynchronizer;
|
|
59
61
|
this.keyStore = keyStore;
|
|
@@ -66,6 +68,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
66
68
|
this.recipientTaggingStore = recipientTaggingStore;
|
|
67
69
|
this.addressStore = addressStore;
|
|
68
70
|
this.privateEventStore = privateEventStore;
|
|
71
|
+
this.contractSyncService = contractSyncService;
|
|
69
72
|
this.simulator = simulator;
|
|
70
73
|
this.proverEnabled = proverEnabled;
|
|
71
74
|
this.proofCreator = proofCreator;
|
|
@@ -97,19 +100,21 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
97
100
|
const capsuleStore = new CapsuleStore(store);
|
|
98
101
|
const keyStore = new KeyStore(store);
|
|
99
102
|
const tipsStore = new L2TipsKVStore(store, 'pxe');
|
|
100
|
-
const
|
|
103
|
+
const contractSyncService = new ContractSyncService(node, contractStore, noteStore, createLogger('pxe:contract_sync', bindings));
|
|
104
|
+
const synchronizer = new BlockSynchronizer(node, store, anchorBlockStore, noteStore, privateEventStore, tipsStore, contractSyncService, config, bindings);
|
|
101
105
|
const jobCoordinator = new JobCoordinator(store, bindings);
|
|
102
106
|
jobCoordinator.registerStores([
|
|
103
107
|
capsuleStore,
|
|
104
108
|
senderTaggingStore,
|
|
105
109
|
recipientTaggingStore,
|
|
106
110
|
privateEventStore,
|
|
107
|
-
noteStore
|
|
111
|
+
noteStore,
|
|
112
|
+
contractSyncService
|
|
108
113
|
]);
|
|
109
|
-
const debugUtils = new PXEDebugUtils(
|
|
114
|
+
const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
|
|
110
115
|
const jobQueue = new SerialQueue();
|
|
111
|
-
const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
|
|
112
|
-
debugUtils.
|
|
116
|
+
const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
|
|
117
|
+
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#simulateUtility.bind(pxe));
|
|
113
118
|
pxe.jobQueue.start();
|
|
114
119
|
await pxe.#registerProtocolContracts();
|
|
115
120
|
const info = await node.getNodeInfo();
|
|
@@ -119,7 +124,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
119
124
|
// Internal methods
|
|
120
125
|
#getSimulatorForTx(overrides) {
|
|
121
126
|
const proxyContractStore = ProxiedContractStoreFactory.create(this.contractStore, overrides?.contracts);
|
|
122
|
-
return new ContractFunctionSimulator(proxyContractStore, this.noteStore, this.keyStore, this.addressStore, BenchmarkedNodeFactory.create(this.node), this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, this.simulator);
|
|
127
|
+
return new ContractFunctionSimulator(proxyContractStore, this.noteStore, this.keyStore, this.addressStore, BenchmarkedNodeFactory.create(this.node), this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, this.simulator, this.contractSyncService);
|
|
123
128
|
}
|
|
124
129
|
#contextualizeError(err, ...context) {
|
|
125
130
|
let contextStr = '';
|
|
@@ -175,7 +180,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
175
180
|
const { origin: contractAddress, functionSelector } = txRequest;
|
|
176
181
|
try {
|
|
177
182
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
178
|
-
await ensureContractSynced(contractAddress, functionSelector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId),
|
|
183
|
+
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId), anchorBlockHeader, jobId);
|
|
179
184
|
const result = await contractFunctionSimulator.run(txRequest, contractAddress, functionSelector, undefined, anchorBlockHeader, // The sender for tags is set by contracts, typically by an account
|
|
180
185
|
// contract entrypoint
|
|
181
186
|
undefined, scopes, jobId);
|
|
@@ -586,7 +591,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
586
591
|
// Temporary: in case there are overrides, we have to skip the kernels or validations
|
|
587
592
|
// will fail. Consider handing control to the user/wallet on whether they want to run them
|
|
588
593
|
// or not.
|
|
589
|
-
const
|
|
594
|
+
const overriddenContracts = overrides?.contracts ? new Set(Object.keys(overrides.contracts)) : undefined;
|
|
595
|
+
const hasOverriddenContracts = overriddenContracts !== undefined && overriddenContracts.size > 0;
|
|
596
|
+
const skipKernels = hasOverriddenContracts;
|
|
597
|
+
// Set overridden contracts on the sync service so it knows to skip syncing them
|
|
598
|
+
if (hasOverriddenContracts) {
|
|
599
|
+
this.contractSyncService.setOverriddenContracts(jobId, overriddenContracts);
|
|
600
|
+
}
|
|
590
601
|
// Execution of private functions only; no proving, and no kernel logic.
|
|
591
602
|
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
|
|
592
603
|
let publicInputs;
|
|
@@ -677,7 +688,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
677
688
|
const functionTimer = new Timer();
|
|
678
689
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
679
690
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
680
|
-
await ensureContractSynced(call.to, call.selector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId),
|
|
691
|
+
await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId), anchorBlockHeader, jobId);
|
|
681
692
|
const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
|
|
682
693
|
const functionTime = functionTimer.ms();
|
|
683
694
|
const totalTime = totalTimer.ms();
|
|
@@ -727,7 +738,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
727
738
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
728
739
|
anchorBlockNumber = anchorBlockHeader.getBlockNumber();
|
|
729
740
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
730
|
-
await ensureContractSynced(filter.contractAddress, null, async (privateSyncCall)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId),
|
|
741
|
+
await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId), anchorBlockHeader, jobId);
|
|
731
742
|
});
|
|
732
743
|
// anchorBlockNumber is set during the job and fixed to whatever it is after a block sync
|
|
733
744
|
const sanitizedFilter = new PrivateEventFilterValidator(anchorBlockNumber).validate(filter);
|
|
@@ -80,4 +80,4 @@ export declare class NoteStore implements StagedStore {
|
|
|
80
80
|
commit(jobId: string): Promise<void>;
|
|
81
81
|
discardStaged(jobId: string): Promise<void>;
|
|
82
82
|
}
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2Uvbm90ZV9zdG9yZS9ub3RlX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFxQyxNQUFNLGlCQUFpQixDQUFDO0FBQzVGLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxPQUFPLEVBQWMsS0FBSyxXQUFXLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUUzRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQztBQUc1RTs7Ozs7SUFLSTtBQUNKLHFCQUFhLFNBQVUsWUFBVyxXQUFXOztJQUMzQyxRQUFRLENBQUMsU0F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WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAG5E;;;;;IAKI;AACJ,qBAAa,SAAU,YAAW,WAAW;;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAU;IA+BpC,YAAY,KAAK,EAAE,iBAAiB,EAQnC;IAED;;;;;;;;;OASG;IACI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAarF;IAcD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CA6F/D;IAED;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAyChF;IAED;;;;;;;;;;;OAWG;IACU,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMpF;IA6ED;;;;;;;;;OASG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUzC;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1C;CAkCF"}
|
|
@@ -173,6 +173,9 @@ import { StoredNote } from './stored_note.js';
|
|
|
173
173
|
if (nullifiers.length === 0) {
|
|
174
174
|
return Promise.resolve([]);
|
|
175
175
|
}
|
|
176
|
+
if (nullifiers.some((n)=>n.l2BlockNumber === 0)) {
|
|
177
|
+
return Promise.reject(new Error('applyNullifiers: nullifiers cannot have been emitted at block 0'));
|
|
178
|
+
}
|
|
176
179
|
return this.#withJobLock(jobId, ()=>this.#store.transactionAsync(async ()=>{
|
|
177
180
|
const notesToNullify = await Promise.all(nullifiers.map(async (nullifierInBlock)=>{
|
|
178
181
|
const nullifier = nullifierInBlock.data.toString();
|
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.e558bd1c",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"typedocOptions": {
|
|
6
|
+
"entryPoints": [
|
|
7
|
+
"./src/entrypoints/server/index.ts",
|
|
8
|
+
"./src/entrypoints/client/lazy/index.ts",
|
|
9
|
+
"./src/config/index.ts"
|
|
10
|
+
],
|
|
11
|
+
"name": "PXE",
|
|
12
|
+
"tsconfig": "./tsconfig.json"
|
|
13
|
+
},
|
|
5
14
|
"exports": {
|
|
6
15
|
"./server": "./dest/entrypoints/server/index.js",
|
|
7
16
|
"./client/lazy": "./dest/entrypoints/client/lazy/index.js",
|
|
@@ -61,19 +70,19 @@
|
|
|
61
70
|
]
|
|
62
71
|
},
|
|
63
72
|
"dependencies": {
|
|
64
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
65
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
66
|
-
"@aztec/builder": "0.0.1-commit.
|
|
67
|
-
"@aztec/constants": "0.0.1-commit.
|
|
68
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
69
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
70
|
-
"@aztec/key-store": "0.0.1-commit.
|
|
71
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
72
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
73
|
-
"@aztec/noir-types": "0.0.1-commit.
|
|
74
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
75
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
76
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
73
|
+
"@aztec/bb-prover": "0.0.1-commit.e558bd1c",
|
|
74
|
+
"@aztec/bb.js": "0.0.1-commit.e558bd1c",
|
|
75
|
+
"@aztec/builder": "0.0.1-commit.e558bd1c",
|
|
76
|
+
"@aztec/constants": "0.0.1-commit.e558bd1c",
|
|
77
|
+
"@aztec/ethereum": "0.0.1-commit.e558bd1c",
|
|
78
|
+
"@aztec/foundation": "0.0.1-commit.e558bd1c",
|
|
79
|
+
"@aztec/key-store": "0.0.1-commit.e558bd1c",
|
|
80
|
+
"@aztec/kv-store": "0.0.1-commit.e558bd1c",
|
|
81
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.e558bd1c",
|
|
82
|
+
"@aztec/noir-types": "0.0.1-commit.e558bd1c",
|
|
83
|
+
"@aztec/protocol-contracts": "0.0.1-commit.e558bd1c",
|
|
84
|
+
"@aztec/simulator": "0.0.1-commit.e558bd1c",
|
|
85
|
+
"@aztec/stdlib": "0.0.1-commit.e558bd1c",
|
|
77
86
|
"koa": "^2.16.1",
|
|
78
87
|
"koa-router": "^13.1.1",
|
|
79
88
|
"lodash.omit": "^4.5.0",
|
|
@@ -82,8 +91,8 @@
|
|
|
82
91
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
83
92
|
},
|
|
84
93
|
"devDependencies": {
|
|
85
|
-
"@aztec/merkle-tree": "0.0.1-commit.
|
|
86
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
94
|
+
"@aztec/merkle-tree": "0.0.1-commit.e558bd1c",
|
|
95
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.e558bd1c",
|
|
87
96
|
"@jest/globals": "^30.0.0",
|
|
88
97
|
"@types/jest": "^30.0.0",
|
|
89
98
|
"@types/lodash.omit": "^4.5.7",
|
|
@@ -7,6 +7,7 @@ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
|
7
7
|
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
8
8
|
|
|
9
9
|
import type { BlockSynchronizerConfig } from '../config/index.js';
|
|
10
|
+
import type { ContractSyncService } from '../contract_sync/contract_sync_service.js';
|
|
10
11
|
import type { AnchorBlockStore } from '../storage/anchor_block_store/anchor_block_store.js';
|
|
11
12
|
import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
12
13
|
import type { PrivateEventStore } from '../storage/private_event_store/private_event_store.js';
|
|
@@ -28,6 +29,7 @@ export class BlockSynchronizer implements L2BlockStreamEventHandler {
|
|
|
28
29
|
private noteStore: NoteStore,
|
|
29
30
|
private privateEventStore: PrivateEventStore,
|
|
30
31
|
private l2TipsStore: L2TipsKVStore,
|
|
32
|
+
private contractSyncService: ContractSyncService,
|
|
31
33
|
private config: Partial<BlockSynchronizerConfig> = {},
|
|
32
34
|
bindings?: LoggerBindings,
|
|
33
35
|
) {
|
|
@@ -125,6 +127,10 @@ export class BlockSynchronizer implements L2BlockStreamEventHandler {
|
|
|
125
127
|
|
|
126
128
|
/** Updates the anchor block header to the target block */
|
|
127
129
|
private async updateAnchorBlockHeader(blockHeader: BlockHeader) {
|
|
130
|
+
// Whenever the anchor block header is updated, we need to synchronize the private state of contracts again.
|
|
131
|
+
// Therefore, we clear the contract synchronization cache here such that the sync is re-triggered upon new
|
|
132
|
+
// execution.
|
|
133
|
+
this.contractSyncService.wipe();
|
|
128
134
|
this.log.verbose(`Updated pxe last block to ${blockHeader.getBlockNumber()}`, blockHeader.toInspect());
|
|
129
135
|
await this.anchorBlockStore.setHeader(blockHeader);
|
|
130
136
|
}
|
|
@@ -72,6 +72,7 @@ import {
|
|
|
72
72
|
getFinalMinRevertibleSideEffectCounter,
|
|
73
73
|
} from '@aztec/stdlib/tx';
|
|
74
74
|
|
|
75
|
+
import type { ContractSyncService } from '../contract_sync/contract_sync_service.js';
|
|
75
76
|
import type { AddressStore } from '../storage/address_store/address_store.js';
|
|
76
77
|
import type { CapsuleStore } from '../storage/capsule_store/capsule_store.js';
|
|
77
78
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
@@ -107,6 +108,7 @@ export class ContractFunctionSimulator {
|
|
|
107
108
|
private capsuleStore: CapsuleStore,
|
|
108
109
|
private privateEventStore: PrivateEventStore,
|
|
109
110
|
private simulator: CircuitSimulator,
|
|
111
|
+
private contractSyncService: ContractSyncService,
|
|
110
112
|
) {
|
|
111
113
|
this.log = createLogger('simulator');
|
|
112
114
|
}
|
|
@@ -186,6 +188,7 @@ export class ContractFunctionSimulator {
|
|
|
186
188
|
this.senderAddressBookStore,
|
|
187
189
|
this.capsuleStore,
|
|
188
190
|
this.privateEventStore,
|
|
191
|
+
this.contractSyncService,
|
|
189
192
|
jobId,
|
|
190
193
|
0, // totalPublicArgsCount
|
|
191
194
|
startSideEffectCounter,
|
|
@@ -68,24 +68,24 @@ export interface IUtilityExecutionOracle {
|
|
|
68
68
|
utilityGetKeyValidationRequest(pkMHash: Fr): Promise<KeyValidationRequest>;
|
|
69
69
|
utilityGetContractInstance(address: AztecAddress): Promise<ContractInstance>;
|
|
70
70
|
utilityGetNoteHashMembershipWitness(
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
anchorBlockHash: BlockHash,
|
|
72
|
+
noteHash: Fr,
|
|
73
73
|
): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
|
|
74
|
-
|
|
74
|
+
utilityGetBlockHashMembershipWitness(
|
|
75
|
+
anchorBlockHash: BlockHash,
|
|
75
76
|
blockHash: BlockHash,
|
|
76
|
-
leafValue: Fr,
|
|
77
77
|
): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
|
|
78
78
|
utilityGetNullifierMembershipWitness(
|
|
79
|
-
|
|
79
|
+
anchorBlockHash: BlockHash,
|
|
80
80
|
nullifier: Fr,
|
|
81
81
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
82
|
-
utilityGetPublicDataWitness(
|
|
82
|
+
utilityGetPublicDataWitness(anchorBlockHash: BlockHash, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
83
83
|
utilityGetLowNullifierMembershipWitness(
|
|
84
|
-
|
|
84
|
+
anchorBlockHash: BlockHash,
|
|
85
85
|
nullifier: Fr,
|
|
86
86
|
): Promise<NullifierMembershipWitness | undefined>;
|
|
87
87
|
utilityGetBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined>;
|
|
88
|
-
|
|
88
|
+
utilityTryGetPublicKeysAndPartialAddress(account: AztecAddress): Promise<CompleteAddress | undefined>;
|
|
89
89
|
utilityGetAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
|
|
90
90
|
utilityGetNotes(
|
|
91
91
|
owner: AztecAddress | undefined,
|
|
@@ -111,7 +111,7 @@ export interface IUtilityExecutionOracle {
|
|
|
111
111
|
secret: Fr,
|
|
112
112
|
): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
113
113
|
utilityStorageRead(
|
|
114
|
-
|
|
114
|
+
anchorBlockHash: BlockHash,
|
|
115
115
|
contractAddress: AztecAddress,
|
|
116
116
|
startStorageSlot: Fr,
|
|
117
117
|
numberOfElements: number,
|
|
@@ -138,29 +138,39 @@ export class Oracle {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
async utilityGetNoteHashMembershipWitness(
|
|
141
|
-
[
|
|
142
|
-
[
|
|
141
|
+
[anchorBlockHash]: ACVMField[],
|
|
142
|
+
[noteHash]: ACVMField[],
|
|
143
143
|
): Promise<(ACVMField | ACVMField[])[]> {
|
|
144
|
-
const
|
|
145
|
-
const
|
|
144
|
+
const parsedAnchorBlockHash = BlockHash.fromString(anchorBlockHash);
|
|
145
|
+
const parsedNoteHash = Fr.fromString(noteHash);
|
|
146
146
|
|
|
147
|
-
const witness = await this.handlerAsUtility().utilityGetNoteHashMembershipWitness(
|
|
147
|
+
const witness = await this.handlerAsUtility().utilityGetNoteHashMembershipWitness(
|
|
148
|
+
parsedAnchorBlockHash,
|
|
149
|
+
parsedNoteHash,
|
|
150
|
+
);
|
|
148
151
|
if (!witness) {
|
|
149
|
-
throw new Error(
|
|
152
|
+
throw new Error(
|
|
153
|
+
`Note hash ${noteHash} not found in the note hash tree at anchor block hash ${parsedAnchorBlockHash.toString()}.`,
|
|
154
|
+
);
|
|
150
155
|
}
|
|
151
156
|
return witness.toNoirRepresentation();
|
|
152
157
|
}
|
|
153
158
|
|
|
154
|
-
async
|
|
159
|
+
async utilityGetBlockHashMembershipWitness(
|
|
160
|
+
[anchorBlockHash]: ACVMField[],
|
|
155
161
|
[blockHash]: ACVMField[],
|
|
156
|
-
[leafValue]: ACVMField[],
|
|
157
162
|
): Promise<(ACVMField | ACVMField[])[]> {
|
|
163
|
+
const parsedAnchorBlockHash = BlockHash.fromString(anchorBlockHash);
|
|
158
164
|
const parsedBlockHash = BlockHash.fromString(blockHash);
|
|
159
|
-
const parsedLeafValue = Fr.fromString(leafValue);
|
|
160
165
|
|
|
161
|
-
const witness = await this.handlerAsUtility().
|
|
166
|
+
const witness = await this.handlerAsUtility().utilityGetBlockHashMembershipWitness(
|
|
167
|
+
parsedAnchorBlockHash,
|
|
168
|
+
parsedBlockHash,
|
|
169
|
+
);
|
|
162
170
|
if (!witness) {
|
|
163
|
-
throw new Error(
|
|
171
|
+
throw new Error(
|
|
172
|
+
`Block hash ${parsedBlockHash.toString()} not found in the archive tree at anchor block ${parsedAnchorBlockHash.toString()}.`,
|
|
173
|
+
);
|
|
164
174
|
}
|
|
165
175
|
return witness.toNoirRepresentation();
|
|
166
176
|
}
|
|
@@ -238,12 +248,19 @@ export class Oracle {
|
|
|
238
248
|
return [witness.map(toACVMField)];
|
|
239
249
|
}
|
|
240
250
|
|
|
241
|
-
async
|
|
251
|
+
async utilityTryGetPublicKeysAndPartialAddress([address]: ACVMField[]): Promise<(ACVMField | ACVMField[])[]> {
|
|
242
252
|
const parsedAddress = AztecAddress.fromField(Fr.fromString(address));
|
|
243
|
-
const
|
|
244
|
-
await this.handlerAsUtility().utilityGetPublicKeysAndPartialAddress(parsedAddress);
|
|
253
|
+
const result = await this.handlerAsUtility().utilityTryGetPublicKeysAndPartialAddress(parsedAddress);
|
|
245
254
|
|
|
246
|
-
return
|
|
255
|
+
// We are going to return a Noir Option struct to represent the possibility of null values. Options are a struct
|
|
256
|
+
// with two fields: `some` (a boolean) and `value` (a field array in this case).
|
|
257
|
+
if (result === undefined) {
|
|
258
|
+
// No data was found so we set `some` to 0 and pad `value` with zeros get the correct return size.
|
|
259
|
+
return [toACVMField(0), Array(13).fill(toACVMField(0))];
|
|
260
|
+
} else {
|
|
261
|
+
// Data was found so we set `some` to 1 and return it along with `value`.
|
|
262
|
+
return [toACVMField(1), [...result.publicKeys.toFields(), result.partialAddress].map(toACVMField)];
|
|
263
|
+
}
|
|
247
264
|
}
|
|
248
265
|
|
|
249
266
|
async utilityGetNotes(
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
type TxContext,
|
|
31
31
|
} from '@aztec/stdlib/tx';
|
|
32
32
|
|
|
33
|
-
import {
|
|
33
|
+
import type { ContractSyncService } from '../../contract_sync/contract_sync_service.js';
|
|
34
34
|
import { NoteService } from '../../notes/note_service.js';
|
|
35
35
|
import type { AddressStore } from '../../storage/address_store/address_store.js';
|
|
36
36
|
import type { CapsuleStore } from '../../storage/capsule_store/capsule_store.js';
|
|
@@ -93,6 +93,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
93
93
|
senderAddressBookStore: SenderAddressBookStore,
|
|
94
94
|
capsuleStore: CapsuleStore,
|
|
95
95
|
privateEventStore: PrivateEventStore,
|
|
96
|
+
private readonly contractSyncService: ContractSyncService,
|
|
96
97
|
jobId: string,
|
|
97
98
|
private totalPublicCalldataCount: number = 0,
|
|
98
99
|
protected sideEffectCounter: number = 0,
|
|
@@ -242,7 +243,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
242
243
|
sender: AztecAddress,
|
|
243
244
|
recipient: AztecAddress,
|
|
244
245
|
) {
|
|
245
|
-
const senderCompleteAddress = await this.
|
|
246
|
+
const senderCompleteAddress = await this.getCompleteAddressOrFail(sender);
|
|
246
247
|
const senderIvsk = await this.keyStore.getMasterIncomingViewingSecretKey(sender);
|
|
247
248
|
return DirectionalAppTaggingSecret.compute(
|
|
248
249
|
senderCompleteAddress,
|
|
@@ -537,13 +538,12 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
537
538
|
|
|
538
539
|
isStaticCall = isStaticCall || this.callContext.isStaticCall;
|
|
539
540
|
|
|
540
|
-
await ensureContractSynced(
|
|
541
|
+
await this.contractSyncService.ensureContractSynced(
|
|
541
542
|
targetContractAddress,
|
|
542
543
|
functionSelector,
|
|
543
544
|
this.utilityExecutor,
|
|
544
|
-
this.aztecNode,
|
|
545
|
-
this.contractStore,
|
|
546
545
|
this.anchorBlockHeader,
|
|
546
|
+
this.jobId,
|
|
547
547
|
);
|
|
548
548
|
|
|
549
549
|
const targetArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(
|
|
@@ -576,6 +576,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
576
576
|
this.senderAddressBookStore,
|
|
577
577
|
this.capsuleStore,
|
|
578
578
|
this.privateEventStore,
|
|
579
|
+
this.contractSyncService,
|
|
579
580
|
this.jobId,
|
|
580
581
|
this.totalPublicCalldataCount,
|
|
581
582
|
sideEffectCounter,
|