Skip to content

Say which blocks the mining means were taken over - #45

Merged
bitcoinuniverseadmin merged 7 commits into
developfrom
agent/mempool-mining-denominator
Aug 31, 2026
Merged

Say which blocks the mining means were taken over#45
bitcoinuniverseadmin merged 7 commits into
developfrom
agent/mempool-mining-denominator

Conversation

@bitcoinuniverseadmin

Copy link
Copy Markdown

Consumes the two fields added in bitcoinuniverseio/backend-apis#104, which is merged and deployed.

What was wrong

The Mining page printed this under the reward figures:

Means are measured over the last 960 collected blocks.

The mean was not measured over 960 blocks. A Zcash miner may pay its own share to a shielded address, and then neither the reward nor the fees can be derived from public data. The overlay leaves those blocks out of the mean rather than counting them as zero, which is right, and the sentence named a denominator the figure did not have.

Measured on the production history store: 643 of 19,318 recorded Zcash blocks carry no reward, spread evenly across every thousand-block bucket. About three percent of every window.

What it says now

When the counts and the window agree, exactly what it said before. When they do not:

The window is the last 960 collected blocks. The mean total reward is taken over the 931 of them that state one, and the mean fees over 931. A block whose reward cannot be derived from public data is left out of the mean rather than counted as zero.

Both fields are optional. Against an overlay released before they existed, readMeanBasis reports the window alone, which is the reading this page had and is still true.

Tests

mean-basis.spec.ts, seven cases: the agreeing window, each of the two narrower on its own, a window where nothing could be read, an overlay publishing neither, no window at all, and a count that is not a whole number.

npx vitest run src/app/universe    417 passed, 28 files
npx tsc --noEmit                   clean
npx eslint (changed files)         clean
node scripts/universe/check-text.mjs  pass

The Zcash visual fixture carries 931 of 960 so the matrix renders the sentence that only appears when the denominators differ. The Dogecoin one keeps an agreeing window, because every Dogecoin coinbase is transparent.

🤖 Generated with Claude Code

Bitcoin Universe and others added 7 commits August 30, 2026 19:14
The Mining page printed "Means are measured over the last 960 collected
blocks" under a mean reward that was not measured over 960 blocks. A Zcash
miner may pay its own share to a shielded address, and then neither the
reward nor the fees can be derived from public data; the overlay leaves
those blocks out of the mean rather than counting them as zero, which is
right, and about three percent of every Zcash window is such a block. The
sentence named a denominator the figure did not have.

The overlay now publishes the two counts, so the page states them: the
window, then the blocks the reward mean was taken over and the blocks the
fee mean was taken over, and one line saying why the numbers differ. When
they do not differ it says what it always said.

Both fields are optional. An overlay released before they existed sends
neither, and then `readMeanBasis` reports the window alone, which is the
reading this page had before and is still true. Seven cases cover the
agreeing window, each of the two narrower on its own, a window where
nothing could be read, an overlay that publishes neither, no window at
all, and a count that is not a whole number.

The Zcash visual fixture carries 931 of 960 so the matrix renders the
sentence that only appears when the denominators differ; the Dogecoin one
carries an agreeing window, because every Dogecoin coinbase is
transparent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bitcoinuniverseadmin
bitcoinuniverseadmin merged commit cb707e2 into develop Aug 31, 2026
8 of 11 checks passed
@bitcoinuniverseadmin
bitcoinuniverseadmin deleted the agent/mempool-mining-denominator branch August 31, 2026 01:41
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