Skip to content

Verifying blocks 1–1,590,999: the root-translation DB is not enough, and what would be #399

Open

Description

@SDL-A1

Re-execution can verify the Unitrie era (#1,591,001 upward) against segbuild, and cannot touch blocks 1–1,590,999 at all — 17% of the chain, including bahamas (#3,397) and orchid (#729,000).

The reason is structural, not a tooling gap: #1,591,000 is the first block whose header carries a Unitrie root. Below it headers carry Orchid-format roots, so no Unitrie pre-state exists to seed a worker mid-chain. replay_bench refuses outright:

seed state root 0xd38547af… for #2396 is not in /srv/segbuild-ro/000-1-1591000/sealed

That refusal is correct, and distinct from a root mismatch — the full re-execution now reports it as SKIP rather than FAILURE, which it initially did not.

Why the root-translation database is not enough

We hold a mapping between Orchid roots and Unitrie roots. That lets a replay be checked at each block, but it does not let one start: verification needs the pre-state to execute against, and a root is a commitment, not the state. A recorded root also only ever checks rustock against itself — docs/trie-segments-design.md §8 is explicit:

a wrong root at #400,000 becomes permanent and every later run agrees with it. That is regression detection, not correctness

So the translation DB gives regression detection over this era, which is worth having, and not consensus verification.

What would actually close it

Options, roughly in order of cost:

  1. An Orchid trie for the era — the pre-state in its native form, so blocks can be executed and checked against the header's own Orchid root. Removes the need for any translation and makes the era verifiable like the rest. Most work, and the only option that is self-verifying.
  2. A baseline pass that also captures segments, as §8 proposes: replay 0→Security/supply chain hardening #1,591,000 once serially, record each block's computed root and write its nodes into segments. Later runs then replay the era in parallel like the Unitrie era. Cheaper, but anchored on rustock's own answers — except at Security/supply chain hardening #1,591,000 itself, which is one genuine independent comparison against the first header-carried Unitrie root.
  3. Accept the gap and document it, which is the status quo.

(1) and (2) are not exclusive: (2) makes the era fast and gap-free for regression purposes now, (1) makes it correct later.

Requirement either way

Whatever is built must integrate with the verification tool as a gap-free store, which means satisfying #398: a missing node has to abort, not read as absent. An Orchid trie assembled by the same capture-what-was-touched method as segbuild would inherit exactly the defect of #397.

Related: #397, #398, docs/trie-segments-design.md §8 and §6.9d.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions