chore(deps): upgrade secp256k1+enr (#1715)

This commit is contained in:
Matthias Seitz
2023-03-15 11:15:55 +01:00
committed by GitHub
parent 91f26f455f
commit 15d79cedad
15 changed files with 361 additions and 180 deletions

458
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -59,4 +59,4 @@ comfy-table = "6.1.4"
crossterm = "0.25.0" crossterm = "0.25.0"
tui = "0.19.0" tui = "0.19.0"
jsonrpsee = { version = "0.16", features = ["server"] } jsonrpsee = { version = "0.16", features = ["server"] }
human_bytes = "0.4.1" human_bytes = "0.4.1"

View File

@ -26,7 +26,7 @@ futures = "0.3"
tokio-stream = "0.1.11" tokio-stream = "0.1.11"
rand = "0.8.5" rand = "0.8.5"
arbitrary = { version = "1.1.7", features = ["derive"], optional = true } arbitrary = { version = "1.1.7", features = ["derive"], optional = true }
secp256k1 = { version = "0.24.2", default-features = false, features = [ secp256k1 = { version = "0.26.0", default-features = false, features = [
"alloc", "alloc",
"recovery", "recovery",
"rand", "rand",
@ -39,7 +39,7 @@ tokio = { version = "1.21.2", features = ["full"] }
tokio-stream = { version = "0.1.11", features = ["sync"] } tokio-stream = { version = "0.1.11", features = ["sync"] }
arbitrary = { version = "1.1.7", features = ["derive"] } arbitrary = { version = "1.1.7", features = ["derive"] }
hex-literal = "0.3" hex-literal = "0.3"
secp256k1 = { version = "0.24.2", default-features = false, features = [ secp256k1 = { version = "0.26.0", default-features = false, features = [
"alloc", "alloc",
"recovery", "recovery",
"rand", "rand",

View File

@ -19,12 +19,13 @@ reth-net-nat = { path = "../nat" }
# ethereum # ethereum
discv5 = { git = "https://github.com/sigp/discv5" } discv5 = { git = "https://github.com/sigp/discv5" }
secp256k1 = { version = "0.24", features = [ secp256k1 = { version = "0.26.0", features = [
"global-context", "global-context",
"rand-std", "rand-std",
"recovery", "recovery",
"serde"
] } ] }
enr = { version = "0.7.0", default-features = false, features = [ enr = { version = "0.8.0", default-features = false, features = [
"rust-secp256k1", "rust-secp256k1",
] } ] }

View File

@ -14,12 +14,13 @@ reth-net-common = { path = "../common" }
reth-rlp = { path = "../../rlp" } reth-rlp = { path = "../../rlp" }
# ethereum # ethereum
secp256k1 = { version = "0.24", features = [ secp256k1 = { version = "0.26.0", features = [
"global-context", "global-context",
"rand-std", "rand-std",
"recovery", "recovery",
"serde"
] } ] }
enr = { version = "0.7.0", default-features = false, features = ["rust-secp256k1"] } enr = { version = "0.8.0", default-features = false, features = ["rust-secp256k1"] }
# async/futures # async/futures
tokio = { version = "1", features = ["io-util", "net", "time"] } tokio = { version = "1", features = ["io-util", "net", "time"] }

View File

@ -1,4 +1,4 @@
#![warn(missing_docs, unreachable_pub)] #![warn(missing_docs, unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)] #![deny(unused_must_use, rust_2018_idioms)]
#![doc(test( #![doc(test(
no_crate_inject, no_crate_inject,

View File

@ -27,7 +27,11 @@ use data_encoding::{BASE32_NOPAD, BASE64URL_NOPAD};
use enr::{Enr, EnrError, EnrKey, EnrKeyUnambiguous, EnrPublicKey}; use enr::{Enr, EnrError, EnrKey, EnrKeyUnambiguous, EnrPublicKey};
use reth_primitives::{bytes::Bytes, hex}; use reth_primitives::{bytes::Bytes, hex};
use secp256k1::SecretKey; use secp256k1::SecretKey;
use std::{fmt, str::FromStr}; use std::{
fmt,
hash::{Hash, Hasher},
str::FromStr,
};
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde_with::{DeserializeFromStr, SerializeDisplay}; use serde_with::{DeserializeFromStr, SerializeDisplay};
@ -222,7 +226,7 @@ impl fmt::Display for BranchEntry {
} }
/// A link entry /// A link entry
#[derive(Debug, Clone, Hash, Eq, PartialEq)] #[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(SerializeDisplay, DeserializeFromStr))] #[cfg_attr(feature = "serde", derive(SerializeDisplay, DeserializeFromStr))]
pub struct LinkEntry<K: EnrKeyUnambiguous = SecretKey> { pub struct LinkEntry<K: EnrKeyUnambiguous = SecretKey> {
pub domain: String, pub domain: String,
@ -248,6 +252,33 @@ impl<K: EnrKeyUnambiguous> LinkEntry<K> {
} }
} }
impl<K> PartialEq for LinkEntry<K>
where
K: EnrKeyUnambiguous,
K::PublicKey: PartialEq,
{
fn eq(&self, other: &Self) -> bool {
self.domain == other.domain && self.pubkey == other.pubkey
}
}
impl<K> Eq for LinkEntry<K>
where
K: EnrKeyUnambiguous,
K::PublicKey: Eq + PartialEq,
{
}
impl<K> Hash for LinkEntry<K>
where
K: EnrKeyUnambiguous,
K::PublicKey: Hash,
{
fn hash<H: Hasher>(&self, state: &mut H) {
self.domain.hash(state);
self.pubkey.hash(state);
}
}
impl<K: EnrKeyUnambiguous> FromStr for LinkEntry<K> { impl<K: EnrKeyUnambiguous> FromStr for LinkEntry<K> {
type Err = ParseDnsEntryError; type Err = ParseDnsEntryError;

View File

@ -30,7 +30,7 @@ byteorder = "1.4.3"
rand = "0.8.5" rand = "0.8.5"
ctr = "0.9.2" ctr = "0.9.2"
digest = "0.10.5" digest = "0.10.5"
secp256k1 = { version = "0.24.2", features = ["global-context", "rand-std", "recovery"] } secp256k1 = { version = "0.26.0", features = ["global-context", "rand-std", "recovery"] }
sha2 = "0.10.6" sha2 = "0.10.6"
sha3 = "0.10.5" sha3 = "0.10.5"
aes = "0.8.1" aes = "0.8.1"

View File

@ -47,7 +47,7 @@ tokio-util = { version = "0.7.4", features = ["io", "codec"] }
hex-literal = "0.3" hex-literal = "0.3"
hex = "0.4" hex = "0.4"
rand = "0.8" rand = "0.8"
secp256k1 = { version = "0.24.2", features = ["global-context", "rand-std", "recovery"] } secp256k1 = { version = "0.26.0", features = ["global-context", "rand-std", "recovery"] }
arbitrary = { version = "1.1.7", features = ["derive"] } arbitrary = { version = "1.1.7", features = ["derive"] }
proptest = { version = "1.0" } proptest = { version = "1.0" }

View File

@ -59,13 +59,13 @@ async-trait = "0.1"
linked_hash_set = "0.1" linked_hash_set = "0.1"
linked-hash-map = "0.5.6" linked-hash-map = "0.5.6"
rand = "0.8" rand = "0.8"
secp256k1 = { version = "0.24", features = [ secp256k1 = { version = "0.26.0", features = [
"global-context", "global-context",
"rand-std", "rand-std",
"recovery", "recovery",
] } ] }
enr = { version = "0.7.0", features = ["rust-secp256k1"], optional = true } enr = { version = "0.8.0", features = ["rust-secp256k1"], optional = true }
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true } ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true }
tempfile = { version = "3.3", optional = true } tempfile = { version = "3.3", optional = true }
@ -87,7 +87,7 @@ ethers-providers = { git = "https://github.com/gakonst/ethers-rs", default-featu
ethers-signers = { git = "https://github.com/gakonst/ethers-rs", default-features = false } ethers-signers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", default-features = false } ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
enr = { version = "0.7.0", features = ["serde", "rust-secp256k1"] } enr = { version = "0.8.0", features = ["serde", "rust-secp256k1"] }
# misc # misc
hex = "0.4" hex = "0.4"

View File

@ -26,7 +26,7 @@ fixed-hash = { version = "0.8", default-features = false, features = [
] } ] }
# crypto # crypto
secp256k1 = { version = "0.24.2", default-features = false, features = [ secp256k1 = { version = "0.26.0", default-features = false, features = [
"global-context", "global-context",
"alloc", "alloc",
"recovery", "recovery",
@ -74,7 +74,7 @@ proptest-derive = "0.3"
# necessary so we don't hit a "undeclared 'std'": # necessary so we don't hit a "undeclared 'std'":
# https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198 # https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198
secp256k1 = "0.24.2" secp256k1 = "0.26.0"
criterion = "0.4.0" criterion = "0.4.0"
pprof = { version = "0.11", features = [ pprof = { version = "0.11", features = [
"flamegraph", "flamegraph",
@ -94,4 +94,4 @@ test-utils = []
[[bench]] [[bench]]
name = "recover_ecdsa_crit" name = "recover_ecdsa_crit"
harness = false harness = false

View File

@ -10,4 +10,4 @@ description = "core reth specific revm utilities"
# reth # reth
reth-primitives = { path = "../../primitives" } reth-primitives = { path = "../../primitives" }
revm = { version = "3.0.0" } revm = { version = "3.0.0" }

View File

@ -12,7 +12,7 @@ auto_impl = "1"
bytes = { version = "1", default-features = false } bytes = { version = "1", default-features = false }
ethnum = { version = "1", default-features = false, optional = true } ethnum = { version = "1", default-features = false, optional = true }
smol_str = { version = "0.1", default-features = false, optional = true } smol_str = { version = "0.1", default-features = false, optional = true }
enr = { version = "0.7", default-features = false, optional = true } enr = { version = "0.8.0", default-features = false, optional = true }
rlp = { version = "0.5.2", default-features = false, optional = true } rlp = { version = "0.5.2", default-features = false, optional = true }
ethereum-types = { version = "0.14", features = ["codec"], optional = true } ethereum-types = { version = "0.14", features = ["codec"], optional = true }
revm-primitives = {version = "1.0.0", features = ["serde"] } revm-primitives = {version = "1.0.0", features = ["serde"] }
@ -30,7 +30,7 @@ reth-rlp = { path = ".", package = "reth-rlp", features = [
criterion = "0.4.0" criterion = "0.4.0"
hex-literal = "0.3" hex-literal = "0.3"
rand = "0.8" rand = "0.8"
secp256k1 = { version = "0.24", features = [ secp256k1 = { version = "0.26.0", features = [
"rand-std", "rand-std",
] } ] }
pprof = { version = "0.11", features = ["flamegraph", "frame-pointer", "criterion"] } pprof = { version = "0.11", features = ["flamegraph", "frame-pointer", "criterion"] }

View File

@ -44,7 +44,7 @@ rand = { version = "0.8", optional = true }
thiserror = "1" thiserror = "1"
# enr # enr
enr = { version = "0.7.0", features = ["serde", "rust-secp256k1"], optional = true } enr = { version = "0.8.0", features = ["serde", "rust-secp256k1"], optional = true }
# ethers # ethers
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true } ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false, optional = true }
@ -74,7 +74,7 @@ tokio = { version = "1", features = ["io-util", "net", "macros", "rt-multi-threa
tokio-stream = "0.1" tokio-stream = "0.1"
# crypto # crypto
secp256k1 = { version = "0.24", features = [ secp256k1 = { version = "0.26.0", features = [
"global-context", "global-context",
"rand-std", "rand-std",
"recovery", "recovery",

View File

@ -22,7 +22,7 @@ parity-scale-codec = { version = "3.2.1", features = ["bytes"] }
futures = "0.3.25" futures = "0.3.25"
tokio-stream = "0.1.11" tokio-stream = "0.1.11"
rand = "0.8.5" rand = "0.8.5"
secp256k1 = { version = "0.24.2", default-features = false, features = [ secp256k1 = { version = "0.26.0", default-features = false, features = [
"alloc", "alloc",
"recovery", "recovery",
"rand", "rand",
@ -59,7 +59,7 @@ tokio = { version = "1.21.2", features = ["full"] }
reth-db = { path = ".", features = ["test-utils", "bench"] } reth-db = { path = ".", features = ["test-utils", "bench"] }
# needed for test-fuzz to work properly, see https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198 # needed for test-fuzz to work properly, see https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198
secp256k1 = "0.24.2" secp256k1 = "0.26.0"
async-trait = "0.1.58" async-trait = "0.1.58"