Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

GRANDPA: Warp Sync #1208

@rphmeier

Description

@rphmeier

Assuming a

trait AncestryApi<Block> {
    // return the most recent ancestor of `at` where `ancestor.number() % 2^n == 0`.
    // OR as close as possible to it.
    // NOTE: only safe when traversing backwards from a FINALIZED block.
    fn log2ancestor(at: &BlockId, n: Block::Number) -> (Block::Number, Block::Hash);
}

What the log2ancestor proofs would be good for is warp sync.

  1. Provide a commit message with "big" ancestry proof for the most recent finalized block.
  2. walk backwards to the last handoff, doing log2-based walk. Prove as much of the handoff's commit-message ancestry with this walk as possible. For any remaining portions, prove with "big" ancestry proof.
  3. repeat 2 until the genesis or last checkpoint is reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions