Closed igamigo closed 1 week ago
We may also consider the following structure:
pub struct SyncSummary {
pub block_num: u32,
pub received_notes: Vec<NoteId>,
pub committed_notes: Vec<NoteId>,
pub consumed_notes: Vec<NoteId>,
pub updated_accounts: Vec<AccountId>,
pub committed_transactions: Vec<TransactionId>,
}
Just to be clear, the change from new_nullifiers: Vec<Nullifier>
to consumed_notes: Vec<NoteId>
would mean a separate query to retrieve the consumed note ids (currently we only update the notes that match the nullifiers without returning the ids). This wouldn't be a problem no?
Just to be clear, the change from
new_nullifiers: Vec<Nullifier>
toconsumed_notes: Vec<NoteId>
would mean a separate query to retrieve the consumed note ids (currently we only update the notes that match the nullifiers without returning the ids). This wouldn't be a problem no?
I think this may be OK. With the refactoring we are discussing in https://github.com/0xPolygonMiden/miden-client/discussions/487 I think we'll be retrieving all relevant notes from the store anyways, then applying state transitions to them, and then saving them back to the store. So, the amount of work probably wouldn't be that different.
Closed by #513
What should be done?
Currently, we are just returning basic flat stats on
SyncSummary
such as number of new notes, number of committed transactions, etc. We could improve this and return IDs of each of the involved entities.How should it be done?
Gather IDs of new entities and return them in
Vec<_>
fields. The struct should look something like:When is this task done?
When we return richer information on
SyncSummary
as described above. The CLI can keep its current functionality by showing the count of each of these fields.Additional context
No response