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

update_witnesses is not enough to handle reorgs #296

Open
zoedberg opened this issue Jan 21, 2025 · 0 comments
Open

update_witnesses is not enough to handle reorgs #296

zoedberg opened this issue Jan 21, 2025 · 0 comments

Comments

@zoedberg
Copy link
Contributor

As shown by the reorg_history test in rgb-tests the update_witnesses method is not enough to handle reorgs. This is because that method is just checking and updating the WitnessOrd of the saved witnesses. But transactions sending to blinded UTXOs are not linked to each other at the bitcoin level, meaning that a transaction disappearing from the chain/mempool could invalidate bundles associated to witnesses that could have a valid WitnessOrd. This issue was discussed also in RGB-WG/RFC#10. After that discussion, a solution based on consensus ordering was considered, but a working proposal was not found.

In RGB-WG/rgb-tests#30 there's a proposal to fix this, that consists in:

  • saving a set of invalid bundles (that will be filtered out from the state), also including descendant bundles of the witnesses that became invalid
  • removing from the aforementioned set the bundles that became valid again, including their descendants if possible
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

1 participant