What L1InfoTreeSync Does
L1InfoTreeSync monitors Ethereum L1 and maintains two local Merkle trees that other AggKit components use for proof generation and certificate building:- L1 Info Tree: An append-only tree tracking historical Global Exit Root updates from the Global Exit Root contract
- Rollup Exit Tree: An updatable tree tracking rollup state submissions from the Rollup Manager contract
- Maintaining the L1 Info Tree and Rollup Exit Tree from L1 events
- Generating Merkle proofs for cross-chain verification
- Handling blockchain reorganizations and maintaining data integrity
- Respecting configurable finality requirements (latest, safe, finalized)
Why L1 State Indexing Matters
Cross-chain operations require accurate L1 state for several functions:- Proof generation: Merkle proofs must reference correct historical L1 states
- Certificate building: AggSender needs L1 data to construct valid certificates
- Claim verification: Cross-chain claims must be verified against settled L1 state
- Reorg handling: L1 reorganizations must be detected and handled
Architecture
How L1InfoTreeSync Works
Event Processing
L1InfoTreeSync monitors two types of events from Ethereum L1 and processes them into separate tree structures:The Two Tree Types
L1 Info Tree (append-only):- Source:
UpdateL1InfoTreeevents from the Global Exit Root contract - Structure: Append-only tree that grows with each Global Exit Root update
- Purpose: Provides historical GER data for claim verification
- Use case: When claim proofs must demonstrate inclusion in a specific historical state
- Source:
VerifyBatchesevents from the Rollup Manager contract - Structure: Updatable tree where L2 chains can update their submitted state
- Purpose: Tracks which L2 chains have submitted state and their current exit roots
- Use case: When AggSender builds certificates that need rollup state context
Tree Structures
L1 Info Tree
Rollup Exit Tree
Integration with Other Components
AggSender Integration
L1InfoTreeSync provides the L1 data that AggSender includes in certificates: Data provided:- Current L1 Info Tree root and leaf data
- Merkle proofs for imported bridge exits
- L1 block finality information
- Historical Global Exit Root data