@aztec/pxe 0.0.1-commit.e588bc7e5 → 0.0.1-commit.e5a3663dd
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/bin/check_oracle_version.js +4 -4
- package/dest/block_synchronizer/block_stream_source.d.ts +10 -0
- package/dest/block_synchronizer/block_stream_source.d.ts.map +1 -0
- package/dest/block_synchronizer/block_stream_source.js +37 -0
- package/dest/block_synchronizer/block_synchronizer.d.ts +6 -2
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +24 -10
- package/dest/config/index.d.ts +1 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +7 -14
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +4 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +8 -5
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +15 -2
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +10 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +14 -2
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +105 -3
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +10 -11
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +21 -17
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +34 -13
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +149 -28
- package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +20 -3
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +3 -0
- package/dest/contract_sync/contract_sync_service.d.ts +1 -1
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +35 -23
- package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +2 -2
- package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/pxe_creation_options.js +3 -1
- 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/entrypoints/server/utils.d.ts +2 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +2 -2
- package/dest/events/event_service.d.ts +1 -1
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +10 -1
- package/dest/events/private_event_filter_validator.d.ts +3 -2
- package/dest/events/private_event_filter_validator.d.ts.map +1 -1
- package/dest/events/private_event_filter_validator.js +15 -0
- package/dest/logs/log_service.d.ts +6 -6
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +8 -20
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -10
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +4 -7
- package/dest/private_kernel/private_kernel_oracle.d.ts +5 -5
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +12 -15
- package/dest/pxe.d.ts +16 -4
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +49 -20
- package/dest/storage/anchor_block_store/anchor_block_store.js +1 -1
- package/dest/storage/capsule_store/capsule_store.d.ts +1 -1
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
- package/dest/storage/capsule_store/capsule_store.js +8 -5
- package/dest/storage/contract_store/contract_store.d.ts +1 -1
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +4 -2
- package/dest/storage/private_event_store/private_event_store.d.ts +1 -1
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +3 -0
- package/dest/storage/private_event_store/stored_private_event.js +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +2 -2
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +2 -16
- package/package.json +16 -16
- package/src/bin/check_oracle_version.ts +4 -4
- package/src/block_synchronizer/block_stream_source.ts +52 -0
- package/src/block_synchronizer/block_synchronizer.ts +27 -11
- package/src/config/index.ts +2 -8
- package/src/contract_function_simulator/contract_function_simulator.ts +8 -4
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +1 -1
- package/src/contract_function_simulator/oracle/interfaces.ts +30 -1
- package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +7 -1
- package/src/contract_function_simulator/oracle/oracle.ts +157 -3
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +34 -20
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +241 -55
- package/src/contract_function_simulator/pick_notes.ts +22 -3
- package/src/contract_function_simulator/proxied_contract_data_source.ts +8 -1
- package/src/contract_sync/contract_sync_service.ts +57 -51
- package/src/entrypoints/client/bundle/utils.ts +2 -3
- package/src/entrypoints/client/lazy/utils.ts +2 -3
- package/src/entrypoints/pxe_creation_options.ts +7 -0
- package/src/entrypoints/server/index.ts +1 -1
- package/src/entrypoints/server/utils.ts +2 -3
- package/src/events/event_service.ts +13 -1
- package/src/events/private_event_filter_validator.ts +21 -1
- package/src/logs/log_service.ts +14 -50
- package/src/oracle_version.ts +20 -10
- package/src/private_kernel/private_kernel_execution_prover.ts +4 -9
- package/src/private_kernel/private_kernel_oracle.ts +14 -14
- package/src/pxe.ts +86 -24
- package/src/storage/anchor_block_store/anchor_block_store.ts +1 -1
- package/src/storage/capsule_store/capsule_store.ts +15 -5
- package/src/storage/contract_store/contract_store.ts +8 -6
- package/src/storage/private_event_store/private_event_store.ts +4 -0
- package/src/storage/private_event_store/stored_private_event.ts +1 -1
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +5 -15
package/dest/logs/log_service.js
CHANGED
|
@@ -6,18 +6,18 @@ import { getAllPrivateLogsByTags, getAllPublicLogsByTagsFromContract, loadPrivat
|
|
|
6
6
|
export class LogService {
|
|
7
7
|
aztecNode;
|
|
8
8
|
anchorBlockHeader;
|
|
9
|
+
l2TipsStore;
|
|
9
10
|
keyStore;
|
|
10
|
-
capsuleService;
|
|
11
11
|
recipientTaggingStore;
|
|
12
12
|
senderAddressBookStore;
|
|
13
13
|
addressStore;
|
|
14
14
|
jobId;
|
|
15
15
|
log;
|
|
16
|
-
constructor(aztecNode, anchorBlockHeader,
|
|
16
|
+
constructor(aztecNode, anchorBlockHeader, l2TipsStore, keyStore, recipientTaggingStore, senderAddressBookStore, addressStore, jobId, bindings){
|
|
17
17
|
this.aztecNode = aztecNode;
|
|
18
18
|
this.anchorBlockHeader = anchorBlockHeader;
|
|
19
|
+
this.l2TipsStore = l2TipsStore;
|
|
19
20
|
this.keyStore = keyStore;
|
|
20
|
-
this.capsuleService = capsuleService;
|
|
21
21
|
this.recipientTaggingStore = recipientTaggingStore;
|
|
22
22
|
this.senderAddressBookStore = senderAddressBookStore;
|
|
23
23
|
this.addressStore = addressStore;
|
|
@@ -69,20 +69,18 @@ export class LogService {
|
|
|
69
69
|
const scopedLog = logsForTag[0];
|
|
70
70
|
return new LogRetrievalResponse(scopedLog.logData.slice(1), scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier);
|
|
71
71
|
}
|
|
72
|
-
async fetchTaggedLogs(contractAddress,
|
|
72
|
+
async fetchTaggedLogs(contractAddress, recipient) {
|
|
73
73
|
this.log.verbose(`Fetching tagged logs for ${contractAddress.toString()}`);
|
|
74
74
|
// We only load logs from block up to and including the anchor block number
|
|
75
75
|
const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
|
|
76
76
|
const anchorBlockHash = await this.anchorBlockHeader.hash();
|
|
77
|
+
const l2Tips = await this.l2TipsStore.getL2Tips();
|
|
78
|
+
const currentTimestamp = this.anchorBlockHeader.globalVariables.timestamp;
|
|
77
79
|
// Get all secrets for this recipient (one per sender)
|
|
78
80
|
const secrets = await this.#getSecretsForSenders(contractAddress, recipient);
|
|
79
81
|
// Load logs for all sender-recipient pairs in parallel
|
|
80
|
-
const logArrays = await Promise.all(secrets.map((secret)=>loadPrivateLogsForSenderRecipientPair(secret, this.aztecNode, this.recipientTaggingStore, anchorBlockNumber, anchorBlockHash, this.jobId)));
|
|
81
|
-
|
|
82
|
-
const allLogs = logArrays.flat();
|
|
83
|
-
if (allLogs.length > 0) {
|
|
84
|
-
await this.#storePendingTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, recipient, allLogs);
|
|
85
|
-
}
|
|
82
|
+
const logArrays = await Promise.all(secrets.map((secret)=>loadPrivateLogsForSenderRecipientPair(secret, this.aztecNode, this.recipientTaggingStore, anchorBlockNumber, anchorBlockHash, currentTimestamp, l2Tips.finalized.block.number, this.jobId)));
|
|
83
|
+
return logArrays.flat().map((scopedLog)=>new PendingTaggedLog(scopedLog.logData, scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier));
|
|
86
84
|
}
|
|
87
85
|
async #getSecretsForSenders(contractAddress, recipient) {
|
|
88
86
|
const recipientCompleteAddress = await this.addressStore.getCompleteAddress(recipient);
|
|
@@ -102,19 +100,9 @@ export class LogService {
|
|
|
102
100
|
const secret = await ExtendedDirectionalAppTaggingSecret.compute(recipientCompleteAddress, recipientIvsk, sender, contractAddress, recipient);
|
|
103
101
|
if (!secret) {
|
|
104
102
|
// Note that all senders originate from either the SenderAddressBookStore or the KeyStore.
|
|
105
|
-
// TODO(F-512): make sure we actually prevent registering invalid senders.
|
|
106
103
|
throw new Error(`Failed to compute a tagging secret for sender ${sender} - this implies this is an invalid address, which should not happen as they have been previously registered in PXE.`);
|
|
107
104
|
}
|
|
108
105
|
return secret;
|
|
109
106
|
}));
|
|
110
107
|
}
|
|
111
|
-
#storePendingTaggedLogs(contractAddress, capsuleArrayBaseSlot, recipient, privateLogs) {
|
|
112
|
-
// Build all pending tagged logs from the scoped logs
|
|
113
|
-
const pendingTaggedLogs = privateLogs.map((scopedLog)=>{
|
|
114
|
-
const pendingTaggedLog = new PendingTaggedLog(scopedLog.logData, scopedLog.txHash, scopedLog.noteHashes, scopedLog.firstNullifier);
|
|
115
|
-
return pendingTaggedLog.toFields();
|
|
116
|
-
});
|
|
117
|
-
// TODO: This looks like it could belong more at the oracle interface level
|
|
118
|
-
return this.capsuleService.appendToCapsuleArray(contractAddress, capsuleArrayBaseSlot, pendingTaggedLogs, this.jobId, recipient);
|
|
119
|
-
}
|
|
120
108
|
}
|
package/dest/oracle_version.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
export declare const ORACLE_VERSION_MAJOR = 22;
|
|
2
|
+
export declare const ORACLE_VERSION_MINOR = 2;
|
|
3
|
+
export declare const ORACLE_INTERFACE_HASH = "193fe3f9fee6a84d26803e636c9746dd805a4f389d44a0618de75c2c5eb4912e";
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZQSxlQUFPLE1BQU0sb0JBQW9CLEtBQUssQ0FBQztBQUN2QyxlQUFPLE1BQU0sb0JBQW9CLElBQUksQ0FBQztBQVF0QyxlQUFPLE1BQU0scUJBQXFCLHFFQUFxRSxDQUFDIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAQtC,eAAO,MAAM,qBAAqB,qEAAqE,CAAC"}
|
package/dest/oracle_version.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
/// The
|
|
2
|
-
///
|
|
3
|
-
///
|
|
1
|
+
/// The oracle version constants are used to check that the oracle interface is in sync between PXE and Aztec.nr.
|
|
2
|
+
/// We version the oracle interface as `major.minor` where:
|
|
3
|
+
/// - `major` = backward-breaking changes (must match exactly between PXE and Aztec.nr)
|
|
4
|
+
/// - `minor` = oracle additions (non-breaking; PXE minor >= contract minor)
|
|
4
5
|
///
|
|
5
|
-
///
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
///
|
|
9
|
-
///
|
|
10
|
-
///
|
|
11
|
-
|
|
6
|
+
/// The Noir counterparts are in `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
|
|
7
|
+
///
|
|
8
|
+
/// @dev Whenever a contract function or Noir test is run, the `aztec_utl_assertCompatibleOracleVersion` oracle is called.
|
|
9
|
+
/// If the major version is incompatible, an error is thrown immediately. The minor version is recorded by the PXE and
|
|
10
|
+
/// used to provide helpful error messages if a contract calls an oracle that doesn't exist. We don't throw immediately
|
|
11
|
+
/// if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency without actually
|
|
12
|
+
/// using any of the new oracles then there is no reason to throw.
|
|
13
|
+
export const ORACLE_VERSION_MAJOR = 22;
|
|
14
|
+
export const ORACLE_VERSION_MINOR = 2;
|
|
15
|
+
/// This hash is computed from the Oracle interface and is used to detect when that interface changes. When it does,
|
|
16
|
+
/// you need to either:
|
|
17
|
+
/// - increment `ORACLE_VERSION_MAJOR` and reset `ORACLE_VERSION_MINOR` to zero if the change is breaking, or
|
|
18
|
+
/// - increment only `ORACLE_VERSION_MINOR` if the change is additive (a new oracle was added).
|
|
19
|
+
///
|
|
20
|
+
/// These constants must be kept in sync between this file and `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
|
|
21
|
+
export const ORACLE_INTERFACE_HASH = '193fe3f9fee6a84d26803e636c9746dd805a4f389d44a0618de75c2c5eb4912e';
|
|
@@ -42,4 +42,4 @@ export declare class PrivateKernelExecutionProver {
|
|
|
42
42
|
private getVkData;
|
|
43
43
|
private createPrivateCallData;
|
|
44
44
|
}
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfZXhlY3V0aW9uX3Byb3Zlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL3ByaXZhdGVfa2VybmVsX2V4ZWN1dGlvbl9wcm92ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFlLEtBQUssY0FBYyxFQUFnQixNQUFNLHVCQUF1QixDQUFDO0FBTXZGLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDM0UsT0FBTyxFQVFMLEtBQUssaUNBQWlDLEVBS3RDLEtBQUssb0NBQW9DLEVBRTFDLE1BQU0sc0JBQXNCLENBQUM7QUFFOUIsT0FBTyxFQUVMLEtBQUssc0JBQXNCLEVBQzNCLFNBQVMsRUFHVixNQUFNLGtCQUFrQixDQUFDO0FBSzFCLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFTdEUsTUFBTSxXQUFXLGtDQUFrQztJQUNqRCxRQUFRLEVBQUUsT0FBTyxDQUFDO0lBQ2xCLGtCQUFrQixFQUFFLE9BQU8sQ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SAAS,EAGV,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAMvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAQL,KAAK,iCAAiC,EAKtC,KAAK,oCAAoC,EAE1C,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAStE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5D;AAED;;;;;GAKG;AACH,qBAAa,4BAA4B;IAIrC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IALpB,OAAO,CAAC,GAAG,CAAS;IAEpB,YACU,MAAM,EAAE,mBAAmB,EAC3B,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ,EAC1B,QAAQ,CAAC,EAAE,cAAc,EAG1B;IAED;;;;;;;;;;OAUG;IACG,gBAAgB,CACpB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAE,kCAI9C,GACA,OAAO,CAAC,iCAAiC,CAAC,oCAAoC,CAAC,CAAC,CAqRlF;IAED;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;YAoBjB,SAAS;YAST,qBAAqB;CA+BpC"}
|
|
@@ -10,6 +10,7 @@ import { HidingKernelToPublicPrivateInputs, HidingKernelToRollupPrivateInputs, P
|
|
|
10
10
|
import { ChonkProof } from '@aztec/stdlib/proofs';
|
|
11
11
|
import { collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
|
|
12
12
|
import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
13
|
+
import { computeTxExpirationTimestamp } from './hints/compute_tx_expiration_timestamp.js';
|
|
13
14
|
import { PrivateKernelResetPrivateInputsBuilder } from './hints/private_kernel_reset_private_inputs_builder.js';
|
|
14
15
|
const NULL_SIMULATE_OUTPUT = {
|
|
15
16
|
publicInputs: PrivateKernelCircuitPublicInputs.empty(),
|
|
@@ -169,13 +170,9 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
169
170
|
this.log.debug(`Calling private kernel tail with hwm ${previousKernelData.publicInputs.minRevertibleSideEffectCounter}`);
|
|
170
171
|
// TODO: Enable padding once we better understand the final amounts to pad to.
|
|
171
172
|
const paddedSideEffectAmounts = PaddedSideEffectAmounts.empty();
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
const expirationTimestampUpperBound = previousKernelData.publicInputs
|
|
175
|
-
const anchorBlockTimestamp = previousKernelData.publicInputs.constants.anchorBlockHeader.globalVariables.timestamp;
|
|
176
|
-
if (expirationTimestampUpperBound <= anchorBlockTimestamp) {
|
|
177
|
-
throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${expirationTimestampUpperBound}.`);
|
|
178
|
-
}
|
|
173
|
+
// Round the aggregated expirationTimestamp down to reduce precision and avoid leaking which private
|
|
174
|
+
// functions were called via their exact expiration offsets.
|
|
175
|
+
const expirationTimestampUpperBound = computeTxExpirationTimestamp(previousKernelData.publicInputs);
|
|
179
176
|
const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts, expirationTimestampUpperBound);
|
|
180
177
|
const witgenTimer = new Timer();
|
|
181
178
|
const tailOutput = generateWitnesses ? await this.proofCreator.generateTailOutput(privateInputs) : await this.proofCreator.simulateTail(privateInputs);
|
|
@@ -5,11 +5,11 @@ import { MembershipWitness } from '@aztec/foundation/trees';
|
|
|
5
5
|
import type { KeyStore } from '@aztec/key-store';
|
|
6
6
|
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
7
7
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
-
import { BlockHash } from '@aztec/stdlib/block';
|
|
9
8
|
import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
10
9
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
11
10
|
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
12
11
|
import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
|
|
12
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
13
13
|
import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
|
|
14
14
|
import type { ContractStore } from '../storage/contract_store/contract_store.js';
|
|
15
15
|
/**
|
|
@@ -19,8 +19,8 @@ export declare class PrivateKernelOracle {
|
|
|
19
19
|
private contractStore;
|
|
20
20
|
private keyStore;
|
|
21
21
|
private node;
|
|
22
|
-
private
|
|
23
|
-
constructor(contractStore: ContractStore, keyStore: KeyStore, node: AztecNode,
|
|
22
|
+
private blockHeader;
|
|
23
|
+
constructor(contractStore: ContractStore, keyStore: KeyStore, node: AztecNode, blockHeader: BlockHeader);
|
|
24
24
|
/** Retrieves the preimage of a contract address from the registered contract instances db. */
|
|
25
25
|
getContractAddressPreimage(address: AztecAddress): Promise<ContractInstanceWithAddress & {
|
|
26
26
|
saltedInitializationHash: Fr;
|
|
@@ -43,7 +43,7 @@ export declare class PrivateKernelOracle {
|
|
|
43
43
|
/** Returns a membership witness with the sibling path and leaf index in our nullifier indexed merkle tree. */
|
|
44
44
|
getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
45
45
|
/** Returns the root of our note hash merkle tree. */
|
|
46
|
-
getNoteHashTreeRoot():
|
|
46
|
+
getNoteHashTreeRoot(): Fr;
|
|
47
47
|
/**
|
|
48
48
|
* Retrieves the sk_m corresponding to the pk_m.
|
|
49
49
|
* @throws If the provided public key is not associated with any of the registered accounts.
|
|
@@ -60,4 +60,4 @@ export declare class PrivateKernelOracle {
|
|
|
60
60
|
*/
|
|
61
61
|
getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
|
|
62
62
|
}
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJpdmF0ZV9rZXJuZWwvcHJpdmF0ZV9rZXJuZWxfb3JhY2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxxQkFBcUIsRUFBMkIsY0FBYyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDeEgsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDekQsT0FBTyxLQUFLLEVBQUUsY0FBYyxFQUFFLEtBQUssRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR2pELE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDMUQsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaE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AC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAElH;IAED;;;OAGG;IACU,sBAAsB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgC/F;CACF"}
|
|
@@ -12,12 +12,12 @@ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
|
12
12
|
contractStore;
|
|
13
13
|
keyStore;
|
|
14
14
|
node;
|
|
15
|
-
|
|
16
|
-
constructor(contractStore, keyStore, node,
|
|
15
|
+
blockHeader;
|
|
16
|
+
constructor(contractStore, keyStore, node, blockHeader){
|
|
17
17
|
this.contractStore = contractStore;
|
|
18
18
|
this.keyStore = keyStore;
|
|
19
19
|
this.node = node;
|
|
20
|
-
this.
|
|
20
|
+
this.blockHeader = blockHeader;
|
|
21
21
|
}
|
|
22
22
|
/** Retrieves the preimage of a contract address from the registered contract instances db. */ async getContractAddressPreimage(address) {
|
|
23
23
|
const instance = await this.contractStore.getContractInstance(address);
|
|
@@ -54,18 +54,14 @@ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
|
54
54
|
const leafIndex = getVKIndex(vk);
|
|
55
55
|
return Promise.resolve(new MembershipWitness(VK_TREE_HEIGHT, BigInt(leafIndex), getVKSiblingPath(leafIndex)));
|
|
56
56
|
}
|
|
57
|
-
/** Returns a membership witness with the sibling path and leaf index in our note hash tree. */ getNoteHashMembershipWitness(noteHash) {
|
|
58
|
-
return this.node.getNoteHashMembershipWitness(this.
|
|
57
|
+
/** Returns a membership witness with the sibling path and leaf index in our note hash tree. */ async getNoteHashMembershipWitness(noteHash) {
|
|
58
|
+
return this.node.getNoteHashMembershipWitness(await this.blockHeader.hash(), noteHash);
|
|
59
59
|
}
|
|
60
|
-
/** Returns a membership witness with the sibling path and leaf index in our nullifier indexed merkle tree. */ getNullifierMembershipWitness(nullifier) {
|
|
61
|
-
return this.node.getNullifierMembershipWitness(this.
|
|
60
|
+
/** Returns a membership witness with the sibling path and leaf index in our nullifier indexed merkle tree. */ async getNullifierMembershipWitness(nullifier) {
|
|
61
|
+
return this.node.getNullifierMembershipWitness(await this.blockHeader.hash(), nullifier);
|
|
62
62
|
}
|
|
63
|
-
/** Returns the root of our note hash merkle tree. */
|
|
64
|
-
|
|
65
|
-
if (!header) {
|
|
66
|
-
throw new Error(`No block header found for block hash ${this.blockHash}`);
|
|
67
|
-
}
|
|
68
|
-
return header.state.partial.noteHashTree.root;
|
|
63
|
+
/** Returns the root of our note hash merkle tree. */ getNoteHashTreeRoot() {
|
|
64
|
+
return this.blockHeader.state.partial.noteHashTree.root;
|
|
69
65
|
}
|
|
70
66
|
/**
|
|
71
67
|
* Retrieves the sk_m corresponding to the pk_m.
|
|
@@ -85,11 +81,12 @@ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
|
85
81
|
*/ async getUpdatedClassIdHints(contractAddress) {
|
|
86
82
|
const { delayedPublicMutableSlot, delayedPublicMutableHashSlot } = await DelayedPublicMutableValuesWithHash.getContractUpdateSlots(contractAddress);
|
|
87
83
|
const hashLeafSlot = await computePublicDataTreeLeafSlot(ProtocolContractAddress.ContractInstanceRegistry, delayedPublicMutableHashSlot);
|
|
88
|
-
const
|
|
84
|
+
const blockHash = await this.blockHeader.hash();
|
|
85
|
+
const updatedClassIdWitness = await this.node.getPublicDataWitness(blockHash, hashLeafSlot);
|
|
89
86
|
if (!updatedClassIdWitness) {
|
|
90
87
|
throw new Error(`No public data tree witness found for ${hashLeafSlot}`);
|
|
91
88
|
}
|
|
92
|
-
const readStorage = (storageSlot)=>this.node.getPublicStorageAt(
|
|
89
|
+
const readStorage = (storageSlot)=>this.node.getPublicStorageAt(blockHash, ProtocolContractAddress.ContractInstanceRegistry, storageSlot);
|
|
93
90
|
const delayedPublicMutableValues = await DelayedPublicMutableValues.readFromTree(delayedPublicMutableSlot, readStorage);
|
|
94
91
|
return new UpdatedClassIdHints(new MembershipWitness(PUBLIC_DATA_TREE_HEIGHT, updatedClassIdWitness.index, updatedClassIdWitness.siblingPath.toTuple()), updatedClassIdWitness.leafPreimage, delayedPublicMutableValues);
|
|
95
92
|
}
|
package/dest/pxe.d.ts
CHANGED
|
@@ -16,6 +16,13 @@ export type PackedPrivateEvent = InTx & {
|
|
|
16
16
|
packedEvent: Fr[];
|
|
17
17
|
eventSelector: EventSelector;
|
|
18
18
|
};
|
|
19
|
+
/** Options for PXE.proveTx. */
|
|
20
|
+
export type ProveTxOpts = {
|
|
21
|
+
/** Addresses whose private state and keys are accessible during private execution. */
|
|
22
|
+
scopes: AztecAddress[];
|
|
23
|
+
/** Sender address used to derive discovery tags for private messages (notes, events, logs) this tx emits. */
|
|
24
|
+
senderForTags?: AztecAddress;
|
|
25
|
+
};
|
|
19
26
|
/** Options for PXE.profileTx. */
|
|
20
27
|
export type ProfileTxOpts = {
|
|
21
28
|
/** The profiling mode to use. */
|
|
@@ -24,6 +31,8 @@ export type ProfileTxOpts = {
|
|
|
24
31
|
skipProofGeneration?: boolean;
|
|
25
32
|
/** Addresses whose private state and keys are accessible during private execution. */
|
|
26
33
|
scopes: AztecAddress[];
|
|
34
|
+
/** Sender address used to derive discovery tags for private messages (notes, events, logs) this tx emits. */
|
|
35
|
+
senderForTags?: AztecAddress;
|
|
27
36
|
};
|
|
28
37
|
/** Options for PXE.simulateTx. */
|
|
29
38
|
export type SimulateTxOpts = {
|
|
@@ -39,6 +48,8 @@ export type SimulateTxOpts = {
|
|
|
39
48
|
overrides?: SimulationOverrides;
|
|
40
49
|
/** Addresses whose private state and keys are accessible during private execution */
|
|
41
50
|
scopes: AztecAddress[];
|
|
51
|
+
/** Sender address used to derive discovery tags for private messages (notes, events, logs) this tx emits. */
|
|
52
|
+
senderForTags?: AztecAddress;
|
|
42
53
|
};
|
|
43
54
|
/** Options for PXE.executeUtility. */
|
|
44
55
|
export type ExecuteUtilityOpts = {
|
|
@@ -85,6 +96,7 @@ export declare class PXE {
|
|
|
85
96
|
private privateEventStore;
|
|
86
97
|
private contractSyncService;
|
|
87
98
|
private messageContextService;
|
|
99
|
+
private l2TipsStore;
|
|
88
100
|
private simulator;
|
|
89
101
|
private proverEnabled;
|
|
90
102
|
private proofCreator;
|
|
@@ -199,14 +211,14 @@ export declare class PXE {
|
|
|
199
211
|
* @throws If contract code not found, or public simulation reverts.
|
|
200
212
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
201
213
|
*/
|
|
202
|
-
proveTx(txRequest: TxExecutionRequest, scopes:
|
|
214
|
+
proveTx(txRequest: TxExecutionRequest, { scopes, senderForTags }: ProveTxOpts): Promise<TxProvingResult>;
|
|
203
215
|
/**
|
|
204
216
|
* Profiles a transaction, reporting gate counts (unless disabled) and returns an execution trace.
|
|
205
217
|
* @param txRequest - An authenticated tx request ready for simulation.
|
|
206
218
|
* @returns A trace of the program execution with gate counts.
|
|
207
219
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
208
220
|
*/
|
|
209
|
-
profileTx(txRequest: TxExecutionRequest, { profileMode, skipProofGeneration, scopes }: ProfileTxOpts): Promise<TxProfileResult>;
|
|
221
|
+
profileTx(txRequest: TxExecutionRequest, { profileMode, skipProofGeneration, scopes, senderForTags }: ProfileTxOpts): Promise<TxProfileResult>;
|
|
210
222
|
/**
|
|
211
223
|
* Simulates a transaction based on the provided preauthenticated execution request.
|
|
212
224
|
* This will run a local simulation of private execution (and optionally of public as well), run the
|
|
@@ -225,7 +237,7 @@ export declare class PXE {
|
|
|
225
237
|
*
|
|
226
238
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
227
239
|
*/
|
|
228
|
-
simulateTx(txRequest: TxExecutionRequest, { simulatePublic, skipTxValidation, skipFeeEnforcement, skipKernels, overrides, scopes }: SimulateTxOpts): Promise<TxSimulationResult>;
|
|
240
|
+
simulateTx(txRequest: TxExecutionRequest, { simulatePublic, skipTxValidation, skipFeeEnforcement, skipKernels, overrides, scopes, senderForTags }: SimulateTxOpts): Promise<TxSimulationResult>;
|
|
229
241
|
/**
|
|
230
242
|
* Executes a contract utility function.
|
|
231
243
|
* @param call - The function call containing the function details, arguments, and target contract address.
|
|
@@ -250,4 +262,4 @@ export declare class PXE {
|
|
|
250
262
|
*/
|
|
251
263
|
stop(): Promise<void>;
|
|
252
264
|
}
|
|
253
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
265
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBcUMsTUFBTSx1QkFBdUIsQ0FBQztBQUl2RixPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpELE9BQU8sRUFBRSxLQUFLLHlCQUF5QixFQUF5QixNQUFNLDJCQUEyQixDQUFDO0FBQ2xHLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUNMLEtBQUssZ0JBQWdCLEVBQ3JCLGFBQWEsRUFDYixZQUFZLEVBR2IsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVoRSxPQUFPLEVBQ0wsZUFBZSxFQUNmLEtBQUssMkJBQTJCLEVBQ2hDLEtBQUssY0FBYyxFQUdwQix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0lBQ1UsZ0JBQWdCLENBQzNCLGFBQWEsRUFBRSxhQUFhLEVBQzVCLE1BQU0sRUFBRSxrQkFBa0IsR0FDekIsT0FBTyxDQUFDLGtCQUFrQixFQUFFLENBQUMsQ0E4Qi9CO0lBRUQ7O09BRUc7SUFDVSxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUlqQztDQUNGIn0=
|
package/dest/pxe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../src/pxe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAqC,MAAM,uBAAuB,CAAC;AAIvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,KAAK,yBAAyB,EAAyB,MAAM,2BAA2B,CAAC;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,KAAK,gBAAgB,EACrB,aAAa,EACb,YAAY,EAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../src/pxe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,MAAM,EAAqC,MAAM,uBAAuB,CAAC;AAIvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OA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ACU,gBAAgB,CAC3B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CA8B/B;IAED;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAIjC;CACF"}
|
package/dest/pxe.js
CHANGED
|
@@ -51,6 +51,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
51
51
|
privateEventStore;
|
|
52
52
|
contractSyncService;
|
|
53
53
|
messageContextService;
|
|
54
|
+
l2TipsStore;
|
|
54
55
|
simulator;
|
|
55
56
|
proverEnabled;
|
|
56
57
|
proofCreator;
|
|
@@ -59,7 +60,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
59
60
|
jobQueue;
|
|
60
61
|
jobCoordinator;
|
|
61
62
|
debug;
|
|
62
|
-
constructor(node, db, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
63
|
+
constructor(node, db, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, l2TipsStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
63
64
|
this.node = node;
|
|
64
65
|
this.db = db;
|
|
65
66
|
this.blockStateSynchronizer = blockStateSynchronizer;
|
|
@@ -75,6 +76,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
75
76
|
this.privateEventStore = privateEventStore;
|
|
76
77
|
this.contractSyncService = contractSyncService;
|
|
77
78
|
this.messageContextService = messageContextService;
|
|
79
|
+
this.l2TipsStore = l2TipsStore;
|
|
78
80
|
this.simulator = simulator;
|
|
79
81
|
this.proverEnabled = proverEnabled;
|
|
80
82
|
this.proofCreator = proofCreator;
|
|
@@ -121,7 +123,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
121
123
|
]);
|
|
122
124
|
const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
|
|
123
125
|
const jobQueue = new SerialQueue();
|
|
124
|
-
const pxe = new PXE(node, store, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
|
|
126
|
+
const pxe = new PXE(node, store, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, tipsStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
|
|
125
127
|
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
|
|
126
128
|
pxe.jobQueue.start();
|
|
127
129
|
await pxe.#registerProtocolContracts();
|
|
@@ -137,6 +139,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
137
139
|
keyStore: this.keyStore,
|
|
138
140
|
addressStore: this.addressStore,
|
|
139
141
|
aztecNode: BenchmarkedNodeFactory.create(this.node),
|
|
142
|
+
l2TipsStore: this.l2TipsStore,
|
|
140
143
|
senderTaggingStore: this.senderTaggingStore,
|
|
141
144
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
142
145
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
@@ -197,17 +200,17 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
197
200
|
}
|
|
198
201
|
// Executes the entrypoint private function, as well as all nested private
|
|
199
202
|
// functions that might arise.
|
|
200
|
-
async #executePrivate(contractFunctionSimulator, txRequest, scopes, jobId) {
|
|
203
|
+
async #executePrivate({ contractFunctionSimulator, txRequest, anchorBlockHeader, scopes, jobId, senderForTags }) {
|
|
201
204
|
const { origin: contractAddress, functionSelector } = txRequest;
|
|
202
205
|
try {
|
|
203
|
-
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
204
206
|
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
|
|
205
207
|
const result = await contractFunctionSimulator.run(txRequest, {
|
|
206
208
|
contractAddress,
|
|
207
209
|
selector: functionSelector,
|
|
208
210
|
anchorBlockHeader,
|
|
209
211
|
scopes,
|
|
210
|
-
jobId
|
|
212
|
+
jobId,
|
|
213
|
+
senderForTags
|
|
211
214
|
});
|
|
212
215
|
this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
|
|
213
216
|
return result;
|
|
@@ -277,10 +280,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
277
280
|
* @param privateExecutionResult - The result of the private execution
|
|
278
281
|
* @param config - The configuration for the kernel execution prover.
|
|
279
282
|
* @returns An object that contains the output of the kernel execution, including the ChonkProof if proving is enabled.
|
|
280
|
-
*/ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, config) {
|
|
281
|
-
const
|
|
282
|
-
const anchorBlockHash = await anchorBlockHeader.hash();
|
|
283
|
-
const kernelOracle = new PrivateKernelOracle(this.contractStore, this.keyStore, this.node, anchorBlockHash);
|
|
283
|
+
*/ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, anchorBlockHeader, config) {
|
|
284
|
+
const kernelOracle = new PrivateKernelOracle(this.contractStore, this.keyStore, this.node, anchorBlockHeader);
|
|
284
285
|
const kernelTraceProver = new PrivateKernelExecutionProver(kernelOracle, proofCreator, !this.proverEnabled, this.log.getBindings());
|
|
285
286
|
this.log.debug(`Executing kernel trace prover (${JSON.stringify(config)})...`);
|
|
286
287
|
return await kernelTraceProver.proveWithKernels(txExecutionRequest.toTxRequest(), privateExecutionResult, config);
|
|
@@ -340,6 +341,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
340
341
|
* @returns The address of the sender.
|
|
341
342
|
* TODO: It's strange that we return the address here and I (benesjan) think we should drop the return value.
|
|
342
343
|
*/ async registerSender(sender) {
|
|
344
|
+
if (!await sender.isValid()) {
|
|
345
|
+
throw new Error(`Address ${sender} is not valid: it does not correspond to a point on the Grumpkin curve. Cannot register it as a sender.`);
|
|
346
|
+
}
|
|
343
347
|
const accounts = await this.keyStore.getAccounts();
|
|
344
348
|
if (accounts.includes(sender)) {
|
|
345
349
|
this.log.info(`Sender:\n "${sender.toString()}"\n already registered.`);
|
|
@@ -349,8 +353,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
349
353
|
if (wasAdded) {
|
|
350
354
|
this.log.info(`Added sender:\n ${sender.toString()}`);
|
|
351
355
|
// Wipe the entire sync cache: the new sender's tagged logs could contain notes/events for any contract, so
|
|
352
|
-
// all contracts must re-sync to discover them.
|
|
353
|
-
this.contractSyncService.wipe();
|
|
356
|
+
// all contracts must re-sync to discover them. Queued to avoid wiping while a job is in flight.
|
|
357
|
+
await this.#putInJobQueue(()=>Promise.resolve(this.contractSyncService.wipe()));
|
|
354
358
|
} else {
|
|
355
359
|
this.log.info(`Sender:\n "${sender.toString()}"\n already registered.`);
|
|
356
360
|
}
|
|
@@ -472,7 +476,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
472
476
|
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
473
477
|
* @throws If contract code not found, or public simulation reverts.
|
|
474
478
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
475
|
-
*/ proveTx(txRequest, scopes) {
|
|
479
|
+
*/ proveTx(txRequest, { scopes, senderForTags }) {
|
|
476
480
|
let privateExecutionResult;
|
|
477
481
|
// We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
|
|
478
482
|
// computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
|
|
@@ -481,10 +485,18 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
481
485
|
try {
|
|
482
486
|
const syncTimer = new Timer();
|
|
483
487
|
await this.blockStateSynchronizer.sync();
|
|
488
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
484
489
|
const syncTime = syncTimer.ms();
|
|
485
490
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
486
|
-
privateExecutionResult = await this.#executePrivate(
|
|
487
|
-
|
|
491
|
+
privateExecutionResult = await this.#executePrivate({
|
|
492
|
+
contractFunctionSimulator,
|
|
493
|
+
txRequest,
|
|
494
|
+
anchorBlockHeader,
|
|
495
|
+
scopes,
|
|
496
|
+
jobId,
|
|
497
|
+
senderForTags
|
|
498
|
+
});
|
|
499
|
+
const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
|
|
488
500
|
simulate: false,
|
|
489
501
|
skipFeeEnforcement: false,
|
|
490
502
|
profileMode: 'none'
|
|
@@ -536,7 +548,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
536
548
|
* @param txRequest - An authenticated tx request ready for simulation.
|
|
537
549
|
* @returns A trace of the program execution with gate counts.
|
|
538
550
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
539
|
-
*/ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes }) {
|
|
551
|
+
*/ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes, senderForTags }) {
|
|
540
552
|
// We disable concurrent profiles for consistency with simulateTx.
|
|
541
553
|
return this.#putInJobQueue(async (jobId)=>{
|
|
542
554
|
const totalTimer = new Timer();
|
|
@@ -552,10 +564,18 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
552
564
|
this.log.info(`Profiling transaction execution request to ${txRequest.functionSelector} at ${txRequest.origin}`, txInfo);
|
|
553
565
|
const syncTimer = new Timer();
|
|
554
566
|
await this.blockStateSynchronizer.sync();
|
|
567
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
555
568
|
const syncTime = syncTimer.ms();
|
|
556
569
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
557
|
-
const privateExecutionResult = await this.#executePrivate(
|
|
558
|
-
|
|
570
|
+
const privateExecutionResult = await this.#executePrivate({
|
|
571
|
+
contractFunctionSimulator,
|
|
572
|
+
txRequest,
|
|
573
|
+
anchorBlockHeader,
|
|
574
|
+
scopes,
|
|
575
|
+
jobId,
|
|
576
|
+
senderForTags
|
|
577
|
+
});
|
|
578
|
+
const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
|
|
559
579
|
simulate: skipProofGeneration,
|
|
560
580
|
skipFeeEnforcement: false,
|
|
561
581
|
profileMode
|
|
@@ -605,7 +625,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
605
625
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
606
626
|
*
|
|
607
627
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
608
|
-
*/ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, skipKernels = true, overrides, scopes }) {
|
|
628
|
+
*/ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, skipKernels = true, overrides, scopes, senderForTags }) {
|
|
609
629
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
610
630
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
611
631
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
@@ -623,6 +643,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
623
643
|
this.log.info(`Simulating transaction execution request to ${txRequest.functionSelector} at ${txRequest.origin}`, txInfo);
|
|
624
644
|
const syncTimer = new Timer();
|
|
625
645
|
await this.blockStateSynchronizer.sync();
|
|
646
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
626
647
|
const syncTime = syncTimer.ms();
|
|
627
648
|
const overriddenContracts = overrides?.contracts ? new Set(Object.keys(overrides.contracts)) : undefined;
|
|
628
649
|
const hasOverriddenContracts = overriddenContracts !== undefined && overriddenContracts.size > 0;
|
|
@@ -636,14 +657,21 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
636
657
|
this.contractSyncService.setExcludedFromSync(jobId, overriddenContracts);
|
|
637
658
|
}
|
|
638
659
|
// Execution of private functions only; no proving, and no kernel logic.
|
|
639
|
-
const privateExecutionResult = await this.#executePrivate(
|
|
660
|
+
const privateExecutionResult = await this.#executePrivate({
|
|
661
|
+
contractFunctionSimulator,
|
|
662
|
+
txRequest,
|
|
663
|
+
anchorBlockHeader,
|
|
664
|
+
scopes,
|
|
665
|
+
jobId,
|
|
666
|
+
senderForTags
|
|
667
|
+
});
|
|
640
668
|
let publicInputs;
|
|
641
669
|
let executionSteps = [];
|
|
642
670
|
if (skipKernels) {
|
|
643
671
|
({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel), this.node));
|
|
644
672
|
} else {
|
|
645
673
|
// Kernel logic, plus proving of all private functions and kernels.
|
|
646
|
-
({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
674
|
+
({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
|
|
647
675
|
simulate: true,
|
|
648
676
|
skipFeeEnforcement,
|
|
649
677
|
profileMode: 'none'
|
|
@@ -789,6 +817,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
789
817
|
* Stops the PXE's job queue and closes the backing store.
|
|
790
818
|
*/ async stop() {
|
|
791
819
|
await this.jobQueue.end();
|
|
820
|
+
await this.blockStateSynchronizer.stop();
|
|
792
821
|
await this.db.close();
|
|
793
822
|
}
|
|
794
823
|
}
|