Skip to content

Verify protocol history across replay and interrupted recovery - #35

Merged
droplister merged 1 commit into
mainfrom
fix/protocol-ledger-checkpoints
Oct 4, 2026
Merged

droplister merged 1 commit into
mainfrom
fix/protocol-ledger-checkpoints

Conversation

@droplister

Copy link
Copy Markdown
Member

Counterparty can reparse protocol state without changing the Bitcoin block hash. Replay previously compared only that Bitcoin hash, so it could retain orphaned mutable state while reporting caught up.

Verify the stored ledger and message hashes as well as Bitcoin hashes, including the completed predecessor of a partial block. Persist each slice's protocol identities before writes and retain them across cursor commits/restarts. Capture a fixed parsed source anchor before fetching events and recheck it before writes; a new descendant does not invalidate it. Confirmed reparses use exact undo with a protocol-verified ancestor. Missing evidence stops replay without resetting application state.

No new migration is needed. Existing completed block hashes provide history; future slice identities use core_state. Historical incomplete blocks are not retroactively certified.

Validation: full API suite and repository checks; real SQLite regressions for completed/interrupted reparses, messages-only changes, fixed anchors during normal tip growth, missing evidence, and compact/verbose parity.

@droplister
droplister merged commit 5cc4d7c into main Oct 4, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant