Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d0aac4c
create a v1 primitives module
rphmeier Jul 9, 2020
db8a5de
Improve guide on availability types
rphmeier Jul 9, 2020
1312093
punctuate
rphmeier Jul 9, 2020
cbd848a
new parachains runtime uses new primitives
rphmeier Jul 9, 2020
14425bd
tests of new runtime now use new primitives
rphmeier Jul 9, 2020
8313f46
add ErasureChunk to guide
rphmeier Jul 9, 2020
7794af4
export erasure chunk from v1 primitives
rphmeier Jul 9, 2020
888fee0
subsystem crate uses v1 primitives
rphmeier Jul 9, 2020
25e7acf
node-primitives uses new v1 primitives
rphmeier Jul 9, 2020
3872d3e
port overseer to new primitives
rphmeier Jul 9, 2020
53cd37f
new-proposer uses v1 primitives (no ParachainHost anymore)
rphmeier Jul 9, 2020
072c5fe
fix no-std compilation for primitives
rphmeier Jul 9, 2020
5dc4aa7
service-new uses v1 primitives
rphmeier Jul 9, 2020
e0b0a31
network-bridge uses new primitives
rphmeier Jul 9, 2020
d066d3e
statement distribution uses v1 primitives
rphmeier Jul 9, 2020
09c81f8
PoV distribution uses v1 primitives; add PoV::hash fn
rphmeier Jul 9, 2020
438474f
move parachain to v0
rphmeier Jul 9, 2020
6189c4c
remove inclusion_inherent module and place into v1
rphmeier Jul 9, 2020
0aeee53
remove everything from primitives crate root
rphmeier Jul 9, 2020
9cb6238
remove some unused old types from v0 primitives
rphmeier Jul 9, 2020
55956a8
point everything else at primitives::v0
rphmeier Jul 9, 2020
25719ce
squanch some warns up
rphmeier Jul 9, 2020
e5cf500
add RuntimeDebug import to no-std as well
rphmeier Jul 9, 2020
023a1d4
Merge branch 'master' into rh-primitives-refactor
rphmeier Jul 9, 2020
1af103e
Merge branch 'master' into rh-primitives-refactor
rphmeier Jul 9, 2020
0d3013f
port over statement-table and validation
rphmeier Jul 9, 2020
8c2403f
fix final errors in validation and node-primitives
rphmeier Jul 9, 2020
3347e7f
add dummy Ord impl to committed candidate receipt
rphmeier Jul 9, 2020
b241140
guide: update CandidateValidationMessage
rphmeier Jul 9, 2020
c70badd
add primitive for validationoutputs
rphmeier Jul 9, 2020
43e8e30
expand CandidateValidationMessage further
rphmeier Jul 9, 2020
935d536
bikeshed
rphmeier Jul 9, 2020
3ec9437
add some impls to omitted-validation-data and available-data
rphmeier Jul 9, 2020
821c556
expand CandidateValidationMessage
rphmeier Jul 9, 2020
dc7cd08
make erasure-coding generic over v1/v0
rphmeier Jul 9, 2020
6306116
update usages of erasure-coding
rphmeier Jul 9, 2020
1bd4809
implement commitments.hash()
rphmeier Jul 9, 2020
afd20dd
use Arc<Pov> for CandidateValidation
rphmeier Jul 9, 2020
0fbbc42
improve new erasure-coding method names
rphmeier Jul 9, 2020
beb0dc4
fix up candidate backing
rphmeier Jul 9, 2020
d69770c
update docs a bit
rphmeier Jul 10, 2020
bbc2ea1
fix most tests and add short-circuiting to make_pov_available
rphmeier Jul 10, 2020
4015271
fix remainder of candidate backing tests
rphmeier Jul 10, 2020
c8b0af4
squanching warns
rphmeier Jul 10, 2020
8e5e35d
squanch it up
rphmeier Jul 10, 2020
5d352cc
some fallout
rphmeier Jul 10, 2020
9370455
overseer fallout
rphmeier Jul 10, 2020
60c3bb0
free from polkadot-test-service hell
rphmeier Jul 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
service-new uses v1 primitives
  • Loading branch information
rphmeier committed Jul 9, 2020
commit 5dc4aa7026364db4ecd1eac2c40741a343c525d3
6 changes: 3 additions & 3 deletions node/service/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Polkadot chain configurations.

use sp_core::{Pair, Public, crypto::UncheckedInto, sr25519};
use polkadot_primitives::{AccountId, AccountPublic, parachain::ValidatorId};
use polkadot_primitives::v1::{AccountId, AccountPublic, ValidatorId};
use polkadot_runtime as polkadot;
use kusama_runtime as kusama;
use westend_runtime as westend;
Expand Down Expand Up @@ -48,9 +48,9 @@ const DEFAULT_PROTOCOL_ID: &str = "dot";
#[serde(rename_all = "camelCase")]
pub struct Extensions {
/// Block numbers with known hashes.
pub fork_blocks: sc_client_api::ForkBlocks<polkadot_primitives::Block>,
pub fork_blocks: sc_client_api::ForkBlocks<polkadot_primitives::v1::Block>,
/// Known bad block hashes.
pub bad_blocks: sc_client_api::BadBlocks<polkadot_primitives::Block>,
pub bad_blocks: sc_client_api::BadBlocks<polkadot_primitives::v1::Block>,
}

