Skip to content

Conversation

@luiz-lvj
Copy link
Collaborator

@luiz-lvj luiz-lvj commented Jan 28, 2026

This PR updates docs on ERC7888 and its components

Summary by CodeRabbit

  • Documentation
    • Expanded comprehensive documentation covering Broadcaster, Receiver, and StateProver components with architectural details and integration workflows.
    • Added chain-specific guides with verification examples for Arbitrum, Linea, Optimism, Scroll, Taiko, and ZkSync.
    • Reorganized documentation structure with clearer navigation, quick-start flows, and detailed usage examples for cross-chain messaging.
    • Added security considerations and finality characteristics documentation.

✏️ Tip: You can customize this high-level summary in your review settings.

@luiz-lvj luiz-lvj requested a review from frangio January 28, 2026 22:02
@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

This pull request adds comprehensive documentation for the cross-chain broadcaster ecosystem, including new documentation files for Broadcaster, Receiver, and StateProvers components, plus chain-specific prover documentation for Arbitrum, Linea, Optimism, Scroll, Taiko, and ZkSync. The old ERC-7888 documentation is removed and the main README is reorganized for improved navigation.

Changes

Cohort / File(s) Summary
Core Component Documentation
docs/BROADCASTER.md, docs/RECEIVER.md, docs/PROVERS.md
New comprehensive documentation for Broadcaster contract (storage slot calculation, deduplication, IBroadcaster interface), Receiver contract (Routes, verification workflow, error handling), and StateProver ecosystem (architecture, IStateProver interface, operating modes, upgrade mechanisms, StateProverCopies, ProverUtils)
Chain-Specific Prover Documentation
docs/provers/ARBITRUM.md, docs/provers/LINEA.md, docs/provers/OPTIMISM.md, docs/provers/SCROLL.md, docs/provers/TAIKO.md, docs/provers/ZKSYNC.md
New documentation for six chain-specific prover implementations, each detailing architecture, ChildToParentProver and ParentToChildProver configurations, public functions, input/output encodings, verification flows, and usage examples
Documentation Index
docs/README.md
Reorganized main documentation with expanded Overview, Core Components table, Documentation Index, Quick Start examples, Chain-Specific Provers table, and Security Considerations section; updated references to new documentation structure
Deprecated Documentation
docs/ERC7888.md
Removed entire ERC-7888 documentation file (299 lines); content superseded by new BROADCASTER.md, RECEIVER.md, and PROVERS.md documents

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Suggested reviewers

  • pepebndc
  • nahimterrazas
  • frangio

Poem

🐰 A burrow of docs, organized and neat,
Broadcasters and provers, verification complete!
From Arbitrum to ZkSync, each chain finds its way,
With clarity and structure, hooray, hooray! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update docs' is too vague and generic. While the PR does update documentation, it doesn't convey what specific documentation changes or the scope of the updates (new docs, deletions, reorganization). Use a more descriptive title that indicates the main change, such as 'Reorganize documentation structure and add comprehensive prover/broadcaster docs' or 'Restructure docs with new Broadcaster, Receiver, and chain-specific Prover documentation'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@docs/PROVERS.md`:
- Around line 98-101: The fenced diagram blocks (e.g., the block containing
"Route Address → StateProverPointer → StateProver (fixed) (fixed) (upgradeable)"
and the other ASCII diagrams around the other mentioned sections) lack a
language tag; update each triple-backtick fence to include a language identifier
such as text (e.g., change ``` to ```text) so markdownlint MD040 is satisfied
for all occurrences (including the blocks corresponding to the other diagram
regions noted). Ensure you add the same tag to every matching fenced diagram in
the file.

In `@docs/provers/LINEA.md`:
- Around line 7-38: The fenced ASCII diagram block (the triple-backtick block
that begins with the box-drawing characters "┌────────────────" and contains the
"Ethereum (L1)" / "Linea (L2)" diagram) is missing a language tag; update that
fence to include a language hint (e.g., change ``` to ```text) so the block
becomes a labeled code fence (```text ... ```).

In `@docs/provers/OPTIMISM.md`:
- Around line 7-41: The fenced diagram blocks in OPTIMISM.md are missing
language identifiers, causing markdownlint warnings; update each triple-backtick
fence around the ASCII diagrams (the blocks containing "AnchorStateRegistry",
"FaultDisputeGame", "OutputRootProof", and the "L1Block Predeploy" diagram
including the 0x420000... address) to include a language tag (e.g., ```text or
```ascii) so the linter recognizes them as code blocks and the warnings are
resolved.

In `@docs/provers/TAIKO.md`:
- Around line 12-18: The docs incorrectly show Checkpoint struct storing
blockNumber, blockHash, and stateRoot; update the description and storage layout
to reflect Taiko's actual SignalService where the mapping key (blockNumber) is
not stored in the struct and the struct (CheckpointRecord/Checkpoint) contains
only bytes32 blockHash at slot+0 and bytes32 stateRoot at slot+1; modify all
affected sections (including the examples around the Checkpoint/CheckpointRecord
mapping and the referenced ranges) to remove blockNumber from the struct layout
and clarify that blockNumber is the mapping key used for slot derivation.

Comment on lines +98 to +101
```
Route Address → StateProverPointer → StateProver
(fixed) (fixed) (upgradeable)
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language tags to fenced diagram blocks.

