docs(fundamentals): add Architecture and Database pages#21508
Conversation
Closes two of the largest content gaps identified in the [Improving-public-docs](https://github.com/erigontech/erigon-documents/blob/master/public-docs/Improving-public-docs.md) spec: the high-level Architecture overview and the deep-dive Database / datadir page. New pages: - `/fundamentals/architecture` (sidebar_position 3) - At-a-glance ASCII component diagram - Staged Sync pipeline + Erigon 3 consolidation notes - Modular processes (Sentry/Downloader/Execution/RPC Daemon/TxPool/Caplin) - Storage model split (chaindata vs snapshots) - Embedded Caplin consensus layer - Flat KV state model + RPC-latency rationale - Prune-modes vs sync-modes clarification - `/fundamentals/database` (sidebar_position 15) - Datadir directory tree with role per folder - MDBX engine properties (no compaction, mmap reads, single-writer) - Immutable .seg snapshots + BitTorrent distribution - Per-transaction history granularity - Real Nov-2024 mainnet + bor-mainnet sizing numbers - Why chaindata/ stays small (and is recoverable from snapshots) - Tuning flags (--batchSize, --db.size.limit, --db.read.concurrency) - Safe-to-delete subdirectories table Cross-links: both pages link to each other plus existing pages (Modules, Caplin, Optimizing Storage, Hardware Requirements, Sync Modes). No content duplication with Optimizing Storage — that page covers multi-disk tiering recipes, these pages cover concepts. Sources: erigontech/erigon README "Datadir structure", "Erigon3 datadir size", "Erigon3 changes from Erigon2", "Modularity", "More Efficient State Storage" sections. llms.txt and llms-full.txt (both static/ and root copies) regenerated. Build: `pnpm run build` passes with onBrokenLinks/onBrokenAnchors: 'throw'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nnet sizing - Architecture page: ASCII component diagram → Mermaid flowchart - Database page: remove Polygon (bor-mainnet) disk-size block; we no longer maintain that chain - Add @docusaurus/theme-mermaid@^3.10.0 and enable mermaid in config - Regenerate llms-full.txt Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b4a0472 to
de8e596
Compare
Port the architecture, database, and prune-modes corrections verified against main (receipt persistence, 6 domains, full-mode rolling window, Commitment folded into Execution, blocks mode, chaindata recovery via Engine API, Mermaid edges) onto release/3.4. Regenerate llms-full.txt.
There was a problem hiding this comment.
Pull request overview
Adds two new “Fundamentals” documentation pages (Architecture + Database) and wires up Mermaid rendering in the Docusaurus site, with corresponding updates to the llms* artifacts and a prune-modes refresh.
Changes:
- Add
/fundamentals/architecture(incl. Mermaid diagram) and/fundamentals/databasepages. - Enable Mermaid support in the docs site and add the required Docusaurus theme dependency.
- Update
Prune Modescontent (EIP-8252 window framing + Blocks node section) and regeneratellms.txt/llms-full.txt(root +docs/site/static).
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| llms.txt | Add links for the new Fundamentals pages. |
| llms-full.txt | Add full text for the new pages and update prune-modes excerpt. |
| docs/site/static/llms.txt | Mirror llms.txt updates for the docs site static artifact. |
| docs/site/static/llms-full.txt | Mirror llms-full.txt updates for the docs site static artifact. |
| docs/site/package.json | Add Mermaid theme dependency for Docusaurus. |
| docs/site/package-lock.json | Lockfile updates for the Mermaid theme and its dependency tree. |
| docs/site/docusaurus.config.ts | Enable Mermaid in markdown and register the Mermaid theme. |
| docs/site/docs/fundamentals/prune-modes.md | Update prune mode retention wording and add “Blocks node” section. |
| docs/site/docs/fundamentals/database.md | New Database page content. |
| docs/site/docs/fundamentals/architecture.md | New Architecture page content incl. Mermaid diagram. |
Files not reviewed (1)
- docs/site/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@docusaurus/core": "3.10.0", | ||
| "@docusaurus/preset-classic": "3.10.0", | ||
| "@docusaurus/theme-mermaid": "^3.10.0", | ||
| "@easyops-cn/docusaurus-search-local": "^0.55.1", |
|
|
||
| A simplified pipeline: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Leaving this fence untyped intentionally. The main twin (#21500) uses the same untyped fence here, and these two PRs need to stay byte-identical — typing it as text on `release/3.4` only would create a divergence between the branches. It also renders fine as-is. If we ever want to switch these to text it should be a separate pass applied identically to both PRs. Skipping.
|
|
||
| ## The datadir at a glance | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Leaving this directory-tree fence untyped intentionally. The main twin (#21500) keeps the same untyped fence, and the two PRs need to stay byte-identical — typing it ```text on release/3.4 only would diverge from `main`. It renders fine as-is. If we want to type these fences it should be a separate, symmetric pass across both PRs. Skipping.
|
|
||
| A simplified pipeline: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Skipping — this is generated output (produced from the source docs by generate-llms.py, not hand-edited), so the fence here just mirrors the source .md. Same reasoning as the source-doc thread: the main twin #21500 keeps these untyped and the two PRs must stay consistent. Editing it here only would also break --check parity with the source.
|
|
||
| ## The datadir at a glance | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Skipping — generated output (regenerated from the source docs by generate-llms.py, not hand-edited), so the fence mirrors the source .md. The main twin #21500 keeps these untyped and the two PRs must stay consistent; editing it here only would break --check parity with the source.
|
|
||
| A simplified pipeline: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Skipping — generated output (regenerated from the source docs by generate-llms.py, not hand-edited), so the fence mirrors the source .md. The main twin #21500 keeps these untyped and the two PRs must stay consistent; editing it here only would break --check parity with the source.
|
|
||
| ## The datadir at a glance | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Skipping — generated output (regenerated from the source docs by generate-llms.py, not hand-edited), so the fence mirrors the source .md. The main twin #21500 keeps these untyped and the two PRs must stay consistent; editing it here only would break --check parity with the source.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The committed lockfile was both invalid JSON (a stray trailing `}`) and out of sync with package.json, so CI's `npm ci` failed outright. A from-scratch regen then pulled some @docusaurus/* transitive packages to 3.10.1 while the pinned ones stayed 3.10.0, which breaks Docusaurus's same-version requirement at build time. Reseeded from the main twin (#21500) lockfile — where every @docusaurus/* resolves to 3.10.0 — and reconciled to this branch's package.json with `npm install --package-lock-only`. Verified locally: `npm ci`, `npm run typecheck`, and `npm run build` all pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
We're going to release 3.5 soon, so I don't think we need to urgently backport PR #21500 to 3.4. |
Summary
llms.txt/llms-full.txt(root +docs/site/static).This is the
release/3.4counterpart of #21500 (same change againstmain). Originally bundled with #21451 / #21494 — split out into a standalone PR for clarity.Test plan
docs-site / buildcheck passes/fundamentals/architectureand/fundamentals/databaserender with the Mermaid diagram on the deployed Docusaurus preview