/// The `ChainSpec parametrised for polkadot runtime`.
Expand Down
4 changes: 2 additions & 2 deletions node/service/src/grandpa_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//! Polkadot-specific GRANDPA integration utilities.

use polkadot_primitives::Hash;
use polkadot_primitives::v1::Hash;
use sp_runtime::traits::{Block as BlockT, NumberFor};

/// A custom GRANDPA voting rule that "pauses" voting (i.e. keeps voting for the
Expand Down Expand Up @@ -98,7 +98,7 @@ impl<Block, B> grandpa::VotingRule<Block, B> for PauseAfterBlockFor<NumberFor<Bl
/// #1500988).
pub(crate) fn kusama_hard_forks() -> Vec<(
grandpa_primitives::SetId,
(Hash, polkadot_primitives::BlockNumber),
(Hash, polkadot_primitives::v1::BlockNumber),
grandpa_primitives::AuthorityList,
)> {
use sp_core::crypto::Ss58Codec;
Expand Down
14 changes: 6 additions & 8 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mod client;

use std::sync::Arc;
use std::time::Duration;
use polkadot_primitives::{parachain, AccountId, Nonce, Balance};
use polkadot_primitives::v1::{AccountId, Nonce, Balance};
#[cfg(feature = "full-node")]
use service::{error::Error as ServiceError, ServiceBuilder};
use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider};
Expand All @@ -48,7 +48,7 @@ pub use sc_consensus::LongestChain;
pub use sp_api::{ApiRef, Core as CoreApi, ConstructRuntimeApi, ProvideRuntimeApi, StateBackend};
pub use sp_runtime::traits::{DigestFor, HashFor, NumberFor};
pub use consensus_common::{Proposal, SelectChain, BlockImport, RecordProof, block_validation::Chain};
pub use polkadot_primitives::parachain::{CollatorId, ParachainHost};
pub use polkadot_primitives::v1::{CollatorId, Id as ParaId};
pub use polkadot_primitives::{Block, BlockId};
pub use sp_runtime::traits::{Block as BlockT, self as runtime_traits, BlakeTwo256};
pub use chain_spec::{PolkadotChainSpec, KusamaChainSpec, WestendChainSpec};
Expand Down Expand Up @@ -87,7 +87,6 @@ pub trait RuntimeApiCollection<Extrinsic: codec::Codec + Send + Sync + 'static>:
+ sp_api::ApiExt<Block, Error = sp_blockchain::Error>
+ babe_primitives::BabeApi<Block>
+ grandpa_primitives::GrandpaApi<Block>
+ ParachainHost<Block>
+ sp_block_builder::BlockBuilder<Block>
+ system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance, Extrinsic>
Expand All @@ -107,7 +106,6 @@ where
+ sp_api::ApiExt<Block, Error = sp_blockchain::Error>
+ babe_primitives::BabeApi<Block>
+ grandpa_primitives::GrandpaApi<Block>
+ ParachainHost<Block>
+ sp_block_builder::BlockBuilder<Block>
+ system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance, Extrinsic>
Expand Down Expand Up @@ -589,7 +587,7 @@ macro_rules! new_light {
/// Builds a new object suitable for chain operations.
pub fn new_chain_ops<Runtime, Dispatch, Extrinsic>(mut config: Configuration) -> Result<
(
Arc<service::TFullClient<Block, Runtime, Dispatch>>,
Arc<service::TFullClient<Block, Runtime, Dispatch>>,
Arc<TFullBackend<Block>>,
consensus_common::import_queue::BasicQueue<Block, PrefixedMemoryDB<BlakeTwo256>>,
TaskManager,
Expand All @@ -612,7 +610,7 @@ where
#[cfg(feature = "full-node")]
pub fn polkadot_new_full(
mut config: Configuration,
collating_for: Option<(CollatorId, parachain::Id)>,
collating_for: Option<(CollatorId, ParaId)>,
_max_block_data_size: Option<u64>,
_authority_discovery_enabled: bool,
_slot_duration: u64,
Expand Down Expand Up @@ -644,7 +642,7 @@ pub fn polkadot_new_full(
#[cfg(feature = "full-node")]
pub fn kusama_new_full(
mut config: Configuration,
collating_for: Option<(CollatorId, parachain::Id)>,
collating_for: Option<(CollatorId, ParaId)>,
_max_block_data_size: Option<u64>,
_authority_discovery_enabled: bool,
_slot_duration: u64,
Expand Down Expand Up @@ -676,7 +674,7 @@ pub fn kusama_new_full(
#[cfg(feature = "full-node")]
pub fn westend_new_full(
mut config: Configuration,
collating_for: Option<(CollatorId, parachain::Id)>,
collating_for: Option<(CollatorId, ParaId)>,
_max_block_data_size: Option<u64>,
_authority_discovery_enabled: bool,
_slot_duration: u64,
Expand Down