@aztec/pxe 0.0.1-commit.c7c42ec → 0.0.1-commit.f295ac2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/block_synchronizer/block_synchronizer.d.ts +6 -2
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +21 -13
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
- package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
- package/dest/contract_function_simulator/benchmarked_node.js +77 -0
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +8 -9
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +33 -16
- package/dest/contract_function_simulator/execution_note_cache.d.ts +18 -9
- package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_note_cache.js +45 -28
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +3 -2
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +5 -2
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
- package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +9 -8
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +3 -1
- package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +4 -4
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +5 -5
- package/dest/contract_function_simulator/oracle/oracle.d.ts +6 -6
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +20 -19
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +5 -9
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +11 -10
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +8 -18
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +10 -35
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +14 -12
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +54 -52
- 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 +10 -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 +10 -1
- package/dest/entrypoints/pxe_creation_options.d.ts +3 -2
- 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 +11 -7
- package/dest/events/event_service.d.ts +4 -3
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +17 -19
- package/dest/events/private_event_filter_validator.d.ts +5 -5
- package/dest/events/private_event_filter_validator.d.ts.map +1 -1
- package/dest/events/private_event_filter_validator.js +5 -6
- package/dest/job_coordinator/job_coordinator.d.ts +74 -0
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
- package/dest/job_coordinator/job_coordinator.js +93 -0
- package/dest/logs/log_service.d.ts +3 -2
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +5 -3
- package/dest/notes/note_service.d.ts +3 -3
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +23 -28
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/hints/index.d.ts +2 -2
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
- package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +13 -7
- 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 -5
- package/dest/private_kernel/private_kernel_oracle.d.ts +24 -28
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +90 -2
- package/dest/pxe.d.ts +8 -36
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +65 -87
- package/dest/storage/capsule_store/capsule_store.d.ts +24 -9
- package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
- package/dest/storage/capsule_store/capsule_store.js +132 -23
- package/dest/storage/contract_store/contract_store.d.ts +2 -1
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +12 -0
- package/dest/storage/note_store/note_store.d.ts +6 -5
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +89 -94
- package/dest/storage/private_event_store/private_event_store.d.ts +33 -6
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +139 -32
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +15 -8
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/recipient_tagging_store.js +69 -12
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +19 -9
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +110 -28
- package/dest/tagging/constants.d.ts +2 -0
- package/dest/tagging/constants.d.ts.map +1 -0
- package/dest/tagging/constants.js +10 -0
- package/dest/tagging/index.d.ts +2 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +1 -10
- 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 +7 -7
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +2 -2
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +8 -8
- package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +1 -1
- 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 +2 -2
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +4 -2
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +4 -2
- package/dest/tree_membership/tree_membership_service.d.ts +9 -11
- package/dest/tree_membership/tree_membership_service.d.ts.map +1 -1
- package/dest/tree_membership/tree_membership_service.js +25 -34
- package/package.json +18 -18
- package/src/block_synchronizer/block_synchronizer.ts +30 -12
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/benchmarked_node.ts +103 -0
- package/src/contract_function_simulator/contract_function_simulator.ts +42 -16
- package/src/contract_function_simulator/execution_note_cache.ts +44 -25
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +4 -0
- package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
- package/src/contract_function_simulator/oracle/interfaces.ts +8 -7
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +6 -6
- package/src/contract_function_simulator/oracle/oracle.ts +24 -22
- package/src/contract_function_simulator/oracle/private_execution.ts +10 -19
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +13 -38
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +56 -50
- package/src/entrypoints/client/bundle/utils.ts +7 -1
- package/src/entrypoints/client/lazy/utils.ts +7 -2
- package/src/entrypoints/pxe_creation_options.ts +2 -1
- package/src/entrypoints/server/index.ts +1 -0
- package/src/entrypoints/server/utils.ts +11 -15
- package/src/events/event_service.ts +17 -21
- package/src/events/private_event_filter_validator.ts +3 -5
- package/src/job_coordinator/job_coordinator.ts +149 -0
- package/src/logs/log_service.ts +3 -1
- package/src/notes/note_service.ts +23 -29
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/hints/index.ts +1 -1
- package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +33 -22
- package/src/private_kernel/private_kernel_execution_prover.ts +3 -5
- package/src/private_kernel/private_kernel_oracle.ts +116 -36
- package/src/pxe.ts +98 -116
- package/src/storage/capsule_store/capsule_store.ts +159 -23
- package/src/storage/contract_store/contract_store.ts +20 -0
- package/src/storage/note_store/note_store.ts +98 -95
- package/src/storage/private_event_store/private_event_store.ts +199 -37
- package/src/storage/tagging_store/recipient_tagging_store.ts +89 -13
- package/src/storage/tagging_store/sender_tagging_store.ts +129 -28
- package/src/tagging/constants.ts +10 -0
- package/src/tagging/index.ts +1 -11
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +10 -6
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +8 -7
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +6 -2
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +4 -1
- package/src/tree_membership/tree_membership_service.ts +27 -42
- package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
- package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
- package/dest/contract_function_simulator/proxied_node.js +0 -27
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -46
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
- package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
- package/dest/public_storage/public_storage_service.d.ts +0 -24
- package/dest/public_storage/public_storage_service.d.ts.map +0 -1
- package/dest/public_storage/public_storage_service.js +0 -26
- package/src/contract_function_simulator/proxied_node.ts +0 -33
- package/src/private_kernel/private_kernel_oracle_impl.ts +0 -133
- package/src/public_storage/public_storage_service.ts +0 -33
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type Logger } from '@aztec/foundation/log';
|
|
2
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
2
3
|
import type { L2TipsKVStore } from '@aztec/kv-store/stores';
|
|
3
4
|
import { L2BlockStream, type L2BlockStreamEvent, type L2BlockStreamEventHandler } from '@aztec/stdlib/block';
|
|
4
5
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
6
|
import type { PXEConfig } from '../config/index.js';
|
|
6
7
|
import type { AnchorBlockStore } from '../storage/anchor_block_store/anchor_block_store.js';
|
|
7
8
|
import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
9
|
+
import type { PrivateEventStore } from '../storage/private_event_store/private_event_store.js';
|
|
8
10
|
/**
|
|
9
11
|
* The BlockSynchronizer class orchestrates synchronization between PXE and Aztec node, maintaining an up-to-date
|
|
10
12
|
* view of the L2 chain state. It handles block header retrieval, chain reorganizations, and provides an interface
|
|
@@ -12,13 +14,15 @@ import type { NoteStore } from '../storage/note_store/note_store.js';
|
|
|
12
14
|
*/
|
|
13
15
|
export declare class BlockSynchronizer implements L2BlockStreamEventHandler {
|
|
14
16
|
private node;
|
|
17
|
+
private store;
|
|
15
18
|
private anchorBlockStore;
|
|
16
19
|
private noteStore;
|
|
20
|
+
private privateEventStore;
|
|
17
21
|
private l2TipsStore;
|
|
18
22
|
private log;
|
|
19
23
|
private isSyncing;
|
|
20
24
|
protected readonly blockStream: L2BlockStream;
|
|
21
|
-
constructor(node: AztecNode, anchorBlockStore: AnchorBlockStore, noteStore: NoteStore, l2TipsStore: L2TipsKVStore, config?: Partial<Pick<PXEConfig, 'l2BlockBatchSize'>>, loggerOrSuffix?: string | Logger);
|
|
25
|
+
constructor(node: AztecNode, store: AztecAsyncKVStore, anchorBlockStore: AnchorBlockStore, noteStore: NoteStore, privateEventStore: PrivateEventStore, l2TipsStore: L2TipsKVStore, config?: Partial<Pick<PXEConfig, 'l2BlockBatchSize'>>, loggerOrSuffix?: string | Logger);
|
|
22
26
|
protected createBlockStream(config: Partial<Pick<PXEConfig, 'l2BlockBatchSize'>>): L2BlockStream;
|
|
23
27
|
/** Handle events emitted by the block stream. */
|
|
24
28
|
handleBlockStreamEvent(event: L2BlockStreamEvent): Promise<void>;
|
|
@@ -34,4 +38,4 @@ export declare class BlockSynchronizer implements L2BlockStreamEventHandler {
|
|
|
34
38
|
sync(): Promise<void>;
|
|
35
39
|
private doSync;
|
|
36
40
|
}
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfc3luY2hyb25pemVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYmxvY2tfc3luY2hyb25pemVyL2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FBQztJQUU5QyxZQUNVLElBQUksRUFBRSxTQUFTLEVBQ2YsS0FBSyxFQUFFLGlCQUFpQixFQUN4QixnQkFBZ0IsRUFBRSxnQkFBZ0IsRUFDbEMsU0FBUyxFQUFFLFNBQVMsRUFDcEIsaUJBQWlCLEVBQUUsaUJBQWlCLEVBQ3BDLFdBQVcsRUFBRSxhQUFhLEVBQ2xDLE1BQU0sR0FBRSxPQUFPLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxrQkFBa0IsQ0FBQyxDQUFNLEVBQ3pELGNBQWMsQ0FBQyxFQUFFLE1BQU0sR0FBRyxNQUFNLEVBT2pDO0lBRUQsU0FBUyxDQUFDLGlCQUFpQixDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxrQkFBa0IsQ0FBQyxDQUFDLGlCQU8vRTtJQUVELGlEQUFpRDtJQUNwQyxzQkFBc0IsQ0FBQyxLQUFLLEVBQUUsa0JBQWtCLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQXNDNUU7SUFFRDs7Ozs7Ozs7T0FRRztJQUNVLElBQUksa0JBZWhCO1lBRWEsTUFBTTtDQWNyQiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_synchronizer.d.ts","sourceRoot":"","sources":["../../src/block_synchronizer/block_synchronizer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"block_synchronizer.d.ts","sourceRoot":"","sources":["../../src/block_synchronizer/block_synchronizer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,E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;;;;;;;OAQG;IACU,IAAI,kBAehB;YAEa,MAAM;CAcrB"}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { L2BlockStream } from '@aztec/stdlib/block';
|
|
3
|
+
import { L2BlockHash, L2BlockStream } from '@aztec/stdlib/block';
|
|
4
4
|
/**
|
|
5
5
|
* The BlockSynchronizer class orchestrates synchronization between PXE and Aztec node, maintaining an up-to-date
|
|
6
6
|
* view of the L2 chain state. It handles block header retrieval, chain reorganizations, and provides an interface
|
|
7
7
|
* for querying sync status.
|
|
8
8
|
*/ export class BlockSynchronizer {
|
|
9
9
|
node;
|
|
10
|
+
store;
|
|
10
11
|
anchorBlockStore;
|
|
11
12
|
noteStore;
|
|
13
|
+
privateEventStore;
|
|
12
14
|
l2TipsStore;
|
|
13
15
|
log;
|
|
14
16
|
isSyncing;
|
|
15
17
|
blockStream;
|
|
16
|
-
constructor(node, anchorBlockStore, noteStore, l2TipsStore, config = {}, loggerOrSuffix){
|
|
18
|
+
constructor(node, store, anchorBlockStore, noteStore, privateEventStore, l2TipsStore, config = {}, loggerOrSuffix){
|
|
17
19
|
this.node = node;
|
|
20
|
+
this.store = store;
|
|
18
21
|
this.anchorBlockStore = anchorBlockStore;
|
|
19
22
|
this.noteStore = noteStore;
|
|
23
|
+
this.privateEventStore = privateEventStore;
|
|
20
24
|
this.l2TipsStore = l2TipsStore;
|
|
21
25
|
this.log = !loggerOrSuffix || typeof loggerOrSuffix === 'string' ? createLogger(loggerOrSuffix ? `pxe:block_synchronizer:${loggerOrSuffix}` : `pxe:block_synchronizer`) : loggerOrSuffix;
|
|
22
26
|
this.blockStream = this.createBlockStream(config);
|
|
@@ -34,28 +38,32 @@ import { L2BlockStream } from '@aztec/stdlib/block';
|
|
|
34
38
|
switch(event.type){
|
|
35
39
|
case 'blocks-added':
|
|
36
40
|
{
|
|
37
|
-
const lastBlock = event.blocks.at(-1)
|
|
41
|
+
const lastBlock = event.blocks.at(-1);
|
|
38
42
|
this.log.verbose(`Updated pxe last block to ${lastBlock.number}`, {
|
|
39
43
|
blockHash: lastBlock.hash(),
|
|
40
44
|
archive: lastBlock.archive.root.toString(),
|
|
41
45
|
header: lastBlock.header.toInspect()
|
|
42
46
|
});
|
|
43
|
-
await this.anchorBlockStore.setHeader(lastBlock.
|
|
47
|
+
await this.anchorBlockStore.setHeader(lastBlock.header);
|
|
44
48
|
break;
|
|
45
49
|
}
|
|
46
50
|
case 'chain-pruned':
|
|
47
51
|
{
|
|
48
52
|
this.log.warn(`Pruning data after block ${event.block.number} due to reorg`);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
55
|
-
|
|
56
|
-
} else {
|
|
57
|
-
await this.anchorBlockStore.setHeader(newHeader);
|
|
53
|
+
const oldAnchorBlockNumber = (await this.anchorBlockStore.getBlockHeader()).getBlockNumber();
|
|
54
|
+
// Note that the following is not necessarily the anchor block that will be used in the transaction - if
|
|
55
|
+
// the chain has already moved past the reorg, we'll also see blocks-added events that will push the anchor
|
|
56
|
+
// forward.
|
|
57
|
+
const newAnchorBlockHeader = await this.node.getBlockHeader(L2BlockHash.fromString(event.block.hash));
|
|
58
|
+
if (!newAnchorBlockHeader) {
|
|
59
|
+
throw new Error(`Block header for block number ${event.block.number} and hash ${event.block.hash} not found during chain prune. This likely indicates a bug in the node, as we receive block stream events and fetch block headers from the same node.`);
|
|
58
60
|
}
|
|
61
|
+
// Operations are wrapped in a single transaction to ensure atomicity.
|
|
62
|
+
await this.store.transactionAsync(async ()=>{
|
|
63
|
+
await this.noteStore.rollback(event.block.number, oldAnchorBlockNumber);
|
|
64
|
+
await this.privateEventStore.rollback(event.block.number, oldAnchorBlockNumber);
|
|
65
|
+
await this.anchorBlockStore.setHeader(newAnchorBlockHeader);
|
|
66
|
+
});
|
|
59
67
|
break;
|
|
60
68
|
}
|
|
61
69
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
|
+
import type { NodeStats } from '@aztec/stdlib/tx';
|
|
3
|
+
export type BenchmarkedNode = AztecNode & {
|
|
4
|
+
getStats(): NodeStats;
|
|
5
|
+
};
|
|
6
|
+
export declare class BenchmarkedNodeFactory {
|
|
7
|
+
static create(node: AztecNode): BenchmarkedNode;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVuY2htYXJrZWRfbm9kZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9iZW5jaG1hcmtlZF9ub2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBa0IsTUFBTSxrQkFBa0IsQ0FBQztBQWlCbEUsTUFBTSxNQUFNLGVBQWUsR0FBRyxTQUFTLEdBQUc7SUFBRSxRQUFRLElBQUksU0FBUyxDQUFBO0NBQUUsQ0FBQztBQUVwRSxxQkFBYSxzQkFBc0I7SUFDakMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsU0FBUyxHQUFHLGVBQWUsQ0ErRTlDO0NBQ0YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benchmarked_node.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/benchmarked_node.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,kBAAkB,CAAC;AAiBlE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG;IAAE,QAAQ,IAAI,SAAS,CAAA;CAAE,CAAC;AAEpE,qBAAa,sBAAsB;IACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,CA+E9C;CACF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Timer } from '@aztec/foundation/timer';
|
|
2
|
+
export class BenchmarkedNodeFactory {
|
|
3
|
+
static create(node) {
|
|
4
|
+
// Per-method call stats
|
|
5
|
+
const perMethod = {};
|
|
6
|
+
// Round trip tracking
|
|
7
|
+
let inFlightCount = 0;
|
|
8
|
+
let currentRoundTripTimer = null;
|
|
9
|
+
let currentRoundTripMethods = [];
|
|
10
|
+
const roundTrips = {
|
|
11
|
+
roundTrips: 0,
|
|
12
|
+
totalBlockingTime: 0,
|
|
13
|
+
roundTripDurations: [],
|
|
14
|
+
roundTripMethods: []
|
|
15
|
+
};
|
|
16
|
+
return new Proxy(node, {
|
|
17
|
+
get (target, prop) {
|
|
18
|
+
if (prop === 'getStats') {
|
|
19
|
+
return ()=>{
|
|
20
|
+
return {
|
|
21
|
+
perMethod,
|
|
22
|
+
roundTrips
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
} else {
|
|
26
|
+
return function(...args) {
|
|
27
|
+
// Track per-method stats
|
|
28
|
+
if (!perMethod[prop]) {
|
|
29
|
+
perMethod[prop] = {
|
|
30
|
+
times: []
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
// Start of a new round trip batch?
|
|
34
|
+
if (inFlightCount === 0) {
|
|
35
|
+
roundTrips.roundTrips++;
|
|
36
|
+
currentRoundTripTimer = new Timer();
|
|
37
|
+
currentRoundTripMethods = [];
|
|
38
|
+
}
|
|
39
|
+
inFlightCount++;
|
|
40
|
+
currentRoundTripMethods.push(prop);
|
|
41
|
+
const callTimer = new Timer();
|
|
42
|
+
const result = target[prop].apply(target, args);
|
|
43
|
+
// Handle completion - called when the call finishes (after Promise resolves)
|
|
44
|
+
const handleCompletion = ()=>{
|
|
45
|
+
const callTime = callTimer.ms();
|
|
46
|
+
perMethod[prop].times.push(callTime);
|
|
47
|
+
inFlightCount--;
|
|
48
|
+
// End of round trip batch - all concurrent calls completed
|
|
49
|
+
if (inFlightCount === 0 && currentRoundTripTimer) {
|
|
50
|
+
const roundTripTime = currentRoundTripTimer.ms();
|
|
51
|
+
roundTrips.totalBlockingTime += roundTripTime;
|
|
52
|
+
roundTrips.roundTripDurations.push(roundTripTime);
|
|
53
|
+
roundTrips.roundTripMethods.push(currentRoundTripMethods);
|
|
54
|
+
currentRoundTripTimer = null;
|
|
55
|
+
currentRoundTripMethods = [];
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
// If the result is a Promise, chain the completion handler
|
|
59
|
+
if (result && typeof result.then === 'function') {
|
|
60
|
+
return result.then((value)=>{
|
|
61
|
+
handleCompletion();
|
|
62
|
+
return value;
|
|
63
|
+
}, (error)=>{
|
|
64
|
+
handleCompletion();
|
|
65
|
+
throw error;
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
// Synchronous method - handle completion immediately
|
|
69
|
+
handleCompletion();
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -46,9 +46,10 @@ export declare class ContractFunctionSimulator {
|
|
|
46
46
|
* @param senderForTags - The address that is used as a tagging sender when emitting private logs. Returned from
|
|
47
47
|
* the `privateGetSenderForTags` oracle.
|
|
48
48
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
49
|
+
* @param jobId - The job ID for staged writes.
|
|
49
50
|
* @returns The result of the execution.
|
|
50
51
|
*/
|
|
51
|
-
run(request: TxExecutionRequest, contractAddress: AztecAddress, selector: FunctionSelector, msgSender: AztecAddress | undefined, anchorBlockHeader: BlockHeader, senderForTags
|
|
52
|
+
run(request: TxExecutionRequest, contractAddress: AztecAddress, selector: FunctionSelector, msgSender: AztecAddress | undefined, anchorBlockHeader: BlockHeader, senderForTags: AztecAddress | undefined, scopes: AztecAddress[] | undefined, jobId: string): Promise<PrivateExecutionResult>;
|
|
52
53
|
/**
|
|
53
54
|
* Runs a utility function.
|
|
54
55
|
* @param call - The function call to execute.
|
|
@@ -58,15 +59,13 @@ export declare class ContractFunctionSimulator {
|
|
|
58
59
|
* accounts if not specified.
|
|
59
60
|
* @returns A return value of the utility function in a form as returned by the simulator (Noir fields)
|
|
60
61
|
*/
|
|
61
|
-
runUtility(call: FunctionCall, authwits: AuthWitness[], anchorBlockHeader: BlockHeader, scopes
|
|
62
|
+
runUtility(call: FunctionCall, authwits: AuthWitness[], anchorBlockHeader: BlockHeader, scopes: AztecAddress[] | undefined, jobId: string): Promise<Fr[]>;
|
|
62
63
|
/**
|
|
63
64
|
* Returns the execution statistics collected during the simulator run.
|
|
64
65
|
* @returns The execution statistics.
|
|
65
66
|
*/
|
|
66
67
|
getStats(): {
|
|
67
|
-
nodeRPCCalls:
|
|
68
|
-
times: number[];
|
|
69
|
-
}>>;
|
|
68
|
+
nodeRPCCalls: import("@aztec/stdlib/tx").NodeStats;
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
71
|
/**
|
|
@@ -76,10 +75,10 @@ export declare class ContractFunctionSimulator {
|
|
|
76
75
|
* (allowing state overrides) and is much faster, while still generating a valid
|
|
77
76
|
* output that can be sent to the node for public simulation
|
|
78
77
|
* @param privateExecutionResult - The result of the private execution.
|
|
79
|
-
* @param nonceGenerator - A nonce generator for note hashes. According to the protocol rules,
|
|
80
|
-
* it can either be the first nullifier in the tx or the hash of the initial tx request if there are none.
|
|
81
78
|
* @param contractStore - A provider for contract data in order to get function names and debug info.
|
|
79
|
+
* @param minRevertibleSideEffectCounterOverride - Optional override for the min revertible side effect counter.
|
|
80
|
+
* Used by TXE to simulate account contract behavior (setting the counter before app execution).
|
|
82
81
|
* @returns The simulated proving result.
|
|
83
82
|
*/
|
|
84
|
-
export declare function generateSimulatedProvingResult(privateExecutionResult: PrivateExecutionResult,
|
|
85
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
export declare function generateSimulatedProvingResult(privateExecutionResult: PrivateExecutionResult, contractStore: ContractStore, minRevertibleSideEffectCounterOverride?: number): Promise<PrivateKernelExecutionProofOutput<PrivateKernelTailCircuitPublicInputs>>;
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQkEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBR3BELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR2pELE9BQU8sRUFDTCxLQUFLLGdCQUFnQixFQU90QixNQUFNLHlCQUF5QixDQUFDO0FBQ2pDLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3RELE9BQU8sRUFBRSxnQkFBZ0IsRUFBZ0IsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFTM0QsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakUsT0FBTyxFQUlMLEtBQUssaUNBQWlDLEVBQ3RDLG9DQUFvQ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FQUFFLENBQUMsQ0F3RGY7SUFHRDs7O09BR0c7SUFDSCxRQUFROztNQVVQO0NBQ0Y7QUFZRDs7Ozs7Ozs7Ozs7R0FXRztBQUNILHdCQUFzQiw4QkFBOEIsQ0FDbEQsc0JBQXNCLEVBQUUsc0JBQXNCLEVBQzlDLGFBQWEsRUFBRSxhQUFhLEVBQzVCLHNDQUFzQyxDQUFDLEVBQUUsTUFBTSxHQUM5QyxPQUFPLENBQUMsaUNBQWlDLENBQUMsb0NBQW9DLENBQUMsQ0FBQyxDQXdObEYifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_function_simulator.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/contract_function_simulator.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EACL,KAAK,gBAAgB,EAOtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAS3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAIL,KAAK,iCAAiC,EACtC,oCAAoC,EAKrC,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,WAAW,EAGX,sBAAsB,EAEtB,kBAAkB,EAGnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AACjG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAU3F;;GAEG;AACH,qBAAa,yBAAyB;IAIlC,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,sBAAsB;IAC9B,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,SAAS;IAdnB,OAAO,CAAC,GAAG,CAAS;IAEpB,YACU,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,EAAE,qBAAqB,EAC5C,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,gBAAgB,EAGpC;IAED
|
|
1
|
+
{"version":3,"file":"contract_function_simulator.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/contract_function_simulator.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAA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C5B,sCAAsC,CAAC,EAAE,MAAM,GAC9C,OAAO,CAAC,iCAAiC,CAAC,oCAAoC,CAAC,CAAC,CAwNlF"}
|
|
@@ -65,9 +65,11 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
|
65
65
|
* @param senderForTags - The address that is used as a tagging sender when emitting private logs. Returned from
|
|
66
66
|
* the `privateGetSenderForTags` oracle.
|
|
67
67
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
68
|
+
* @param jobId - The job ID for staged writes.
|
|
68
69
|
* @returns The result of the execution.
|
|
69
|
-
*/ async run(request, contractAddress, selector, msgSender = AztecAddress.fromField(Fr.MAX_FIELD_VALUE), anchorBlockHeader, senderForTags, scopes) {
|
|
70
|
+
*/ async run(request, contractAddress, selector, msgSender = AztecAddress.fromField(Fr.MAX_FIELD_VALUE), anchorBlockHeader, senderForTags, scopes, jobId) {
|
|
70
71
|
const simulatorSetupTimer = new Timer();
|
|
72
|
+
await this.contractStore.syncPrivateState(contractAddress, selector, (privateSyncCall)=>this.runUtility(privateSyncCall, [], anchorBlockHeader, scopes, jobId));
|
|
71
73
|
await verifyCurrentClassId(contractAddress, this.aztecNode, this.contractStore, anchorBlockHeader);
|
|
72
74
|
const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(contractAddress, selector);
|
|
73
75
|
if (entryPointArtifact.functionType !== FunctionType.PRIVATE) {
|
|
@@ -82,7 +84,9 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
|
82
84
|
const protocolNullifier = await computeProtocolNullifier(await request.toTxRequest().hash());
|
|
83
85
|
const noteCache = new ExecutionNoteCache(protocolNullifier);
|
|
84
86
|
const taggingIndexCache = new ExecutionTaggingIndexCache();
|
|
85
|
-
const privateExecutionOracle = new PrivateExecutionOracle(request.firstCallArgsHash, request.txContext, callContext, anchorBlockHeader,
|
|
87
|
+
const privateExecutionOracle = new PrivateExecutionOracle(request.firstCallArgsHash, request.txContext, callContext, anchorBlockHeader, async (call)=>{
|
|
88
|
+
await this.runUtility(call, [], anchorBlockHeader, scopes, jobId);
|
|
89
|
+
}, request.authWitnesses, request.capsules, HashedValuesCache.create(request.argsOfCalls), noteCache, taggingIndexCache, this.contractStore, this.noteStore, this.keyStore, this.addressStore, this.aztecNode, this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, jobId, 0, startSideEffectCounter, undefined, scopes, senderForTags, this.simulator);
|
|
86
90
|
const setupTime = simulatorSetupTimer.ms();
|
|
87
91
|
try {
|
|
88
92
|
// Note: any nested private function calls are made recursively within this
|
|
@@ -91,8 +95,8 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
|
91
95
|
// within executionResult.nestedExecutionResults).
|
|
92
96
|
const executionResult = await executePrivateFunction(this.simulator, privateExecutionOracle, entryPointArtifact, contractAddress, request.functionSelector);
|
|
93
97
|
const simulatorTeardownTimer = new Timer();
|
|
94
|
-
|
|
95
|
-
const firstNullifierHint =
|
|
98
|
+
noteCache.finish();
|
|
99
|
+
const firstNullifierHint = noteCache.getNonceGenerator();
|
|
96
100
|
const publicCallRequests = collectNested([
|
|
97
101
|
executionResult
|
|
98
102
|
], (r)=>r.publicInputs.publicCallRequests.getActiveItems().map((r)=>r.inner).concat(r.publicInputs.publicTeardownCallRequest.isEmpty() ? [] : [
|
|
@@ -124,13 +128,13 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
|
124
128
|
* @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
|
|
125
129
|
* accounts if not specified.
|
|
126
130
|
* @returns A return value of the utility function in a form as returned by the simulator (Noir fields)
|
|
127
|
-
*/ async runUtility(call, authwits, anchorBlockHeader, scopes) {
|
|
131
|
+
*/ async runUtility(call, authwits, anchorBlockHeader, scopes, jobId) {
|
|
128
132
|
await verifyCurrentClassId(call.to, this.aztecNode, this.contractStore, anchorBlockHeader);
|
|
129
133
|
const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(call.to, call.selector);
|
|
130
134
|
if (entryPointArtifact.functionType !== FunctionType.UTILITY) {
|
|
131
135
|
throw new Error(`Cannot run ${entryPointArtifact.functionType} function as utility`);
|
|
132
136
|
}
|
|
133
|
-
const oracle = new UtilityExecutionOracle(call.to, authwits, [], anchorBlockHeader, this.contractStore, this.noteStore, this.keyStore, this.addressStore, this.aztecNode, this.anchorBlockStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, undefined, scopes);
|
|
137
|
+
const oracle = new UtilityExecutionOracle(call.to, authwits, [], anchorBlockHeader, this.contractStore, this.noteStore, this.keyStore, this.addressStore, this.aztecNode, this.anchorBlockStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, jobId, undefined, scopes);
|
|
134
138
|
try {
|
|
135
139
|
this.log.verbose(`Executing utility function ${entryPointArtifact.name}`, {
|
|
136
140
|
contract: call.to,
|
|
@@ -157,7 +161,15 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
|
|
|
157
161
|
* Returns the execution statistics collected during the simulator run.
|
|
158
162
|
* @returns The execution statistics.
|
|
159
163
|
*/ getStats() {
|
|
160
|
-
const nodeRPCCalls = typeof this.aztecNode.getStats === 'function' ? this.aztecNode.getStats() : {
|
|
164
|
+
const nodeRPCCalls = typeof this.aztecNode.getStats === 'function' ? this.aztecNode.getStats() : {
|
|
165
|
+
perMethod: {},
|
|
166
|
+
roundTrips: {
|
|
167
|
+
roundTrips: 0,
|
|
168
|
+
totalBlockingTime: 0,
|
|
169
|
+
roundTripDurations: [],
|
|
170
|
+
roundTripMethods: []
|
|
171
|
+
}
|
|
172
|
+
};
|
|
161
173
|
return {
|
|
162
174
|
nodeRPCCalls
|
|
163
175
|
};
|
|
@@ -178,11 +190,11 @@ class OrderedSideEffect {
|
|
|
178
190
|
* (allowing state overrides) and is much faster, while still generating a valid
|
|
179
191
|
* output that can be sent to the node for public simulation
|
|
180
192
|
* @param privateExecutionResult - The result of the private execution.
|
|
181
|
-
* @param nonceGenerator - A nonce generator for note hashes. According to the protocol rules,
|
|
182
|
-
* it can either be the first nullifier in the tx or the hash of the initial tx request if there are none.
|
|
183
193
|
* @param contractStore - A provider for contract data in order to get function names and debug info.
|
|
194
|
+
* @param minRevertibleSideEffectCounterOverride - Optional override for the min revertible side effect counter.
|
|
195
|
+
* Used by TXE to simulate account contract behavior (setting the counter before app execution).
|
|
184
196
|
* @returns The simulated proving result.
|
|
185
|
-
*/ export async function generateSimulatedProvingResult(privateExecutionResult,
|
|
197
|
+
*/ export async function generateSimulatedProvingResult(privateExecutionResult, contractStore, minRevertibleSideEffectCounterOverride) {
|
|
186
198
|
const siloedNoteHashes = [];
|
|
187
199
|
const nullifiers = [];
|
|
188
200
|
const taggedPrivateLogs = [];
|
|
@@ -236,12 +248,13 @@ class OrderedSideEffect {
|
|
|
236
248
|
const sortByCounter = (a, b)=>a.counter - b.counter;
|
|
237
249
|
const getEffect = (orderedSideEffect)=>orderedSideEffect.sideEffect;
|
|
238
250
|
const isPrivateOnlyTx = privateExecutionResult.publicFunctionCalldata.length === 0;
|
|
239
|
-
const minRevertibleSideEffectCounter = getFinalMinRevertibleSideEffectCounter(privateExecutionResult);
|
|
251
|
+
const minRevertibleSideEffectCounter = minRevertibleSideEffectCounterOverride ?? getFinalMinRevertibleSideEffectCounter(privateExecutionResult);
|
|
240
252
|
const [nonRevertibleNullifiers, revertibleNullifiers] = splitOrderedSideEffects(nullifiers.sort(sortByCounter), minRevertibleSideEffectCounter);
|
|
241
|
-
|
|
253
|
+
const nonceGenerator = privateExecutionResult.firstNullifier;
|
|
254
|
+
if (nonRevertibleNullifiers.length === 0) {
|
|
255
|
+
nonRevertibleNullifiers.push(nonceGenerator);
|
|
256
|
+
} else if (!nonRevertibleNullifiers[0].equals(nonceGenerator)) {
|
|
242
257
|
throw new Error('The first non revertible nullifier should be equal to the nonce generator. This is a bug!');
|
|
243
|
-
} else {
|
|
244
|
-
nonRevertibleNullifiers.unshift(nonceGenerator);
|
|
245
258
|
}
|
|
246
259
|
if (isPrivateOnlyTx) {
|
|
247
260
|
// We must make the note hashes unique by using the
|
|
@@ -257,11 +270,15 @@ class OrderedSideEffect {
|
|
|
257
270
|
inputsForRollup = new PartialPrivateTailPublicInputsForRollup(accumulatedDataForRollup);
|
|
258
271
|
} else {
|
|
259
272
|
const [nonRevertibleNoteHashes, revertibleNoteHashes] = splitOrderedSideEffects(siloedNoteHashes.sort(sortByCounter), minRevertibleSideEffectCounter);
|
|
273
|
+
const nonRevertibleUniqueNoteHashes = await Promise.all(nonRevertibleNoteHashes.map(async (noteHash, i)=>{
|
|
274
|
+
const nonce = await computeNoteHashNonce(nonceGenerator, i);
|
|
275
|
+
return await computeUniqueNoteHash(nonce, noteHash);
|
|
276
|
+
}));
|
|
260
277
|
const [nonRevertibleL2ToL1Messages, revertibleL2ToL1Messages] = splitOrderedSideEffects(l2ToL1Messages.sort(sortByCounter), minRevertibleSideEffectCounter);
|
|
261
278
|
const [nonRevertibleTaggedPrivateLogs, revertibleTaggedPrivateLogs] = splitOrderedSideEffects(taggedPrivateLogs, minRevertibleSideEffectCounter);
|
|
262
279
|
const [nonRevertibleContractClassLogHashes, revertibleContractClassLogHashes] = splitOrderedSideEffects(contractClassLogsHashes.sort(sortByCounter), minRevertibleSideEffectCounter);
|
|
263
280
|
const [nonRevertiblePublicCallRequests, revertiblePublicCallRequests] = splitOrderedSideEffects(publicCallRequests.sort(sortByCounter), minRevertibleSideEffectCounter);
|
|
264
|
-
const nonRevertibleData = new PrivateToPublicAccumulatedData(padArrayEnd(
|
|
281
|
+
const nonRevertibleData = new PrivateToPublicAccumulatedData(padArrayEnd(nonRevertibleUniqueNoteHashes, Fr.ZERO, MAX_NOTE_HASHES_PER_TX), padArrayEnd(nonRevertibleNullifiers, Fr.ZERO, MAX_NULLIFIERS_PER_TX), padArrayEnd(nonRevertibleL2ToL1Messages, ScopedL2ToL1Message.empty(), MAX_L2_TO_L1_MSGS_PER_TX), padArrayEnd(nonRevertibleTaggedPrivateLogs, PrivateLog.empty(), MAX_PRIVATE_LOGS_PER_TX), padArrayEnd(nonRevertibleContractClassLogHashes, ScopedLogHash.empty(), MAX_CONTRACT_CLASS_LOGS_PER_TX), padArrayEnd(nonRevertiblePublicCallRequests, PublicCallRequest.empty(), MAX_ENQUEUED_CALLS_PER_TX));
|
|
265
282
|
const revertibleData = new PrivateToPublicAccumulatedData(padArrayEnd(revertibleNoteHashes, Fr.ZERO, MAX_NOTE_HASHES_PER_TX), padArrayEnd(revertibleNullifiers, Fr.ZERO, MAX_NULLIFIERS_PER_TX), padArrayEnd(revertibleL2ToL1Messages, ScopedL2ToL1Message.empty(), MAX_L2_TO_L1_MSGS_PER_TX), padArrayEnd(revertibleTaggedPrivateLogs, PrivateLog.empty(), MAX_PRIVATE_LOGS_PER_TX), padArrayEnd(revertibleContractClassLogHashes, ScopedLogHash.empty(), MAX_CONTRACT_CLASS_LOGS_PER_TX), padArrayEnd(revertiblePublicCallRequests, PublicCallRequest.empty(), MAX_ENQUEUED_CALLS_PER_TX));
|
|
266
283
|
gasUsed = meterGasUsed(revertibleData).add(meterGasUsed(nonRevertibleData));
|
|
267
284
|
if (publicTeardownCallRequest) {
|
|
@@ -283,7 +300,7 @@ function splitOrderedSideEffects(effects, minRevertibleSideEffectCounter) {
|
|
|
283
300
|
const revertibleSideEffects = [];
|
|
284
301
|
const nonRevertibleSideEffects = [];
|
|
285
302
|
effects.forEach((effect)=>{
|
|
286
|
-
if (effect.counter < minRevertibleSideEffectCounter) {
|
|
303
|
+
if (minRevertibleSideEffectCounter === 0 || effect.counter < minRevertibleSideEffectCounter) {
|
|
287
304
|
nonRevertibleSideEffects.push(effect.sideEffect);
|
|
288
305
|
} else {
|
|
289
306
|
revertibleSideEffects.push(effect.sideEffect);
|
|
@@ -28,14 +28,17 @@ export declare class ExecutionNoteCache {
|
|
|
28
28
|
*/
|
|
29
29
|
private nullifierMap;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Nullifiers emitted by private calls in this transaction.
|
|
32
|
+
*/
|
|
33
|
+
private emittedNullifiers;
|
|
34
|
+
/**
|
|
35
|
+
* The counter that separates non-revertible side effects (which persist even if the tx reverts) from revertible ones.
|
|
32
36
|
*/
|
|
33
|
-
private allNullifiers;
|
|
34
37
|
private minRevertibleSideEffectCounter;
|
|
35
38
|
private inRevertiblePhase;
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
40
|
+
* Whether the protocol nullifier was used for nonce generation.
|
|
41
|
+
* We don't need to use the protocol nullifier if a non-revertible nullifier is emitted.
|
|
39
42
|
*/
|
|
40
43
|
private usedProtocolNullifierForNonces;
|
|
41
44
|
constructor(protocolNullifier: Fr);
|
|
@@ -45,9 +48,7 @@ export declare class ExecutionNoteCache {
|
|
|
45
48
|
*/
|
|
46
49
|
setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
|
|
47
50
|
isSideEffectCounterRevertible(sideEffectCounter: number): boolean;
|
|
48
|
-
finish():
|
|
49
|
-
usedProtocolNullifierForNonces: boolean;
|
|
50
|
-
};
|
|
51
|
+
finish(): void;
|
|
51
52
|
/**
|
|
52
53
|
* Add a new note to cache.
|
|
53
54
|
* @param note - New note created during execution.
|
|
@@ -88,8 +89,16 @@ export declare class ExecutionNoteCache {
|
|
|
88
89
|
*/
|
|
89
90
|
getNullifiers(contractAddress: AztecAddress): Set<bigint>;
|
|
90
91
|
getAllNotes(): PendingNote[];
|
|
92
|
+
/**
|
|
93
|
+
* @returns All nullifiers emitted by private calls in this transaction.
|
|
94
|
+
*/
|
|
95
|
+
getEmittedNullifiers(): Fr[];
|
|
96
|
+
/**
|
|
97
|
+
* @returns All nullifiers emitted by private calls in this transaction. If the protocol nullifier was used as the
|
|
98
|
+
* nonce generator, it is injected as the first nullifier.
|
|
99
|
+
*/
|
|
91
100
|
getAllNullifiers(): Fr[];
|
|
92
|
-
|
|
101
|
+
getNonceGenerator(): Fr;
|
|
93
102
|
}
|
|
94
103
|
export {};
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
104
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX25vdGVfY2FjaGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3IvZXhlY3V0aW9uX25vdGVfY2FjaGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBR2hFLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXZELFVBQVUsV0FBVztJQUNuQixJQUFJLEVBQUUsUUFBUSxDQUFDO0lBQ2YsT0FBTyxFQUFFLE1BQU0sQ0FBQztJQUNoQixzQkFBc0IsRUFBRSxFQUFFLENBQUM7Q0FDNUI7QUFFRDs7R0FFRztBQUNILHFCQUFhLGtCQUFrQjs7SUFvQ2pCLE9BQU8sQ0FBQyxRQUFRLENBQUMsaUJBQWlCO0lBbkM5Qzs7O09BR0c7SUFDSCxPQUFPLENBQUMsS0FBSyxDQUFxQjtJQUNsQzs7T0FFRztJQUNILE9BQU8sQ0FBQyxPQUFPLENBQXlDO0lBRXhEOzs7O09BSUc7SUFDSCxPQUFPLENBQUMsWUFBWSxDQUF1QztJQUUzRDs7T0FFRztJQUNILE9BQU8sQ0FBQyxpQkFBaUIsQ0FBMEI7SUFFbkQ7O09BRUc7SUFDSCxPQUFPLENBQUMsOEJBQThCLENBQUs7SUFFM0MsT0FBTyxDQUFDLGlCQUF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UFBRSxFQUFFLENBTXZCO0lBRUQsaUJBQWlCLElBQUksRUFBRSxDQUV0QjtDQWFGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_note_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAkB;;
|
|
1
|
+
{"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_note_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAkB;;IAoCjB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAnC9C;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAqB;IAClC;;OAEG;IACH,OAAO,CAAC,OAAO,CAAyC;IAExD;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAAuC;IAE3D;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAA0B;IAEnD;;OAEG;IACH,OAAO,CAAC,8BAA8B,CAAK;IAE3C,OAAO,CAAC,iBAAi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