diff --git a/Cargo.lock b/Cargo.lock index de4124469..8a9f35429 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -166,6 +166,18 @@ dependencies = [ "sha2", ] +[[package]] +name = "alloy-json-abi" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24acd2f5ba97c7a320e67217274bc81fe3c3174b8e6144ec875d9d54e760e278" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + [[package]] name = "alloy-json-rpc" version = "0.9.2" @@ -220,9 +232,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "788bb18e8f61d5d9340b52143f27771daf7e1dccbaf2741621d2493f9debf52e" +checksum = "ec878088ec6283ce1e90d280316aadd3d6ce3de06ff63d68953c855e7e447e92" dependencies = [ "alloy-rlp", "arbitrary", @@ -287,9 +299,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f542548a609dca89fcd72b3b9f355928cf844d4363c5eed9c5273a3dd225e097" +checksum = "3d6c1d995bff8d011f7cd6c81820d51825e6e06d6db73914c1630ecf544d83d6" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -298,9 +310,9 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" +checksum = "a40e1ef334153322fd878d07e86af7a529bcb86b2439525920a88eba87bcf943" dependencies = [ "proc-macro2", "quote", @@ -441,9 +453,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07b74d48661ab2e4b50bb5950d74dbff5e61dd8ed03bb822281b706d54ebacb" +checksum = "8d039d267aa5cbb7732fa6ce1fd9b5e9e29368f580f80ba9d7a8450c794de4b2" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -455,9 +467,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19cc9c7f20b90f9be1a8f71a3d8e283a43745137b0837b1a1cb13159d37cad72" +checksum = "620ae5eee30ee7216a38027dec34e0585c55099f827f92f50d11e3d2d3a4a954" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -473,9 +485,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713b7e6dfe1cb2f55c80fb05fd22ed085a1b4e48217611365ed0ae598a74c6ac" +checksum = "ad9f7d057e00f8c5994e4ff4492b76532c51ead39353aa2ed63f8c50c0f4d52e" dependencies = [ "const-hex", "dunce", @@ -486,15 +498,27 @@ dependencies = [ "syn-solidity", ] +[[package]] +name = "alloy-sol-type-parser" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74e60b084fe1aef8acecda2743ff2d93c18ff3eb67a2d3b12f62582a1e66ef5e" +dependencies = [ + "serde", + "winnow", +] + [[package]] name = "alloy-sol-types" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b478bc9c0c4737a04cd976accde4df7eba0bdc0d90ad6ff43d58bc93cf79c1" +checksum = "c1382302752cd751efd275f4d6ef65877ddf61e0e6f5ac84ef4302b79a33a31a" dependencies = [ + "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", "const-hex", + "serde", ] [[package]] @@ -595,11 +619,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", + "once_cell", "windows-sys 0.59.0", ] @@ -814,9 +839,9 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" dependencies = [ "proc-macro2", "quote", @@ -868,7 +893,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.8.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -905,9 +930,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bitvec" @@ -2359,9 +2384,9 @@ dependencies = [ "kona-std-fpvm", "kona-std-fpvm-proc", "lru", + "maili-genesis", "maili-protocol", "op-alloy-consensus", - "op-alloy-genesis", "op-alloy-rpc-types-engine", "revm", "serde", @@ -2381,10 +2406,11 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types-engine", "async-trait", + "maili-consensus", + "maili-genesis", "maili-protocol", "maili-registry", "op-alloy-consensus", - "op-alloy-genesis", "op-alloy-rpc-types-engine", "proptest", "serde_json", @@ -2404,9 +2430,9 @@ dependencies = [ "alloy-rlp", "async-trait", "kona-derive", + "maili-genesis", "maili-protocol", "op-alloy-consensus", - "op-alloy-genesis", "op-alloy-rpc-types-engine", "thiserror 2.0.11", "tracing", @@ -2424,8 +2450,8 @@ dependencies = [ "anyhow", "criterion", "kona-mpt", + "maili-genesis", "op-alloy-consensus", - "op-alloy-genesis", "op-alloy-rpc-types-engine", "pprof", "rand", @@ -2459,8 +2485,8 @@ dependencies = [ "kona-preimage", "kona-proof", "kona-std-fpvm", + "maili-genesis", "maili-protocol", - "op-alloy-genesis", "op-alloy-rpc-types-engine", "proptest", "reqwest", @@ -2542,10 +2568,10 @@ dependencies = [ "kona-mpt", "kona-preimage", "lru", + "maili-genesis", "maili-protocol", "maili-registry", "op-alloy-consensus", - "op-alloy-genesis", "op-alloy-rpc-types-engine", "serde", "serde_json", @@ -2565,8 +2591,8 @@ dependencies = [ "kona-interop", "kona-preimage", "kona-proof", + "maili-genesis", "maili-registry", - "op-alloy-genesis", "rand", "serde", "serde_json", @@ -2686,9 +2712,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "lru" @@ -2699,11 +2725,40 @@ dependencies = [ "hashbrown 0.15.2", ] +[[package]] +name = "maili-consensus" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51e7f5caf44d4b25169548ad75390a5f6a1afaf86a30af4a8849f10f30a000e" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", +] + +[[package]] +name = "maili-genesis" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459b6dcd16a6e5a7834aa1606a8f4796e573622d20a1fc90050e6050d76ad048" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_repr", + "thiserror 2.0.11", +] + [[package]] name = "maili-protocol" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428caa534dd054a449e64d8007d0fd0a15519d1033b272d37d02b74a29cf69f7" +checksum = "70d9f03c36b1ad64acad0b4714ab14a371866459bd46e39b6e2ab85c951220d0" dependencies = [ "alloc-no-stdlib", "alloy-consensus", @@ -2715,9 +2770,9 @@ dependencies = [ "async-trait", "brotli", "derive_more", + "maili-consensus", + "maili-genesis", "miniz_oxide", - "op-alloy-consensus", - "op-alloy-genesis", "rand", "serde", "thiserror 2.0.11", @@ -2727,13 +2782,13 @@ dependencies = [ [[package]] name = "maili-registry" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5cd036e01822d5258af348714a88aebb4a689e23fc2b8c2668b96e59459253e" +checksum = "c8ce3c4074e2ee53530ad5630ead343f0604271fea149a593c98e5d69b5bd6a0" dependencies = [ "alloy-primitives", "lazy_static", - "op-alloy-genesis", + "maili-genesis", "serde", "serde_json", ] @@ -2767,9 +2822,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] @@ -3006,9 +3061,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442518bf0ef88f4d79409527565b8cdee235c891f2e2a829497caec5ed9d8d1c" +checksum = "4a5361d1d0ff24e8ef9c9d03f93d3cd5bd4a70df011d383265360242ee66bd1f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -3016,47 +3071,23 @@ dependencies = [ "alloy-rlp", "alloy-serde", "derive_more", + "maili-consensus", "serde", "thiserror 2.0.11", ] -[[package]] -name = "op-alloy-genesis" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2af7fee1fa297569199b524493e50355eab3f1bff75cef492036eb4a3ffb5e" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", - "alloy-sol-types", - "serde", - "serde_repr", - "thiserror 2.0.11", -] - -[[package]] -name = "op-alloy-protocol" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a144b1ed079913b11c0640f4eaa3d2ac1bdb6cc35e3658a1640e88b241e0c32" -dependencies = [ - "maili-protocol", -] - [[package]] name = "op-alloy-rpc-types-engine" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e2419373bae23ea3f6cf5a49c624d9b644061e2e929d4f9629cbcbffa4964d" +checksum = "e51116038a40bb147c69d6b7f2fe3c71250a961a4928275fe3d3cefc22aee905" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rpc-types-engine", "alloy-serde", - "derive_more", + "maili-protocol", "op-alloy-consensus", - "op-alloy-protocol", "serde", "thiserror 2.0.11", ] @@ -3067,7 +3098,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.8.0", "cfg-if", "foreign-types", "libc", @@ -3383,7 +3414,7 @@ checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.7.0", + "bitflags 2.8.0", "lazy_static", "num-traits", "rand", @@ -3531,7 +3562,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.8.0", ] [[package]] @@ -3671,7 +3702,7 @@ dependencies = [ "alloy-eip7702 0.2.0", "alloy-primitives", "auto_impl", - "bitflags 2.7.0", + "bitflags 2.8.0", "bitvec", "c-kzg", "cfg-if", @@ -3853,7 +3884,7 @@ version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -3997,7 +4028,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.8.0", "core-foundation", "core-foundation-sys", "libc", @@ -4316,9 +4347,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "symbolic-common" -version = "12.13.1" +version = "12.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf08b42a6f9469bd8584daee39a1352c8133ccabc5151ccccb15896ef047d99a" +checksum = "8150eae9699e3c73a3e6431dc1f80d87748797c0457336af23e94c1de619ed24" dependencies = [ "debugid", "memmap2", @@ -4328,9 +4359,9 @@ dependencies = [ [[package]] name = "symbolic-demangle" -version = "12.13.1" +version = "12.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f73b5a5bd4da72720c45756a2d11edf110116b87f998bda59b97be8c2c7cf1" +checksum = "95f4a9846f7a8933b6d198c022faa2c9bd89e1a970bed9d9a98d25708bf8de17" dependencies = [ "cpp_demangle", "rustc-demangle", @@ -4361,9 +4392,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e89d8bf2768d277f40573c83a02a099e96d96dd3104e13ea676194e61ac4b0" +checksum = "b84e4d83a0a6704561302b917a932484e1cae2d8c6354c64be8b7bac1c1fe057" dependencies = [ "paste", "proc-macro2", @@ -4397,7 +4428,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.8.0", "core-foundation", "system-configuration-sys", ] @@ -4820,9 +4851,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" +checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" [[package]] name = "valuable" diff --git a/Cargo.toml b/Cargo.toml index 65fd3acff..94db8afdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,8 +76,10 @@ kona-preimage = { path = "crates/proof-sdk/preimage", version = "0.2.1", default kona-std-fpvm-proc = { path = "crates/proof-sdk/std-fpvm-proc", version = "0.1.2", default-features = false } # Maili -maili-protocol = { version = "0.1.2", default-features = false } -maili-registry = { version = "0.1.2", default-features = false } +maili-genesis = { version = "0.1.5", default-features = false } +maili-protocol = { version = "0.1.5", default-features = false } +maili-registry = { version = "0.1.5", default-features = false } +maili-consensus = { version = "0.1.5", default-features = false } # Alloy alloy-rlp = { version = "0.3.10", default-features = false } @@ -97,9 +99,8 @@ alloy-rpc-types-beacon = { version = "0.9.2", default-features = false } alloy-sol-types = { version = "0.8.18", default-features = false } # OP Alloy -op-alloy-genesis = { version = "0.9.2", default-features = false } -op-alloy-consensus = { version = "0.9.2", default-features = false } -op-alloy-rpc-types-engine = { version = "0.9.2", default-features = false } +op-alloy-consensus = { version = "0.9.4", default-features = false } +op-alloy-rpc-types-engine = { version = "0.9.4", default-features = false } # General lru = "0.12.5" diff --git a/bin/client/Cargo.toml b/bin/client/Cargo.toml index 6b76b72d6..562df57c6 100644 --- a/bin/client/Cargo.toml +++ b/bin/client/Cargo.toml @@ -22,6 +22,7 @@ kona-std-fpvm-proc.workspace = true # Maili maili-protocol.workspace = true +maili-genesis = { workspace = true, features = ["serde"] } # Alloy alloy-rlp.workspace = true @@ -32,7 +33,6 @@ alloy-rpc-types-engine.workspace = true # Op Alloy op-alloy-consensus.workspace = true -op-alloy-genesis = { workspace = true, features = ["serde"] } op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] } # Revm diff --git a/bin/host/Cargo.toml b/bin/host/Cargo.toml index b9c6d01c0..4eb81b5cd 100644 --- a/bin/host/Cargo.toml +++ b/bin/host/Cargo.toml @@ -36,7 +36,7 @@ alloy-primitives = { workspace = true, features = ["serde"] } alloy-rpc-types-beacon.workspace = true # Op Alloy -op-alloy-genesis = { workspace = true, features = ["std", "serde"] } +maili-genesis = { workspace = true, features = ["std", "serde"] } op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] } # Revm diff --git a/bin/host/src/single/cli.rs b/bin/host/src/single/cli.rs index a6909226e..e1b4bbb0c 100644 --- a/bin/host/src/single/cli.rs +++ b/bin/host/src/single/cli.rs @@ -15,7 +15,7 @@ use clap::{ builder::styling::{AnsiColor, Color, Style}, Parser, }; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use reqwest::Client; use serde::Serialize; use std::{path::PathBuf, sync::Arc}; diff --git a/book/src/sdk/pipeline/intro.md b/book/src/sdk/pipeline/intro.md index a202d50dd..0c2735263 100644 --- a/book/src/sdk/pipeline/intro.md +++ b/book/src/sdk/pipeline/intro.md @@ -94,7 +94,7 @@ the [`PipelineBuilder`][builder] to instantiate a [`DerivationPipeline`][dp]. // Imports use std::sync::Arc; use maili_protocol::BlockInfo; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use hilo_providers_alloy::*; // Use a default rollup config. diff --git a/book/src/sdk/pipeline/providers.md b/book/src/sdk/pipeline/providers.md index 56936278a..ded948414 100644 --- a/book/src/sdk/pipeline/providers.md +++ b/book/src/sdk/pipeline/providers.md @@ -23,7 +23,7 @@ required trait implementations are the providers stubbed with `todo!()`. ```rust use std::sync::Arc; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use kona_derive::pipeline::PipelineBuilder; use kona_derive::attributes::StatefulAttributesBuilder; diff --git a/crates/derive/Cargo.toml b/crates/derive/Cargo.toml index 525540462..486956014 100644 --- a/crates/derive/Cargo.toml +++ b/crates/derive/Cargo.toml @@ -13,6 +13,7 @@ workspace = true [dependencies] # Maili +maili-genesis.workspace = true maili-protocol.workspace = true # Alloy @@ -23,7 +24,6 @@ alloy-consensus = { workspace = true, features = ["k256"] } alloy-primitives = { workspace = true, features = ["rlp", "k256", "map"] } # Op Alloy -op-alloy-genesis.workspace = true op-alloy-rpc-types-engine.workspace = true op-alloy-consensus = { workspace = true, features = ["k256"] } @@ -41,6 +41,7 @@ spin.workspace = true proptest.workspace = true serde_json.workspace = true maili-registry.workspace = true +maili-consensus.workspace = true tokio = { workspace = true, features = ["full"] } tracing-subscriber = { workspace = true, features = ["fmt"] } tracing = { workspace = true, features = ["std"] } @@ -50,10 +51,10 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitr default = [] serde = [ "maili-protocol/serde", + "maili-genesis/serde", "alloy-primitives/serde", "alloy-consensus/serde", "op-alloy-consensus/serde", - "op-alloy-genesis/serde", "op-alloy-rpc-types-engine/serde", ] test-utils = [ diff --git a/crates/derive/README.md b/crates/derive/README.md index e8cdbad1b..3f8ff6bce 100644 --- a/crates/derive/README.md +++ b/crates/derive/README.md @@ -15,7 +15,7 @@ The intended way of working with `kona-derive` is to use the [`DerivationPipelin ```rust,ignore use std::sync::Arc; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use kona_derive::sources::EthereumDataSource; use kona_derive::pipeline::PipelineBuilder; use kona_derive::attributes::StatefulAttributesBuilder; diff --git a/crates/derive/src/attributes/stateful.rs b/crates/derive/src/attributes/stateful.rs index fc43bfcd1..c613bc1a9 100644 --- a/crates/derive/src/attributes/stateful.rs +++ b/crates/derive/src/attributes/stateful.rs @@ -13,9 +13,9 @@ use alloy_primitives::{address, Address, Bytes, B256}; use alloy_rlp::Encodable; use alloy_rpc_types_engine::PayloadAttributes; use async_trait::async_trait; +use maili_genesis::RollupConfig; use maili_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH}; use op_alloy_consensus::{Hardfork, Hardforks}; -use op_alloy_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; /// The sequencer fee vault address. @@ -236,8 +236,8 @@ mod tests { use alloc::vec; use alloy_consensus::Header; use alloy_primitives::{Log, LogData, B256, U256, U64}; + use maili_genesis::SystemConfig; use maili_protocol::{BlockInfo, DepositError}; - use op_alloy_genesis::SystemConfig; fn generate_valid_log() -> Log { let deposit_contract = address!("1111111111111111111111111111111111111111"); diff --git a/crates/derive/src/errors/attributes.rs b/crates/derive/src/errors/attributes.rs index 29c7b135c..198ba2a56 100644 --- a/crates/derive/src/errors/attributes.rs +++ b/crates/derive/src/errors/attributes.rs @@ -18,7 +18,7 @@ pub enum BuilderError { BlockMismatchEpochReset(BlockNumHash, BlockNumHash, B256), /// [SystemConfig] update failed. /// - /// [SystemConfig]: op_alloy_genesis::SystemConfig + /// [SystemConfig]: maili_genesis::SystemConfig #[error("System config update failed")] SystemConfigUpdate, /// Broken time invariant between L2 and L1. diff --git a/crates/derive/src/errors/pipeline.rs b/crates/derive/src/errors/pipeline.rs index 6a082b030..2fb13190a 100644 --- a/crates/derive/src/errors/pipeline.rs +++ b/crates/derive/src/errors/pipeline.rs @@ -3,8 +3,8 @@ use crate::errors::BuilderError; use alloc::string::String; use alloy_primitives::B256; +use maili_genesis::SystemConfigUpdateError; use maili_protocol::{DepositError, SpanBatchError}; -use op_alloy_genesis::SystemConfigUpdateError; use thiserror::Error; /// [crate::ensure] is a short-hand for bubbling up errors in the case of a condition not being met. @@ -83,7 +83,7 @@ pub enum PipelineError { InvalidBatchValidity, /// [SystemConfig] update error. /// - /// [SystemConfig]: op_alloy_genesis::SystemConfig + /// [SystemConfig]: maili_genesis::SystemConfig #[error("Error updating system config: {0}")] SystemConfigUpdate(SystemConfigUpdateError), /// Attributes builder error variant, with [BuilderError]. diff --git a/crates/derive/src/pipeline/builder.rs b/crates/derive/src/pipeline/builder.rs index 25d3797cb..698ec61ed 100644 --- a/crates/derive/src/pipeline/builder.rs +++ b/crates/derive/src/pipeline/builder.rs @@ -10,8 +10,8 @@ use crate::{ }; use alloc::sync::Arc; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::BlockInfo; -use op_alloy_genesis::RollupConfig; type L1TraversalStage

= L1Traversal

; type L1RetrievalStage = L1Retrieval>; diff --git a/crates/derive/src/pipeline/core.rs b/crates/derive/src/pipeline/core.rs index 6b3ddda1e..60c23b9f6 100644 --- a/crates/derive/src/pipeline/core.rs +++ b/crates/derive/src/pipeline/core.rs @@ -10,8 +10,8 @@ use crate::{ use alloc::{boxed::Box, collections::VecDeque, sync::Arc}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::{BlockInfo, L2BlockInfo}; -use op_alloy_genesis::{RollupConfig, SystemConfig}; use op_alloy_rpc_types_engine::OpAttributesWithParent; /// The derivation pipeline is responsible for deriving L2 inputs from L1 data. @@ -195,8 +195,8 @@ mod tests { use crate::{pipeline::DerivationPipeline, test_utils::*}; use alloc::{string::ToString, sync::Arc}; use alloy_rpc_types_engine::PayloadAttributes; + use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::L2BlockInfo; - use op_alloy_genesis::{RollupConfig, SystemConfig}; use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes}; fn default_test_payload_attributes() -> OpAttributesWithParent { diff --git a/crates/derive/src/sources/ethereum.rs b/crates/derive/src/sources/ethereum.rs index 79fec6c1c..68e2600e9 100644 --- a/crates/derive/src/sources/ethereum.rs +++ b/crates/derive/src/sources/ethereum.rs @@ -9,8 +9,8 @@ use crate::{ use alloc::{boxed::Box, fmt::Debug}; use alloy_primitives::Bytes; use async_trait::async_trait; +use maili_genesis::RollupConfig; use maili_protocol::BlockInfo; -use op_alloy_genesis::RollupConfig; /// A factory for creating an Ethereum data source provider. #[derive(Debug, Clone)] @@ -87,8 +87,8 @@ mod tests { use alloy_consensus::TxEnvelope; use alloy_eips::eip2718::Decodable2718; use alloy_primitives::{address, Address}; + use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::BlockInfo; - use op_alloy_genesis::{RollupConfig, SystemConfig}; fn default_test_blob_source() -> BlobSource { let chain_provider = TestChainProvider::default(); diff --git a/crates/derive/src/stages/attributes_queue.rs b/crates/derive/src/stages/attributes_queue.rs index 3e15cdd6e..63aadc4df 100644 --- a/crates/derive/src/stages/attributes_queue.rs +++ b/crates/derive/src/stages/attributes_queue.rs @@ -11,8 +11,8 @@ use crate::{ use alloc::{boxed::Box, sync::Arc}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch}; -use op_alloy_genesis::RollupConfig; use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes}; /// [AttributesQueue] accepts batches from the [BatchQueue] stage diff --git a/crates/derive/src/stages/batch/batch_provider.rs b/crates/derive/src/stages/batch/batch_provider.rs index a6a007909..a0f988967 100644 --- a/crates/derive/src/stages/batch/batch_provider.rs +++ b/crates/derive/src/stages/batch/batch_provider.rs @@ -10,8 +10,8 @@ use crate::{ use alloc::{boxed::Box, sync::Arc}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch}; -use op_alloy_genesis::RollupConfig; /// The [BatchProvider] stage is a mux between the [BatchQueue] and [BatchValidator] stages. /// @@ -182,8 +182,8 @@ mod test { types::ResetSignal, }; use alloc::{sync::Arc, vec}; + use maili_genesis::RollupConfig; use maili_protocol::BlockInfo; - use op_alloy_genesis::RollupConfig; #[test] fn test_batch_provider_validator_active() { diff --git a/crates/derive/src/stages/batch/batch_queue.rs b/crates/derive/src/stages/batch/batch_queue.rs index 012dca73b..99ac4d682 100644 --- a/crates/derive/src/stages/batch/batch_queue.rs +++ b/crates/derive/src/stages/batch/batch_queue.rs @@ -9,10 +9,10 @@ use crate::{ use alloc::{boxed::Box, sync::Arc, vec::Vec}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{ Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch, }; -use op_alloy_genesis::RollupConfig; /// [BatchQueue] is responsible for o rdering unordered batches /// and generating empty batches when the sequence window has passed. @@ -468,9 +468,10 @@ mod tests { use alloy_eips::{eip2718::Decodable2718, BlockNumHash}; use alloy_primitives::{address, b256, Address, Bytes, TxKind, B256, U256}; use alloy_rlp::{BytesMut, Encodable}; + use maili_consensus::TxDeposit; + use maili_genesis::{ChainGenesis, MAX_RLP_BYTES_PER_CHANNEL_FJORD}; use maili_protocol::{BatchReader, L1BlockInfoBedrock, L1BlockInfoTx}; - use op_alloy_consensus::{OpBlock, OpTxEnvelope, OpTxType, TxDeposit}; - use op_alloy_genesis::{ChainGenesis, MAX_RLP_BYTES_PER_CHANNEL_FJORD}; + use op_alloy_consensus::{OpBlock, OpTxEnvelope, OpTxType}; use tracing::Level; use tracing_subscriber::layer::SubscriberExt; diff --git a/crates/derive/src/stages/batch/batch_stream.rs b/crates/derive/src/stages/batch/batch_stream.rs index 36d22ad63..83c3e31e3 100644 --- a/crates/derive/src/stages/batch/batch_stream.rs +++ b/crates/derive/src/stages/batch/batch_stream.rs @@ -9,10 +9,10 @@ use crate::{ use alloc::{boxed::Box, collections::VecDeque, sync::Arc}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{ Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch, }; -use op_alloy_genesis::RollupConfig; /// Provides [Batch]es for the [BatchStream] stage. #[async_trait] diff --git a/crates/derive/src/stages/batch/batch_validator.rs b/crates/derive/src/stages/batch/batch_validator.rs index 40b7647b7..6f807b758 100644 --- a/crates/derive/src/stages/batch/batch_validator.rs +++ b/crates/derive/src/stages/batch/batch_validator.rs @@ -11,8 +11,8 @@ use crate::{ use alloc::{boxed::Box, sync::Arc, vec::Vec}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{Batch, BatchValidity, BlockInfo, L2BlockInfo, SingleBatch}; -use op_alloy_genesis::RollupConfig; /// The [BatchValidator] stage is responsible for validating the [SingleBatch]es from /// the [BatchStream] [AttributesQueue]'s consumption. @@ -320,8 +320,8 @@ mod test { use alloc::{sync::Arc, vec, vec::Vec}; use alloy_eips::{BlockNumHash, NumHash}; use alloy_primitives::B256; + use maili_genesis::RollupConfig; use maili_protocol::{Batch, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch}; - use op_alloy_genesis::RollupConfig; use tracing::Level; use tracing_subscriber::layer::SubscriberExt; diff --git a/crates/derive/src/stages/channel/channel_assembler.rs b/crates/derive/src/stages/channel/channel_assembler.rs index a0dadce41..da4c5981d 100644 --- a/crates/derive/src/stages/channel/channel_assembler.rs +++ b/crates/derive/src/stages/channel/channel_assembler.rs @@ -10,10 +10,10 @@ use alloc::{boxed::Box, sync::Arc}; use alloy_primitives::{hex, Bytes}; use async_trait::async_trait; use core::fmt::Debug; -use maili_protocol::{BlockInfo, Channel}; -use op_alloy_genesis::{ +use maili_genesis::{ RollupConfig, MAX_RLP_BYTES_PER_CHANNEL_BEDROCK, MAX_RLP_BYTES_PER_CHANNEL_FJORD, }; +use maili_protocol::{BlockInfo, Channel}; /// The [ChannelAssembler] stage is responsible for assembling the [Frame]s from the [FrameQueue] /// stage into a raw compressed [Channel]. @@ -191,10 +191,10 @@ mod test { test_utils::{CollectingLayer, TestNextFrameProvider, TraceStorage}, }; use alloc::{sync::Arc, vec}; - use maili_protocol::BlockInfo; - use op_alloy_genesis::{ + use maili_genesis::{ RollupConfig, MAX_RLP_BYTES_PER_CHANNEL_BEDROCK, MAX_RLP_BYTES_PER_CHANNEL_FJORD, }; + use maili_protocol::BlockInfo; use tracing::Level; use tracing_subscriber::layer::SubscriberExt; diff --git a/crates/derive/src/stages/channel/channel_bank.rs b/crates/derive/src/stages/channel/channel_bank.rs index ce5624d8b..e101d5e0e 100644 --- a/crates/derive/src/stages/channel/channel_bank.rs +++ b/crates/derive/src/stages/channel/channel_bank.rs @@ -11,8 +11,8 @@ use alloc::{boxed::Box, collections::VecDeque, sync::Arc}; use alloy_primitives::{hex, map::HashMap, Bytes}; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{BlockInfo, Channel, ChannelId, Frame}; -use op_alloy_genesis::RollupConfig; /// The maximum size of a channel bank. pub(crate) const MAX_CHANNEL_BANK_SIZE: usize = 100_000_000; diff --git a/crates/derive/src/stages/channel/channel_provider.rs b/crates/derive/src/stages/channel/channel_provider.rs index 5a747af09..0e686c3d7 100644 --- a/crates/derive/src/stages/channel/channel_provider.rs +++ b/crates/derive/src/stages/channel/channel_provider.rs @@ -10,8 +10,8 @@ use alloc::{boxed::Box, sync::Arc}; use alloy_primitives::Bytes; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::BlockInfo; -use op_alloy_genesis::RollupConfig; /// The [ChannelProvider] stage is a mux between the [ChannelBank] and [ChannelAssembler] stages. /// @@ -163,8 +163,8 @@ mod test { types::ResetSignal, }; use alloc::{sync::Arc, vec}; + use maili_genesis::RollupConfig; use maili_protocol::BlockInfo; - use op_alloy_genesis::RollupConfig; #[test] fn test_channel_provider_assembler_active() { diff --git a/crates/derive/src/stages/channel/channel_reader.rs b/crates/derive/src/stages/channel/channel_reader.rs index 65ac29de0..1b67a0998 100644 --- a/crates/derive/src/stages/channel/channel_reader.rs +++ b/crates/derive/src/stages/channel/channel_reader.rs @@ -10,10 +10,10 @@ use alloc::{boxed::Box, sync::Arc}; use alloy_primitives::Bytes; use async_trait::async_trait; use core::fmt::Debug; -use maili_protocol::{Batch, BatchReader, BlockInfo}; -use op_alloy_genesis::{ +use maili_genesis::{ RollupConfig, MAX_RLP_BYTES_PER_CHANNEL_BEDROCK, MAX_RLP_BYTES_PER_CHANNEL_FJORD, }; +use maili_protocol::{Batch, BatchReader, BlockInfo}; use tracing::{debug, warn}; /// The [ChannelReader] provider trait. diff --git a/crates/derive/src/stages/frame_queue.rs b/crates/derive/src/stages/frame_queue.rs index 2506a0290..083fd0ae4 100644 --- a/crates/derive/src/stages/frame_queue.rs +++ b/crates/derive/src/stages/frame_queue.rs @@ -10,8 +10,8 @@ use alloc::{boxed::Box, collections::VecDeque, sync::Arc}; use alloy_primitives::Bytes; use async_trait::async_trait; use core::fmt::Debug; +use maili_genesis::RollupConfig; use maili_protocol::{BlockInfo, Frame}; -use op_alloy_genesis::RollupConfig; /// Provides data frames for the [FrameQueue] stage. #[async_trait] diff --git a/crates/derive/src/stages/l1_retrieval.rs b/crates/derive/src/stages/l1_retrieval.rs index 9de491145..3615a9408 100644 --- a/crates/derive/src/stages/l1_retrieval.rs +++ b/crates/derive/src/stages/l1_retrieval.rs @@ -23,7 +23,7 @@ pub trait L1RetrievalProvider { /// [L1Traversal]: crate::stages::L1Traversal async fn next_l1_block(&mut self) -> PipelineResult>; - /// Returns the batcher [Address] from the [op_alloy_genesis::SystemConfig]. + /// Returns the batcher [Address] from the [maili_genesis::SystemConfig]. fn batcher_addr(&self) -> Address; } diff --git a/crates/derive/src/stages/l1_traversal.rs b/crates/derive/src/stages/l1_traversal.rs index c14b653be..55b30eda2 100644 --- a/crates/derive/src/stages/l1_traversal.rs +++ b/crates/derive/src/stages/l1_traversal.rs @@ -9,8 +9,8 @@ use crate::{ use alloc::{boxed::Box, sync::Arc}; use alloy_primitives::Address; use async_trait::async_trait; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::BlockInfo; -use op_alloy_genesis::{RollupConfig, SystemConfig}; /// The [L1Traversal] stage of the derivation pipeline. /// @@ -144,7 +144,7 @@ pub(crate) mod tests { use alloc::vec; use alloy_consensus::Receipt; use alloy_primitives::{address, b256, hex, Bytes, Log, LogData, B256}; - use op_alloy_genesis::{CONFIG_UPDATE_EVENT_VERSION_0, CONFIG_UPDATE_TOPIC}; + use maili_genesis::{CONFIG_UPDATE_EVENT_VERSION_0, CONFIG_UPDATE_TOPIC}; const L1_SYS_CONFIG_ADDR: Address = address!("1337000000000000000000000000000000000000"); diff --git a/crates/derive/src/test_utils/chain_providers.rs b/crates/derive/src/test_utils/chain_providers.rs index 2bf6c4f72..31765eb2f 100644 --- a/crates/derive/src/test_utils/chain_providers.rs +++ b/crates/derive/src/test_utils/chain_providers.rs @@ -5,12 +5,12 @@ use crate::{ traits::{ChainProvider, L2ChainProvider}, }; use alloc::{boxed::Box, string::ToString, sync::Arc, vec::Vec}; -use alloy_consensus::{Header, Receipt, TxEnvelope}; +use alloy_consensus::{Block, Header, Receipt, TxEnvelope}; use alloy_primitives::{map::HashMap, B256}; use async_trait::async_trait; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::{BatchValidationProvider, BlockInfo, L2BlockInfo}; use op_alloy_consensus::OpBlock; -use op_alloy_genesis::{RollupConfig, SystemConfig}; use thiserror::Error; /// A mock chain provider for testing. @@ -177,6 +177,7 @@ impl TestL2ChainProvider { #[async_trait] impl BatchValidationProvider for TestL2ChainProvider { type Error = TestProviderError; + type Transaction = op_alloy_consensus::OpTxEnvelope; async fn l2_block_info_by_number(&mut self, number: u64) -> Result { if self.short_circuit { @@ -189,7 +190,10 @@ impl BatchValidationProvider for TestL2ChainProvider { .ok_or_else(|| TestProviderError::BlockNotFound) } - async fn block_by_number(&mut self, number: u64) -> Result { + async fn block_by_number( + &mut self, + number: u64, + ) -> Result, Self::Error> { self.op_blocks .iter() .find(|p| p.header.number == number) diff --git a/crates/derive/src/test_utils/frames.rs b/crates/derive/src/test_utils/frames.rs index cc91fa82a..1fe7cce0d 100644 --- a/crates/derive/src/test_utils/frames.rs +++ b/crates/derive/src/test_utils/frames.rs @@ -8,8 +8,8 @@ use crate::{ }; use alloc::{sync::Arc, vec, vec::Vec}; use alloy_primitives::Bytes; +use maili_genesis::RollupConfig; use maili_protocol::{BlockInfo, Frame, DERIVATION_VERSION_0}; -use op_alloy_genesis::RollupConfig; /// A [FrameQueue] builder. #[derive(Debug, Default)] diff --git a/crates/derive/src/test_utils/pipeline.rs b/crates/derive/src/test_utils/pipeline.rs index 23217239b..90861b1ac 100644 --- a/crates/derive/src/test_utils/pipeline.rs +++ b/crates/derive/src/test_utils/pipeline.rs @@ -7,8 +7,8 @@ use crate::{ types::PipelineResult, }; use alloc::{boxed::Box, sync::Arc}; +use maili_genesis::RollupConfig; use maili_protocol::{BlockInfo, L2BlockInfo}; -use op_alloy_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpAttributesWithParent; // Re-export these types used internally to the test pipeline. diff --git a/crates/derive/src/test_utils/sys_config_fetcher.rs b/crates/derive/src/test_utils/sys_config_fetcher.rs index 7b6bd2c8b..99365e0f4 100644 --- a/crates/derive/src/test_utils/sys_config_fetcher.rs +++ b/crates/derive/src/test_utils/sys_config_fetcher.rs @@ -5,11 +5,11 @@ use crate::{ traits::L2ChainProvider, }; use alloc::{boxed::Box, string::ToString, sync::Arc}; +use alloy_consensus::Block; use alloy_primitives::map::HashMap; use async_trait::async_trait; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::{BatchValidationProvider, L2BlockInfo}; -use op_alloy_consensus::OpBlock; -use op_alloy_genesis::{RollupConfig, SystemConfig}; use thiserror::Error; /// A mock implementation of the `SystemConfigL2Fetcher` for testing. @@ -48,8 +48,9 @@ impl From for PipelineErrorKind { #[async_trait] impl BatchValidationProvider for TestSystemConfigL2Fetcher { type Error = TestSystemConfigL2FetcherError; + type Transaction = op_alloy_consensus::OpTxEnvelope; - async fn block_by_number(&mut self, _: u64) -> Result { + async fn block_by_number(&mut self, _: u64) -> Result, Self::Error> { unimplemented!() } diff --git a/crates/derive/src/traits/pipeline.rs b/crates/derive/src/traits/pipeline.rs index b47ce321d..776597dbd 100644 --- a/crates/derive/src/traits/pipeline.rs +++ b/crates/derive/src/traits/pipeline.rs @@ -3,8 +3,8 @@ use alloc::boxed::Box; use async_trait::async_trait; use core::iter::Iterator; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::L2BlockInfo; -use op_alloy_genesis::{RollupConfig, SystemConfig}; use op_alloy_rpc_types_engine::OpAttributesWithParent; use crate::{errors::PipelineErrorKind, traits::OriginProvider, types::StepResult}; diff --git a/crates/derive/src/traits/providers.rs b/crates/derive/src/traits/providers.rs index 1f9ddd541..e3da30fe6 100644 --- a/crates/derive/src/traits/providers.rs +++ b/crates/derive/src/traits/providers.rs @@ -6,8 +6,8 @@ use alloy_consensus::{Header, Receipt, TxEnvelope}; use alloy_primitives::B256; use async_trait::async_trait; use core::fmt::Display; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::{BatchValidationProvider, BlockInfo}; -use op_alloy_genesis::{RollupConfig, SystemConfig}; /// Describes the functionality of a data source that can provide information from the blockchain. #[async_trait] diff --git a/crates/derive/src/traits/reset.rs b/crates/derive/src/traits/reset.rs index a28c77462..9604ef381 100644 --- a/crates/derive/src/traits/reset.rs +++ b/crates/derive/src/traits/reset.rs @@ -2,8 +2,8 @@ use alloc::boxed::Box; use async_trait::async_trait; +use maili_genesis::SystemConfig; use maili_protocol::BlockInfo; -use op_alloy_genesis::SystemConfig; /// Provides the [BlockInfo] and [SystemConfig] for the stack to reset the stages. #[async_trait] diff --git a/crates/derive/src/types/signals.rs b/crates/derive/src/types/signals.rs index 8e83c5a10..1b529f901 100644 --- a/crates/derive/src/types/signals.rs +++ b/crates/derive/src/types/signals.rs @@ -4,8 +4,8 @@ //! of the pipeline. They allow the pipeline driver to perform actions such as //! resetting all stages in the pipeline through message passing. +use maili_genesis::SystemConfig; use maili_protocol::{BlockInfo, L2BlockInfo}; -use op_alloy_genesis::SystemConfig; /// A signal to send to the pipeline. #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/driver/Cargo.toml b/crates/driver/Cargo.toml index 46c13aed7..b302c71f8 100644 --- a/crates/driver/Cargo.toml +++ b/crates/driver/Cargo.toml @@ -16,6 +16,7 @@ workspace = true kona-derive.workspace = true # Maili +maili-genesis.workspace = true maili-protocol.workspace = true # Alloy @@ -24,7 +25,6 @@ alloy-consensus.workspace = true alloy-primitives.workspace = true # OP Alloy -op-alloy-genesis.workspace = true op-alloy-consensus.workspace = true op-alloy-rpc-types-engine.workspace = true diff --git a/crates/driver/src/core.rs b/crates/driver/src/core.rs index d1542fb47..249e36c7f 100644 --- a/crates/driver/src/core.rs +++ b/crates/driver/src/core.rs @@ -10,9 +10,9 @@ use kona_derive::{ traits::{Pipeline, SignalReceiver}, types::Signal, }; +use maili_genesis::RollupConfig; use maili_protocol::L2BlockInfo; use op_alloy_consensus::{OpBlock, OpTxEnvelope, OpTxType}; -use op_alloy_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpAttributesWithParent; use crate::{DriverError, DriverPipeline, DriverResult, Executor, PipelineCursor, TipCursor}; diff --git a/crates/executor/Cargo.toml b/crates/executor/Cargo.toml index efa1cf686..da2000130 100644 --- a/crates/executor/Cargo.toml +++ b/crates/executor/Cargo.toml @@ -15,6 +15,9 @@ workspace = true # Workspace kona-mpt.workspace = true +# Maili +maili-genesis.workspace = true + # Alloy alloy-consensus = { workspace = true, features = ["k256"] } alloy-primitives = { workspace = true, features = ["rlp"] } @@ -22,7 +25,6 @@ alloy-eips.workspace = true alloy-rlp.workspace = true # Op Alloy -op-alloy-genesis.workspace = true op-alloy-consensus.workspace = true op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] } diff --git a/crates/executor/benches/execution.rs b/crates/executor/benches/execution.rs index 21d64ea65..f10aebbf8 100644 --- a/crates/executor/benches/execution.rs +++ b/crates/executor/benches/execution.rs @@ -9,7 +9,7 @@ use anyhow::{anyhow, Result}; use criterion::{criterion_group, criterion_main, Bencher, Criterion}; use kona_executor::{StatelessL2BlockExecutor, TrieDBProvider}; use kona_mpt::{NoopTrieHinter, TrieNode, TrieProvider}; -use op_alloy_genesis::{RollupConfig, OP_MAINNET_BASE_FEE_PARAMS}; +use maili_genesis::{RollupConfig, OP_MAINNET_BASE_FEE_CONFIG}; use op_alloy_rpc_types_engine::OpPayloadAttributes; use pprof::criterion::{Output, PProfProfiler}; use serde::Deserialize; @@ -80,8 +80,8 @@ fn op_mainnet_exec_bench( canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; diff --git a/crates/executor/src/executor/builder.rs b/crates/executor/src/executor/builder.rs index 50ce26826..796885a42 100644 --- a/crates/executor/src/executor/builder.rs +++ b/crates/executor/src/executor/builder.rs @@ -4,7 +4,7 @@ use super::StatelessL2BlockExecutor; use crate::db::{TrieDB, TrieDBProvider}; use alloy_consensus::{Header, Sealable, Sealed}; use kona_mpt::TrieHinter; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use revm::{db::State, handler::register::EvmHandler}; /// A type alias for the [revm::handler::register::HandleRegister] for kona's block executor. diff --git a/crates/executor/src/executor/env.rs b/crates/executor/src/executor/env.rs index 1d4cba754..591fddc52 100644 --- a/crates/executor/src/executor/env.rs +++ b/crates/executor/src/executor/env.rs @@ -6,8 +6,8 @@ use alloy_consensus::Header; use alloy_eips::{eip1559::BaseFeeParams, eip7840::BlobParams}; use alloy_primitives::{TxKind, U256}; use kona_mpt::TrieHinter; +use maili_genesis::RollupConfig; use op_alloy_consensus::OpTxEnvelope; -use op_alloy_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; use revm::primitives::{ BlobExcessGasAndPrice, BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, OptimismFields, SpecId, diff --git a/crates/executor/src/executor/mod.rs b/crates/executor/src/executor/mod.rs index 1daf3f80b..24788c882 100644 --- a/crates/executor/src/executor/mod.rs +++ b/crates/executor/src/executor/mod.rs @@ -12,8 +12,8 @@ use alloy_consensus::{Header, Sealable, Transaction, EMPTY_OMMER_ROOT_HASH, EMPT use alloy_eips::eip2718::{Decodable2718, Encodable2718}; use alloy_primitives::{keccak256, logs_bloom, Bytes, Log, B256, U256}; use kona_mpt::{ordered_trie_with_encoder, TrieHinter}; +use maili_genesis::RollupConfig; use op_alloy_consensus::{OpReceiptEnvelope, OpTxEnvelope}; -use op_alloy_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; use revm::{ db::{states::bundle_state::BundleRetention, State}, @@ -466,7 +466,7 @@ mod test { use alloy_rpc_types_engine::PayloadAttributes; use anyhow::{anyhow, Result}; use kona_mpt::{NoopTrieHinter, TrieNode, TrieProvider}; - use op_alloy_genesis::OP_MAINNET_BASE_FEE_PARAMS; + use maili_genesis::OP_MAINNET_BASE_FEE_CONFIG; use serde::Deserialize; use std::collections::HashMap; @@ -534,8 +534,8 @@ mod test { canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; @@ -593,8 +593,8 @@ mod test { canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; @@ -656,8 +656,8 @@ mod test { canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; @@ -726,8 +726,8 @@ mod test { canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; @@ -790,8 +790,8 @@ mod test { canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; @@ -863,8 +863,8 @@ mod test { canyon_time: Some(0), delta_time: Some(0), ecotone_time: Some(0), - base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_base_fee_params(), - canyon_base_fee_params: OP_MAINNET_BASE_FEE_PARAMS.as_canyon_base_fee_params(), + base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_base_fee_params(), + canyon_base_fee_params: OP_MAINNET_BASE_FEE_CONFIG.as_canyon_base_fee_params(), ..Default::default() }; diff --git a/crates/executor/src/executor/util.rs b/crates/executor/src/executor/util.rs index 4939595bb..c3df58cbe 100644 --- a/crates/executor/src/executor/util.rs +++ b/crates/executor/src/executor/util.rs @@ -5,7 +5,7 @@ use alloc::vec::Vec; use alloy_consensus::Header; use alloy_eips::eip1559::BaseFeeParams; use alloy_primitives::{Bytes, B64}; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; /// Parse Holocene [Header] extra data. @@ -90,7 +90,7 @@ mod test { use alloy_eips::eip1559::BaseFeeParams; use alloy_primitives::{b64, hex, B64}; use alloy_rpc_types_engine::PayloadAttributes; - use op_alloy_genesis::RollupConfig; + use maili_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; fn mock_payload(eip_1559_params: Option) -> OpPayloadAttributes { diff --git a/crates/executor/src/syscalls/canyon.rs b/crates/executor/src/syscalls/canyon.rs index 14778626f..2d48b3222 100644 --- a/crates/executor/src/syscalls/canyon.rs +++ b/crates/executor/src/syscalls/canyon.rs @@ -3,7 +3,7 @@ use crate::{db::TrieDB, errors::ExecutorResult, TrieDBProvider}; use alloy_primitives::{address, b256, hex, Address, Bytes, B256}; use kona_mpt::TrieHinter; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use revm::{ primitives::{Account, Bytecode, HashMap}, DatabaseCommit, State, diff --git a/crates/executor/src/syscalls/eip4788.rs b/crates/executor/src/syscalls/eip4788.rs index 2a8484835..43b90c1b3 100644 --- a/crates/executor/src/syscalls/eip4788.rs +++ b/crates/executor/src/syscalls/eip4788.rs @@ -9,7 +9,7 @@ use alloc::{boxed::Box, vec::Vec}; use alloy_eips::eip4788::BEACON_ROOTS_ADDRESS; use alloy_primitives::{Address, Bytes, B256, U256}; use kona_mpt::TrieHinter; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; use revm::{ db::State, diff --git a/crates/proof-sdk/proof-interop/Cargo.toml b/crates/proof-sdk/proof-interop/Cargo.toml index 0820b9df9..413f66964 100644 --- a/crates/proof-sdk/proof-interop/Cargo.toml +++ b/crates/proof-sdk/proof-interop/Cargo.toml @@ -19,14 +19,12 @@ kona-proof.workspace = true # Maili maili-registry.workspace = true +maili-genesis = { workspace = true, features = ["serde"] } # Alloy alloy-rlp.workspace = true alloy-primitives.workspace = true -# Op Alloy -op-alloy-genesis = { workspace = true, features = ["serde"] } - # General serde.workspace = true tracing.workspace = true diff --git a/crates/proof-sdk/proof-interop/src/boot.rs b/crates/proof-sdk/proof-interop/src/boot.rs index 51d0349aa..8d4bfb597 100644 --- a/crates/proof-sdk/proof-interop/src/boot.rs +++ b/crates/proof-sdk/proof-interop/src/boot.rs @@ -4,8 +4,8 @@ use alloy_primitives::{B256, U256}; use kona_preimage::{PreimageKey, PreimageOracleClient}; use kona_proof::errors::OracleProviderError; +use maili_genesis::RollupConfig; use maili_registry::ROLLUP_CONFIGS; -use op_alloy_genesis::RollupConfig; use serde::{Deserialize, Serialize}; use tracing::warn; diff --git a/crates/proof-sdk/proof/Cargo.toml b/crates/proof-sdk/proof/Cargo.toml index d8e408b7a..f2db4cbd7 100644 --- a/crates/proof-sdk/proof/Cargo.toml +++ b/crates/proof-sdk/proof/Cargo.toml @@ -22,6 +22,7 @@ kona-executor.workspace = true # Maili maili-protocol.workspace = true maili-registry.workspace = true +maili-genesis = { workspace = true, features = ["serde"] } # Alloy alloy-rlp.workspace = true @@ -31,7 +32,6 @@ alloy-primitives.workspace = true # Op Alloy op-alloy-consensus.workspace = true -op-alloy-genesis = { workspace = true, features = ["serde"] } op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] } # General diff --git a/crates/proof-sdk/proof/src/boot.rs b/crates/proof-sdk/proof/src/boot.rs index f4d945abc..d58aff649 100644 --- a/crates/proof-sdk/proof/src/boot.rs +++ b/crates/proof-sdk/proof/src/boot.rs @@ -4,8 +4,8 @@ use crate::errors::OracleProviderError; use alloy_primitives::{B256, U256}; use kona_preimage::{PreimageKey, PreimageOracleClient}; +use maili_genesis::RollupConfig; use maili_registry::ROLLUP_CONFIGS; -use op_alloy_genesis::RollupConfig; use serde::{Deserialize, Serialize}; /// The local key ident for the L1 head hash. diff --git a/crates/proof-sdk/proof/src/executor.rs b/crates/proof-sdk/proof/src/executor.rs index 3ceaaba0a..8333282cd 100644 --- a/crates/proof-sdk/proof/src/executor.rs +++ b/crates/proof-sdk/proof/src/executor.rs @@ -7,7 +7,7 @@ use async_trait::async_trait; use kona_driver::Executor; use kona_executor::{KonaHandleRegister, StatelessL2BlockExecutor, TrieDBProvider}; use kona_mpt::TrieHinter; -use op_alloy_genesis::RollupConfig; +use maili_genesis::RollupConfig; use op_alloy_rpc_types_engine::OpPayloadAttributes; /// An executor wrapper type. diff --git a/crates/proof-sdk/proof/src/l1/pipeline.rs b/crates/proof-sdk/proof/src/l1/pipeline.rs index 9e89973ce..dd23f835b 100644 --- a/crates/proof-sdk/proof/src/l1/pipeline.rs +++ b/crates/proof-sdk/proof/src/l1/pipeline.rs @@ -18,8 +18,8 @@ use kona_derive::{ }; use kona_driver::{DriverPipeline, PipelineCursor}; use kona_preimage::CommsClient; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::{BlockInfo, L2BlockInfo}; -use op_alloy_genesis::{RollupConfig, SystemConfig}; use op_alloy_rpc_types_engine::OpAttributesWithParent; /// An oracle-backed derivation pipeline. diff --git a/crates/proof-sdk/proof/src/l2/chain_provider.rs b/crates/proof-sdk/proof/src/l2/chain_provider.rs index 2bd3e53a4..4e10b2862 100644 --- a/crates/proof-sdk/proof/src/l2/chain_provider.rs +++ b/crates/proof-sdk/proof/src/l2/chain_provider.rs @@ -2,7 +2,7 @@ use crate::{errors::OracleProviderError, HintType}; use alloc::{boxed::Box, sync::Arc, vec::Vec}; -use alloy_consensus::{BlockBody, Header}; +use alloy_consensus::{Block, BlockBody, Header}; use alloy_eips::eip2718::Decodable2718; use alloy_primitives::{Address, Bytes, B256}; use alloy_rlp::Decodable; @@ -11,9 +11,9 @@ use kona_derive::traits::L2ChainProvider; use kona_executor::TrieDBProvider; use kona_mpt::{OrderedListWalker, TrieHinter, TrieNode, TrieProvider}; use kona_preimage::{CommsClient, PreimageKey, PreimageKeyType}; +use maili_genesis::{RollupConfig, SystemConfig}; use maili_protocol::{to_system_config, BatchValidationProvider, L2BlockInfo}; use op_alloy_consensus::{OpBlock, OpTxEnvelope}; -use op_alloy_genesis::{RollupConfig, SystemConfig}; /// The oracle-backed L2 chain provider for the client program. #[derive(Debug, Clone)] @@ -56,6 +56,7 @@ impl OracleL2ChainProvider { #[async_trait] impl BatchValidationProvider for OracleL2ChainProvider { type Error = OracleProviderError; + type Transaction = op_alloy_consensus::OpTxEnvelope; async fn l2_block_info_by_number(&mut self, number: u64) -> Result { // Get the block at the given number. @@ -66,7 +67,10 @@ impl BatchValidationProvider for OracleL2ChainProv .map_err(OracleProviderError::BlockInfo) } - async fn block_by_number(&mut self, number: u64) -> Result { + async fn block_by_number( + &mut self, + number: u64, + ) -> Result, Self::Error> { // Fetch the header for the given block number. let header @ Header { transactions_root, timestamp, .. } = self.header_by_number(number).await?;