What BridgeSync Does
BridgeSync monitors bridge contracts on both L1 and L2 networks, captures every bridge-related event, and organizes the data into a local database. It provides the data foundation that other AggKit components depend on: AggSender uses it for certificate construction, and Bridge Service uses it to serve API responses. Key responsibilities:- Event monitoring: Real-time monitoring of bridge contract events on L1 and L2
- Data indexing: Comprehensive indexing of bridge and claim transactions
- State management: Maintains bridge transaction history and status
- Reorg handling: Manages blockchain reorganizations and maintains data integrity
- API support: Provides data to Bridge Service APIs
Why Indexing Matters
Bridge claim verification and status queries require access to bridge transaction history. Without an index, each query would require expensive, slow queries to blockchain nodes or onchain contract calls. BridgeSync captures events as they occur and makes them instantly queryable. AggSender depends on BridgeSync’s data to build certificates: it needs the list of bridge exits and imported bridge exits for each epoch. Bridge Service depends on it to respond to transaction status requests and proof generation queries.Architecture
How BridgeSync Works
Event Processing Workflow
Bridge Event Types
BridgeEvent
Emitted when assets or messages are bridged from a network:ClaimEvent
Emitted when assets or messages are claimed on a network:Data Processing Pipeline
Integration with Other Components
AggSender Integration
BridgeSync provides the bridge exit and imported bridge exit data that AggSender packages into certificates: Data provided:- Bridge exits (outbound transactions from the L2)
- Imported bridge exits (inbound claims to the L2)
- Transaction proofs and metadata
- Block range information for certificate scope