Skip to content

feat(dataset): admit four 2018 AntPool parent-reuse blocks - #9

Closed
deadmanoz wants to merge 1 commit into
mainfrom
codex/antpool-parent-txs
Closed

deadmanoz wants to merge 1 commit into
mainfrom
codex/antpool-parent-txs

Conversation

@deadmanoz

@deadmanoz deadmanoz commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Four AntPool blocks from 2018, at heights 507514, 509557, 515319 and 534339, include non-coinbase transactions that their canonical parent had already confirmed, so ConnectBlock fails at CheckTxInputs with bad-txns-inputs-missingorspent. 515319 is a complete copy of its parent's 79 non-coinbase transactions; the other three carry a subset or a mix of parent transactions and new ones. The same AntPool worker mined parent and child each time, which reads as a template that updated hashPrevBlock without rebuilding the transaction list: the sibling of 584802, where the transactions were dropped and their fees kept.

No existing rule looks at the parent's transaction list, so these passed every context-free body check. The new rule already_confirmed_in_parent keeps the same reject string and requires a complete body plus a parent_txid that is a non-coinbase transaction in both the body and the canonical parent. ci/prevouts.py fetches the parent header, which must hash to prev_hash, and the parent's ordered txid list, which must reproduce that header's merkle root, then checks membership with the parent's coinbase excluded. The canonical hash at height minus one must equal prev_hash. The evidence is cached as {prev_hash}.header, {prev_hash}.txids.json and height-{n}.hash, and the workflow cache prefix moves to prevouts-v2- with v1 kept as a fallback. Only the immediate parent is considered.

Each record carries pool: AntPool with pool_basis: tag and one scrape observation citing the pinned chainquery snapshot in the mergedmonitor archive, which labels the four as invalid tips; that label started the search and is not the evidence. On 17 September 2026 a Bitcoin Core v31.1.0 node rewound to each parent returned bad-txns-inputs-missingorspent from submitblock for all four. Schema, notes and README are updated. The four rows and bodies come out of bitcoin-data/stale-blocks in a separate PR there once this is published.

Testing

All 36 tests pass, including the new cases for a parent_txid absent from the body or from the parent list, the coinbase named as parent_txid, a list that does not match the merkle root, a non-canonical prev_hash, and a missing cached list. Offline python ci/sanity-check.py reports 52 blocks, 52 contexts, 195 observations and 10 block files; with --fetch-prevouts it downloads nothing and passes. The four bodies are byte-identical to the stale-blocks copies, and the existing admissions are unchanged.

@deadmanoz deadmanoz closed this Sep 21, 2026
@deadmanoz
deadmanoz deleted the codex/antpool-parent-txs branch September 21, 2026 06:16
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