Resolve "Warp sync: use WithTarget from trusted checkpoint"

Add support for warp sync from a trusted checkpoint header so nodes can skip GRANDPA proof download when a known-good checkpoint is available: Closes #464 (closed).

  • node/src/service.rs now builds warp sync config from three sources, in order:
    • --no-checkpoint keeps the previous behavior and uses the network provider
    • --warp-checkpoint-header <path> loads a trusted header from a JSON file
    • otherwise the node uses an embedded checkpoint selected from the active network feature (g1, gdev, or gtest)
  • node/src/cli.rs adds the new operator flags --warp-checkpoint-header and --no-checkpoint, and makes them mutually exclusive.
  • Embedded checkpoint files were added under node/specs/:
    • g1 and gtest now ship a concrete checkpoint header
    • gdev ships a zeroed placeholder header; the service detects this and falls back to the network provider instead of forcing an invalid target
  • scripts/update-warp-checkpoint.sh was added to refresh checkpoint files from the network specs:
    • it downloads RPC endpoints for g1, gdev, or gtest
    • picks a reference finalized head and targets finalized - 10
    • compares hashes/headers across usable RPC endpoints
    • writes the checkpoint file only when endpoints agree, or after interactive confirmation if a strict majority exists
  • scripts/README.md documents the new checkpoint update script.
Edited by Éloïs

Merge request reports

Loading