This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Description
Adding the unsafe heads channel will enable Hera to follow the rollup chain directly from the sequencer feed instead of having to wait for safe heads to be available on L1.
As part of this task, a few design decisiona need to be made:
- where should the NetworkDriver live? how do we communicate with it?
- Right now I believe it can just be left running in an independent tokio task and it'll be fine.
- Long term we'll probably add a
NetworkHandle if we ever need to send commands to the Network actor.
- For now, the only thing we need to do is receive blocks from the unsafe blocks channel.
- We don't immediately need to care about where the NetworkDriver is spawned I think.
- where do we keep track of the unsafe / safe state?
- ideally the
rollup::Driver should have new fields to do this, e.g. unsafe_head, safe_head and finalized_head
- we may want to put these in something like a
HeadState struct? (not sure)
- the Driver needs to be able to roll back on unsafe heads if it detects a l2 reorg
- for safe heads we rely on the
RollupPipeline to perform the reset
- at this stage we don't need to care about sending the right engine API messages (TBD, different task)
- how do unsafe & safe heads interact?
& more that'll come up just trying to implement this.