One tree, one active state
Blocks records accepted branches. UTXO belongs to exactly Tip.
Prediction: can a stored sibling spend an output missing at the active tip? Yes, if it exists at that sibling's parent.
1 / 6
Blocks records accepted branches. UTXO belongs to exactly Tip.
Prediction: can a stored sibling spend an output missing at the active tip? Yes, if it exists at that sibling's parent.
G(1) → A(2) → C(2) totals 5.
G(1) → B(3) → D(2) totals 6.
D wins; G is the fork. Equal work retains the current tip.
Here reorg=true also includes an ordinary extension.
Active {c:35} → undo C {a:40} → undo A {g:50}
→ apply B {b:45} → apply D {d:42}.
Why not apply D first? Its input b is not present yet. The common ancestor is never disconnected.
Inside one block: g → x → y.
Final {y}; after rollback {g}.
Restoring every consumed input would incorrectly resurrect x.
Save only consumed outputs that predate the block.
Candidate transaction 1 succeeds; transaction 2 spends an unknown output.
Do all work on a private parent view. On failure, discard it. On success, store metadata; publish UTXO and tip only if the candidate wins. Never leave a rejected ID in the accepted-block map.
Known valid ID: no-op. Unknown parent: reject. Work overflow: reject.
This is in-memory validation, not crash recovery or full Bitcoin consensus.
Explain why changing only Tip cannot repair a partially mutated UTXO map.