@aztec/pxe 0.0.1-commit.e61ad554 → 0.0.1-commit.ec5f612
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/access_scopes.d.ts +9 -0
- package/dest/access_scopes.d.ts.map +1 -0
- package/dest/access_scopes.js +6 -0
- 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 +11 -5
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +54 -30
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +174 -70
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +5 -5
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +3 -3
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +10 -10
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +5 -5
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +38 -26
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +36 -36
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +74 -29
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +53 -29
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +84 -63
- package/dest/contract_logging.d.ts +22 -0
- package/dest/contract_logging.d.ts.map +1 -0
- package/dest/contract_logging.js +23 -0
- package/dest/contract_sync/contract_sync_service.d.ts +43 -0
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
- package/dest/contract_sync/contract_sync_service.js +97 -0
- package/dest/contract_sync/helpers.d.ts +29 -0
- package/dest/contract_sync/helpers.d.ts.map +1 -0
- package/dest/contract_sync/{index.js → helpers.js} +13 -12
- package/dest/debug/pxe_debug_utils.d.ts +24 -10
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +28 -18
- package/dest/entrypoints/client/bundle/index.d.ts +4 -1
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +3 -0
- 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 +21 -7
- package/dest/entrypoints/client/lazy/index.d.ts +4 -1
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +3 -0
- package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +22 -8
- 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 +4 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +3 -1
- 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 +28 -9
- package/dest/events/event_service.d.ts +4 -5
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +5 -6
- package/dest/job_coordinator/job_coordinator.d.ts +3 -2
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -1
- package/dest/job_coordinator/job_coordinator.js +3 -2
- package/dest/logs/log_service.d.ts +7 -5
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +19 -29
- package/dest/notes/note_service.d.ts +7 -7
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +9 -9
- package/dest/notes_filter.d.ts +25 -0
- package/dest/notes_filter.d.ts.map +1 -0
- package/dest/notes_filter.js +4 -0
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
- package/dest/private_kernel/hints/index.d.ts +1 -1
- package/dest/private_kernel/hints/index.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +4 -3
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +129 -68
- package/dest/private_kernel/hints/test_utils.d.ts +122 -0
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
- package/dest/private_kernel/hints/test_utils.js +203 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +21 -13
- package/dest/private_kernel/private_kernel_oracle.d.ts +8 -4
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +7 -3
- package/dest/pxe.d.ts +69 -23
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +98 -63
- package/dest/storage/address_store/address_store.d.ts +1 -1
- package/dest/storage/address_store/address_store.d.ts.map +1 -1
- package/dest/storage/address_store/address_store.js +12 -11
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -1
- package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -1
- package/dest/storage/anchor_block_store/anchor_block_store.js +8 -1
- package/dest/storage/capsule_store/capsule_store.js +6 -8
- package/dest/storage/contract_store/contract_store.d.ts +42 -15
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +157 -72
- package/dest/storage/metadata.d.ts +1 -1
- package/dest/storage/metadata.js +1 -1
- package/dest/storage/note_store/note_store.d.ts +13 -3
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +147 -107
- package/dest/storage/private_event_store/private_event_store.d.ts +1 -1
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +84 -61
- package/dest/storage/private_event_store/stored_private_event.d.ts +4 -4
- package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -1
- package/dest/storage/private_event_store/stored_private_event.js +2 -2
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/recipient_tagging_store.js +31 -19
- package/dest/storage/tagging_store/sender_address_book_store.d.ts +1 -1
- package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_address_book_store.js +20 -14
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +5 -5
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +184 -114
- package/dest/tagging/get_all_logs_by_tags.d.ts +4 -4
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
- package/dest/tagging/get_all_logs_by_tags.js +17 -3
- package/dest/tagging/index.d.ts +2 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +5 -6
- 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/recipient_sync/utils/find_highest_indexes.js +2 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +7 -8
- 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 +12 -11
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +5 -9
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +3 -6
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +5 -8
- 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 +14 -15
- package/package.json +25 -16
- package/src/access_scopes.ts +9 -0
- package/src/block_synchronizer/block_synchronizer.ts +23 -19
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +323 -128
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +5 -5
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +1 -1
- package/src/contract_function_simulator/oracle/interfaces.ts +12 -12
- package/src/contract_function_simulator/oracle/oracle.ts +41 -24
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +100 -110
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +139 -70
- package/src/contract_logging.ts +39 -0
- package/src/contract_sync/contract_sync_service.ts +152 -0
- package/src/contract_sync/{index.ts → helpers.ts} +21 -21
- package/src/debug/pxe_debug_utils.ts +63 -19
- package/src/entrypoints/client/bundle/index.ts +3 -0
- package/src/entrypoints/client/bundle/utils.ts +16 -15
- package/src/entrypoints/client/lazy/index.ts +3 -0
- package/src/entrypoints/client/lazy/utils.ts +17 -15
- package/src/entrypoints/pxe_creation_options.ts +2 -1
- package/src/entrypoints/server/index.ts +3 -1
- package/src/entrypoints/server/utils.ts +22 -26
- package/src/events/event_service.ts +4 -6
- package/src/job_coordinator/job_coordinator.ts +4 -3
- package/src/logs/log_service.ts +31 -38
- package/src/notes/note_service.ts +9 -10
- package/src/notes_filter.ts +26 -0
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
- package/src/private_kernel/hints/index.ts +1 -1
- package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +164 -117
- package/src/private_kernel/hints/test_utils.ts +325 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +25 -15
- package/src/private_kernel/private_kernel_oracle.ts +9 -9
- package/src/pxe.ts +191 -115
- package/src/storage/address_store/address_store.ts +15 -15
- package/src/storage/anchor_block_store/anchor_block_store.ts +8 -0
- package/src/storage/capsule_store/capsule_store.ts +8 -8
- package/src/storage/contract_store/contract_store.ts +186 -76
- package/src/storage/metadata.ts +1 -1
- package/src/storage/note_store/note_store.ts +169 -132
- package/src/storage/private_event_store/private_event_store.ts +102 -81
- package/src/storage/private_event_store/stored_private_event.ts +3 -3
- package/src/storage/tagging_store/recipient_tagging_store.ts +38 -24
- package/src/storage/tagging_store/sender_address_book_store.ts +20 -14
- package/src/storage/tagging_store/sender_tagging_store.ts +214 -130
- package/src/tagging/get_all_logs_by_tags.ts +31 -7
- package/src/tagging/index.ts +1 -1
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +9 -12
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +12 -17
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +6 -11
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +14 -23
- package/dest/contract_sync/index.d.ts +0 -23
- package/dest/contract_sync/index.d.ts.map +0 -1
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_KEY_VALIDATION_REQUESTS_PER_TX, MAX_NOTE_HASHES_PER_CALL, MAX_NOTE_HASHES_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_TX, MAX_NULLIFIERS_PER_CALL, MAX_NULLIFIERS_PER_TX, MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIER_READ_REQUESTS_PER_TX, MAX_PRIVATE_LOGS_PER_CALL, MAX_PRIVATE_LOGS_PER_TX } from '@aztec/constants';
|
|
2
|
+
import { makeTuple } from '@aztec/foundation/array';
|
|
3
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { Point } from '@aztec/foundation/curves/grumpkin';
|
|
5
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
+
import { ClaimedLengthArray, KeyValidationRequest, KeyValidationRequestAndSeparator, NoteHash, Nullifier, PrivateCircuitPublicInputs, PrivateKernelCircuitPublicInputs, ReadRequest, ScopedKeyValidationRequestAndSeparator, ScopedNoteHash, ScopedNullifier, ScopedReadRequest } from '@aztec/stdlib/kernel';
|
|
7
|
+
import { PrivateLogData, ScopedPrivateLogData } from '@aztec/stdlib/kernel';
|
|
8
|
+
import { PrivateLog } from '@aztec/stdlib/logs';
|
|
9
|
+
import { PrivateCallExecutionResult } from '@aztec/stdlib/tx';
|
|
10
|
+
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
11
|
+
const DEFAULT_CONTRACT_ADDRESS = AztecAddress.fromBigInt(987654n);
|
|
12
|
+
/**
|
|
13
|
+
* Builds a ClaimedLengthArray from a list of items, padding to the required size.
|
|
14
|
+
*/ function makeClaimed(items, emptyFactory, maxSize) {
|
|
15
|
+
const padded = makeTuple(maxSize, (i)=>items[i] ?? emptyFactory.empty());
|
|
16
|
+
return new ClaimedLengthArray(padded, items.length);
|
|
17
|
+
}
|
|
18
|
+
/** Builder for PrivateKernelCircuitPublicInputs with fluent API for adding side effects. */ export class PrivateKernelCircuitPublicInputsBuilder {
|
|
19
|
+
contractAddress;
|
|
20
|
+
noteHashes;
|
|
21
|
+
nullifiers;
|
|
22
|
+
noteHashReadRequests;
|
|
23
|
+
nullifierReadRequests;
|
|
24
|
+
keyValidationRequests;
|
|
25
|
+
privateLogs;
|
|
26
|
+
nextCounter;
|
|
27
|
+
constructor(contractAddress = DEFAULT_CONTRACT_ADDRESS, startCounter = 1){
|
|
28
|
+
this.contractAddress = contractAddress;
|
|
29
|
+
this.noteHashes = [];
|
|
30
|
+
this.nullifiers = [];
|
|
31
|
+
this.noteHashReadRequests = [];
|
|
32
|
+
this.nullifierReadRequests = [];
|
|
33
|
+
this.keyValidationRequests = [];
|
|
34
|
+
this.privateLogs = [];
|
|
35
|
+
this.nextCounter = startCounter;
|
|
36
|
+
}
|
|
37
|
+
getCounter(sideEffectCounter) {
|
|
38
|
+
if (sideEffectCounter !== undefined) {
|
|
39
|
+
this.nextCounter = sideEffectCounter + 1;
|
|
40
|
+
return sideEffectCounter;
|
|
41
|
+
}
|
|
42
|
+
return this.nextCounter++;
|
|
43
|
+
}
|
|
44
|
+
/** Adds a note hash to the accumulated data. Defaults are generated randomly. */ addNoteHash(opts) {
|
|
45
|
+
const value = opts?.value ?? Fr.random();
|
|
46
|
+
const counter = this.getCounter(opts?.counter);
|
|
47
|
+
const addr = opts?.contractAddress ?? this.contractAddress;
|
|
48
|
+
this.noteHashes.push(new NoteHash(value, counter).scope(addr));
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
/** Adds a nullifier to the accumulated data. Defaults are generated randomly. */ addNullifier(opts) {
|
|
52
|
+
const value = opts?.value ?? Fr.random();
|
|
53
|
+
const noteHash = opts?.noteHash ?? Fr.ZERO;
|
|
54
|
+
const counter = this.getCounter(opts?.counter);
|
|
55
|
+
const addr = opts?.contractAddress ?? this.contractAddress;
|
|
56
|
+
this.nullifiers.push(new Nullifier(value, noteHash, counter).scope(addr));
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
/** Adds a pending note hash read request (non-empty contract address, can match a pending note hash). */ addPendingNoteHashReadRequest(opts) {
|
|
60
|
+
const value = opts?.value ?? Fr.random();
|
|
61
|
+
const counter = this.getCounter(opts?.counter);
|
|
62
|
+
const addr = opts?.contractAddress ?? this.contractAddress;
|
|
63
|
+
this.noteHashReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), addr));
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
/** Adds a settled note hash read request (empty contract address, resolved against the note hash tree). */ addSettledNoteHashReadRequest(opts) {
|
|
67
|
+
const value = opts?.value ?? Fr.random();
|
|
68
|
+
const counter = this.getCounter(opts?.counter);
|
|
69
|
+
this.noteHashReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), AztecAddress.ZERO));
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/** Adds a pending nullifier read request (non-empty contract address, can match a pending nullifier). */ addPendingNullifierReadRequest(opts) {
|
|
73
|
+
const value = opts?.value ?? Fr.random();
|
|
74
|
+
const counter = this.getCounter(opts?.counter);
|
|
75
|
+
const addr = opts?.contractAddress ?? this.contractAddress;
|
|
76
|
+
this.nullifierReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), addr));
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
/** Adds a settled nullifier read request (empty contract address, resolved against the nullifier tree). */ addSettledNullifierReadRequest(opts) {
|
|
80
|
+
const value = opts?.value ?? Fr.random();
|
|
81
|
+
const counter = this.getCounter(opts?.counter);
|
|
82
|
+
this.nullifierReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), AztecAddress.ZERO));
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
/** Adds a key validation request to validation requests. */ addKeyValidationRequest(opts) {
|
|
86
|
+
const addr = opts?.contractAddress ?? this.contractAddress;
|
|
87
|
+
this.keyValidationRequests.push(new ScopedKeyValidationRequestAndSeparator(new KeyValidationRequestAndSeparator(new KeyValidationRequest(new Point(Fr.random(), Fr.random(), false), Fr.random()), Fr.random()), addr));
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
/** Adds a private log to the accumulated data. Defaults are generated randomly. */ addPrivateLog(opts) {
|
|
91
|
+
const noteHashCounter = opts?.noteHashCounter ?? 0;
|
|
92
|
+
const counter = this.getCounter(opts?.counter);
|
|
93
|
+
const addr = opts?.contractAddress ?? this.contractAddress;
|
|
94
|
+
this.privateLogs.push(new ScopedPrivateLogData(new PrivateLogData(PrivateLog.empty(), noteHashCounter, counter), addr));
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
/** Builds the PrivateKernelCircuitPublicInputs with all added side effects. */ build() {
|
|
98
|
+
const publicInputs = PrivateKernelCircuitPublicInputs.empty();
|
|
99
|
+
publicInputs.end.noteHashes = makeClaimed(this.noteHashes, ScopedNoteHash, MAX_NOTE_HASHES_PER_TX);
|
|
100
|
+
publicInputs.end.nullifiers = makeClaimed(this.nullifiers, ScopedNullifier, MAX_NULLIFIERS_PER_TX);
|
|
101
|
+
publicInputs.end.privateLogs = makeClaimed(this.privateLogs, ScopedPrivateLogData, MAX_PRIVATE_LOGS_PER_TX);
|
|
102
|
+
publicInputs.validationRequests.noteHashReadRequests = makeClaimed(this.noteHashReadRequests, ScopedReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_TX);
|
|
103
|
+
publicInputs.validationRequests.nullifierReadRequests = makeClaimed(this.nullifierReadRequests, ScopedReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_TX);
|
|
104
|
+
publicInputs.validationRequests.scopedKeyValidationRequestsAndSeparators = makeClaimed(this.keyValidationRequests, ScopedKeyValidationRequestAndSeparator, MAX_KEY_VALIDATION_REQUESTS_PER_TX);
|
|
105
|
+
return publicInputs;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/** Builder for PrivateCircuitPublicInputs (call-level) with fluent API for adding side effects. */ export class PrivateCircuitPublicInputsBuilder {
|
|
109
|
+
contractAddress;
|
|
110
|
+
noteHashes;
|
|
111
|
+
nullifiers;
|
|
112
|
+
noteHashReadRequests;
|
|
113
|
+
nullifierReadRequests;
|
|
114
|
+
keyValidationRequests;
|
|
115
|
+
privateLogs;
|
|
116
|
+
nextCounter;
|
|
117
|
+
constructor(contractAddress = DEFAULT_CONTRACT_ADDRESS, startCounter = 1){
|
|
118
|
+
this.contractAddress = contractAddress;
|
|
119
|
+
this.noteHashes = [];
|
|
120
|
+
this.nullifiers = [];
|
|
121
|
+
this.noteHashReadRequests = [];
|
|
122
|
+
this.nullifierReadRequests = [];
|
|
123
|
+
this.keyValidationRequests = [];
|
|
124
|
+
this.privateLogs = [];
|
|
125
|
+
this.nextCounter = startCounter;
|
|
126
|
+
}
|
|
127
|
+
getCounter(sideEffectCounter) {
|
|
128
|
+
if (sideEffectCounter !== undefined) {
|
|
129
|
+
this.nextCounter = sideEffectCounter + 1;
|
|
130
|
+
return sideEffectCounter;
|
|
131
|
+
}
|
|
132
|
+
return this.nextCounter++;
|
|
133
|
+
}
|
|
134
|
+
/** Adds a note hash. Defaults are generated randomly. */ addNoteHash(opts) {
|
|
135
|
+
const value = opts?.value ?? Fr.random();
|
|
136
|
+
const counter = this.getCounter(opts?.counter);
|
|
137
|
+
this.noteHashes.push(new NoteHash(value, counter));
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
/** Adds a nullifier. Defaults are generated randomly. */ addNullifier(opts) {
|
|
141
|
+
const value = opts?.value ?? Fr.random();
|
|
142
|
+
const noteHash = opts?.noteHash ?? Fr.ZERO;
|
|
143
|
+
const counter = this.getCounter(opts?.counter);
|
|
144
|
+
this.nullifiers.push(new Nullifier(value, noteHash, counter));
|
|
145
|
+
return this;
|
|
146
|
+
}
|
|
147
|
+
/** Adds a pending note hash read request (non-empty contract address, can match a pending note hash). */ addPendingNoteHashReadRequest(opts) {
|
|
148
|
+
const value = opts?.value ?? Fr.random();
|
|
149
|
+
const counter = this.getCounter(opts?.counter);
|
|
150
|
+
this.noteHashReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), this.contractAddress));
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
/** Adds a settled note hash read request (empty contract address, resolved against the note hash tree). */ addSettledNoteHashReadRequest(opts) {
|
|
154
|
+
const value = opts?.value ?? Fr.random();
|
|
155
|
+
const counter = this.getCounter(opts?.counter);
|
|
156
|
+
this.noteHashReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), AztecAddress.ZERO));
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
/** Adds a pending nullifier read request (non-empty contract address, can match a pending nullifier). */ addPendingNullifierReadRequest(opts) {
|
|
160
|
+
const value = opts?.value ?? Fr.random();
|
|
161
|
+
const counter = this.getCounter(opts?.counter);
|
|
162
|
+
this.nullifierReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), this.contractAddress));
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
/** Adds a settled nullifier read request (empty contract address, resolved against the nullifier tree). */ addSettledNullifierReadRequest(opts) {
|
|
166
|
+
const value = opts?.value ?? Fr.random();
|
|
167
|
+
const counter = this.getCounter(opts?.counter);
|
|
168
|
+
this.nullifierReadRequests.push(new ScopedReadRequest(new ReadRequest(value, counter), AztecAddress.ZERO));
|
|
169
|
+
return this;
|
|
170
|
+
}
|
|
171
|
+
/** Adds a key validation request. */ addKeyValidationRequest() {
|
|
172
|
+
this.keyValidationRequests.push(new KeyValidationRequestAndSeparator(new KeyValidationRequest(new Point(Fr.random(), Fr.random(), false), Fr.random()), Fr.random()));
|
|
173
|
+
return this;
|
|
174
|
+
}
|
|
175
|
+
/** Adds a private log. Defaults are generated randomly. */ addPrivateLog(opts) {
|
|
176
|
+
const noteHashCounter = opts?.noteHashCounter ?? 0;
|
|
177
|
+
const counter = this.getCounter(opts?.counter);
|
|
178
|
+
this.privateLogs.push(new PrivateLogData(PrivateLog.empty(), noteHashCounter, counter));
|
|
179
|
+
return this;
|
|
180
|
+
}
|
|
181
|
+
/** Builds the PrivateCircuitPublicInputs with all added side effects. */ build() {
|
|
182
|
+
const publicInputs = PrivateCircuitPublicInputs.empty();
|
|
183
|
+
publicInputs.callContext.contractAddress = this.contractAddress;
|
|
184
|
+
publicInputs.noteHashes = makeClaimed(this.noteHashes, NoteHash, MAX_NOTE_HASHES_PER_CALL);
|
|
185
|
+
publicInputs.nullifiers = makeClaimed(this.nullifiers, Nullifier, MAX_NULLIFIERS_PER_CALL);
|
|
186
|
+
publicInputs.privateLogs = makeClaimed(this.privateLogs, PrivateLogData, MAX_PRIVATE_LOGS_PER_CALL);
|
|
187
|
+
publicInputs.noteHashReadRequests = makeClaimed(this.noteHashReadRequests, ScopedReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL);
|
|
188
|
+
publicInputs.nullifierReadRequests = makeClaimed(this.nullifierReadRequests, ScopedReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_CALL);
|
|
189
|
+
publicInputs.keyValidationRequestsAndSeparators = makeClaimed(this.keyValidationRequests, KeyValidationRequestAndSeparator, MAX_KEY_VALIDATION_REQUESTS_PER_CALL);
|
|
190
|
+
return publicInputs;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/** Wraps a PrivateKernelCircuitPublicInputs in a PrivateKernelSimulateOutput. */ export function makeKernelOutput(publicInputs) {
|
|
194
|
+
return {
|
|
195
|
+
publicInputs: publicInputs ?? PrivateKernelCircuitPublicInputs.empty(),
|
|
196
|
+
verificationKey: VerificationKeyData.empty(),
|
|
197
|
+
outputWitness: new Map(),
|
|
198
|
+
bytecode: Buffer.from([])
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/** Wraps a PrivateCircuitPublicInputs in a PrivateCallExecutionResult. */ export function makeExecutionResult(publicInputs) {
|
|
202
|
+
return new PrivateCallExecutionResult(Buffer.alloc(0), Buffer.alloc(0), new Map(), publicInputs ?? PrivateCircuitPublicInputs.empty(), [], new Map(), [], [], [], [], []);
|
|
203
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
1
2
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
2
3
|
import { type PrivateKernelExecutionProofOutput, type PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
3
4
|
import { type PrivateExecutionResult, TxRequest } from '@aztec/stdlib/tx';
|
|
@@ -18,7 +19,7 @@ export declare class PrivateKernelExecutionProver {
|
|
|
18
19
|
private proofCreator;
|
|
19
20
|
private fakeProofs;
|
|
20
21
|
private log;
|
|
21
|
-
constructor(oracle: PrivateKernelOracle, proofCreator: PrivateKernelProver, fakeProofs?: boolean);
|
|
22
|
+
constructor(oracle: PrivateKernelOracle, proofCreator: PrivateKernelProver, fakeProofs?: boolean, bindings?: LoggerBindings);
|
|
22
23
|
/**
|
|
23
24
|
* Generate a proof for a given transaction request and execution result.
|
|
24
25
|
* The function iterates through the nested executions in the execution result, creates private call data,
|
|
@@ -41,4 +42,4 @@ export declare class PrivateKernelExecutionProver {
|
|
|
41
42
|
private getVkData;
|
|
42
43
|
private createPrivateCallData;
|
|
43
44
|
}
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfZXhlY3V0aW9uX3Byb3Zlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInN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UFTLEVBQ3BCLGVBQWUsRUFBRSxzQkFBc0IsRUFDdkMsRUFBRSxRQUFRLEVBQUUsa0JBQWtCLEVBQUUsV0FBVyxFQUFFLEdBQUUsa0NBSTlDLEdBQ0EsT0FBTyxDQUFDLGlDQUFpQyxDQUFDLG9DQUFvQyxDQUFDLENBQUMsQ0EyUmxGO0lBRUQ7Ozs7O09BS0c7SUFDSCxPQUFPLENBQUMsdUJBQXVCO1lBb0JqQixTQUFTO1lBU1QscUJBQXFCO0NBK0JwQyJ9
|
|
@@ -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":"AAEA,OAAO,EAAe,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAMvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAQL,KAAK,iCAAiC,EAKtC,KAAK,oCAAoC,EAE1C,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAI1B,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,CA2RlF;IAED;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;YAoBjB,SAAS;YAST,qBAAqB;CA+BpC"}
|
|
@@ -27,11 +27,11 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
27
27
|
proofCreator;
|
|
28
28
|
fakeProofs;
|
|
29
29
|
log;
|
|
30
|
-
constructor(oracle, proofCreator, fakeProofs = false){
|
|
30
|
+
constructor(oracle, proofCreator, fakeProofs = false, bindings){
|
|
31
31
|
this.oracle = oracle;
|
|
32
32
|
this.proofCreator = proofCreator;
|
|
33
33
|
this.fakeProofs = fakeProofs;
|
|
34
|
-
this.log = createLogger('pxe:private-kernel-execution-prover');
|
|
34
|
+
this.log = createLogger('pxe:private-kernel-execution-prover', bindings);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Generate a proof for a given transaction request and execution result.
|
|
@@ -67,6 +67,7 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
67
67
|
if (!firstIteration) {
|
|
68
68
|
let resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, executionStack, noteHashNullifierCounterMap, splitCounter);
|
|
69
69
|
while(resetBuilder.needsReset()){
|
|
70
|
+
// Inner reset: without siloing.
|
|
70
71
|
const witgenTimer = new Timer();
|
|
71
72
|
const privateInputs = await resetBuilder.build(this.oracle);
|
|
72
73
|
output = generateWitnesses ? await this.proofCreator.generateResetOutput(privateInputs) : await this.proofCreator.simulateReset(privateInputs);
|
|
@@ -132,11 +133,19 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
132
133
|
}
|
|
133
134
|
firstIteration = false;
|
|
134
135
|
}
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
// Final reset: include siloing of note hashes, nullifiers and private logs.
|
|
137
|
+
const finalResetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, [], noteHashNullifierCounterMap, splitCounter);
|
|
138
|
+
if (!finalResetBuilder.needsReset()) {
|
|
139
|
+
// The final reset must be performed exactly once, because each tx has at least one nullifier that requires
|
|
140
|
+
// siloing, and siloing cannot be done multiple times.
|
|
141
|
+
// While, in theory, it might be possible to silo note hashes first and then run another reset to silo nullifiers
|
|
142
|
+
// and/or private logs, we currently don't have standalone dimensions for the arrays that require siloing. As a
|
|
143
|
+
// result, all necessary siloing must be done together in a single reset.
|
|
144
|
+
// Refer to the possible combinations of dimensions in private_kernel_reset_config.json.
|
|
145
|
+
throw new Error('Nothing to reset for the final reset.');
|
|
146
|
+
} else {
|
|
138
147
|
const witgenTimer = new Timer();
|
|
139
|
-
const privateInputs = await
|
|
148
|
+
const privateInputs = await finalResetBuilder.build(this.oracle);
|
|
140
149
|
output = generateWitnesses ? await this.proofCreator.generateResetOutput(privateInputs) : await this.proofCreator.simulateReset(privateInputs);
|
|
141
150
|
executionSteps.push({
|
|
142
151
|
functionName: 'private_kernel_reset',
|
|
@@ -147,7 +156,6 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
147
156
|
witgen: witgenTimer.ms()
|
|
148
157
|
}
|
|
149
158
|
});
|
|
150
|
-
resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, [], noteHashNullifierCounterMap, splitCounter);
|
|
151
159
|
}
|
|
152
160
|
if (output.publicInputs.feePayer.isZero() && skipFeeEnforcement) {
|
|
153
161
|
if (!skipProofGeneration) {
|
|
@@ -161,14 +169,14 @@ const NULL_SIMULATE_OUTPUT = {
|
|
|
161
169
|
this.log.debug(`Calling private kernel tail with hwm ${previousKernelData.publicInputs.minRevertibleSideEffectCounter}`);
|
|
162
170
|
// TODO: Enable padding once we better understand the final amounts to pad to.
|
|
163
171
|
const paddedSideEffectAmounts = PaddedSideEffectAmounts.empty();
|
|
164
|
-
// Use the aggregated
|
|
165
|
-
// TODO: Call `
|
|
166
|
-
const
|
|
172
|
+
// Use the aggregated expirationTimestamp set throughout the tx execution.
|
|
173
|
+
// TODO: Call `computeTxExpirationTimestamp` to round the value down and reduce precision, improving privacy.
|
|
174
|
+
const expirationTimestampUpperBound = previousKernelData.publicInputs.expirationTimestamp;
|
|
167
175
|
const anchorBlockTimestamp = previousKernelData.publicInputs.constants.anchorBlockHeader.globalVariables.timestamp;
|
|
168
|
-
if (
|
|
169
|
-
throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${
|
|
176
|
+
if (expirationTimestampUpperBound <= anchorBlockTimestamp) {
|
|
177
|
+
throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${expirationTimestampUpperBound}.`);
|
|
170
178
|
}
|
|
171
|
-
const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts,
|
|
179
|
+
const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts, expirationTimestampUpperBound);
|
|
172
180
|
const witgenTimer = new Timer();
|
|
173
181
|
const tailOutput = generateWitnesses ? await this.proofCreator.generateTailOutput(privateInputs) : await this.proofCreator.simulateTail(privateInputs);
|
|
174
182
|
executionSteps.push({
|
|
@@ -5,7 +5,7 @@ import { MembershipWitness } from '@aztec/foundation/trees';
|
|
|
5
5
|
import type { KeyStore } from '@aztec/key-store';
|
|
6
6
|
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
7
7
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
-
import {
|
|
8
|
+
import { BlockHash } from '@aztec/stdlib/block';
|
|
9
9
|
import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
10
10
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
11
11
|
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
@@ -20,13 +20,17 @@ export declare class PrivateKernelOracle {
|
|
|
20
20
|
private keyStore;
|
|
21
21
|
private node;
|
|
22
22
|
private blockHash;
|
|
23
|
-
constructor(contractStore: ContractStore, keyStore: KeyStore, node: AztecNode, blockHash:
|
|
23
|
+
constructor(contractStore: ContractStore, keyStore: KeyStore, node: AztecNode, blockHash: BlockHash);
|
|
24
24
|
/** Retrieves the preimage of a contract address from the registered contract instances db. */
|
|
25
25
|
getContractAddressPreimage(address: AztecAddress): Promise<ContractInstanceWithAddress & {
|
|
26
26
|
saltedInitializationHash: Fr;
|
|
27
27
|
}>;
|
|
28
28
|
/** Retrieves the preimage of a contract class id from the contract classes db. */
|
|
29
|
-
getContractClassIdPreimage(contractClassId: Fr): Promise<
|
|
29
|
+
getContractClassIdPreimage(contractClassId: Fr): Promise<{
|
|
30
|
+
artifactHash: Fr;
|
|
31
|
+
privateFunctionsRoot: Fr;
|
|
32
|
+
publicBytecodeCommitment: Fr;
|
|
33
|
+
}>;
|
|
30
34
|
/** Returns a membership witness with the sibling path and leaf index in our private functions tree. */
|
|
31
35
|
getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<typeof FUNCTION_TREE_HEIGHT>>;
|
|
32
36
|
/**
|
|
@@ -56,4 +60,4 @@ export declare class PrivateKernelOracle {
|
|
|
56
60
|
*/
|
|
57
61
|
getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
|
|
58
62
|
}
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNl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sU0FBUyxDQUFDLENBRTVGO0lBRUQscURBQXFEO0lBQy9DLG1CQUFtQixJQUFJLE9BQU8sQ0FBQyxFQUFFLENBQUMsQ0FNdkM7SUFFRDs7Ozs7O09BTUc7SUFDSSxrQkFBa0IsQ0FBQyxlQUFlLEVBQUUsS0FBSyxHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FFekU7SUFFRCwyRUFBMkU7SUFDcEUsb0JBQW9CLENBQUMsZUFBZSxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsZ0JBQWdCLEdBQUcsT0FBTyxDQUFDLE1BQU0sR0FBRyxTQUFTLENBQUMsQ0FFbEg7SUFFRDs7O09BR0c7SUFDVSxzQkFBc0IsQ0FBQyxlQUFlLEVBQUUsWUFBWSxHQUFHLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQThCL0Y7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_kernel_oracle.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAA2B,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxH,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,
|
|
1
|
+
{"version":3,"file":"private_kernel_oracle.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_oracle.ts"],"names":[],"mappings":"AA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E,0BAA0B,CAAC,eAAe,EAAE,EAAE;;;;OAU1D;IAED,uGAAuG;IAC1F,4BAA4B,CACvC,eAAe,EAAE,EAAE,EACnB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAQzD;IAED;;;OAGG;IACI,sBAAsB,CAAC,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,cAAc,CAAC,CAAC,CAG5G;IAED,+FAA+F;IAC/F,4BAA4B,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,qBAAqB,CAAC,GAAG,SAAS,CAAC,CAE/G;IAED,8GAA8G;IAC9G,6BAA6B,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAE5F;IAED,qDAAqD;IAC/C,mBAAmB,IAAI,OAAO,CAAC,EAAE,CAAC,CAMvC;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,CA8B/F;CACF"}
|
|
@@ -2,7 +2,7 @@ import { PUBLIC_DATA_TREE_HEIGHT, 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';
|
|
5
|
-
import {
|
|
5
|
+
import { computeSaltedInitializationHash } from '@aztec/stdlib/contract';
|
|
6
6
|
import { DelayedPublicMutableValues, DelayedPublicMutableValuesWithHash } from '@aztec/stdlib/delayed-public-mutable';
|
|
7
7
|
import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
|
|
8
8
|
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
@@ -30,11 +30,15 @@ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
/** Retrieves the preimage of a contract class id from the contract classes db. */ async getContractClassIdPreimage(contractClassId) {
|
|
33
|
-
const contractClass = await this.contractStore.
|
|
33
|
+
const contractClass = await this.contractStore.getContractClassWithPreimage(contractClassId);
|
|
34
34
|
if (!contractClass) {
|
|
35
35
|
throw new Error(`Contract class not found when getting class id preimage. Class id: ${contractClassId}.`);
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return {
|
|
38
|
+
artifactHash: contractClass.artifactHash,
|
|
39
|
+
privateFunctionsRoot: contractClass.privateFunctionsRoot,
|
|
40
|
+
publicBytecodeCommitment: contractClass.publicBytecodeCommitment
|
|
41
|
+
};
|
|
38
42
|
}
|
|
39
43
|
/** Returns a membership witness with the sibling path and leaf index in our private functions tree. */ async getFunctionMembershipWitness(contractClassId, selector) {
|
|
40
44
|
const membershipWitness = await this.contractStore.getFunctionMembershipWitness(contractClassId, selector);
|
package/dest/pxe.d.ts
CHANGED
|
@@ -9,13 +9,60 @@ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
|
9
9
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
10
10
|
import { CompleteAddress, type ContractInstanceWithAddress, type PartialAddress } from '@aztec/stdlib/contract';
|
|
11
11
|
import type { AztecNode, PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
12
|
-
import { type InTx, SimulationOverrides, TxExecutionRequest, TxProfileResult, TxProvingResult, TxSimulationResult,
|
|
12
|
+
import { BlockHeader, type InTx, SimulationOverrides, TxExecutionRequest, TxProfileResult, TxProvingResult, TxSimulationResult, UtilityExecutionResult } from '@aztec/stdlib/tx';
|
|
13
|
+
import type { AccessScopes } from './access_scopes.js';
|
|
13
14
|
import type { PXEConfig } from './config/index.js';
|
|
14
15
|
import { PXEDebugUtils } from './debug/pxe_debug_utils.js';
|
|
15
16
|
export type PackedPrivateEvent = InTx & {
|
|
16
17
|
packedEvent: Fr[];
|
|
17
18
|
eventSelector: EventSelector;
|
|
18
19
|
};
|
|
20
|
+
/** Options for PXE.profileTx. */
|
|
21
|
+
export type ProfileTxOpts = {
|
|
22
|
+
/** The profiling mode to use. */
|
|
23
|
+
profileMode: 'full' | 'execution-steps' | 'gates';
|
|
24
|
+
/** If true, proof generation is skipped during profiling. Defaults to true. */
|
|
25
|
+
skipProofGeneration?: boolean;
|
|
26
|
+
/** Addresses whose private state and keys are accessible during private execution. */
|
|
27
|
+
scopes: AccessScopes;
|
|
28
|
+
};
|
|
29
|
+
/** Options for PXE.simulateTx. */
|
|
30
|
+
export type SimulateTxOpts = {
|
|
31
|
+
/** Whether to simulate the public part of the transaction. */
|
|
32
|
+
simulatePublic: boolean;
|
|
33
|
+
/** If false, this function throws if the transaction is unable to be included in a block at the current state. */
|
|
34
|
+
skipTxValidation?: boolean;
|
|
35
|
+
/** If false, fees are enforced. */
|
|
36
|
+
skipFeeEnforcement?: boolean;
|
|
37
|
+
/** State overrides for the simulation, such as contract instances and artifacts. */
|
|
38
|
+
overrides?: SimulationOverrides;
|
|
39
|
+
/** Addresses whose private state and keys are accessible during private execution */
|
|
40
|
+
scopes: AccessScopes;
|
|
41
|
+
};
|
|
42
|
+
/** Options for PXE.executeUtility. */
|
|
43
|
+
export type ExecuteUtilityOpts = {
|
|
44
|
+
/** The authentication witnesses required for the function call. */
|
|
45
|
+
authwits?: AuthWitness[];
|
|
46
|
+
/** The accounts whose notes we can access in this call */
|
|
47
|
+
scopes: AccessScopes;
|
|
48
|
+
};
|
|
49
|
+
/** Args for PXE.create. */
|
|
50
|
+
export type PXECreateArgs = {
|
|
51
|
+
/** The Aztec node to connect to. */
|
|
52
|
+
node: AztecNode;
|
|
53
|
+
/** The key-value store for persisting PXE state. */
|
|
54
|
+
store: AztecAsyncKVStore;
|
|
55
|
+
/** The prover for generating private kernel proofs. */
|
|
56
|
+
proofCreator: PrivateKernelProver;
|
|
57
|
+
/** The circuit simulator for executing ACIR circuits. */
|
|
58
|
+
simulator: CircuitSimulator;
|
|
59
|
+
/** Provider for protocol contract artifacts and instances. */
|
|
60
|
+
protocolContractsProvider: ProtocolContractsProvider;
|
|
61
|
+
/** PXE configuration options. */
|
|
62
|
+
config: PXEConfig;
|
|
63
|
+
/** Optional logger instance or string suffix for the logger name. */
|
|
64
|
+
loggerOrSuffix?: string | Logger;
|
|
65
|
+
};
|
|
19
66
|
/**
|
|
20
67
|
* Private eXecution Environment (PXE) is a library used by wallets to simulate private phase of transactions and to
|
|
21
68
|
* manage private state of users.
|
|
@@ -34,6 +81,7 @@ export declare class PXE {
|
|
|
34
81
|
private recipientTaggingStore;
|
|
35
82
|
private addressStore;
|
|
36
83
|
private privateEventStore;
|
|
84
|
+
private contractSyncService;
|
|
37
85
|
private simulator;
|
|
38
86
|
private proverEnabled;
|
|
39
87
|
private proofCreator;
|
|
@@ -50,7 +98,17 @@ export declare class PXE {
|
|
|
50
98
|
*
|
|
51
99
|
* @returns A promise that resolves PXE is ready to be used.
|
|
52
100
|
*/
|
|
53
|
-
static create(node
|
|
101
|
+
static create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix }: PXECreateArgs): Promise<PXE>;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the block header up to which the PXE has synced.
|
|
104
|
+
* @returns The synced block header
|
|
105
|
+
*/
|
|
106
|
+
getSyncedBlockHeader(): Promise<BlockHeader>;
|
|
107
|
+
/**
|
|
108
|
+
* Returns the contract instance for a given address, if it's registered in the PXE.
|
|
109
|
+
* @param address - The contract address.
|
|
110
|
+
* @returns The contract instance if found, undefined otherwise.
|
|
111
|
+
*/
|
|
54
112
|
getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
|
|
55
113
|
/**
|
|
56
114
|
* Returns the contract artifact for a given contract class id, if it's registered in the PXE.
|
|
@@ -133,21 +191,19 @@ export declare class PXE {
|
|
|
133
191
|
* (where validators prove the public portion).
|
|
134
192
|
*
|
|
135
193
|
* @param txRequest - An authenticated tx request ready for proving
|
|
194
|
+
* @param scopes - Addresses whose private state and keys are accessible during private execution.
|
|
136
195
|
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
137
196
|
* @throws If contract code not found, or public simulation reverts.
|
|
138
197
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
139
198
|
*/
|
|
140
|
-
proveTx(txRequest: TxExecutionRequest): Promise<TxProvingResult>;
|
|
199
|
+
proveTx(txRequest: TxExecutionRequest, scopes: AztecAddress[]): Promise<TxProvingResult>;
|
|
141
200
|
/**
|
|
142
201
|
* Profiles a transaction, reporting gate counts (unless disabled) and returns an execution trace.
|
|
143
|
-
*
|
|
144
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
145
|
-
* @param msgSender - (Optional) The message sender to use for the simulation.
|
|
146
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
202
|
+
* @param txRequest - An authenticated tx request ready for simulation.
|
|
147
203
|
* @returns A trace of the program execution with gate counts.
|
|
148
204
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
149
205
|
*/
|
|
150
|
-
profileTx(txRequest: TxExecutionRequest, profileMode
|
|
206
|
+
profileTx(txRequest: TxExecutionRequest, { profileMode, skipProofGeneration, scopes }: ProfileTxOpts): Promise<TxProfileResult>;
|
|
151
207
|
/**
|
|
152
208
|
* Simulates a transaction based on the provided preauthenticated execution request.
|
|
153
209
|
* This will run a local simulation of private execution (and optionally of public as well), run the
|
|
@@ -159,29 +215,19 @@ export declare class PXE {
|
|
|
159
215
|
* In that case, the transaction returned is only potentially ready to be sent to the network for execution.
|
|
160
216
|
*
|
|
161
217
|
*
|
|
162
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
163
|
-
* @param simulatePublic - Whether to simulate the public part of the transaction.
|
|
164
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
165
|
-
* @param skipFeeEnforcement - (Optional) If false, fees are enforced.
|
|
166
|
-
* @param overrides - (Optional) State overrides for the simulation, such as msgSender, contract instances and artifacts.
|
|
167
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
218
|
+
* @param txRequest - An authenticated tx request ready for simulation.
|
|
168
219
|
* @returns A simulated transaction result object that includes public and private return values.
|
|
169
220
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
170
221
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
171
222
|
*
|
|
172
223
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
173
224
|
*/
|
|
174
|
-
simulateTx(txRequest: TxExecutionRequest, simulatePublic
|
|
225
|
+
simulateTx(txRequest: TxExecutionRequest, { simulatePublic, skipTxValidation, skipFeeEnforcement, overrides, scopes }: SimulateTxOpts): Promise<TxSimulationResult>;
|
|
175
226
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
227
|
+
* Executes a contract utility function.
|
|
178
228
|
* @param call - The function call containing the function details, arguments, and target contract address.
|
|
179
|
-
* @param authwits - (Optional) The authentication witnesses required for the function call.
|
|
180
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will
|
|
181
|
-
* default to all.
|
|
182
|
-
* @returns The result of the utility function call, structured based on the function ABI.
|
|
183
229
|
*/
|
|
184
|
-
|
|
230
|
+
executeUtility(call: FunctionCall, { authwits, scopes }?: ExecuteUtilityOpts): Promise<UtilityExecutionResult>;
|
|
185
231
|
/**
|
|
186
232
|
* Returns the private events given search parameters.
|
|
187
233
|
* @param eventSelector - Event selector to search for.
|
|
@@ -201,4 +247,4 @@ export declare class PXE {
|
|
|
201
247
|
*/
|
|
202
248
|
stop(): Promise<void>;
|
|
203
249
|
}
|
|
204
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
250
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBcUMsTUFBTSx1QkFBdUIsQ0FBQztBQUl2RixPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpELE9BQU8sRUFBRSxLQUFLLHlCQUF5QixFQUF5QixNQUFNLDJCQUEyQixDQUFDO0FBQ2xHLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUNMLEtBQUssZ0JBQWdCLEVBQ3JCLGFBQWEsRUFDYixZQUFZLEVBR2IsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUM5RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEVBQ0wsZUFBZSxFQUNmLEtBQUssMkJBQTJCLEVBQ2hDLEtBQUssY0FBYyxFQUdwQixNQUFNLHdCQUF3QixDQUFDO0FBRWhDLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGlDQUF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