Skip to content

feat: batched sync notes#1941

Open
TomasArrachea wants to merge 39 commits intonextfrom
tomasarrachea-sync-notes-rework
Open

feat: batched sync notes#1941
TomasArrachea wants to merge 39 commits intonextfrom
tomasarrachea-sync-notes-rework

Conversation

@TomasArrachea
Copy link
Copy Markdown
Collaborator

@TomasArrachea TomasArrachea commented Mar 26, 2026

This PR adapts the client to the changes introduced in the SyncNotes endpoints 0xMiden/node#1843.

Before: sync_notes returned a single block per call. The client sync state was driven by the sync_notes. For each matched block, sync_chain_mmr and sync_transactions was used.

Now, the sync state works like so:

  1. get_block_header_by_number: single call to discover the chain tip.
  2. sync_chain_mmr: single call to get the full MMR delta to the chain tip.
  3. sync_notes: loop get the note updates for the block range (may be paginated).
  4. sync_transactions: single call to get all transaction updates.

Applying the sync result:

  • Apply the MMR delta, then add the chain tip block as a leaf.
  • For each note block with relevant notes, call partial_mmr.track() using the MMR auth path from the
    response.
  • Store the chain tip block header for transaction references.

@TomasArrachea TomasArrachea force-pushed the tomasarrachea-sync-notes-rework branch from 04990fe to 70213bd Compare March 27, 2026 20:54
@TomasArrachea TomasArrachea changed the base branch from next to release/v0.14.0-beta March 27, 2026 20:54
@TomasArrachea TomasArrachea force-pushed the tomasarrachea-sync-notes-rework branch from 70213bd to 31c99c3 Compare March 27, 2026 20:55
@TomasArrachea TomasArrachea changed the title WIP: batched sync notes feat: batched sync notes Apr 1, 2026
@igamigo igamigo marked this pull request as ready for review April 3, 2026 21:20
Base automatically changed from release/v0.14.0-beta to next April 4, 2026 02:29
@igamigo igamigo force-pushed the tomasarrachea-sync-notes-rework branch from 0903ee6 to 10eec01 Compare April 4, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants