fix(testnet): restore GRANDPA finality after warp sync - #3055
fix(testnet): restore GRANDPA finality after warp sync#3055UnArbosFive wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
eco-tests changed — indexer review requiredThis PR modifies files under Changed files
|
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE VERY HIGH account-profile scrutiny (35-day-old account, 0 public repos), moderated by admin permission and substantial repository activity; no Gittensor association; targets integration branch Static review found a uniform workspace-wide replacement of the prior Polkadot SDK revision with immutable commit FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found in the supplied diff. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 UNKNOWN Gittensor association; recent account, but established repository contributor with admin permission and substantial activity. The prior description discrepancy is resolved: the body now identifies The checkpoint correction remains scoped to the exact testnet genesis hash and updates the existing exact-value tests. This is node-side only, so no runtime spec-version bump is required. PR #2971 is the only semantic overlap and lacks the complete SDK-pin repair. This PR is the better candidate. Recommend closing #2971.
FindingsNo findings. ConclusionNo actionable domain issue was found. The change is coherent, narrowly scoped, documented, and adequately validated. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
f4068f0 to
a85d83d
Compare
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Summary
cacb4310f20c7cac83eb3ccd8ed5a5ad4212608a, the stable-2506 merge commit containing the warp-finality fix from fix(grandpa): preserve warp-verified authority set polkadot-sdk#33 and the concluded-round cleanup from fix(grandpa): clean up concluded round state polkadot-sdk#31;Root cause and fix
Warp sync seeded the client-side GRANDPA voter from a hard-coded checkpoint. The checkpoint contained one authority that was not in the live authority set and asserted a set ID ahead of the live chain. A warped node could therefore advance
bestwhile rejecting live GRANDPA commits and leavingfinalizedat the warp point.The pinned SDK revision preserves the authority set verified during warp sync when initializing GRANDPA after state import. The Subtensor checkpoint must therefore match the historical chain state exactly.
The same SDK pin also repairs persistent GRANDPA state growth. On startup it removes every
current_roundsentry at or below the last completed round, including both voted and unvoted entries. Those rounds cannot be resumed after restart; retaining them only caused subsequent votes to clone and rewrite dead state.Scope and safety
The checkpoint path remains guarded by the exact testnet genesis hash. Mainnet and other chains retain their existing
InitialSetIdpath and do not consume the testnet checkpoint authority list.The stale-round cleanup is chain-agnostic but narrowly bounded: it removes only rounds already concluded according to the persisted last completed round and retains every round strictly above it. It does not change consensus rules, runtime logic, Wasm, authority rotation, block validity, or on-chain state.
SDK pin
cacb4310f20c7cac83eb3ccd8ed5a5ad4212608ais an immutable merge commit onpolkadot-stable2506-2-otf-patches. The pin includes both SDK fixes and does not depend on either feature branch remaining available.Validation
cargo metadata --locked --format-version 1 --no-depscargo fmt --all -- --checkSKIP_WASM_BUILD=1 cargo test -p node-subtensor grandpa_warp_sync --lockedgit diff --check