Skip to content

NiPoPoW: fail closed when V1 branch context is unavailable - #16

Open
a-shannon wants to merge 14 commits into
mwaddip:mainfrom
a-shannon:fix/nipopow-verified-suffix-install-public
Open

NiPoPoW: fail closed when V1 branch context is unavailable#16
a-shannon wants to merge 14 commits into
mwaddip:mainfrom
a-shannon:fix/nipopow-verified-suffix-install-public

Conversation

@a-shannon

Copy link
Copy Markdown

Summary

  • Pin all Sigma dependencies to the exact 0.28 backport used by the proof verifier.
  • Validate requested parameters, genesis identity, proof-of-work, and disclosed interlink membership before a proof can reach the bootstrap flow.
  • Preserve the parsed proof envelope and exact suffix boundary through the verification interfaces.
  • Keep bounded proof construction, serving, parsing, and diagnostic inspection available.
  • Return typed chain and sync capability errors before candidate comparison or suffix installation for legacy V1 bootstrap.

V1 boundary

Legacy V1 represents sparse difficulty context as height-selected headers, but does not bind those headers as members of the branch selected by the proof. The node therefore treats V1 bootstrap authorization as unavailable: verification returns NipopowBootstrapDisabled, synchronization returns BootstrapDisabled, and processing stops before candidate comparison or state installation.

The verified-envelope, exact-suffix, and bounded context plumbing remains as non-authorizing infrastructure. A branch-authenticated V2 format is outside this change.

Coordination

Validation

  • Fresh remote replay resolved one Sigma source at 2a7f8f4132492577e1d63dbb55bc3946e0a31f5d across the root, fastsync, and indexer graphs; all three lockfiles remained byte-identical.
  • Windows: enr-chain 307/307 and strict all-target Clippy.
  • Linux, Rust 1.91.1: enr-chain 307/307, ergo-sync 109/109, root library 32/32, and strict combined all-target Clippy.
  • Root default/no-default configurations and the fastsync/indexer all-target checks passed.
  • The three running-node integration scenarios compile and remain ignored; no live-node execution is claimed.

Independent maintainer review and upstream CI are pending.

@a-shannon
a-shannon marked this pull request as ready for review August 6, 2026 22:39
@a-shannon

Copy link
Copy Markdown
Author

Review acknowledgement: many thanks to Muadib for the thorough initial security review, the reproducible test cases, and the independent re-audit of this exact head (5db724d6). The re-audit reports the prior P0/P1 findings for this surface remediated and gives this revision an APPROVE verdict. Formal maintainer review and applicable CI remain separate gates.

a-shannon pushed a commit to a-shannon/ergo-node-rust that referenced this pull request Aug 15, 2026
…ists

"Parallel validation — concurrent transaction evaluation within blocks,
pipelined across blocks" described deferred evaluation, which v0.8.0 removed.
Intra-block parallelism is unchanged; the cross-block pipeline is gone, and
what replaces it is worth stating positively — a block that reaches state.redb
has already had its scripts checked.

The at-tip figures (7.3 GB -> 1.35 GB, "~80% reduction") were measured in the
deferred era. Remeasured today on mainnet at 1.85M blocks with the same
cache_mb=1024 / synced_cache_mb=128: 1.9 GB cold sync -> 950 MB at tip. The
config the numbers came from is now stated, because without it they are not
reproducible.

The config sample gains cache_store_pct and says that cache_mb changed meaning
in v0.8.0 — it is the one breaking change an existing operator hits silently,
since the old key still parses and just means something else.

Both upstream PR sections were enumerated by hand and had drifted: on
ergo_avltree_rust mwaddip#10 and mwaddip#11 are CLOSED while listed as open, and mwaddip#13/mwaddip#14/mwaddip#16/
#24/#27 plus six merged were missing entirely; on sigma-rust #852 has merged
and #854 was closed (superseded by #876). Verified with `gh pr list`, not from
memory. At 45 open PRs the list turns over faster than a README does, so it is
now a live query plus the merged set and the curated avltree entries that
matter to this node.

Also records that upstream `develop` is frozen and `v0.30.0` is the live
integration branch — every merge landed there, so GitHub reporting all 45 open
PRs as MERGEABLE means only "mergeable into a branch nobody moves".

Checked and left alone: "38 JVM-compatible endpoints" and "43 endpoints" are
both correct (38 + 5 of our own = 43), and no operator doc or man page
documents the removed script_eval / eval_backlog_* keys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
a-shannon pushed a commit to a-shannon/ergo-node-rust that referenced this pull request Aug 15, 2026
Every "Last Active" date was wrong, and wrong in a way that mattered: the
column said Feb 2026 for the sigma-rust crates and Dec 2021 for ergo-nipopow,
while the GitHub API reports the repo last pushed 2026-08-04. a-shannon is
currently landing work in the nipopow files, so "Dec 2021" would have told a
reader that module was abandoned.

Renamed the column to "Upstream last push" and stamped the check date, because
the old header invited exactly the drift it accumulated. Also noted what the
version column actually is: the last crates.io release
(ergo-lib-v0.28.0, published 2024-08-09), NOT what the build resolves — we
consume the fork by rev. Those two numbers were silently measuring different
things.

The AVL row cited PR mwaddip#10 for the Resolver change. mwaddip#10 is closed; the live one
is mwaddip#16, and the fork now carries persistent-prover support as #27 — the commit
this release pins for.

REST API said 23 endpoints in two places; it is 43 (38 JVM-compatible plus
/debug/memory, three p2p-capture routes and /stats/p2p), which is what the
README and openapi.yaml already said.

Phase 6 said "Released as v0.4.x" with no indication four minor releases had
happened since.

ergoscript-compiler is marked available-but-unused: it resolves to nothing in
Cargo.lock, and the table is an ecosystem inventory rather than a dependency
list, so the entry stays with that stated.

sigma-ser's version was a dash; it is 0.19.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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