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
@@ -22,9 +22,9 @@ use std::{cmp::Ord, fmt::Debug, ops::Add};
use codec::{Decode, Encode};
use finality_grandpa::voter_set::VoterSet;
use pez_fork_tree::{FilterAction, ForkTree};
use log::debug;
use parking_lot::MappedMutexGuard;
use pez_fork_tree::{FilterAction, ForkTree};
use pezsc_consensus::shared_data::{SharedData, SharedDataLocked};
use pezsc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_INFO};
use pezsp_consensus_grandpa::{AuthorityId, AuthorityList};
@@ -504,9 +504,9 @@ pub(crate) fn load_authorities<B: AuxStore, H: Decode, N: Decode + Clone + Ord>(
#[cfg(test)]
mod test {
use super::*;
use bizinikiwi_test_runtime_client::{self, runtime::Block};
use pezsp_consensus_grandpa::AuthorityId;
use pezsp_core::{crypto::UncheckedFrom, H256};
use bizinikiwi_test_runtime_client::{self, runtime::Block};
fn dummy_id() -> AuthorityId {
AuthorityId::unchecked_from([1; 32])
@@ -88,8 +88,6 @@
use ahash::{AHashMap, AHashSet};
use codec::{Decode, DecodeAll, Encode};
use log::{debug, trace};
use prometheus_endpoint::{register, CounterVec, Opts, PrometheusError, Registry, U64};
use rand::seq::SliceRandom;
use pezsc_network::ReputationChange;
use pezsc_network_common::role::ObservedRole;
use pezsc_network_gossip::{MessageIntent, ValidatorContext};
@@ -98,6 +96,8 @@ use pezsc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG};
use pezsc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender};
use pezsp_consensus_grandpa::AuthorityId;
use pezsp_runtime::traits::{Block as BlockT, NumberFor, Zero};
use prometheus_endpoint::{register, CounterVec, Opts, PrometheusError, Registry, U64};
use rand::seq::SliceRandom;
use super::{benefit, cost, Round, SetId, NEIGHBOR_REBROADCAST_PERIOD};
use crate::{environment, CatchUp, CompactCommit, SignedMessage, LOG_TARGET};
@@ -1666,11 +1666,11 @@ pub(super) struct PeerReport {
mod tests {
use super::{super::NEIGHBOR_REBROADCAST_PERIOD, environment::SharedVoterSetState, *};
use crate::communication;
use bizinikiwi_test_runtime_client::runtime::{Block, Header};
use pezsc_network::config::Role;
use pezsc_network_gossip::Validator as GossipValidatorT;
use pezsp_core::{crypto::UncheckedFrom, H256};
use std::time::Instant;
use bizinikiwi_test_runtime_client::runtime::{Block, Header};
// some random config (not really needed)
fn config() -> crate::Config {
@@ -389,7 +389,8 @@ fn good_commit_leads_to_relay() {
for (i, key) in private.iter().enumerate() {
precommits.push(precommit.clone());
let signature = pezsp_consensus_grandpa::AuthoritySignature::from(key.sign(&payload[..]));
let signature =
pezsp_consensus_grandpa::AuthoritySignature::from(key.sign(&payload[..]));
auth_data.push((signature, public[i].0.clone()))
}
@@ -540,7 +541,8 @@ fn bad_commit_leads_to_report() {
for (i, key) in private.iter().enumerate() {
precommits.push(precommit.clone());
let signature = pezsp_consensus_grandpa::AuthoritySignature::from(key.sign(&payload[..]));
let signature =
pezsp_consensus_grandpa::AuthoritySignature::from(key.sign(&payload[..]));
auth_data.push((signature, public[i].0.clone()))
}
@@ -400,7 +400,10 @@ impl Metrics {
) -> Result<Self, PrometheusError> {
Ok(Self {
finality_grandpa_round: register(
Gauge::new("bizinikiwi_finality_grandpa_round", "Highest completed GRANDPA round.")?,
Gauge::new(
"bizinikiwi_finality_grandpa_round",
"Highest completed GRANDPA round.",
)?,
registry,
)?,
finality_grandpa_prevotes: register(
@@ -260,6 +260,11 @@ where
mod tests {
use super::*;
use crate::{authorities::AuthoritySetChanges, BlockNumberOps, ClientError, SetId};
use bizinikiwi_test_runtime_client::{
runtime::{Block, Header, H256},
Backend as TestBackend, ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt,
TestClient, TestClientBuilder, TestClientBuilderExt,
};
use futures::executor::block_on;
use pezsc_block_builder::BlockBuilderBuilder;
use pezsc_client_api::{apply_aux, LockImportRun};
@@ -267,11 +272,6 @@ mod tests {
use pezsp_consensus_grandpa::GRANDPA_ENGINE_ID as ID;
use pezsp_core::crypto::UncheckedFrom;
use pezsp_keyring::Ed25519Keyring;
use bizinikiwi_test_runtime_client::{
runtime::{Block, Header, H256},
Backend as TestBackend, ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt,
TestClient, TestClientBuilder, TestClientBuilderExt,
};
/// Check GRANDPA proof-of-finality for the given block.
///
@@ -32,7 +32,9 @@ use pezsc_utils::mpsc::TracingUnboundedSender;
use pezsp_api::{Core, RuntimeApiInfo};
use pezsp_blockchain::BlockStatus;
use pezsp_consensus::{BlockOrigin, Error as ConsensusError, SelectChain};
use pezsp_consensus_grandpa::{ConsensusLog, GrandpaApi, ScheduledChange, SetId, GRANDPA_ENGINE_ID};
use pezsp_consensus_grandpa::{
ConsensusLog, GrandpaApi, ScheduledChange, SetId, GRANDPA_ENGINE_ID,
};
use pezsp_runtime::{
generic::OpaqueDigestItemId,
traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero},
@@ -60,7 +60,6 @@ use codec::Decode;
use futures::{prelude::*, StreamExt};
use log::{debug, error, info};
use parking_lot::RwLock;
use prometheus_endpoint::{PrometheusError, Registry};
use pezsc_client_api::{
backend::{AuxStore, Backend},
utils::is_descendent_of,
@@ -73,7 +72,9 @@ use pezsc_transaction_pool_api::OffchainTransactionPoolFactory;
use pezsc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver};
use pezsp_api::ProvideRuntimeApi;
use pezsp_application_crypto::AppCrypto;
use pezsp_blockchain::{Error as ClientError, HeaderBackend, HeaderMetadata, Result as ClientResult};
use pezsp_blockchain::{
Error as ClientError, HeaderBackend, HeaderMetadata, Result as ClientResult,
};
use pezsp_consensus::SelectChain;
use pezsp_consensus_grandpa::{
AuthorityList, AuthoritySignature, SetId, CLIENT_LOG_TARGET as LOG_TARGET,
@@ -84,6 +85,7 @@ use pezsp_runtime::{
generic::BlockId,
traits::{Block as BlockT, NumberFor, Zero},
};
use prometheus_endpoint::{PrometheusError, Registry};
pub use finality_grandpa::BlockNumberOps;
use finality_grandpa::{voter, voter_set::VoterSet, Error as GrandpaError};
@@ -682,8 +684,8 @@ pub struct GrandpaParams<Block: BlockT, C, N, S, SC, VR> {
/// The Network instance.
///
/// It is assumed that this network will feed us Grandpa notifications. When using the
/// `pezsc_network` crate, it is assumed that the Grandpa notifications protocol has been passed
/// to the configuration of the networking. See [`grandpa_peers_set_config`].
/// `pezsc_network` crate, it is assumed that the Grandpa notifications protocol has been
/// passed to the configuration of the networking. See [`grandpa_peers_set_config`].
pub network: N,
/// Event stream for syncing-related events.
pub sync: S,
@@ -410,10 +410,10 @@ mod tests {
communication::tests::{make_test_network, Event},
};
use assert_matches::assert_matches;
use bizinikiwi_test_runtime_client::{TestClientBuilder, TestClientBuilderExt};
use pezsc_network_types::PeerId;
use pezsc_utils::mpsc::tracing_unbounded;
use pezsp_blockchain::HeaderBackend as _;
use bizinikiwi_test_runtime_client::{TestClientBuilder, TestClientBuilderExt};
use futures::executor;
@@ -21,6 +21,7 @@
use super::*;
use assert_matches::assert_matches;
use async_trait::async_trait;
use bizinikiwi_test_runtime_client::{runtime::BlockNumber, BlockBuilderExt};
use environment::HasVoted;
use futures_timer::Delay;
use parking_lot::{Mutex, RwLock};
@@ -49,7 +50,6 @@ use pezsp_runtime::{
Justifications,
};
use std::{collections::HashSet, pin::Pin};
use bizinikiwi_test_runtime_client::{runtime::BlockNumber, BlockBuilderExt};
use tokio::runtime::Handle;
use authorities::AuthoritySet;
@@ -35,11 +35,11 @@ use futures::{
use futures_timer::Delay;
use log::{debug, warn};
use parking_lot::Mutex;
use prometheus_endpoint::{register, Gauge, PrometheusError, Registry, U64};
use pezsc_client_api::{BlockImportNotification, ImportNotifications};
use pezsc_utils::mpsc::TracingUnboundedReceiver;
use pezsp_consensus_grandpa::AuthorityId;
use pezsp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
use prometheus_endpoint::{register, Gauge, PrometheusError, Registry, U64};
use std::{
collections::{HashMap, VecDeque},
@@ -562,6 +562,7 @@ pub(crate) type UntilGlobalMessageBlocksImported<Block, BlockStatus, BlockSyncRe
mod tests {
use super::*;
use crate::{CatchUp, CompactCommit};
use bizinikiwi_test_runtime_client::runtime::{Block, Hash, Header};
use finality_grandpa::Precommit;
use futures::future::Either;
use futures_timer::Delay;
@@ -569,7 +570,6 @@ mod tests {
use pezsc_utils::mpsc::{tracing_unbounded, TracingUnboundedSender};
use pezsp_consensus::BlockOrigin;
use pezsp_core::crypto::UncheckedFrom;
use bizinikiwi_test_runtime_client::runtime::{Block, Hash, Header};
#[derive(Clone)]
struct TestChainState {
@@ -347,18 +347,18 @@ where
mod tests {
use super::WarpSyncProof;
use crate::{AuthoritySetChanges, GrandpaJustification};
use bizinikiwi_test_runtime_client::{
BlockBuilderExt, ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt,
TestClientBuilder, TestClientBuilderExt,
};
use codec::Encode;
use rand::prelude::*;
use pezsc_block_builder::BlockBuilderBuilder;
use pezsp_blockchain::HeaderBackend;
use pezsp_consensus::BlockOrigin;
use pezsp_consensus_grandpa::GRANDPA_ENGINE_ID;
use pezsp_keyring::Ed25519Keyring;
use rand::prelude::*;
use std::sync::Arc;
use bizinikiwi_test_runtime_client::{
BlockBuilderExt, ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt,
TestClientBuilder, TestClientBuilderExt,
};
#[test]
fn warp_sync_proof_generate_verify() {
@@ -426,7 +426,8 @@ mod tests {
let precommit = finality_grandpa::Precommit { target_hash, target_number };
let msg = finality_grandpa::Message::Precommit(precommit.clone());
let encoded = pezsp_consensus_grandpa::localized_payload(42, current_set_id, &msg);
let encoded =
pezsp_consensus_grandpa::localized_payload(42, current_set_id, &msg);
let signature = keyring.sign(&encoded[..]).into();
let precommit = finality_grandpa::SignedPrecommit {