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: add altda data source + eigenda implementation #1

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

samlaf
Copy link
Collaborator

@samlaf samlaf commented Nov 22, 2024

This is a WIP, still lots to do, but main traits are setup I think...

@samlaf samlaf marked this pull request as draft November 22, 2024 21:48
@samlaf samlaf marked this pull request as ready for review November 22, 2024 21:51
@samlaf samlaf marked this pull request as draft November 22, 2024 21:51
let altda_provider = if boot.rollup_config.is_alt_da_enabled() {
// TODO: altda_provider should be a struct that contains all the altda providers,
// such that a rollup can dynamically switch between da providers if needed.
Some(OracleAltDAProvider::new_from_oracle(oracle.clone()))
Copy link

Choose a reason for hiding this comment

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

at runtime, for failover?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really for failover, more like if some rollup decides to switch from celestia to eigenda or the other way around at some point in its existence.

tonic.workspace = true

# AltDAs
eigenda-protos = { git = "https://github.com/samlaf/eigenda-protos.git" }
Copy link

Choose a reason for hiding this comment

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

move to Layrlabs once stable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm actually thinking of creating a small rust dir in the eigenda repo just to publish this minimal crate with proto bindings (something like eigenda/proto/rust), wdyt?

Copy link

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Can this kona repo reference the eigenda repo as a submodule and generate Rust code in kona repo? That seems less cluttered for the eigenda repo

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we could but then we have a repo to manage just for protobuf generation. Have the proto files ever changed (api changes)? Do we plan that they will change? If so how often?

nice thing with having in single repo is you can have a nice changelog file and when I go to eigen repo rust crate (it’s really just a small hidden dir, not that cluttering) I’m right next to change log file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But I agree that if we’re going to have an eigenDA rust client repo in the end, could also just publish a crate for the protobur independently.

) -> Result<Bytes, Self::Error>;

// TODO: should this be in a separate v2 trait?
async fn get_blob_v2(&self, blob_hashes: Bytes) -> Result<Bytes, Self::Error>;
Copy link

Choose a reason for hiding this comment

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

Can we just let the proxy to figure that out? I remember there is a Cert version byte in the Cert

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't think so because eventually we'll need to make this secure aka client will need to prove the cert is valid right?
So it'll need to be aware of whether its working with v1 or v2 I would think?

Copy link

Choose a reason for hiding this comment

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

ok, just thinking about the fault proof


/// The EigenDAProvider trait specifies the functionality of a data source that can provide eigenda blobs.
#[async_trait]
pub trait EigenDAProvider {
Copy link

Choose a reason for hiding this comment

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

why do we define a trait for EigenDA, would this be one impl for AltDAProvider?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prob only so I can create a test implementation for testing.

crates/proof-sdk/proof/src/altda/altda_provider.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants