Fix Betanet sync with seed coinbase encoding and commitments - #23
Open
ekulkisnek wants to merge 2 commits into
Open
ekulkisnek wants to merge 2 commits into
ekulkisnek wants to merge 2 commits into
Conversation
Port coinbase commitments from octobocto/truthcoin-dc be914276 and database guards from e9eaa8ff. Preserve PR22 network and reorg tests; add a captured Betanet genesis response regression.
…e-compat # Conflicts: # lib/types/mod.rs
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.
Betanet synchronization from
seed.beta.ecash.eu.com:4013fails on the genesis block response because PR #22 expects a plain coinbase output vector, while the seed sends a coinbase memo followed by outputs. The old decoder reads output bytes as a transaction enum (762577616, expected< 5).Port the upstream coinbase representation, Merkle commitments and coinbase outpoint identities from octobocto/truthcoin-dc be914276, plus database compatibility guards from e9eaa8ff. Update affected state, wallet, RPC and GUI consumers. Preserve current master’s nested block JSON and PR #22’s network/reorg tests.
Add a captured 157-byte Betanet genesis response regression: byte-exact round trip, known BMM header hash, matching body Merkle root, and rejection of a changed memo commitment. Simply skipping the memo is insufficient because the old Merkle algorithm produces the wrong root. No validation bypass is introduced. Diagnostic capture tooling remains local and is not part of this PR.
Validation:
3107822da7a235f7308ea1655fde362449cacb978741b0e38fe42792659372dd.This changes serialized consensus/storage identities. Use a fresh data directory; pre-0.18.0 databases are rejected. Existing 0.18.0 version labels alone do not prove a database was created with these commitments. Runtime evidence establishes recovery against the observed seed history, not full Bitcoin consensus proof qualification or an independent audit.