@aztec/pxe 0.0.1-commit.d1f2d6c → 0.0.1-commit.d431d1c
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 +4 -6
- package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
- package/dest/block_synchronizer/block_synchronizer.js +11 -51
- package/dest/config/index.d.ts +1 -3
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +0 -17
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +4 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +4 -7
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +2 -4
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +9 -19
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +6 -5
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +1 -10
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +1 -9
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +5 -17
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +6 -14
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +33 -31
- 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 +1 -2
- package/dest/logs/log_service.d.ts +1 -1
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +11 -18
- package/dest/notes/note_service.d.ts +2 -3
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +6 -8
- package/dest/oracle_version.d.ts +3 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +3 -4
- package/dest/pxe.d.ts +1 -1
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +7 -10
- package/dest/storage/note_store/note_store.d.ts +55 -43
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +252 -238
- package/dest/storage/private_event_store/private_event_store.d.ts +4 -17
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +135 -163
- package/dest/tagging/index.d.ts +1 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +0 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +2 -3
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +2 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +2 -3
- 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 +2 -5
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +2 -3
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +2 -2
- 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 +8 -5
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +2 -3
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +4 -7
- package/dest/tree_membership/tree_membership_service.d.ts +50 -0
- package/dest/tree_membership/tree_membership_service.d.ts.map +1 -0
- package/dest/tree_membership/tree_membership_service.js +75 -0
- package/package.json +16 -16
- package/src/block_synchronizer/block_synchronizer.ts +14 -53
- package/src/config/index.ts +0 -14
- package/src/contract_function_simulator/contract_function_simulator.ts +9 -1
- package/src/contract_function_simulator/oracle/interfaces.ts +3 -12
- package/src/contract_function_simulator/oracle/oracle.ts +13 -26
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -20
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +6 -33
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +38 -46
- package/src/debug/pxe_debug_utils.ts +1 -2
- package/src/logs/log_service.ts +8 -25
- package/src/notes/note_service.ts +11 -15
- package/src/oracle_version.ts +3 -4
- package/src/pxe.ts +8 -32
- package/src/storage/note_store/note_store.ts +313 -279
- package/src/storage/private_event_store/private_event_store.ts +175 -214
- package/src/tagging/index.ts +0 -1
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +1 -11
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +1 -7
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +1 -3
- package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +17 -5
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +3 -12
- package/src/tree_membership/tree_membership_service.ts +97 -0
- package/dest/storage/note_store/stored_note.d.ts +0 -16
- package/dest/storage/note_store/stored_note.d.ts.map +0 -1
- package/dest/storage/note_store/stored_note.js +0 -43
- package/dest/storage/private_event_store/stored_private_event.d.ts +0 -23
- package/dest/storage/private_event_store/stored_private_event.d.ts.map +0 -1
- package/dest/storage/private_event_store/stored_private_event.js +0 -56
- package/dest/tagging/get_all_logs_by_tags.d.ts +0 -24
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +0 -1
- package/dest/tagging/get_all_logs_by_tags.js +0 -46
- package/src/storage/note_store/stored_note.ts +0 -48
- package/src/storage/private_event_store/stored_private_event.ts +0 -73
- package/src/tagging/get_all_logs_by_tags.ts +0 -68
|
@@ -1,303 +1,317 @@
|
|
|
1
1
|
import { toArray } from '@aztec/foundation/iterable';
|
|
2
|
-
import {
|
|
2
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
3
|
import { NoteStatus } from '@aztec/stdlib/note';
|
|
4
|
-
import {
|
|
4
|
+
import { NoteDao } from '@aztec/stdlib/note';
|
|
5
5
|
/**
|
|
6
6
|
* NoteStore manages the storage and retrieval of notes.
|
|
7
7
|
*
|
|
8
|
-
* Notes can be active or nullified. This class processes new notes, nullifications,
|
|
9
|
-
* the case of a reorg.
|
|
8
|
+
* Notes can be active or nullified. This class processes new notes, nullifications,
|
|
9
|
+
* and performs rollback handling in the case of a reorg.
|
|
10
10
|
**/ export class NoteStore {
|
|
11
|
-
storeName = 'note';
|
|
12
11
|
#store;
|
|
13
12
|
// Note that we use the siloedNullifier as the note id in the store as it's guaranteed to be unique.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
// re-orgs.
|
|
25
|
-
// block number => nullifier (block number in which nullifier is included)
|
|
26
|
-
#nullifiersByNullificationBlockNumber;
|
|
27
|
-
// In-memory changes performed during a not-yet committed job. When `commit` is called with said job's id, these
|
|
28
|
-
// changes are persisted in the DB maps specified above and cleared.
|
|
29
|
-
// jobId => nullifier => StoredNote (serialized)
|
|
30
|
-
#notesForJob;
|
|
31
|
-
// Per job locks to prevent multiple concurrent writes to affect each other.
|
|
32
|
-
// jobId => lock
|
|
33
|
-
#jobLocks;
|
|
13
|
+
/** noteId (siloedNullifier) -> NoteDao (serialized) */ #notes;
|
|
14
|
+
/** noteId (siloedNullifier) -> NoteDao (serialized) */ #nullifiedNotes;
|
|
15
|
+
/** blockNumber -> siloedNullifier */ #nullifiersByBlockNumber;
|
|
16
|
+
/** noteId (siloedNullifier) -> scope */ #nullifiedNotesToScope;
|
|
17
|
+
/** contractAddress -> noteId (siloedNullifier) */ #nullifiedNotesByContract;
|
|
18
|
+
/** storageSlot -> noteId (siloedNullifier) */ #nullifiedNotesByStorageSlot;
|
|
19
|
+
/** scope (AztecAddress) -> true */ #scopes;
|
|
20
|
+
/** noteId (siloedNullifier) -> scope */ #notesToScope;
|
|
21
|
+
/** scope -> MultiMap(contractAddress -> noteId) */ #notesByContractAndScope;
|
|
22
|
+
/** scope -> MultiMap(storageSlot -> noteId) */ #notesByStorageSlotAndScope;
|
|
34
23
|
constructor(store){
|
|
35
24
|
this.#store = store;
|
|
36
25
|
this.#notes = store.openMap('notes');
|
|
37
|
-
this.#
|
|
38
|
-
this.#
|
|
39
|
-
this.#
|
|
40
|
-
this.#
|
|
26
|
+
this.#nullifiedNotes = store.openMap('nullified_notes');
|
|
27
|
+
this.#nullifiersByBlockNumber = store.openMultiMap('nullifier_to_block_number');
|
|
28
|
+
this.#nullifiedNotesToScope = store.openMultiMap('nullified_notes_to_scope');
|
|
29
|
+
this.#nullifiedNotesByContract = store.openMultiMap('nullified_notes_by_contract');
|
|
30
|
+
this.#nullifiedNotesByStorageSlot = store.openMultiMap('nullified_notes_by_storage_slot');
|
|
31
|
+
this.#scopes = store.openMap('scopes');
|
|
32
|
+
this.#notesToScope = store.openMultiMap('notes_to_scope');
|
|
33
|
+
this.#notesByContractAndScope = new Map();
|
|
34
|
+
this.#notesByStorageSlotAndScope = new Map();
|
|
41
35
|
}
|
|
42
36
|
/**
|
|
43
|
-
*
|
|
37
|
+
* Creates and initializes a new NoteStore instance.
|
|
44
38
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
39
|
+
* This factory method creates a NoteStore and restores any existing
|
|
40
|
+
* scope-specific indexes from the database.
|
|
47
41
|
*
|
|
48
|
-
* @param
|
|
49
|
-
* @
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const noteForJob = await this.#readNote(note.siloedNullifier.toString(), jobId) ?? new StoredNote(note, new Set());
|
|
56
|
-
// Make sure the note is linked to the scope and staged for this job
|
|
57
|
-
noteForJob.addScope(scope.toString());
|
|
58
|
-
this.#writeNote(noteForJob, jobId);
|
|
59
|
-
}
|
|
60
|
-
async #readNote(nullifier, jobId) {
|
|
61
|
-
// First check staged notes for this job
|
|
62
|
-
const noteForJob = this.#getNotesForJob(jobId).get(nullifier);
|
|
63
|
-
if (noteForJob) {
|
|
64
|
-
return noteForJob;
|
|
42
|
+
* @param store - The key-value store to use for persistence
|
|
43
|
+
* @returns Promise resolving to a fully initialized NoteStore instance
|
|
44
|
+
*/ static async create(store) {
|
|
45
|
+
const pxeDB = new NoteStore(store);
|
|
46
|
+
for await (const scope of pxeDB.#scopes.keysAsync()){
|
|
47
|
+
pxeDB.#notesByContractAndScope.set(scope, store.openMultiMap(`${scope}:notes_by_contract`));
|
|
48
|
+
pxeDB.#notesByStorageSlotAndScope.set(scope, store.openMultiMap(`${scope}:notes_by_storage_slot`));
|
|
65
49
|
}
|
|
66
|
-
|
|
67
|
-
const noteBuffer = await this.#notes.getAsync(nullifier);
|
|
68
|
-
if (noteBuffer) {
|
|
69
|
-
return StoredNote.fromBuffer(noteBuffer);
|
|
70
|
-
}
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
#writeNote(note, jobId) {
|
|
74
|
-
this.#getNotesForJob(jobId).set(note.noteDao.siloedNullifier.toString(), note);
|
|
50
|
+
return pxeDB;
|
|
75
51
|
}
|
|
76
52
|
/**
|
|
77
|
-
*
|
|
53
|
+
* Adds a new scope to the note data provider.
|
|
78
54
|
*
|
|
79
|
-
*
|
|
55
|
+
* Scopes provide privacy isolation by creating separate indexes for each user.
|
|
56
|
+
* Each scope gets its own set of indexes for efficient note retrieval by various criteria.
|
|
80
57
|
*
|
|
81
|
-
* @param
|
|
82
|
-
*
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
*/ async getNotes(filter, jobId) {
|
|
88
|
-
if (filter.scopes !== undefined && filter.scopes.length === 0) {
|
|
89
|
-
throw new Error('Trying to get notes with an empty scopes array');
|
|
58
|
+
* @param scope - The AztecAddress representing the scope/user to add
|
|
59
|
+
* @returns Promise resolving to true if scope was added, false if it already existed
|
|
60
|
+
*/ async addScope(scope) {
|
|
61
|
+
const scopeString = scope.toString();
|
|
62
|
+
if (await this.#scopes.hasAsync(scopeString)) {
|
|
63
|
+
return false;
|
|
90
64
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const note = await this.#readNote(nullifier, jobId);
|
|
96
|
-
// Defensive: hitting this case means we're mishandling contract indices or in-memory job data
|
|
97
|
-
if (!note) {
|
|
98
|
-
throw new Error('PXE note database is corrupted.');
|
|
99
|
-
}
|
|
100
|
-
// Apply filters
|
|
101
|
-
if (targetStatus === NoteStatus.ACTIVE && note.isNullified()) {
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
if (filter.owner && !note.noteDao.owner.equals(filter.owner)) {
|
|
105
|
-
continue;
|
|
106
|
-
}
|
|
107
|
-
if (filter.storageSlot && !note.noteDao.storageSlot.equals(filter.storageSlot)) {
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
if (filter.siloedNullifier && !note.noteDao.siloedNullifier.equals(filter.siloedNullifier)) {
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
if (filter.scopes && note.scopes.intersection(new Set(filter.scopes.map((s)=>s.toString()))).size === 0) {
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
foundNotes.set(note.noteDao.siloedNullifier.toString(), note.noteDao);
|
|
117
|
-
}
|
|
118
|
-
// Sort by block number, then by tx index within block, then by note index within tx
|
|
119
|
-
return [
|
|
120
|
-
...foundNotes.values()
|
|
121
|
-
].sort((a, b)=>{
|
|
122
|
-
if (a.l2BlockNumber !== b.l2BlockNumber) {
|
|
123
|
-
return a.l2BlockNumber - b.l2BlockNumber;
|
|
124
|
-
}
|
|
125
|
-
if (a.txIndexInBlock !== b.txIndexInBlock) {
|
|
126
|
-
return a.txIndexInBlock - b.txIndexInBlock;
|
|
127
|
-
}
|
|
128
|
-
return a.noteIndexInTx - b.noteIndexInTx;
|
|
129
|
-
});
|
|
65
|
+
await this.#scopes.set(scopeString, true);
|
|
66
|
+
this.#notesByContractAndScope.set(scopeString, this.#store.openMultiMap(`${scopeString}:notes_by_contract`));
|
|
67
|
+
this.#notesByStorageSlotAndScope.set(scopeString, this.#store.openMultiMap(`${scopeString}:notes_by_storage_slot`));
|
|
68
|
+
return true;
|
|
130
69
|
}
|
|
131
70
|
/**
|
|
132
|
-
*
|
|
71
|
+
* Adds multiple notes to the data provider under the specified scope.
|
|
133
72
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
73
|
+
* Notes are stored using their siloedNullifier as the key, which provides uniqueness. Each note is indexed
|
|
74
|
+
* by multiple criteria for efficient retrieval.
|
|
136
75
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const storedNote = await this.#readNote(nullifier, jobId);
|
|
153
|
-
if (!storedNote) {
|
|
154
|
-
throw new Error(`Attempted to mark a note as nullified which does not exist in PXE DB`);
|
|
155
|
-
}
|
|
156
|
-
return {
|
|
157
|
-
storedNote: await this.#readNote(nullifier, jobId),
|
|
158
|
-
blockNumber: nullifierInBlock.l2BlockNumber
|
|
159
|
-
};
|
|
160
|
-
}));
|
|
161
|
-
const notesNullifiedInThisCall = new Map();
|
|
162
|
-
for (const noteToNullify of notesToNullify){
|
|
163
|
-
// Safe to coerce (!) because we throw if we find any undefined above
|
|
164
|
-
const note = noteToNullify.storedNote;
|
|
165
|
-
// Skip already nullified notes
|
|
166
|
-
if (note.isNullified()) {
|
|
167
|
-
continue;
|
|
168
|
-
}
|
|
169
|
-
note.markAsNullified(noteToNullify.blockNumber);
|
|
170
|
-
this.#writeNote(note, jobId);
|
|
171
|
-
notesNullifiedInThisCall.set(note.noteDao.siloedNullifier.toString(), note.noteDao);
|
|
172
|
-
}
|
|
173
|
-
return [
|
|
174
|
-
...notesNullifiedInThisCall.values()
|
|
175
|
-
];
|
|
176
|
-
}));
|
|
76
|
+
* @param notes - Notes to store
|
|
77
|
+
* @param scope - The scope (user/account) under which to store the notes
|
|
78
|
+
*/ addNotes(notes, scope) {
|
|
79
|
+
return this.#store.transactionAsync(async ()=>{
|
|
80
|
+
if (!await this.#scopes.hasAsync(scope.toString())) {
|
|
81
|
+
await this.addScope(scope);
|
|
82
|
+
}
|
|
83
|
+
for (const dao of notes){
|
|
84
|
+
const noteId = dao.siloedNullifier.toString();
|
|
85
|
+
await this.#notes.set(noteId, dao.toBuffer());
|
|
86
|
+
await this.#notesToScope.set(noteId, scope.toString());
|
|
87
|
+
await this.#notesByContractAndScope.get(scope.toString()).set(dao.contractAddress.toString(), noteId);
|
|
88
|
+
await this.#notesByStorageSlotAndScope.get(scope.toString()).set(dao.storageSlot.toString(), noteId);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
177
91
|
}
|
|
178
92
|
/**
|
|
179
93
|
* Synchronizes notes and nullifiers to a specific block number.
|
|
180
94
|
*
|
|
181
|
-
* This method ensures that the state of notes and nullifiers is consistent with the
|
|
182
|
-
* It restores any notes that were nullified after the given block
|
|
183
|
-
* block.
|
|
95
|
+
* This method ensures that the state of notes and nullifiers is consistent with the
|
|
96
|
+
* specified block number. It restores any notes that were nullified after the given block
|
|
97
|
+
* and deletes any active notes created after that block.
|
|
184
98
|
*
|
|
185
99
|
* IMPORTANT: This method must be called within a transaction to ensure atomicity.
|
|
186
100
|
*
|
|
187
101
|
* @param blockNumber - The new chain tip after a reorg
|
|
188
102
|
* @param synchedBlockNumber - The block number up to which PXE managed to sync before the reorg happened.
|
|
189
103
|
*/ async rollback(blockNumber, synchedBlockNumber) {
|
|
190
|
-
|
|
191
|
-
throw new Error('PXE note store rollback is not allowed while jobs are running');
|
|
192
|
-
}
|
|
193
|
-
await this.#rewindNullifiedNotesAfterBlock(blockNumber, synchedBlockNumber);
|
|
104
|
+
await this.#rewindNullifiersAfterBlock(blockNumber, synchedBlockNumber);
|
|
194
105
|
await this.#deleteActiveNotesAfterBlock(blockNumber);
|
|
195
106
|
}
|
|
196
107
|
/**
|
|
197
|
-
* Deletes (removes) all notes created after the specified block number.
|
|
108
|
+
* Deletes (removes) all active notes created after the specified block number.
|
|
198
109
|
*
|
|
199
|
-
* Permanently delete notes from the notes store, e.g. during a reorg.
|
|
110
|
+
* Permanently delete notes from the active notes store, e.g. during a reorg.
|
|
111
|
+
* Note: This only affects #notes (active notes), not #nullifiedNotes.
|
|
200
112
|
*
|
|
201
113
|
* @param blockNumber - Notes created after this block number will be deleted
|
|
202
114
|
*/ async #deleteActiveNotesAfterBlock(blockNumber) {
|
|
203
115
|
const notes = await toArray(this.#notes.valuesAsync());
|
|
204
|
-
for (const
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
const
|
|
208
|
-
await this.#notes.delete(
|
|
209
|
-
await this.#
|
|
116
|
+
for (const note of notes){
|
|
117
|
+
const noteDao = NoteDao.fromBuffer(note);
|
|
118
|
+
if (noteDao.l2BlockNumber > blockNumber) {
|
|
119
|
+
const noteId = noteDao.siloedNullifier.toString();
|
|
120
|
+
await this.#notes.delete(noteId);
|
|
121
|
+
await this.#notesToScope.delete(noteId);
|
|
122
|
+
const scopes = await toArray(this.#scopes.keysAsync());
|
|
123
|
+
for (const scope of scopes){
|
|
124
|
+
await this.#notesByContractAndScope.get(scope).deleteValue(noteDao.contractAddress.toString(), noteId);
|
|
125
|
+
await this.#notesByStorageSlotAndScope.get(scope).deleteValue(noteDao.storageSlot.toString(), noteId);
|
|
126
|
+
}
|
|
210
127
|
}
|
|
211
128
|
}
|
|
212
129
|
}
|
|
213
130
|
/**
|
|
214
131
|
* Rewinds nullifications after a given block number.
|
|
215
132
|
*
|
|
216
|
-
* This operation "
|
|
217
|
-
* reorg.
|
|
133
|
+
* This operation "unnullifies" notes, rolling back nullifications that occurred
|
|
134
|
+
* in orphaned blocks, e.g. during a reorg. The notes are restored to the
|
|
135
|
+
* active notes store and removed from the nullified store.
|
|
218
136
|
*
|
|
219
137
|
* @param blockNumber - Revert nullifications that occurred after this block
|
|
220
|
-
* @param
|
|
221
|
-
*/ async #
|
|
138
|
+
* @param synchedBlockNumber - Upper bound for the block range to process
|
|
139
|
+
*/ async #rewindNullifiersAfterBlock(blockNumber, synchedBlockNumber) {
|
|
140
|
+
const noteIdsToReinsert = [];
|
|
222
141
|
const currentBlockNumber = blockNumber + 1;
|
|
223
|
-
for(let i = currentBlockNumber; i <=
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
// insertion via `addNotes` or when removing their nullifiers.
|
|
239
|
-
throw new Error(`No scopes found for nullified note with nullifier ${noteNullifier}`);
|
|
240
|
-
}
|
|
241
|
-
storedNote.markAsActive();
|
|
142
|
+
for(let i = currentBlockNumber; i <= synchedBlockNumber; i++){
|
|
143
|
+
// noteId === siloedNullifier.toString(), so we can use nullifiers directly as noteIds
|
|
144
|
+
noteIdsToReinsert.push(...await toArray(this.#nullifiersByBlockNumber.getValuesAsync(i)));
|
|
145
|
+
}
|
|
146
|
+
const nullifiedNoteBuffers = await Promise.all(noteIdsToReinsert.map((noteId)=>this.#nullifiedNotes.getAsync(noteId)));
|
|
147
|
+
const noteDaos = nullifiedNoteBuffers.filter((buffer)=>buffer != undefined).map((buffer)=>NoteDao.fromBuffer(buffer));
|
|
148
|
+
for (const dao of noteDaos){
|
|
149
|
+
const noteId = dao.siloedNullifier.toString();
|
|
150
|
+
const scopes = await toArray(this.#nullifiedNotesToScope.getValuesAsync(noteId));
|
|
151
|
+
if (scopes.length === 0) {
|
|
152
|
+
// We should never run into this error because notes always have a scope assigned to them - either on initial
|
|
153
|
+
// insertion via `addNotes` or when removing their nullifiers.
|
|
154
|
+
throw new Error(`No scopes found for nullified note with nullifier ${noteId}`);
|
|
155
|
+
}
|
|
156
|
+
for (const scope of scopes){
|
|
242
157
|
await Promise.all([
|
|
243
|
-
this.#
|
|
244
|
-
this.#
|
|
158
|
+
this.#notesByContractAndScope.get(scope.toString()).set(dao.contractAddress.toString(), noteId),
|
|
159
|
+
this.#notesByStorageSlotAndScope.get(scope.toString()).set(dao.storageSlot.toString(), noteId),
|
|
160
|
+
this.#notesToScope.set(noteId, scope)
|
|
245
161
|
]);
|
|
246
162
|
}
|
|
163
|
+
await Promise.all([
|
|
164
|
+
this.#notes.set(noteId, dao.toBuffer()),
|
|
165
|
+
this.#nullifiedNotes.delete(noteId),
|
|
166
|
+
this.#nullifiedNotesToScope.delete(noteId),
|
|
167
|
+
this.#nullifiersByBlockNumber.deleteValue(dao.l2BlockNumber, dao.siloedNullifier.toString()),
|
|
168
|
+
this.#nullifiedNotesByContract.deleteValue(dao.contractAddress.toString(), noteId),
|
|
169
|
+
this.#nullifiedNotesByStorageSlot.deleteValue(dao.storageSlot.toString(), noteId)
|
|
170
|
+
]);
|
|
247
171
|
}
|
|
248
172
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Retrieves notes based on the provided filter criteria.
|
|
175
|
+
*
|
|
176
|
+
* This method queries both active and optionally nullified notes based on the filter
|
|
177
|
+
* parameters.
|
|
178
|
+
*
|
|
179
|
+
* @param filter - Filter criteria including contractAddress (required), and optional
|
|
180
|
+
* owner, storageSlot, status, scopes, and siloedNullifier.
|
|
181
|
+
* @returns Filtered and deduplicated notes (a note might be present in multiple scopes - we ensure it is only
|
|
182
|
+
* returned once if this is the case)
|
|
183
|
+
* @throws If filtering by an empty scopes array. Scopes have to be set to undefined or to a non-empty array.
|
|
184
|
+
*/ async getNotes(filter) {
|
|
185
|
+
filter.status = filter.status ?? NoteStatus.ACTIVE;
|
|
186
|
+
// throw early if scopes is an empty array
|
|
187
|
+
if (filter.scopes !== undefined && filter.scopes.length === 0) {
|
|
188
|
+
throw new Error('Trying to get notes with an empty scopes array. Scopes have to be set to undefined if intending on not filtering by scopes.');
|
|
189
|
+
}
|
|
190
|
+
const candidateNoteSources = [];
|
|
191
|
+
filter.scopes ??= (await toArray(this.#scopes.keysAsync())).map((addressString)=>AztecAddress.fromString(addressString));
|
|
192
|
+
const activeNoteIdsPerScope = [];
|
|
193
|
+
for (const scope of new Set(filter.scopes)){
|
|
194
|
+
const formattedScopeString = scope.toString();
|
|
195
|
+
if (!await this.#scopes.hasAsync(formattedScopeString)) {
|
|
196
|
+
throw new Error('Trying to get incoming notes of a scope that is not in the PXE database');
|
|
257
197
|
}
|
|
258
|
-
this.#
|
|
198
|
+
activeNoteIdsPerScope.push(filter.storageSlot ? await toArray(this.#notesByStorageSlotAndScope.get(formattedScopeString).getValuesAsync(filter.storageSlot.toString())) : await toArray(this.#notesByContractAndScope.get(formattedScopeString).getValuesAsync(filter.contractAddress.toString())));
|
|
199
|
+
}
|
|
200
|
+
candidateNoteSources.push({
|
|
201
|
+
ids: new Set(activeNoteIdsPerScope.flat()),
|
|
202
|
+
notes: this.#notes
|
|
259
203
|
});
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
204
|
+
// If status is ACTIVE_OR_NULLIFIED we add nullified notes as candidates on top of the default active ones.
|
|
205
|
+
if (filter.status === NoteStatus.ACTIVE_OR_NULLIFIED) {
|
|
206
|
+
const nullifiedIds = filter.storageSlot ? await toArray(this.#nullifiedNotesByStorageSlot.getValuesAsync(filter.storageSlot.toString())) : await toArray(this.#nullifiedNotesByContract.getValuesAsync(filter.contractAddress.toString()));
|
|
207
|
+
const setOfScopes = new Set(filter.scopes.map((s)=>s.toString()));
|
|
208
|
+
const filteredNullifiedIds = new Set();
|
|
209
|
+
for (const noteId of nullifiedIds){
|
|
210
|
+
const scopeList = await toArray(this.#nullifiedNotesToScope.getValuesAsync(noteId));
|
|
211
|
+
if (scopeList.some((scope)=>setOfScopes.has(scope))) {
|
|
212
|
+
filteredNullifiedIds.add(noteId);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (filteredNullifiedIds.size > 0) {
|
|
216
|
+
candidateNoteSources.push({
|
|
217
|
+
ids: filteredNullifiedIds,
|
|
218
|
+
notes: this.#nullifiedNotes
|
|
219
|
+
});
|
|
220
|
+
}
|
|
277
221
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
222
|
+
const result = [];
|
|
223
|
+
for (const { ids, notes } of candidateNoteSources){
|
|
224
|
+
for (const id of ids){
|
|
225
|
+
const serializedNote = await notes.getAsync(id);
|
|
226
|
+
if (!serializedNote) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
const note = NoteDao.fromBuffer(serializedNote);
|
|
230
|
+
if (!note.contractAddress.equals(filter.contractAddress)) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (filter.owner && !note.owner.equals(filter.owner)) {
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
if (filter.storageSlot && !note.storageSlot.equals(filter.storageSlot)) {
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (filter.siloedNullifier && !note.siloedNullifier.equals(filter.siloedNullifier)) {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
result.push(note);
|
|
243
|
+
}
|
|
283
244
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
245
|
+
// A note might be present in multiple scopes - we ensure it is only returned once
|
|
246
|
+
const deduplicated = [];
|
|
247
|
+
for (const note of result){
|
|
248
|
+
if (!deduplicated.some((existing)=>existing.equals(note))) {
|
|
249
|
+
deduplicated.push(note);
|
|
250
|
+
}
|
|
290
251
|
}
|
|
291
|
-
|
|
252
|
+
// Sort by block number, then by tx index within block, then by note index within tx
|
|
253
|
+
deduplicated.sort((a, b)=>{
|
|
254
|
+
if (a.l2BlockNumber !== b.l2BlockNumber) {
|
|
255
|
+
return a.l2BlockNumber - b.l2BlockNumber;
|
|
256
|
+
}
|
|
257
|
+
if (a.txIndexInBlock !== b.txIndexInBlock) {
|
|
258
|
+
return a.txIndexInBlock - b.txIndexInBlock;
|
|
259
|
+
}
|
|
260
|
+
return a.noteIndexInTx - b.noteIndexInTx;
|
|
261
|
+
});
|
|
262
|
+
return deduplicated;
|
|
292
263
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
264
|
+
/**
|
|
265
|
+
* Transitions notes from "active" to "nullified" state.
|
|
266
|
+
*
|
|
267
|
+
* This operation processes a batch of nullifiers to mark the corresponding notes
|
|
268
|
+
* as spent/nullified. The operation is atomic - if any nullifier is not found,
|
|
269
|
+
* the entire operation fails and no notes are modified.
|
|
270
|
+
*
|
|
271
|
+
* @param nullifiers - Array of nullifiers with their block numbers to process
|
|
272
|
+
* @returns Promise resolving to array of nullified NoteDao objects
|
|
273
|
+
* @throws Error if any nullifier is not found in the active notes
|
|
274
|
+
*/ applyNullifiers(nullifiers) {
|
|
275
|
+
if (nullifiers.length === 0) {
|
|
276
|
+
return Promise.resolve([]);
|
|
277
|
+
}
|
|
278
|
+
return this.#store.transactionAsync(async ()=>{
|
|
279
|
+
const nullifiedNotes = [];
|
|
280
|
+
for (const blockScopedNullifier of nullifiers){
|
|
281
|
+
const { data: nullifier, l2BlockNumber: blockNumber } = blockScopedNullifier;
|
|
282
|
+
const noteId = nullifier.toString();
|
|
283
|
+
const noteBuffer = await this.#notes.getAsync(noteId);
|
|
284
|
+
if (!noteBuffer) {
|
|
285
|
+
// Check if already nullified (noteId === siloedNullifier, so we can check #nullifiedNotes directly)
|
|
286
|
+
if (await this.#nullifiedNotes.hasAsync(noteId)) {
|
|
287
|
+
throw new Error(`Nullifier already applied in applyNullifiers`);
|
|
288
|
+
}
|
|
289
|
+
throw new Error('Nullifier not found in applyNullifiers');
|
|
290
|
+
}
|
|
291
|
+
const noteScopes = await toArray(this.#notesToScope.getValuesAsync(noteId));
|
|
292
|
+
if (noteScopes.length === 0) {
|
|
293
|
+
// We should never run into this error because notes always have a scope assigned to them - either on initial
|
|
294
|
+
// insertion via `addNotes` or when removing their nullifiers.
|
|
295
|
+
throw new Error('Note scopes are missing in applyNullifiers');
|
|
296
|
+
}
|
|
297
|
+
const note = NoteDao.fromBuffer(noteBuffer);
|
|
298
|
+
nullifiedNotes.push(note);
|
|
299
|
+
await this.#notes.delete(noteId);
|
|
300
|
+
await this.#notesToScope.delete(noteId);
|
|
301
|
+
const scopes = await toArray(this.#scopes.keysAsync());
|
|
302
|
+
for (const scope of scopes){
|
|
303
|
+
await this.#notesByContractAndScope.get(scope).deleteValue(note.contractAddress.toString(), noteId);
|
|
304
|
+
await this.#notesByStorageSlotAndScope.get(scope).deleteValue(note.storageSlot.toString(), noteId);
|
|
305
|
+
}
|
|
306
|
+
for (const scope of noteScopes){
|
|
307
|
+
await this.#nullifiedNotesToScope.set(noteId, scope);
|
|
308
|
+
}
|
|
309
|
+
await this.#nullifiedNotes.set(noteId, note.toBuffer());
|
|
310
|
+
await this.#nullifiersByBlockNumber.set(blockNumber, noteId);
|
|
311
|
+
await this.#nullifiedNotesByContract.set(note.contractAddress.toString(), noteId);
|
|
312
|
+
await this.#nullifiedNotesByStorageSlot.set(note.storageSlot.toString(), noteId);
|
|
313
|
+
}
|
|
314
|
+
return nullifiedNotes;
|
|
315
|
+
});
|
|
302
316
|
}
|
|
303
317
|
}
|
|
@@ -2,7 +2,7 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
2
2
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
3
3
|
import type { EventSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
import type
|
|
5
|
+
import { type InTx, TxHash } from '@aztec/stdlib/tx';
|
|
6
6
|
import type { StagedStore } from '../../job_coordinator/job_coordinator.js';
|
|
7
7
|
import type { PackedPrivateEvent } from '../../pxe.js';
|
|
8
8
|
export type PrivateEventStoreFilter = {
|
|
@@ -28,6 +28,8 @@ export declare class PrivateEventStore implements StagedStore {
|
|
|
28
28
|
readonly storeName: string;
|
|
29
29
|
logger: import("@aztec/foundation/log").Logger;
|
|
30
30
|
constructor(store: AztecAsyncKVStore);
|
|
31
|
+
commit(jobId: string): Promise<void>;
|
|
32
|
+
discardStaged(jobId: string): Promise<void>;
|
|
31
33
|
/**
|
|
32
34
|
* Store a private event log.
|
|
33
35
|
* @param eventSelector - The event selector of the event.
|
|
@@ -71,21 +73,6 @@ export declare class PrivateEventStore implements StagedStore {
|
|
|
71
73
|
* IMPORTANT: This method must be called within a transaction to ensure atomicity.
|
|
72
74
|
*/
|
|
73
75
|
rollback(blockNumber: number, synchedBlockNumber: number): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Commits in memory job data to persistent storage.
|
|
76
|
-
*
|
|
77
|
-
* Called by JobCoordinator when a job completes successfully.
|
|
78
|
-
*
|
|
79
|
-
* Note: JobCoordinator wraps all commits in a single transaction, so we don't need our own transactionAsync here
|
|
80
|
-
* (and using one would throw on IndexedDB as it does not support nested txs).
|
|
81
|
-
*
|
|
82
|
-
* @param jobId - The jobId identifying which staged data to commit
|
|
83
|
-
*/
|
|
84
|
-
commit(jobId: string): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* Discards in memory job data without persisting it.
|
|
87
|
-
*/
|
|
88
|
-
discardStaged(jobId: string): Promise<void>;
|
|
89
76
|
}
|
|
90
77
|
export {};
|
|
91
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9ldmVudF9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2UvcHJpdmF0ZV9ldmVudF9zdG9yZS9wcml2YXRlX2V2ZW50X3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUdwRCxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBcUMsTUFBTSxpQkFBaUIsQ0FBQztBQUM1RixPQUFPLEtBQUssRUFBRSxhQUFhLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVoRSxPQUFPLEVBQUUsS0FBSyxJQUFJLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFckQsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFDNUUsT0FBTyxLQUFLLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFFdkQsTUFBTSxNQUFNLHVCQUF1QixHQUFHO0lBQ3BDLGVBQWUsRUFBRSxZQUFZLENBQUM7SUFDOUIsU0FBUyxFQUFFLE1BQU0sQ0FBQztJQUNsQixPQUFPLEVBQUUsTUFBTSxDQUFDO0lBQ2hCLE1BQU0sRUFBRSxZQUFZLEVBQUUsQ0FBQztJQUN2QixNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDakIsQ0FBQztBQWdCRixLQUFLLG9CQUFvQixHQUFHLElBQUksR0FBRztJQUNqQyxlQUFlLEVBQUUsWUFBWSxDQUFDO0lBQzlCLEtBQUssRUFBRSxZQUFZLENBQUM7SUFDcEIsMkNBQTJDO0lBQzNDLGNBQWMsRUFBRSxNQUFNLENBQUM7SUFDdkIseUVBQXlFO0lBQ3pFLGNBQWMsRUFBRSxNQUFNLENBQUM7Q0FDeEIsQ0FBQztBQUVGOztHQUVHO0FBQ0gscUJBQWEsaUJBQWtCLFlBQVcsV0FBVzs7SUFDbkQsUUFBUSxDQUFDLFNBQVMsRUFBRSxNQUFNLENBQW1CO0lBZTdDLE1BQU0seUNBQXVDO0lBRTdDLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQVFuQztJQU1LLE1BQU0sQ0FBQyxLQUFLLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FlekM7SUFFRCxhQUFhLENBQUMsS0FBSyxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBRzFDO0lBb0REOzs7Ozs7Ozs7OztPQVdHO0lBQ0gsb0JBQW9CLENBQ2xCLGFBQWEsRUFBRSxhQUFhLEVBQzVCLFVBQVUsRUFBRSxFQUFFLEVBQ2QsVUFBVSxFQUFFLEVBQUUsRUFBRSxFQUNoQixxQkFBcUIsRUFBRSxFQUFFLEVBQ3pCLFFBQVEsRUFBRSxvQkFBb0IsRUFDOUIsS0FBSyxFQUFFLE1BQU0sR0FDWixPQUFPLENBQUMsSUFBSSxDQUFDLENBa0NmO0lBRUQ7Ozs7Ozs7Ozs7T0FVRztJQUNVLGdCQUFnQixDQUMzQixhQUFhLEVBQUUsYUFBYSxFQUM1QixNQUFNLEVBQUUsdUJBQXVCLEdBQzlCLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxDQUFDLENBdUQvQjtJQUVEOzs7Ozs7Ozs7Ozs7Ozs7O09BZ0JHO0lBQ1UsUUFBUSxDQUFDLFdBQVcsRUFBRSxNQUFNLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0E0QnBGO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_event_store.d.ts","sourceRoot":"","sources":["../../../src/storage/private_event_store/private_event_store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"private_event_store.d.ts","sourceRoot":"","sources":["../../../src/storage/private_event_store/private_event_store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAqC,MAAM,iBAAiB,CAAC;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe,EAAE,YAAY,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAgBF,KAAK,oBAAoB,GAAG,IAAI,GAAG;IACjC,eAAe,EAAE,YAAY,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,2CAA2C;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,qBAAa,iBAAkB,YAAW,WAAW;;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAmB;IAe7C,MAAM,yCAAuC;IAE7C,YAAY,KAAK,EAAE,iBAAiB,EAQnC;IAMK,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAezC;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1C;IAoDD;;;;;;;;;;;OAWG;IACH,oBAAoB,CAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,EAAE,EACd,UAAU,EAAE,EAAE,EAAE,EAChB,qBAAqB,EAAE,EAAE,EACzB,QAAQ,EAAE,oBAAoB,EAC9B,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAkCf;IAED;;;;;;;;;;OAUG;IACU,gBAAgB,CAC3B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAuD/B;IAED;;;;;;;;;;;;;;;;OAgBG;IACU,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BpF;CACF"}
|