feat: vote-hash supermajority engine with skip-path solver#219
Open
7layermagik wants to merge 3 commits intodevfrom
Open
feat: vote-hash supermajority engine with skip-path solver#2197layermagik wants to merge 3 commits intodevfrom
7layermagik wants to merge 3 commits intodevfrom
Conversation
Adds the core fork choice engine: - Vote-hash supermajority accumulator with 2/3+1 stake detection, early-exit confirmation, and configurable timeout (32 slots) - BFS skip-path solver that finds valid block/skip decision sequences from a parent bankhash to the vote-confirmed target hash - Consensus coordinator bridging the engine and solver Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrates the supermajority engine into the replay loop: - Bankhash mismatch detection with enriched JSON artifacts - Chain verification failure detection and logging - Epoch boundary handling with authorized voters refresh - Configurable halt/warn policy via config.toml - Artifacts written to per-run log directory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 tests covering: - Supermajority detection (early confirm, timeout, partial votes) - IsBankhashCorrect and GetSupermajorityHash query semantics - Skip-path solver (single/multi block, empty, depth, mismatch) - Consensus coordinator (resolve range, wait, no-path, policy) - Vote stake accumulator (threshold, dedup, multi-hash) - Epoch data snapshot consistency at SubmitBlock time Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9297e88 to
fe9fdea
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.
Summary
UseBlockdecisionshalt/warnpolicySubmitBlocktime for consistent stake views, refreshes authorized voters cache at epoch transitionsKey design decisions
VoteConfirmationTimeoutSlots = 32— slots without supermajority after timeout yieldNoSupermajorityNeedWait, not silent skipCommits
35d6fb1— Core engine: supermajority accumulator, skip-path solver, consensus coordinatore349ddf— Replay integration: wiring, diagnostic artifacts, config, epoch boundary handlingfe9fdea— Test coverage: 25 tests across all components🤖 Generated with Claude Code