These fenced blocks are missing language identifiers per markdownlint (MD040).

Also applies to: 183-192, 261-290

🤖 Prompt for AI Agents
In `@docs/PROVERS.md` around lines 98 - 101, The fenced diagram blocks (e.g., the
block containing "Route Address → StateProverPointer → StateProver (fixed)
(fixed) (upgradeable)" and the other ASCII diagrams around the other mentioned
sections) lack a language tag; update each triple-backtick fence to include a
language identifier such as text (e.g., change ``` to ```text) so markdownlint
MD040 is satisfied for all occurrences (including the blocks corresponding to
the other diagram regions noted). Ensure you add the same tag to every matching
fenced diagram in the file.

Comment on lines +7 to +38
```
┌─────────────────────────────────────────────────────────────────────────┐
│ Ethereum (L1) │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ LineaRollup │ │
│ │ mapping(uint256 blockNumber => bytes32 stateRootHash) │ │
│ │ │ │
│ │ • Stores Linea L2 state roots (SMT roots, not block hashes) │ │
│ │ • Updated after ZK proof verification │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│ L2 SMT state root
┌─────────────────────────────────────────────────────────────────────────┐
│ Linea (L2) │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ Block Hash Buffer │ │
│ │ mapping(uint256 blockNumber => bytes32 blockHash) │ │
│ │ │ │
│ │ • Stores L1 block hashes pushed via the bridge │ │
│ │ • Uses standard MPT proofs for L1 state │ │
│ └───────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ Sparse Merkle Tree State │ │
│ │ • 42-level binary tree with MiMC hashing │ │
│ │ • Proofs via linea_getProof RPC method │ │
│ │ • Different from eth_getProof format │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a language tag to the fenced diagram block.

Markdownlint flags this fence without a language. Please add a language hint (e.g., text) for consistency.

💡 Suggested fix
-```
+```text
 ┌─────────────────────────────────────────────────────────────────────────┐
 │                           Ethereum (L1)                                  │
 ...
 └─────────────────────────────────────────────────────────────────────────┘
-```
+```
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
┌─────────────────────────────────────────────────────────────────────────┐
│ Ethereum (L1) │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ LineaRollup │ │
│ │ mapping(uint256 blockNumber => bytes32 stateRootHash) │ │
│ │ │ │
│ │ • Stores Linea L2 state roots (SMT roots, not block hashes) │ │
│ │ • Updated after ZK proof verification │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│ L2 SMT state root
┌─────────────────────────────────────────────────────────────────────────┐
│ Linea (L2) │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ Block Hash Buffer │ │
│ │ mapping(uint256 blockNumber => bytes32 blockHash) │ │
│ │ │ │
│ │ • Stores L1 block hashes pushed via the bridge │ │
│ │ • Uses standard MPT proofs for L1 state │ │
│ └───────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ Sparse Merkle Tree State │ │
│ │ • 42-level binary tree with MiMC hashing │ │
│ │ • Proofs via linea_getProof RPC method │ │
│ │ • Different from eth_getProof format │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
```
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

