Skip to content

Commit

Permalink
feat(discv5): add crate for interfacing reth network and sigp/discv5 (#…
Browse files Browse the repository at this point in the history
…7336)

Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
  • Loading branch information
3 people authored Apr 2, 2024
1 parent 3726cd1 commit ebc4bc8
Show file tree
Hide file tree
Showing 16 changed files with 2,012 additions and 20 deletions.
407 changes: 394 additions & 13 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ members = [
"crates/metrics/metrics-derive/",
"crates/net/common/",
"crates/net/discv4/",
"crates/net/discv5/",
"crates/net/dns/",
"crates/net/downloaders/",
"crates/net/ecies/",
Expand Down Expand Up @@ -199,6 +200,7 @@ reth-config = { path = "crates/config" }
reth-consensus-common = { path = "crates/consensus/common" }
reth-db = { path = "crates/storage/db" }
reth-discv4 = { path = "crates/net/discv4" }
reth-discv5 = { path = "crates/net/discv5" }
reth-dns-discovery = { path = "crates/net/dns" }
reth-node-builder = { path = "crates/node-builder" }
reth-node-ethereum = { path = "crates/node-ethereum" }
Expand Down Expand Up @@ -320,7 +322,7 @@ tower = "0.4"
tower-http = "0.4"

# p2p
discv5 = "0.4"
discv5 = { git = "https://github.com/sigp/discv5", rev = "04ac004" }
igd-next = "0.14.3"

# rpc
Expand Down
45 changes: 45 additions & 0 deletions crates/net/discv5/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "reth-discv5"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Ethereum peer discovery V5"

[lints]
workspace = true

[dependencies]
# reth
reth-primitives.workspace = true
reth-metrics.workspace = true

# ethereum
alloy-rlp.workspace = true
rlp = "0.5.2"
discv5 = { workspace = true, features = ["libp2p"] }
enr = { workspace = true, default-features = false, features = ["rust-secp256k1"] }
multiaddr = { version = "0.18", default-features = false }
libp2p-identity = "0.2"
secp256k1.workspace = true

# async/futures
tokio.workspace = true
futures.workspace = true

# io
rand.workspace = true

# misc
derive_more.workspace = true
tracing.workspace = true
thiserror.workspace = true
itertools.workspace = true
metrics.workspace = true

[dev-dependencies]
reth-tracing.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
secp256k1 = { workspace = true, features = ["rand-std"] }
3 changes: 3 additions & 0 deletions crates/net/discv5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Discv5

Thin wrapper around sigp/discv5.
Loading

0 comments on commit ebc4bc8

Please sign in to comment.