diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..ce4dd6e00 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "rust-analyzer.linkedProjects": [ + "./Cargo.toml", + "./build/risczero/fpvm/Cargo.toml" + ], + "rust-analyzer.cargo.features": [ + "eigenda", + "prove", + "devnet" + ] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 080917f5b..3ce83eea9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3989,6 +3989,71 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "hokulea-client" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/hokulea?branch=kailua-compatible#840a41cf1c37d8c9297fc13358f18fac15a7ce44" +dependencies = [ + "alloy-consensus 0.8.1", + "hokulea-proof", + "kona-client", + "kona-driver", + "kona-executor", + "kona-preimage", + "kona-proof", + "tracing", +] + +[[package]] +name = "hokulea-eigenda" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/hokulea?branch=kailua-compatible#840a41cf1c37d8c9297fc13358f18fac15a7ce44" +dependencies = [ + "alloy-primitives", + "async-trait", + "kona-derive", + "op-alloy-protocol", + "tracing", +] + +[[package]] +name = "hokulea-host" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/hokulea?branch=kailua-compatible#840a41cf1c37d8c9297fc13358f18fac15a7ce44" +dependencies = [ + "alloy-primitives", + "alloy-provider 0.8.1", + "alloy-rlp", + "anyhow", + "async-trait", + "clap", + "hokulea-client", + "hokulea-proof", + "kona-host", + "kona-preimage", + "reqwest", + "tokio", + "tracing", +] + +[[package]] +name = "hokulea-proof" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/hokulea?branch=kailua-compatible#840a41cf1c37d8c9297fc13358f18fac15a7ce44" +dependencies = [ + "alloy-primitives", + "async-trait", + "hokulea-eigenda", + "kona-derive", + "kona-driver", + "kona-preimage", + "kona-proof", + "op-alloy-genesis", + "op-alloy-protocol", + "op-alloy-rpc-types-engine", + "tracing", +] + [[package]] name = "home" version = "0.5.9" @@ -4592,6 +4657,7 @@ dependencies = [ "bytemuck", "c-kzg", "hashbrown 0.15.0", + "hokulea-proof", "kona-derive", "kona-driver", "kona-executor", @@ -4635,6 +4701,7 @@ dependencies = [ "boundless-market", "clap", "hashbrown 0.15.0", + "hokulea-host", "kailua-build", "kailua-client", "kailua-common", @@ -4680,7 +4747,7 @@ dependencies = [ [[package]] name = "kona-client" version = "0.1.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus 0.8.1", "alloy-eips 0.8.1", @@ -4713,7 +4780,7 @@ dependencies = [ [[package]] name = "kona-derive" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus 0.8.1", "alloy-eips 0.8.1", @@ -4732,7 +4799,7 @@ dependencies = [ [[package]] name = "kona-driver" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus 0.8.1", "alloy-primitives", @@ -4750,7 +4817,7 @@ dependencies = [ [[package]] name = "kona-executor" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus 0.8.1", "alloy-eips 0.8.1", @@ -4768,7 +4835,7 @@ dependencies = [ [[package]] name = "kona-host" version = "0.1.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus 0.8.1", "alloy-eips 0.8.1", @@ -4805,19 +4872,18 @@ dependencies = [ [[package]] name = "kona-mpt" version = "0.1.1" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-trie 0.7.6", - "serde", "thiserror 2.0.4", ] [[package]] name = "kona-preimage" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-primitives", "async-channel", @@ -4831,7 +4897,7 @@ dependencies = [ [[package]] name = "kona-proof" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus 0.8.1", "alloy-eips 0.8.1", @@ -4860,7 +4926,7 @@ dependencies = [ [[package]] name = "kona-std-fpvm" version = "0.1.1" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "async-trait", "cfg-if", @@ -4872,7 +4938,7 @@ dependencies = [ [[package]] name = "kona-std-fpvm-proc" version = "0.1.1" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "anyhow", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index 11b1aa4a4..65b1ac805 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,15 +63,20 @@ kailua-contracts = { path = "crates/contracts" } kailua-host = { path = "bin/host" } # Kona -kona-client = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87", default-features = false } -kona-derive = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87", default-features = false, features = ["serde"] } -kona-driver = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87" } -kona-executor = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87" } -kona-host = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87" } -kona-mpt = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87", features = ["serde"] } -kona-preimage = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87", features = ["rkyv"] } -kona-proof = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87" } -kona-std-fpvm = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87" } +kona-client = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-derive = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-driver = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-executor = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-host = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-mpt = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-preimage = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-proof = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } +kona-std-fpvm = { git = "https://github.com/anton-rs/kona", rev = "7a40d87", default-features = false } + +# Hokulea +hokulea-eigenda = { git = "https://github.com/Layr-Labs/hokulea", branch = "kailua-compatible", default-features = false } +hokulea-proof = { git = "https://github.com/Layr-Labs/hokulea", branch = "kailua-compatible", default-features = false } +hokulea-host = { git = "https://github.com/Layr-Labs/hokulea", branch = "kailua-compatible", default-features = false } # RISC Zero zkVM bonsai-sdk = { version = "1.2.0", features = ["non_blocking"] } diff --git a/README.md b/README.md index 44652a360..b984cec51 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,20 @@ Kailua enables rollup operators to add a new fault proof contract, compatible wi * `just devnet-down` to stop the running docker containers. * `just devnet-clean` to cleanup the docker volumes. +## AltDA + +### EigenDA + +The EigenDA integration uses the [hokulea](https://github.com/Layr-Labs/hokulea) library to allow the kona derivation pipeline to understand eigenDA blobs. All of this extra code is feature guarded in Kailua behind the `eigenda` feature flag. + +To run against a devnet using eigenDA for altDA, use the following commands: +```bash +just eigenda-devnet-build # builds with the -F eigenda feature flag +just eigenda-devnet-up # starts the optimism devnet with altda enabled +# At this point, must wait for a few minutes for the devnet to finalize block 1 so that we can prove it: +RISC0_DEV_MODE=true just eigenda-devnet-prove 1 1 +``` + ## Questions, Feedback, and Collaborations We'd love to hear from you on [Discord][discord] or [Twitter][twitter]. diff --git a/bin/host/Cargo.toml b/bin/host/Cargo.toml index fa246f55c..1d97e529a 100644 --- a/bin/host/Cargo.toml +++ b/bin/host/Cargo.toml @@ -35,6 +35,9 @@ kona-derive.workspace = true kona-host.workspace = true kona-preimage.workspace = true +# Hokulea +hokulea-host = { workspace = true, optional = true } + # zkVM bonsai-sdk.workspace = true boundless-market.workspace = true @@ -49,4 +52,7 @@ zeth-preflight-optimism.workspace = true [features] prove = [ "risc0-zkvm/prove" +] +eigenda = [ + "hokulea-host" ] \ No newline at end of file diff --git a/bin/host/src/lib.rs b/bin/host/src/lib.rs index 4270a560c..97103465e 100644 --- a/bin/host/src/lib.rs +++ b/bin/host/src/lib.rs @@ -24,9 +24,7 @@ use clap::Parser; use kailua_client::{parse_b256, BoundlessArgs}; use kailua_common::blobs::BlobFetchRequest; use kailua_common::precondition::PreconditionValidationData; -use kona_host::fetcher::Fetcher; use kona_host::kv::SharedKeyValueStore; -use kona_host::start_native_preimage_server; use kona_preimage::{BidirectionalChannel, HintWriter, OracleReader, PreimageKey, PreimageKeyType}; use op_alloy_genesis::RollupConfig; use op_alloy_protocol::BlockInfo; @@ -46,6 +44,18 @@ use zeth_core_optimism::OpRethCoreDriver; use zeth_preflight::client::PreflightClient; use zeth_preflight_optimism::OpRethPreflightClient; +#[cfg(feature = "eigenda")] +use { + anyhow::anyhow, + hokulea_host::{ + eigenda_blobs::OnlineEigenDABlobProvider, eigenda_fetcher::FetcherWithEigenDASupport, + start_native_preimage_server, + }, +}; + +#[cfg(not(feature = "eigenda"))] +use kona_host::{fetcher::Fetcher, start_native_preimage_server}; + /// The host binary CLI application arguments. #[derive(Parser, Clone, Debug)] pub struct KailuaHostCli { @@ -76,6 +86,17 @@ pub struct KailuaHostCli { /// Storage provider to use for elf and input #[clap(flatten)] pub boundless_storage_config: Option, + + #[clap(flatten)] + pub eigenda_args: EigenDAArgs, +} + +#[derive(Parser, Debug, Clone)] +pub struct EigenDAArgs { + /// URL of the Ethereum RPC endpoint. + #[clap(long, env)] + #[arg(required = false)] + pub eigenda_proxy_address: Option, } /// Starts the [PreimageServer] and the client program in separate threads. The client program is @@ -95,6 +116,33 @@ pub async fn start_server_and_native_client( let hint_chan = BidirectionalChannel::new()?; let preimage_chan = BidirectionalChannel::new()?; let kv_store = args.kona.construct_kv_store(); + + #[cfg(feature = "eigenda")] + let fetcher = if !args.kona.is_offline() { + let (l1_provider, blob_provider, l2_provider) = args.kona.create_providers().await?; + let eigenda_blob_provider = OnlineEigenDABlobProvider::new_http( + args.eigenda_args + .eigenda_proxy_address + .expect("missing eigenda_proxy_address") + .clone(), + ) + .await + .map_err(|e| anyhow!("Failed to load eigenda blob provider configuration: {e}"))?; + Some(Arc::new(RwLock::new( + FetcherWithEigenDASupport::new_from_parts( + kv_store.clone(), + l1_provider, + blob_provider, + eigenda_blob_provider, + l2_provider, + args.kona.agreed_l2_head_hash, + ), + ))) + } else { + None + }; + + #[cfg(not(feature = "eigenda"))] let fetcher = if !args.kona.is_offline() { let (l1_provider, blob_provider, l2_provider) = args.kona.create_providers().await?; Some(Arc::new(RwLock::new(Fetcher::new( diff --git a/build/risczero/Cargo.toml b/build/risczero/Cargo.toml index eae2ae170..c5f194e5a 100644 --- a/build/risczero/Cargo.toml +++ b/build/risczero/Cargo.toml @@ -11,3 +11,4 @@ methods = ["fpvm"] [features] debug-guest-build = [] +eigenda = [] diff --git a/build/risczero/build.rs b/build/risczero/build.rs index a3b766ec3..2568e8ab6 100644 --- a/build/risczero/build.rs +++ b/build/risczero/build.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +use std::vec; + fn main() { // Build a reproducible ELF file using docker under the release profile #[cfg(not(any(feature = "debug-guest-build", debug_assertions)))] @@ -29,7 +31,20 @@ fn main() { // Build ELFs natively under debug #[cfg(any(feature = "debug-guest-build", debug_assertions))] - let build_opts = Default::default(); + let features = if cfg!(feature = "eigenda") { + vec!["eigenda".to_string()] + } else { + vec![] + }; + let build_opts = { + std::collections::HashMap::from([( + "kailua-fpvm", + risc0_build::GuestOptions { + features, + ..Default::default() + }, + )]) + }; risc0_build::embed_methods_with_options(build_opts); println!("cargo:rerun-if-changed=src"); diff --git a/build/risczero/fpvm/Cargo.lock b/build/risczero/fpvm/Cargo.lock index 4c8c2532d..6ae72cfc4 100644 --- a/build/risczero/fpvm/Cargo.lock +++ b/build/risczero/fpvm/Cargo.lock @@ -1402,6 +1402,36 @@ dependencies = [ "digest", ] +[[package]] +name = "hokulea-eigenda" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/hokulea?branch=kailua-compatible#840a41cf1c37d8c9297fc13358f18fac15a7ce44" +dependencies = [ + "alloy-primitives", + "async-trait", + "kona-derive", + "op-alloy-protocol", + "tracing", +] + +[[package]] +name = "hokulea-proof" +version = "0.1.0" +source = "git+https://github.com/Layr-Labs/hokulea?branch=kailua-compatible#840a41cf1c37d8c9297fc13358f18fac15a7ce44" +dependencies = [ + "alloy-primitives", + "async-trait", + "hokulea-eigenda", + "kona-derive", + "kona-driver", + "kona-preimage", + "kona-proof", + "op-alloy-genesis", + "op-alloy-protocol", + "op-alloy-rpc-types-engine", + "tracing", +] + [[package]] name = "http" version = "1.1.0" @@ -1590,6 +1620,7 @@ dependencies = [ "bytemuck", "c-kzg", "hashbrown 0.15.0", + "hokulea-proof", "kona-derive", "kona-driver", "kona-executor", @@ -1634,7 +1665,7 @@ dependencies = [ [[package]] name = "kona-derive" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -1653,7 +1684,7 @@ dependencies = [ [[package]] name = "kona-driver" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -1671,7 +1702,7 @@ dependencies = [ [[package]] name = "kona-executor" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -1689,19 +1720,18 @@ dependencies = [ [[package]] name = "kona-mpt" version = "0.1.1" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-primitives", "alloy-rlp", "alloy-trie", - "serde", "thiserror 2.0.4", ] [[package]] name = "kona-preimage" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-primitives", "async-trait", @@ -1714,7 +1744,7 @@ dependencies = [ [[package]] name = "kona-proof" version = "0.2.0" -source = "git+https://github.com/ethereum-optimism/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" +source = "git+https://github.com/anton-rs/kona?rev=7a40d87#7a40d87b616556f76fc49f1651e035b975a2ed1a" dependencies = [ "alloy-consensus", "alloy-eips", diff --git a/build/risczero/fpvm/Cargo.toml b/build/risczero/fpvm/Cargo.toml index 5004b3793..0dc8e361f 100644 --- a/build/risczero/fpvm/Cargo.toml +++ b/build/risczero/fpvm/Cargo.toml @@ -12,7 +12,7 @@ rkyv = "0.8.9" kailua-common = { path = "../../../crates/common" } -kona-proof = { git = "https://github.com/ethereum-optimism/kona", rev = "7a40d87" } +kona-proof = { git = "https://github.com/anton-rs/kona", rev = "7a40d87" } risc0-zkvm = { version = "1.2.0", features = ["std", "heap-embedded-alloc", "unstable"] } @@ -21,3 +21,6 @@ c-kzg = { git = "https://github.com/risc0/c-kzg-4844.git", branch = "p1.0.3" } crypto-bigint = { git = "https://github.com/risc0/RustCrypto-crypto-bigint", tag = "v0.5.5-risczero.0" } k256 = { git = "https://github.com/risc0/RustCrypto-elliptic-curves", tag = "k256/v0.13.3-risczero.0" } sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2-v0.10.8-risczero.0" } + +[features] +eigenda = ["kailua-common/eigenda"] \ No newline at end of file diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index ca79d212c..a383db13a 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -28,11 +28,16 @@ kona-driver.workspace = true kona-derive.workspace = true kona-executor.workspace = true kona-mpt.workspace = true -kona-preimage = { workspace = true, features = ["serde"] } +kona-preimage = { workspace = true, features = ["serde", "rkyv"] } kona-proof.workspace = true +hokulea-proof = { workspace = true, optional = true } + risc0-zkvm.workspace = true risc0-zkvm-platform.workspace = true serde.workspace = true -tracing.workspace = true \ No newline at end of file +tracing.workspace = true + +[features] +eigenda = ["hokulea-proof"] diff --git a/crates/common/src/client.rs b/crates/common/src/client.rs index dcd990725..df38e02f7 100644 --- a/crates/common/src/client.rs +++ b/crates/common/src/client.rs @@ -24,7 +24,7 @@ use kona_executor::TrieDBProvider; use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; use kona_proof::errors::OracleProviderError; use kona_proof::executor::KonaExecutor; -use kona_proof::l1::{OracleL1ChainProvider, OraclePipeline}; +use kona_proof::l1::OracleL1ChainProvider; use kona_proof::l2::OracleL2ChainProvider; use kona_proof::sync::new_pipeline_cursor; use kona_proof::{BootInfo, FlushableCache, HintType}; @@ -33,6 +33,11 @@ use risc0_zkvm::sha::{Impl as SHA2, Sha256}; use std::fmt::Debug; use std::sync::Arc; +#[cfg(feature = "eigenda")] +use hokulea_proof::{eigenda_provider::OracleEigenDAProvider, pipeline::OraclePipeline}; +#[cfg(not(feature = "eigenda"))] +use kona_proof::l1::OraclePipeline; + pub fn run_client< O: CommsClient + FlushableCache + Send + Sync + Debug, B: BlobProvider + Send + Sync + Debug + Clone, @@ -66,6 +71,8 @@ where let mut l1_provider = OracleL1ChainProvider::new(boot.clone(), oracle.clone()); let mut l2_provider = OracleL2ChainProvider::new(boot.clone(), oracle.clone()); + #[cfg(feature = "eigenda")] + let eigenda_blob_provider = OracleEigenDAProvider::new(oracle.clone()); // If the claimed L2 block number is less than the safe head of the L2 chain, the claim is // invalid. @@ -88,6 +95,17 @@ where let cursor = new_pipeline_cursor(&boot, safe_head, &mut l1_provider, &mut l2_provider).await?; let cfg = Arc::new(boot.rollup_config.clone()); + #[cfg(feature = "eigenda")] + let pipeline = OraclePipeline::new( + cfg.clone(), + cursor.clone(), + oracle.clone(), + beacon, + l1_provider.clone(), + l2_provider.clone(), + eigenda_blob_provider, + ); + #[cfg(not(feature = "eigenda"))] let pipeline = OraclePipeline::new( cfg.clone(), cursor.clone(), diff --git a/justfile b/justfile index 8d1ac5ae0..096e6f013 100644 --- a/justfile +++ b/justfile @@ -18,6 +18,16 @@ devnet-build +ARGS="-F devnet -F prove": (build ARGS) devnet-up: make -C optimism devnet-up > devnet.log +[group('eigenda')] +eigenda-devnet-build +ARGS="-F devnet -F prove -F eigenda": (build ARGS) + +[group('eigenda')] +eigenda-devnet-up: + DEVNET_ALTDA=true GENERIC_ALTDA=true make -C optimism devnet-up > devnet.log + +[group('eigenda')] +eigenda-devnet-prove block_number block_count target="debug" verbosity="" data=".localtestdata": eigenda-devnet-build (prove block_number block_count "http://localhost:8545" "http://localhost:5052" "http://localhost:9545" "http://localhost:7545" "http://localhost:3100" data target verbosity) + devnet-down: make -C optimism devnet-down @@ -79,7 +89,7 @@ devnet-validate target="debug" verbosity="" l1_rpc="http://127.0.0.1:8545" l1_be --validator-key {{validator}} \ {{verbosity}} -devnet-prove block_number block_count target="debug" verbosity="" data=".localtestdata": (prove block_number block_count "http://localhost:8545" "http://localhost:5052" "http://localhost:9545" "http://localhost:7545" data target verbosity) +devnet-prove block_number block_count target="debug" verbosity="" data=".localtestdata": devnet-build (prove block_number block_count "http://localhost:8545" "http://localhost:5052" "http://localhost:9545" "http://localhost:7545" "http://localhost:3100" data target verbosity) bench l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc data start range count target="release" verbosity="-v": ./target/{{target}}/kailua-cli benchmark \ @@ -94,13 +104,14 @@ bench l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc data start range count target= {{verbosity}} # Run the client program natively with the host program attached. -prove block_number block_count l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc data target="release" verbosity="": +prove block_number block_count l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc eigenda_proxy_rpc data target="release" verbosity="": #!/usr/bin/env bash L1_NODE_ADDRESS="{{l1_rpc}}" L1_BEACON_ADDRESS="{{l1_beacon_rpc}}" L2_NODE_ADDRESS="{{l2_rpc}}" OP_NODE_ADDRESS="{{rollup_node_rpc}}" + EIGENDA_PROXY_ADDRESS="{{eigenda_proxy_rpc}}" L2_BLOCK_NUMBER={{block_number}} CLAIMED_L2_BLOCK_NUMBER=$((L2_BLOCK_NUMBER + {{block_count}} - 1)) @@ -134,6 +145,7 @@ prove block_number block_count l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc data --l1-beacon-address $L1_BEACON_ADDRESS \ --l2-node-address $L2_NODE_ADDRESS \ --op-node-address $OP_NODE_ADDRESS \ + --eigenda-proxy-address $EIGENDA_PROXY_ADDRESS \ --data-dir {{data}} \ --native \ {{verbosity}}