Skip to content

Commit

Permalink
chore: no-std consensus common
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jan 6, 2025
1 parent 28fde3f commit bafde80
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ reth-codecs = { path = "crates/storage/codecs" }
reth-codecs-derive = { path = "crates/storage/codecs/derive" }
reth-config = { path = "crates/config" }
reth-consensus = { path = "crates/consensus/consensus", default-features = false }
reth-consensus-common = { path = "crates/consensus/common" }
reth-consensus-common = { path = "crates/consensus/common", default-features = false }
reth-consensus-debug-client = { path = "crates/consensus/debug-client" }
reth-db = { path = "crates/storage/db", default-features = false }
reth-db-api = { path = "crates/storage/db-api" }
Expand Down
11 changes: 11 additions & 0 deletions crates/consensus/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ alloy-eips.workspace = true
alloy-consensus.workspace = true
rand.workspace = true

[features]
default = ["std"]
std = [
"alloy-consensus/std",
"alloy-eips/std",
"alloy-primitives/std",
"reth-chainspec/std",
"reth-consensus/std",
"reth-primitives/std",
"reth-primitives-traits/std"
]
1 change: 1 addition & 0 deletions crates/consensus/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]

/// Collection of consensus validation methods.
pub mod validation;
Expand Down
3 changes: 2 additions & 1 deletion crates/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ std = [
"revm-primitives/std",
"revm/std",
"reth-ethereum-forks/std",
"reth-chainspec/std"
"reth-chainspec/std",
"reth-consensus-common/std"
]
test-utils = [
"dep:parking_lot",
Expand Down
3 changes: 2 additions & 1 deletion crates/optimism/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ std = [
"reth-optimism-forks/std",
"thiserror/std",
"op-alloy-consensus/std",
"reth-chainspec/std"
"reth-chainspec/std",
"reth-consensus-common/std"
]
optimism = [
"reth-primitives/optimism",
Expand Down

0 comments on commit bafde80

Please sign in to comment.