Skip to content

Fix Betanet sync with seed coinbase encoding and commitments - #23

Open
ekulkisnek wants to merge 2 commits into
LayerTwo-Labs:masterfrom
ekulkisnek:fix/betanet-coinbase-compat
Open

ekulkisnek wants to merge 2 commits into
LayerTwo-Labs:masterfrom
ekulkisnek:fix/betanet-coinbase-compat

Conversation

@ekulkisnek

Copy link
Copy Markdown

Betanet synchronization from seed.beta.ecash.eu.com:4013 fails 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:

  • All 317 release library tests pass, invoked through PicoLisp/Pilog.
  • Release node build succeeds.
  • Fresh-database native synchronization accepted 193 blocks, reaching 3107822da7a235f7308ea1655fde362449cacb978741b0e38fe42792659372dd.
  • Read-only export checked contiguous sidechain links and canonical parent coinbase commitments, header hashes and transaction Merkle roots for all 193 blocks (parent heights 968992–969901).

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.

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.
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