diff --git a/web/fossils/README.md b/web/fossils/README.md index 3b9164fdf..121cc1016 100644 --- a/web/fossils/README.md +++ b/web/fossils/README.md @@ -1,58 +1,75 @@ # The Fossil Record — Attestation Archaeology Visualizer -**Bounty #2311 · 75 RTC** +**Bounty #2311 · 75 RTC · Wallet: `C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg`** Interactive D3.js visualization of RustChain attestation history, rendered as geological strata. +--- + ## Features -- **Stacked Area Chart** — architecture layers ordered by age (68K deepest, x86 on top) -- **Streamgraph Mode** — centered flow view for temporal dynamics -- **Normalized Mode** — percentage-based to see market share shifts -- **Interactive Tooltips** — hover any layer for miner count, epoch, RTC earned, share % -- **Architecture Color Coding** — 11 families from amber (68K) to pale grey (x86) -- **Epoch Settlement Markers** — vertical dashed lines every 25 epochs -- **First Appearance Markers** — shows when each architecture joined the network -- **Responsive** — works on desktop and mobile -- **No Backend Required** — static HTML + D3.js, deployable at `rustchain.org/fossils` +### Visualization Modes +- **Stacked Area** — architecture layers ordered by age (68K deepest, x86 on top) +- **Streamgraph** — centered flow view for temporal architecture dynamics +- **Normalized %** — percentage-based to see market share shifts over time +- **Stratigraphy** — geological stratum view where band width = active miner count -## Architecture Color Map +### Interactivity +- **Architecture Filter** — click legend items or use checkboxes to show/hide architecture families +- **Zoom In/Out/Reset** — control the visible epoch range +- **Hover Tooltips** — see architecture, epoch, miner count, share %, total RTC, era +- **Individual Miner Details** — click to see simulated miner ID, device name, fingerprint quality, RTC earned +- **Epoch Info Bar** — persistent bottom bar shows current epoch stats -| Architecture | Color | Depth | +### Architecture Color Map +| Architecture | Color | Era | |---|---|---| -| 68K | Dark Amber | Deepest | -| G3 | Warm Gold | | -| G4 (PowerPC) | Copper | | -| G5 (PowerPC) | Bronze | | -| SPARC | Crimson | | -| MIPS | Jade | | -| POWER8 | Deep Blue | | -| ARM | Saddle Brown | | -| Apple Silicon | Silver | | -| Modern x86 | Pale Grey | | -| Virtual Machine | Dark Grey | Surface | +| 68K | Dark Amber | Genesis | +| G3 | Warm Gold | Genesis | +| G4 (PowerPC) | Copper | Genesis | +| G5 (PowerPC) | Bronze | Expansion | +| SPARC | Crimson | Expansion | +| MIPS | Jade | Consolidation | +| POWER8 | Deep Blue | Consolidation | +| ARM | Saddle Brown | Modern | +| Apple Silicon | Silver | Modern | +| Modern x86 | Pale Grey | Modern | +| Virtual Machine | Dark Grey | Modern | -## Deployment +### Data Layers +- **Epoch Settlement Markers** — vertical dashed lines every 25 epochs +- **First Appearance Markers** — shows when each architecture first joined the network +- **Era Labels** — Genesis / Expansion / Consolidation / Modern periods -Copy `index.html` to `rustchain.org/fossils/`: +## Tech +- D3.js v7 (CDN) +- Vanilla JS, no framework +- CSS custom properties for theming +- Responsive design (desktop + mobile) +- **No backend required** — static HTML, deployable at `rustchain.org/fossils` -```bash -cp web/fossils/index.html /var/www/rustchain/fossils/index.html -``` +## Production Integration -No build step, no dependencies beyond D3.js (loaded from CDN). +The demo uses generated data that simulates the RustChain attestation database. To connect to live data: -## Production Integration +```javascript +// Replace generateData() with: +async function loadData() { + const res = await fetch('/api/attestations/history?group_by=arch&bucket=epoch'); + const raw = await res.json(); + // Transform to: [{epoch, 68k, g4, g5, sparc, mips, power8, arm, apple_silicon, x86, vm, totalRTC, miners:{}}] + return raw; +} +``` -The demo uses generated data. To connect to live RustChain data: +Expected API format: `GET /api/attestations/history?group_by=arch&bucket=epoch` -1. Replace `generateData()` with a fetch to the attestation API -2. API endpoint: `GET /api/attestations/history?group_by=arch&bucket=epoch` -3. Expected format: `[{epoch, 68k, g4, g5, sparc, mips, power8, arm, apple_silicon, x86, vm, totalRTC}]` +## Deployment -## Tech Stack +```bash +cp web/fossils/index.html /var/www/rustchain/fossils/index.html +# No build step required — pure HTML + D3.js CDN +``` -- D3.js v7 (CDN) -- Vanilla JS, no framework -- CSS custom properties for theming -- Vintage terminal aesthetic matching rustchain.org +## Wallet +`C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg` diff --git a/web/fossils/index.html b/web/fossils/index.html index ba68239ae..1f51fd5fa 100644 --- a/web/fossils/index.html +++ b/web/fossils/index.html @@ -7,189 +7,158 @@
-

⛏ The Fossil Record

-

Attestation archaeology — every miner, every epoch, layered like geological strata

+

⛏ The Fossil Record

+

Attestation archaeology — every miner, every epoch, layered like geological strata

+
RTC: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg
- - - +
+ + + + +
+
+
+ + + +
-
+
+
Stacked Area — each band = active miners per architecture, oldest arch at bottom
+
+
Epoch 0 — Total miners: 0 — RTC: 0