Repository navigation
feat: real monthly BTC/USD, and a pseudo- prefix for invented data - #38
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37ng
added a commit
that referenced
this pull request
Sep 8, 2026
37ng
added a commit
that referenced
this pull request
Sep 8, 2026
* feat: add accelerator fees by pool to the bitcoin post
One stacked column per month of mempool.space accelerator fees, split by
the pool that took them, from mempool-space-by-month.json. Figures are BTC
to three significant digits; the exact sats stay in the readout and in
every hover title.
The axis is linear and stays linear. A band's height is the amount that
pool took and the top of a column is the month's total. A log axis reads
better -- months run from 0.004 BTC to 2.9 -- but stacking on a log scale
plots the running total, which leaves band heights meaning nothing. The
reader zooms instead: clicking a pool refits the axis to that pool's own
months, which is the only way a pool worth a tenth of a percent gets a
readable plot. Bands get no minimum height either, so they stay exactly
proportional; a pool too small to see is still reachable from the legend.
Hovering a pool drops the other thirteen, clicking keeps it alone, and
moving across the plot sets a month cursor that rewrites the readout and
every legend figure to that month.
Pools rank by lifetime total and take palette slots in that order, so the
biggest is always the floor of the stack and a pool keeps one color
everywhere. That needed fourteen slots, so --pool-1..4 are now aliases
onto a merged --series-1..14 rather than a second palette; --pool-5 stays
its own neutral because it is the residual bucket, not a series. Existing
figures render unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* feat: animate the stack when a pool is picked out
Clicking a pool snapped to the isolated chart. The bands of the other
thirteen pools were filtered out of the tree, and a node React unmounts
cannot be tweened.
Every band now stays mounted. The ones not chosen are driven to zero
height and zero opacity, so the stack drops to the floor while the chosen
pool slides down and grows into the refitted axis. Axis labels and
gridlines are keyed by slot rather than by tick value, so they survive a
rescale and slide instead of swapping.
.chart-move carries the timing: geometry eases over 320ms, opacity over
140ms, and the inline transitionDelay staggers geometry by column while
leaving opacity at zero delay -- a hover has to dim now, not a third of a
second later. Reduced motion keeps the opacity and drops the rest.
Also drops the sats line under the BTC figure in the readout. The line
keeps its height so selecting a pool does not shift the chart.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* polish: rename the accelerator chart, use the ₿ mark, tighten the legend
- Title reads "BTC offchain fee published by mempool.space" instead of
"accelerator fees paid, by pool" -- names the source and the figure
the way the rest of the post does.
- Readout and legend rows use ₿ instead of the "BTC"/"sats" text --
bigger in the readout, dim and inline in the legend rows. The sats
line under the big figure is dropped; the readout keeps its own
height (min-h) so picking a pool does not shift the chart.
- Legend header row ("pool · every month") is dropped -- "show all"
keeps its slot on the right so removing it does not shift the grid.
- Legend goes to a fixed two-column grid; the three-column layout on
wide viewports was clipping pool names once the ₿ mark landed after
the figure.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* feat: clear the isolated pool on Escape
Escape now clears `selected`, same effect as the "show all" button,
so a keyboard user can back out of a one-pool view without a mouse.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: reserve constant height for the readout's share line
The share line and the legend's "show all" row used min-h with no
line-height, so their box grew past the reserved minimum once text
appeared, shifting the legend down. Pin height and line-height instead.
Also drop mempool-space-by-pool.json, reconstructible from
mempool-space-by-month.json, and remove the Escape-key handler for
the isolated pool view (not needed).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* feat: real monthly BTC/USD, and a pseudo- prefix for invented data (#38)
* feat: add dollar sign
* commit
* Merge branch 'main' into claude/bitcoin-mempool-diagram-b3f97f
* doc
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.
Real price data
src/posts/bitcoin/data/price.jsonis now measured, not extracted from the pseudo bars.npm run bitcoin-price(scripts/generate-bitcoin-price.mjs) fetches the daily close series from blockchain.info'smarket-pricechart and averages it per month.Shape is flat, one lookup per month:
{ "2010-08": 0.0692857, "2011-06": 19.4423, "2026-09": 79185.3 }194 months, 2010-08 to 2026-09. The series starts at 2010-08 because that is the first month with a traded price — the source reports every earlier day as
0, and those days are dropped rather than averaged in, since a zero means "no exchange yet", not a price. Values keep six significant figures, enough for both a $0.07 month and a $100k one.Cross-checked against CoinGecko over the last 12 months: the two sources agree to about 0.1%.
The script is not wired into
prebuild. A finished month never changes, and the open month would go stale between deploys anyway.pseudo-prefixInvented data now says so in its filename, so the status shows in an import line and in a directory listing, not only in a note inside the file:
bars.json→pseudo-bars.jsonoffchain-revenue-jan2023.json→pseudo-offchain-revenue-jan2023.jsonepochs.jsonand the twomempool-space-*.jsonfiles are real measurements and keep their names. Imports, theoffchain-pseudonpm script, and the doc comments that name these files are updated.npm run checkpasses with 0 errors andnpm run buildsucceeds.🤖 Generated with Claude Code