chore: replace maili deps with op-alloy (#13927)

This commit is contained in:
Matthias Seitz
2025-01-22 17:58:06 +01:00
committed by GitHub
parent 56f2c43582
commit 073aee175f
6 changed files with 46 additions and 133 deletions

158
Cargo.lock generated
View File

@ -1970,7 +1970,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [ dependencies = [
"lazy_static", "lazy_static",
"windows-sys 0.48.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -2818,7 +2818,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -4685,7 +4685,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-targets 0.48.5", "windows-targets 0.52.6",
] ]
[[package]] [[package]]
@ -4859,95 +4859,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "maili-common"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "717a6707a37a427e38da9cb904c1691f3ecb6538342cd9a64f8f35b8c916a367"
dependencies = [
"alloy-consensus",
"alloy-primitives",
"derive_more",
"serde",
]
[[package]]
name = "maili-consensus"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59cc5082a9b883b719fb3594257e56e9c6990cf49d7b41188adb51ab6c83cd1e"
dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
"serde",
]
[[package]]
name = "maili-flz"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11418b80159f49d9a2f13909ca9e0921629647ee68bcf97adcac0dd14d4d32e6"
[[package]]
name = "maili-genesis"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a5680e0bb4c77bb98e8e9534dffd511ddd0d6ab7632514b54f2a09220d9337e"
dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-sol-types",
"serde",
"serde_repr",
"thiserror 2.0.11",
]
[[package]]
name = "maili-protocol"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "262e3f2fc12df09d50db07e01b39d57fe25414bd42ede500d053c25fb7f0afcb"
dependencies = [
"alloc-no-stdlib",
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
"alloy-sol-types",
"async-trait",
"brotli",
"derive_more",
"maili-consensus",
"maili-flz",
"maili-genesis",
"miniz_oxide",
"rand 0.8.5",
"serde",
"thiserror 2.0.11",
"tracing",
"unsigned-varint",
]
[[package]]
name = "maili-rpc"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c23e579fce3c019aa9291f0184d5c10b59718da7b4b5cd23dd6a8c53aaef78f"
dependencies = [
"alloy-eips",
"alloy-primitives",
"derive_more",
"getrandom 0.2.15",
"jsonrpsee",
"maili-protocol",
"serde",
]
[[package]] [[package]]
name = "match_cfg" name = "match_cfg"
version = "0.1.0" version = "0.1.0"
@ -5448,9 +5359,9 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9"
[[package]] [[package]]
name = "op-alloy-consensus" name = "op-alloy-consensus"
version = "0.9.3" version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3c085fd93da29d79649876280e8d926ae6aa7ff5a5df7a1bd17659862822194" checksum = "e28dc4e397dd8969f7f98ea6454a5c531349a58c76e12448b0c2de6581df7b8c"
dependencies = [ dependencies = [
"alloy-consensus", "alloy-consensus",
"alloy-eips", "alloy-eips",
@ -5459,17 +5370,22 @@ dependencies = [
"alloy-serde", "alloy-serde",
"arbitrary", "arbitrary",
"derive_more", "derive_more",
"maili-common",
"serde", "serde",
"serde_with", "serde_with",
"thiserror 2.0.11", "thiserror 2.0.11",
] ]
[[package]] [[package]]
name = "op-alloy-network" name = "op-alloy-flz"
version = "0.9.3" version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0cccb2bcc8ff92e9e85b70ad2b5cc7f65ae57a2fb839c0b59fdab6f29ea1d6c" checksum = "76b44f5edbd5293636934a88ec38d683ee2075bfce43658d1033d76191e7aff6"
[[package]]
name = "op-alloy-network"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "818a4ea62c0968fbf4e3bee2aa1349ad7ae6504b8aba73889a40160bebaa6818"
dependencies = [ dependencies = [
"alloy-consensus", "alloy-consensus",
"alloy-network", "alloy-network",
@ -5481,10 +5397,20 @@ dependencies = [
] ]
[[package]] [[package]]
name = "op-alloy-rpc-types" name = "op-alloy-rpc-jsonrpsee"
version = "0.9.3" version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16b700b5d4efbe6433abb13e52f18a5f9ffe8d8fe9aeef99912bc90ffe0d7ebc" checksum = "6446c38f9e3e86acac6f2972a4953ffdd8bfef032bec633b0280a95783c0babd"
dependencies = [
"alloy-primitives",
"jsonrpsee",
]
[[package]]
name = "op-alloy-rpc-types"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b9c83c664b953d474d6b58825800b6ff1d61876a686407e646cbf76891c1f9b"
dependencies = [ dependencies = [
"alloy-consensus", "alloy-consensus",
"alloy-eips", "alloy-eips",
@ -5500,15 +5426,14 @@ dependencies = [
[[package]] [[package]]
name = "op-alloy-rpc-types-engine" name = "op-alloy-rpc-types-engine"
version = "0.9.3" version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f75d698f2e0778749a79bb661e4da37c39ccefde9a0a024b180b9fe097215396" checksum = "e8d05b5b5b3cff7f24eec2bc366f86a7ff0934678b1bda36d0ecaadba9504170"
dependencies = [ dependencies = [
"alloy-eips", "alloy-eips",
"alloy-primitives", "alloy-primitives",
"alloy-rpc-types-engine", "alloy-rpc-types-engine",
"alloy-serde", "alloy-serde",
"maili-protocol",
"op-alloy-consensus", "op-alloy-consensus",
"serde", "serde",
"thiserror 2.0.11", "thiserror 2.0.11",
@ -6145,7 +6070,7 @@ dependencies = [
"once_cell", "once_cell",
"socket2", "socket2",
"tracing", "tracing",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -8353,8 +8278,8 @@ dependencies = [
"derive_more", "derive_more",
"eyre", "eyre",
"futures", "futures",
"maili-flz",
"op-alloy-consensus", "op-alloy-consensus",
"op-alloy-flz",
"op-alloy-rpc-types-engine", "op-alloy-rpc-types-engine",
"parking_lot", "parking_lot",
"reth-basic-payload-builder", "reth-basic-payload-builder",
@ -8470,9 +8395,9 @@ dependencies = [
"alloy-rpc-types-eth", "alloy-rpc-types-eth",
"jsonrpsee-core", "jsonrpsee-core",
"jsonrpsee-types", "jsonrpsee-types",
"maili-rpc",
"op-alloy-consensus", "op-alloy-consensus",
"op-alloy-network", "op-alloy-network",
"op-alloy-rpc-jsonrpsee",
"op-alloy-rpc-types", "op-alloy-rpc-types",
"op-alloy-rpc-types-engine", "op-alloy-rpc-types-engine",
"parking_lot", "parking_lot",
@ -9843,7 +9768,7 @@ dependencies = [
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -10183,17 +10108,6 @@ dependencies = [
"thiserror 1.0.69", "thiserror 1.0.69",
] ]
[[package]]
name = "serde_repr"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.96",
]
[[package]] [[package]]
name = "serde_spanned" name = "serde_spanned"
version = "0.6.8" version = "0.6.8"
@ -10712,7 +10626,7 @@ dependencies = [
"getrandom 0.2.15", "getrandom 0.2.15",
"once_cell", "once_cell",
"rustix", "rustix",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
@ -11275,7 +11189,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f" checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f"
dependencies = [ dependencies = [
"cc", "cc",
"windows-targets 0.48.5", "windows-targets 0.52.6",
] ]
[[package]] [[package]]
@ -11708,7 +11622,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]

View File

@ -470,13 +470,12 @@ alloy-transport-ipc = { version = "0.9.2", default-features = false }
alloy-transport-ws = { version = "0.9.2", default-features = false } alloy-transport-ws = { version = "0.9.2", default-features = false }
# op # op
op-alloy-rpc-types = { version = "0.9.0", default-features = false } op-alloy-rpc-types = { version = "0.9.6", default-features = false }
op-alloy-rpc-types-engine = { version = "0.9.0", default-features = false } op-alloy-rpc-types-engine = { version = "0.9.6", default-features = false }
op-alloy-network = { version = "0.9.0", default-features = false } op-alloy-network = { version = "0.9.6", default-features = false }
op-alloy-consensus = { version = "0.9.0", default-features = false } op-alloy-consensus = { version = "0.9.6", default-features = false }
## op-maili op-alloy-flz = { version = "0.9.6", default-features = false }
maili-rpc = { version = "0.1.6", default-features = false } op-alloy-rpc-jsonrpsee = { version = "0.9.6", default-features = false }
maili-flz = { version = "0.1.6", default-features = false }
# misc # misc
aquamarine = "0.6" aquamarine = "0.6"

View File

@ -52,7 +52,7 @@ alloy-eips.workspace = true
alloy-primitives.workspace = true alloy-primitives.workspace = true
op-alloy-consensus.workspace = true op-alloy-consensus.workspace = true
op-alloy-rpc-types-engine.workspace = true op-alloy-rpc-types-engine.workspace = true
maili-flz.workspace = true op-alloy-flz.workspace = true
alloy-rpc-types-engine.workspace = true alloy-rpc-types-engine.workspace = true
alloy-consensus.workspace = true alloy-consensus.workspace = true

View File

@ -72,7 +72,7 @@ impl OpPooledTransaction {
/// max(minTransactionSize, intercept + fastlzCoef*fastlzSize) /// max(minTransactionSize, intercept + fastlzCoef*fastlzSize)
// TODO(mattsse): replace with library fn from revm or maili once available // TODO(mattsse): replace with library fn from revm or maili once available
fn tx_estimated_size_fjord(input: &[u8]) -> u64 { fn tx_estimated_size_fjord(input: &[u8]) -> u64 {
let fastlz_size = maili_flz::flz_compress_len(input) as u64; let fastlz_size = op_alloy_flz::flz_compress_len(input) as u64;
fastlz_size.saturating_mul(836_500).saturating_sub(42_585_600).max(100_000_000) fastlz_size.saturating_mul(836_500).saturating_sub(42_585_600).max(100_000_000)
} }

View File

@ -46,7 +46,7 @@ alloy-consensus.workspace = true
op-alloy-network.workspace = true op-alloy-network.workspace = true
op-alloy-rpc-types.workspace = true op-alloy-rpc-types.workspace = true
op-alloy-rpc-types-engine.workspace = true op-alloy-rpc-types-engine.workspace = true
maili-rpc = { workspace = true, features = ["jsonrpsee"] } op-alloy-rpc-jsonrpsee.workspace = true
op-alloy-consensus.workspace = true op-alloy-consensus.workspace = true
revm.workspace = true revm.workspace = true

View File

@ -2,7 +2,7 @@
use alloy_primitives::U64; use alloy_primitives::U64;
use jsonrpsee_core::{async_trait, RpcResult}; use jsonrpsee_core::{async_trait, RpcResult};
pub use maili_rpc::MinerApiExtServer; pub use op_alloy_rpc_jsonrpsee::traits::MinerApiExtServer;
use reth_optimism_payload_builder::config::OpDAConfig; use reth_optimism_payload_builder::config::OpDAConfig;
use tracing::debug; use tracing::debug;