Repository navigation
[UTXO-BUG] make genesis rollback atomic and re-run safe - #2060
Merged
Scottcjn merged 1 commit intoApr 4, 2026
Merged
Conversation
Owner
|
Merged. 100 RTC — High (Bounty #2819). Non-atomic rollback could corrupt state across nodes. Good defensive fix. |
This was referenced Apr 5, 2026
This was referenced May 9, 2026
Owner
|
💰 First-poster bounty paid — part of 80 RTC for Bounty #2819 split. This issue was the earliest report of its finding class on 2026-04-04. Today's first-poster ruling on Bounty #2819 (Red Team UTXO Implementation, 50-200 RTC range) split 135 RTC across the three earliest reporters; @createkr received 80 RTC as primary discoverer.
Thank you for the early diligence — your first-poster framework is now codified in the Self-Audit Credit Check policy. — auto-triage 2026-05-10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a UTXO migration safety bug where
rollback_genesis()could run without an explicit transaction boundary, making partial deletion state possible if an error occurred between the rollback steps.Root cause
rollback_genesis()performed multiple destructive DELETE operations without wrapping them in a singleBEGIN IMMEDIATE/COMMITblock and without an explicitROLLBACKon failure. That made rollback non-atomic and undermined re-run safety for genesis migration.What changed
rollback_genesis()in a singleBEGIN IMMEDIATEtransactionROLLBACKhandling on errorValidation
Added
node/test_rollback_atomicity.pywith 6 focused tests for rollback atomicity and re-run safety.Scope
node/utxo_genesis_migration.pynode/test_rollback_atomicity.pyPayout Wallet
RTC1d48d848a5aa5ecf2c5f01aa5fb64837daaf2f35