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

Handle reorgs #14

Open
cygnet3 opened this issue Feb 7, 2024 · 5 comments
Open

Handle reorgs #14

cygnet3 opened this issue Feb 7, 2024 · 5 comments

Comments

@cygnet3
Copy link
Owner

cygnet3 commented Feb 7, 2024

We should handle block reorgs when managing our owned outputs. Nakamoto has some built-in stuff for tracking scripts across reorgs (https://docs.rs/nakamoto-client/0.4.0/nakamoto_client/handle/trait.Handle.html#method.watch), maybe we could use that. However, we also need to make sure that we reset the 'scan' progress when blocks get reorged.

@aruokhai
Copy link

Hey, can i work on this .

1 similar comment
@aruokhai
Copy link

Hey, can i work on this .

@cygnet3
Copy link
Owner Author

cygnet3 commented Nov 13, 2024

Extra help would be very much appreciated!

The description of this issue is very outdated. There's basically 2 things that need to happen I think:

  1. We need some way to ask blindbit-oracle if we are currently on the correct chain and if not, how many blocks ago a chain split occurred
  2. If a chain split occurred on block height n, we should delete all the data after block height n, reset the scan height to n, and scan to the new chain tip

I think (1) is quite difficult requires some help from the blindbit developer (setavenger), but we could probably already do (2).

So if you want to work on it, maybe you could start with (2)?

@cygnet3
Copy link
Owner Author

cygnet3 commented Nov 13, 2024

I also added a similar issue to the Dana wallet repository (a wallet we're working on that consumes sp-client): cygnet3/danawallet#80.

@aruokhai
Copy link

Sure, I would get started on working on (2), would also check out Dana Wallet

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

No branches or pull requests

2 participants