Reject compromised blocks and harden rollback recovery - #10
Draft
Frozen wants to merge 2 commits into
Draft
Conversation
Greptile SummaryThe PR adds an exact shard, height, and hash denylist for two compromised mainnet blocks and enforces it across consensus verification and blockchain ingress paths.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| consensus/engine/rejected_block.go | Defines exact denylist entries and the shared validation error used by consensus and storage paths. |
| internal/chain/engine.go | Applies denylist validation to header, signature, and cross-link verification. |
| core/blockchain_impl.go | Enforces rejection across block ingress paths and fixes the previously reported TiKV fast-forward bypass before head mutation. |
| core/epochchain.go | Prevents denylisted blocks from entering or becoming heads of the epoch chain. |
| core/block_validator.go | Rejects denylisted blocks during body validation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Incoming block or header] --> B{Exact shard, height, and hash denylisted?}
B -- Yes --> C[Return ErrRejectedBlock]
B -- No --> D[Continue consensus or ingress validation]
C --> E[Do not update canonical or in-memory heads]
D --> F[Normal verification and persistence]
Reviews (3): Last reviewed commit: "Reject compromised mainnet block hashes" | Re-trigger Greptile
Frozen
force-pushed
the
fix/reject-incident-block-hashes
branch
from
August 12, 2026 21:04
8ffebca to
0fdb087
Compare
Frozen
force-pushed
the
fix/reject-incident-block-hashes
branch
from
August 12, 2026 21:08
0fdb087 to
14bd82d
Compare
Frozen
marked this pull request as draft
August 12, 2026 21:15
Pin the retained block hash and state root on shards 0 and 1, reject abandoned incident ancestry on mainnet, revalidate cached consensus blocks, and require canonical staged-sync progress. Re-run incoming receipt proof validation even when import skips header verification.
Frozen
force-pushed
the
fix/reject-incident-block-hashes
branch
from
August 13, 2026 02:15
0db0e68 to
5972a9a
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
92730036and shard 1 block94978279by exact hash92730035and shard 1 block94978278MaxBlocksPerSyncCyclewiring was split into #12.[Test]
go test -mod=readonly ./consensus/engine ./internal/chain ./consensus ./core ./api/service/synchronize/stagedstreamsyncgo vet -mod=readonly ./consensus/engine ./internal/chain ./consensus ./core ./api/service/synchronize/stagedstreamsyncgit diff --check origin/main...HEAD