Skip to content

Comments

chore: docs added#536

Merged
dhyaniarun1993 merged 2 commits intounstablefrom
arun/chore/doc
Dec 19, 2025
Merged

chore: docs added#536
dhyaniarun1993 merged 2 commits intounstablefrom
arun/chore/doc

Conversation

@dhyaniarun1993
Copy link
Collaborator

No description provided.

@dhyaniarun1993 dhyaniarun1993 self-assigned this Dec 19, 2025
@dhyaniarun1993 dhyaniarun1993 added the K-docs Kind: docs label Dec 19, 2025
@dhyaniarun1993 dhyaniarun1993 marked this pull request as ready for review December 19, 2025 09:22
Copilot AI review requested due to automatic review settings December 19, 2025 09:22
@dhyaniarun1993 dhyaniarun1993 merged commit d97955f into unstable Dec 19, 2025
44 of 48 checks passed
@dhyaniarun1993 dhyaniarun1993 deleted the arun/chore/doc branch December 19, 2025 09:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive documentation for a bounded history sidecar architecture that enables reliable eth_getProof queries for historical state on Optimism rollups. The documentation explains the motivation, architecture, and usage of the new system that addresses Out-Of-Memory issues when serving historical proofs.

Key changes:

  • Complete documentation of the bounded history sidecar architecture and its core mechanisms
  • Detailed usage instructions including initialization, node operation, and management commands
  • Performance benchmarks and metrics dashboard information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Avg Latency | 15 ms
Throughput | ~5,000 req/sec

Benchmark Configuration
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading "Benchmark Configuration" should be formatted as a proper markdown heading (e.g., "### Benchmark Configuration") to maintain consistency with the document's heading structure and improve navigation.

Suggested change
Benchmark Configuration
### Benchmark Configuration

