fix(digstore-chain): anchor verify_pinned_root to the unforgeable launcher coin (#1473) - #33
Merged
MichaelTaylor3d merged 3 commits intoJul 22, 2026
Conversation
…uncher-anchor fix WIP anchor per §1.8 push-early. Fix in progress. Co-Authored-By: Claude <noreply@anthropic.com>
…stor root (#1473) Co-Authored-By: Claude <noreply@anthropic.com>
…ncher coin (#1473) verify_pinned_root gated only on the curried SingletonStruct.launcher_id, which DataStore::from_spend reads verbatim and Chia's singleton top-layer does not bind to the real launcher coin. An attacker could forge a singleton currying launcher_id==store_id with an arbitrary root, hint it to store_id, and get an honest node to serve that root as chain-verified (a break of the #127/NC-9/§5.3 anti-rollback invariant). Anchor identity on the launcher coin (coin_id==store_id, an unforgeable 256-bit preimage): each candidate tip must provably descend from it via a bounded backward walk of coin records, and the launcher coin must exist, be spent, and carry the singleton launcher puzzle hash. #747-immunity is preserved (only coin records are required, never intermediate spends); the per-hop SingletonLayer check is best-effort defense-in-depth. Bump 0.19.1 -> 0.19.2 (behaviour-tightening security fix). SPEC §9.1 updated. Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
marked this pull request as ready for review
July 22, 2026 00:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Fix the anti-rollback forge in
digstore_chain::verify_pinned_root(singleton.rs). Tracks super-repo issue DIG-Network/dig_ecosystem#1473 (custody / anti-rollback, MVP).The exploit (confirmed)
verify_pinned_rootfinds a tip by attacker-controllable HINT and gates only on the CURRIEDstore.info.launcher_id == store_id. Chia's singleton top-layer never binds the curried launcher_id to the real launcher coin_id, so an attacker launches a separate singleton from their OWN launcher coin (coin_id != store_id) currying launcher_id=store_id, root=R_evil, hinted to store_id -> verify returns Ok -> an honest node serves R_evil as chain-verified.sync_datastoreis immune because it STARTS from coin_record(store_id) (unforgeable) and walks the real coin graph.Fix (launcher-anchored backward walk)
Rewrite
verify_pinned_rootso trust chains to the unforgeable launcher coin:coin_record(store_id)MUST exist, be spent, puzzle_hash == SINGLETON_LAUNCHER_HASH.Tests (simulator-based)
WIP — draft. Full triple gate (reviewer + security + adversarial re-forge) before merge.
Co-Authored-By: Claude noreply@anthropic.com