Skip to content

core: allow serialization of SyncResponse #1954

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

icota
Copy link
Contributor

@icota icota commented May 9, 2025

Description

The rationale behind this is to allow a separate instance of the same wallet be updated on a device that's not necessarily connected. Like a hardware wallet.

A connected device gets the response, serializes it with serde and passes the Update to the air-gapped one

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

@evanlinjin
Copy link
Member

@icota have you considered using ChangeSets instead? Serializing CheckPoints is a bit odd since it is a linked list and the resultant serialization would be super nested.

Also updates may have repeated elements, whereas ChangeSets only include what is changed.

@icota
Copy link
Contributor Author

icota commented May 14, 2025

@icota have you considered using ChangeSets instead?

No, I have not. Are you suggesting I use staged after apply_update to get the ChangeSet? How do I apply that on the other side?

@evanlinjin
Copy link
Member

@icota Yes. That is a good point about applying it on the other side. I forgot that bdk_wallet::Wallet does not have an apply_changeset method (whereas the core structures from bdk_chain do).

Just made a draft PR to add Wallet::apply_changeset: bitcoindevkit/bdk_wallet#231

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