Skip to content

Fix testnet warp sync with trusted GRANDPA checkpoints#2849

Draft
UnArbosFive wants to merge 1 commit into
mono-bittensorfrom
fix/testnet-grandpa-warp-sync
Draft

Fix testnet warp sync with trusted GRANDPA checkpoints#2849
UnArbosFive wants to merge 1 commit into
mono-bittensorfrom
fix/testnet-grandpa-warp-sync

Conversation

@UnArbosFive

Copy link
Copy Markdown

Fix testnet warp sync with trusted GRANDPA checkpoints

Base: mono-bittensor

Depends on: RaoFoundation/polkadot-sdk#28 at commit fc504e78be7284046316c95e6e09602df4d5a490.

Summary

  • Identify testnet by its immutable genesis hash.
  • Configure justified GRANDPA checkpoints at blocks 4,589,686 (set 1) and 5,534,451 (set 3).
  • Pin all RaoFoundation Polkadot SDK dependencies to the checkpoint-aware SDK commit.
  • Leave protocol IDs and the warp-proof wire format unchanged.

Motivation

Testnet block 4,589,660 scheduled a delayed GRANDPA change with delay 3 but has no stored justification. A normal warp proof therefore cannot include that scheduling header. Blocks 4,589,686 and 5,534,451 are finalized, justified immediate-change blocks and provide safe weak-subjectivity checkpoints from which the existing verifier can continue.

Activation is keyed to the exact testnet genesis hash so local development chains and other networks are unaffected.

Rollout

  1. Publish and land the SDK PR first.
  2. Confirm its commit hash remains fc504e78be7284046316c95e6e09602df4d5a490; update this branch if the SDK PR is rebased or squash-merged so the pin names a commit permanently reachable from the target branch.
  3. Publish this PR against mono-bittensor.

The SDK change is backward-compatible and has no effect until hard-fork checkpoints are supplied. This avoids requiring an atomic two-repository deployment. Testnet checkpoint-aware proof generation becomes active when this branch resolves the new SDK dependency pin.

Verification

  • SDK checkpoint proof test passes.
  • cargo test -p node-subtensor testnet_warp_checkpoints_are_genesis_scoped_and_ordered --lib passes.
  • SKIP_WASM_BUILD=1 cargo check -p node-subtensor passes with the exact local SDK commit.
  • git diff --check passes in both repositories.
  • Live testnet RPC confirmed the genesis hash, checkpoint hashes, authority lists, immediate-change digests, and stored justifications.

Full native WASM compilation remains unavailable on the test machine because Clang lacks the wasm32-unknown-unknown C target required by zstd-sys.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
subtensor Ready Ready Preview, Comment Jul 10, 2026 6:37pm

Request Review

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH scrutiny (8-day-old account, 0 public repos, 3 lifetime contributions), mitigated by repository write permission and matching author/committer; fix/testnet-grandpa-warp-sync → mono-bittensor; no Gittensor association found.

Static review covered the genesis-scoped checkpoint activation, hard-coded GRANDPA checkpoint data, fallback behavior for other chains, and the repository-wide Polkadot SDK revision pin. The dependency remains pinned to an exact RaoFoundation commit, and no review-control files were modified.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability was found in the supplied diff. The checkpoint constants and SDK commit must still receive the stated human/upstream verification before merge.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor UNKNOWN; very new account with repository write access, so checkpoint constants and dependency consistency received heightened scrutiny.

The testnet-only behavior is correctly scoped by immutable genesis hash, preserves existing behavior for other chains, and includes a focused checkpoint-ordering test. The SDK dependency and lockfile pins are consistent at fc504e78be7284046316c95e6e09602df4d5a490; no runtime spec-version check applies to the mono-bittensor base.

No duplicate implementation was identified; overlaps are limited to shared dependency manifests. No additional tests were run because the reported targeted verification adequately covers this node-side configuration change.

Findings

No findings.

Conclusion

The implementation matches the PR description and introduces no actionable domain-correctness issues. Ensure the pinned SDK commit remains permanently reachable as described in the rollout plan.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

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