diff --git a/Cargo.lock b/Cargo.lock index 7d093582..190fac08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -273,8 +273,8 @@ checksum = "527b47dc39850c6168002ddc1f7a2063e15d26137c1bb5330f6065a7524c1aa9" dependencies = [ "alloy-consensus", "alloy-eips", - "alloy-hardforks 0.4.7", - "alloy-op-hardforks 0.4.7", + "alloy-hardforks", + "alloy-op-hardforks", "alloy-primitives", "alloy-rpc-types-engine", "alloy-rpc-types-eth", @@ -303,19 +303,6 @@ dependencies = [ "serde_with", ] -[[package]] -name = "alloy-hardforks" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165210652f71dfc094b051602bafd691f506c54050a174b1cba18fb5ef706a3" -dependencies = [ - "alloy-chains", - "alloy-eip2124", - "alloy-primitives", - "auto_impl", - "dyn-clone", -] - [[package]] name = "alloy-hardforks" version = "0.4.7" @@ -405,7 +392,7 @@ dependencies = [ "alloy-consensus", "alloy-eips", "alloy-evm", - "alloy-op-hardforks 0.4.7", + "alloy-op-hardforks", "alloy-primitives", "auto_impl", "op-alloy-consensus", @@ -414,17 +401,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "alloy-op-hardforks" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3417f4187eaf7f7fb0d7556f0197bca26f0b23c4bb3aca0c9d566dc1c5d727a2" -dependencies = [ - "alloy-chains", - "alloy-hardforks 0.2.13", - "auto_impl", -] - [[package]] name = "alloy-op-hardforks" version = "0.4.7" @@ -432,7 +408,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6472c610150c4c4c15be9e1b964c9b78068f933bda25fb9cdf09b9ac2bb66f36" dependencies = [ "alloy-chains", - "alloy-hardforks 0.4.7", + "alloy-hardforks", "alloy-primitives", "auto_impl", "serde", @@ -1689,9 +1665,15 @@ dependencies = [ name = "base-client-cli" version = "0.0.0" dependencies = [ + "alloy-chains", "base-jwt", "clap", "eyre", + "kona-genesis", + "kona-registry", + "serde_json", + "thiserror 2.0.17", + "tracing", "url", ] @@ -1804,7 +1786,7 @@ dependencies = [ "reth-tracing", "reth-transaction-pool", "revm 31.0.2", - "revm-database 9.0.6", + "revm-database", "rstest", "serde", "serde_json", @@ -1882,7 +1864,7 @@ dependencies = [ "reth-revm", "reth-transaction-pool", "reth-trie-common", - "revm-database 9.0.6", + "revm-database", "serde", "tokio", "tracing", @@ -5239,7 +5221,7 @@ dependencies = [ "http", "http-body-util", "jsonrpsee-types", - "kona-genesis 0.4.5 (git+https://github.com/op-rs/kona?rev=24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d)", + "kona-genesis", "kona-macros", "kona-protocol", "op-alloy-consensus", @@ -5257,26 +5239,6 @@ dependencies = [ "url", ] -[[package]] -name = "kona-genesis" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b122a661c9f5efca5783f56674383eb742472796d2d4cf3d12a803b37f6bb11b" -dependencies = [ - "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-hardforks 0.2.13", - "alloy-op-hardforks 0.2.13", - "alloy-primitives", - "alloy-sol-types", - "derive_more", - "op-revm 8.1.0", - "serde", - "serde_repr", - "thiserror 2.0.17", -] - [[package]] name = "kona-genesis" version = "0.4.5" @@ -5286,8 +5248,8 @@ dependencies = [ "alloy-consensus", "alloy-eips", "alloy-genesis", - "alloy-hardforks 0.4.7", - "alloy-op-hardforks 0.4.7", + "alloy-hardforks", + "alloy-op-hardforks", "alloy-primitives", "alloy-sol-types", "derive_more", @@ -5310,7 +5272,7 @@ dependencies = [ "alloc-no-stdlib", "alloy-consensus", "alloy-eips", - "alloy-hardforks 0.4.7", + "alloy-hardforks", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", @@ -5319,7 +5281,7 @@ dependencies = [ "async-trait", "brotli", "derive_more", - "kona-genesis 0.4.5 (git+https://github.com/op-rs/kona?rev=24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d)", + "kona-genesis", "miniz_oxide", "op-alloy-consensus", "op-alloy-rpc-types", @@ -5335,17 +5297,19 @@ dependencies = [ [[package]] name = "kona-registry" version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bfcd0cdb9e3ef882d403dd33f11e9d6a203ce8e00d333b14792454bd7e01de" +source = "git+https://github.com/op-rs/kona?rev=24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d#24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" dependencies = [ "alloy-chains", - "alloy-op-hardforks 0.2.13", + "alloy-eips", + "alloy-genesis", + "alloy-hardforks", + "alloy-op-hardforks", "alloy-primitives", - "kona-genesis 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "kona-genesis", "lazy_static", "serde", "serde_json", - "toml", + "toml 0.9.11+spec-1.1.0", ] [[package]] @@ -6382,18 +6346,6 @@ dependencies = [ "vergen-git2", ] -[[package]] -name = "op-revm" -version = "8.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce1dc7533f4e5716c55cd3d62488c6200cb4dfda96e0c75a7e484652464343b" -dependencies = [ - "auto_impl", - "once_cell", - "revm 27.1.0", - "serde", -] - [[package]] name = "op-revm" version = "12.0.2" @@ -6820,38 +6772,17 @@ dependencies = [ "rustc_version 0.4.1", ] -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros 0.11.3", - "phf_shared 0.11.3", - "serde", -] - [[package]] name = "phf" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ - "phf_macros 0.13.1", - "phf_shared 0.13.1", + "phf_macros", + "phf_shared", "serde", ] -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared 0.11.3", - "rand 0.8.5", -] - [[package]] name = "phf_generator" version = "0.13.1" @@ -6859,20 +6790,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" dependencies = [ "fastrand", - "phf_shared 0.13.1", -] - -[[package]] -name = "phf_macros" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" -dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", - "proc-macro2", - "quote", - "syn 2.0.114", + "phf_shared", ] [[package]] @@ -6881,22 +6799,13 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" dependencies = [ - "phf_generator 0.13.1", - "phf_shared 0.13.1", + "phf_generator", + "phf_shared", "proc-macro2", "quote", "syn 2.0.114", ] -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - [[package]] name = "phf_shared" version = "0.13.1" @@ -7735,8 +7644,8 @@ dependencies = [ "reth-primitives-traits", "reth-storage-api", "reth-trie", - "revm-database 9.0.6", - "revm-state 8.1.1", + "revm-database", + "revm-state", "serde", "tokio", "tokio-stream", @@ -7847,7 +7756,7 @@ dependencies = [ "tar", "tokio", "tokio-stream", - "toml", + "toml 0.8.23", "tracing", "zstd", ] @@ -7921,7 +7830,7 @@ dependencies = [ "reth-prune-types", "reth-stages-types", "serde", - "toml", + "toml 0.8.23", "url", ] @@ -8390,7 +8299,7 @@ dependencies = [ "reth-trie-sparse", "reth-trie-sparse-parallel", "revm 31.0.2", - "revm-primitives 21.0.2", + "revm-primitives", "schnellru", "smallvec", "thiserror 2.0.17", @@ -8526,7 +8435,7 @@ dependencies = [ "alloy-chains", "alloy-consensus", "alloy-eips", - "alloy-hardforks 0.4.7", + "alloy-hardforks", "alloy-primitives", "alloy-rlp", "bytes", @@ -8579,7 +8488,7 @@ version = "1.9.3" source = "git+https://github.com/paradigmxyz/reth?tag=v1.9.3#27a8c0f5a6dfb27dea84c5751776ecabdd069646" dependencies = [ "alloy-eip2124", - "alloy-hardforks 0.4.7", + "alloy-hardforks", "alloy-primitives", "arbitrary", "auto_impl", @@ -8804,8 +8713,8 @@ dependencies = [ "reth-tracing", "reth-trie", "revm 31.0.2", - "revm-bytecode 7.1.1", - "revm-database 9.0.6", + "revm-bytecode", + "revm-database", "serde", "serde_json", ] @@ -9176,7 +9085,7 @@ dependencies = [ "shellexpand", "strum 0.27.2", "thiserror 2.0.17", - "toml", + "toml 0.8.23", "tracing", "url", "vergen", @@ -9312,7 +9221,7 @@ dependencies = [ "alloy-consensus", "alloy-eips", "alloy-genesis", - "alloy-hardforks 0.4.7", + "alloy-hardforks", "alloy-primitives", "derive_more", "miniz_oxide", @@ -9478,7 +9387,7 @@ name = "reth-optimism-forks" version = "1.9.3" source = "git+https://github.com/paradigmxyz/reth?tag=v1.9.3#27a8c0f5a6dfb27dea84c5751776ecabdd069646" dependencies = [ - "alloy-op-hardforks 0.4.7", + "alloy-op-hardforks", "alloy-primitives", "once_cell", "reth-ethereum-forks", @@ -9812,9 +9721,9 @@ dependencies = [ "proptest-arbitrary-interop", "rayon", "reth-codecs", - "revm-bytecode 7.1.1", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-bytecode", + "revm-primitives", + "revm-state", "secp256k1 0.30.0", "serde", "serde_with", @@ -9858,8 +9767,8 @@ dependencies = [ "reth-storage-errors", "reth-trie", "reth-trie-db", - "revm-database 9.0.6", - "revm-state 8.1.1", + "revm-database", + "revm-state", "strum 0.27.2", "tokio", "tracing", @@ -9987,7 +9896,7 @@ dependencies = [ "reth-trie-common", "revm 31.0.2", "revm-inspectors", - "revm-primitives 21.0.2", + "revm-primitives", "serde", "serde_json", "sha2", @@ -10385,7 +10294,7 @@ dependencies = [ "reth-stages-types", "reth-storage-errors", "reth-trie-common", - "revm-database 9.0.6", + "revm-database", ] [[package]] @@ -10400,7 +10309,7 @@ dependencies = [ "reth-primitives-traits", "reth-prune-types", "reth-static-file-types", - "revm-database-interface 8.0.5", + "revm-database-interface", "thiserror 2.0.17", ] @@ -10511,7 +10420,7 @@ dependencies = [ "reth-storage-api", "reth-tasks", "revm-interpreter 29.0.1", - "revm-primitives 21.0.2", + "revm-primitives", "rustc-hash 2.1.1", "schnellru", "serde", @@ -10543,7 +10452,7 @@ dependencies = [ "reth-storage-errors", "reth-trie-common", "reth-trie-sparse", - "revm-database 9.0.6", + "revm-database", "tracing", "triehash", ] @@ -10570,7 +10479,7 @@ dependencies = [ "rayon", "reth-codecs", "reth-primitives-traits", - "revm-database 9.0.6", + "revm-database", "serde", "serde_with", ] @@ -10658,42 +10567,23 @@ dependencies = [ "zstd", ] -[[package]] -name = "revm" -version = "27.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6bf82101a1ad8a2b637363a37aef27f88b4efc8a6e24c72bf5f64923dc5532" -dependencies = [ - "revm-bytecode 6.2.2", - "revm-context 8.0.4", - "revm-context-interface 9.0.0", - "revm-database 7.0.5", - "revm-database-interface 7.0.5", - "revm-handler 8.1.0", - "revm-inspector 8.1.0", - "revm-interpreter 24.0.0", - "revm-precompile 25.0.0", - "revm-primitives 20.2.1", - "revm-state 7.0.5", -] - [[package]] name = "revm" version = "31.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb67a5223602113cae59a305acde2d9936bc18f2478dda879a6124b267cebfb6" dependencies = [ - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context 11.0.2", "revm-context-interface 12.0.1", - "revm-database 9.0.6", - "revm-database-interface 8.0.5", + "revm-database", + "revm-database-interface", "revm-handler 12.0.2", "revm-inspector 12.0.2", "revm-interpreter 29.0.1", "revm-precompile 29.0.1", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-primitives", + "revm-state", ] [[package]] @@ -10702,29 +10592,17 @@ version = "33.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c85ed0028f043f87b3c88d4a4cb6f0a76440085523b6a8afe5ff003cf418054" dependencies = [ - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context 12.1.0", "revm-context-interface 13.1.0", - "revm-database 9.0.6", - "revm-database-interface 8.0.5", + "revm-database", + "revm-database-interface", "revm-handler 14.1.0", "revm-inspector 14.1.0", "revm-interpreter 31.1.0", "revm-precompile 31.0.0", - "revm-primitives 21.0.2", - "revm-state 8.1.1", -] - -[[package]] -name = "revm-bytecode" -version = "6.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c52031b73cae95d84cd1b07725808b5fd1500da3e5e24574a3b2dc13d9f16d" -dependencies = [ - "bitvec", - "phf 0.11.3", - "revm-primitives 20.2.1", - "serde", + "revm-primitives", + "revm-state", ] [[package]] @@ -10734,24 +10612,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2c6b5e6e8dd1e28a4a60e5f46615d4ef0809111c9e63208e55b5c7058200fb0" dependencies = [ "bitvec", - "phf 0.13.1", - "revm-primitives 21.0.2", - "serde", -] - -[[package]] -name = "revm-context" -version = "8.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd508416a35a4d8a9feaf5ccd06ac6d6661cd31ee2dc0252f9f7316455d71f9" -dependencies = [ - "cfg-if", - "derive-where", - "revm-bytecode 6.2.2", - "revm-context-interface 9.0.0", - "revm-database-interface 7.0.5", - "revm-primitives 20.2.1", - "revm-state 7.0.5", + "phf", + "revm-primitives", "serde", ] @@ -10764,11 +10626,11 @@ dependencies = [ "bitvec", "cfg-if", "derive-where", - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context-interface 12.0.1", - "revm-database-interface 8.0.5", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-database-interface", + "revm-primitives", + "revm-state", "serde", ] @@ -10781,27 +10643,11 @@ dependencies = [ "bitvec", "cfg-if", "derive-where", - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context-interface 13.1.0", - "revm-database-interface 8.0.5", - "revm-primitives 21.0.2", - "revm-state 8.1.1", - "serde", -] - -[[package]] -name = "revm-context-interface" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc90302642d21c8f93e0876e201f3c5f7913c4fcb66fb465b0fd7b707dfe1c79" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "auto_impl", - "either", - "revm-database-interface 7.0.5", - "revm-primitives 20.2.1", - "revm-state 7.0.5", + "revm-database-interface", + "revm-primitives", + "revm-state", "serde", ] @@ -10815,9 +10661,9 @@ dependencies = [ "alloy-eip7702", "auto_impl", "either", - "revm-database-interface 8.0.5", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-database-interface", + "revm-primitives", + "revm-state", "serde", ] @@ -10831,23 +10677,9 @@ dependencies = [ "alloy-eip7702", "auto_impl", "either", - "revm-database-interface 8.0.5", - "revm-primitives 21.0.2", - "revm-state 8.1.1", - "serde", -] - -[[package]] -name = "revm-database" -version = "7.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a276ed142b4718dcf64bc9624f474373ed82ef20611025045c3fb23edbef9c" -dependencies = [ - "alloy-eips", - "revm-bytecode 6.2.2", - "revm-database-interface 7.0.5", - "revm-primitives 20.2.1", - "revm-state 7.0.5", + "revm-database-interface", + "revm-primitives", + "revm-state", "serde", ] @@ -10858,23 +10690,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "980d8d6bba78c5dd35b83abbb6585b0b902eb25ea4448ed7bfba6283b0337191" dependencies = [ "alloy-eips", - "revm-bytecode 7.1.1", - "revm-database-interface 8.0.5", - "revm-primitives 21.0.2", - "revm-state 8.1.1", - "serde", -] - -[[package]] -name = "revm-database-interface" -version = "7.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c523c77e74eeedbac5d6f7c092e3851dbe9c7fec6f418b85992bd79229db361" -dependencies = [ - "auto_impl", - "either", - "revm-primitives 20.2.1", - "revm-state 7.0.5", + "revm-bytecode", + "revm-database-interface", + "revm-primitives", + "revm-state", "serde", ] @@ -10886,27 +10705,8 @@ checksum = "8cce03e3780287b07abe58faf4a7f5d8be7e81321f93ccf3343c8f7755602bae" dependencies = [ "auto_impl", "either", - "revm-primitives 21.0.2", - "revm-state 8.1.1", - "serde", -] - -[[package]] -name = "revm-handler" -version = "8.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1529c8050e663be64010e80ec92bf480315d21b1f2dbf65540028653a621b27d" -dependencies = [ - "auto_impl", - "derive-where", - "revm-bytecode 6.2.2", - "revm-context 8.0.4", - "revm-context-interface 9.0.0", - "revm-database-interface 7.0.5", - "revm-interpreter 24.0.0", - "revm-precompile 25.0.0", - "revm-primitives 20.2.1", - "revm-state 7.0.5", + "revm-primitives", + "revm-state", "serde", ] @@ -10918,14 +10718,14 @@ checksum = "b45418ed95cfdf0cb19effdbb7633cf2144cab7fb0e6ffd6b0eb9117a50adff6" dependencies = [ "auto_impl", "derive-where", - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context 11.0.2", "revm-context-interface 12.0.1", - "revm-database-interface 8.0.5", + "revm-database-interface", "revm-interpreter 29.0.1", "revm-precompile 29.0.1", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-primitives", + "revm-state", "serde", ] @@ -10937,31 +10737,14 @@ checksum = "d44f8f6dbeec3fecf9fe55f78ef0a758bdd92ea46cd4f1ca6e2a946b32c367f3" dependencies = [ "auto_impl", "derive-where", - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context 12.1.0", "revm-context-interface 13.1.0", - "revm-database-interface 8.0.5", + "revm-database-interface", "revm-interpreter 31.1.0", "revm-precompile 31.0.0", - "revm-primitives 21.0.2", - "revm-state 8.1.1", - "serde", -] - -[[package]] -name = "revm-inspector" -version = "8.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78db140e332489094ef314eaeb0bd1849d6d01172c113ab0eb6ea8ab9372926" -dependencies = [ - "auto_impl", - "either", - "revm-context 8.0.4", - "revm-database-interface 7.0.5", - "revm-handler 8.1.0", - "revm-interpreter 24.0.0", - "revm-primitives 20.2.1", - "revm-state 7.0.5", + "revm-primitives", + "revm-state", "serde", ] @@ -10974,11 +10757,11 @@ dependencies = [ "auto_impl", "either", "revm-context 11.0.2", - "revm-database-interface 8.0.5", + "revm-database-interface", "revm-handler 12.0.2", "revm-interpreter 29.0.1", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-primitives", + "revm-state", "serde", "serde_json", ] @@ -10992,11 +10775,11 @@ dependencies = [ "auto_impl", "either", "revm-context 12.1.0", - "revm-database-interface 8.0.5", + "revm-database-interface", "revm-handler 14.1.0", "revm-interpreter 31.1.0", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-primitives", + "revm-state", "serde", "serde_json", ] @@ -11019,28 +10802,16 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "revm-interpreter" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff9d7d9d71e8a33740b277b602165b6e3d25fff091ba3d7b5a8d373bf55f28a7" -dependencies = [ - "revm-bytecode 6.2.2", - "revm-context-interface 9.0.0", - "revm-primitives 20.2.1", - "serde", -] - [[package]] name = "revm-interpreter" version = "29.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22789ce92c5808c70185e3bc49732f987dc6fd907f77828c8d3470b2299c9c65" dependencies = [ - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context-interface 12.0.1", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-primitives", + "revm-state", "serde", ] @@ -11050,35 +10821,13 @@ version = "31.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26ec36405f7477b9dccdc6caa3be19adf5662a7a0dffa6270cdb13a090c077e5" dependencies = [ - "revm-bytecode 7.1.1", + "revm-bytecode", "revm-context-interface 13.1.0", - "revm-primitives 21.0.2", - "revm-state 8.1.1", + "revm-primitives", + "revm-state", "serde", ] -[[package]] -name = "revm-precompile" -version = "25.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cee3f336b83621294b4cfe84d817e3eef6f3d0fce00951973364cc7f860424d" -dependencies = [ - "ark-bls12-381", - "ark-bn254", - "ark-ec", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "arrayref", - "aurora-engine-modexp", - "cfg-if", - "k256", - "once_cell", - "p256", - "revm-primitives 20.2.1", - "ripemd", - "sha2", -] - [[package]] name = "revm-precompile" version = "29.0.1" @@ -11097,7 +10846,7 @@ dependencies = [ "cfg-if", "k256", "p256", - "revm-primitives 21.0.2", + "revm-primitives", "ripemd", "rug", "secp256k1 0.31.1", @@ -11121,25 +10870,13 @@ dependencies = [ "cfg-if", "k256", "p256", - "revm-primitives 21.0.2", + "revm-primitives", "ripemd", "rug", "secp256k1 0.31.1", "sha2", ] -[[package]] -name = "revm-primitives" -version = "20.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa29d9da06fe03b249b6419b33968ecdf92ad6428e2f012dc57bcd619b5d94e" -dependencies = [ - "alloy-primitives", - "num_enum", - "once_cell", - "serde", -] - [[package]] name = "revm-primitives" version = "21.0.2" @@ -11152,18 +10889,6 @@ dependencies = [ "serde", ] -[[package]] -name = "revm-state" -version = "7.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f64fbacb86008394aaebd3454f9643b7d5a782bd251135e17c5b33da592d84d" -dependencies = [ - "bitflags 2.10.0", - "revm-bytecode 6.2.2", - "revm-primitives 20.2.1", - "serde", -] - [[package]] name = "revm-state" version = "8.1.1" @@ -11171,8 +10896,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8be953b7e374dbdea0773cf360debed8df394ea8d82a8b240a6b5da37592fc" dependencies = [ "bitflags 2.10.0", - "revm-bytecode 7.1.1", - "revm-primitives 21.0.2", + "revm-bytecode", + "revm-primitives", "serde", ] @@ -11848,6 +11573,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +dependencies = [ + "serde_core", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -12726,11 +12460,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_edit 0.22.27", ] +[[package]] +name = "toml" +version = "0.9.11+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" +dependencies = [ + "serde_core", + "serde_spanned 1.0.4", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "winnow", +] + [[package]] name = "toml_datetime" version = "0.6.11" @@ -12757,7 +12504,7 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap 2.13.0", "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", "winnow", diff --git a/Cargo.toml b/Cargo.toml index f49bda0e..3757e728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -204,7 +204,8 @@ alloy-op-hardforks = "0.4.4" op-revm = { version = "12.0.2", default-features = false } # kona -kona-registry = "0.4.5" +kona-genesis = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" } +kona-registry = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" } kona-engine = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" } # tokio diff --git a/crates/client/cli/Cargo.toml b/crates/client/cli/Cargo.toml index b9da0c87..81f4bd78 100644 --- a/crates/client/cli/Cargo.toml +++ b/crates/client/cli/Cargo.toml @@ -17,5 +17,19 @@ url.workspace = true clap.workspace = true eyre.workspace = true +# Alloy +alloy-chains.workspace = true + +# Kona +kona-genesis.workspace = true +kona-registry.workspace = true + +# Tracing +tracing.workspace = true + +# Error Handling +thiserror.workspace = true +serde_json.workspace = true + # Base base-jwt = { workspace = true, features = ["engine-validation"] } diff --git a/crates/client/cli/src/config.rs b/crates/client/cli/src/config.rs new file mode 100644 index 00000000..733f8dd7 --- /dev/null +++ b/crates/client/cli/src/config.rs @@ -0,0 +1,145 @@ +//! Configuration file path wrappers for L1 and L2 configs. +//! +//! These types wrap `Option` and provide methods to load +//! the configuration from a file or fall back to the registry. + +use std::{fs::File, path::PathBuf}; + +use alloy_chains::Chain; +use kona_genesis::{L1ChainConfig, RollupConfig}; +use kona_registry::{L1Config, scr_rollup_config_by_alloy_ident}; +use serde_json::from_reader; +use tracing::debug; + +/// Error type for configuration loading. +#[derive(Debug, thiserror::Error)] +pub enum ConfigError { + /// Failed to open configuration file. + #[error("Failed to open config file: {0}")] + OpenFile(std::io::Error), + /// Failed to parse configuration file. + #[error("Failed to parse config: {0}")] + Parse(serde_json::Error), + /// Failed to find configuration in registry. + #[error("Failed to find config for chain ID {0}")] + NotFound(u64), +} + +/// L1 configuration file path wrapper. +/// +/// Wraps an optional path to a custom L1 chain configuration file. +/// If no path is provided, the configuration is loaded from the known chains registry. +#[derive(Clone, Debug, Default, clap::Args)] +pub struct L1ConfigFile { + /// Path to a custom L1 chain configuration file. + /// (overrides the default configuration from the registry) + #[arg(long, visible_alias = "rollup-l1-cfg", env = "KONA_NODE_L1_CHAIN_CONFIG")] + pub l1_config_file: Option, +} + +impl L1ConfigFile { + /// Creates a new [`L1ConfigFile`] with the given path. + pub const fn new(path: Option) -> Self { + Self { l1_config_file: path } + } + + /// Returns the path to the configuration file, if set. + pub const fn path(&self) -> Option<&PathBuf> { + self.l1_config_file.as_ref() + } + + /// Loads the L1 chain configuration. + /// + /// If a file path is set, loads the configuration from the JSON file. + /// Otherwise, falls back to the known chains registry using the provided chain ID. + pub fn load(&self, l1_chain_id: u64) -> Result { + match &self.l1_config_file { + Some(path) => { + debug!("Loading l1 config from file: {:?}", path); + let file = File::open(path).map_err(ConfigError::OpenFile)?; + from_reader(file).map_err(ConfigError::Parse) + } + None => { + debug!("Loading l1 config from known chains"); + let cfg = L1Config::get_l1_genesis(l1_chain_id) + .map_err(|_| ConfigError::NotFound(l1_chain_id))?; + Ok(cfg.into()) + } + } + } +} + +/// L2 rollup configuration file path wrapper. +/// +/// Wraps an optional path to a custom L2 rollup configuration file. +/// If no path is provided, the configuration is loaded from the superchain registry. +#[derive(Clone, Debug, Default, clap::Args)] +pub struct L2ConfigFile { + /// Path to a custom L2 rollup configuration file. + /// (overrides the default rollup configuration from the registry) + #[arg(long, visible_alias = "rollup-cfg", env = "KONA_NODE_ROLLUP_CONFIG")] + pub l2_config_file: Option, +} + +impl L2ConfigFile { + /// Creates a new [`L2ConfigFile`] with the given path. + pub const fn new(path: Option) -> Self { + Self { l2_config_file: path } + } + + /// Returns the path to the configuration file, if set. + pub const fn path(&self) -> Option<&PathBuf> { + self.l2_config_file.as_ref() + } + + /// Loads the L2 rollup configuration. + /// + /// If a file path is set, loads the configuration from the JSON file. + /// Otherwise, falls back to the superchain registry using the provided chain. + pub fn load(&self, l2_chain: &Chain) -> Result { + match &self.l2_config_file { + Some(path) => { + debug!("Loading l2 config from file: {:?}", path); + let file = File::open(path).map_err(ConfigError::OpenFile)?; + from_reader(file).map_err(ConfigError::Parse) + } + None => { + debug!("Loading l2 config from superchain registry"); + let cfg = scr_rollup_config_by_alloy_ident(l2_chain) + .ok_or_else(|| ConfigError::NotFound(l2_chain.id()))?; + Ok(cfg.clone()) + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_l1_config_file_default() { + let config = L1ConfigFile::default(); + assert!(config.path().is_none()); + } + + #[test] + fn test_l2_config_file_default() { + let config = L2ConfigFile::default(); + assert!(config.path().is_none()); + } + + #[test] + fn test_l1_config_file_with_path() { + let path = PathBuf::from("/tmp/l1_config.json"); + let config = L1ConfigFile::new(Some(path.clone())); + assert_eq!(config.path(), Some(&path)); + } + + #[test] + fn test_l2_config_file_with_path() { + let path = PathBuf::from("/tmp/l2_config.json"); + let config = L2ConfigFile::new(Some(path.clone())); + assert_eq!(config.path(), Some(&path)); + } +} diff --git a/crates/client/cli/src/lib.rs b/crates/client/cli/src/lib.rs index ad91a070..63512bfd 100644 --- a/crates/client/cli/src/lib.rs +++ b/crates/client/cli/src/lib.rs @@ -3,6 +3,9 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] +mod config; +pub use config::{ConfigError, L1ConfigFile, L2ConfigFile}; + mod l1; pub use l1::L1ClientArgs; diff --git a/deny.toml b/deny.toml index 0352839e..1b256076 100644 --- a/deny.toml +++ b/deny.toml @@ -46,6 +46,11 @@ allow = [ ] confidence-threshold = 0.8 +# Allow workspace crates that don't have explicit license fields +exceptions = [ + { name = "macros", allow = ["MIT"] }, +] + [bans] deny = ["reth"] multiple-versions = "deny" @@ -141,6 +146,8 @@ skip = [ "procfs-core", "security-framework", "send_wrapper", + "serde_spanned", + "toml", "toml_datetime", "toml_edit", "unicode-width",