Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs on ChangeSet persistence requirements #1600

Open
tnull opened this issue Sep 12, 2024 · 0 comments · May be fixed by #1844
Open

Improve docs on ChangeSet persistence requirements #1600

tnull opened this issue Sep 12, 2024 · 0 comments · May be fixed by #1844
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@tnull
Copy link
Contributor

tnull commented Sep 12, 2024

Describe the enhancement
Currently, the docs for bdk_wallet::ChangeSet are not super clear on what requirements implementations of WalletPersister need to fulfill.

In Discord, we established that:

  • Sub-ChangeSets (i.e., local_chain, tx_graph, indexer) may get persisted independently/non-atomically. I.e., in case of a persistence-failure-and-restart scenario subsequent persist calls would deliver sub-ChangeSets that are still mergable. This means that the persisted state wouldn't be corrupted by a persistence failure of one of the sub-ChangeSets.
  • However, the ordering of persistence calls might matter, as "(..) the localchain tip is used by block-by-block chain sources as a reference as to where to sync from, so I would persist that last", i.e., "I would write in this order: indexer, tx_graph, local_chain" (@evanlinjin)

It would be good to add all of these specifics and details to the ChangeSet/WalletPersister docs.
Use case
Being able to implement WalletPersister without screwing up.

@tnull tnull added the new feature New feature or request label Sep 12, 2024
@notmandatory notmandatory moved this to Discussion in BDK Wallet Sep 17, 2024
@notmandatory notmandatory added this to the 1.0.0-beta milestone Sep 17, 2024
@notmandatory notmandatory added documentation Improvements or additions to documentation and removed new feature New feature or request labels Sep 19, 2024
@notmandatory notmandatory removed this from the 1.0.0-beta milestone Nov 21, 2024
@ValuedMammal ValuedMammal added this to the 1.2.0 milestone Feb 12, 2025
@ValuedMammal ValuedMammal moved this from Discussion to Todo in BDK Wallet Feb 12, 2025
@ValuedMammal ValuedMammal self-assigned this Feb 12, 2025
@notmandatory notmandatory moved this from Todo to Needs Review in BDK Wallet Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Needs Review
Development

Successfully merging a pull request may close this issue.

3 participants