Skip to content

refactor: optimize historical note retrieval#2285

Open
juan518munoz wants to merge 7 commits into
nextfrom
jmunoz-optimize-historical-note-retrieval
Open

refactor: optimize historical note retrieval#2285
juan518munoz wants to merge 7 commits into
nextfrom
jmunoz-optimize-historical-note-retrieval

Conversation

@juan518munoz

Copy link
Copy Markdown
Collaborator

Notable changes:

  • Removes the manual Client::fetch_all_private_notes and replaces it with an automatic per tag backfill, so consumers no longer have to fetch history themselves after they start tracking a new tag.
  • The automatic backfill runs on every sync. Notes related to a newly tracked tag are fetched the first time it becomes tracked (after add_note_tag, an account import, or an address creation).
  • The client keeps track of already covered tags, by storing them in the settings table under note_transport_covered_tags.

Note:

This branch cherry-picks the NTL 0.4.1 upgrade from #2264, as PR landed on main and next does not have it yet, so its three commits are replayed here because the backfill depends on 0.4.1 (the block_hint delivery path).

Closes #2258

Comment thread crates/rust-client/src/sync/mod.rs Outdated
Comment on lines +165 to +166
// This drains each newly
// tracked tag from the start, fetching only that tag's own history.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be joined

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ab58f42

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.

Remove fetch_all_private_notes

3 participants