7-7: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@docs/provers/LINEA.md` around lines 7 - 38, The fenced ASCII diagram block
(the triple-backtick block that begins with the box-drawing characters
"┌────────────────" and contains the "Ethereum (L1)" / "Linea (L2)" diagram) is
missing a language tag; update that fence to include a language hint (e.g.,
change ``` to ```text) so the block becomes a labeled code fence (```text ...
```).

Comment on lines +7 to +41
```
┌─────────────────────────────────────────────────────────────────────────┐
│ Ethereum (L1) │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ AnchorStateRegistry │ │
│ │ Storage slot 3: address anchorGame │ │
│ │ │ │
│ │ • Points to the current valid FaultDisputeGame │ │
│ │ • Game contains the L2 output root (rootClaim) │ │
│ └───────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ FaultDisputeGame (CWIA Proxy) │ │
│ │ rootClaim = keccak256(OutputRootProof) │ │
│ │ │ │
│ │ OutputRootProof { │ │
│ │ version, stateRoot, messagePasserStorageRoot, latestBlockhash │ │
│ │ } │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│ L2 block hash in OutputRootProof
┌─────────────────────────────────────────────────────────────────────────┐
│ Optimism (L2) │
│ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ L1Block Predeploy │ │
│ │ Address: 0x4200000000000000000000000000000000000015 │ │
│ │ Storage slot 2: bytes32 hash (latest L1 block hash) │ │
│ │ │ │
│ │ • Updated by the depositor account each L2 block │ │
│ │ • Only stores the LATEST L1 block hash (no history) │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language tags to fenced diagram blocks.

Markdownlint flags these fences as missing language identifiers.

Also applies to: 305-319

🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

7-7: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@docs/provers/OPTIMISM.md` around lines 7 - 41, The fenced diagram blocks in
OPTIMISM.md are missing language identifiers, causing markdownlint warnings;
update each triple-backtick fence around the ASCII diagrams (the blocks
containing "AnchorStateRegistry", "FaultDisputeGame", "OutputRootProof", and the
"L1Block Predeploy" diagram including the 0x420000... address) to include a
language tag (e.g., ```text or ```ascii) so the linter recognizes them as code
blocks and the warnings are resolved.

Comment on lines +12 to +18
│ │ mapping(uint48 blockNumber => Checkpoint) checkpoints │ │
│ │ │ │
│ │ struct Checkpoint { │ │
│ │ uint48 blockNumber; │ │
│ │ bytes32 blockHash; │ │
│ │ bytes32 stateRoot; │ │
│ │ } │ │
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Correct the checkpoint storage layout (blockNumber is not stored).

The SignalService mapping stores CheckpointRecord with only blockHash and stateRoot; blockNumber is the mapping key and not stored in the struct. The current doc implies blockNumber is stored and packed at slot+0, which would mislead slot derivation and proof construction.

✅ Proposed correction
-  │  struct Checkpoint {                                              │  │
-  │      uint48 blockNumber;                                          │  │
-  │      bytes32 blockHash;                                           │  │
-  │      bytes32 stateRoot;                                           │  │
-  │  }                                                                │  │
+  │  struct CheckpointRecord {                                        │  │
+  │      bytes32 blockHash;                                           │  │
+  │      bytes32 stateRoot;                                           │  │
+  │  }                                                                │  │
-interface ICheckpointStore {
-    struct Checkpoint {
-        uint48 blockNumber;    // Block number this checkpoint refers to
-        bytes32 blockHash;     // Block hash of that block
-        bytes32 stateRoot;     // State root (may not always be populated)
-    }
+interface ICheckpointStore {
+    struct Checkpoint {
+        uint48 blockNumber;    // ABI/return only (mapping key)
+        bytes32 blockHash;     // Stored at base slot
+        bytes32 stateRoot;     // Stored at base slot + 1
+    }
-// The Checkpoint struct at that slot:
-// slot + 0: blockNumber (packed with other small values)
-// slot + 0: blockHash (first bytes32 of struct)
-// slot + 1: stateRoot
+// The CheckpointRecord struct at that slot:
+// slot + 0: blockHash
+// slot + 1: stateRoot

Based on learnings: “In Taiko's SignalService, the storage struct CheckpointRecord contains only bytes32 blockHash (slot+0) and bytes32 stateRoot (slot+1). The blockNumber is the mapping key, not stored in the struct.”

Also applies to: 49-61, 326-336

🤖 Prompt for AI Agents
In `@docs/provers/TAIKO.md` around lines 12 - 18, The docs incorrectly show
Checkpoint struct storing blockNumber, blockHash, and stateRoot; update the
description and storage layout to reflect Taiko's actual SignalService where the
mapping key (blockNumber) is not stored in the struct and the struct
(CheckpointRecord/Checkpoint) contains only bytes32 blockHash at slot+0 and
bytes32 stateRoot at slot+1; modify all affected sections (including the
examples around the Checkpoint/CheckpointRecord mapping and the referenced
ranges) to remove blockNumber from the struct layout and clarify that
blockNumber is the mapping key used for slot derivation.

@luiz-lvj luiz-lvj merged commit e329d3a into main Jan 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants