chore: rename codecs optimism feature to op (#13067)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Dan Cline
2024-12-02 14:28:20 -05:00
committed by GitHub
parent 6cea9955b6
commit 8d10b93295
8 changed files with 14 additions and 14 deletions

View File

@ -83,7 +83,7 @@ assert_matches.workspace = true
[features] [features]
optimism = [ optimism = [
"reth-blockchain-tree/optimism", "reth-blockchain-tree/optimism",
"reth-codecs/optimism", "reth-codecs/op",
"reth-chainspec", "reth-chainspec",
"reth-db-api/optimism", "reth-db-api/optimism",
"reth-db/optimism", "reth-db/optimism",

View File

@ -15,7 +15,7 @@ workspace = true
# reth # reth
reth-primitives.workspace = true reth-primitives.workspace = true
reth-primitives-traits = { workspace = true, features = ["op"] } reth-primitives-traits = { workspace = true, features = ["op"] }
reth-codecs = { workspace = true, optional = true, features = ["optimism"] } reth-codecs = { workspace = true, optional = true, features = ["op"] }
# ethereum # ethereum
alloy-primitives.workspace = true alloy-primitives.workspace = true
@ -36,7 +36,7 @@ derive_more.workspace = true
arbitrary = { workspace = true, features = ["derive"], optional = true } arbitrary = { workspace = true, features = ["derive"], optional = true }
[dev-dependencies] [dev-dependencies]
reth-codecs = { workspace = true, features = ["test-utils", "optimism"] } reth-codecs = { workspace = true, features = ["test-utils", "op"] }
rstest.workspace = true rstest.workspace = true
arbitrary.workspace = true arbitrary.workspace = true
@ -57,7 +57,7 @@ reth-codec = [
"dep:reth-codecs", "dep:reth-codecs",
"reth-primitives/reth-codec", "reth-primitives/reth-codec",
"reth-primitives-traits/reth-codec", "reth-primitives-traits/reth-codec",
"reth-codecs?/optimism", "reth-codecs?/op",
"reth-primitives/reth-codec" "reth-primitives/reth-codec"
] ]
serde = [ serde = [

View File

@ -22,6 +22,6 @@ reth-stages-types.workspace = true
[features] [features]
optimism = [ optimism = [
"reth-primitives/optimism", "reth-primitives/optimism",
"reth-codecs/optimism", "reth-codecs/op",
"reth-db-api/optimism" "reth-db-api/optimism"
] ]

View File

@ -146,7 +146,7 @@ c-kzg = [
] ]
optimism = [ optimism = [
"dep:op-alloy-consensus", "dep:op-alloy-consensus",
"reth-codecs?/optimism", "reth-codecs?/op",
"revm-primitives/optimism", "revm-primitives/optimism",
] ]
alloy-compat = [ alloy-compat = [

View File

@ -67,7 +67,7 @@ alloy = [
"dep:modular-bitfield", "dep:modular-bitfield",
"dep:alloy-trie", "dep:alloy-trie",
] ]
optimism = ["alloy", "dep:op-alloy-consensus"] op = ["alloy", "dep:op-alloy-consensus"]
test-utils = [ test-utils = [
"std", "std",
"alloy", "alloy",

View File

@ -9,9 +9,9 @@ cond_mod!(
); );
#[cfg(all(feature = "test-utils", feature = "optimism"))] #[cfg(all(feature = "test-utils", feature = "op"))]
pub mod optimism; pub mod optimism;
#[cfg(all(not(feature = "test-utils"), feature = "optimism"))] #[cfg(all(not(feature = "test-utils"), feature = "op"))]
mod optimism; mod optimism;
#[cfg(test)] #[cfg(test)]
@ -41,7 +41,7 @@ mod tests {
assert_eq!(TxEip7702::bitflag_encoded_bytes(), 4); assert_eq!(TxEip7702::bitflag_encoded_bytes(), 4);
} }
#[cfg(feature = "optimism")] #[cfg(feature = "op")]
#[test] #[test]
fn test_ensure_backwards_compatibility_optimism() { fn test_ensure_backwards_compatibility_optimism() {
assert_eq!(crate::alloy::transaction::optimism::TxDeposit::bitflag_encoded_bytes(), 2); assert_eq!(crate::alloy::transaction::optimism::TxDeposit::bitflag_encoded_bytes(), 2);
@ -89,11 +89,11 @@ mod tests {
)); ));
} }
#[cfg(feature = "optimism")] #[cfg(feature = "op")]
#[test] #[test]
fn test_decode_deposit() { fn test_decode_deposit() {
test_decode::<op_alloy_consensus::TxDeposit>(&hex!( test_decode::<op_alloy_consensus::TxDeposit>(&hex!(
"8108ac8f15983d59b6ae4911a00ff7bfcd2e53d2950926f8c82c12afad02861c46fcb293e776204052725e1c08ff2e9ff602ca916357601fa972a14094891fe3598b718758f22c46f163c18bcaa6296ce87e5267ef3fd932112842fbbf79011548cdf067d93ce6098dfc0aaf5a94531e439f30d6dfd0c6" "8108ac8f15983d59b6ae4911a00ff7bfcd2e53d2950926f8c82c12afad02861c46fcb293e776204052725e1c08ff2e9ff602ca916357601fa972a14094891fe3598b718758f22c46f163c18bcaa6296ce87e5267ef3fd932112842fbbf79011548cdf067d93ce6098dfc0aaf5a94531e439f30d6dfd0c6"
)); ));
} }
} }

View File

@ -82,4 +82,4 @@ arbitrary = [
"reth-stages-types/arbitrary", "reth-stages-types/arbitrary",
"alloy-consensus/arbitrary", "alloy-consensus/arbitrary",
] ]
optimism = ["reth-primitives/optimism", "reth-codecs/optimism"] optimism = ["reth-primitives/optimism", "reth-codecs/op"]

View File

@ -92,7 +92,7 @@ optimism = [
"reth-primitives/optimism", "reth-primitives/optimism",
"reth-execution-types/optimism", "reth-execution-types/optimism",
"reth-optimism-primitives", "reth-optimism-primitives",
"reth-codecs/optimism", "reth-codecs/op",
"reth-db/optimism", "reth-db/optimism",
"reth-db-api/optimism", "reth-db-api/optimism",
"revm/optimism", "revm/optimism",