The active chain and most-work chain determine which blocks form the node's current chain view.
Connecting a block consumes referenced outputs and creates new outputs; disconnecting reverses those state transitions.
A full corruption/recovery test needs controlled interruption and direct database verification on the exact VTA release.
| Area | Finding | Status |
|---|---|---|
| Block index | The reviewed VTA source maintains a block index and tracks chain state used for active-chain selection. | Source verified |
| Most-work selection | The previously reviewed chain comparator orders candidates by chain work, with sequence ordering used as a secondary field. | Source verified |
| Active chain | chainActive represents the selected active chain in the reviewed source. | Source verified |
| UTXO connect | Block connection updates spendable-output state by consuming inputs and adding new outputs. | Architecture/source path |
| UTXO disconnect | Reorganization handling requires reversing old-chain state before applying the competing chain. | Architecture/source path |
| Persistent database | VTA's wallet/data directories include persistent blockchain state, but this audit does not claim a live forensic inspection of the user's chainstate database. | Not directly inspected |
| LevelDB internals | Exact database key schema, batching and flush semantics require release-pinned source tracing. | Needs source pin |
| Crash consistency | No controlled process-kill / restart experiment was performed during a block-state update. | Not measured |
| Corruption recovery | No deliberate chainstate corruption or recovery/reindex test was executed. | Not measured |
| Snapshot consistency | A copied database should only be treated as a valid snapshot if the copy procedure and node state are controlled. | Operational rule |
1. Pin exact VTA Core release / commit. 2. Identify chainstate DB implementation and key schema. 3. Start from a disposable synchronized test node. 4. Record active-chain tip and selected UTXO set. 5. Connect a controlled test block. 6. Verify expected UTXO additions/removals. 7. Perform a controlled reorg on a private test network. 8. Verify DisconnectBlock reverses old state. 9. Verify ConnectBlock applies new state. 10. Stop/restart during controlled state updates. 11. Run reindex/recovery procedure. 12. Compare final chain tip + UTXO state with the clean reference node.