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
+4 -4
View File
@@ -34,10 +34,6 @@
use codec::Encode;
use error::{Error, Result};
use futures::{channel::oneshot, future::FutureExt, select};
use pezkuwi_pez_node_primitives::{
AvailableData, Collation, CollationGenerationConfig, CollationSecondedSignal, PoV,
SubmitCollationParams,
};
use pezkuwi_node_subsystem::{
messages::{CollationGenerationMessage, CollatorProtocolMessage, RuntimeApiMessage},
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem,
@@ -47,6 +43,10 @@ use pezkuwi_node_subsystem_util::{
request_claim_queue, request_persisted_validation_data, request_session_index_for_child,
request_validation_code_hash, request_validators, runtime::ClaimQueueSnapshot,
};
use pezkuwi_pez_node_primitives::{
AvailableData, Collation, CollationGenerationConfig, CollationSecondedSignal, PoV,
SubmitCollationParams,
};
use pezkuwi_primitives::{
transpose_claim_queue, CandidateCommitments, CandidateDescriptorV2,
CommittedCandidateReceiptV2, CoreIndex, Hash, Id as ParaId, OccupiedCoreAssumption,
@@ -17,23 +17,23 @@
use super::*;
use assert_matches::assert_matches;
use futures::{self, Future, StreamExt};
use pezkuwi_pez_node_primitives::{
BlockData, Collation, CollationResult, CollatorFn, MaybeCompressedPoV, PoV,
};
use pezkuwi_node_subsystem::{
messages::{AllMessages, RuntimeApiMessage, RuntimeApiRequest},
ActivatedLeaf,
};
use pezkuwi_node_subsystem_test_helpers::TestSubsystemContextHandle;
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_pez_node_primitives::{
BlockData, Collation, CollationResult, CollatorFn, MaybeCompressedPoV, PoV,
};
use pezkuwi_primitives::{
CandidateDescriptorVersion, CandidateReceiptV2, ClaimQueueOffset, CollatorPair, CoreSelector,
PersistedValidationData, UMPSignal, UMP_SEPARATOR,
};
use pezkuwi_primitives_test_helpers::dummy_head_data;
use rstest::rstest;
use pezsp_core::Pair;
use pezsp_keyring::sr25519::Keyring as Sr25519Keyring;
use rstest::rstest;
use std::{
collections::{BTreeMap, VecDeque},
sync::Mutex,
@@ -28,10 +28,6 @@ use pezkuwi_node_metrics::metered::{
UnboundedMeteredSender,
};
use pezkuwi_pez_node_primitives::{
approval::time::{Clock, SystemClock},
DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
messages::{ApprovalDistributionMessage, ApprovalVotingMessage, ApprovalVotingParallelMessage},
overseer, FromOrchestra, SpawnedSubsystem, SubsystemError, SubsystemResult,
@@ -42,6 +38,10 @@ use pezkuwi_node_subsystem_util::{
runtime::{Config as RuntimeInfoConfig, RuntimeInfo},
};
use pezkuwi_overseer::{OverseerSignal, Priority, SubsystemSender, TimeoutExt};
use pezkuwi_pez_node_primitives::{
approval::time::{Clock, SystemClock},
DISPUTE_WINDOW,
};
use pezkuwi_primitives::{CandidateIndex, Hash, ValidatorIndex, ValidatorSignature};
use rand::SeedableRng;
@@ -32,6 +32,12 @@ use futures::{channel::oneshot, future, stream::PollNext, StreamExt};
use itertools::Itertools;
use pezkuwi_node_core_approval_voting::{ApprovalVotingWorkProvider, Config};
use pezkuwi_node_network_protocol::{peer_set::ValidationVersion, ObservedRole, PeerId, View};
use pezkuwi_node_subsystem::{
messages::{ApprovalDistributionMessage, ApprovalVotingMessage, ApprovalVotingParallelMessage},
FromOrchestra,
};
use pezkuwi_node_subsystem_test_helpers::{mock::new_leaf, TestSubsystemContext};
use pezkuwi_overseer::{ActiveLeavesUpdate, OverseerSignal, SpawnGlue, TimeoutExt};
use pezkuwi_pez_node_primitives::approval::{
time::SystemClock,
v1::RELAY_VRF_MODULO_CONTEXT,
@@ -40,12 +46,6 @@ use pezkuwi_pez_node_primitives::approval::{
IndirectSignedApprovalVoteV2,
},
};
use pezkuwi_node_subsystem::{
messages::{ApprovalDistributionMessage, ApprovalVotingMessage, ApprovalVotingParallelMessage},
FromOrchestra,
};
use pezkuwi_node_subsystem_test_helpers::{mock::new_leaf, TestSubsystemContext};
use pezkuwi_overseer::{ActiveLeavesUpdate, OverseerSignal, SpawnGlue, TimeoutExt};
use pezkuwi_primitives::{CandidateHash, CoreIndex, Hash, ValidatorIndex};
use pezsc_keystore::{Keystore, LocalKeystore};
use pezsp_consensus::SyncOracle;
@@ -24,8 +24,8 @@ use crate::{
backend::Backend,
};
use pezkuwi_pez_node_primitives::approval::v1::AssignmentCertKind;
use pezkuwi_node_subsystem_util::database::Database;
use pezkuwi_pez_node_primitives::approval::v1::AssignmentCertKind;
use pezsp_application_crypto::pezsp_core::H256;
use std::{collections::HashSet, sync::Arc};
@@ -17,9 +17,9 @@
//! Version 2 of the DB schema.
use codec::{Decode, Encode};
use pezkuwi_pez_node_primitives::approval::{v1::DelayTranche, v2::AssignmentCertV2};
use pezkuwi_node_subsystem::{SubsystemError, SubsystemResult};
use pezkuwi_node_subsystem_util::database::{DBTransaction, Database};
use pezkuwi_pez_node_primitives::approval::{v1::DelayTranche, v2::AssignmentCertV2};
use pezkuwi_primitives::{
BlockNumber, CandidateHash, CandidateIndex, CandidateReceiptV2 as CandidateReceipt, CoreIndex,
GroupIndex, Hash, SessionIndex, ValidatorIndex, ValidatorSignature,
@@ -24,8 +24,8 @@ use crate::{
},
backend::{Backend, V2ReadBackend},
};
use pezkuwi_pez_node_primitives::approval::v1::AssignmentCertKind;
use pezkuwi_node_subsystem_util::database::Database;
use pezkuwi_pez_node_primitives::approval::v1::AssignmentCertKind;
use pezsp_application_crypto::pezsp_core::H256;
use std::{collections::HashSet, sync::Arc};
@@ -20,10 +20,10 @@
//! and adds a new field `pending_signatures` for `BlockEntry`
use codec::{Decode, Encode};
use pezkuwi_pez_node_primitives::approval::v2::CandidateBitfield;
use pezkuwi_node_subsystem::SubsystemResult;
use pezkuwi_node_subsystem_util::database::{DBTransaction, Database};
use pezkuwi_overseer::SubsystemError;
use pezkuwi_pez_node_primitives::approval::v2::CandidateBitfield;
use pezkuwi_primitives::{
BlockNumber, CandidateHash, CandidateIndex, CandidateReceiptV2 as CandidateReceipt, CoreIndex,
GroupIndex, Hash, SessionIndex, ValidatorIndex, ValidatorSignature,
@@ -32,10 +32,10 @@ use pezkuwi_pez_node_primitives::approval::{
use pezkuwi_primitives::{
AssignmentPair, CandidateHash, CoreIndex, GroupIndex, IndexedVec, ValidatorIndex,
};
use rand::{seq::SliceRandom, SeedableRng};
use rand_chacha::ChaCha20Rng;
use pezsc_keystore::LocalKeystore;
use pezsp_application_crypto::ByteArray;
use rand::{seq::SliceRandom, SeedableRng};
use rand_chacha::ChaCha20Rng;
use merlin::Transcript;
use schnorrkel::vrf::VRFInOut;
@@ -262,7 +262,8 @@ pub fn compute_assignments(
Ok(Some(pair)) => Some((ValidatorIndex(i as _), pair)),
Ok(None) => None,
Err(pezsc_keystore::Error::Unavailable) => None,
Err(pezsc_keystore::Error::Io(e)) if e.kind() == std::io::ErrorKind::NotFound => None,
Err(pezsc_keystore::Error::Io(e)) if e.kind() == std::io::ErrorKind::NotFound =>
None,
Err(e) => {
gum::warn!(target: LOG_TARGET, "Encountered keystore error: {:?}", e);
None
+16 -14
View File
@@ -28,13 +28,6 @@
//!
//! We maintain a rolling window of session indices. This starts as empty
use pezkuwi_pez_node_primitives::{
approval::{
self as approval_types,
v1::{BlockApprovalMeta, RelayVRFStory},
},
MAX_FINALITY_LAG,
};
use pezkuwi_node_subsystem::{
messages::{
ApprovalDistributionMessage, ChainApiMessage, ChainSelectionMessage, RuntimeApiMessage,
@@ -44,6 +37,13 @@ use pezkuwi_node_subsystem::{
};
use pezkuwi_node_subsystem_util::{determine_new_blocks, runtime::RuntimeInfo};
use pezkuwi_overseer::SubsystemSender;
use pezkuwi_pez_node_primitives::{
approval::{
self as approval_types,
v1::{BlockApprovalMeta, RelayVRFStory},
},
MAX_FINALITY_LAG,
};
use pezkuwi_primitives::{
node_features, BlockNumber, CandidateEvent, CandidateHash,
CandidateReceiptV2 as CandidateReceipt, ConsensusLog, CoreIndex, GroupIndex, Hash, Header,
@@ -612,22 +612,21 @@ pub(crate) mod tests {
};
use approval_types::time::Clock;
use assert_matches::assert_matches;
use pezkuwi_pez_node_primitives::{
approval::v1::{VrfSignature, VrfTranscript},
DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
messages::{AllMessages, ApprovalVotingMessage},
SubsystemContext,
};
use pezkuwi_node_subsystem_test_helpers::make_subsystem_context;
use pezkuwi_node_subsystem_util::database::Database;
use pezkuwi_pez_node_primitives::{
approval::v1::{VrfSignature, VrfTranscript},
DISPUTE_WINDOW,
};
use pezkuwi_primitives::{
node_features::FeatureIndex, ExecutorParams, Id as ParaId, IndexedVec, MutateDescriptorV2,
NodeFeatures, SessionInfo, ValidatorId, ValidatorIndex,
};
use pezkuwi_primitives_test_helpers::{dummy_candidate_receipt_v2, dummy_hash};
use schnellru::{ByLength, LruMap};
pub(crate) use pezsp_consensus_babe::{
digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest},
AllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch,
@@ -635,6 +634,7 @@ pub(crate) mod tests {
use pezsp_core::{crypto::VrfSecret, testing::TaskExecutor};
use pezsp_keyring::sr25519::Keyring as Sr25519Keyring;
pub(crate) use pezsp_runtime::{Digest, DigestItem};
use schnellru::{ByLength, LruMap};
use std::{pin::Pin, sync::Arc};
use crate::{approval_db::common::Config as DatabaseConfig, criteria, BlockEntry};
@@ -710,8 +710,10 @@ pub(crate) mod tests {
_relay_vrf_story: pezkuwi_pez_node_primitives::approval::v1::RelayVRFStory,
_assignment: &pezkuwi_pez_node_primitives::approval::v2::AssignmentCertV2,
_backing_groups: Vec<pezkuwi_primitives::GroupIndex>,
) -> Result<pezkuwi_pez_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment>
{
) -> Result<
pezkuwi_pez_node_primitives::approval::v1::DelayTranche,
criteria::InvalidAssignment,
> {
Ok(0)
}
}
+10 -10
View File
@@ -22,16 +22,6 @@
//! been sufficiently approved to finalize.
use futures_timer::Delay;
use pezkuwi_pez_node_primitives::{
approval::{
v1::{BlockApprovalMeta, DelayTranche},
v2::{
AssignmentCertKindV2, BitfieldError, CandidateBitfield, CoreBitfield,
IndirectAssignmentCertV2, IndirectSignedApprovalVoteV2,
},
},
ValidationResult, DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
errors::RecoveryError,
messages::{
@@ -52,6 +42,16 @@ use pezkuwi_node_subsystem_util::{
runtime::{Config as RuntimeInfoConfig, ExtendedSessionInfo, RuntimeInfo},
TimeoutExt,
};
use pezkuwi_pez_node_primitives::{
approval::{
v1::{BlockApprovalMeta, DelayTranche},
v2::{
AssignmentCertKindV2, BitfieldError, CandidateBitfield, CoreBitfield,
IndirectAssignmentCertV2, IndirectSignedApprovalVoteV2,
},
},
ValidationResult, DISPUTE_WINDOW,
};
use pezkuwi_primitives::{
ApprovalVoteMultipleCandidates, ApprovalVotingParams, BlockNumber, CandidateHash,
CandidateIndex, CandidateReceiptV2 as CandidateReceipt, CoreIndex, ExecutorParams, GroupIndex,
+11 -10
View File
@@ -22,6 +22,15 @@ use overseer::prometheus::{
prometheus::{IntCounter, IntCounterVec},
Histogram, HistogramOpts, HistogramVec, Opts,
};
use pezkuwi_node_subsystem::{
messages::{
AllMessages, ApprovalVotingMessage, AssignmentCheckResult, AvailabilityRecoveryMessage,
},
ActiveLeavesUpdate, SubsystemContext,
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_overseer::SpawnGlue;
use pezkuwi_pez_node_primitives::{
approval::{
v1::{
@@ -32,15 +41,6 @@ use pezkuwi_pez_node_primitives::{
},
AvailableData, BlockData, PoV,
};
use pezkuwi_node_subsystem::{
messages::{
AllMessages, ApprovalVotingMessage, AssignmentCheckResult, AvailabilityRecoveryMessage,
},
ActiveLeavesUpdate, SubsystemContext,
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_overseer::SpawnGlue;
use pezkuwi_primitives::{
ApprovalVote, CandidateCommitments, CandidateEvent, CoreIndex, DisputeStatement, GroupIndex,
Header, Id as ParaId, IndexedVec, MutateDescriptorV2, NodeFeatures, ValidDisputeStatementKind,
@@ -259,7 +259,8 @@ where
_relay_vrf_story: pezkuwi_pez_node_primitives::approval::v1::RelayVRFStory,
_assignment: &pezkuwi_pez_node_primitives::approval::v2::AssignmentCertV2,
_backing_groups: Vec<pezkuwi_primitives::GroupIndex>,
) -> Result<pezkuwi_pez_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment> {
) -> Result<pezkuwi_pez_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment>
{
self.1(validator_index)
}
}
+1 -1
View File
@@ -39,13 +39,13 @@ use pezkuwi_node_subsystem_util::database::{DBTransaction, Database};
use pezsp_consensus::SyncOracle;
use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_node_subsystem::{
errors::{ChainApiError, RuntimeApiError},
messages::{AvailabilityStoreMessage, ChainApiMessage, StoreAvailableDataError},
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_util as util;
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_primitives::{
BlockNumber, CandidateEvent, CandidateHash, CandidateReceiptV2 as CandidateReceipt, ChunkIndex,
CoreIndex, Hash, Header, NodeFeatures, ValidatorIndex,
+1 -1
View File
@@ -22,7 +22,6 @@ use util::availability_chunks::availability_chunk_index;
use self::test_helpers::mock::new_leaf;
use parking_lot::Mutex;
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV, Proof};
use pezkuwi_node_subsystem::{
errors::RuntimeApiError,
messages::{AllMessages, RuntimeApiMessage, RuntimeApiRequest},
@@ -30,6 +29,7 @@ use pezkuwi_node_subsystem::{
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_node_subsystem_util::{database::Database, TimeoutExt};
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV, Proof};
use pezkuwi_primitives::{
node_features, CandidateHash, CandidateReceiptV2 as CandidateReceipt, CoreIndex, GroupIndex,
HeadData, Header, PersistedValidationData, ValidatorId,
+4 -4
View File
@@ -80,10 +80,6 @@ use futures::{
use schnellru::{ByLength, LruMap};
use error::{Error, FatalResult};
use pezkuwi_pez_node_primitives::{
AvailableData, InvalidCandidate, PoV, SignedFullStatementWithPVD, StatementWithPVD,
ValidationResult,
};
use pezkuwi_node_subsystem::{
messages::{
AvailabilityDistributionMessage, AvailabilityStoreMessage, CanSecondRequest,
@@ -105,6 +101,10 @@ use pezkuwi_node_subsystem_util::{
runtime::{self, ClaimQueueSnapshot},
Validator,
};
use pezkuwi_pez_node_primitives::{
AvailableData, InvalidCandidate, PoV, SignedFullStatementWithPVD, StatementWithPVD,
ValidationResult,
};
use pezkuwi_primitives::{
BackedCandidate, CandidateCommitments, CandidateHash, CandidateReceiptV2 as CandidateReceipt,
CommittedCandidateReceiptV2 as CommittedCandidateReceipt, CoreIndex, ExecutorParams,
+1 -1
View File
@@ -17,7 +17,6 @@
use super::*;
use assert_matches::assert_matches;
use futures::{future, Future};
use pezkuwi_pez_node_primitives::{BlockData, InvalidCandidate, SignedFullStatement, Statement};
use pezkuwi_node_subsystem::{
messages::{
AllMessages, ChainApiMessage, CollatorProtocolMessage, HypotheticalMembership, PvfExecKind,
@@ -26,6 +25,7 @@ use pezkuwi_node_subsystem::{
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, TimeoutExt,
};
use pezkuwi_node_subsystem_test_helpers::mock::new_leaf;
use pezkuwi_pez_node_primitives::{BlockData, InvalidCandidate, SignedFullStatement, Statement};
use pezkuwi_primitives::{
BlockNumber, CoreState, GroupRotationInfo, HeadData, Header, MutateDescriptorV2, OccupiedCore,
PersistedValidationData, ScheduledCore, SessionIndex, LEGACY_MIN_BACKING_VOTES,
@@ -27,7 +27,6 @@ use pezkuwi_node_core_pvf::{
InternalValidationError, InvalidCandidate as WasmInvalidCandidate, PossiblyInvalidError,
PrepareError, PrepareJobKind, PvfPrepData, ValidationError, ValidationHost,
};
use pezkuwi_pez_node_primitives::{InvalidCandidate, PoV, ValidationResult};
use pezkuwi_node_subsystem::{
errors::RuntimeApiError,
messages::{
@@ -42,6 +41,7 @@ use pezkuwi_node_subsystem_util::{
runtime::{fetch_scheduling_lookahead, ClaimQueueSnapshot},
};
use pezkuwi_overseer::{ActivatedLeaf, ActiveLeavesUpdate};
use pezkuwi_pez_node_primitives::{InvalidCandidate, PoV, ValidationResult};
use pezkuwi_primitives::{
executor_params::{
DEFAULT_APPROVAL_EXECUTION_TIMEOUT, DEFAULT_BACKING_EXECUTION_TIMEOUT,
@@ -24,11 +24,11 @@ use crate::PvfExecKind;
use assert_matches::assert_matches;
use futures::executor;
use pezkuwi_node_core_pvf::PrepareError;
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_node_subsystem::messages::AllMessages;
use pezkuwi_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
use pezkuwi_node_subsystem_util::reexports::SubsystemContext;
use pezkuwi_overseer::ActivatedLeaf;
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_primitives::{
CandidateDescriptorV2, CandidateDescriptorVersion, ClaimQueueOffset,
CommittedCandidateReceiptError, CoreIndex, CoreSelector, GroupIndex, HeadData, Id as ParaId,
@@ -39,10 +39,10 @@ use pezkuwi_primitives_test_helpers::{
dummy_collator, dummy_collator_signature, dummy_hash, make_valid_candidate_descriptor,
make_valid_candidate_descriptor_v2, CandidateDescriptor,
};
use rstest::rstest;
use pezsp_core::{sr25519::Public, testing::TaskExecutor};
use pezsp_keyring::Sr25519Keyring;
use pezsp_keystore::{testing::MemoryKeystore, Keystore};
use rstest::rstest;
const VALIDATION_CODE_BOMB_LIMIT: u32 = 30 * 1024 * 1024;
@@ -1341,10 +1341,12 @@ fn compressed_code_works() {
let head_data = HeadData(vec![1, 1, 1]);
let raw_code = vec![2u8; 16];
let validation_code =
pezsp_maybe_compressed_blob::compress_strongly(&raw_code, VALIDATION_CODE_BOMB_LIMIT as usize)
.map(ValidationCode)
.unwrap();
let validation_code = pezsp_maybe_compressed_blob::compress_strongly(
&raw_code,
VALIDATION_CODE_BOMB_LIMIT as usize,
)
.map(ValidationCode)
.unwrap();
let descriptor = make_valid_candidate_descriptor(
ParaId::from(1_u32),
+1 -1
View File
@@ -20,9 +20,9 @@ use codec::Encode;
use futures::{channel::oneshot, future::BoxFuture};
use std::collections::BTreeMap;
use pezkuwi_pez_node_primitives::BlockWeight;
use pezkuwi_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
use pezkuwi_node_subsystem_types::ChainApiBackend;
use pezkuwi_pez_node_primitives::BlockWeight;
use pezkuwi_primitives::{Block, BlockNumber, Hash, Header};
use pezsp_blockchain::Info as BlockInfo;
use pezsp_core::testing::TaskExecutor;
+1 -1
View File
@@ -16,7 +16,6 @@
//! Implements the Chain Selection Subsystem.
use pezkuwi_pez_node_primitives::BlockWeight;
use pezkuwi_node_subsystem::{
errors::ChainApiError,
messages::{ChainApiMessage, ChainSelectionMessage},
@@ -24,6 +23,7 @@ use pezkuwi_node_subsystem::{
FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_util::database::Database;
use pezkuwi_pez_node_primitives::BlockWeight;
use pezkuwi_primitives::{BlockNumber, ConsensusLog, Hash, Header};
use codec::Error as CodecError;
@@ -23,8 +23,8 @@
//! Each direct descendant of the finalized block acts as its own sub-tree,
//! and as the finalized block advances, orphaned sub-trees are entirely pruned.
use pezkuwi_pez_node_primitives::BlockWeight;
use pezkuwi_node_subsystem::ChainApiError;
use pezkuwi_pez_node_primitives::BlockWeight;
use pezkuwi_primitives::{BlockNumber, Hash};
use std::collections::HashMap;
@@ -22,8 +22,8 @@
//! the dispute data in the database. Any breaking changes here will still
//! require a db migration (check `node/service/src/teyrchains_db/upgrade.rs`).
use pezkuwi_pez_node_primitives::DisputeStatus;
use pezkuwi_node_subsystem_util::database::{DBTransaction, Database};
use pezkuwi_pez_node_primitives::DisputeStatus;
use pezkuwi_primitives::{
CandidateHash, CandidateReceiptV2 as CandidateReceipt, Hash, InvalidDisputeStatementKind,
SessionIndex, ValidDisputeStatementKind, ValidatorIndex, ValidatorSignature,
@@ -28,11 +28,11 @@
use std::collections::{BTreeMap, HashMap, HashSet};
use pezkuwi_node_subsystem::overseer;
use pezkuwi_node_subsystem_util::{runtime::RuntimeInfo, ControlledValidatorIndices};
use pezkuwi_pez_node_primitives::{
disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp,
};
use pezkuwi_node_subsystem::overseer;
use pezkuwi_node_subsystem_util::{runtime::RuntimeInfo, ControlledValidatorIndices};
use pezkuwi_primitives::{
CandidateHash, CandidateReceiptV2 as CandidateReceipt, DisputeStatement, ExecutorParams, Hash,
IndexedVec, SessionIndex, SessionInfo, ValidDisputeStatementKind, ValidatorId, ValidatorIndex,
@@ -28,10 +28,6 @@ use futures::{
use pezsc_keystore::LocalKeystore;
use pezkuwi_pez_node_primitives::{
disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement,
Timestamp, DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
messages::{
ApprovalVotingParallelMessage, BlockDescription, ChainSelectionMessage,
@@ -43,6 +39,10 @@ use pezkuwi_node_subsystem_util::{
runtime::{self, key_ownership_proof, submit_report_dispute_lost, RuntimeInfo},
ControlledValidatorIndices,
};
use pezkuwi_pez_node_primitives::{
disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement,
Timestamp, DISPUTE_WINDOW,
};
use pezkuwi_primitives::{
slashing, BlockNumber, CandidateHash, CandidateReceiptV2 as CandidateReceipt, CompactStatement,
DisputeStatement, DisputeStatementSet, Hash, ScrapedOnChainVotes, SessionIndex,
@@ -33,10 +33,6 @@ use futures::FutureExt;
use gum::CandidateHash;
use pezsc_keystore::LocalKeystore;
use pezkuwi_pez_node_primitives::{
CandidateVotes, DisputeMessage, DisputeMessageCheckError, SignedDisputeStatement,
DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
messages::DisputeDistributionMessage, overseer, ActivatedLeaf, FromOrchestra, OverseerSignal,
SpawnedSubsystem, SubsystemError,
@@ -46,6 +42,10 @@ use pezkuwi_node_subsystem_util::{
runtime::{Config as RuntimeInfoConfig, RuntimeInfo},
ControlledValidatorIndices,
};
use pezkuwi_pez_node_primitives::{
CandidateVotes, DisputeMessage, DisputeMessageCheckError, SignedDisputeStatement,
DISPUTE_WINDOW,
};
use pezkuwi_primitives::{
DisputeStatement, ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidatorIndex,
};
@@ -25,12 +25,12 @@ use futures::{
#[cfg(test)]
use futures_timer::Delay;
use pezkuwi_pez_node_primitives::ValidationResult;
use pezkuwi_node_subsystem::{
messages::{AvailabilityRecoveryMessage, CandidateValidationMessage, PvfExecKind},
overseer, ActiveLeavesUpdate, RecoveryError,
};
use pezkuwi_node_subsystem_util::runtime::get_validation_code_by_hash;
use pezkuwi_pez_node_primitives::ValidationResult;
use pezkuwi_primitives::{
BlockNumber, CandidateHash, CandidateReceiptV2 as CandidateReceipt, Hash, SessionIndex,
};
@@ -23,7 +23,6 @@ use pezsp_core::testing::TaskExecutor;
use super::*;
use codec::Encode;
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, InvalidCandidate, PoV};
use pezkuwi_node_subsystem::{
messages::{
AllMessages, ChainApiMessage, DisputeCoordinatorMessage, PvfExecKind, RuntimeApiMessage,
@@ -34,6 +33,7 @@ use pezkuwi_node_subsystem::{
use pezkuwi_node_subsystem_test_helpers::{
make_subsystem_context, mock::new_leaf, TestSubsystemContext, TestSubsystemContextHandle,
};
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, InvalidCandidate, PoV};
use pezkuwi_primitives::{
BlakeTwo256, CandidateCommitments, HashT, Header, PersistedValidationData, ValidationCode,
};
@@ -19,7 +19,6 @@ use std::collections::{btree_map::Entry, BTreeMap, HashSet};
use futures::channel::oneshot;
use schnellru::{ByLength, LruMap};
use pezkuwi_pez_node_primitives::{DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION, MAX_FINALITY_LAG};
use pezkuwi_node_subsystem::{
messages::ChainApiMessage, overseer, ActivatedLeaf, ActiveLeavesUpdate, ChainApiError,
RuntimeApiError, SubsystemSender,
@@ -27,6 +26,9 @@ use pezkuwi_node_subsystem::{
use pezkuwi_node_subsystem_util::runtime::{
self, get_candidate_events, get_on_chain_votes, get_unapplied_slashes,
};
use pezkuwi_pez_node_primitives::{
DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION, MAX_FINALITY_LAG,
};
use pezkuwi_primitives::{
slashing::PendingSlashes, BlockNumber, CandidateEvent, CandidateHash,
CandidateReceiptV2 as CandidateReceipt, Hash, ScrapedOnChainVotes, SessionIndex,
@@ -22,7 +22,6 @@ use codec::Encode;
use futures::future::join;
use pezsp_core::testing::TaskExecutor;
use pezkuwi_pez_node_primitives::DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION;
use pezkuwi_node_subsystem::{
messages::{
AllMessages, ChainApiMessage, DisputeCoordinatorMessage, RuntimeApiMessage,
@@ -35,6 +34,7 @@ use pezkuwi_node_subsystem_test_helpers::{
TestSubsystemSender,
};
use pezkuwi_node_subsystem_util::{reexports::SubsystemContext, TimeoutExt};
use pezkuwi_pez_node_primitives::DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION;
use pezkuwi_primitives::{
BlakeTwo256, BlockNumber, CandidateEvent, CandidateReceiptV2 as CandidateReceipt, CoreIndex,
GroupIndex, Hash, HashT, HeadData, Id as ParaId,
@@ -31,10 +31,6 @@ use futures::{
use pezkuwi_node_subsystem_util::database::Database;
use pezkuwi_pez_node_primitives::{
DisputeMessage, DisputeStatus, SignedDisputeStatement, SignedFullStatement, Statement,
DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
messages::{
ApprovalVotingParallelMessage, ChainApiMessage, ChainSelectionMessage,
@@ -43,6 +39,10 @@ use pezkuwi_node_subsystem::{
overseer::FromOrchestra,
OverseerSignal,
};
use pezkuwi_pez_node_primitives::{
DisputeMessage, DisputeStatus, SignedDisputeStatement, SignedFullStatement, Statement,
DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezsc_keystore::LocalKeystore;
@@ -51,7 +51,6 @@ use pezsp_core::{sr25519::Pair, testing::TaskExecutor, Pair as PairT};
use pezsp_keyring::Sr25519Keyring;
use pezsp_keystore::{Keystore, KeystorePtr};
use pezkuwi_pez_node_primitives::{Timestamp, ACTIVE_DURATION_SECS};
use pezkuwi_node_subsystem::{
messages::{AllMessages, BlockDescription, RuntimeApiMessage, RuntimeApiRequest},
ActiveLeavesUpdate,
@@ -59,6 +58,7 @@ use pezkuwi_node_subsystem::{
use pezkuwi_node_subsystem_test_helpers::{
make_buffered_subsystem_context, mock::new_leaf, TestSubsystemContextHandle,
};
use pezkuwi_pez_node_primitives::{Timestamp, ACTIVE_DURATION_SECS};
use pezkuwi_primitives::{
ApprovalVote, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
CandidateReceiptV2 as CandidateReceipt, CoreIndex, DisputeStatement, ExecutorParams,
@@ -19,8 +19,8 @@
use crate::LOG_TARGET;
use futures::channel::oneshot;
use pezkuwi_pez_node_primitives::CandidateVotes;
use pezkuwi_node_subsystem::{messages::DisputeCoordinatorMessage, overseer};
use pezkuwi_pez_node_primitives::CandidateVotes;
use pezkuwi_primitives::{CandidateHash, SessionIndex};
/// Request the relevant dispute statements for a set of disputes identified by `CandidateHash` and
@@ -20,12 +20,12 @@
use crate::{error::GetOnchainDisputesError, metrics, LOG_TARGET};
use futures::channel::oneshot;
use pezkuwi_pez_node_primitives::{dispute_is_inactive, CandidateVotes, DisputeStatus, Timestamp};
use pezkuwi_node_subsystem::{
errors::RuntimeApiError,
messages::{DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest},
overseer, ActivatedLeaf,
};
use pezkuwi_pez_node_primitives::{dispute_is_inactive, CandidateVotes, DisputeStatus, Timestamp};
use pezkuwi_primitives::{
supermajority_threshold, CandidateHash, DisputeState, DisputeStatement, DisputeStatementSet,
Hash, MultiDisputeStatementSet, SessionIndex, ValidDisputeStatementKind, ValidatorIndex,
@@ -20,11 +20,11 @@ use super::super::{
};
use bitvec::prelude::*;
use futures::channel::mpsc;
use pezkuwi_pez_node_primitives::{CandidateVotes, DisputeStatus, ACTIVE_DURATION_SECS};
use pezkuwi_node_subsystem::messages::{
AllMessages, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest,
};
use pezkuwi_node_subsystem_test_helpers::{mock::new_leaf, TestSubsystemSender};
use pezkuwi_pez_node_primitives::{CandidateVotes, DisputeStatus, ACTIVE_DURATION_SECS};
use pezkuwi_primitives::{
CandidateHash, CandidateReceiptV2 as CandidateReceipt, DisputeState,
InvalidDisputeStatementKind, SessionIndex, ValidDisputeStatementKind, ValidatorSignature,
@@ -271,7 +271,11 @@ impl pezsp_externalities::Externalities for ValidationExternalities {
panic!("storage_root: unsupported feature for teyrchain validation")
}
fn child_storage_root(&mut self, _: &ChildInfo, _: pezsp_core::storage::StateVersion) -> Vec<u8> {
fn child_storage_root(
&mut self,
_: &ChildInfo,
_: pezsp_core::storage::StateVersion,
) -> Vec<u8> {
panic!("child_storage_root: unsupported feature for teyrchain validation")
}
+18 -16
View File
@@ -217,22 +217,24 @@ pub fn worker_entrypoint(
let compiled_artifact_blob = Arc::new(compiled_artifact_blob);
let raw_block_data =
match pezsp_maybe_compressed_blob::decompress(&pov.block_data.0, POV_BOMB_LIMIT) {
Ok(data) => data,
Err(_) => {
send_result::<WorkerResponse, WorkerError>(
&mut stream,
Ok(WorkerResponse {
job_response: JobResponse::PoVDecompressionFailure,
duration: Duration::ZERO,
pov_size: 0,
}),
worker_info,
)?;
continue;
},
};
let raw_block_data = match pezsp_maybe_compressed_blob::decompress(
&pov.block_data.0,
POV_BOMB_LIMIT,
) {
Ok(data) => data,
Err(_) => {
send_result::<WorkerResponse, WorkerError>(
&mut stream,
Ok(WorkerResponse {
job_response: JobResponse::PoVDecompressionFailure,
duration: Duration::ZERO,
pov_size: 0,
}),
worker_info,
)?;
continue;
},
};
let pov_size = raw_block_data.len() as u32;
+2 -2
View File
@@ -34,8 +34,8 @@ use pezkuwi_node_core_pvf_common::{
execute::{JobResponse, WorkerError, WorkerResponse},
SecurityStatus,
};
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_node_subsystem::{messages::PvfExecKind, ActiveLeavesUpdate};
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_primitives::{ExecutorParams, ExecutorParamsHash, Hash, PersistedValidationData};
use slotmap::HopSlotMap;
use std::{
@@ -908,8 +908,8 @@ impl Unscheduled {
#[cfg(test)]
mod tests {
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_node_subsystem_test_helpers::mock::new_leaf;
use pezkuwi_pez_node_primitives::BlockData;
use pezsp_core::H256;
use super::*;
+1 -1
View File
@@ -38,10 +38,10 @@ use pezkuwi_node_core_pvf_common::{
prepare::PrepareSuccess,
pvf::PvfPrepData,
};
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_node_subsystem::{
messages::PvfExecKind, ActiveLeavesUpdate, SubsystemError, SubsystemResult,
};
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_primitives::{Hash, PersistedValidationData};
use pezkuwi_teyrchain_primitives::primitives::ValidationResult;
use std::{
+1 -1
View File
@@ -25,8 +25,8 @@ use pezkuwi_node_core_pvf::{
ValidationHost, JOB_TIMEOUT_WALL_CLOCK_FACTOR,
};
use pezkuwi_node_core_pvf_common::{compute_checksum, ArtifactChecksum};
use pezkuwi_pez_node_primitives::{PoV, POV_BOMB_LIMIT};
use pezkuwi_node_subsystem::messages::PvfExecKind;
use pezkuwi_pez_node_primitives::{PoV, POV_BOMB_LIMIT};
use pezkuwi_primitives::{
ExecutorParam, ExecutorParams, Hash, PersistedValidationData, PvfExecKind as RuntimePvfExecKind,
};
+1 -1
View File
@@ -28,9 +28,9 @@ use pezkuwi_primitives::PersistedValidationData;
use pezkuwi_teyrchain_primitives::primitives::{
BlockData as GenericBlockData, HeadData as GenericHeadData,
};
use pezsp_core::H256;
use procfs::process;
use rusty_fork::rusty_fork_test;
use pezsp_core::H256;
use std::{future::Future, sync::Arc, time::Duration};
use test_teyrchain_adder::{hash_state, BlockData, HeadData};
+1 -1
View File
@@ -16,8 +16,8 @@
use std::collections::{btree_map::BTreeMap, VecDeque};
use schnellru::{ByLength, LruMap};
use pezsp_consensus_babe::Epoch;
use schnellru::{ByLength, LruMap};
use pezkuwi_primitives::{
async_backing::{self, Constraints},
+1 -1
View File
@@ -16,9 +16,9 @@
use super::*;
use pezkuwi_pez_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfiguration};
use pezkuwi_node_subsystem::SpawnGlue;
use pezkuwi_node_subsystem_test_helpers::make_subsystem_context;
use pezkuwi_pez_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfiguration};
use pezkuwi_primitives::{
async_backing, async_backing::Constraints, slashing, ApprovalVotingParams,
AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
@@ -30,8 +30,8 @@ use pezkuwi_cli::{
},
validator_overseer_builder, Cli,
};
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV};
use pezkuwi_node_subsystem_types::{ChainApiBackend, RuntimeApiSubsystemClient};
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV};
use pezkuwi_primitives::{CandidateDescriptorV2, CandidateReceiptV2, CoreIndex};
use pezkuwi_node_subsystem_util::request_validators;
+2 -1
View File
@@ -213,7 +213,8 @@ impl RuntimeMetricsProvider {
}
/// Returns the custom profiling closure that we'll apply to the `LoggerBuilder`.
pub fn logger_hook() -> impl FnOnce(&mut pezsc_cli::LoggerBuilder, &pezsc_service::Configuration) -> () {
pub fn logger_hook(
) -> impl FnOnce(&mut pezsc_cli::LoggerBuilder, &pezsc_service::Configuration) -> () {
|logger_builder, config| {
if config.prometheus_registry().is_none() {
return;
@@ -33,18 +33,6 @@ use pezkuwi_node_network_protocol::{
peer_set::MAX_NOTIFICATION_SIZE,
v3 as protocol_v3, PeerId, UnifiedReputationChange as Rep, ValidationProtocols, View,
};
use pezkuwi_pez_node_primitives::{
approval::{
criteria::{AssignmentCriteria, InvalidAssignment},
time::{Clock, ClockExt, SystemClock, TICK_TOO_FAR_IN_FUTURE},
v1::{BlockApprovalMeta, DelayTranche, RelayVRFStory},
v2::{
AsBitIndex, AssignmentCertKindV2, CandidateBitfield, IndirectAssignmentCertV2,
IndirectSignedApprovalVoteV2,
},
},
DISPUTE_WINDOW,
};
use pezkuwi_node_subsystem::{
messages::{
ApprovalDistributionMessage, ApprovalVotingMessage, CheckedIndirectAssignment,
@@ -57,6 +45,18 @@ use pezkuwi_node_subsystem_util::{
reputation::{ReputationAggregator, REPUTATION_CHANGE_INTERVAL},
runtime::{Config as RuntimeInfoConfig, ExtendedSessionInfo, RuntimeInfo},
};
use pezkuwi_pez_node_primitives::{
approval::{
criteria::{AssignmentCriteria, InvalidAssignment},
time::{Clock, ClockExt, SystemClock, TICK_TOO_FAR_IN_FUTURE},
v1::{BlockApprovalMeta, DelayTranche, RelayVRFStory},
v2::{
AsBitIndex, AssignmentCertKindV2, CandidateBitfield, IndirectAssignmentCertV2,
IndirectSignedApprovalVoteV2,
},
},
DISPUTE_WINDOW,
};
use pezkuwi_primitives::{
BlockNumber, CandidateHash, CandidateIndex, CoreIndex, DisputeStatement, GroupIndex, Hash,
SessionIndex, Slot, ValidDisputeStatementKind, ValidatorIndex, ValidatorSignature,
@@ -23,6 +23,10 @@ use pezkuwi_node_network_protocol::{
peer_set::ValidationVersion,
view, ObservedRole,
};
use pezkuwi_node_subsystem::messages::{
network_bridge_event, AllMessages, ReportPeerMessage, RuntimeApiRequest,
};
use pezkuwi_node_subsystem_util::{reputation::add_reputation, TimeoutExt as _};
use pezkuwi_pez_node_primitives::approval::{
criteria,
v1::{VrfPreOutput, VrfProof, VrfSignature},
@@ -31,20 +35,16 @@ use pezkuwi_pez_node_primitives::approval::{
RELAY_VRF_MODULO_CONTEXT,
},
};
use pezkuwi_node_subsystem::messages::{
network_bridge_event, AllMessages, ReportPeerMessage, RuntimeApiRequest,
};
use pezkuwi_node_subsystem_util::{reputation::add_reputation, TimeoutExt as _};
use pezkuwi_primitives::{
ApprovalVoteMultipleCandidates, AuthorityDiscoveryId, BlakeTwo256, CoreIndex, ExecutorParams,
HashT, NodeFeatures, SessionInfo, ValidatorId,
};
use pezkuwi_primitives_test_helpers::dummy_signature;
use rand::SeedableRng;
use pezsc_keystore::{Keystore, LocalKeystore};
use pezsp_application_crypto::AppCrypto;
use pezsp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair;
use pezsp_core::crypto::Pair as PairT;
use rand::SeedableRng;
use std::time::Duration;
type VirtualOverseer =
pezkuwi_node_subsystem_test_helpers::TestSubsystemContextHandle<ApprovalDistributionMessage>;
@@ -456,8 +456,10 @@ fn signature_for(
}
struct MockAssignmentCriteria {
tranche:
Result<pezkuwi_pez_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment>,
tranche: Result<
pezkuwi_pez_node_primitives::approval::v1::DelayTranche,
criteria::InvalidAssignment,
>,
}
impl AssignmentCriteria for MockAssignmentCriteria {
@@ -484,7 +486,8 @@ impl AssignmentCriteria for MockAssignmentCriteria {
_relay_vrf_story: pezkuwi_pez_node_primitives::approval::v1::RelayVRFStory,
_assignment: &pezkuwi_pez_node_primitives::approval::v2::AssignmentCertV2,
_backing_groups: Vec<pezkuwi_primitives::GroupIndex>,
) -> Result<pezkuwi_pez_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment> {
) -> Result<pezkuwi_pez_node_primitives::approval::v1::DelayTranche, criteria::InvalidAssignment>
{
self.tranche
}
}
@@ -23,12 +23,12 @@ use pezkuwi_node_network_protocol::request_response::{
v1::{PoVFetchingRequest, PoVFetchingResponse},
OutgoingRequest, Recipient,
};
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_node_subsystem::{
messages::{IfDisconnected, NetworkBridgeTxMessage},
overseer,
};
use pezkuwi_node_subsystem_util::runtime::RuntimeInfo;
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_primitives::{AuthorityDiscoveryId, CandidateHash, Hash, Id as ParaId, ValidatorIndex};
use crate::{
@@ -128,11 +128,11 @@ mod tests {
use pezsc_network::ProtocolName;
use pezsp_core::testing::TaskExecutor;
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_node_subsystem::messages::{
AllMessages, AvailabilityDistributionMessage, RuntimeApiMessage, RuntimeApiRequest,
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_primitives::{CandidateHash, ExecutorParams, Hash, NodeFeatures, ValidatorIndex};
use test_helpers::mock::make_ferdie_keystore;
@@ -29,11 +29,11 @@ use pezkuwi_node_network_protocol::request_response::{
v1::{self, ChunkResponse},
v2,
};
use pezkuwi_pez_node_primitives::ErasureChunk;
use pezkuwi_node_subsystem::{
messages::{AvailabilityStoreMessage, IfDisconnected, NetworkBridgeTxMessage},
overseer,
};
use pezkuwi_pez_node_primitives::ErasureChunk;
use pezkuwi_primitives::{
AuthorityDiscoveryId, BlakeTwo256, CandidateHash, ChunkIndex, GroupIndex, Hash, HashT,
OccupiedCore, SessionIndex,
@@ -33,8 +33,8 @@ use pezkuwi_node_network_protocol::request_response::{
v1::{self, ChunkResponse},
Protocol, Recipient, ReqProtocolNames,
};
use pezkuwi_pez_node_primitives::{BlockData, PoV, Proof};
use pezkuwi_node_subsystem::messages::AllMessages;
use pezkuwi_pez_node_primitives::{BlockData, PoV, Proof};
use pezkuwi_primitives::{CandidateHash, ChunkIndex, ValidatorIndex};
use super::*;
@@ -18,8 +18,8 @@ use futures::FutureExt;
use std::future::Future;
use pezkuwi_node_network_protocol::request_response::ReqProtocolNames;
use pezkuwi_pez_node_primitives::{BlockData, ErasureChunk, PoV};
use pezkuwi_node_subsystem_util::runtime::RuntimeInfo;
use pezkuwi_pez_node_primitives::{BlockData, ErasureChunk, PoV};
use pezkuwi_primitives::{
BlockNumber, ChunkIndex, CoreState, ExecutorParams, GroupIndex, Hash, Id as ParaId,
ScheduledCore, SessionIndex, SessionInfo,
@@ -26,8 +26,8 @@ use pezkuwi_node_network_protocol::{
request_response::{v1, v2, IncomingRequest, IncomingRequestReceiver, IsRequest},
UnifiedReputationChange as Rep,
};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_node_subsystem::{messages::AvailabilityStoreMessage, SubsystemSender};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_primitives::{CandidateHash, ValidatorIndex};
use crate::{
@@ -37,7 +37,6 @@ use pezsp_keystore::KeystorePtr;
use pezkuwi_node_network_protocol::request_response::{
v1, v2, IncomingRequest, OutgoingRequest, Protocol, ReqProtocolNames, Requests,
};
use pezkuwi_pez_node_primitives::ErasureChunk;
use pezkuwi_node_subsystem::{
messages::{
AllMessages, AvailabilityDistributionMessage, AvailabilityStoreMessage, ChainApiMessage,
@@ -46,6 +45,7 @@ use pezkuwi_node_subsystem::{
ActiveLeavesUpdate, FromOrchestra, OverseerSignal,
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_pez_node_primitives::ErasureChunk;
use pezkuwi_primitives::{
CandidateHash, ChunkIndex, CoreIndex, CoreState, ExecutorParams, GroupIndex, Hash,
Id as ParaId, NodeFeatures, ScheduledCore, SessionInfo, ValidatorIndex,
@@ -54,7 +54,6 @@ use pezkuwi_node_network_protocol::{
},
UnifiedReputationChange as Rep,
};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_node_subsystem::{
errors::RecoveryError,
messages::{AvailabilityRecoveryMessage, AvailabilityStoreMessage},
@@ -65,6 +64,7 @@ use pezkuwi_node_subsystem_util::{
availability_chunks::availability_chunk_indices,
runtime::{ExtendedSessionInfo, RuntimeInfo},
};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_primitives::{
node_features, BlockNumber, CandidateHash, CandidateReceiptV2 as CandidateReceipt, ChunkIndex,
CoreIndex, GroupIndex, Hash, SessionIndex, ValidatorIndex,
@@ -31,8 +31,8 @@ pub use self::strategy::{REGULAR_CHUNKS_REQ_RETRY_LIMIT, SYSTEMATIC_CHUNKS_REQ_R
use crate::{metrics::Metrics, ErasureTask, PostRecoveryCheck, LOG_TARGET};
use codec::Encode;
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_node_subsystem::{messages::AvailabilityStoreMessage, overseer, RecoveryError};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_primitives::{AuthorityDiscoveryId, CandidateHash, Hash};
use pezsc_network::ProtocolName;
@@ -26,8 +26,8 @@ use crate::{
ErasureTask, RecoveryStrategy, LOG_TARGET,
};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_node_subsystem::{overseer, RecoveryError};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_primitives::ValidatorIndex;
use futures::{channel::oneshot, SinkExt};
@@ -22,8 +22,8 @@ use crate::{
use pezkuwi_node_network_protocol::request_response::{
self as req_res, outgoing::RequestError, OutgoingRequest, Recipient, Requests,
};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_node_subsystem::{messages::NetworkBridgeTxMessage, overseer, RecoveryError};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_primitives::ValidatorIndex;
use pezsc_network::{IfDisconnected, OutboundFailure, RequestFailure};
@@ -37,11 +37,11 @@ use pezkuwi_node_network_protocol::request_response::CHUNK_REQUEST_TIMEOUT;
use pezkuwi_node_network_protocol::request_response::{
self as req_res, outgoing::RequestError, OutgoingRequest, Recipient, Requests,
};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_node_subsystem::{
messages::{AvailabilityStoreMessage, NetworkBridgeTxMessage},
overseer, RecoveryError,
};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_primitives::{AuthorityDiscoveryId, BlakeTwo256, ChunkIndex, HashT, ValidatorIndex};
use pezsc_network::{IfDisconnected, OutboundFailure, ProtocolName, RequestFailure};
use std::{
@@ -645,11 +645,11 @@ mod tests {
};
use pezkuwi_erasure_coding::{recovery_threshold, systematic_recovery_threshold};
use pezkuwi_node_network_protocol::request_response::Protocol;
use pezkuwi_pez_node_primitives::{BlockData, PoV};
use pezkuwi_node_subsystem::{AllMessages, TimeoutExt};
use pezkuwi_node_subsystem_test_helpers::{
derive_erasure_chunks_with_proofs_and_root, sender_receiver, TestSubsystemSender,
};
use pezkuwi_pez_node_primitives::{BlockData, PoV};
use pezkuwi_primitives::{CandidateHash, HeadData, PersistedValidationData};
use pezkuwi_primitives_test_helpers::dummy_hash;
use pezsp_keyring::Sr25519Keyring;
@@ -26,8 +26,8 @@ use crate::{
LOG_TARGET,
};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_node_subsystem::{overseer, RecoveryError};
use pezkuwi_pez_node_primitives::AvailableData;
use pezkuwi_primitives::{ChunkIndex, ValidatorIndex};
use std::collections::VecDeque;
@@ -31,7 +31,6 @@ use pezkuwi_node_network_protocol::request_response::{
IncomingRequest, Protocol, Recipient, ReqProtocolNames, Requests,
};
use pezkuwi_pez_node_primitives::{BlockData, ErasureChunk, PoV, Proof};
use pezkuwi_node_subsystem::messages::{
AllMessages, NetworkBridgeTxMessage, RuntimeApiMessage, RuntimeApiRequest,
};
@@ -40,6 +39,7 @@ use pezkuwi_node_subsystem_test_helpers::{
TestSubsystemContextHandle,
};
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_pez_node_primitives::{BlockData, ErasureChunk, PoV, Proof};
use pezkuwi_primitives::{
node_features, AuthorityDiscoveryId, Block, ExecutorParams, Hash, HeadData, IndexedVec,
MutateDescriptorV2, NodeFeatures, PersistedValidationData, SessionInfo, ValidatorId,
@@ -29,12 +29,12 @@ use pezkuwi_node_subsystem::messages::ReportPeerMessage;
use pezkuwi_node_subsystem_test_helpers::make_subsystem_context;
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_primitives::{AvailabilityBitfield, Signed, ValidatorIndex};
use rand_chacha::ChaCha12Rng;
use pezsp_application_crypto::AppCrypto;
use pezsp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair;
use pezsp_core::Pair as PairT;
use pezsp_keyring::Sr25519Keyring;
use pezsp_keystore::{testing::MemoryKeystore, Keystore, KeystorePtr};
use rand_chacha::ChaCha12Rng;
use std::{sync::Arc, time::Duration};
@@ -15,9 +15,9 @@
// along with Pezkuwi. If not, see <http://www.gnu.org/licenses/>.
use pezkuwi_node_network_protocol::request_response::incoming;
use pezkuwi_pez_node_primitives::UncheckedSignedFullStatement;
use pezkuwi_node_subsystem::{errors::SubsystemError, RuntimeApiError};
use pezkuwi_node_subsystem_util::{backing_implicit_view, runtime};
use pezkuwi_pez_node_primitives::UncheckedSignedFullStatement;
use crate::LOG_TARGET;
@@ -24,8 +24,8 @@ use futures::{
channel::oneshot, future::Fuse, pin_mut, select, stream::FuturesUnordered, FutureExt, StreamExt,
};
use metrics::{CollationStats, CollationTracker};
use schnellru::{ByLength, LruMap};
use pezsp_core::Pair;
use schnellru::{ByLength, LruMap};
use pezkuwi_node_network_protocol::{
self as net_protocol,
@@ -37,7 +37,6 @@ use pezkuwi_node_network_protocol::{
v1 as protocol_v1, v2 as protocol_v2, CollationProtocols, OurView, PeerId,
UnifiedReputationChange as Rep, View,
};
use pezkuwi_pez_node_primitives::{CollationSecondedSignal, PoV, Statement};
use pezkuwi_node_subsystem::{
messages::{
ChainApiMessage, CollatorProtocolMessage, NetworkBridgeEvent, NetworkBridgeTxMessage,
@@ -53,6 +52,7 @@ use pezkuwi_node_subsystem_util::{
},
TimeoutExt,
};
use pezkuwi_pez_node_primitives::{CollationSecondedSignal, PoV, Statement};
use pezkuwi_primitives::{
AuthorityDiscoveryId, BlockNumber, CandidateEvent, CandidateHash,
CandidateReceiptV2 as CandidateReceipt, CollatorPair, CoreIndex, Hash, HeadData, Id as ParaId,
@@ -41,13 +41,13 @@ use pezkuwi_node_network_protocol::{
},
view, ObservedRole,
};
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_node_subsystem::{
messages::{AllMessages, ReportPeerMessage, RuntimeApiMessage, RuntimeApiRequest},
ActivatedLeaf, ActiveLeavesUpdate,
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_node_subsystem_util::{reputation::add_reputation, TimeoutExt};
use pezkuwi_pez_node_primitives::BlockData;
use pezkuwi_primitives::{
AuthorityDiscoveryId, Block, CollatorPair, ExecutorParams, GroupIndex, GroupRotationInfo,
IndexedVec, NodeFeatures, SessionIndex, SessionInfo, ValidatorId, ValidatorIndex,
@@ -47,8 +47,8 @@ use pezkuwi_node_network_protocol::{
request_response::{outgoing::RequestError, v1 as request_v1, OutgoingResult},
PeerId,
};
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_node_subsystem_util::metrics::prometheus::prometheus::HistogramTimer;
use pezkuwi_pez_node_primitives::PoV;
use pezkuwi_primitives::{
CandidateHash, CandidateReceiptV2 as CandidateReceipt, CollatorId, Hash, HeadData,
Id as ParaId, PersistedValidationData,
@@ -37,7 +37,6 @@ use pezkuwi_node_network_protocol::{
v1 as protocol_v1, v2 as protocol_v2, CollationProtocols, OurView, PeerId,
UnifiedReputationChange as Rep, View,
};
use pezkuwi_pez_node_primitives::{SignedFullStatement, Statement};
use pezkuwi_node_subsystem::{
messages::{
CanSecondRequest, CandidateBackingMessage, CollatorProtocolMessage, IfDisconnected,
@@ -51,6 +50,7 @@ use pezkuwi_node_subsystem_util::{
reputation::{ReputationAggregator, REPUTATION_CHANGE_INTERVAL},
request_claim_queue, request_node_features, request_session_index_for_child,
};
use pezkuwi_pez_node_primitives::{SignedFullStatement, Statement};
use pezkuwi_primitives::{
node_features, CandidateDescriptorV2, CandidateDescriptorVersion, CandidateHash, CollatorId,
CoreIndex, Hash, HeadData, Id as ParaId, OccupiedCoreAssumption, PersistedValidationData,
@@ -874,9 +874,9 @@ async fn process_incoming_peer_message<Context>(
protocol_v2::CollatorProtocolMessage,
>,
) {
use pezsp_runtime::traits::AppVerify;
use protocol_v1::CollatorProtocolMessage as V1;
use protocol_v2::CollatorProtocolMessage as V2;
use pezsp_runtime::traits::AppVerify;
match msg {
CollationProtocols::V1(V1::Declare(collator_id, para_id, signature)) |
@@ -34,12 +34,12 @@ use pezkuwi_node_network_protocol::{
request_response::{Requests, ResponseSender},
ObservedRole,
};
use pezkuwi_pez_node_primitives::{BlockData, PoV};
use pezkuwi_node_subsystem::messages::{
AllMessages, ReportPeerMessage, RuntimeApiMessage, RuntimeApiRequest,
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_node_subsystem_util::{reputation::add_reputation, TimeoutExt};
use pezkuwi_pez_node_primitives::{BlockData, PoV};
use pezkuwi_primitives::{
node_features, CandidateReceiptV2 as CandidateReceipt, CollatorPair, CoreIndex,
GroupRotationInfo, HeadData, NodeFeatures, PersistedValidationData, ValidatorId,
@@ -33,12 +33,12 @@ use pezkuwi_node_subsystem_util::nesting_sender::NestingSender;
use pezsp_keystore::KeystorePtr;
use pezkuwi_node_network_protocol::request_response::{incoming::IncomingRequestReceiver, v1};
use pezkuwi_pez_node_primitives::DISPUTE_WINDOW;
use pezkuwi_node_subsystem::{
messages::DisputeDistributionMessage, overseer, FromOrchestra, OverseerSignal,
SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_util::{runtime, runtime::RuntimeInfo};
use pezkuwi_pez_node_primitives::DISPUTE_WINDOW;
/// ## The sender [`DisputeSender`]
///
@@ -38,12 +38,12 @@ use pezkuwi_node_network_protocol::{
},
PeerId, UnifiedReputationChange as Rep,
};
use pezkuwi_pez_node_primitives::DISPUTE_WINDOW;
use pezkuwi_node_subsystem::{
messages::{DisputeCoordinatorMessage, ImportStatementsResult},
overseer,
};
use pezkuwi_node_subsystem_util::{runtime, runtime::RuntimeInfo};
use pezkuwi_pez_node_primitives::DISPUTE_WINDOW;
use crate::{
metrics::{FAILED, SUCCEEDED},
@@ -17,9 +17,9 @@
//! Error handling related code and Error/Result definitions.
use pezkuwi_pez_node_primitives::disputes::DisputeMessageCheckError;
use pezkuwi_node_subsystem::SubsystemError;
use pezkuwi_node_subsystem_util::runtime;
use pezkuwi_pez_node_primitives::disputes::DisputeMessageCheckError;
#[allow(missing_docs)]
#[fatality::fatality(splitable)]
@@ -26,11 +26,11 @@ use futures::{channel::oneshot, future::poll_fn, Future};
use futures_timer::Delay;
use indexmap::{map::Entry, IndexMap};
use pezkuwi_node_network_protocol::request_response::v1::DisputeRequest;
use pezkuwi_pez_node_primitives::{DisputeMessage, DisputeStatus};
use pezkuwi_node_subsystem::{
messages::DisputeCoordinatorMessage, overseer, ActiveLeavesUpdate, SubsystemSender,
};
use pezkuwi_node_subsystem_util::{nesting_sender::NestingSender, runtime::RuntimeInfo};
use pezkuwi_pez_node_primitives::{DisputeMessage, DisputeStatus};
use pezkuwi_primitives::{CandidateHash, Hash, SessionIndex};
/// For each ongoing dispute we have a `SendTask` which takes care of it.
@@ -44,7 +44,6 @@ use pezkuwi_node_network_protocol::{
request_response::{v1::DisputeResponse, Recipient, Requests},
IfDisconnected,
};
use pezkuwi_pez_node_primitives::DisputeStatus;
use pezkuwi_node_subsystem::{
messages::{
AllMessages, DisputeCoordinatorMessage, DisputeDistributionMessage, ImportStatementsResult,
@@ -56,6 +55,7 @@ use pezkuwi_node_subsystem_test_helpers::{
mock::{make_ferdie_keystore, new_leaf},
subsystem_test_harness, TestSubsystemContextHandle,
};
use pezkuwi_pez_node_primitives::DisputeStatus;
use pezkuwi_primitives::{
AuthorityDiscoveryId, Block, CandidateHash, CandidateReceiptV2 as CandidateReceipt,
ExecutorParams, Hash, NodeFeatures, SessionIndex, SessionInfo,
@@ -591,8 +591,11 @@ async fn send_network_dispute_request(
message: DisputeRequest,
) -> oneshot::Receiver<pezsc_network::config::OutgoingResponse> {
let (pending_response, rx_response) = oneshot::channel();
let req =
pezsc_network::config::IncomingRequest { peer, payload: message.encode(), pending_response };
let req = pezsc_network::config::IncomingRequest {
peer,
payload: message.encode(),
pending_response,
};
req_tx.send(req).await.unwrap();
rx_response
}
@@ -31,9 +31,6 @@ use pezkuwi_node_network_protocol::{
v3::{self as protocol_v3, StatementFilter},
IfDisconnected, PeerId, UnifiedReputationChange as Rep, ValidationProtocols, View,
};
use pezkuwi_pez_node_primitives::{
SignedFullStatementWithPVD, StatementWithPVD as FullStatementWithPVD,
};
use pezkuwi_node_subsystem::{
messages::{
network_bridge_event::NewGossipTopology, CandidateBackingMessage, HypotheticalCandidate,
@@ -46,6 +43,9 @@ use pezkuwi_node_subsystem_util::{
backing_implicit_view::View as ImplicitView, reputation::ReputationAggregator,
request_min_backing_votes, request_node_features, runtime::ClaimQueueSnapshot,
};
use pezkuwi_pez_node_primitives::{
SignedFullStatementWithPVD, StatementWithPVD as FullStatementWithPVD,
};
use pezkuwi_primitives::{
node_features::FeatureIndex, transpose_claim_queue, AuthorityDiscoveryId,
CandidateDescriptorVersion, CandidateHash, CompactStatement, CoreIndex, GroupIndex,
@@ -24,7 +24,6 @@ use pezkuwi_node_network_protocol::{
v3::{BackedCandidateAcknowledgement, BackedCandidateManifest},
view, ObservedRole,
};
use pezkuwi_pez_node_primitives::{Statement, StatementWithPVD};
use pezkuwi_node_subsystem::messages::{
network_bridge_event::NewGossipTopology, AllMessages, ChainApiMessage, HypotheticalCandidate,
HypotheticalMembership, NetworkBridgeEvent, ProspectiveTeyrchainsMessage, ReportPeerMessage,
@@ -32,6 +31,7 @@ use pezkuwi_node_subsystem::messages::{
};
use pezkuwi_node_subsystem_test_helpers as test_helpers;
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_pez_node_primitives::{Statement, StatementWithPVD};
use pezkuwi_primitives::{
AssignmentPair, Block, BlockNumber, CommittedCandidateReceiptV2 as CommittedCandidateReceipt,
GroupRotationInfo, HeadData, Header, IndexedVec, NodeFeatures, PersistedValidationData,
@@ -23,7 +23,6 @@ use futures_timer::Delay;
use orchestra::async_trait;
use std::time::Duration;
use pezkuwi_pez_node_primitives::{BlockData, PoV};
use pezkuwi_node_subsystem_types::messages::{CandidateValidationMessage, PvfExecKind};
use pezkuwi_overseer::{
self as overseer,
@@ -31,6 +30,7 @@ use pezkuwi_overseer::{
gen::{FromOrchestra, SpawnedSubsystem},
HeadSupportsTeyrchains, SubsystemError,
};
use pezkuwi_pez_node_primitives::{BlockData, PoV};
use pezkuwi_primitives::{CandidateReceiptV2 as CandidateReceipt, Hash, PersistedValidationData};
use pezkuwi_primitives_test_helpers::{
dummy_candidate_descriptor_v2, dummy_hash, dummy_validation_code,
+4 -4
View File
@@ -21,14 +21,14 @@ use std::{collections::HashMap, sync::atomic, task::Poll};
use pezkuwi_node_network_protocol::{
peer_set::ValidationVersion, ObservedRole, PeerId, UnifiedReputationChange,
};
use pezkuwi_pez_node_primitives::{
BlockData, CollationGenerationConfig, CollationResult, DisputeMessage, InvalidDisputeVote, PoV,
UncheckedDisputeMessage, ValidDisputeVote,
};
use pezkuwi_node_subsystem_test_helpers::mock::{dummy_unpin_handle, new_leaf};
use pezkuwi_node_subsystem_types::messages::{
NetworkBridgeEvent, PvfExecKind, ReportPeerMessage, RuntimeApiRequest,
};
use pezkuwi_pez_node_primitives::{
BlockData, CollationGenerationConfig, CollationResult, DisputeMessage, InvalidDisputeVote, PoV,
UncheckedDisputeMessage, ValidDisputeVote,
};
use pezkuwi_primitives::{
CandidateHash, CandidateReceiptV2, CollatorPair, Id as ParaId, InvalidDisputeStatementKind,
PersistedValidationData, SessionIndex, ValidDisputeStatementKind, ValidatorIndex,
+6 -8
View File
@@ -155,10 +155,9 @@ fn zagros_sign_call(
pezframe_system::CheckSpecVersion::<runtime::Runtime>::new(),
pezframe_system::CheckTxVersion::<runtime::Runtime>::new(),
pezframe_system::CheckGenesis::<runtime::Runtime>::new(),
pezframe_system::CheckMortality::<runtime::Runtime>::from(pezsp_runtime::generic::Era::mortal(
period,
current_block,
)),
pezframe_system::CheckMortality::<runtime::Runtime>::from(
pezsp_runtime::generic::Era::mortal(period, current_block),
),
pezframe_system::CheckNonce::<runtime::Runtime>::from(nonce),
pezframe_system::CheckWeight::<runtime::Runtime>::new(),
pezpallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
@@ -214,10 +213,9 @@ fn pezkuwichain_sign_call(
pezframe_system::CheckSpecVersion::<runtime::Runtime>::new(),
pezframe_system::CheckTxVersion::<runtime::Runtime>::new(),
pezframe_system::CheckGenesis::<runtime::Runtime>::new(),
pezframe_system::CheckMortality::<runtime::Runtime>::from(pezsp_runtime::generic::Era::mortal(
period,
current_block,
)),
pezframe_system::CheckMortality::<runtime::Runtime>::from(
pezsp_runtime::generic::Era::mortal(period, current_block),
),
pezframe_system::CheckNonce::<runtime::Runtime>::from(nonce),
pezframe_system::CheckWeight::<runtime::Runtime>::new(),
pezpallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
+4 -3
View File
@@ -29,9 +29,8 @@ use crate::{
teyrchains_db, workers, Chain, Error, FullBackend, FullClient, IdentifyVariant,
IsTeyrchainNode, GRANDPA_JUSTIFICATION_PERIOD, KEEP_FINALIZED_FOR_LIVE_NETWORKS,
};
use pezframe_benchmarking_cli::BIZINIKIWI_REFERENCE_HARDWARE;
use gum::info;
use pezmmr_gadget::MmrGadget;
use pezframe_benchmarking_cli::BIZINIKIWI_REFERENCE_HARDWARE;
use pezkuwi_availability_recovery::FETCH_CHUNKS_THRESHOLD;
use pezkuwi_node_core_approval_voting::Config as ApprovalVotingConfig;
use pezkuwi_node_core_av_store::Config as AvailabilityConfig;
@@ -47,6 +46,7 @@ use pezkuwi_node_network_protocol::{
use pezkuwi_node_subsystem_types::DefaultSubsystemClient;
use pezkuwi_overseer::{Handle, OverseerConnector};
use pezkuwi_primitives::Block;
use pezmmr_gadget::MmrGadget;
use pezsc_client_api::Backend;
use pezsc_network::config::FullNetworkConfiguration;
use pezsc_network_sync::WarpSyncConfig;
@@ -237,7 +237,8 @@ where
// the block authoring backoff is disabled by default on production networks
None
} else {
let mut backoff = pezsc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default();
let mut backoff =
pezsc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging::default();
if config.chain_spec.is_pezkuwichain() ||
config.chain_spec.is_versi() ||
+3 -1
View File
@@ -25,7 +25,9 @@ use crate::{
use pezkuwi_primitives::Block;
use pezsc_consensus_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider;
use pezsc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
use pezsc_service::{Configuration, Error as BizinikiwiServiceError, KeystoreContainer, TaskManager};
use pezsc_service::{
Configuration, Error as BizinikiwiServiceError, KeystoreContainer, TaskManager,
};
use pezsc_telemetry::{Telemetry, TelemetryWorker, TelemetryWorkerHandle};
use pezsc_transaction_pool_api::OffchainTransactionPoolFactory;
use pezsp_consensus::SelectChain;
+1 -1
View File
@@ -19,7 +19,6 @@
//! These are used to provide a type that implements these runtime APIs without requiring to import
//! the native runtimes.
use pezpallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pezkuwi_primitives::{
runtime_api, slashing, AccountId, AuthorityDiscoveryId, Balance, Block, BlockNumber,
CandidateCommitments, CandidateEvent, CandidateHash,
@@ -29,6 +28,7 @@ use pezkuwi_primitives::{
ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash,
ValidatorId, ValidatorIndex, ValidatorSignature,
};
use pezpallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pezsp_consensus_beefy::ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature};
use pezsp_consensus_grandpa::AuthorityId as GrandpaId;
+13 -7
View File
@@ -61,17 +61,17 @@ use pezkuwi_overseer::SpawnGlue;
pub use {
pezkuwi_overseer::{Handle, Overseer, OverseerConnector, OverseerHandle},
pezkuwi_primitives::runtime_api::TeyrchainHost,
relay_chain_selection::SelectRelayChain,
pezsc_client_api::AuxStore,
pezsp_authority_discovery::AuthorityDiscoveryApi,
pezsp_blockchain::{HeaderBackend, HeaderMetadata},
pezsp_consensus_babe::BabeApi,
relay_chain_selection::SelectRelayChain,
};
use std::{path::PathBuf, sync::Arc};
use prometheus_endpoint::Registry;
use pezsc_service::SpawnTaskHandle;
use prometheus_endpoint::Registry;
pub use chain_spec::{GenericChainSpec, PezkuwichainChainSpec, ZagrosChainSpec};
pub use pezkuwi_primitives::{Block, BlockId, BlockNumber, CollatorPair, Hash, Id as ParaId};
@@ -105,7 +105,10 @@ pub type FullBackend = pezsc_service::TFullBackend<Block>;
pub type FullClient = pezsc_service::TFullClient<
Block,
RuntimeApi,
WasmExecutor<(pezsp_io::BizinikiwiHostFunctions, pezframe_benchmarking::benchmarking::HostFunctions)>,
WasmExecutor<(
pezsp_io::BizinikiwiHostFunctions,
pezframe_benchmarking::benchmarking::HostFunctions,
)>,
>;
/// The minimum period of blocks on which justifications will be
@@ -399,8 +402,9 @@ macro_rules! chain_ops {
// use the longest chain selection, since there is no overseer available
let chain_selection = LongestChain::new(basics.backend.clone());
let pezsc_service::PartialComponents { client, backend, import_queue, task_manager, .. } =
new_partial::<LongestChain<_, Block>>(&mut config, basics, chain_selection)?;
let pezsc_service::PartialComponents {
client, backend, import_queue, task_manager, ..
} = new_partial::<LongestChain<_, Block>>(&mut config, basics, chain_selection)?;
Ok((client, backend, import_queue, task_manager))
}};
}
@@ -409,8 +413,10 @@ macro_rules! chain_ops {
#[cfg(feature = "full-node")]
pub fn new_chain_ops(
config: &mut Configuration,
) -> Result<(Arc<FullClient>, Arc<FullBackend>, pezsc_consensus::BasicQueue<Block>, TaskManager), Error>
{
) -> Result<
(Arc<FullClient>, Arc<FullBackend>, pezsc_consensus::BasicQueue<Block>, TaskManager),
Error,
> {
config.keystore = pezsc_service::config::KeystoreConfig::InMemory;
if config.chain_spec.is_pezkuwichain() || config.chain_spec.is_versi() {
@@ -37,13 +37,13 @@
use super::{HeaderProvider, HeaderProviderProvider};
use futures::channel::oneshot;
use pezkuwi_pez_node_primitives::MAX_FINALITY_LAG as PRIMITIVES_MAX_FINALITY_LAG;
use pezkuwi_node_subsystem::messages::{
ApprovalVotingParallelMessage, ChainSelectionMessage, DisputeCoordinatorMessage,
HighestApprovedAncestorBlock,
};
use pezkuwi_node_subsystem_util::metrics::{self, prometheus};
use pezkuwi_overseer::{AllMessages, Handle, PriorityLevel};
use pezkuwi_pez_node_primitives::MAX_FINALITY_LAG as PRIMITIVES_MAX_FINALITY_LAG;
use pezkuwi_primitives::{Block as PezkuwiBlock, BlockNumber, Hash, Header as PezkuwiHeader};
use pezsp_consensus::{Error as ConsensusError, SelectChain};
use std::sync::Arc;
+1 -1
View File
@@ -17,10 +17,10 @@
use super::{relay_chain_selection::*, *};
use futures::channel::oneshot::Receiver;
use pezkuwi_pez_node_primitives::approval::v2::VrfSignature;
use pezkuwi_node_subsystem::messages::{AllMessages, BlockDescription};
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_overseer::{HighPriority, PriorityLevel};
use pezkuwi_pez_node_primitives::approval::v2::VrfSignature;
use pezkuwi_test_client::Sr25519Keyring;
use pezsp_consensus_babe::{
digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest},
@@ -20,7 +20,6 @@ use pezkuwi_node_network_protocol::{
grid_topology::{SessionGridTopology, TopologyPeerInfo},
View,
};
use pezkuwi_pez_node_primitives::approval::time::{Clock, SystemClock, Tick};
use pezkuwi_node_subsystem::messages::{
ApprovalDistributionMessage, ApprovalVotingParallelMessage,
};
@@ -28,13 +27,12 @@ use pezkuwi_node_subsystem_types::messages::{
network_bridge_event::NewGossipTopology, NetworkBridgeEvent,
};
use pezkuwi_overseer::AllMessages;
use pezkuwi_pez_node_primitives::approval::time::{Clock, SystemClock, Tick};
use pezkuwi_primitives::{
BlockNumber, CandidateEvent, CandidateReceiptV2, CoreIndex, GroupIndex, Hash, Header,
Id as ParaId, MutateDescriptorV2, Slot, ValidatorIndex,
};
use pezkuwi_primitives_test_helpers::dummy_candidate_receipt_v2_bad_sig;
use rand::{seq::SliceRandom, SeedableRng};
use rand_chacha::ChaCha20Rng;
use pezsc_network_types::PeerId;
use pezsp_consensus_babe::{
digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest},
@@ -43,6 +41,8 @@ use pezsp_consensus_babe::{
use pezsp_core::crypto::VrfSecret;
use pezsp_keyring::sr25519::Keyring as Sr25519Keyring;
use pezsp_runtime::{Digest, DigestItem};
use rand::{seq::SliceRandom, SeedableRng};
use rand_chacha::ChaCha20Rng;
use std::sync::{atomic::AtomicU64, Arc};
/// A fake system clock used for driving the approval voting and make
@@ -43,17 +43,17 @@ use pezkuwi_primitives::{
ApprovalVoteMultipleCandidates, CandidateEvent, CandidateHash, CandidateIndex, CoreIndex, Hash,
SessionInfo, Slot, ValidatorId, ValidatorIndex, ASSIGNMENT_KEY_TYPE_ID,
};
use rand::{seq::SliceRandom, RngCore, SeedableRng};
use rand_chacha::ChaCha20Rng;
use rand_distr::{Distribution, Normal};
use pezsc_keystore::LocalKeystore;
use pezsc_network_types::PeerId;
use pezsc_service::SpawnTaskHandle;
use sha1::Digest;
use pezsp_application_crypto::AppCrypto;
use pezsp_consensus_babe::SlotDuration;
use pezsp_keystore::Keystore;
use pezsp_timestamp::Timestamp;
use rand::{seq::SliceRandom, RngCore, SeedableRng};
use rand_chacha::ChaCha20Rng;
use rand_distr::{Distribution, Normal};
use sha1::Digest;
use std::{
cmp::max,
collections::{BTreeMap, HashSet},
@@ -16,9 +16,11 @@
use crate::approval::{ApprovalTestState, PastSystemClock, LOG_TARGET, SLOT_DURATION_MILLIS};
use futures::FutureExt;
use pezkuwi_pez_node_primitives::approval::time::{slot_number_to_tick, Clock, TICK_DURATION_MILLIS};
use pezkuwi_node_subsystem::{overseer, SpawnedSubsystem, SubsystemError};
use pezkuwi_node_subsystem_types::messages::ChainSelectionMessage;
use pezkuwi_pez_node_primitives::approval::time::{
slot_number_to_tick, Clock, TICK_DURATION_MILLIS,
};
/// Mock ChainSelection subsystem used to answer request made by the approval-voting subsystem,
/// during benchmark. All the necessary information to answer the requests is stored in the `state`
@@ -58,25 +58,25 @@ use pezkuwi_node_core_approval_voting::{
ApprovalVotingSubsystem, Config as ApprovalVotingConfig, RealAssignmentCriteria,
};
use pezkuwi_node_network_protocol::v3 as protocol_v3;
use pezkuwi_pez_node_primitives::approval::{self, v1::RelayVRFStory};
use pezkuwi_node_subsystem::{
messages::{ApprovalDistributionMessage, ApprovalVotingMessage, ApprovalVotingParallelMessage},
overseer, AllMessages, Overseer, OverseerConnector, SpawnGlue,
};
use pezkuwi_node_subsystem_test_helpers::mock::new_block_import_info;
use pezkuwi_overseer::Handle as OverseerHandleReal;
use pezkuwi_pez_node_primitives::approval::{self, v1::RelayVRFStory};
use pezkuwi_primitives::{
BlockNumber, CandidateEvent, CandidateIndex, CandidateReceiptV2 as CandidateReceipt, Hash,
Header, Slot, ValidatorId, ValidatorIndex, ASSIGNMENT_KEY_TYPE_ID,
};
use prometheus::Registry;
use pezsc_keystore::LocalKeystore;
use pezsc_service::SpawnTaskHandle;
use serde::{Deserialize, Serialize};
use pezsp_application_crypto::AppCrypto;
use pezsp_consensus_babe::Epoch as BabeEpoch;
use pezsp_core::H256;
use pezsp_keystore::Keystore;
use prometheus::Registry;
use serde::{Deserialize, Serialize};
use std::{
cmp::max,
collections::{HashMap, HashSet},
@@ -27,12 +27,12 @@ use pezkuwi_node_network_protocol::{
request_response::{v2::ChunkFetchingRequest, ReqProtocolNames},
ValidationProtocols, VersionedValidationProtocol,
};
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, ErasureChunk, PoV};
use pezkuwi_node_subsystem_test_helpers::{
derive_erasure_chunks_with_proofs_and_root, mock::new_block_import_info,
};
use pezkuwi_node_subsystem_util::availability_chunks::availability_chunk_indices;
use pezkuwi_overseer::BlockInfo;
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, ErasureChunk, PoV};
use pezkuwi_primitives::{
AvailabilityBitfield, BlockNumber, CandidateHash, CandidateReceiptV2 as CandidateReceipt,
ChunkIndex, CoreIndex, Hash, HeadData, Header, PersistedValidationData, Signed, SigningContext,
@@ -20,13 +20,13 @@ use crate::keyring::Keyring;
use itertools::Itertools;
use pezkuwi_node_network_protocol::authority_discovery::AuthorityDiscovery;
use pezkuwi_primitives::{AssignmentId, AuthorityDiscoveryId, ValidatorId, ValidatorPair};
use rand::thread_rng;
use rand_distr::{Distribution, Normal, Uniform};
use pezsc_network::Multiaddr;
use pezsc_network_types::PeerId;
use serde::{Deserialize, Serialize};
use pezsp_consensus_babe::AuthorityId;
use pezsp_core::Pair;
use rand::thread_rng;
use rand_distr::{Distribution, Normal, Uniform};
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet};
/// Peer networking latency configuration.
@@ -59,9 +59,9 @@ use pezkuwi_primitives::{AuthorityDiscoveryId, Block, Hash, ValidatorId};
use pezsc_keystore::LocalKeystore;
use pezsc_network::request_responses::IncomingRequest as RawIncomingRequest;
use pezsc_service::SpawnTaskHandle;
use serde::{Deserialize, Serialize};
use pezsp_keystore::Keystore;
use pezsp_runtime::RuntimeAppPublic;
use serde::{Deserialize, Serialize};
use std::{sync::Arc, time::Instant};
pub use test_state::TestState;
@@ -24,11 +24,11 @@ use pezkuwi_node_network_protocol::request_response::{
v1::{DisputeRequest, DisputeResponse},
ProtocolName, Requests,
};
use pezkuwi_node_subsystem_test_helpers::mock::new_block_import_info;
use pezkuwi_overseer::BlockInfo;
use pezkuwi_pez_node_primitives::{
InvalidDisputeVote, SignedDisputeStatement, UncheckedDisputeMessage, ValidDisputeVote,
};
use pezkuwi_node_subsystem_test_helpers::mock::new_block_import_info;
use pezkuwi_overseer::BlockInfo;
use pezkuwi_primitives::{
AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
CandidateReceiptV2, CoreIndex, GroupIndex, Hash, HeadData, Header, InvalidDisputeStatementKind,
@@ -23,11 +23,11 @@ use pezkuwi_node_network_protocol::request_response::{
v1::AvailableDataFetchingResponse, v2::ChunkFetchingResponse, Protocol, ReqProtocolNames,
Requests,
};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_node_subsystem::{
messages::AvailabilityStoreMessage, overseer, SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_types::OverseerSignal;
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk};
use pezkuwi_primitives::{CandidateHash, ChunkIndex, CoreIndex, ValidatorIndex};
use std::collections::HashMap;
@@ -19,11 +19,11 @@
use std::sync::Arc;
use futures::FutureExt;
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV};
use pezkuwi_node_subsystem::{
messages::AvailabilityRecoveryMessage, overseer, SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_types::OverseerSignal;
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV};
use pezkuwi_primitives::{Hash, HeadData, PersistedValidationData};
const LOG_TARGET: &str = "subsystem-bench::availability-recovery-mock";
@@ -18,11 +18,11 @@
use crate::{configuration::TestConfiguration, NODE_UNDER_TEST};
use futures::FutureExt;
use pezkuwi_pez_node_primitives::{SignedFullStatementWithPVD, Statement, StatementWithPVD};
use pezkuwi_node_subsystem::{
messages::CandidateBackingMessage, overseer, SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_types::OverseerSignal;
use pezkuwi_pez_node_primitives::{SignedFullStatementWithPVD, Statement, StatementWithPVD};
use pezkuwi_primitives::{
CandidateHash, Hash, PersistedValidationData, SigningContext, ValidatorIndex, ValidatorPair,
};
@@ -18,11 +18,11 @@
//! is responding with candidate valid for every request.
use futures::FutureExt;
use pezkuwi_pez_node_primitives::ValidationResult;
use pezkuwi_node_subsystem::{
messages::CandidateValidationMessage, overseer, SpawnedSubsystem, SubsystemError,
};
use pezkuwi_node_subsystem_types::OverseerSignal;
use pezkuwi_pez_node_primitives::ValidationResult;
use pezkuwi_primitives::{CandidateCommitments, Hash, HeadData, PersistedValidationData};
const LOG_TARGET: &str = "subsystem-bench::candidate-validation-mock";
@@ -64,14 +64,14 @@ use pezkuwi_node_subsystem_util::metrics::prometheus::{
};
use pezkuwi_overseer::AllMessages;
use pezkuwi_primitives::AuthorityDiscoveryId;
use prometheus_endpoint::U64;
use rand::{seq::SliceRandom, thread_rng};
use pezsc_network::{
request_responses::{IncomingRequest, OutgoingResponse},
RequestFailure,
};
use pezsc_network_types::PeerId;
use pezsc_service::SpawnTaskHandle;
use prometheus_endpoint::U64;
use rand::{seq::SliceRandom, thread_rng};
use std::{
collections::HashMap,
sync::Arc,
@@ -35,11 +35,11 @@ use pezkuwi_node_network_protocol::{
},
ValidationProtocols,
};
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV};
use pezkuwi_node_subsystem_test_helpers::{
derive_erasure_chunks_with_proofs_and_root, mock::new_block_import_info,
};
use pezkuwi_overseer::BlockInfo;
use pezkuwi_pez_node_primitives::{AvailableData, BlockData, PoV};
use pezkuwi_primitives::MutateDescriptorV2;
@@ -19,12 +19,12 @@
#![warn(missing_docs)]
use pezkuwi_erasure_coding::{branches, obtain_chunks_v1 as obtain_chunks};
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk, Proof};
use pezkuwi_node_subsystem::{
messages::AllMessages, overseer, FromOrchestra, OverseerSignal, SpawnGlue, SpawnedSubsystem,
SubsystemError, SubsystemResult, TrySendError,
};
use pezkuwi_node_subsystem_util::TimeoutExt;
use pezkuwi_pez_node_primitives::{AvailableData, ErasureChunk, Proof};
use pezkuwi_primitives::{ChunkIndex, Hash};
use futures::{channel::mpsc, poll, prelude::*};
@@ -17,8 +17,8 @@
//! `ControlledValidatorIndices` implementation.
use pezkuwi_primitives::{IndexedVec, SessionIndex, ValidatorId, ValidatorIndex};
use schnellru::{ByLength, LruMap};
use pezsp_keystore::KeystorePtr;
use schnellru::{ByLength, LruMap};
/// Keeps track of the validator indices controlled by the local validator in a given session. For
/// better performance, the values for each session are cached.
+1 -1
View File
@@ -49,10 +49,10 @@ use pezkuwi_primitives::{
SessionInfo, Signed, SigningContext, ValidationCode, ValidationCodeHash, ValidatorId,
ValidatorIndex, ValidatorSignature,
};
pub use rand;
use pezsp_application_crypto::AppCrypto;
use pezsp_core::ByteArray;
use pezsp_keystore::{Error as KeystoreError, KeystorePtr};
pub use rand;
use std::{
collections::{BTreeMap, VecDeque},
time::Duration,
+5 -2
View File
@@ -24,18 +24,21 @@ use pezkuwi_primitives::Block;
use pezsp_runtime::BuildStorage;
use std::sync::Arc;
pub use bizinikiwi_test_client::*;
pub use block_builder::*;
pub use pezkuwi_test_runtime as runtime;
pub use pezkuwi_test_service::{
construct_extrinsic, construct_transfer_extrinsic, Client, FullBackend,
};
pub use bizinikiwi_test_client::*;
/// Test client executor.
pub type Executor = client::LocalCallExecutor<
Block,
FullBackend,
WasmExecutor<(pezsp_io::BizinikiwiHostFunctions, pezframe_benchmarking::benchmarking::HostFunctions)>,
WasmExecutor<(
pezsp_io::BizinikiwiHostFunctions,
pezframe_benchmarking::benchmarking::HostFunctions,
)>,
>;
/// Test client builder for Pezkuwi.
+1 -1
View File
@@ -16,13 +16,13 @@
//! Chain specifications for the test runtime.
use pezpallet_staking::Forcing;
use pezkuwi_primitives::{
node_features, AccountId, AssignmentId, NodeFeatures, SchedulerParams, ValidatorId,
MAX_CODE_SIZE, MAX_POV_SIZE,
};
use pezkuwi_service::chain_spec::Extensions;
use pezkuwi_test_runtime::BABE_GENESIS_EPOCH_CONFIG;
use pezpallet_staking::Forcing;
use pezsc_chain_spec::{ChainSpec, ChainType};
use pezsc_consensus_grandpa::AuthorityId as GrandpaId;
use pezsp_authority_discovery::AuthorityId as AuthorityDiscoveryId;

Some files were not shown because too many files have changed in this diff Show More