Skip to content

feat(schema): add pool_basis to say how a pool was identified - #7

Merged
deadmanoz merged 1 commit into
mainfrom
pool-basis
Sep 21, 2026
Merged

deadmanoz merged 1 commit into
mainfrom
pool-basis

Conversation

@deadmanoz

Copy link
Copy Markdown
Collaborator

Summary

The schema defined pool as the pool "identified from the coinbase tag", but the dataset already holds one attribution that is not a tag: 474294 carries 1Hash on the strength of contemporary reports, while its coinbase tag is /NYA/. Records being prepared need two more kinds of attribution. 363731 and 363967 pay addresses that bitcoin-data/mining-pools lists for BTC Nuggets and Bitsolo, with no tag in either coinbase, and 477115 and the three 2013 mmpool blocks are known only from reports of the time.

Rather than stretch what pool means, this change adds an optional context field, pool_basis, with exactly one of three values. tag means the pool name appears as a tag in the coinbase scriptSig. address means the coinbase payout address is listed for the pool in mining-pools. reported means only a contemporaneous report names the pool. The validator requires pool_basis whenever pool is present, rejects it when pool is absent, and rejects any other value. Like parent_kind, the field is descriptive: CI checks the value, not the attribution, which stays a review question.

All 28 existing records with a pool are backfilled. Twenty-seven become tag; each of those pool names was checked to appear byte-for-byte in the record's coinbase_scriptsig_hex. 474294 becomes reported. Nothing else in those records changes.

Testing

python -m unittest discover -s ci -p 'test_*.py' passes all 32 tests. The three new cases (pool without pool_basis, pool_basis without pool, unknown value) sit in the existing malformed-fields table, so no test function was added; the backfilled records exercise the valid values through the dataset check. Offline python ci/sanity-check.py reports 47 blocks, 47 contexts, 190 observations and 6 block files, unchanged. git diff -U0 data/invalid-blocks.jsonl touches 28 lines, and each differs from its original only by the inserted "pool_basis" entry directly after "pool"; the compact one-record-per-line JSONL formatting is preserved.

pool was defined as the pool identified from the coinbase tag, but 474294
carries 1Hash from contemporary reports and records being prepared attribute
by payout address. pool_basis takes one of tag, reported or address, is
required whenever pool is present and rejected otherwise, and is descriptive
like parent_kind. The 28 existing pool attributions are backfilled: 27 tag
(each name verified in its coinbase scriptSig) and 474294 reported.
@deadmanoz
deadmanoz merged commit 4e1c4ba into main Sep 21, 2026
1 check passed
@deadmanoz
deadmanoz deleted the pool-basis branch September 21, 2026 05:48
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