Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions CLAUDE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"verify": "npm run format:check && npm run check && npm run build && npm test",
"art": "node scripts/generate-art.mjs",
"bitcoin-epochs": "node scripts/generate-bitcoin-epochs.mjs",
"offchain-pseudo": "node scripts/generate-offchain-pseudo.mjs src/content/posts/bitcoin/offchain-revenue-jan2023.json",
"offchain-pseudo": "node scripts/generate-offchain-pseudo.mjs src/content/bitcoin/data/offchain-revenue-jan2023.json",
"test": "tsx --test src/**/*.test.ts"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-art.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Turns a full-size master in `art-src/` into the one committed webp the site
* builds from, in `src/assets/`. Subdirectories are mirrored, so a master at
* `art-src/bitcoin/bg.png` becomes `src/assets/bitcoin/bg.webp` — one folder
* per post, matching `src/content/posts/`.
* per post, matching `src/content/`.
*
* Why this exists rather than handing the master to Astro: a master is tens of
* megabytes of lossless pixels, and committing one puts it in git history
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-bitcoin-epochs.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/**
* Updates src/content/posts/bitcoin/epochs.json — one row per *finished* halving epoch,
* Updates src/content/bitcoin/data/epochs.json — one row per *finished* halving epoch,
* aggregated from public history, plus the average BTC/USD needed to say what
* that epoch's own tx fees were worth at the time.
*
Expand Down Expand Up @@ -45,7 +45,7 @@ import { access, readFile, writeFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";

const OUT = fileURLToPath(
new URL("../src/content/posts/bitcoin/epochs.json", import.meta.url),
new URL("../src/content/bitcoin/data/epochs.json", import.meta.url),
);
// The protocol's own constants — a halving every 210,000 blocks, subsidy
// halving each time from 50 BTC. Deriving epoch heights and subsidies from
Expand Down
6 changes: 3 additions & 3 deletions src/components/HeroStage.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { BitcoinCoin3D } from "./diagrams/BitcoinCoin3D";
import BitcoinTimeline from "./diagrams/BitcoinTimeline.astro";
import { PrologueSheet } from "./stages/PrologueSheet";
import { BitcoinCoin3D } from "@/content/bitcoin/diagrams/BitcoinCoin3D";
import BitcoinTimeline from "@/content/bitcoin/diagrams/BitcoinTimeline.astro";
import { PrologueSheet } from "@/content/prologue/PrologueSheet";
import { backdropFor, type StageSummary } from "@/lib/stage";
import { cardNo } from "@/lib/fan";

Expand Down
2 changes: 1 addition & 1 deletion src/components/PostsFan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
subscribeStage,
} from "@/lib/stage";
import { cardNo, sortCurated } from "@/lib/fan";
import { PrologueSheet } from "@/components/stages/PrologueSheet";
import { PrologueSheet } from "@/content/prologue/PrologueSheet";

export interface PostSummary {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { glob } from "astro/loaders";
import { z } from "astro/zod";

const posts = defineCollection({
loader: glob({ pattern: "**/*.mdx", base: "./src/content/posts" }),
loader: glob({ pattern: "**/*.mdx", base: "./src/content" }),
schema: ({ image }) =>
z.object({
title: z.string(),
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Both homes — the bitcoin stage and the bitcoin post — go through this rather
* than the island directly, so the hydration directive stays one decision
* instead of two. Every figure is static, read from `src/lib/bitcoin-months.json`
* instead of two. Every figure is static, read from `data/bars.json` beside it
* at build time — nothing is fetched in the browser.
*/
import { BitcoinTimeline } from "./BitcoinTimeline";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ description: "Pools, farms and miners"
date: "2026-07-28"
feat: true
tags: ["bitcoin", "crypto", "cryptocurrency"]
stageImage: "../../../assets/bitcoin/bg.webp"
stageImage: "../../assets/bitcoin/bg.webp"
color: "#F7941D"
stageTone: "dark"
---

import BitcoinTimeline from "@/components/diagrams/BitcoinTimeline.astro";
import FlagRateMempool from "@/components/diagrams/FlagRateMempool.astro";
import FlaggedBlocks from "@/components/diagrams/FlaggedBlocks.astro";
import PoolFlagHeatmap from "@/components/diagrams/PoolFlagHeatmap.astro";
import { OffchainRevenue } from "@/components/diagrams/OffchainRevenue";
import BitcoinTimeline from "./diagrams/BitcoinTimeline.astro";
import FlagRateMempool from "./diagrams/FlagRateMempool.astro";
import FlaggedBlocks from "./diagrams/FlaggedBlocks.astro";
import PoolFlagHeatmap from "./diagrams/PoolFlagHeatmap.astro";
import { OffchainRevenue } from "./diagrams/OffchainRevenue";


<BitcoinTimeline variant="post" />

Bitcoin's subsidy havles every 210000 blocks(~4 years). By the time of 33 halving(~year 2140), it will shrink to 0. Then transaction fee will be the only compensation for maintaining the network.

Expand Down Expand Up @@ -65,3 +65,4 @@ The numbers here are placeholder data.

<OffchainRevenue client:visible />

<BitcoinTimeline variant="post" />
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/bitcoin-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* of history — which also means nothing here is fetched at runtime, and no
* figure on the chart can be unavailable.
*/
import barData from "@/content/posts/bitcoin/bars.json";
import barData from "@/content/bitcoin/data/bars.json";

export interface Bar {
/** The first block this bar covers; it covers `BLOCKS_PER_BAR` of them. */
Expand Down
2 changes: 1 addition & 1 deletion src/lib/offchain-revenue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* listed; `totalBlocks` and `blocksPerDay` carry the blocks that were not
* flagged, which is what the coverage rail is drawn from.
*/
import data from "@/content/posts/bitcoin/offchain-revenue-jan2023.json";
import data from "@/content/bitcoin/data/offchain-revenue-jan2023.json";

export interface FlaggedBlock {
/** Block height. */
Expand Down