mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 21:27:12 +00:00
Merge branch 'unstable' of https://github.com/sigp/lighthouse into single_attestation
This commit is contained in:
@@ -5,49 +5,49 @@ authors = ["Sigma Prime <contact@sigmaprime.io>"]
|
||||
edition = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
alloy-primitives = { workspace = true}
|
||||
alloy-primitives = { workspace = true }
|
||||
alloy-rlp = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
delay_map = { workspace = true }
|
||||
directory = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
discv5 = { workspace = true }
|
||||
gossipsub = { workspace = true }
|
||||
unsigned-varint = { version = "0.8", features = ["codec"] }
|
||||
ssz_types = { workspace = true }
|
||||
types = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
either = { workspace = true }
|
||||
ethereum_ssz = { workspace = true }
|
||||
ethereum_ssz_derive = { workspace = true }
|
||||
slog = { workspace = true }
|
||||
lighthouse_version = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
smallvec = { workspace = true }
|
||||
tokio-io-timeout = "1"
|
||||
futures = { workspace = true }
|
||||
gossipsub = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
libp2p-mplex = "0.42"
|
||||
lighthouse_version = { workspace = true }
|
||||
lru = { workspace = true }
|
||||
lru_cache = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
parking_lot = { workspace = true }
|
||||
sha2 = { workspace = true }
|
||||
snap = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
tokio-util = { workspace = true }
|
||||
tiny-keccak = "2"
|
||||
task_executor = { workspace = true }
|
||||
prometheus-client = "0.22.0"
|
||||
rand = { workspace = true }
|
||||
directory = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
sha2 = { workspace = true }
|
||||
slog = { workspace = true }
|
||||
smallvec = { workspace = true }
|
||||
snap = { workspace = true }
|
||||
ssz_types = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
superstruct = { workspace = true }
|
||||
prometheus-client = "0.22.0"
|
||||
task_executor = { workspace = true }
|
||||
tiny-keccak = "2"
|
||||
tokio = { workspace = true }
|
||||
tokio-io-timeout = "1"
|
||||
tokio-util = { workspace = true }
|
||||
types = { workspace = true }
|
||||
unsigned-varint = { version = "0.8", features = ["codec"] }
|
||||
unused_port = { workspace = true }
|
||||
delay_map = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
either = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
alloy-rlp = { workspace = true }
|
||||
|
||||
# Local dependencies
|
||||
void = "1.0.2"
|
||||
libp2p-mplex = "0.42"
|
||||
|
||||
[dependencies.libp2p]
|
||||
version = "0.54"
|
||||
@@ -55,13 +55,13 @@ default-features = false
|
||||
features = ["identify", "yamux", "noise", "dns", "tcp", "tokio", "plaintext", "secp256k1", "macros", "ecdsa", "metrics", "quic", "upnp"]
|
||||
|
||||
[dev-dependencies]
|
||||
slog-term = { workspace = true }
|
||||
slog-async = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
quickcheck = { workspace = true }
|
||||
quickcheck_macros = { workspace = true }
|
||||
async-channel = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
quickcheck = { workspace = true }
|
||||
quickcheck_macros = { workspace = true }
|
||||
slog-async = { workspace = true }
|
||||
slog-term = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
|
||||
[features]
|
||||
libp2p-websocket = []
|
||||
|
||||
@@ -24,9 +24,10 @@ fnv = "1.0.7"
|
||||
futures = "0.3.30"
|
||||
futures-timer = "3.0.2"
|
||||
getrandom = "0.2.12"
|
||||
hashlink.workspace = true
|
||||
hashlink = { workspace = true }
|
||||
hex_fmt = "0.3.0"
|
||||
libp2p = { version = "0.54", default-features = false }
|
||||
prometheus-client = "0.22.0"
|
||||
quick-protobuf = "0.8"
|
||||
quick-protobuf-codec = "0.3"
|
||||
rand = "0.8"
|
||||
@@ -35,7 +36,6 @@ serde = { version = "1", optional = true, features = ["derive"] }
|
||||
sha2 = "0.10.8"
|
||||
tracing = "0.1.37"
|
||||
void = "1.0.2"
|
||||
prometheus-client = "0.22.0"
|
||||
web-time = "1.1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -141,10 +141,6 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
|
||||
debug!(self.log, "Failed to dial peer"; "peer_id"=> ?peer_id, "error" => %ClearDialError(error));
|
||||
self.on_dial_failure(peer_id);
|
||||
}
|
||||
FromSwarm::ExternalAddrConfirmed(_) => {
|
||||
// We have an external address confirmed, means we are able to do NAT traversal.
|
||||
metrics::set_gauge_vec(&metrics::NAT_OPEN, &["libp2p"], 1);
|
||||
}
|
||||
_ => {
|
||||
// NOTE: FromSwarm is a non exhaustive enum so updates should be based on release
|
||||
// notes more than compiler feedback
|
||||
|
||||
@@ -964,6 +964,9 @@ where
|
||||
request_info: (Id, RequestType<E>),
|
||||
error: StreamUpgradeError<RPCError>,
|
||||
) {
|
||||
// This dialing is now considered failed
|
||||
self.dial_negotiated -= 1;
|
||||
|
||||
let (id, req) = request_info;
|
||||
|
||||
// map the error
|
||||
@@ -989,9 +992,6 @@ where
|
||||
StreamUpgradeError::Apply(other) => other,
|
||||
};
|
||||
|
||||
// This dialing is now considered failed
|
||||
self.dial_negotiated -= 1;
|
||||
|
||||
self.outbound_io_error_retries = 0;
|
||||
self.events_out
|
||||
.push(HandlerEvent::Err(HandlerErr::Outbound {
|
||||
|
||||
@@ -67,7 +67,6 @@ pub struct SamplingRequestId(pub usize);
|
||||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct CustodyId {
|
||||
pub requester: CustodyRequester,
|
||||
pub req_id: Id,
|
||||
}
|
||||
|
||||
/// Downstream components that perform custody by root requests.
|
||||
|
||||
@@ -250,18 +250,17 @@ impl futures::stream::Stream for GossipCache {
|
||||
Poll::Ready(Some(expired)) => {
|
||||
let expected_key = expired.key();
|
||||
let (topic, data) = expired.into_inner();
|
||||
match self.topic_msgs.get_mut(&topic) {
|
||||
Some(msgs) => {
|
||||
let key = msgs.remove(&data);
|
||||
debug_assert_eq!(key, Some(expected_key));
|
||||
if msgs.is_empty() {
|
||||
// no more messages for this topic.
|
||||
self.topic_msgs.remove(&topic);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
#[cfg(debug_assertions)]
|
||||
panic!("Topic for registered message is not present.")
|
||||
let topic_msg = self.topic_msgs.get_mut(&topic);
|
||||
debug_assert!(
|
||||
topic_msg.is_some(),
|
||||
"Topic for registered message is not present."
|
||||
);
|
||||
if let Some(msgs) = topic_msg {
|
||||
let key = msgs.remove(&data);
|
||||
debug_assert_eq!(key, Some(expected_key));
|
||||
if msgs.is_empty() {
|
||||
// no more messages for this topic.
|
||||
self.topic_msgs.remove(&topic);
|
||||
}
|
||||
}
|
||||
Poll::Ready(Some(Ok(topic)))
|
||||
|
||||
Reference in New Issue
Block a user