-
Notifications
You must be signed in to change notification settings - Fork 46
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(derive): Abstract Alt DA out of kona-derive
#156
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clabby
force-pushed
the
cl/abstract-alt-da
branch
from
April 28, 2024 04:04
2c41ed8
to
87999c5
Compare
refcell
reviewed
Apr 28, 2024
refcell
reviewed
Apr 28, 2024
refcell
reviewed
Apr 28, 2024
clabby
force-pushed
the
cl/abstract-alt-da
branch
from
April 28, 2024 16:08
2c693c6
to
8a85a2f
Compare
refcell
approved these changes
Apr 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic work, thank you @clabby
Closed
This was referenced May 29, 2024
Closed
Closed
Closed
This was referenced Jun 16, 2024
Closed
Closed
Merged
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Abstracts alternative data availability adapters out of
kona-derive
by doing away with theDataSourceFactory
in favor of adapters implementing theDataAvailabilityProvider
trait themselves. Right now, theDataSourceFactory
composes the various DA options like so:Removing the dependency on the
DataSourceFactory
as a composition type wrapping around theDataAvailabilityProvider
trait lends towards more flexibility for other future alternative DA adapter implementors, given thatkona-derive
's business logic only depends on theDataAvailabilityProvider
trait's interface. This also allows us to completely decouple alt data availability modifications fromkona-derive
, and allow for them to exist as extensions (think:revm
+ the handler abstractions, allowing for modifications to the base EVM logic). Other consumers of the crate can make new extensions without having to upstream changes tokona-derive
for their modifications.This also makes composition a bit cleaner for the consumer of the library - for example, in the
online
feature ofkona-derive
's constructor, we can use the concrete implementations of the various online traits, as well as abstract over the DA (useful, for example, in a rollup client that may support several DAs through configuration at a higher level):Note that above, we no longer need to supply types for DA options we are not using.
Other File Jumblin'
kona-plasma
now contains all logic related to the alternative Plasma DA extension forkona-derive
.kona-providers
has been moved back intokona-derive
; These providers are specific to the pipeline and pretty minimal interfaces of the full RPCs, shouldn't be useful except to consumers ofkona-derive
.