Say which blocks the mining means were taken over - #45
Merged
Conversation
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>
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.
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:
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:
Both fields are optional. Against an overlay released before they existed,
readMeanBasisreports 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.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