-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Milestone
Description
Overview
We must implement an indexer component responsible for indexing data relevant to the rollup node. In the first instance, this will initially be indexing of BatchInputs and L1Messages. Proposed interface defined below:
rollup-node/crates/indexer/src/lib.rs
Lines 7 to 37 in 2795c09
| /// The indexer is responsible for indexing data relevant to the L1. | |
| #[derive(Debug)] | |
| pub struct Indexer; | |
| impl Indexer { | |
| /// Handles an event from the L1. | |
| pub async fn handle_l1_event(&mut self, event: L1Event) { | |
| match event { | |
| L1Event::CommitBatch(batch_input) => self.handle_batch_input(batch_input).await, | |
| L1Event::Reorg(block_number) => self.handle_reorg(block_number).await, | |
| L1Event::Finalized(block_number) => self.handle_finalized(block_number).await, | |
| L1Event::L1Message(l1_message) => self.handle_l1_message(l1_message).await, | |
| } | |
| } | |
| async fn handle_reorg(&mut self, _block_number: u64) { | |
| todo!() | |
| } | |
| async fn handle_finalized(&mut self, _block_number: u64) { | |
| todo!() | |
| } | |
| async fn handle_l1_message(&mut self, _l1_message: Arc<L1Message>) { | |
| todo!() | |
| } | |
| async fn handle_batch_input(&mut self, _batch_input: Arc<BatchInput>) { | |
| todo!() | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done