"Cockroach" recovery#18
Merged
Merged
Conversation
37dbd6f to
51f223e
Compare
Splits the sequencer into a library plus setup/run/flush subcommands, extracts the accept scheduler into a shared core compiled into both the on-chain canonical machine and the off-chain sequencer, and adds cockroach recovery — an operator-driven rebuild of a wiped or diverged DB from a trusted checkpoint plus L1. Integrates with the existing Lua watchdog. - Library + commands: `sequencer` is a pure library (binaries in examples/wallet-sequencer); `setup` / `run` / `flush-mempool` boot phases with classified exit codes for an orchestrator. - Duality: the off-chain accept-predicate and the canonical fold run the same `sequencer-core` scheduler, held in agreement by a differential test (I1). Addresses are app data — the core scheduler is address-agnostic; the app owns its sequencer addresses. - Cockroach recovery (`setup --recovery`): flush -> fold -> fill rebuilds (S', N') from a checkpoint + L1; the batch tree is anchored at the resume nonce N', and the (C, H1] suffix is executed exactly once by `run` (no double-execute, no lost deposit). Disjoint-range asserts, fail-loud partial-recovery guards, and a deferred gold frontier keep the rebuild sound. - Keyed-write safety: every L1-signing path (submitter, flush-mempool, both recovery flushes) re-verifies the RPC chain id and the key<->submitter identity immediately before signing; the long-lived submitter re-checks per send. Write-before-broadcast watermark (R1a); observed nonces folded in canonical L1 order. - Watchdog: the wallet snapshot (executed state + last_executed_safe_block) is served at GET /finalized_state; the Lua watchdog byte-compares it against an independent from-genesis cartesi-machine replay. Verified: workspace unit + integration suite, clippy -D warnings, fmt clean; canonical guest tests; e2e green (genesis + non-genesis watchdog compares, cockroach setup -> run round-trip).
51f223e to
3816539
Compare
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.
No description provided.