chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
+9 -7
View File
@@ -30,14 +30,14 @@ use crate::{
use cid::{self, Version};
use futures::StreamExt;
use log::{debug, error, trace};
use prost::Message;
use pezsc_client_api::BlockBackend;
use pezsc_network_types::PeerId;
use pezsp_runtime::traits::Block as BlockT;
use prost::Message;
use schema::bitswap::{
message::{wantlist::WantType, Block as MessageBlock, BlockPresence, BlockPresenceType},
Message as BitswapMessage,
};
use pezsp_runtime::traits::Block as BlockT;
use std::{io, sync::Arc, time::Duration};
use unsigned_varint::encode as varint_encode;
@@ -292,16 +292,16 @@ pub enum BitswapError {
#[cfg(test)]
mod tests {
use super::*;
use bizinikiwi_test_runtime::ExtrinsicBuilder;
use bizinikiwi_test_runtime_client::{self, prelude::*, TestClientBuilder};
use futures::channel::oneshot;
use pezsc_block_builder::BlockBuilderBuilder;
use pezsp_consensus::BlockOrigin;
use pezsp_runtime::codec::Encode;
use schema::bitswap::{
message::{wantlist::Entry, Wantlist},
Message as BitswapMessage,
};
use pezsp_consensus::BlockOrigin;
use pezsp_runtime::codec::Encode;
use bizinikiwi_test_runtime::ExtrinsicBuilder;
use bizinikiwi_test_runtime_client::{self, prelude::*, TestClientBuilder};
#[tokio::test]
async fn undecodable_message() {
@@ -503,7 +503,9 @@ mod tests {
0x70,
cid::multihash::Multihash::wrap(
u64::from(cid::multihash::Code::Blake2b256),
&pezsp_crypto_hashing::blake2_256(&ext.encode()[pattern_index..]),
&pezsp_crypto_hashing::blake2_256(
&ext.encode()[pattern_index..],
),
)
.unwrap(),
)
+2 -1
View File
@@ -21,7 +21,8 @@
//! The `DiscoveryBehaviour` struct implements the `NetworkBehaviour` trait of libp2p and is
//! responsible for discovering other nodes that are part of the network.
//!
//! Bizinikiwi uses the following mechanisms in order to discover nodes that are part of the network:
//! Bizinikiwi uses the following mechanisms in order to discover nodes that are part of the
//! network:
//!
//! - Bootstrap nodes. These are hard-coded node identities and addresses passed in the constructor
//! of the `DiscoveryBehaviour`. You can also call `add_known_address` later to add an entry.
+2 -2
View File
@@ -265,8 +265,6 @@ pub mod utils;
pub use crate::litep2p::Litep2pNetworkBackend;
pub use event::{DhtEvent, Event};
#[doc(inline)]
pub use request_responses::{Config, IfDisconnected, RequestFailure};
pub use pezsc_network_common::{
role::{ObservedRole, Roles},
types::ReputationChange,
@@ -275,6 +273,8 @@ pub use pezsc_network_types::{
multiaddr::{self, Multiaddr},
PeerId,
};
#[doc(inline)]
pub use request_responses::{Config, IfDisconnected, RequestFailure};
pub use service::{
metrics::NotificationMetrics,
signature::Signature,
+1 -1
View File
@@ -71,8 +71,8 @@ use litep2p::{
},
Litep2p, Litep2pEvent, ProtocolName as Litep2pProtocolName,
};
use prometheus_endpoint::Registry;
use pezsc_network_types::kad::{Key as RecordKey, PeerRecord, Record as P2PRecord};
use prometheus_endpoint::Registry;
use pezsc_client_api::BlockBackend;
use pezsc_network_common::{role::Roles, ExHashT};
@@ -466,11 +466,17 @@ mod tests {
// Report 2 peers with a negative reputation.
handle.report_peer(
peer_a,
pezsc_network_common::types::ReputationChange { value: i32::MIN, reason: "test".into() },
pezsc_network_common::types::ReputationChange {
value: i32::MIN,
reason: "test".into(),
},
);
handle.report_peer(
peer_b,
pezsc_network_common::types::ReputationChange { value: i32::MIN, reason: "test".into() },
pezsc_network_common::types::ReputationChange {
value: i32::MIN,
reason: "test".into(),
},
);
// Advance time to propagate peers.
+9 -3
View File
@@ -25,8 +25,8 @@ use libp2p::PeerId;
use log::trace;
use parking_lot::Mutex;
use partial_sort::PartialSort;
use prometheus_endpoint::Registry;
use pezsc_network_common::{role::ObservedRole, types::ReputationChange};
use prometheus_endpoint::Registry;
use std::{
cmp::{Ord, Ordering, PartialOrd},
collections::{hash_map::Entry, HashMap, HashSet},
@@ -558,11 +558,17 @@ mod tests {
// Report 2 peers with a negative reputation.
handle.report_peer(
peer_a,
pezsc_network_common::types::ReputationChange { value: i32::MIN, reason: "test".into() },
pezsc_network_common::types::ReputationChange {
value: i32::MIN,
reason: "test".into(),
},
);
handle.report_peer(
peer_b,
pezsc_network_common::types::ReputationChange { value: i32::MIN, reason: "test".into() },
pezsc_network_common::types::ReputationChange {
value: i32::MIN,
reason: "test".into(),
},
);
// Advance time to propagate banned peers.
@@ -45,8 +45,8 @@ use libp2p::{
};
use log::{debug, error, trace, warn};
use parking_lot::RwLock;
use rand::distributions::{Distribution as _, Uniform};
use pezsc_utils::mpsc::TracingUnboundedReceiver;
use rand::distributions::{Distribution as _, Uniform};
use smallvec::SmallVec;
use tokio::sync::oneshot::error::RecvError;
use tokio_stream::StreamMap;
@@ -232,7 +232,11 @@ impl NotificationService for NotificationHandle {
}
/// Send synchronous `notification` to `peer`.
fn send_sync_notification(&mut self, peer: &pezsc_network_types::PeerId, notification: Vec<u8>) {
fn send_sync_notification(
&mut self,
peer: &pezsc_network_types::PeerId,
notification: Vec<u8>,
) {
if let Some(info) = self.peers.get(&((*peer).into())) {
metrics::register_notification_sent(
info.sink.metrics(),
@@ -813,7 +813,11 @@ impl ProtocolController {
.map(From::from)
.collect::<HashSet<pezsc_network_types::PeerId>>()
.union(
&self.nodes.keys().map(From::from).collect::<HashSet<pezsc_network_types::PeerId>>(),
&self
.nodes
.keys()
.map(From::from)
.collect::<HashSet<pezsc_network_types::PeerId>>(),
)
.cloned()
.collect();
+1 -1
View File
@@ -75,8 +75,8 @@ use libp2p::{
use log::{debug, error, info, trace, warn};
use metrics::{Histogram, MetricSources, Metrics};
use parking_lot::Mutex;
use prometheus_endpoint::Registry;
use pezsc_network_types::kad::{Key as KademliaKey, Record};
use prometheus_endpoint::Registry;
use pezsc_client_api::BlockBackend;
use pezsc_network_common::{