Skip to content

docs(spec): define fork-aware header chain engine#297

Draft
evan-forbes wants to merge 2 commits into
mainfrom
agent/fork-aware-header-chain-spec
Draft

docs(spec): define fork-aware header chain engine#297
evan-forbes wants to merge 2 commits into
mainfrom
agent/fork-aware-header-chain-spec

Conversation

@evan-forbes

@evan-forbes evan-forbes commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Motivation

PR #229 exposed that the current single-chain header overlay cannot safely reconcile promoted forks across header sync, full-state resets, finalization, restart, and asynchronous completion boundaries.

This draft makes the replacement contract reviewable before implementation. It also captures the consensus boundary of a headers-only client: observable header validity is not proof of transaction or state validity.

Solution

Add a normative, fork-aware header-chain engine specification that defines:

  • a durable header DAG with independent finalized, header_best, and verified_best frontiers;
  • production consensus checks, settled network-upgrade pins, contextual validation, and deterministic greatest-work fork choice;
  • mode-specific finality and bounded deterministic retention;
  • generation-aware state transitions, body-failure evidence, VCT repair, and crash recovery;
  • a versioned native v8 discovery protocol with exact auxiliary-record encoding; and
  • a conformance, differential, property, crash, protocol, resource, audit-replay, and fuzzing matrix.

This document is the redesign oracle for PR #229; it intentionally does not preserve the current patch structure.

Testing

Documentation-only change.

  • Confirmed the repository copy is byte-for-byte identical to the audited source.
  • git diff --check
  • Mechanical audit: 111 unique normative rule IDs, balanced code fences, and no TBD, TODO, or FIXME markers.

Specifications & References

Follow-up Work

Implement the engine in reviewable phases after the normative contract is accepted.

@v12-auditor

v12-auditor Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

No auditable source files found in this PR's diff.

…ation

- LC-ANCHOR-04: the release-authenticated settled-upgrade pin now applies in
  headers-only mode too, not just integrated/full-validator deployments
- New LC-V8-17: StatusV8 is the announcement mechanism — send on negotiation,
  on committed tip/anchor/cap changes (2s freshness, 1/s coalescing floor),
  and on the existing 30s status_refresh_interval; adds suite P8-07
- LC-FINAL-04: headers-only finality pins never convert into integrated
  finality; body-refuted migrated pins fail closed with destroy-and-resync
  as the documented recovery
- LC-RETAIN-01: candidate-tip cap is now the shared
  MAX_NON_FINALIZED_CHAIN_FORKS constant (currently 10) instead of 64
- LC-VAL-07: Mainnet MTP+90min bound aligned with is_max_block_time_enforced
- LC-VAL-05 now precedes LC-VAL-04, matching zakura-consensus check order
- LC-V8-03: continuation-locator carve-out; LC-V8-12: cross-anchor work
  commensurability rule; LC-DAG-03: numeric staging bounds
- Section 8.1: drop out-of-repo evidence paths, fix Header::commitment path
@evan-forbes evan-forbes added headersync anything relevant for headersync v2 p2p everything that touch the new p2p stack network breaking something that must be included with a version upgrade to a networking component such as a reactor headersync-v8 PR blocking the release of headersync-v8 labels Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

headersync anything relevant for headersync headersync-v8 PR blocking the release of headersync-v8 network breaking something that must be included with a version upgrade to a networking component such as a reactor v2 p2p everything that touch the new p2p stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant