Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make reth-network-peers risc compatible #13210

Merged
merged 1 commit into from
Dec 7, 2024
Merged
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
1 change: 1 addition & 0 deletions .github/assets/check_rv32imac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ crates_to_check=(
reth-ethereum-primitives
reth-primitives-traits
reth-optimism-forks
reth-network-peers
# reth-evm
# reth-primitives
# reth-optimism-chainspec
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ revm-primitives = { version = "14.0.0", default-features = false }
alloy-chains = { version = "0.1.32", default-features = false }
alloy-dyn-abi = "0.8.11"
alloy-primitives = { version = "0.8.11", default-features = false }
alloy-rlp = { version = "0.3.4", default-features = false }
alloy-rlp = { version = "0.3.10", default-features = false }
alloy-sol-types = "0.8.11"
alloy-trie = { version = "0.7", default-features = false }

Expand Down
9 changes: 5 additions & 4 deletions crates/net/peers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ workspace = true

# eth
alloy-primitives = { workspace = true, features = ["rlp"] }
alloy-rlp = { workspace = true, features = ["derive"] }
enr.workspace = true
alloy-rlp = { workspace = true, features = ["derive", "core-net", "core-error"] }
enr = { workspace = true, optional = true }

# crypto

Expand All @@ -32,6 +32,7 @@ alloy-primitives = { workspace = true, features = ["rand"] }
rand.workspace = true
secp256k1 = { workspace = true, features = ["rand"] }
serde_json.workspace = true
enr.workspace = true
tokio = { workspace = true, features = ["net", "macros", "rt"] }

[features]
Expand All @@ -42,7 +43,7 @@ std = [
"secp256k1?/std",
"serde_with/std",
"thiserror/std",
"url/std"
"url/std",
]
secp256k1 = ["dep:secp256k1", "enr/secp256k1"]
net = ["dep:tokio", "tokio?/net"]
net = ["std", "dep:tokio", "tokio?/net"]
3 changes: 2 additions & 1 deletion crates/net/peers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ use alloy_primitives::B512;
use core::str::FromStr;

// Re-export PeerId for ease of use.
#[cfg(feature = "secp256k1")]
pub use enr::Enr;

/// Alias for a peer identifier
Expand Down Expand Up @@ -115,8 +116,8 @@ pub fn id2pk(id: PeerId) -> Result<secp256k1::PublicKey, secp256k1::Error> {
pub enum AnyNode {
/// An "enode:" peer with full ip
NodeRecord(NodeRecord),
#[cfg(feature = "secp256k1")]
/// An "enr:" peer
#[cfg(feature = "secp256k1")]
Enr(Enr<secp256k1::SecretKey>),
/// An incomplete "enode" with only a peer id
PeerId(PeerId),
Expand Down
Loading