Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions crates/optimism/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ workspace = true
# Reth
reth-chainspec.workspace = true
reth-evm = { workspace = true, features = ["op"] }
reth-primitives-traits.workspace = true
reth-primitives-traits = { workspace = true, features = ["op"] }
reth-execution-errors.workspace = true
reth-execution-types.workspace = true
reth-storage-errors.workspace = true

reth-rpc-eth-api = { workspace = true, optional = true }

# ethereum
Expand All @@ -34,7 +33,7 @@ alloy-consensus.workspace = true
reth-optimism-chainspec.workspace = true
reth-optimism-consensus.workspace = true
reth-optimism-forks.workspace = true
reth-optimism-primitives.workspace = true
reth-optimism-primitives = { workspace = true, features = ["op"] }

# revm
revm.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/optimism/evm/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pub use alloy_op_evm::{
spec as revm_spec, spec_by_timestamp_after_bedrock as revm_spec_by_timestamp_after_bedrock,
};

use alloy_consensus::BlockHeader;
use revm::primitives::{Address, Bytes, B256};

/// Context relevant for execution of a next block w.r.t OP.
Expand All @@ -23,7 +22,7 @@ pub struct OpNextBlockEnvAttributes {
}

#[cfg(feature = "rpc")]
impl<H: BlockHeader> reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv<H>
impl<H: alloy_consensus::BlockHeader> reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv<H>
for OpNextBlockEnvAttributes
{
fn build_pending_env(parent: &crate::SealedHeader<H>) -> Self {
Expand Down
6 changes: 2 additions & 4 deletions crates/optimism/exex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ reth-node-api.workspace = true
reth-provider.workspace = true
reth-chainspec.workspace = true

# for ethereum types, `serde-bincode-compat` is added by `reth-storage-api`, however this does not work with `op` until
# `reth-storage-api` is updated to support `op`, so we add it here.
reth-optimism-primitives = { workspace = true, features = ["reth-codec", "serde-bincode-compat", "serde"] }

# ethereum
alloy-primitives.workspace = true

# op-reth
# serde-bincode-compat is enabled for reth-exex-types in reth-exex
reth-optimism-primitives = { workspace = true, features = ["reth-codec", "serde-bincode-compat"] }
reth-optimism-trie.workspace = true

# misc
Expand Down
4 changes: 2 additions & 2 deletions crates/optimism/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true
# reth
reth-chainspec.workspace = true
## ensure secp256k1 recovery with rayon support is activated
reth-primitives-traits = { workspace = true, features = ["secp256k1", "rayon"] }
reth-primitives-traits = { workspace = true, features = ["op", "secp256k1", "rayon", "reth-codec", "serde-bincode-compat"] }
reth-payload-builder.workspace = true
reth-consensus.workspace = true
reth-node-api.workspace = true
Expand All @@ -41,7 +41,7 @@ reth-optimism-txpool.workspace = true
reth-optimism-chainspec.workspace = true
reth-optimism-consensus = { workspace = true, features = ["std"] }
reth-optimism-forks.workspace = true
reth-optimism-primitives = { workspace = true, features = ["serde", "serde-bincode-compat", "reth-codec"] }
reth-optimism-primitives = { workspace = true, features = ["op", "reth-codec", "serde-bincode-compat"] }

# revm with required optimism features
# Note: this must be kept to ensure all features are properly enabled/forwarded
Expand Down
10 changes: 8 additions & 2 deletions crates/optimism/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ workspace = true

[dependencies]
# reth
reth-primitives-traits = { workspace = true, features = ["op"] }
reth-codecs = { workspace = true, optional = true, features = ["op"] }
reth-primitives-traits.workspace = true
reth-codecs = { workspace = true, optional = true }
reth-zstd-compressors = { workspace = true, optional = true }

# ethereum
Expand All @@ -37,6 +37,7 @@ arbitrary = { workspace = true, features = ["derive"], optional = true }

[dev-dependencies]
reth-codecs = { workspace = true, features = ["test-utils", "op"] }
reth-primitives-traits = { workspace = true, features = ["op"] }

rand.workspace = true
arbitrary.workspace = true
Expand Down Expand Up @@ -70,6 +71,7 @@ alloy-compat = ["op-alloy-consensus/alloy-compat"]
reth-codec = [
"dep:reth-codecs",
"std",
"op",
"reth-primitives-traits/reth-codec",
"reth-codecs?/op",
"dep:bytes",
Expand Down Expand Up @@ -107,3 +109,7 @@ arbitrary = [
"alloy-primitives/arbitrary",
"alloy-eips/arbitrary",
]
op = [
"reth-primitives-traits/op",
"reth-codecs?/op",
]
1 change: 1 addition & 0 deletions crates/optimism/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub type OpBlockBody = <OpBlock as reth_primitives_traits::Block>::Body;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct OpPrimitives;

#[cfg(feature = "op")]
impl reth_primitives_traits::NodePrimitives for OpPrimitives {
type Block = OpBlock;
type BlockHeader = alloy_consensus::Header;
Expand Down
2 changes: 1 addition & 1 deletion crates/optimism/primitives/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ mod compact {
}
}

#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))]
#[cfg(feature = "serde-bincode-compat")]
pub(super) mod serde_bincode_compat {
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_with::{DeserializeAs, SerializeAs};
Expand Down
20 changes: 10 additions & 10 deletions crates/optimism/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ workspace = true

[dependencies]
# reth
reth-evm.workspace = true
reth-primitives-traits = { workspace = true, features = ["op"] }
reth-storage-api.workspace = true
reth-evm = { workspace = true, features = ["op"] }
reth-primitives-traits = { workspace = true, features = ["op", "serde-bincode-compat"] }
reth-storage-api = { workspace = true, features = ["serde-bincode-compat"] }
reth-rpc-eth-api = { workspace = true, features = ["op"] }
reth-rpc-eth-types.workspace = true
reth-rpc-server-types.workspace = true
Expand All @@ -24,37 +24,37 @@ reth-transaction-pool.workspace = true
reth-rpc.workspace = true
reth-rpc-api.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-node-builder = { workspace = true, features = ["op"] }
reth-chainspec.workspace = true
reth-chain-state.workspace = true
reth-rpc-engine-api.workspace = true
reth-rpc-convert.workspace = true
reth-rpc-convert = { workspace = true, features = ["op"] }

# op-reth
reth-optimism-evm.workspace = true
reth-optimism-flashblocks.workspace = true
reth-optimism-payload-builder.workspace = true
reth-optimism-txpool.workspace = true
# TODO remove node-builder import
reth-optimism-primitives = { workspace = true, features = ["reth-codec", "serde-bincode-compat", "serde"] }
reth-optimism-primitives = { workspace = true, features = ["op", "serde-bincode-compat"] }
reth-optimism-forks.workspace = true

# ethereum
alloy-eips.workspace = true
alloy-eips = { workspace = true, features = ["serde-bincode-compat"] }
alloy-json-rpc.workspace = true
alloy-primitives.workspace = true
alloy-rpc-client.workspace = true
alloy-rpc-types-eth.workspace = true
alloy-rpc-types-eth = { workspace = true, features = ["serde-bincode-compat"] }
alloy-rpc-types-debug.workspace = true
alloy-transport.workspace = true
alloy-transport-http.workspace = true
alloy-consensus.workspace = true
alloy-consensus = { workspace = true, features = ["serde-bincode-compat"] }
alloy-rpc-types-engine.workspace = true
op-alloy-network.workspace = true
op-alloy-rpc-types.workspace = true
op-alloy-rpc-types-engine.workspace = true
op-alloy-rpc-jsonrpsee.workspace = true
op-alloy-consensus.workspace = true
op-alloy-consensus = { workspace = true, features = ["serde-bincode-compat"] }
revm.workspace = true
op-revm.workspace = true

Expand Down
1 change: 1 addition & 0 deletions crates/rpc/rpc-convert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ op = [
"dep:op-revm",
"reth-evm/op",
"reth-primitives-traits/op",
"reth-optimism-primitives?/op",
]
1 change: 1 addition & 0 deletions crates/storage/db-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ op = [
"dep:reth-optimism-primitives",
"reth-codecs/op",
"reth-primitives-traits/op",
"reth-optimism-primitives?/op",
]
bench = []
Loading