@aztec/pxe 0.0.1-commit.c7c42ec → 0.0.1-commit.d1f2d6c
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 +10 -4
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +66 -18
- package/dest/config/index.d.ts +3 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +17 -0
- 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 -19
- 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/index.d.ts +2 -2
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -1
- 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 +14 -10
- 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 +6 -6
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +8 -8
- package/dest/contract_function_simulator/oracle/oracle.d.ts +9 -7
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +41 -30
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +8 -13
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +21 -11
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +16 -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 +25 -38
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +26 -16
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +71 -71
- package/dest/debug/pxe_debug_utils.d.ts +1 -1
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +2 -1
- 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 +22 -13
- package/dest/notes/note_service.d.ts +5 -4
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +31 -34
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +4 -3
- 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 +71 -90
- 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 +45 -56
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +244 -263
- package/dest/storage/note_store/stored_note.d.ts +16 -0
- package/dest/storage/note_store/stored_note.d.ts.map +1 -0
- package/dest/storage/note_store/stored_note.js +43 -0
- package/dest/storage/private_event_store/private_event_store.d.ts +47 -7
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +203 -68
- package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
- package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
- package/dest/storage/private_event_store/stored_private_event.js +56 -0
- 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/get_all_logs_by_tags.d.ts +24 -0
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
- package/dest/tagging/get_all_logs_by_tags.js +46 -0
- package/dest/tagging/index.d.ts +3 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +2 -10
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +3 -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 +8 -8
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +3 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +5 -2
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +3 -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 +5 -8
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +5 -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 +10 -5
- package/package.json +18 -18
- package/src/block_synchronizer/block_synchronizer.ts +77 -20
- package/src/config/index.ts +14 -0
- 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 +39 -21
- package/src/contract_function_simulator/execution_note_cache.ts +44 -25
- package/src/contract_function_simulator/index.ts +1 -1
- 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 +19 -9
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +10 -10
- package/src/contract_function_simulator/oracle/oracle.ts +54 -39
- package/src/contract_function_simulator/oracle/private_execution.ts +30 -20
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +44 -42
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +89 -75
- package/src/debug/pxe_debug_utils.ts +2 -1
- 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 +28 -9
- package/src/notes/note_service.ts +38 -40
- package/src/oracle_version.ts +4 -3
- 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 +125 -119
- 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 +286 -317
- package/src/storage/note_store/stored_note.ts +48 -0
- package/src/storage/private_event_store/private_event_store.ts +277 -76
- package/src/storage/private_event_store/stored_private_event.ts +73 -0
- 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/get_all_logs_by_tags.ts +68 -0
- package/src/tagging/index.ts +2 -11
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +21 -7
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +7 -1
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +10 -7
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +5 -13
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +16 -4
- 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/dest/tree_membership/tree_membership_service.d.ts +0 -52
- package/dest/tree_membership/tree_membership_service.d.ts.map +0 -1
- package/dest/tree_membership/tree_membership_service.js +0 -84
- 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
- package/src/tree_membership/tree_membership_service.ts +0 -112
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
2
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
+
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Interface that stores must implement to support staged writes.
|
|
7
|
+
*/
|
|
8
|
+
export interface StagedStore {
|
|
9
|
+
/** Unique name identifying this store (used for tracking staged stores from JobCoordinator) */
|
|
10
|
+
readonly storeName: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Commits staged data to main storage.
|
|
14
|
+
* Should be called within a transaction for atomicity.
|
|
15
|
+
*
|
|
16
|
+
* @param jobId - The job identifier
|
|
17
|
+
*/
|
|
18
|
+
commit(jobId: string): Promise<void>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Discards staged data without committing.
|
|
22
|
+
* Called on abort.
|
|
23
|
+
*
|
|
24
|
+
* @param jobId - The job identifier
|
|
25
|
+
*/
|
|
26
|
+
discardStaged(jobId: string): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* JobCoordinator manages job lifecycle and provides crash resilience for PXE operations.
|
|
31
|
+
*
|
|
32
|
+
* It uses a staged writes pattern:
|
|
33
|
+
* 1. When a job begins, a unique job ID is created
|
|
34
|
+
* 2. During the job, all writes go to staging (keyed by job ID)
|
|
35
|
+
* 3. On commit, staging is promoted to main storage
|
|
36
|
+
* 4. On abort, staged data is discarded
|
|
37
|
+
*
|
|
38
|
+
* Note: PXE should only rely on a single JobCoordinator instance, so it can eventually
|
|
39
|
+
* orchestrate concurrent jobs. Right now it doesn't make a difference because we're
|
|
40
|
+
* using a job queue with concurrency=1.
|
|
41
|
+
*/
|
|
42
|
+
export class JobCoordinator {
|
|
43
|
+
private readonly log = createLogger('pxe:job_coordinator');
|
|
44
|
+
|
|
45
|
+
/** The underlying KV store */
|
|
46
|
+
kvStore: AztecAsyncKVStore;
|
|
47
|
+
|
|
48
|
+
#currentJobId: string | undefined;
|
|
49
|
+
#stores: Map<string, StagedStore> = new Map();
|
|
50
|
+
|
|
51
|
+
constructor(kvStore: AztecAsyncKVStore) {
|
|
52
|
+
this.kvStore = kvStore;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Registers a staged store.
|
|
57
|
+
* Must be called during initialization for all stores that need staging support.
|
|
58
|
+
*/
|
|
59
|
+
registerStore(store: StagedStore): void {
|
|
60
|
+
if (this.#stores.has(store.storeName)) {
|
|
61
|
+
throw new Error(`Store "${store.storeName}" is already registered`);
|
|
62
|
+
}
|
|
63
|
+
this.#stores.set(store.storeName, store);
|
|
64
|
+
this.log.debug(`Registered staged store: ${store.storeName}`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Registers multiple staged stores.
|
|
69
|
+
*/
|
|
70
|
+
registerStores(stores: StagedStore[]): void {
|
|
71
|
+
for (const store of stores) {
|
|
72
|
+
this.registerStore(store);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Begins a new job and returns a job ID for staged writes.
|
|
78
|
+
*
|
|
79
|
+
* @returns Job ID to pass to store operations
|
|
80
|
+
*/
|
|
81
|
+
beginJob(): string {
|
|
82
|
+
if (this.#currentJobId) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`Cannot begin job: job ${this.#currentJobId} is already in progress. ` +
|
|
85
|
+
`This should not happen - ensure jobs are properly committed or aborted.`,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const jobId = randomBytes(8).toString('hex');
|
|
90
|
+
this.#currentJobId = jobId;
|
|
91
|
+
|
|
92
|
+
this.log.debug(`Started job ${jobId}`);
|
|
93
|
+
return jobId;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Commits a job by promoting all staged data to main storage.
|
|
98
|
+
*
|
|
99
|
+
* @param jobId - The job ID returned from beginJob
|
|
100
|
+
*/
|
|
101
|
+
async commitJob(jobId: string): Promise<void> {
|
|
102
|
+
if (!this.#currentJobId || this.#currentJobId !== jobId) {
|
|
103
|
+
throw new Error(
|
|
104
|
+
`Cannot commit job ${jobId}: no matching job in progress. ` + `Current job: ${this.#currentJobId ?? 'none'}`,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
this.log.debug(`Committing job ${jobId}`);
|
|
109
|
+
|
|
110
|
+
// Commit all stores atomically in a single transaction.
|
|
111
|
+
// Each store's commit is a no-op if it has no staged data (but that's up to each store to handle).
|
|
112
|
+
await this.kvStore.transactionAsync(async () => {
|
|
113
|
+
for (const store of this.#stores.values()) {
|
|
114
|
+
await store.commit(jobId);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
this.#currentJobId = undefined;
|
|
119
|
+
this.log.debug(`Job ${jobId} committed successfully`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Aborts a job by discarding all staged data.
|
|
124
|
+
*
|
|
125
|
+
* @param jobId - The job ID returned from beginJob
|
|
126
|
+
*/
|
|
127
|
+
async abortJob(jobId: string): Promise<void> {
|
|
128
|
+
if (!this.#currentJobId || this.#currentJobId !== jobId) {
|
|
129
|
+
// Job may have already been aborted or never started properly
|
|
130
|
+
this.log.warn(`Abort called for job ${jobId} but current job is ${this.#currentJobId ?? 'none'}`);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
this.log.debug(`Aborting job ${jobId}`);
|
|
134
|
+
|
|
135
|
+
for (const store of this.#stores.values()) {
|
|
136
|
+
await store.discardStaged(jobId);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
this.#currentJobId = undefined;
|
|
140
|
+
this.log.debug(`Job ${jobId} aborted`);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Checks if there's a job currently in progress.
|
|
145
|
+
*/
|
|
146
|
+
hasJobInProgress(): boolean {
|
|
147
|
+
return this.#currentJobId !== undefined;
|
|
148
|
+
}
|
|
149
|
+
}
|
package/src/logs/log_service.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import type { KeyStore } from '@aztec/key-store';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import { L2BlockHash } from '@aztec/stdlib/block';
|
|
5
6
|
import type { CompleteAddress } from '@aztec/stdlib/contract';
|
|
6
7
|
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
|
|
7
8
|
import { DirectionalAppTaggingSecret, PendingTaggedLog, SiloedTag, Tag, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
@@ -13,7 +14,11 @@ import { AnchorBlockStore } from '../storage/anchor_block_store/anchor_block_sto
|
|
|
13
14
|
import { CapsuleStore } from '../storage/capsule_store/capsule_store.js';
|
|
14
15
|
import type { RecipientTaggingStore } from '../storage/tagging_store/recipient_tagging_store.js';
|
|
15
16
|
import type { SenderAddressBookStore } from '../storage/tagging_store/sender_address_book_store.js';
|
|
16
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
getAllPrivateLogsByTags,
|
|
19
|
+
getAllPublicLogsByTagsFromContract,
|
|
20
|
+
loadPrivateLogsForSenderRecipientPair,
|
|
21
|
+
} from '../tagging/index.js';
|
|
17
22
|
|
|
18
23
|
export class LogService {
|
|
19
24
|
private log = createLogger('log_service');
|
|
@@ -26,6 +31,7 @@ export class LogService {
|
|
|
26
31
|
private readonly recipientTaggingStore: RecipientTaggingStore,
|
|
27
32
|
private readonly senderAddressBookStore: SenderAddressBookStore,
|
|
28
33
|
private readonly addressStore: AddressStore,
|
|
34
|
+
private readonly jobId: string,
|
|
29
35
|
) {}
|
|
30
36
|
|
|
31
37
|
public async bulkRetrieveLogs(logRetrievalRequests: LogRetrievalRequest[]): Promise<(LogRetrievalResponse | null)[]> {
|
|
@@ -48,10 +54,17 @@ export class LogService {
|
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
async #getPublicLogByTag(tag: Tag, contractAddress: AztecAddress): Promise<LogRetrievalResponse | null> {
|
|
51
|
-
const
|
|
52
|
-
const
|
|
57
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
58
|
+
const anchorBlockHash = L2BlockHash.fromField(await anchorBlockHeader.hash());
|
|
59
|
+
const allLogsPerTag = await getAllPublicLogsByTagsFromContract(
|
|
60
|
+
this.aztecNode,
|
|
61
|
+
contractAddress,
|
|
62
|
+
[tag],
|
|
63
|
+
anchorBlockHash,
|
|
64
|
+
);
|
|
65
|
+
const logsForTag = allLogsPerTag[0];
|
|
53
66
|
|
|
54
|
-
if (logsForTag.length
|
|
67
|
+
if (logsForTag.length === 0) {
|
|
55
68
|
return null;
|
|
56
69
|
} else if (logsForTag.length > 1) {
|
|
57
70
|
// TODO(#11627): handle this case
|
|
@@ -71,10 +84,12 @@ export class LogService {
|
|
|
71
84
|
}
|
|
72
85
|
|
|
73
86
|
async #getPrivateLogByTag(siloedTag: SiloedTag): Promise<LogRetrievalResponse | null> {
|
|
74
|
-
const
|
|
75
|
-
const
|
|
87
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
88
|
+
const anchorBlockHash = L2BlockHash.fromField(await anchorBlockHeader.hash());
|
|
89
|
+
const allLogsPerTag = await getAllPrivateLogsByTags(this.aztecNode, [siloedTag], anchorBlockHash);
|
|
90
|
+
const logsForTag = allLogsPerTag[0];
|
|
76
91
|
|
|
77
|
-
if (logsForTag.length
|
|
92
|
+
if (logsForTag.length === 0) {
|
|
78
93
|
return null;
|
|
79
94
|
} else if (logsForTag.length > 1) {
|
|
80
95
|
// TODO(#11627): handle this case
|
|
@@ -101,7 +116,9 @@ export class LogService {
|
|
|
101
116
|
this.log.verbose('Searching for tagged logs', { contract: contractAddress });
|
|
102
117
|
|
|
103
118
|
// We only load logs from block up to and including the anchor block number
|
|
104
|
-
const
|
|
119
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
120
|
+
const anchorBlockNumber = anchorBlockHeader.getBlockNumber();
|
|
121
|
+
const anchorBlockHash = L2BlockHash.fromField(await anchorBlockHeader.hash());
|
|
105
122
|
|
|
106
123
|
// Determine recipients: use scopes if provided, otherwise get all accounts
|
|
107
124
|
const recipients = scopes && scopes.length > 0 ? scopes : await this.keyStore.getAccounts();
|
|
@@ -122,6 +139,8 @@ export class LogService {
|
|
|
122
139
|
this.aztecNode,
|
|
123
140
|
this.recipientTaggingStore,
|
|
124
141
|
anchorBlockNumber,
|
|
142
|
+
anchorBlockHash,
|
|
143
|
+
this.jobId,
|
|
125
144
|
),
|
|
126
145
|
),
|
|
127
146
|
);
|
|
@@ -186,7 +205,7 @@ export class LogService {
|
|
|
186
205
|
});
|
|
187
206
|
|
|
188
207
|
// TODO: This looks like it could belong more at the oracle interface level
|
|
189
|
-
return this.capsuleStore.appendToCapsuleArray(contractAddress, capsuleArrayBaseSlot, pendingTaggedLogs);
|
|
208
|
+
return this.capsuleStore.appendToCapsuleArray(contractAddress, capsuleArrayBaseSlot, pendingTaggedLogs, this.jobId);
|
|
190
209
|
}
|
|
191
210
|
|
|
192
211
|
async #getCompleteAddress(account: AztecAddress): Promise<CompleteAddress> {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
3
|
import type { DataInBlock } from '@aztec/stdlib/block';
|
|
4
|
+
import { L2BlockHash } from '@aztec/stdlib/block';
|
|
4
5
|
import { computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
|
|
5
6
|
import { type AztecNode, MAX_RPC_LEN } from '@aztec/stdlib/interfaces/client';
|
|
6
7
|
import { Note, NoteDao, NoteStatus } from '@aztec/stdlib/note';
|
|
@@ -15,6 +16,7 @@ export class NoteService {
|
|
|
15
16
|
private readonly noteStore: NoteStore,
|
|
16
17
|
private readonly aztecNode: AztecNode,
|
|
17
18
|
private readonly anchorBlockStore: AnchorBlockStore,
|
|
19
|
+
private readonly jobId: string,
|
|
18
20
|
) {}
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -33,15 +35,18 @@ export class NoteService {
|
|
|
33
35
|
status: NoteStatus,
|
|
34
36
|
scopes?: AztecAddress[],
|
|
35
37
|
) {
|
|
36
|
-
const noteDaos = await this.noteStore.getNotes(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
const noteDaos = await this.noteStore.getNotes(
|
|
39
|
+
{
|
|
40
|
+
contractAddress,
|
|
41
|
+
owner,
|
|
42
|
+
storageSlot,
|
|
43
|
+
status,
|
|
44
|
+
scopes,
|
|
45
|
+
},
|
|
46
|
+
this.jobId,
|
|
47
|
+
);
|
|
43
48
|
return noteDaos.map(
|
|
44
|
-
({ contractAddress, owner, storageSlot, randomness, noteNonce, note, noteHash, siloedNullifier
|
|
49
|
+
({ contractAddress, owner, storageSlot, randomness, noteNonce, note, noteHash, siloedNullifier }) => ({
|
|
45
50
|
contractAddress,
|
|
46
51
|
owner,
|
|
47
52
|
storageSlot,
|
|
@@ -49,9 +54,8 @@ export class NoteService {
|
|
|
49
54
|
noteNonce,
|
|
50
55
|
note,
|
|
51
56
|
noteHash,
|
|
57
|
+
isPending: false, // Note service deals only with settled notes
|
|
52
58
|
siloedNullifier,
|
|
53
|
-
// PXE can use this index to get full MembershipWitness
|
|
54
|
-
index,
|
|
55
59
|
}),
|
|
56
60
|
);
|
|
57
61
|
}
|
|
@@ -69,9 +73,9 @@ export class NoteService {
|
|
|
69
73
|
* @param contractAddress - The contract whose notes should be checked and nullified.
|
|
70
74
|
*/
|
|
71
75
|
public async syncNoteNullifiers(contractAddress: AztecAddress): Promise<void> {
|
|
72
|
-
const
|
|
76
|
+
const anchorBlockHash = L2BlockHash.fromField(await (await this.anchorBlockStore.getBlockHeader()).hash());
|
|
73
77
|
|
|
74
|
-
const contractNotes = await this.noteStore.getNotes({ contractAddress });
|
|
78
|
+
const contractNotes = await this.noteStore.getNotes({ contractAddress }, this.jobId);
|
|
75
79
|
|
|
76
80
|
if (contractNotes.length === 0) {
|
|
77
81
|
return;
|
|
@@ -92,7 +96,7 @@ export class NoteService {
|
|
|
92
96
|
const nullifierIndexes = (
|
|
93
97
|
await Promise.all(
|
|
94
98
|
nullifierBatches.map(batch =>
|
|
95
|
-
this.aztecNode.findLeavesIndexes(
|
|
99
|
+
this.aztecNode.findLeavesIndexes(anchorBlockHash, MerkleTreeId.NULLIFIER_TREE, batch),
|
|
96
100
|
),
|
|
97
101
|
)
|
|
98
102
|
).flat();
|
|
@@ -105,10 +109,10 @@ export class NoteService {
|
|
|
105
109
|
})
|
|
106
110
|
.filter(nullifier => nullifier !== undefined) as DataInBlock<Fr>[];
|
|
107
111
|
|
|
108
|
-
await this.noteStore.applyNullifiers(foundNullifiers);
|
|
112
|
+
await this.noteStore.applyNullifiers(foundNullifiers, this.jobId);
|
|
109
113
|
}
|
|
110
114
|
|
|
111
|
-
public async
|
|
115
|
+
public async storeNote(
|
|
112
116
|
contractAddress: AztecAddress,
|
|
113
117
|
owner: AztecAddress,
|
|
114
118
|
storageSlot: Fr,
|
|
@@ -139,41 +143,33 @@ export class NoteService {
|
|
|
139
143
|
// number which *should* be recent enough to be available, even for non-archive nodes.
|
|
140
144
|
// Also note that the note should never be ahead of the synced block here since `fetchTaggedLogs` only processes
|
|
141
145
|
// logs up to the synced block making this only an additional safety check.
|
|
142
|
-
const
|
|
146
|
+
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
147
|
+
const anchorBlockNumber = anchorBlockHeader.getBlockNumber();
|
|
148
|
+
const anchorBlockHash = L2BlockHash.fromField(await anchorBlockHeader.hash());
|
|
143
149
|
|
|
144
150
|
// By computing siloed and unique note hashes ourselves we prevent contracts from interfering with the note storage
|
|
145
151
|
// of other contracts, which would constitute a security breach.
|
|
146
152
|
const uniqueNoteHash = await computeUniqueNoteHash(noteNonce, await siloNoteHash(contractAddress, noteHash));
|
|
147
153
|
const siloedNullifier = await siloNullifier(contractAddress, nullifier);
|
|
148
154
|
|
|
149
|
-
const txEffect = await
|
|
155
|
+
const [txEffect, [nullifierIndex]] = await Promise.all([
|
|
156
|
+
this.aztecNode.getTxEffect(txHash),
|
|
157
|
+
this.aztecNode.findLeavesIndexes(anchorBlockHash, MerkleTreeId.NULLIFIER_TREE, [siloedNullifier]),
|
|
158
|
+
]);
|
|
150
159
|
if (!txEffect) {
|
|
151
160
|
throw new Error(`Could not find tx effect for tx hash ${txHash}`);
|
|
152
161
|
}
|
|
153
162
|
|
|
154
|
-
if (txEffect.l2BlockNumber >
|
|
155
|
-
throw new Error(`Could not find tx effect for tx hash ${txHash} as of block number ${
|
|
163
|
+
if (txEffect.l2BlockNumber > anchorBlockNumber) {
|
|
164
|
+
throw new Error(`Could not find tx effect for tx hash ${txHash} as of block number ${anchorBlockNumber}`);
|
|
156
165
|
}
|
|
157
166
|
|
|
158
|
-
|
|
159
|
-
|
|
167
|
+
// Find the index of the note hash in the noteHashes array to determine note ordering within the tx
|
|
168
|
+
const noteIndexInTx = txEffect.data.noteHashes.findIndex(nh => nh.equals(uniqueNoteHash));
|
|
169
|
+
if (noteIndexInTx === -1) {
|
|
160
170
|
throw new Error(`Note hash ${noteHash} (uniqued as ${uniqueNoteHash}) is not present in tx ${txHash}`);
|
|
161
171
|
}
|
|
162
172
|
|
|
163
|
-
// We store notes by their index in the global note hash tree, which has the convenient side effect of validating
|
|
164
|
-
// note existence in said tree. We concurrently also check if the note's nullifier exists, performing all node
|
|
165
|
-
// queries in a single round-trip.
|
|
166
|
-
const [[uniqueNoteHashTreeIndexInBlock], [nullifierIndex]] = await Promise.all([
|
|
167
|
-
this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NOTE_HASH_TREE, [uniqueNoteHash]),
|
|
168
|
-
this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NULLIFIER_TREE, [siloedNullifier]),
|
|
169
|
-
]);
|
|
170
|
-
|
|
171
|
-
if (uniqueNoteHashTreeIndexInBlock === undefined) {
|
|
172
|
-
throw new Error(
|
|
173
|
-
`Note hash ${noteHash} (uniqued as ${uniqueNoteHash}) is not present on the tree at block ${syncedBlockNumber} (from tx ${txHash})`,
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
173
|
const noteDao = new NoteDao(
|
|
178
174
|
new Note(content),
|
|
179
175
|
contractAddress,
|
|
@@ -184,17 +180,19 @@ export class NoteService {
|
|
|
184
180
|
noteHash,
|
|
185
181
|
siloedNullifier,
|
|
186
182
|
txHash,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
txEffect.l2BlockNumber,
|
|
184
|
+
txEffect.l2BlockHash.toString(),
|
|
185
|
+
txEffect.txIndexInBlock,
|
|
186
|
+
noteIndexInTx,
|
|
190
187
|
);
|
|
191
188
|
|
|
192
189
|
// The note was found by `recipient`, so we use that as the scope when storing the note.
|
|
193
|
-
await this.noteStore.addNotes([noteDao], recipient);
|
|
190
|
+
await this.noteStore.addNotes([noteDao], recipient, this.jobId);
|
|
194
191
|
|
|
195
192
|
if (nullifierIndex !== undefined) {
|
|
193
|
+
// We found nullifier index which implies that the note has already been nullified.
|
|
196
194
|
const { data: _, ...blockHashAndNum } = nullifierIndex;
|
|
197
|
-
await this.noteStore.applyNullifiers([{ data: siloedNullifier, ...blockHashAndNum }]);
|
|
195
|
+
await this.noteStore.applyNullifiers([{ data: siloedNullifier, ...blockHashAndNum }], this.jobId);
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
}
|
package/src/oracle_version.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
///
|
|
5
5
|
/// @dev Whenever a contract function or Noir test is run, the `utilityAssertCompatibleOracleVersion` oracle is called
|
|
6
6
|
/// and if the oracle version is incompatible an error is thrown.
|
|
7
|
-
export const ORACLE_VERSION =
|
|
7
|
+
export const ORACLE_VERSION = 8;
|
|
8
8
|
|
|
9
9
|
/// This hash is computed as by hashing the Oracle interface and it is used to detect when the Oracle interface changes,
|
|
10
|
-
/// which in turn implies that you need to update the ORACLE_VERSION constant
|
|
11
|
-
|
|
10
|
+
/// which in turn implies that you need to update the ORACLE_VERSION constant in this file and in
|
|
11
|
+
/// `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
|
|
12
|
+
export const ORACLE_INTERFACE_HASH = 'f13e672b47b84b54c43610e22559dd16fb12a74983af8b5a87a0d45dff31b330';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './private_kernel_reset_private_inputs_builder.js';
|
|
2
2
|
export * from './compute_tx_include_by_timestamp.js';
|
|
@@ -138,7 +138,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
async build(oracle: PrivateKernelOracle
|
|
141
|
+
async build(oracle: PrivateKernelOracle) {
|
|
142
142
|
if (privateKernelResetDimensionNames.every(name => !this.requestedDimensions[name])) {
|
|
143
143
|
throw new Error('Reset is not required.');
|
|
144
144
|
}
|
|
@@ -157,16 +157,6 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
157
157
|
allowRemainder,
|
|
158
158
|
);
|
|
159
159
|
|
|
160
|
-
const previousVkMembershipWitness = await oracle.getVkMembershipWitness(
|
|
161
|
-
this.previousKernelOutput.verificationKey.keyAsFields,
|
|
162
|
-
);
|
|
163
|
-
const vkData = new VkData(
|
|
164
|
-
this.previousKernelOutput.verificationKey,
|
|
165
|
-
Number(previousVkMembershipWitness.leafIndex),
|
|
166
|
-
previousVkMembershipWitness.siblingPath,
|
|
167
|
-
);
|
|
168
|
-
const previousKernelData = new PrivateKernelData(this.previousKernelOutput.publicInputs, vkData);
|
|
169
|
-
|
|
170
160
|
this.reduceReadRequestActions(
|
|
171
161
|
this.noteHashResetActions,
|
|
172
162
|
dimensions.NOTE_HASH_PENDING_READ,
|
|
@@ -178,30 +168,51 @@ export class PrivateKernelResetPrivateInputsBuilder {
|
|
|
178
168
|
dimensions.NULLIFIER_SETTLED_READ,
|
|
179
169
|
);
|
|
180
170
|
|
|
181
|
-
//
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
171
|
+
// Execute all the expensive node querying operations in parallel.
|
|
172
|
+
const [previousVkMembershipWitness, noteHashReadRequestHints, nullifierReadRequestHints, keyValidationHints] =
|
|
173
|
+
await Promise.all([
|
|
174
|
+
oracle.getVkMembershipWitness(this.previousKernelOutput.verificationKey.keyAsFields),
|
|
175
|
+
buildNoteHashReadRequestHintsFromResetActions<
|
|
176
|
+
typeof MAX_NOTE_HASH_READ_REQUESTS_PER_TX,
|
|
177
|
+
typeof MAX_NOTE_HASH_READ_REQUESTS_PER_TX
|
|
178
|
+
>(
|
|
189
179
|
oracle,
|
|
190
180
|
this.previousKernel.validationRequests.noteHashReadRequests,
|
|
191
181
|
this.previousKernel.end.noteHashes,
|
|
192
182
|
this.noteHashResetActions,
|
|
193
|
-
noteHashLeafIndexMap,
|
|
194
183
|
),
|
|
195
|
-
|
|
184
|
+
buildNullifierReadRequestHintsFromResetActions<
|
|
185
|
+
typeof MAX_NULLIFIER_READ_REQUESTS_PER_TX,
|
|
186
|
+
typeof MAX_NULLIFIER_READ_REQUESTS_PER_TX
|
|
187
|
+
>(
|
|
196
188
|
{ getNullifierMembershipWitness: getNullifierMembershipWitnessResolver(oracle) },
|
|
197
189
|
this.previousKernel.validationRequests.nullifierReadRequests,
|
|
198
190
|
this.nullifierResetActions,
|
|
199
191
|
),
|
|
200
|
-
|
|
192
|
+
getMasterSecretKeysAndAppKeyGenerators(
|
|
201
193
|
this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators,
|
|
202
194
|
dimensions.KEY_VALIDATION,
|
|
203
195
|
oracle,
|
|
204
196
|
),
|
|
197
|
+
]);
|
|
198
|
+
|
|
199
|
+
const vkData = new VkData(
|
|
200
|
+
this.previousKernelOutput.verificationKey,
|
|
201
|
+
Number(previousVkMembershipWitness.leafIndex),
|
|
202
|
+
previousVkMembershipWitness.siblingPath,
|
|
203
|
+
);
|
|
204
|
+
const previousKernelData = new PrivateKernelData(this.previousKernelOutput.publicInputs, vkData);
|
|
205
|
+
|
|
206
|
+
// TODO: Enable padding when we have a better idea what are the final amounts we should pad to.
|
|
207
|
+
const paddedSideEffects = PaddedSideEffects.empty();
|
|
208
|
+
|
|
209
|
+
return new PrivateKernelResetCircuitPrivateInputs(
|
|
210
|
+
previousKernelData,
|
|
211
|
+
paddedSideEffects,
|
|
212
|
+
new PrivateKernelResetHints(
|
|
213
|
+
noteHashReadRequestHints,
|
|
214
|
+
nullifierReadRequestHints,
|
|
215
|
+
keyValidationHints,
|
|
205
216
|
this.transientDataSquashingHints,
|
|
206
217
|
),
|
|
207
218
|
dimensions,
|
|
@@ -28,13 +28,12 @@ import {
|
|
|
28
28
|
type PrivateCallExecutionResult,
|
|
29
29
|
type PrivateExecutionResult,
|
|
30
30
|
TxRequest,
|
|
31
|
-
collectNoteHashLeafIndexMap,
|
|
32
31
|
collectNoteHashNullifierCounterMap,
|
|
33
32
|
getFinalMinRevertibleSideEffectCounter,
|
|
34
33
|
} from '@aztec/stdlib/tx';
|
|
35
34
|
import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks';
|
|
36
35
|
|
|
37
|
-
import { PrivateKernelResetPrivateInputsBuilder } from './hints/
|
|
36
|
+
import { PrivateKernelResetPrivateInputsBuilder } from './hints/private_kernel_reset_private_inputs_builder.js';
|
|
38
37
|
import type { PrivateKernelOracle } from './private_kernel_oracle.js';
|
|
39
38
|
|
|
40
39
|
const NULL_SIMULATE_OUTPUT: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs> = {
|
|
@@ -101,7 +100,6 @@ export class PrivateKernelExecutionProver {
|
|
|
101
100
|
|
|
102
101
|
const executionSteps: PrivateExecutionStep[] = [];
|
|
103
102
|
|
|
104
|
-
const noteHashLeafIndexMap = collectNoteHashLeafIndexMap(executionResult);
|
|
105
103
|
const noteHashNullifierCounterMap = collectNoteHashNullifierCounterMap(executionResult);
|
|
106
104
|
const minRevertibleSideEffectCounter = getFinalMinRevertibleSideEffectCounter(executionResult);
|
|
107
105
|
const splitCounter = isPrivateOnlyTx ? 0 : minRevertibleSideEffectCounter;
|
|
@@ -116,7 +114,7 @@ export class PrivateKernelExecutionProver {
|
|
|
116
114
|
);
|
|
117
115
|
while (resetBuilder.needsReset()) {
|
|
118
116
|
const witgenTimer = new Timer();
|
|
119
|
-
const privateInputs = await resetBuilder.build(this.oracle
|
|
117
|
+
const privateInputs = await resetBuilder.build(this.oracle);
|
|
120
118
|
output = generateWitnesses
|
|
121
119
|
? await this.proofCreator.generateResetOutput(privateInputs)
|
|
122
120
|
: await this.proofCreator.simulateReset(privateInputs);
|
|
@@ -224,7 +222,7 @@ export class PrivateKernelExecutionProver {
|
|
|
224
222
|
);
|
|
225
223
|
while (resetBuilder.needsReset()) {
|
|
226
224
|
const witgenTimer = new Timer();
|
|
227
|
-
const privateInputs = await resetBuilder.build(this.oracle
|
|
225
|
+
const privateInputs = await resetBuilder.build(this.oracle);
|
|
228
226
|
output = generateWitnesses
|
|
229
227
|
? await this.proofCreator.generateResetOutput(privateInputs)
|
|
230
228
|
: await this.proofCreator.simulateReset(privateInputs);
|