snapshot before rebranding
This commit is contained in:
@@ -26,16 +26,16 @@
|
||||
//! aura-based collators.
|
||||
|
||||
use codec::Codec;
|
||||
use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use cumulus_client_consensus_common::{
|
||||
use pezcumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use pezcumulus_client_consensus_common::{
|
||||
self as consensus_common, TeyrchainBlockImportMarker, TeyrchainCandidate,
|
||||
};
|
||||
use cumulus_client_consensus_proposer::ProposerInterface;
|
||||
use cumulus_client_teyrchain_inherent::{TeyrchainInherentData, TeyrchainInherentDataProvider};
|
||||
use cumulus_primitives_core::{
|
||||
use pezcumulus_client_consensus_proposer::ProposerInterface;
|
||||
use pezcumulus_client_teyrchain_inherent::{TeyrchainInherentData, TeyrchainInherentDataProvider};
|
||||
use pezcumulus_primitives_core::{
|
||||
relay_chain::Hash as PHash, DigestItem, PersistedValidationData, TeyrchainBlockData,
|
||||
};
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
|
||||
use pezkuwi_node_primitives::{Collation, MaybeCompressedPoV};
|
||||
use pezkuwi_primitives::{Header as PHeader, Id as ParaId};
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
//! For more information about AuRa, the Bizinikiwi crate should be checked.
|
||||
|
||||
use codec::{Codec, Decode};
|
||||
use cumulus_client_collator::{
|
||||
use pezcumulus_client_collator::{
|
||||
relay_chain_driven::CollationRequest, service::ServiceInterface as CollatorServiceInterface,
|
||||
};
|
||||
use cumulus_client_consensus_common::TeyrchainBlockImportMarker;
|
||||
use cumulus_client_consensus_proposer::ProposerInterface;
|
||||
use cumulus_primitives_core::{relay_chain::BlockId as RBlockId, CollectCollationInfo};
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_client_consensus_common::TeyrchainBlockImportMarker;
|
||||
use pezcumulus_client_consensus_proposer::ProposerInterface;
|
||||
use pezcumulus_primitives_core::{relay_chain::BlockId as RBlockId, CollectCollationInfo};
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
|
||||
use pezkuwi_node_primitives::CollationResult;
|
||||
use pezkuwi_overseer::Handle as OverseerHandle;
|
||||
@@ -119,7 +119,7 @@ where
|
||||
let mut collation_requests = match params.collation_request_receiver {
|
||||
Some(receiver) => receiver,
|
||||
None =>
|
||||
cumulus_client_collator::relay_chain_driven::init(
|
||||
pezcumulus_client_collator::relay_chain_driven::init(
|
||||
params.collator_key,
|
||||
params.para_id,
|
||||
params.overseer_handle,
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
//! must be propagated to the next author before their turn.
|
||||
|
||||
use codec::{Codec, Encode};
|
||||
use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use cumulus_client_consensus_common::{self as consensus_common, TeyrchainBlockImportMarker};
|
||||
use cumulus_client_consensus_proposer::ProposerInterface;
|
||||
use cumulus_primitives_aura::AuraUnincludedSegmentApi;
|
||||
use cumulus_primitives_core::{CollectCollationInfo, PersistedValidationData};
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use pezcumulus_client_consensus_common::{self as consensus_common, TeyrchainBlockImportMarker};
|
||||
use pezcumulus_client_consensus_proposer::ProposerInterface;
|
||||
use pezcumulus_primitives_aura::AuraUnincludedSegmentApi;
|
||||
use pezcumulus_primitives_core::{CollectCollationInfo, PersistedValidationData};
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
|
||||
use pezkuwi_node_primitives::SubmitCollationParams;
|
||||
use pezkuwi_node_subsystem::messages::CollationGenerationMessage;
|
||||
@@ -231,7 +231,7 @@ where
|
||||
P::Signature: TryFrom<Vec<u8>> + Member + Codec,
|
||||
{
|
||||
async move {
|
||||
cumulus_client_collator::initialize_collator_subsystems(
|
||||
pezcumulus_client_collator::initialize_collator_subsystems(
|
||||
&mut params.overseer_handle,
|
||||
params.collator_key,
|
||||
params.para_id,
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
use crate::collator::SlotClaim;
|
||||
use codec::Codec;
|
||||
use cumulus_client_consensus_common::{self as consensus_common, ParentSearchParams};
|
||||
use cumulus_primitives_aura::{AuraUnincludedSegmentApi, Slot};
|
||||
use cumulus_primitives_core::{relay_chain::Header as RelayHeader, BlockT};
|
||||
use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};
|
||||
use pezcumulus_client_consensus_common::{self as consensus_common, ParentSearchParams};
|
||||
use pezcumulus_primitives_aura::{AuraUnincludedSegmentApi, Slot};
|
||||
use pezcumulus_primitives_core::{relay_chain::Header as RelayHeader, BlockT};
|
||||
use pezcumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};
|
||||
use pezkuwi_node_subsystem::messages::{CollatorProtocolMessage, RuntimeApiRequest};
|
||||
use pezkuwi_node_subsystem_util::runtime::ClaimQueueSnapshot;
|
||||
use pezkuwi_primitives::{
|
||||
@@ -267,7 +267,7 @@ where
|
||||
.then(|| SlotClaim::unchecked::<P>(author_pub, para_slot, timestamp))
|
||||
}
|
||||
|
||||
/// Use [`cumulus_client_consensus_common::find_potential_parents`] to find teyrchain blocks that
|
||||
/// Use [`pezcumulus_client_consensus_common::find_potential_parents`] to find teyrchain blocks that
|
||||
/// we can build on. Once a list of potential parents is retrieved, return the last one of the
|
||||
/// longest chain.
|
||||
async fn find_parent<Block>(
|
||||
@@ -290,7 +290,7 @@ where
|
||||
ignore_alternative_branches: true,
|
||||
};
|
||||
|
||||
let potential_parents = cumulus_client_consensus_common::find_potential_parents::<Block>(
|
||||
let potential_parents = pezcumulus_client_consensus_common::find_potential_parents::<Block>(
|
||||
parent_search_params,
|
||||
para_backend,
|
||||
relay_client,
|
||||
@@ -323,15 +323,15 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::collators::{can_build_upon, BackingGroupConnectionHelper};
|
||||
use codec::Encode;
|
||||
use cumulus_primitives_aura::Slot;
|
||||
use cumulus_primitives_core::BlockT;
|
||||
use cumulus_relay_chain_interface::PHash;
|
||||
use cumulus_test_client::{
|
||||
use pezcumulus_primitives_aura::Slot;
|
||||
use pezcumulus_primitives_core::BlockT;
|
||||
use pezcumulus_relay_chain_interface::PHash;
|
||||
use pezcumulus_test_client::{
|
||||
runtime::{Block, Hash},
|
||||
Client, DefaultTestClientBuilderExt, InitBlockBuilder, TestClientBuilder,
|
||||
TestClientBuilderExt,
|
||||
};
|
||||
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use pezcumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use futures::StreamExt;
|
||||
use pezkuwi_overseer::{Event, Handle};
|
||||
use pezkuwi_primitives::HeadData;
|
||||
@@ -359,7 +359,7 @@ mod tests {
|
||||
let header = client.header(hash).ok().flatten().expect("No header for parent block");
|
||||
let included = HeadData(header.encode());
|
||||
let mut builder = RelayStateSproofBuilder::default();
|
||||
builder.para_id = cumulus_test_client::runtime::TEYRCHAIN_ID.into();
|
||||
builder.para_id = pezcumulus_test_client::runtime::TEYRCHAIN_ID.into();
|
||||
builder.included_para_head = Some(included);
|
||||
|
||||
builder
|
||||
|
||||
@@ -30,15 +30,15 @@ use crate::{
|
||||
},
|
||||
LOG_TARGET,
|
||||
};
|
||||
use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use cumulus_client_consensus_common::{self as consensus_common, TeyrchainBlockImportMarker};
|
||||
use cumulus_client_consensus_proposer::ProposerInterface;
|
||||
use cumulus_primitives_aura::{AuraUnincludedSegmentApi, Slot};
|
||||
use cumulus_primitives_core::{
|
||||
use pezcumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use pezcumulus_client_consensus_common::{self as consensus_common, TeyrchainBlockImportMarker};
|
||||
use pezcumulus_client_consensus_proposer::ProposerInterface;
|
||||
use pezcumulus_primitives_aura::{AuraUnincludedSegmentApi, Slot};
|
||||
use pezcumulus_primitives_core::{
|
||||
extract_relay_parent, rpsr_digest, ClaimQueueOffset, CoreInfo, CoreSelector, CumulusDigestItem,
|
||||
PersistedValidationData, RelayParentOffsetApi,
|
||||
};
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
use futures::prelude::*;
|
||||
use pezkuwi_primitives::{
|
||||
Block as RelayBlock, CoreIndex, Hash as RelayHash, Header as RelayHeader, Id as ParaId,
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
use codec::Encode;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
|
||||
use pezkuwi_node_primitives::{MaybeCompressedPoV, SubmitCollationParams};
|
||||
use pezkuwi_node_subsystem::messages::CollationGenerationMessage;
|
||||
use pezkuwi_overseer::Handle as OverseerHandle;
|
||||
use pezkuwi_primitives::{CollatorPair, Id as ParaId};
|
||||
|
||||
use cumulus_primitives_core::relay_chain::BlockId;
|
||||
use pezcumulus_primitives_core::relay_chain::BlockId;
|
||||
use futures::prelude::*;
|
||||
|
||||
use crate::export_pov_to_path;
|
||||
@@ -84,7 +84,7 @@ pub async fn run_collation_task<Block, RClient, CS>(
|
||||
return;
|
||||
};
|
||||
|
||||
cumulus_client_collator::initialize_collator_subsystems(
|
||||
pezcumulus_client_collator::initialize_collator_subsystems(
|
||||
&mut overseer_handle,
|
||||
collator_key,
|
||||
para_id,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
//!
|
||||
//! 1. Awaits the next production signal from the internal timer
|
||||
//! 2. Retrieves the current best relay chain block and identifies a valid parent block (see
|
||||
//! [find_potential_parents][cumulus_client_consensus_common::find_potential_parents] for parent
|
||||
//! [find_potential_parents][pezcumulus_client_consensus_common::find_potential_parents] for parent
|
||||
//! selection criteria)
|
||||
//! 3. Validates that:
|
||||
//! - The teyrchain has an assigned core on the relay chain
|
||||
@@ -70,12 +70,12 @@ use self::{block_builder_task::run_block_builder, collation_task::run_collation_
|
||||
pub use block_import::{SlotBasedBlockImport, SlotBasedBlockImportHandle};
|
||||
use codec::Codec;
|
||||
use consensus_common::TeyrchainCandidate;
|
||||
use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use cumulus_client_consensus_common::{self as consensus_common, TeyrchainBlockImportMarker};
|
||||
use cumulus_client_consensus_proposer::ProposerInterface;
|
||||
use cumulus_primitives_aura::AuraUnincludedSegmentApi;
|
||||
use cumulus_primitives_core::RelayParentOffsetApi;
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_client_collator::service::ServiceInterface as CollatorServiceInterface;
|
||||
use pezcumulus_client_consensus_common::{self as consensus_common, TeyrchainBlockImportMarker};
|
||||
use pezcumulus_client_consensus_proposer::ProposerInterface;
|
||||
use pezcumulus_primitives_aura::AuraUnincludedSegmentApi;
|
||||
use pezcumulus_primitives_core::RelayParentOffsetApi;
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
use futures::FutureExt;
|
||||
use pezkuwi_primitives::{
|
||||
CollatorPair, CoreIndex, Hash as RelayHash, Id as ParaId, ValidationCodeHash,
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
//! Utility for caching [`RelayChainData`] for different relay blocks.
|
||||
|
||||
use crate::collators::claim_queue_at;
|
||||
use cumulus_primitives_core::CoreSelector;
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_primitives_core::CoreSelector;
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezkuwi_node_subsystem_util::runtime::ClaimQueueSnapshot;
|
||||
use pezkuwi_primitives::{
|
||||
Hash as RelayHash, Header as RelayHeader, Id as ParaId, OccupiedCoreAssumption,
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
use crate::LOG_TARGET;
|
||||
use codec::Codec;
|
||||
use cumulus_primitives_aura::Slot;
|
||||
use cumulus_primitives_core::BlockT;
|
||||
use pezcumulus_primitives_aura::Slot;
|
||||
use pezcumulus_primitives_core::BlockT;
|
||||
use pezsc_client_api::UsageProvider;
|
||||
use pezsc_consensus_aura::SlotDuration;
|
||||
use pezsp_api::ProvideRuntimeApi;
|
||||
|
||||
@@ -21,8 +21,8 @@ use super::{
|
||||
};
|
||||
use async_trait::async_trait;
|
||||
use codec::Encode;
|
||||
use cumulus_primitives_core::{ClaimQueueOffset, CoreInfo, CoreSelector, CumulusDigestItem};
|
||||
use cumulus_relay_chain_interface::*;
|
||||
use pezcumulus_primitives_core::{ClaimQueueOffset, CoreInfo, CoreSelector, CumulusDigestItem};
|
||||
use pezcumulus_relay_chain_interface::*;
|
||||
use futures::Stream;
|
||||
use pezkuwi_node_subsystem_util::runtime::ClaimQueueSnapshot;
|
||||
use pezkuwi_primitives::{
|
||||
@@ -191,7 +191,7 @@ async fn determine_core_with_core_info() {
|
||||
let mut digest = pezsp_runtime::generic::Digest::default();
|
||||
digest.push(CumulusDigestItem::CoreInfo(core_info).to_digest_item());
|
||||
// Add relay parent storage root to make it a non-new relay parent
|
||||
digest.push(cumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
digest.push(pezcumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
*relay_parent.state_root(),
|
||||
*relay_parent.number(),
|
||||
));
|
||||
@@ -270,7 +270,7 @@ async fn determine_core_selector_overflow() {
|
||||
let mut digest = pezsp_runtime::generic::Digest::default();
|
||||
digest.push(CumulusDigestItem::CoreInfo(core_info).to_digest_item());
|
||||
// Add relay parent storage root to make it a non-new relay parent
|
||||
digest.push(cumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
digest.push(pezcumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
*relay_parent.state_root(),
|
||||
*relay_parent.number(),
|
||||
));
|
||||
@@ -310,7 +310,7 @@ async fn determine_core_uses_last_claimed_core_selector() {
|
||||
// Create a para parent header without core info in digest (non-genesis)
|
||||
// Need to add relay parent storage root to digest to make it a non-new relay parent
|
||||
let mut digest = pezsp_runtime::generic::Digest::default();
|
||||
digest.push(cumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
digest.push(pezcumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
*relay_parent.state_root(),
|
||||
*relay_parent.number(),
|
||||
));
|
||||
@@ -362,7 +362,7 @@ async fn determine_core_uses_last_claimed_core_selector_wraps_around() {
|
||||
// Create a para parent header without core info in digest (non-genesis)
|
||||
// Need to add relay parent storage root to digest to make it a non-new relay parent
|
||||
let mut digest = pezsp_runtime::generic::Digest::default();
|
||||
digest.push(cumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
digest.push(pezcumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
*relay_parent.state_root(),
|
||||
*relay_parent.number(),
|
||||
));
|
||||
@@ -412,7 +412,7 @@ async fn determine_core_no_last_claimed_core_selector() {
|
||||
// Create a para parent header without core info in digest (non-genesis)
|
||||
// Need to add relay parent storage root to digest to make it a non-new relay parent
|
||||
let mut digest = pezsp_runtime::generic::Digest::default();
|
||||
digest.push(cumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
digest.push(pezcumulus_primitives_core::rpsr_digest::relay_parent_storage_root_item(
|
||||
*relay_parent.state_root(),
|
||||
*relay_parent.number(),
|
||||
));
|
||||
@@ -492,7 +492,7 @@ impl RelayChainInterface for TestRelayClient {
|
||||
_: ParaId,
|
||||
_: OccupiedCoreAssumption,
|
||||
) -> RelayChainResult<Option<PersistedValidationData>> {
|
||||
use cumulus_primitives_core::PersistedValidationData;
|
||||
use pezcumulus_primitives_core::PersistedValidationData;
|
||||
Ok(Some(PersistedValidationData {
|
||||
parent_head: Default::default(),
|
||||
relay_parent_number: 100,
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
/// may see equivocations in a different order, and therefore may not agree on which blocks
|
||||
/// should be thrown out and which ones should be kept.
|
||||
use codec::Codec;
|
||||
use cumulus_client_consensus_common::TeyrchainBlockImportMarker;
|
||||
use cumulus_primitives_core::{CumulusDigestItem, RelayBlockIdentifier};
|
||||
use pezcumulus_client_consensus_common::TeyrchainBlockImportMarker;
|
||||
use pezcumulus_primitives_core::{CumulusDigestItem, RelayBlockIdentifier};
|
||||
use parking_lot::Mutex;
|
||||
use pezkuwi_primitives::Hash as RHash;
|
||||
use pezsc_consensus::{
|
||||
@@ -305,11 +305,11 @@ where
|
||||
mod test {
|
||||
use super::*;
|
||||
use codec::Encode;
|
||||
use cumulus_test_client::{
|
||||
use pezcumulus_test_client::{
|
||||
runtime::Block, seal_block, Client, InitBlockBuilder, TestClientBuilder,
|
||||
TestClientBuilderExt,
|
||||
};
|
||||
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use pezcumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use futures::FutureExt;
|
||||
use pezkuwi_primitives::{HeadData, PersistedValidationData};
|
||||
use pezsc_client_api::HeaderBackend;
|
||||
@@ -336,7 +336,7 @@ mod test {
|
||||
let genesis = client.info().best_hash;
|
||||
let mut sproof = RelayStateSproofBuilder::default();
|
||||
sproof.included_para_head = Some(HeadData(client.header(genesis).unwrap().encode()));
|
||||
sproof.para_id = cumulus_test_client::runtime::TEYRCHAIN_ID.into();
|
||||
sproof.para_id = pezcumulus_test_client::runtime::TEYRCHAIN_ID.into();
|
||||
|
||||
let validation_data = PersistedValidationData {
|
||||
relay_parent_number: 1,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//! Teyrchain specific wrapper for the AuRa import queue.
|
||||
|
||||
use codec::Codec;
|
||||
use cumulus_client_consensus_common::TeyrchainBlockImportMarker;
|
||||
use pezcumulus_client_consensus_common::TeyrchainBlockImportMarker;
|
||||
use prometheus_endpoint::Registry;
|
||||
use pezsc_client_api::{backend::AuxStore, BlockOf, UsageProvider};
|
||||
use pezsc_consensus::{import_queue::DefaultImportQueue, BlockImport};
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
//! For more information about AuRa, the Bizinikiwi crate should be checked.
|
||||
|
||||
use codec::Encode;
|
||||
use cumulus_primitives_core::PersistedValidationData;
|
||||
use pezcumulus_primitives_core::PersistedValidationData;
|
||||
|
||||
use cumulus_primitives_core::relay_chain::HeadData;
|
||||
use pezcumulus_primitives_core::relay_chain::HeadData;
|
||||
use pezkuwi_primitives::{BlockNumber as RBlockNumber, Hash as RHash};
|
||||
use pezsp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use std::{fs, fs::File, path::PathBuf};
|
||||
|
||||
Reference in New Issue
Block a user