Copilot uses AI. Check for mistakes.
As described in Reth issue [#18070](https://github.com/paradigmxyz/reth/issues/18070), many applications on Optimism and other rollups (e.g. Base infrastructure, ENS, fault-proof systems) depend on fast and reliable `eth_getProof` queries within a bounded challenge window (typically 7 days). At present, the lack of reliable recent-state proof support is a blocker for broader Reth adoption in these environments.

...
The core issue lies in Reth's architecture for historical state calculation. To serve `eth_getProof` for a historical block, Reth must perform an **in-memory revert**, applying state diffs backwards from the chain tip. While efficient for recent blocks, reverting state for a block 7 days ago requires loading thousands of changesets into Memory. This operation is computationally expensive and often causes the node to crash due to **Out-Of-Memory (OOM)** errors, effectively making deep historical proofs impossible on a standard node.
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "loading thousands of changesets into Memory" has an incorrectly capitalized word. "Memory" should be lowercase "memory" as it refers to the general concept of computer memory, not a proper noun or specific entity.

Suggested change
The core issue lies in Reth's architecture for historical state calculation. To serve `eth_getProof` for a historical block, Reth must perform an **in-memory revert**, applying state diffs backwards from the chain tip. While efficient for recent blocks, reverting state for a block 7 days ago requires loading thousands of changesets into Memory. This operation is computationally expensive and often causes the node to crash due to **Out-Of-Memory (OOM)** errors, effectively making deep historical proofs impossible on a standard node.
The core issue lies in Reth's architecture for historical state calculation. To serve `eth_getProof` for a historical block, Reth must perform an **in-memory revert**, applying state diffs backwards from the chain tip. While efficient for recent blocks, reverting state for a block 7 days ago requires loading thousands of changesets into memory. This operation is computationally expensive and often causes the node to crash due to **Out-Of-Memory (OOM)** errors, effectively making deep historical proofs impossible on a standard node.

Copilot uses AI. Check for mistakes.
Comment on lines +63 to +65
- Versioned Storage: Implements MdbxProofsStorage, a specialized database schema optimized for time-series trie node retrieval.
- Proof Generation: Replaces the standard "revert-based" proof logic with a direct "lookup-based" approach.
- Pruning Logic: Implements the smart retention algorithm that safely deletes old history
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list items under "reth-optimism-trie" are missing proper formatting. These lines should be formatted as a bullet list with dashes (-) or asterisks (*) at the beginning of each line to maintain consistency with the markdown list format used elsewhere in the document.

Suggested change
- Versioned Storage: Implements MdbxProofsStorage, a specialized database schema optimized for time-series trie node retrieval.
- Proof Generation: Replaces the standard "revert-based" proof logic with a direct "lookup-based" approach.
- Pruning Logic: Implements the smart retention algorithm that safely deletes old history
- **Versioned Storage:** Implements MdbxProofsStorage, a specialized database schema optimized for time-series trie node retrieval.
- **Proof Generation:** Replaces the standard "revert-based" proof logic with a direct "lookup-based" approach.
- **Pruning Logic:** Implements the smart retention algorithm that safely deletes old history.

Copilot uses AI. Check for mistakes.
--proofs-history.prune-interval=15s
```

Configuration Flags
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading "Configuration Flags" should be formatted as a proper markdown heading (e.g., "### Configuration Flags" or "#### Configuration Flags") to maintain consistency with the document's heading structure and improve navigation.

Suggested change
Configuration Flags
#### Configuration Flags

Copilot uses AI. Check for mistakes.
--proofs-history.prune-batch-size=10000
```

`unwind-op-proofs`
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command name "unwind-op-proofs" should be formatted with backticks (i.e., unwind-op-proofs) to maintain consistency with markdown formatting standards for inline code and command names.

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +58
- Ingestion Pipeline: Subscribes to the node's canonical state notifications to capture ExecutionOutcomes in real-time.
- Diff Extraction: Isolates the specific TrieUpdates (branch nodes) and HashedPostState (leaf values) changed in each block.
- Persistence: Writes these versioned updates to the sidecar MDBX database without blocking the main datastore.
- Lifecycle Management: Orchestrates the pruning process, ensuring the sidecar storage remains bounded by the configured window.
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list items under "reth-optimism-exex" are missing proper formatting. These lines should be formatted as a bullet list with dashes (-) or asterisks (*) at the beginning of each line to maintain consistency with the markdown list format used elsewhere in the document (e.g., lines 20-22).

Suggested change
- Ingestion Pipeline: Subscribes to the node's canonical state notifications to capture ExecutionOutcomes in real-time.
- Diff Extraction: Isolates the specific TrieUpdates (branch nodes) and HashedPostState (leaf values) changed in each block.
- Persistence: Writes these versioned updates to the sidecar MDBX database without blocking the main datastore.
- Lifecycle Management: Orchestrates the pruning process, ensuring the sidecar storage remains bounded by the configured window.
* **Ingestion Pipeline:** Subscribes to the node's canonical state notifications to capture ExecutionOutcomes in real-time.
* **Diff Extraction:** Isolates the specific TrieUpdates (branch nodes) and HashedPostState (leaf values) changed in each block.
* **Persistence:** Writes these versioned updates to the sidecar MDBX database without blocking the main datastore.
* **Lifecycle Management:** Orchestrates the pruning process, ensuring the sidecar storage remains bounded by the configured window.

Copilot uses AI. Check for mistakes.

- Versioned Storage: Implements MdbxProofsStorage, a specialized database schema optimized for time-series trie node retrieval.
- Proof Generation: Replaces the standard "revert-based" proof logic with a direct "lookup-based" approach.
- Pruning Logic: Implements the smart retention algorithm that safely deletes old history
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line appears to be incomplete. The sentence "Implements the smart retention algorithm that safely deletes old history" ends abruptly without completing the thought. Consider adding a period at the end or completing the sentence with additional context about what happens after deletion.

Suggested change
- Pruning Logic: Implements the smart retention algorithm that safely deletes old history
- Pruning Logic: Implements the smart retention algorithm that safely deletes old history while preserving the configured proof window.

Copilot uses AI. Check for mistakes.

### 2. Running the Node (Syncing)

Once initialized, start the node with the --proofs-history flags to enable the sidecar service.
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence "Once initialized, start the node with the --proofs-history flags to enable the sidecar service" should use proper markdown formatting. The flag "--proofs-history" should be wrapped in backticks to maintain consistency with other command-line flags shown in the document.

Suggested change
Once initialized, start the node with the --proofs-history flags to enable the sidecar service.
Once initialized, start the node with the `--proofs-history` flags to enable the sidecar service.

Copilot uses AI. Check for mistakes.

We provide custom CLI commands to manage the proof history manually.

`prune-op-proofs`
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command name "prune-op-proofs" should be formatted with backticks (i.e., prune-op-proofs) to maintain consistency with markdown formatting standards for inline code and command names.

Copilot uses AI. Check for mistakes.
Comment on lines +134 to +137
- Syncing speed
- Sidecar storage size.
- Pruning performance.
- Proof generation latency.
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list items describing what the dashboard monitors are inconsistently formatted. The first item uses "- " (dash with three spaces) while the remaining items use "- " or "- ". All list items should use consistent spacing for proper markdown rendering.

Suggested change
- Syncing speed
- Sidecar storage size.
- Pruning performance.
- Proof generation latency.
- Syncing speed
- Sidecar storage size.
- Pruning performance.
- Proof generation latency.

Copilot uses AI. Check for mistakes.
emhane pushed a commit that referenced this pull request Jan 5, 2026
emhane pushed a commit that referenced this pull request Jan 13, 2026
emhane pushed a commit that referenced this pull request Jan 15, 2026
emhane pushed a commit that referenced this pull request Jan 20, 2026
emhane pushed a commit that referenced this pull request Jan 26, 2026
emhane pushed a commit that referenced this pull request Jan 29, 2026
emhane pushed a commit that referenced this pull request Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

K-docs Kind: docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant