Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rollup): init exex driver and pipeline #37

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

merklefruit
Copy link
Collaborator

@merklefruit merklefruit commented Aug 26, 2024

Added a Driver::exex method that can initialize a Driver with the components needed to bootstrap in ExEx mode.
Also stubbed a StandaloneDriver struct that will later be used to start Hera in standalone mode.

closes #8.

@merklefruit merklefruit self-assigned this Aug 26, 2024
@merklefruit merklefruit added C-enhancement New feature or request A-hera Area: OP Stack Rollup node binary labels Aug 26, 2024
Comment on lines +11 to +12
/// The default L1 RPC URL to use.
pub const DEFAULT_L1_RPC_URL: &str = "https://eth.llamarpc.com/";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be really neat if we could verify that the given RPC supports the method endpoints needed by kona-derive.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know which methods kona uses outside of the eth_ namespace?
I'll try reach out to llamanodes if so, otherwise we can put http://localhost:8545 to be safe

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will write up a ticket for this 👍

Comment on lines 62 to 65
// Where should we get notifications from?
// We could use the L1 chain provider, but it's already in the Driver struct
// and it doesn't work well with the ExExNotification abstraction IMO.
todo!()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess would be the standalone context should own another object that listens to new heads in another thread or something like that. This func could then check if there are any heads available

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, the provider is Clone so this won't be an issue. Also at that point it would be great if it also had "reorg logic" built-in so that we can send a ExExNotification::ChainReverted event when a reorg happens, and keep a unified reorg logic inside the driver body, inside the handle_exex_notification() method.

Does that sound too redundant or no?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds right to me, but I def think it shouldn't block this pr. I'm curious how the chain reverted events would be detected though

Copy link
Collaborator Author

@merklefruit merklefruit Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@refcell yeah on second thought - it would also be quite redundant to:

  1. use the L1 chain provider to send a new notification to the driver (requires all raw blocks, txs, receipts)
  2. inside the driver loop, either fetch from the L1 online provider again or use the in-memory provider

Since Kona is already equipped to work with online providers, this feels a bit clunky imo.
Will think a bit more about this

Copy link
Collaborator

@refcell refcell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The associated driver context methods are nice I like this

@merklefruit merklefruit marked this pull request as ready for review August 26, 2024 21:03
@merklefruit merklefruit merged commit 01fbdb7 into main Aug 26, 2024
11 checks passed
@merklefruit merklefruit deleted the nico/feat/init-exex-pipeline branch August 26, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-hera Area: OP Stack Rollup node binary C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(kona-exex): Init Derivation Pipeline
2 participants