@aztec/pxe 0.0.1-commit.fff30aa → 0.0.1-dev
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 +1 -1
- package/dest/block_synchronizer/block_synchronizer.d.ts +5 -3
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +10 -2
- package/dest/config/package_info.js +1 -1
- 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 +18 -10
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +5 -2
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +4 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +53 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +10 -14
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +16 -14
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +19 -2
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +108 -5
- package/dest/contract_sync/contract_sync_service.d.ts +2 -1
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +41 -7
- package/dest/contract_sync/helpers.d.ts +2 -3
- package/dest/contract_sync/helpers.d.ts.map +1 -1
- package/dest/contract_sync/helpers.js +12 -19
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +2 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +2 -1
- package/dest/entrypoints/pxe_creation_options.d.ts +4 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/server/index.d.ts +2 -1
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -0
- package/dest/entrypoints/server/utils.d.ts +1 -1
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +2 -1
- package/dest/events/event_service.d.ts +13 -5
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +28 -7
- package/dest/hooks/authorize_utility_call.d.ts +37 -0
- package/dest/hooks/authorize_utility_call.d.ts.map +1 -0
- package/dest/hooks/authorize_utility_call.js +4 -0
- package/dest/hooks/execution_hooks.d.ts +42 -0
- package/dest/hooks/execution_hooks.d.ts.map +1 -0
- package/dest/hooks/execution_hooks.js +9 -0
- package/dest/hooks/index.d.ts +4 -0
- package/dest/hooks/index.d.ts.map +1 -0
- package/dest/hooks/index.js +1 -0
- package/dest/logs/log_service.d.ts +1 -1
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +20 -35
- package/dest/messages/message_context_service.d.ts +1 -1
- package/dest/messages/message_context_service.d.ts.map +1 -1
- package/dest/messages/message_context_service.js +12 -10
- package/dest/notes/note_service.d.ts +25 -3
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +80 -65
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +2 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +18 -4
- package/dest/private_kernel/private_kernel_oracle.d.ts +1 -1
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +7 -2
- package/dest/pxe.d.ts +20 -5
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +61 -59
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts +42 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/kv_store_snapshot.js +93 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts +15 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/schema_tests.js +588 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.d.ts +19 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.d.ts.map +1 -0
- package/dest/storage/backwards_compatibility_tests/store_spy.js +63 -0
- package/dest/storage/open_pxe_stores.d.ts +31 -0
- package/dest/storage/open_pxe_stores.d.ts.map +1 -0
- package/dest/storage/open_pxe_stores.js +26 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts +1 -1
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
- package/dest/tagging/get_all_logs_by_tags.js +3 -0
- package/dest/tagging/index.d.ts +4 -3
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +3 -2
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts +29 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/persist_sender_tagging_index_ranges.js +42 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts +56 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.d.ts.map +1 -0
- package/dest/tagging/recipient_sync/sync_tagged_private_logs.js +158 -0
- package/dest/tagging/reconcile_tagging_index_ranges.d.ts +36 -0
- package/dest/tagging/reconcile_tagging_index_ranges.d.ts.map +1 -0
- package/dest/tagging/reconcile_tagging_index_ranges.js +74 -0
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +19 -8
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -6
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +21 -0
- package/package.json +17 -16
- package/src/bin/check_oracle_version.ts +1 -1
- package/src/block_synchronizer/block_synchronizer.ts +11 -3
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +32 -9
- package/src/contract_function_simulator/oracle/interfaces.ts +12 -1
- package/src/contract_function_simulator/oracle/oracle.ts +73 -1
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +25 -21
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +165 -29
- package/src/contract_sync/contract_sync_service.ts +55 -23
- package/src/contract_sync/helpers.ts +11 -23
- package/src/entrypoints/client/bundle/utils.ts +1 -0
- package/src/entrypoints/client/lazy/utils.ts +1 -0
- package/src/entrypoints/pxe_creation_options.ts +4 -0
- package/src/entrypoints/server/index.ts +1 -0
- package/src/entrypoints/server/utils.ts +1 -0
- package/src/events/event_service.ts +52 -17
- package/src/hooks/authorize_utility_call.ts +40 -0
- package/src/hooks/execution_hooks.ts +48 -0
- package/src/hooks/index.ts +7 -0
- package/src/logs/log_service.ts +46 -71
- package/src/messages/message_context_service.ts +25 -24
- package/src/notes/note_service.ts +115 -91
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/private_kernel_execution_prover.ts +29 -3
- package/src/private_kernel/private_kernel_oracle.ts +15 -5
- package/src/pxe.ts +116 -53
- package/src/storage/backwards_compatibility_tests/__snapshots__/AddressStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/AnchorBlockStore.json +3 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/CapsuleStore.json +16 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/ContractStore.json +28 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/KeyStore.json +52 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/L2TipsKVStore.json +42 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/NoteStore.json +36 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/PrivateEventStore.json +44 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/RecipientTaggingStore.json +18 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderAddressBookStore.json +16 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/SenderTaggingStore.json +22 -0
- package/src/storage/backwards_compatibility_tests/__snapshots__/opened_stores.json +97 -0
- package/src/storage/backwards_compatibility_tests/kv_store_snapshot.ts +122 -0
- package/src/storage/backwards_compatibility_tests/schema_tests.ts +707 -0
- package/src/storage/backwards_compatibility_tests/store_spy.ts +73 -0
- package/src/storage/open_pxe_stores.ts +47 -0
- package/src/tagging/get_all_logs_by_tags.ts +4 -0
- package/src/tagging/index.ts +3 -2
- package/src/tagging/persist_sender_tagging_index_ranges.ts +57 -0
- package/src/tagging/recipient_sync/sync_tagged_private_logs.ts +236 -0
- package/src/tagging/reconcile_tagging_index_ranges.ts +102 -0
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +33 -10
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +23 -8
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +0 -14
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +0 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +0 -85
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +0 -14
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +0 -1
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +0 -33
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +0 -130
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +0 -44
package/dest/oracle_version.js
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
/// if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency without actually
|
|
12
12
|
/// using any of the new oracles then there is no reason to throw.
|
|
13
13
|
export const ORACLE_VERSION_MAJOR = 22;
|
|
14
|
-
export const ORACLE_VERSION_MINOR =
|
|
14
|
+
export const ORACLE_VERSION_MINOR = 3;
|
|
15
15
|
/// This hash is computed from the Oracle interface and is used to detect when that interface changes. When it does,
|
|
16
16
|
/// you need to either:
|
|
17
17
|
/// - increment `ORACLE_VERSION_MAJOR` and reset `ORACLE_VERSION_MINOR` to zero if the change is breaking, or
|
|
18
18
|
/// - increment only `ORACLE_VERSION_MINOR` if the change is additive (a new oracle was added).
|
|
19
19
|
///
|
|
20
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 = '
|
|
21
|
+
export const ORACLE_INTERFACE_HASH = '0649632102f27d1411749e46733b96103eaac948914d328afc4b90d3bf6e5af5';
|
|
@@ -40,6 +40,7 @@ export declare class PrivateKernelExecutionProver {
|
|
|
40
40
|
*/
|
|
41
41
|
private ensurePublicInputsMatch;
|
|
42
42
|
private getVkData;
|
|
43
|
+
private prefetchUpdatedClassIdHints;
|
|
43
44
|
private createPrivateCallData;
|
|
44
45
|
}
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfZXhlY3V0aW9uX3Byb3Zlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL3ByaXZhdGVfa2VybmVsX2V4ZWN1dGlvbl9wcm92ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0Es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LGlDQUFpQyxDQUFDLG9DQUFvQyxDQUFDLENBQUMsQ0F1UmxGO0lBRUQ7Ozs7O09BS0c7SUFDSCxPQUFPLENBQUMsdUJBQXVCO1lBb0JqQixTQUFTO1lBVVQsMkJBQTJCO1lBaUIzQixxQkFBcUI7Q0FrQ3BDIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"AAGA,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,EAG1C,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAIV,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,CAuRlF;IAED;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;YAoBjB,SAAS;YAUT,2BAA2B;YAiB3B,qBAAqB;CAkCpC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { uniqueBy } from '@aztec/foundation/collection';
|
|
1
2
|
import { vkAsFieldsMegaHonk } from '@aztec/foundation/crypto/keys';
|
|
2
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
4
|
import { createLogger } from '@aztec/foundation/log';
|
|
@@ -8,7 +9,7 @@ import { ProtocolContractsList } from '@aztec/protocol-contracts';
|
|
|
8
9
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
9
10
|
import { HidingKernelToPublicPrivateInputs, HidingKernelToRollupPrivateInputs, PaddedSideEffectAmounts, PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs, PrivateVerificationKeyHints } from '@aztec/stdlib/kernel';
|
|
10
11
|
import { ChonkProof } from '@aztec/stdlib/proofs';
|
|
11
|
-
import { collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
|
|
12
|
+
import { collectNested, collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
|
|
12
13
|
import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
13
14
|
import { computeTxExpirationTimestamp } from './hints/compute_tx_expiration_timestamp.js';
|
|
14
15
|
import { PrivateKernelResetPrivateInputsBuilder } from './hints/private_kernel_reset_private_inputs_builder.js';
|
|
@@ -64,6 +65,7 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
64
65
|
const noteHashNullifierCounterMap = collectNoteHashNullifierCounterMap(executionResult);
|
|
65
66
|
const minRevertibleSideEffectCounter = getFinalMinRevertibleSideEffectCounter(executionResult);
|
|
66
67
|
const splitCounter = isPrivateOnlyTx ? 0 : minRevertibleSideEffectCounter;
|
|
68
|
+
const updatedClassIdHintsMap = await this.prefetchUpdatedClassIdHints(executionResult);
|
|
67
69
|
while(executionStack.length){
|
|
68
70
|
if (!firstIteration) {
|
|
69
71
|
let resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, executionStack, noteHashNullifierCounterMap, splitCounter);
|
|
@@ -99,7 +101,7 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
99
101
|
oracles: currentExecution.profileResult?.timings.oracles
|
|
100
102
|
}
|
|
101
103
|
});
|
|
102
|
-
const privateCallData = await this.createPrivateCallData(currentExecution);
|
|
104
|
+
const privateCallData = await this.createPrivateCallData(currentExecution, updatedClassIdHintsMap);
|
|
103
105
|
if (firstIteration) {
|
|
104
106
|
const witgenTimer = new Timer();
|
|
105
107
|
const proofInput = new PrivateKernelInitCircuitPrivateInputs(txRequest, getVKTreeRoot(), ProtocolContractsList, privateCallData, isPrivateOnlyTx, executionResult.firstNullifier, minRevertibleSideEffectCounter);
|
|
@@ -266,14 +268,26 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
266
268
|
const previousVkMembershipWitness = await this.oracle.getVkMembershipWitness(verificationKey.keyAsFields);
|
|
267
269
|
return new VkData(verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
|
|
268
270
|
}
|
|
269
|
-
|
|
271
|
+
/** Prefetches updated class id hints for all unique contracts in the execution tree in parallel. */ async prefetchUpdatedClassIdHints(executionResult) {
|
|
272
|
+
const allAddresses = collectNested([
|
|
273
|
+
executionResult.entrypoint
|
|
274
|
+
], (exec)=>[
|
|
275
|
+
exec.publicInputs.callContext.contractAddress
|
|
276
|
+
]);
|
|
277
|
+
const uniqueAddresses = uniqueBy(allAddresses, (a)=>a.toString());
|
|
278
|
+
return new Map(await Promise.all(uniqueAddresses.map(async (addr)=>[
|
|
279
|
+
addr.toString(),
|
|
280
|
+
await this.oracle.getUpdatedClassIdHints(addr)
|
|
281
|
+
])));
|
|
282
|
+
}
|
|
283
|
+
async createPrivateCallData({ publicInputs, vk: vkAsBuffer }, updatedClassIdHintsMap) {
|
|
270
284
|
const { contractAddress, functionSelector } = publicInputs.callContext;
|
|
271
285
|
const vkAsFields = await vkAsFieldsMegaHonk(vkAsBuffer);
|
|
272
286
|
const vk = await VerificationKeyAsFields.fromKey(vkAsFields);
|
|
273
287
|
const { currentContractClassId, publicKeys, saltedInitializationHash } = await this.oracle.getContractAddressPreimage(contractAddress);
|
|
274
288
|
const functionLeafMembershipWitness = await this.oracle.getFunctionMembershipWitness(currentContractClassId, functionSelector);
|
|
275
289
|
const { artifactHash: contractClassArtifactHash, publicBytecodeCommitment: contractClassPublicBytecodeCommitment } = await this.oracle.getContractClassIdPreimage(currentContractClassId);
|
|
276
|
-
const updatedClassIdHints =
|
|
290
|
+
const updatedClassIdHints = updatedClassIdHintsMap.get(contractAddress.toString());
|
|
277
291
|
return PrivateCallData.from({
|
|
278
292
|
publicInputs,
|
|
279
293
|
vk,
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJpdmF0ZV9rZXJuZWwvcHJpdmF0ZV9rZXJuZWxfb3JhY2xlLnRzIl0sIm5hbWVzIjpbXSwib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BRUQ7Ozs7OztPQU1HO0lBQ0ksa0JBQWtCLENBQUMsZUFBZSxFQUFFLEtBQUssR0FBRyxPQUFPLENBQUMsY0FBYyxDQUFDLENBRXpFO0lBRUQsMkVBQTJFO0lBQ3BFLG9CQUFvQixDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsUUFBUSxFQUFFLGdCQUFnQixHQUFHLE9BQU8sQ0FBQyxNQUFNLEdBQUcsU0FBUyxDQUFDLENBRWxIO0lBRUQ7OztPQUdHO0lBQ1Usc0JBQXNCLENBQUMsZUFBZSxFQUFFLFlBQVksR0FBRyxPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FvQy9GO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_oracle.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"private_kernel_oracle.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EAGrB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,KAAK,2BAA2B,EAAmC,MAAM,wBAAwB,CAAC;AAG3G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EA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mBAAmB,IAAI,EAAE,CAExB;IAED;;;;;;OAMG;IACI,kBAAkB,CAAC,eAAe,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,CAEzE;IAED,2EAA2E;IACpE,oBAAoB,CAAC,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,CAoC/F;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PUBLIC_DATA_TREE_HEIGHT, VK_TREE_HEIGHT } from '@aztec/constants';
|
|
1
|
+
import { PUBLIC_DATA_TREE_HEIGHT, UPDATES_VALUE_SIZE, VK_TREE_HEIGHT } from '@aztec/constants';
|
|
2
2
|
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
3
3
|
import { getVKIndex, getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
4
4
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
@@ -86,8 +86,13 @@ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
|
86
86
|
if (!updatedClassIdWitness) {
|
|
87
87
|
throw new Error(`No public data tree witness found for ${hashLeafSlot}`);
|
|
88
88
|
}
|
|
89
|
+
// In an indexed merkle tree, getPublicDataWitness returns a leaf whose slot matches our query
|
|
90
|
+
// only if the slot has been written to. Otherwise, it returns the "low leaf" predecessor, whose
|
|
91
|
+
// slot will differ. Most contracts are never updated, so we can skip the readFromTree call
|
|
92
|
+
// (which triggers multiple RPC calls) and return empty values directly.
|
|
89
93
|
const readStorage = (storageSlot)=>this.node.getPublicStorageAt(blockHash, ProtocolContractAddress.ContractInstanceRegistry, storageSlot);
|
|
90
|
-
const
|
|
94
|
+
const slotExists = updatedClassIdWitness.leafPreimage.leaf.slot.equals(hashLeafSlot);
|
|
95
|
+
const delayedPublicMutableValues = slotExists ? await DelayedPublicMutableValues.readFromTree(delayedPublicMutableSlot, readStorage) : DelayedPublicMutableValues.empty(UPDATES_VALUE_SIZE);
|
|
91
96
|
return new UpdatedClassIdHints(new MembershipWitness(PUBLIC_DATA_TREE_HEIGHT, updatedClassIdWitness.index, updatedClassIdWitness.siblingPath.toTuple()), updatedClassIdWitness.leafPreimage, delayedPublicMutableValues);
|
|
92
97
|
}
|
|
93
98
|
}
|
package/dest/pxe.d.ts
CHANGED
|
@@ -12,10 +12,18 @@ import type { AztecNode, PrivateKernelProver } from '@aztec/stdlib/interfaces/cl
|
|
|
12
12
|
import { BlockHeader, type InTx, SimulationOverrides, TxExecutionRequest, TxProfileResult, TxProvingResult, TxSimulationResult, UtilityExecutionResult } from '@aztec/stdlib/tx';
|
|
13
13
|
import type { PXEConfig } from './config/index.js';
|
|
14
14
|
import { PXEDebugUtils } from './debug/pxe_debug_utils.js';
|
|
15
|
+
import type { ExecutionHooks } from './hooks/index.js';
|
|
15
16
|
export type PackedPrivateEvent = InTx & {
|
|
16
17
|
packedEvent: Fr[];
|
|
17
18
|
eventSelector: EventSelector;
|
|
18
19
|
};
|
|
20
|
+
/** Options for PXE.proveTx. */
|
|
21
|
+
export type ProveTxOpts = {
|
|
22
|
+
/** Addresses whose private state and keys are accessible during private execution. */
|
|
23
|
+
scopes: AztecAddress[];
|
|
24
|
+
/** Sender address used to derive discovery tags for private messages (notes, events, logs) this tx emits. */
|
|
25
|
+
senderForTags?: AztecAddress;
|
|
26
|
+
};
|
|
19
27
|
/** Options for PXE.profileTx. */
|
|
20
28
|
export type ProfileTxOpts = {
|
|
21
29
|
/** The profiling mode to use. */
|
|
@@ -24,6 +32,8 @@ export type ProfileTxOpts = {
|
|
|
24
32
|
skipProofGeneration?: boolean;
|
|
25
33
|
/** Addresses whose private state and keys are accessible during private execution. */
|
|
26
34
|
scopes: AztecAddress[];
|
|
35
|
+
/** Sender address used to derive discovery tags for private messages (notes, events, logs) this tx emits. */
|
|
36
|
+
senderForTags?: AztecAddress;
|
|
27
37
|
};
|
|
28
38
|
/** Options for PXE.simulateTx. */
|
|
29
39
|
export type SimulateTxOpts = {
|
|
@@ -39,6 +49,8 @@ export type SimulateTxOpts = {
|
|
|
39
49
|
overrides?: SimulationOverrides;
|
|
40
50
|
/** Addresses whose private state and keys are accessible during private execution */
|
|
41
51
|
scopes: AztecAddress[];
|
|
52
|
+
/** Sender address used to derive discovery tags for private messages (notes, events, logs) this tx emits. */
|
|
53
|
+
senderForTags?: AztecAddress;
|
|
42
54
|
};
|
|
43
55
|
/** Options for PXE.executeUtility. */
|
|
44
56
|
export type ExecuteUtilityOpts = {
|
|
@@ -63,6 +75,8 @@ export type PXECreateArgs = {
|
|
|
63
75
|
config: PXEConfig;
|
|
64
76
|
/** Optional logger instance or string suffix for the logger name. */
|
|
65
77
|
loggerOrSuffix?: string | Logger;
|
|
78
|
+
/** Optional hooks to observe and influence contract execution. */
|
|
79
|
+
hooks?: ExecutionHooks;
|
|
66
80
|
};
|
|
67
81
|
/**
|
|
68
82
|
* Private eXecution Environment (PXE) is a library used by wallets to simulate private phase of transactions and to
|
|
@@ -93,6 +107,7 @@ export declare class PXE {
|
|
|
93
107
|
private jobQueue;
|
|
94
108
|
private jobCoordinator;
|
|
95
109
|
debug: PXEDebugUtils;
|
|
110
|
+
private hooks;
|
|
96
111
|
private constructor();
|
|
97
112
|
/**
|
|
98
113
|
* Creates an instance of a PXE by instantiating all the necessary data providers and services.
|
|
@@ -101,7 +116,7 @@ export declare class PXE {
|
|
|
101
116
|
*
|
|
102
117
|
* @returns A promise that resolves PXE is ready to be used.
|
|
103
118
|
*/
|
|
104
|
-
static create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix }: PXECreateArgs): Promise<PXE>;
|
|
119
|
+
static create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix, hooks }: PXECreateArgs): Promise<PXE>;
|
|
105
120
|
/**
|
|
106
121
|
* Returns the block header up to which the PXE has synced.
|
|
107
122
|
* @returns The synced block header
|
|
@@ -199,14 +214,14 @@ export declare class PXE {
|
|
|
199
214
|
* @throws If contract code not found, or public simulation reverts.
|
|
200
215
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
201
216
|
*/
|
|
202
|
-
proveTx(txRequest: TxExecutionRequest, scopes:
|
|
217
|
+
proveTx(txRequest: TxExecutionRequest, { scopes, senderForTags }: ProveTxOpts): Promise<TxProvingResult>;
|
|
203
218
|
/**
|
|
204
219
|
* Profiles a transaction, reporting gate counts (unless disabled) and returns an execution trace.
|
|
205
220
|
* @param txRequest - An authenticated tx request ready for simulation.
|
|
206
221
|
* @returns A trace of the program execution with gate counts.
|
|
207
222
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
208
223
|
*/
|
|
209
|
-
profileTx(txRequest: TxExecutionRequest, { profileMode, skipProofGeneration, scopes }: ProfileTxOpts): Promise<TxProfileResult>;
|
|
224
|
+
profileTx(txRequest: TxExecutionRequest, { profileMode, skipProofGeneration, scopes, senderForTags }: ProfileTxOpts): Promise<TxProfileResult>;
|
|
210
225
|
/**
|
|
211
226
|
* Simulates a transaction based on the provided preauthenticated execution request.
|
|
212
227
|
* This will run a local simulation of private execution (and optionally of public as well), run the
|
|
@@ -225,7 +240,7 @@ export declare class PXE {
|
|
|
225
240
|
*
|
|
226
241
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
227
242
|
*/
|
|
228
|
-
simulateTx(txRequest: TxExecutionRequest, { simulatePublic, skipTxValidation, skipFeeEnforcement, skipKernels, overrides, scopes }: SimulateTxOpts): Promise<TxSimulationResult>;
|
|
243
|
+
simulateTx(txRequest: TxExecutionRequest, { simulatePublic, skipTxValidation, skipFeeEnforcement, skipKernels, overrides, scopes, senderForTags }: SimulateTxOpts): Promise<TxSimulationResult>;
|
|
229
244
|
/**
|
|
230
245
|
* Executes a contract utility function.
|
|
231
246
|
* @param call - The function call containing the function details, arguments, and target contract address.
|
|
@@ -250,4 +265,4 @@ export declare class PXE {
|
|
|
250
265
|
*/
|
|
251
266
|
stop(): Promise<void>;
|
|
252
267
|
}
|
|
253
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
268
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBcUMsTUFBTSx1QkFBdUIsQ0FBQztBQUl2RixPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxLQUFLLHlCQUF5QixFQUF5QixNQUFNLDJCQUEyQixDQUFDO0FBQ2xHLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUNMLEtBQUssZ0JBQWdCLEVBQ3JCLGFBQWEsRUFDYixZQUFZLEVBR2IsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVoRSxPQUFPLEVBQ0wsZUFBZSxFQUNmLEtBQUssMkJBQTJCLEVBQ2hDLEtBQUssY0FBYyxFQUdwQixNQUFNLHdCQUF3QixDQUFDO0FBRWhDLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGlDQUFpQ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sQ0E2RGpDO0lBRUQ7Ozs7Ozs7Ozs7OztPQVlHO0lBQ1UsZ0JBQWdCLENBQzNCLGFBQWEsRUFBRSxhQUFhLEVBQzVCLE1BQU0sRUFBRSxrQkFBa0IsR0FDekIsT0FBTyxDQUFDLGtCQUFrQixFQUFFLENBQUMsQ0E4Qi9CO0lBRUQ7O09BRUc7SUFDVSxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUdqQztDQUNGIn0=
|
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;
|
|
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;AACzD,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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CAAC,IAAI,CAAC,CAGjC;CACF"}
|
package/dest/pxe.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { SerialQueue } from '@aztec/foundation/queue';
|
|
3
3
|
import { Timer } from '@aztec/foundation/timer';
|
|
4
|
-
import { KeyStore } from '@aztec/key-store';
|
|
5
|
-
import { L2TipsKVStore } from '@aztec/kv-store/stores';
|
|
6
4
|
import { protocolContractNames } from '@aztec/protocol-contracts';
|
|
7
5
|
import { FunctionType, decodeFunctionSignature } from '@aztec/stdlib/abi';
|
|
8
6
|
import { computeContractAddressFromInstance, getContractClassFromArtifact } from '@aztec/stdlib/contract';
|
|
@@ -23,15 +21,8 @@ import { JobCoordinator } from './job_coordinator/job_coordinator.js';
|
|
|
23
21
|
import { MessageContextService } from './messages/message_context_service.js';
|
|
24
22
|
import { PrivateKernelExecutionProver } from './private_kernel/private_kernel_execution_prover.js';
|
|
25
23
|
import { PrivateKernelOracle } from './private_kernel/private_kernel_oracle.js';
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { CapsuleStore } from './storage/capsule_store/capsule_store.js';
|
|
29
|
-
import { ContractStore } from './storage/contract_store/contract_store.js';
|
|
30
|
-
import { NoteStore } from './storage/note_store/note_store.js';
|
|
31
|
-
import { PrivateEventStore } from './storage/private_event_store/private_event_store.js';
|
|
32
|
-
import { RecipientTaggingStore } from './storage/tagging_store/recipient_tagging_store.js';
|
|
33
|
-
import { SenderAddressBookStore } from './storage/tagging_store/sender_address_book_store.js';
|
|
34
|
-
import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store.js';
|
|
24
|
+
import { openPxeStores } from './storage/open_pxe_stores.js';
|
|
25
|
+
import { persistSenderTaggingIndexRangesForTx } from './tagging/index.js';
|
|
35
26
|
/**
|
|
36
27
|
* Private eXecution Environment (PXE) is a library used by wallets to simulate private phase of transactions and to
|
|
37
28
|
* manage private state of users.
|
|
@@ -59,7 +50,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
59
50
|
jobQueue;
|
|
60
51
|
jobCoordinator;
|
|
61
52
|
debug;
|
|
62
|
-
|
|
53
|
+
hooks;
|
|
54
|
+
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, l2TipsStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug, hooks){
|
|
63
55
|
this.node = node;
|
|
64
56
|
this.blockStateSynchronizer = blockStateSynchronizer;
|
|
65
57
|
this.keyStore = keyStore;
|
|
@@ -83,6 +75,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
83
75
|
this.jobQueue = jobQueue;
|
|
84
76
|
this.jobCoordinator = jobCoordinator;
|
|
85
77
|
this.debug = debug;
|
|
78
|
+
this.hooks = hooks;
|
|
86
79
|
}
|
|
87
80
|
/**
|
|
88
81
|
* Creates an instance of a PXE by instantiating all the necessary data providers and services.
|
|
@@ -90,26 +83,16 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
90
83
|
* can be contacted.
|
|
91
84
|
*
|
|
92
85
|
* @returns A promise that resolves PXE is ready to be used.
|
|
93
|
-
*/ static async create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix }) {
|
|
86
|
+
*/ static async create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix, hooks }) {
|
|
94
87
|
// Extract bindings from the logger, or use empty bindings if a string suffix is provided.
|
|
95
88
|
const bindings = loggerOrSuffix && typeof loggerOrSuffix !== 'string' ? loggerOrSuffix.getBindings() : undefined;
|
|
96
89
|
const log = !loggerOrSuffix || typeof loggerOrSuffix === 'string' ? createLogger(loggerOrSuffix ? `pxe:service:${loggerOrSuffix}` : `pxe:service`) : loggerOrSuffix;
|
|
97
90
|
const info = await node.getNodeInfo();
|
|
98
91
|
const proverEnabled = config.proverEnabled !== undefined ? config.proverEnabled : info.realProofs;
|
|
99
|
-
const addressStore =
|
|
100
|
-
const privateEventStore = new PrivateEventStore(store);
|
|
101
|
-
const contractStore = new ContractStore(store);
|
|
102
|
-
const noteStore = new NoteStore(store);
|
|
103
|
-
const anchorBlockStore = new AnchorBlockStore(store);
|
|
104
|
-
const senderTaggingStore = new SenderTaggingStore(store);
|
|
105
|
-
const senderAddressBookStore = new SenderAddressBookStore(store);
|
|
106
|
-
const recipientTaggingStore = new RecipientTaggingStore(store);
|
|
107
|
-
const capsuleStore = new CapsuleStore(store);
|
|
108
|
-
const keyStore = new KeyStore(store);
|
|
109
|
-
const tipsStore = new L2TipsKVStore(store, 'pxe');
|
|
92
|
+
const { addressStore, privateEventStore, contractStore, noteStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, capsuleStore, keyStore, l2TipsStore } = openPxeStores(store);
|
|
110
93
|
const contractSyncService = new ContractSyncService(node, contractStore, noteStore, createLogger('pxe:contract_sync', bindings));
|
|
111
94
|
const messageContextService = new MessageContextService(node);
|
|
112
|
-
const synchronizer = new BlockSynchronizer(node, store, anchorBlockStore, noteStore, privateEventStore,
|
|
95
|
+
const synchronizer = new BlockSynchronizer(node, store, anchorBlockStore, noteStore, privateEventStore, l2TipsStore, contractSyncService, config, bindings);
|
|
113
96
|
const jobCoordinator = new JobCoordinator(store, bindings);
|
|
114
97
|
jobCoordinator.registerStores([
|
|
115
98
|
capsuleStore,
|
|
@@ -121,7 +104,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
121
104
|
]);
|
|
122
105
|
const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
|
|
123
106
|
const jobQueue = new SerialQueue();
|
|
124
|
-
const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService,
|
|
107
|
+
const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, l2TipsStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils, hooks);
|
|
125
108
|
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
|
|
126
109
|
pxe.jobQueue.start();
|
|
127
110
|
await pxe.#registerProtocolContracts();
|
|
@@ -145,7 +128,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
145
128
|
privateEventStore: this.privateEventStore,
|
|
146
129
|
simulator: this.simulator,
|
|
147
130
|
contractSyncService: this.contractSyncService,
|
|
148
|
-
messageContextService: this.messageContextService
|
|
131
|
+
messageContextService: this.messageContextService,
|
|
132
|
+
hooks: this.hooks
|
|
149
133
|
});
|
|
150
134
|
}
|
|
151
135
|
#contextualizeError(err, ...context) {
|
|
@@ -198,17 +182,17 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
198
182
|
}
|
|
199
183
|
// Executes the entrypoint private function, as well as all nested private
|
|
200
184
|
// functions that might arise.
|
|
201
|
-
async #executePrivate(contractFunctionSimulator, txRequest, scopes, jobId) {
|
|
185
|
+
async #executePrivate({ contractFunctionSimulator, txRequest, anchorBlockHeader, scopes, jobId, senderForTags }) {
|
|
202
186
|
const { origin: contractAddress, functionSelector } = txRequest;
|
|
203
187
|
try {
|
|
204
|
-
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
205
188
|
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
|
|
206
189
|
const result = await contractFunctionSimulator.run(txRequest, {
|
|
207
190
|
contractAddress,
|
|
208
191
|
selector: functionSelector,
|
|
209
192
|
anchorBlockHeader,
|
|
210
193
|
scopes,
|
|
211
|
-
jobId
|
|
194
|
+
jobId,
|
|
195
|
+
senderForTags
|
|
212
196
|
});
|
|
213
197
|
this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
|
|
214
198
|
return result;
|
|
@@ -278,8 +262,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
278
262
|
* @param privateExecutionResult - The result of the private execution
|
|
279
263
|
* @param config - The configuration for the kernel execution prover.
|
|
280
264
|
* @returns An object that contains the output of the kernel execution, including the ChonkProof if proving is enabled.
|
|
281
|
-
*/ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, config) {
|
|
282
|
-
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
265
|
+
*/ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, anchorBlockHeader, config) {
|
|
283
266
|
const kernelOracle = new PrivateKernelOracle(this.contractStore, this.keyStore, this.node, anchorBlockHeader);
|
|
284
267
|
const kernelTraceProver = new PrivateKernelExecutionProver(kernelOracle, proofCreator, !this.proverEnabled, this.log.getBindings());
|
|
285
268
|
this.log.debug(`Executing kernel trace prover (${JSON.stringify(config)})...`);
|
|
@@ -416,7 +399,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
416
399
|
}
|
|
417
400
|
await this.contractStore.addContractArtifact(artifact, contractClass);
|
|
418
401
|
const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
|
|
419
|
-
|
|
402
|
+
if (publicFunctionSignatures.length > 0) {
|
|
403
|
+
await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
|
|
404
|
+
}
|
|
420
405
|
} else {
|
|
421
406
|
// Otherwise, make sure there is an artifact already registered for that class id
|
|
422
407
|
artifact = await this.contractStore.getContractArtifact(instance.currentContractClassId);
|
|
@@ -451,7 +436,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
451
436
|
throw new Error('Could not update contract to a class different from the current one.');
|
|
452
437
|
}
|
|
453
438
|
const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
|
|
454
|
-
|
|
439
|
+
if (publicFunctionSignatures.length > 0) {
|
|
440
|
+
await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
|
|
441
|
+
}
|
|
455
442
|
currentInstance.currentContractClassId = contractClass.id;
|
|
456
443
|
await Promise.all([
|
|
457
444
|
this.contractStore.addContractArtifact(artifact, contractClass),
|
|
@@ -475,7 +462,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
475
462
|
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
476
463
|
* @throws If contract code not found, or public simulation reverts.
|
|
477
464
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
478
|
-
*/ proveTx(txRequest, scopes) {
|
|
465
|
+
*/ proveTx(txRequest, { scopes, senderForTags }) {
|
|
479
466
|
let privateExecutionResult;
|
|
480
467
|
// We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
|
|
481
468
|
// computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
|
|
@@ -484,10 +471,18 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
484
471
|
try {
|
|
485
472
|
const syncTimer = new Timer();
|
|
486
473
|
await this.blockStateSynchronizer.sync();
|
|
474
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
487
475
|
const syncTime = syncTimer.ms();
|
|
488
476
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
489
|
-
privateExecutionResult = await this.#executePrivate(
|
|
490
|
-
|
|
477
|
+
privateExecutionResult = await this.#executePrivate({
|
|
478
|
+
contractFunctionSimulator,
|
|
479
|
+
txRequest,
|
|
480
|
+
anchorBlockHeader,
|
|
481
|
+
scopes,
|
|
482
|
+
jobId,
|
|
483
|
+
senderForTags
|
|
484
|
+
});
|
|
485
|
+
const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
|
|
491
486
|
simulate: false,
|
|
492
487
|
skipFeeEnforcement: false,
|
|
493
488
|
profileMode: 'none'
|
|
@@ -512,22 +507,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
512
507
|
timings,
|
|
513
508
|
nodeRPCCalls: contractFunctionSimulator?.getStats().nodeRPCCalls
|
|
514
509
|
});
|
|
515
|
-
//
|
|
516
|
-
//
|
|
517
|
-
//
|
|
518
|
-
//
|
|
519
|
-
//
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
// TODO(benesjan): The following is an expensive operation. Figure out a way to avoid it.
|
|
523
|
-
const txHash = (await txProvingResult.toTx()).txHash;
|
|
524
|
-
await this.senderTaggingStore.storePendingIndexes(taggingIndexRangesUsedInTheTx, txHash, jobId);
|
|
525
|
-
this.log.debug(`Stored used tagging index ranges as sender for the tx`, {
|
|
526
|
-
taggingIndexRangesUsedInTheTx
|
|
527
|
-
});
|
|
528
|
-
} else {
|
|
529
|
-
this.log.debug(`No tagging index ranges used in the tx`);
|
|
530
|
-
}
|
|
510
|
+
// We keep track of which tagging indices we've used in this tx so that we don't repeat them in future txs
|
|
511
|
+
// (which would link them) without having to rely on this tx being mined (and us seeing the indices being used
|
|
512
|
+
// onchain).
|
|
513
|
+
// Note that this must happen _after_ proving as it requires the proof's public inputs, from which the kernels
|
|
514
|
+
// may have removed some logs due to note-nullifier squashing - this may lead to range of tagging indices we've
|
|
515
|
+
// actually used to being reduced.
|
|
516
|
+
await persistSenderTaggingIndexRangesForTx(this.senderTaggingStore, privateExecutionResult.entrypoint.taggingIndexRanges, publicInputs, ()=>txProvingResult.getTxHash(), jobId, this.log);
|
|
531
517
|
return txProvingResult;
|
|
532
518
|
} catch (err) {
|
|
533
519
|
throw this.#contextualizeError(err, inspect(txRequest), inspect(privateExecutionResult));
|
|
@@ -539,7 +525,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
539
525
|
* @param txRequest - An authenticated tx request ready for simulation.
|
|
540
526
|
* @returns A trace of the program execution with gate counts.
|
|
541
527
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
542
|
-
*/ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes }) {
|
|
528
|
+
*/ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes, senderForTags }) {
|
|
543
529
|
// We disable concurrent profiles for consistency with simulateTx.
|
|
544
530
|
return this.#putInJobQueue(async (jobId)=>{
|
|
545
531
|
const totalTimer = new Timer();
|
|
@@ -555,10 +541,18 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
555
541
|
this.log.info(`Profiling transaction execution request to ${txRequest.functionSelector} at ${txRequest.origin}`, txInfo);
|
|
556
542
|
const syncTimer = new Timer();
|
|
557
543
|
await this.blockStateSynchronizer.sync();
|
|
544
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
558
545
|
const syncTime = syncTimer.ms();
|
|
559
546
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
560
|
-
const privateExecutionResult = await this.#executePrivate(
|
|
561
|
-
|
|
547
|
+
const privateExecutionResult = await this.#executePrivate({
|
|
548
|
+
contractFunctionSimulator,
|
|
549
|
+
txRequest,
|
|
550
|
+
anchorBlockHeader,
|
|
551
|
+
scopes,
|
|
552
|
+
jobId,
|
|
553
|
+
senderForTags
|
|
554
|
+
});
|
|
555
|
+
const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
|
|
562
556
|
simulate: skipProofGeneration,
|
|
563
557
|
skipFeeEnforcement: false,
|
|
564
558
|
profileMode
|
|
@@ -608,7 +602,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
608
602
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
609
603
|
*
|
|
610
604
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
611
|
-
*/ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, skipKernels = true, overrides, scopes }) {
|
|
605
|
+
*/ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, skipKernels = true, overrides, scopes, senderForTags }) {
|
|
612
606
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
613
607
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
614
608
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
@@ -626,6 +620,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
626
620
|
this.log.info(`Simulating transaction execution request to ${txRequest.functionSelector} at ${txRequest.origin}`, txInfo);
|
|
627
621
|
const syncTimer = new Timer();
|
|
628
622
|
await this.blockStateSynchronizer.sync();
|
|
623
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
629
624
|
const syncTime = syncTimer.ms();
|
|
630
625
|
const overriddenContracts = overrides?.contracts ? new Set(Object.keys(overrides.contracts)) : undefined;
|
|
631
626
|
const hasOverriddenContracts = overriddenContracts !== undefined && overriddenContracts.size > 0;
|
|
@@ -639,14 +634,21 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
639
634
|
this.contractSyncService.setExcludedFromSync(jobId, overriddenContracts);
|
|
640
635
|
}
|
|
641
636
|
// Execution of private functions only; no proving, and no kernel logic.
|
|
642
|
-
const privateExecutionResult = await this.#executePrivate(
|
|
637
|
+
const privateExecutionResult = await this.#executePrivate({
|
|
638
|
+
contractFunctionSimulator,
|
|
639
|
+
txRequest,
|
|
640
|
+
anchorBlockHeader,
|
|
641
|
+
scopes,
|
|
642
|
+
jobId,
|
|
643
|
+
senderForTags
|
|
644
|
+
});
|
|
643
645
|
let publicInputs;
|
|
644
646
|
let executionSteps = [];
|
|
645
647
|
if (skipKernels) {
|
|
646
648
|
({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel), this.node));
|
|
647
649
|
} else {
|
|
648
650
|
// Kernel logic, plus proving of all private functions and kernels.
|
|
649
|
-
({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
651
|
+
({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
|
|
650
652
|
simulate: true,
|
|
651
653
|
skipFeeEnforcement,
|
|
652
654
|
profileMode: 'none'
|