Closed merklefruit closed 2 months ago
After initializing the pipeline, the main loop will involve taking incoming Chain notifications from the Driver and:
Chain
Driver
FinishedHeight
here is a reference implementation:
async fn handle_exex_notification( &mut self, notification: ExExNotification, pipeline: &mut RollupPipeline, ) -> Result<()> { if let Some(reverted_chain) = notification.reverted_chain() { self.chain_provider.commit(reverted_chain.clone()); let l1_block_info = info_from_header(&reverted_chain.tip().block); // handle the reverted chain... } if let Some(committed_chain) = notification.committed_chain() { let tip_number = committed_chain.tip().number; self.chain_provider.commit(committed_chain); if let Err(err) = self.ctx.events.send(ExExEvent::FinishedHeight(tip_number)) { bail!("Critical: Failed to send ExEx event: {:?}", err); } } Ok(()) }
@merklefruit Could I try this one?
Hey, sorry I had already started a draft PR of this in #57, but forgot to tag it here. My bad!
After initializing the pipeline, the main loop will involve taking incoming
Chain
notifications from theDriver
and:FinishedHeight
notification to theDriver
here is a reference implementation: