mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Re-export current primitives in crate root (#6487)
* Re-export current primitives in crate root * Add missing exports * restart CI
This commit is contained in:
@@ -2,7 +2,7 @@ use polkadot_erasure_coding::*;
|
||||
use primitives::{AvailableData, BlockData, PoV};
|
||||
use std::sync::Arc;
|
||||
use honggfuzz::fuzz;
|
||||
use polkadot_primitives::v2::PersistedValidationData;
|
||||
use polkadot_primitives::PersistedValidationData;
|
||||
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_node_primitives::{AvailableData, Proof};
|
||||
use polkadot_primitives::v2::{BlakeTwo256, Hash as H256, HashT};
|
||||
use polkadot_primitives::{BlakeTwo256, Hash as H256, HashT};
|
||||
use sp_core::Blake2Hasher;
|
||||
use sp_trie::{
|
||||
trie_types::{TrieDBBuilder, TrieDBMutBuilderV0 as TrieDBMutBuilder},
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Code related to benchmarking a [`crate::Client`].
|
||||
|
||||
use polkadot_primitives::v2::{AccountId, Balance};
|
||||
use polkadot_primitives::{AccountId, Balance};
|
||||
use sp_core::{Pair, H256};
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
use sp_runtime::OpaqueExtrinsic;
|
||||
@@ -361,14 +361,14 @@ pub fn benchmark_inherent_data(
|
||||
let timestamp = sp_timestamp::InherentDataProvider::new(d.into());
|
||||
futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data))?;
|
||||
|
||||
let para_data = polkadot_primitives::v2::InherentData {
|
||||
let para_data = polkadot_primitives::InherentData {
|
||||
bitfields: Vec::new(),
|
||||
backed_candidates: Vec::new(),
|
||||
disputes: Vec::new(),
|
||||
parent_header: header,
|
||||
};
|
||||
|
||||
inherent_data.put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, ¶_data)?;
|
||||
inherent_data.put_data(polkadot_primitives::PARACHAINS_INHERENT_IDENTIFIER, ¶_data)?;
|
||||
|
||||
Ok(inherent_data)
|
||||
}
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
//! There is also the [`Client`] enum that combines all the different clients into one common structure.
|
||||
|
||||
use polkadot_primitives::{
|
||||
runtime_api::ParachainHost,
|
||||
v2::{AccountId, Balance, Block, BlockNumber, Hash, Header, Nonce},
|
||||
runtime_api::ParachainHost, AccountId, Balance, Block, BlockNumber, Hash, Header, Nonce,
|
||||
};
|
||||
use sc_client_api::{AuxStore, Backend as BackendT, BlockchainEvents, KeyIterator, UsageProvider};
|
||||
use sc_executor::NativeElseWasmExecutor;
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_subsystem_util::{
|
||||
request_availability_cores, request_persisted_validation_data, request_validation_code,
|
||||
request_validation_code_hash, request_validators,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
collator_signature_payload, CandidateCommitments, CandidateDescriptor, CandidateReceipt,
|
||||
CoreState, Hash, Id as ParaId, OccupiedCoreAssumption, PersistedValidationData,
|
||||
ValidationCodeHash,
|
||||
|
||||
@@ -32,7 +32,7 @@ mod handle_new_activations {
|
||||
use polkadot_node_subsystem_test_helpers::{
|
||||
subsystem_test_harness, TestSubsystemContextHandle,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CollatorPair, Id as ParaId, PersistedValidationData, ScheduledCore, ValidationCode,
|
||||
};
|
||||
use std::pin::Pin;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use bitvec::{order::Lsb0 as BitOrderLsb0, slice::BitSlice};
|
||||
use polkadot_node_primitives::approval::DelayTranche;
|
||||
use polkadot_primitives::v2::ValidatorIndex;
|
||||
use polkadot_primitives::ValidatorIndex;
|
||||
|
||||
use crate::{
|
||||
persisted_entries::{ApprovalEntry, CandidateEntry, TrancheEntry},
|
||||
@@ -460,7 +460,7 @@ mod tests {
|
||||
use crate::{approval_db, BTreeMap};
|
||||
use ::test_helpers::{dummy_candidate_receipt, dummy_hash};
|
||||
use bitvec::{bitvec, order::Lsb0 as BitOrderLsb0, vec::BitVec};
|
||||
use polkadot_primitives::v2::GroupIndex;
|
||||
use polkadot_primitives::GroupIndex;
|
||||
|
||||
#[test]
|
||||
fn pending_is_not_approved() {
|
||||
|
||||
@@ -20,7 +20,7 @@ use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_node_primitives::approval::{AssignmentCert, DelayTranche};
|
||||
use polkadot_node_subsystem::{SubsystemError, SubsystemResult};
|
||||
use polkadot_node_subsystem_util::database::{DBTransaction, Database};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateHash, CandidateReceipt, CoreIndex, GroupIndex, Hash, SessionIndex,
|
||||
ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ use crate::{
|
||||
ops::{add_block_entry, canonicalize, force_approve, NewCandidateInfo},
|
||||
};
|
||||
use polkadot_node_subsystem_util::database::Database;
|
||||
use polkadot_primitives::v2::Id as ParaId;
|
||||
use polkadot_primitives::Id as ParaId;
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use ::test_helpers::{dummy_candidate_receipt, dummy_candidate_receipt_bad_sig, dummy_hash};
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//! before any commit to the underlying storage is made.
|
||||
|
||||
use polkadot_node_subsystem::SubsystemResult;
|
||||
use polkadot_primitives::v2::{BlockNumber, CandidateHash, Hash};
|
||||
use polkadot_primitives::{BlockNumber, CandidateHash, Hash};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_node_primitives::approval::{
|
||||
self as approval_types, AssignmentCert, AssignmentCertKind, DelayTranche, RelayVRFStory,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AssignmentId, AssignmentPair, CandidateHash, CoreIndex, GroupIndex, IndexedVec, SessionInfo,
|
||||
ValidatorIndex,
|
||||
};
|
||||
@@ -553,7 +553,7 @@ fn is_in_backing_group(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use polkadot_node_primitives::approval::{VRFOutput, VRFProof};
|
||||
use polkadot_primitives::v2::{Hash, ASSIGNMENT_KEY_TYPE_ID};
|
||||
use polkadot_primitives::{Hash, ASSIGNMENT_KEY_TYPE_ID};
|
||||
use sp_application_crypto::sr25519;
|
||||
use sp_core::crypto::Pair as PairT;
|
||||
use sp_keyring::sr25519::Keyring as Sr25519Keyring;
|
||||
|
||||
@@ -44,7 +44,7 @@ use polkadot_node_subsystem_util::{
|
||||
determine_new_blocks,
|
||||
rolling_session_window::{RollingSessionWindow, SessionWindowUpdate},
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateEvent, CandidateHash, CandidateReceipt, ConsensusLog, CoreIndex,
|
||||
GroupIndex, Hash, Header, SessionIndex,
|
||||
};
|
||||
@@ -617,9 +617,7 @@ pub(crate) mod tests {
|
||||
use polkadot_node_subsystem::messages::{AllMessages, ApprovalVotingMessage};
|
||||
use polkadot_node_subsystem_test_helpers::make_subsystem_context;
|
||||
use polkadot_node_subsystem_util::database::Database;
|
||||
use polkadot_primitives::v2::{
|
||||
Id as ParaId, IndexedVec, SessionInfo, ValidatorId, ValidatorIndex,
|
||||
};
|
||||
use polkadot_primitives::{Id as ParaId, IndexedVec, SessionInfo, ValidatorId, ValidatorIndex};
|
||||
pub(crate) use sp_consensus_babe::{
|
||||
digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest},
|
||||
AllowedSlots, BabeEpochConfiguration, Epoch as BabeEpoch,
|
||||
@@ -683,21 +681,21 @@ pub(crate) mod tests {
|
||||
_config: &criteria::Config,
|
||||
_leaving_cores: Vec<(
|
||||
CandidateHash,
|
||||
polkadot_primitives::v2::CoreIndex,
|
||||
polkadot_primitives::v2::GroupIndex,
|
||||
polkadot_primitives::CoreIndex,
|
||||
polkadot_primitives::GroupIndex,
|
||||
)>,
|
||||
) -> HashMap<polkadot_primitives::v2::CoreIndex, criteria::OurAssignment> {
|
||||
) -> HashMap<polkadot_primitives::CoreIndex, criteria::OurAssignment> {
|
||||
HashMap::new()
|
||||
}
|
||||
|
||||
fn check_assignment_cert(
|
||||
&self,
|
||||
_claimed_core_index: polkadot_primitives::v2::CoreIndex,
|
||||
_validator_index: polkadot_primitives::v2::ValidatorIndex,
|
||||
_claimed_core_index: polkadot_primitives::CoreIndex,
|
||||
_validator_index: polkadot_primitives::ValidatorIndex,
|
||||
_config: &criteria::Config,
|
||||
_relay_vrf_story: polkadot_node_primitives::approval::RelayVRFStory,
|
||||
_assignment: &polkadot_node_primitives::approval::AssignmentCert,
|
||||
_backing_group: polkadot_primitives::v2::GroupIndex,
|
||||
_backing_group: polkadot_primitives::GroupIndex,
|
||||
) -> Result<polkadot_node_primitives::approval::DelayTranche, criteria::InvalidAssignment> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ use polkadot_node_subsystem_util::{
|
||||
},
|
||||
TimeoutExt,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
ApprovalVote, BlockNumber, CandidateHash, CandidateIndex, CandidateReceipt, DisputeStatement,
|
||||
GroupIndex, Hash, SessionIndex, SessionInfo, ValidDisputeStatementKind, ValidatorId,
|
||||
ValidatorIndex, ValidatorPair, ValidatorSignature,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
use polkadot_node_subsystem::{SubsystemError, SubsystemResult};
|
||||
|
||||
use bitvec::order::Lsb0 as BitOrderLsb0;
|
||||
use polkadot_primitives::v2::{BlockNumber, CandidateHash, CandidateReceipt, GroupIndex, Hash};
|
||||
use polkadot_primitives::{BlockNumber, CandidateHash, CandidateReceipt, GroupIndex, Hash};
|
||||
|
||||
use std::collections::{hash_map::Entry, BTreeMap, HashMap};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! data and logic are intertwined.
|
||||
|
||||
use polkadot_node_primitives::approval::{AssignmentCert, DelayTranche, RelayVRFStory};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateHash, CandidateReceipt, CoreIndex, GroupIndex, Hash, SessionIndex,
|
||||
ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ use polkadot_node_subsystem::{
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_overseer::HeadSupportsParachains;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateCommitments, CandidateEvent, CoreIndex, GroupIndex, Header, Id as ParaId, IndexedVec,
|
||||
ValidationCode, ValidatorSignature,
|
||||
};
|
||||
@@ -227,7 +227,7 @@ struct MockAssignmentCriteria<Compute, Check>(Compute, Check);
|
||||
|
||||
impl<Compute, Check> AssignmentCriteria for MockAssignmentCriteria<Compute, Check>
|
||||
where
|
||||
Compute: Fn() -> HashMap<polkadot_primitives::v2::CoreIndex, criteria::OurAssignment>,
|
||||
Compute: Fn() -> HashMap<polkadot_primitives::CoreIndex, criteria::OurAssignment>,
|
||||
Check: Fn(ValidatorIndex) -> Result<DelayTranche, criteria::InvalidAssignment>,
|
||||
{
|
||||
fn compute_assignments(
|
||||
@@ -237,31 +237,28 @@ where
|
||||
_config: &criteria::Config,
|
||||
_leaving_cores: Vec<(
|
||||
CandidateHash,
|
||||
polkadot_primitives::v2::CoreIndex,
|
||||
polkadot_primitives::v2::GroupIndex,
|
||||
polkadot_primitives::CoreIndex,
|
||||
polkadot_primitives::GroupIndex,
|
||||
)>,
|
||||
) -> HashMap<polkadot_primitives::v2::CoreIndex, criteria::OurAssignment> {
|
||||
) -> HashMap<polkadot_primitives::CoreIndex, criteria::OurAssignment> {
|
||||
self.0()
|
||||
}
|
||||
|
||||
fn check_assignment_cert(
|
||||
&self,
|
||||
_claimed_core_index: polkadot_primitives::v2::CoreIndex,
|
||||
_claimed_core_index: polkadot_primitives::CoreIndex,
|
||||
validator_index: ValidatorIndex,
|
||||
_config: &criteria::Config,
|
||||
_relay_vrf_story: polkadot_node_primitives::approval::RelayVRFStory,
|
||||
_assignment: &polkadot_node_primitives::approval::AssignmentCert,
|
||||
_backing_group: polkadot_primitives::v2::GroupIndex,
|
||||
_backing_group: polkadot_primitives::GroupIndex,
|
||||
) -> Result<polkadot_node_primitives::approval::DelayTranche, criteria::InvalidAssignment> {
|
||||
self.1(validator_index)
|
||||
}
|
||||
}
|
||||
|
||||
impl<F>
|
||||
MockAssignmentCriteria<
|
||||
fn() -> HashMap<polkadot_primitives::v2::CoreIndex, criteria::OurAssignment>,
|
||||
F,
|
||||
>
|
||||
MockAssignmentCriteria<fn() -> HashMap<polkadot_primitives::CoreIndex, criteria::OurAssignment>, F>
|
||||
{
|
||||
fn check_only(f: F) -> Self {
|
||||
MockAssignmentCriteria(Default::default, f)
|
||||
@@ -480,7 +477,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
|
||||
|
||||
let keystore = LocalKeystore::in_memory();
|
||||
let _ = keystore.sr25519_generate_new(
|
||||
polkadot_primitives::v2::PARACHAIN_KEY_TYPE_ID,
|
||||
polkadot_primitives::PARACHAIN_KEY_TYPE_ID,
|
||||
Some(&Sr25519Keyring::Alice.to_seed()),
|
||||
);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
};
|
||||
use polkadot_node_subsystem_util as util;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateEvent, CandidateHash, CandidateReceipt, Hash, Header, ValidatorIndex,
|
||||
};
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::{database::Database, TimeoutExt};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CandidateReceipt, CoreIndex, GroupIndex, HeadData, Header,
|
||||
PersistedValidationData, ValidatorId,
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ use futures::channel::{mpsc, oneshot};
|
||||
|
||||
use polkadot_node_subsystem::{messages::ValidationFailed, SubsystemError};
|
||||
use polkadot_node_subsystem_util::Error as UtilError;
|
||||
use polkadot_primitives::v2::BackedCandidate;
|
||||
use polkadot_primitives::BackedCandidate;
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ use polkadot_node_subsystem_util::{
|
||||
self as util, request_from_runtime, request_session_index_for_child, request_validator_groups,
|
||||
request_validators, Validator,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BackedCandidate, CandidateCommitments, CandidateHash, CandidateReceipt, CollatorId,
|
||||
CommittedCandidateReceipt, CoreIndex, CoreState, Hash, Id as ParaId, SigningContext,
|
||||
ValidatorId, ValidatorIndex, ValidatorSignature, ValidityAttestation,
|
||||
@@ -587,7 +587,7 @@ async fn make_pov_available(
|
||||
n_validators: usize,
|
||||
pov: Arc<PoV>,
|
||||
candidate_hash: CandidateHash,
|
||||
validation_data: polkadot_primitives::v2::PersistedValidationData,
|
||||
validation_data: polkadot_primitives::PersistedValidationData,
|
||||
expected_erasure_root: Hash,
|
||||
span: Option<&jaeger::Span>,
|
||||
) -> Result<Result<(), InvalidErasureRoot>, Error> {
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_subsystem::{
|
||||
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateDescriptor, CollatorId, GroupRotationInfo, HeadData, PersistedValidationData,
|
||||
ScheduledCore,
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ use polkadot_node_subsystem::{
|
||||
SpawnedSubsystem, SubsystemError, SubsystemResult, SubsystemSender,
|
||||
};
|
||||
use polkadot_node_subsystem_util::{self as util, Validator};
|
||||
use polkadot_primitives::v2::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex};
|
||||
use polkadot_primitives::{AvailabilityBitfield, CoreState, Hash, ValidatorIndex};
|
||||
use sp_keystore::{Error as KeystoreError, SyncCryptoStorePtr};
|
||||
use std::{collections::HashMap, iter::FromIterator, time::Duration};
|
||||
use wasm_timer::{Delay, Instant};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
use super::*;
|
||||
use futures::{executor::block_on, pin_mut, StreamExt};
|
||||
use polkadot_node_subsystem::messages::AllMessages;
|
||||
use polkadot_primitives::v2::{CandidateHash, OccupiedCore};
|
||||
use polkadot_primitives::{CandidateHash, OccupiedCore};
|
||||
use test_helpers::dummy_candidate_descriptor;
|
||||
|
||||
fn occupied_core(para_id: u32, candidate_hash: CandidateHash) -> CoreState {
|
||||
|
||||
@@ -39,7 +39,7 @@ use polkadot_node_subsystem::{
|
||||
SubsystemSender,
|
||||
};
|
||||
use polkadot_parachain::primitives::{ValidationParams, ValidationResult as WasmValidationResult};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateCommitments, CandidateDescriptor, CandidateReceipt, Hash, OccupiedCoreAssumption,
|
||||
PersistedValidationData, ValidationCode, ValidationCodeHash,
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ use polkadot_node_core_pvf::PrepareError;
|
||||
use polkadot_node_subsystem::messages::AllMessages;
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::reexports::SubsystemContext;
|
||||
use polkadot_primitives::v2::{HeadData, Id as ParaId, UpwardMessage};
|
||||
use polkadot_primitives::{HeadData, Id as ParaId, UpwardMessage};
|
||||
use sp_core::testing::TaskExecutor;
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ use polkadot_node_subsystem::{
|
||||
messages::ChainApiMessage, overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem,
|
||||
SubsystemError, SubsystemResult,
|
||||
};
|
||||
use polkadot_primitives::v2::Block;
|
||||
use polkadot_primitives::Block;
|
||||
|
||||
mod metrics;
|
||||
use self::metrics::Metrics;
|
||||
|
||||
@@ -6,7 +6,7 @@ use std::collections::BTreeMap;
|
||||
|
||||
use polkadot_node_primitives::BlockWeight;
|
||||
use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
|
||||
use polkadot_primitives::v2::{BlockNumber, Hash, Header};
|
||||
use polkadot_primitives::{BlockNumber, Hash, Header};
|
||||
use sp_blockchain::Info as BlockInfo;
|
||||
use sp_core::testing::TaskExecutor;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! [`Backend`], maintaining consistency between queries and temporary writes,
|
||||
//! before any commit to the underlying storage is made.
|
||||
|
||||
use polkadot_primitives::v2::{BlockNumber, Hash};
|
||||
use polkadot_primitives::{BlockNumber, Hash};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ use crate::{
|
||||
};
|
||||
|
||||
use polkadot_node_primitives::BlockWeight;
|
||||
use polkadot_primitives::v2::{BlockNumber, Hash};
|
||||
use polkadot_primitives::{BlockNumber, Hash};
|
||||
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use polkadot_node_subsystem_util::database::{DBTransaction, Database};
|
||||
|
||||
@@ -24,7 +24,7 @@ use polkadot_node_subsystem::{
|
||||
FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
};
|
||||
use polkadot_node_subsystem_util::database::Database;
|
||||
use polkadot_primitives::v2::{BlockNumber, ConsensusLog, Hash, Header};
|
||||
use polkadot_primitives::{BlockNumber, ConsensusLog, Hash, Header};
|
||||
|
||||
use futures::{channel::oneshot, future::Either, prelude::*};
|
||||
use parity_scale_codec::Error as CodecError;
|
||||
|
||||
@@ -39,7 +39,7 @@ use polkadot_node_subsystem::{
|
||||
jaeger, messages::AllMessages, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::v2::{BlakeTwo256, ConsensusLog, HashT};
|
||||
use polkadot_primitives::{BlakeTwo256, ConsensusLog, HashT};
|
||||
|
||||
#[derive(Default)]
|
||||
struct TestBackendInner {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
use polkadot_node_primitives::BlockWeight;
|
||||
use polkadot_node_subsystem::ChainApiError;
|
||||
use polkadot_primitives::v2::{BlockNumber, Hash};
|
||||
use polkadot_primitives::{BlockNumber, Hash};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//! before any commit to the underlying storage is made.
|
||||
|
||||
use polkadot_node_subsystem::SubsystemResult;
|
||||
use polkadot_primitives::v2::{CandidateHash, SessionIndex};
|
||||
use polkadot_primitives::{CandidateHash, SessionIndex};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use polkadot_node_primitives::DisputeStatus;
|
||||
use polkadot_node_subsystem::{SubsystemError, SubsystemResult};
|
||||
use polkadot_node_subsystem_util::database::{DBTransaction, Database};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CandidateReceipt, Hash, InvalidDisputeStatementKind, SessionIndex,
|
||||
ValidDisputeStatementKind, ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
@@ -373,7 +373,7 @@ mod tests {
|
||||
use super::*;
|
||||
use ::test_helpers::{dummy_candidate_receipt, dummy_hash};
|
||||
use polkadot_node_primitives::DISPUTE_WINDOW;
|
||||
use polkadot_primitives::v2::{Hash, Id as ParaId};
|
||||
use polkadot_primitives::{Hash, Id as ParaId};
|
||||
|
||||
fn make_db() -> DbBackend {
|
||||
let db = kvdb_memorydb::create(1);
|
||||
|
||||
@@ -32,7 +32,7 @@ use polkadot_node_primitives::{
|
||||
disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp,
|
||||
};
|
||||
use polkadot_node_subsystem_util::rolling_session_window::RollingSessionWindow;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateReceipt, DisputeStatement, IndexedVec, SessionIndex, SessionInfo,
|
||||
ValidDisputeStatementKind, ValidatorId, ValidatorIndex, ValidatorPair, ValidatorSignature,
|
||||
};
|
||||
@@ -188,15 +188,14 @@ impl CandidateVoteState<CandidateVotes> {
|
||||
|
||||
let n_validators = env.validators().len();
|
||||
|
||||
let supermajority_threshold =
|
||||
polkadot_primitives::v2::supermajority_threshold(n_validators);
|
||||
let supermajority_threshold = polkadot_primitives::supermajority_threshold(n_validators);
|
||||
|
||||
// We have a dispute, if we have votes on both sides:
|
||||
let is_disputed = !votes.invalid.is_empty() && !votes.valid.raw().is_empty();
|
||||
|
||||
let dispute_status = if is_disputed {
|
||||
let mut status = DisputeStatus::active();
|
||||
let byzantine_threshold = polkadot_primitives::v2::byzantine_threshold(n_validators);
|
||||
let byzantine_threshold = polkadot_primitives::byzantine_threshold(n_validators);
|
||||
let is_confirmed = votes.voted_indices().len() > byzantine_threshold;
|
||||
if is_confirmed {
|
||||
status = status.confirm();
|
||||
|
||||
@@ -38,7 +38,7 @@ use polkadot_node_subsystem::{
|
||||
use polkadot_node_subsystem_util::rolling_session_window::{
|
||||
RollingSessionWindow, SessionWindowUpdate, SessionsUnavailable,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateHash, CandidateReceipt, CompactStatement, DisputeStatement,
|
||||
DisputeStatementSet, Hash, ScrapedOnChainVotes, SessionIndex, SessionInfo,
|
||||
ValidDisputeStatementKind, ValidatorId, ValidatorIndex,
|
||||
|
||||
@@ -42,7 +42,7 @@ use polkadot_node_subsystem_util::{
|
||||
database::Database,
|
||||
rolling_session_window::{DatabaseParams, RollingSessionWindow},
|
||||
};
|
||||
use polkadot_primitives::v2::{DisputeStatement, ScrapedOnChainVotes, SessionInfo, ValidatorIndex};
|
||||
use polkadot_primitives::{DisputeStatement, ScrapedOnChainVotes, SessionInfo, ValidatorIndex};
|
||||
|
||||
use crate::{
|
||||
error::{FatalResult, JfyiError, Result},
|
||||
|
||||
@@ -31,7 +31,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActiveLeavesUpdate, RecoveryError,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::get_validation_code_by_hash;
|
||||
use polkadot_primitives::v2::{BlockNumber, CandidateHash, CandidateReceipt, Hash, SessionIndex};
|
||||
use polkadot_primitives::{BlockNumber, CandidateHash, CandidateReceipt, Hash, SessionIndex};
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use std::{cmp::Ordering, collections::BTreeMap};
|
||||
|
||||
use futures::channel::oneshot;
|
||||
use polkadot_node_subsystem::{messages::ChainApiMessage, overseer};
|
||||
use polkadot_primitives::v2::{BlockNumber, CandidateHash, CandidateReceipt, Hash, SessionIndex};
|
||||
use polkadot_primitives::{BlockNumber, CandidateHash, CandidateReceipt, Hash, SessionIndex};
|
||||
|
||||
use crate::{
|
||||
error::{FatalError, FatalResult, Result},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
use crate::ParticipationPriority;
|
||||
use ::test_helpers::{dummy_candidate_receipt, dummy_hash};
|
||||
use assert_matches::assert_matches;
|
||||
use polkadot_primitives::v2::{BlockNumber, Hash};
|
||||
use polkadot_primitives::{BlockNumber, Hash};
|
||||
|
||||
use super::{CandidateComparator, ParticipationRequest, QueueError, Queues};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ use polkadot_node_subsystem::{
|
||||
use polkadot_node_subsystem_test_helpers::{
|
||||
make_subsystem_context, TestSubsystemContext, TestSubsystemContextHandle,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlakeTwo256, CandidateCommitments, HashT, Header, PersistedValidationData, ValidationCode,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use polkadot_primitives::v2::{BlockNumber, CandidateHash};
|
||||
use polkadot_primitives::{BlockNumber, CandidateHash};
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
|
||||
/// Keeps `CandidateHash` in reference counted way.
|
||||
@@ -44,7 +44,7 @@ impl RefCountedCandidates {
|
||||
#[cfg(test)]
|
||||
mod ref_counted_candidates_tests {
|
||||
use super::*;
|
||||
use polkadot_primitives::v2::{BlakeTwo256, HashT};
|
||||
use polkadot_primitives::{BlakeTwo256, HashT};
|
||||
|
||||
#[test]
|
||||
fn element_is_removed_when_refcount_reaches_zero() {
|
||||
@@ -131,7 +131,7 @@ impl ScrapedCandidates {
|
||||
#[cfg(test)]
|
||||
mod scraped_candidates_tests {
|
||||
use super::*;
|
||||
use polkadot_primitives::v2::{BlakeTwo256, HashT};
|
||||
use polkadot_primitives::{BlakeTwo256, HashT};
|
||||
|
||||
#[test]
|
||||
fn stale_candidates_are_removed() {
|
||||
|
||||
@@ -25,7 +25,7 @@ use polkadot_node_subsystem::{
|
||||
SubsystemSender,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::{get_candidate_events, get_on_chain_votes};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateEvent, CandidateHash, CandidateReceipt, Hash, ScrapedOnChainVotes,
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ use polkadot_node_subsystem_test_helpers::{
|
||||
make_subsystem_context, TestSubsystemContext, TestSubsystemContextHandle, TestSubsystemSender,
|
||||
};
|
||||
use polkadot_node_subsystem_util::{reexports::SubsystemContext, TimeoutExt};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlakeTwo256, BlockNumber, CandidateDescriptor, CandidateEvent, CandidateReceipt, CoreIndex,
|
||||
GroupIndex, Hash, HashT, HeadData, Id as ParaId,
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use std::collections::{BTreeSet, HashMap};
|
||||
|
||||
use polkadot_primitives::v2::{CandidateHash, SessionIndex, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateHash, SessionIndex, ValidatorIndex};
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use polkadot_node_primitives::{dispute_is_inactive, DisputeStatus, Timestamp};
|
||||
use polkadot_primitives::v2::{CandidateHash, SessionIndex};
|
||||
use polkadot_primitives::{CandidateHash, SessionIndex};
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
|
||||
@@ -60,7 +60,7 @@ use polkadot_node_subsystem::{
|
||||
use polkadot_node_subsystem_test_helpers::{
|
||||
make_buffered_subsystem_context, TestSubsystemContextHandle,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
ApprovalVote, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
|
||||
CandidateReceipt, CoreIndex, DisputeStatement, GroupIndex, Hash, HeadData, Header, IndexedVec,
|
||||
MultiDisputeStatementSet, ScrapedOnChainVotes, SessionIndex, SessionInfo, SigningContext,
|
||||
@@ -85,7 +85,7 @@ fn make_keystore(seeds: impl Iterator<Item = String>) -> LocalKeystore {
|
||||
|
||||
for s in seeds {
|
||||
store
|
||||
.sr25519_generate_new(polkadot_primitives::v2::PARACHAIN_KEY_TYPE_ID, Some(&s))
|
||||
.sr25519_generate_new(polkadot_primitives::PARACHAIN_KEY_TYPE_ID, Some(&s))
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
@@ -1803,7 +1803,7 @@ fn supermajority_valid_dispute_may_be_finalized() {
|
||||
.await;
|
||||
|
||||
let supermajority_threshold =
|
||||
polkadot_primitives::v2::supermajority_threshold(test_state.validators.len());
|
||||
polkadot_primitives::supermajority_threshold(test_state.validators.len());
|
||||
|
||||
let (valid_vote, invalid_vote) = generate_opposing_votes_pair(
|
||||
&test_state,
|
||||
@@ -1942,7 +1942,7 @@ fn concluded_supermajority_for_non_active_after_time() {
|
||||
.await;
|
||||
|
||||
let supermajority_threshold =
|
||||
polkadot_primitives::v2::supermajority_threshold(test_state.validators.len());
|
||||
polkadot_primitives::supermajority_threshold(test_state.validators.len());
|
||||
|
||||
let (valid_vote, invalid_vote) = generate_opposing_votes_pair(
|
||||
&test_state,
|
||||
@@ -2059,7 +2059,7 @@ fn concluded_supermajority_against_non_active_after_time() {
|
||||
.await;
|
||||
|
||||
let supermajority_threshold =
|
||||
polkadot_primitives::v2::supermajority_threshold(test_state.validators.len());
|
||||
polkadot_primitives::supermajority_threshold(test_state.validators.len());
|
||||
|
||||
let (valid_vote, invalid_vote) = generate_opposing_votes_pair(
|
||||
&test_state,
|
||||
|
||||
@@ -28,7 +28,7 @@ use futures::{select, FutureExt};
|
||||
use polkadot_node_subsystem::{
|
||||
errors::SubsystemError, messages::ProvisionerMessage, overseer::Handle,
|
||||
};
|
||||
use polkadot_primitives::v2::{Block, Hash, InherentData as ParachainsInherentData};
|
||||
use polkadot_primitives::{Block, Hash, InherentData as ParachainsInherentData};
|
||||
use std::{sync::Arc, time};
|
||||
|
||||
pub(crate) const LOG_TARGET: &str = "parachain::parachains-inherent";
|
||||
@@ -140,7 +140,7 @@ impl<C: sp_blockchain::HeaderBackend<Block>> sp_inherents::InherentDataProvider
|
||||
.map_err(|e| sp_inherents::Error::Application(Box::new(e)))?;
|
||||
|
||||
dst_inherent_data
|
||||
.put_data(polkadot_primitives::v2::PARACHAINS_INHERENT_IDENTIFIER, &inherent_data)
|
||||
.put_data(polkadot_primitives::PARACHAINS_INHERENT_IDENTIFIER, &inherent_data)
|
||||
}
|
||||
|
||||
async fn try_handle_error(
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::LOG_TARGET;
|
||||
use futures::channel::oneshot;
|
||||
use polkadot_node_primitives::CandidateVotes;
|
||||
use polkadot_node_subsystem::{messages::DisputeCoordinatorMessage, overseer};
|
||||
use polkadot_primitives::v2::{CandidateHash, SessionIndex};
|
||||
use polkadot_primitives::{CandidateHash, SessionIndex};
|
||||
|
||||
/// Request the relevant dispute statements for a set of disputes identified by `CandidateHash` and the `SessionIndex`.
|
||||
async fn request_votes(
|
||||
|
||||
@@ -26,7 +26,7 @@ use polkadot_node_subsystem::{
|
||||
messages::{DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest},
|
||||
overseer, ActivatedLeaf,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
supermajority_threshold, CandidateHash, DisputeState, DisputeStatement, DisputeStatementSet,
|
||||
Hash, MultiDisputeStatementSet, SessionIndex, ValidDisputeStatementKind, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ use polkadot_node_subsystem::messages::{
|
||||
AllMessages, DisputeCoordinatorMessage, RuntimeApiMessage, RuntimeApiRequest,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::TestSubsystemSender;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, DisputeState, InvalidDisputeStatementKind, SessionIndex,
|
||||
ValidDisputeStatementKind, ValidatorSignature,
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
use crate::{metrics, LOG_TARGET};
|
||||
use futures::channel::oneshot;
|
||||
use polkadot_node_subsystem::{messages::DisputeCoordinatorMessage, overseer};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, DisputeStatement, DisputeStatementSet, MultiDisputeStatementSet, SessionIndex,
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
|
||||
@@ -19,7 +19,7 @@ use fatality::Nested;
|
||||
use futures::channel::{mpsc, oneshot};
|
||||
use polkadot_node_subsystem::errors::{ChainApiError, RuntimeApiError, SubsystemError};
|
||||
use polkadot_node_subsystem_util as util;
|
||||
use polkadot_primitives::v2::Hash;
|
||||
use polkadot_primitives::Hash;
|
||||
|
||||
pub type FatalResult<T> = std::result::Result<T, FatalError>;
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
use polkadot_node_subsystem_util::{
|
||||
request_availability_cores, request_persisted_validation_data, TimeoutExt,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BackedCandidate, BlockNumber, CandidateReceipt, CoreState, Hash, OccupiedCoreAssumption,
|
||||
SignedAvailabilityBitfield, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
use ::test_helpers::{dummy_candidate_descriptor, dummy_hash};
|
||||
use bitvec::bitvec;
|
||||
use polkadot_primitives::v2::{OccupiedCore, ScheduledCore};
|
||||
use polkadot_primitives::{OccupiedCore, ScheduledCore};
|
||||
|
||||
pub fn occupied_core(para_id: u32) -> CoreState {
|
||||
CoreState::Occupied(OccupiedCore {
|
||||
@@ -41,7 +41,7 @@ pub fn scheduled_core(id: u32) -> ScheduledCore {
|
||||
mod select_availability_bitfields {
|
||||
use super::{super::*, default_bitvec, occupied_core};
|
||||
use futures::executor::block_on;
|
||||
use polkadot_primitives::v2::{ScheduledCore, SigningContext, ValidatorId, ValidatorIndex};
|
||||
use polkadot_primitives::{ScheduledCore, SigningContext, ValidatorId, ValidatorIndex};
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_keystore::{testing::KeyStore, CryptoStore, SyncCryptoStorePtr};
|
||||
use std::sync::Arc;
|
||||
@@ -234,7 +234,7 @@ mod select_candidates {
|
||||
},
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::TestSubsystemSender;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateCommitments, CommittedCandidateReceipt, PersistedValidationData,
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use polkadot_primitives::v2::{Hash, ValidationCodeHash};
|
||||
use polkadot_primitives::{Hash, ValidationCodeHash};
|
||||
use std::collections::{
|
||||
btree_map::{self, BTreeMap},
|
||||
HashSet,
|
||||
|
||||
@@ -26,7 +26,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
SubsystemResult, SubsystemSender,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, Hash, PvfCheckStatement, SessionIndex, ValidationCodeHash, ValidatorId,
|
||||
ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ use polkadot_node_subsystem::{
|
||||
messages::{RuntimeApiMessage, RuntimeApiRequest},
|
||||
SubsystemSender,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
Hash, PvfCheckStatement, SessionIndex, ValidationCodeHash, ValidatorId, ValidatorSignature,
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ use polkadot_node_subsystem::{
|
||||
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, RuntimeApiError,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, Hash, Header, PvfCheckStatement, SessionIndex, ValidationCode, ValidationCodeHash,
|
||||
ValidatorId,
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ use std::{collections::btree_map::BTreeMap, num::NonZeroUsize};
|
||||
use lru::LruCache;
|
||||
use sp_consensus_babe::Epoch;
|
||||
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, BlockNumber, CandidateCommitments, CandidateEvent, CandidateHash,
|
||||
CommittedCandidateReceipt, CoreState, DisputeState, GroupRotationInfo, Hash, Id as ParaId,
|
||||
InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData,
|
||||
|
||||
@@ -28,7 +28,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError, SubsystemResult,
|
||||
};
|
||||
use polkadot_node_subsystem_types::RuntimeApiSubsystemClient;
|
||||
use polkadot_primitives::v2::Hash;
|
||||
use polkadot_primitives::Hash;
|
||||
|
||||
use cache::{RequestResult, RequestResultCache};
|
||||
use futures::{channel::oneshot, prelude::*, select, stream::FuturesUnordered};
|
||||
|
||||
@@ -21,14 +21,11 @@ use polkadot_node_primitives::{BabeAllowedSlots, BabeEpoch, BabeEpochConfigurati
|
||||
use polkadot_node_subsystem::SpawnGlue;
|
||||
use polkadot_node_subsystem_test_helpers::make_subsystem_context;
|
||||
use polkadot_primitives::{
|
||||
runtime_api::ParachainHost,
|
||||
v2::{
|
||||
AuthorityDiscoveryId, Block, CandidateEvent, CommittedCandidateReceipt, CoreState,
|
||||
GroupRotationInfo, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage,
|
||||
OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes,
|
||||
SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex,
|
||||
ValidatorSignature,
|
||||
},
|
||||
runtime_api::ParachainHost, AuthorityDiscoveryId, Block, CandidateEvent,
|
||||
CommittedCandidateReceipt, CoreState, GroupRotationInfo, Id as ParaId, InboundDownwardMessage,
|
||||
InboundHrmpMessage, OccupiedCoreAssumption, PersistedValidationData, PvfCheckStatement,
|
||||
ScrapedOnChainVotes, SessionIndex, SessionInfo, ValidationCode, ValidationCodeHash,
|
||||
ValidatorId, ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_authority_discovery::AuthorityDiscoveryApi;
|
||||
@@ -115,7 +112,7 @@ sp_api::mock_impl_runtime_apis! {
|
||||
fn check_validation_outputs(
|
||||
&self,
|
||||
para_id: ParaId,
|
||||
_commitments: polkadot_primitives::v2::CandidateCommitments,
|
||||
_commitments: polkadot_primitives::CandidateCommitments,
|
||||
) -> bool {
|
||||
self.validation_outputs_results
|
||||
.get(¶_id)
|
||||
@@ -223,7 +220,7 @@ sp_api::mock_impl_runtime_apis! {
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
_equivocation_proof: sp_consensus_babe::EquivocationProof<polkadot_primitives::v2::Header>,
|
||||
_equivocation_proof: sp_consensus_babe::EquivocationProof<polkadot_primitives::Header>,
|
||||
_key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
None
|
||||
@@ -452,7 +449,7 @@ fn requests_check_validation_outputs() {
|
||||
let relay_parent = [1; 32].into();
|
||||
let para_a = ParaId::from(5_u32);
|
||||
let para_b = ParaId::from(6_u32);
|
||||
let commitments = polkadot_primitives::v2::CandidateCommitments::default();
|
||||
let commitments = polkadot_primitives::CandidateCommitments::default();
|
||||
let spawner = sp_core::testing::TaskExecutor::new();
|
||||
|
||||
runtime_api.validation_outputs_results.insert(para_a, false);
|
||||
|
||||
@@ -27,7 +27,7 @@ pub use tracing::{enabled, event, Level};
|
||||
pub use jaeger::hash_to_trace_identifier;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use polkadot_primitives::v2::{CandidateHash, Hash};
|
||||
pub use polkadot_primitives::{CandidateHash, Hash};
|
||||
|
||||
pub use gum_proc_macro::{debug, error, info, trace, warn};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use super::*;
|
||||
pub use polkadot_primitives::v2::{CandidateHash, Hash};
|
||||
pub use polkadot_primitives::{CandidateHash, Hash};
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
struct Y {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Polkadot Jaeger span definitions.
|
||||
//!
|
||||
//! ```rust
|
||||
//! # use polkadot_primitives::v2::{CandidateHash, Hash};
|
||||
//! # use polkadot_primitives::{CandidateHash, Hash};
|
||||
//! # fn main() {
|
||||
//! use polkadot_node_jaeger as jaeger;
|
||||
//!
|
||||
@@ -51,7 +51,7 @@
|
||||
//! over the course of a function, for this purpose use the non-consuming
|
||||
//! `fn` variants, i.e.
|
||||
//! ```rust
|
||||
//! # use polkadot_primitives::v2::{CandidateHash, Hash};
|
||||
//! # use polkadot_primitives::{CandidateHash, Hash};
|
||||
//! # fn main() {
|
||||
//! # use polkadot_node_jaeger as jaeger;
|
||||
//!
|
||||
@@ -85,9 +85,7 @@
|
||||
|
||||
use parity_scale_codec::Encode;
|
||||
use polkadot_node_primitives::PoV;
|
||||
use polkadot_primitives::v2::{
|
||||
BlakeTwo256, CandidateHash, Hash, HashT, Id as ParaId, ValidatorIndex,
|
||||
};
|
||||
use polkadot_primitives::{BlakeTwo256, CandidateHash, Hash, HashT, Id as ParaId, ValidatorIndex};
|
||||
use sc_network::PeerId;
|
||||
|
||||
use std::{fmt, sync::Arc};
|
||||
|
||||
@@ -28,7 +28,7 @@ use polkadot_node_subsystem::{
|
||||
overseer,
|
||||
};
|
||||
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateCommitments, CandidateDescriptor, CandidateReceipt, PersistedValidationData,
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ use polkadot_cli::{
|
||||
};
|
||||
use polkadot_node_core_candidate_validation::find_validation_data;
|
||||
use polkadot_node_primitives::{AvailableData, BlockData, PoV};
|
||||
use polkadot_primitives::v2::CandidateDescriptor;
|
||||
use polkadot_primitives::CandidateDescriptor;
|
||||
|
||||
use polkadot_node_subsystem_util::request_validators;
|
||||
use sp_core::traits::SpawnNamed;
|
||||
@@ -53,7 +53,7 @@ use crate::{
|
||||
// Import extra types relevant to the particular
|
||||
// subsystem.
|
||||
use polkadot_node_subsystem::{messages::CandidateBackingMessage, SpawnGlue};
|
||||
use polkadot_primitives::v2::CandidateReceipt;
|
||||
use polkadot_primitives::CandidateReceipt;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -166,11 +166,11 @@ where
|
||||
};
|
||||
|
||||
let (collator_id, collator_signature) = {
|
||||
use polkadot_primitives::v2::CollatorPair;
|
||||
use polkadot_primitives::CollatorPair;
|
||||
use sp_core::crypto::Pair;
|
||||
|
||||
let collator_pair = CollatorPair::generate().0;
|
||||
let signature_payload = polkadot_primitives::v2::collator_signature_payload(
|
||||
let signature_payload = polkadot_primitives::collator_signature_payload(
|
||||
&relay_parent,
|
||||
&candidate.descriptor().para_id,
|
||||
&validation_data_hash,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#![cfg(feature = "runtime-metrics")]
|
||||
|
||||
use codec::Decode;
|
||||
use primitives::v2::{
|
||||
use primitives::{
|
||||
metric_definitions::{CounterDefinition, CounterVecDefinition},
|
||||
RuntimeMetricLabelValues, RuntimeMetricOp, RuntimeMetricUpdate,
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! All of the metrics have a correspondent runtime metric definition.
|
||||
|
||||
use crate::runtime::RuntimeMetricsProvider;
|
||||
use primitives::v2::metric_definitions::{
|
||||
use primitives::metric_definitions::{
|
||||
PARACHAIN_CREATE_INHERENT_BITFIELDS_SIGNATURE_CHECKS,
|
||||
PARACHAIN_INHERENT_DATA_BITFIELDS_PROCESSED, PARACHAIN_INHERENT_DATA_CANDIDATES_PROCESSED,
|
||||
PARACHAIN_INHERENT_DATA_DISPUTE_SETS_INCLUDED, PARACHAIN_INHERENT_DATA_DISPUTE_SETS_PROCESSED,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use hyper::{Client, Uri};
|
||||
use polkadot_test_service::{node_config, run_validator_node, test_prometheus_config};
|
||||
use primitives::v2::metric_definitions::PARACHAIN_INHERENT_DATA_BITFIELDS_PROCESSED;
|
||||
use primitives::metric_definitions::PARACHAIN_INHERENT_DATA_BITFIELDS_PROCESSED;
|
||||
use sc_client_api::{execution_extensions::ExecutionStrategies, ExecutionStrategy};
|
||||
use sp_keyring::AccountKeyring::*;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
},
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CandidateIndex, Hash, SessionIndex, ValidatorIndex, ValidatorSignature,
|
||||
};
|
||||
use rand::{CryptoRng, Rng, SeedableRng};
|
||||
|
||||
@@ -29,7 +29,7 @@ use polkadot_node_primitives::approval::{
|
||||
use polkadot_node_subsystem::messages::{network_bridge_event, AllMessages, ApprovalCheckError};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt as _;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, BlakeTwo256, HashT};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, BlakeTwo256, HashT};
|
||||
use polkadot_primitives_test_helpers::dummy_signature;
|
||||
use rand::SeedableRng;
|
||||
use sp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
use fatality::Nested;
|
||||
use polkadot_node_network_protocol::request_response::outgoing::RequestError;
|
||||
use polkadot_primitives::v2::SessionIndex;
|
||||
use polkadot_primitives::SessionIndex;
|
||||
|
||||
use futures::channel::oneshot;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_subsystem::{
|
||||
overseer,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, Hash, Id as ParaId, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ mod tests {
|
||||
AllMessages, AvailabilityDistributionMessage, RuntimeApiMessage, RuntimeApiRequest,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::v2::{CandidateHash, Hash, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateHash, Hash, ValidatorIndex};
|
||||
use test_helpers::mock::make_ferdie_keystore;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -33,7 +33,7 @@ use polkadot_node_subsystem::{
|
||||
messages::{AvailabilityStoreMessage, IfDisconnected, NetworkBridgeTxMessage},
|
||||
overseer,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, BlakeTwo256, CandidateHash, GroupIndex, Hash, HashT, OccupiedCore,
|
||||
SessionIndex,
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ use sp_keyring::Sr25519Keyring;
|
||||
use polkadot_node_network_protocol::request_response::{v1, Recipient};
|
||||
use polkadot_node_primitives::{BlockData, PoV, Proof};
|
||||
use polkadot_node_subsystem::messages::AllMessages;
|
||||
use polkadot_primitives::v2::{CandidateHash, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateHash, ValidatorIndex};
|
||||
|
||||
use super::*;
|
||||
use crate::{metrics::Metrics, tests::mock::get_valid_chunk_data};
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::{get_occupied_cores, RuntimeInfo};
|
||||
use polkadot_primitives::v2::{CandidateHash, Hash, OccupiedCore, SessionIndex};
|
||||
use polkadot_primitives::{CandidateHash, Hash, OccupiedCore, SessionIndex};
|
||||
|
||||
use super::{FatalError, Metrics, Result, LOG_TARGET};
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ use rand::{seq::SliceRandom, thread_rng};
|
||||
|
||||
use polkadot_node_subsystem::overseer;
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
use polkadot_primitives::v2::{
|
||||
AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex, ValidatorIndex,
|
||||
};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex, ValidatorIndex};
|
||||
|
||||
use crate::{
|
||||
error::{Error, Result},
|
||||
|
||||
@@ -21,7 +21,7 @@ use futures::FutureExt;
|
||||
use polkadot_node_network_protocol::jaeger;
|
||||
use polkadot_node_primitives::{BlockData, ErasureChunk, PoV};
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
BlockNumber, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionIndex,
|
||||
SessionInfo,
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ use polkadot_node_network_protocol::{
|
||||
};
|
||||
use polkadot_node_primitives::{AvailableData, ErasureChunk};
|
||||
use polkadot_node_subsystem::{jaeger, messages::AvailabilityStoreMessage, SubsystemSender};
|
||||
use polkadot_primitives::v2::{CandidateHash, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateHash, ValidatorIndex};
|
||||
|
||||
use crate::{
|
||||
error::{JfyiError, Result},
|
||||
|
||||
@@ -22,7 +22,7 @@ use sp_keyring::Sr25519Keyring;
|
||||
|
||||
use polkadot_erasure_coding::{branches, obtain_chunks_v1 as obtain_chunks};
|
||||
use polkadot_node_primitives::{AvailableData, BlockData, ErasureChunk, PoV, Proof};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateCommitments, CandidateDescriptor, CandidateHash, CommittedCandidateReceipt,
|
||||
GroupIndex, Hash, HeadData, Id as ParaId, IndexedVec, OccupiedCore, PersistedValidationData,
|
||||
SessionInfo, ValidatorIndex,
|
||||
|
||||
@@ -19,7 +19,7 @@ use std::collections::HashSet;
|
||||
use futures::{executor, future, Future};
|
||||
|
||||
use polkadot_node_network_protocol::request_response::{IncomingRequest, ReqProtocolNames};
|
||||
use polkadot_primitives::v2::{CoreState, Hash};
|
||||
use polkadot_primitives::{CoreState, Hash};
|
||||
use sp_keystore::SyncCryptoStorePtr;
|
||||
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
|
||||
@@ -47,7 +47,7 @@ use polkadot_node_subsystem::{
|
||||
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CandidateHash, CoreState, GroupIndex, Hash, Id as ParaId, ScheduledCore, SessionInfo,
|
||||
ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@ use polkadot_node_subsystem::{
|
||||
SubsystemResult,
|
||||
};
|
||||
use polkadot_node_subsystem_util::request_session_info;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, BlakeTwo256, BlockNumber, CandidateHash, CandidateReceipt, GroupIndex,
|
||||
Hash, HashT, IndexedVec, SessionIndex, SessionInfo, ValidatorId, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::{make_subsystem_context, TestSubsystemContextHandle};
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, Hash, HeadData, IndexedVec, PersistedValidationData, ValidatorId,
|
||||
};
|
||||
use polkadot_primitives_test_helpers::{dummy_candidate_receipt, dummy_hash};
|
||||
|
||||
@@ -37,7 +37,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_util::{self as util};
|
||||
|
||||
use polkadot_primitives::v2::{Hash, SignedAvailabilityBitfield, SigningContext, ValidatorId};
|
||||
use polkadot_primitives::{Hash, SignedAvailabilityBitfield, SigningContext, ValidatorId};
|
||||
use rand::{CryptoRng, Rng, SeedableRng};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::make_subsystem_context;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{AvailabilityBitfield, Signed, ValidatorIndex};
|
||||
use polkadot_primitives::{AvailabilityBitfield, Signed, ValidatorIndex};
|
||||
use rand_chacha::ChaCha12Rng;
|
||||
use sp_application_crypto::AppKey;
|
||||
use sp_authority_discovery::AuthorityPair as AuthorityDiscoveryPair;
|
||||
|
||||
@@ -36,7 +36,7 @@ use polkadot_node_network_protocol::{
|
||||
request_response::{OutgoingRequest, Recipient, ReqProtocolNames, Requests},
|
||||
PeerId, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Block, Hash};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Block, Hash};
|
||||
|
||||
use crate::validator_discovery::AuthorityDiscovery;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem,
|
||||
};
|
||||
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, BlockNumber, Hash, ValidatorIndex};
|
||||
|
||||
/// Peer set info for network initialization.
|
||||
///
|
||||
|
||||
@@ -46,7 +46,7 @@ use polkadot_node_subsystem_test_helpers::{
|
||||
SingleItemSink, SingleItemStream, TestSubsystemContextHandle,
|
||||
};
|
||||
use polkadot_node_subsystem_util::metered;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Hash};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Hash};
|
||||
|
||||
use sc_network::Multiaddr;
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -32,7 +32,7 @@ use polkadot_node_network_protocol::{
|
||||
use polkadot_node_subsystem::{FromOrchestra, OverseerSignal};
|
||||
use polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle;
|
||||
use polkadot_node_subsystem_util::metered;
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, Hash};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, Hash};
|
||||
use polkadot_primitives_test_helpers::dummy_collator_signature;
|
||||
use sc_network::Multiaddr;
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
|
||||
@@ -30,7 +30,7 @@ use polkadot_node_network_protocol::{
|
||||
peer_set::{PeerSet, PeerSetProtocolNames, PerPeerSet},
|
||||
PeerId,
|
||||
};
|
||||
use polkadot_primitives::v2::AuthorityDiscoveryId;
|
||||
use polkadot_primitives::AuthorityDiscoveryId;
|
||||
|
||||
const LOG_TARGET: &str = "parachain::validator-discovery";
|
||||
|
||||
@@ -173,7 +173,7 @@ mod tests {
|
||||
request_response::{outgoing::Requests, ReqProtocolNames},
|
||||
PeerId,
|
||||
};
|
||||
use polkadot_primitives::v2::Hash;
|
||||
use polkadot_primitives::Hash;
|
||||
use sc_network::{Event as NetworkEvent, IfDisconnected, ProtocolName};
|
||||
use sp_keyring::Sr25519Keyring;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
@@ -47,7 +47,7 @@ use polkadot_node_subsystem_util::{
|
||||
runtime::{get_availability_cores, get_group_rotation_info, RuntimeInfo},
|
||||
TimeoutExt,
|
||||
};
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CandidateHash, CandidateReceipt, CollatorPair, CoreIndex, CoreState,
|
||||
GroupIndex, Hash, Id as ParaId, SessionIndex,
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ use polkadot_node_subsystem::{
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
AuthorityDiscoveryId, CollatorPair, GroupIndex, GroupRotationInfo, IndexedVec, ScheduledCore,
|
||||
SessionIndex, SessionInfo, ValidatorId, ValidatorIndex,
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ use std::{
|
||||
|
||||
use bitvec::{bitvec, vec::BitVec};
|
||||
|
||||
use polkadot_primitives::v2::{AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex};
|
||||
use polkadot_primitives::{AuthorityDiscoveryId, GroupIndex, Hash, SessionIndex};
|
||||
|
||||
/// The ring buffer stores at most this many unique validator groups.
|
||||
///
|
||||
|
||||
@@ -34,7 +34,7 @@ use polkadot_node_network_protocol::{
|
||||
request_response::{v1 as request_v1, IncomingRequestReceiver},
|
||||
PeerId, UnifiedReputationChange as Rep,
|
||||
};
|
||||
use polkadot_primitives::v2::CollatorPair;
|
||||
use polkadot_primitives::CollatorPair;
|
||||
|
||||
use polkadot_node_subsystem::{
|
||||
errors::SubsystemError, messages::NetworkBridgeTxMessage, overseer, SpawnedSubsystem,
|
||||
|
||||
@@ -53,7 +53,7 @@ use polkadot_node_subsystem::{
|
||||
overseer, FromOrchestra, OverseerSignal, PerLeafSpan, SubsystemSender,
|
||||
};
|
||||
use polkadot_node_subsystem_util::metrics::{self, prometheus};
|
||||
use polkadot_primitives::v2::{CandidateReceipt, CollatorId, Hash, Id as ParaId};
|
||||
use polkadot_primitives::{CandidateReceipt, CollatorId, Hash, Id as ParaId};
|
||||
|
||||
use crate::error::Result;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ use polkadot_node_primitives::BlockData;
|
||||
use polkadot_node_subsystem::messages::{AllMessages, RuntimeApiMessage, RuntimeApiRequest};
|
||||
use polkadot_node_subsystem_test_helpers as test_helpers;
|
||||
use polkadot_node_subsystem_util::TimeoutExt;
|
||||
use polkadot_primitives::v2::{
|
||||
use polkadot_primitives::{
|
||||
CollatorPair, CoreState, GroupIndex, GroupRotationInfo, OccupiedCore, ScheduledCore,
|
||||
ValidatorId, ValidatorIndex,
|
||||
};
|
||||
@@ -133,7 +133,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(test: impl FnOnce(TestHarne
|
||||
let keystore = TestKeyStore::new();
|
||||
keystore
|
||||
.sr25519_generate_new(
|
||||
polkadot_primitives::v2::PARACHAIN_KEY_TYPE_ID,
|
||||
polkadot_primitives::PARACHAIN_KEY_TYPE_ID,
|
||||
Some(&Sr25519Keyring::Alice.to_seed()),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
@@ -22,7 +22,7 @@ use polkadot_node_network_protocol::{
|
||||
PeerId,
|
||||
};
|
||||
use polkadot_node_primitives::SignedDisputeStatement;
|
||||
use polkadot_primitives::v2::{CandidateReceipt, ValidatorIndex};
|
||||
use polkadot_primitives::{CandidateReceipt, ValidatorIndex};
|
||||
|
||||
use crate::receiver::{BATCH_COLLECTING_INTERVAL, MIN_KEEP_BATCH_ALIVE_VOTES};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use std::{
|
||||
use futures::future::pending;
|
||||
|
||||
use polkadot_node_network_protocol::request_response::DISPUTE_REQUEST_TIMEOUT;
|
||||
use polkadot_primitives::v2::{CandidateHash, CandidateReceipt};
|
||||
use polkadot_primitives::{CandidateHash, CandidateReceipt};
|
||||
|
||||
use crate::{
|
||||
receiver::batches::{batch::TickResult, waiting_queue::PendingWake},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user