fix for latest substrate crate renaming (#641)

* rename crates as appropriate

* Rename to use master - easy to revert, but shows it's working

* Bump runtime version

* Bump version

* Bump Substrate again
This commit is contained in:
Benjamin Kampmann
2019-12-02 16:56:50 +01:00
committed by Gavin Wood
parent 0c1ef33541
commit 7832ad93cd
50 changed files with 1741 additions and 1741 deletions
+1494 -1494
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,7 +4,7 @@ path = "src/main.rs"
[package]
name = "polkadot"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
edition = "2018"
+2 -2
View File
@@ -1,7 +1,7 @@
[package]
name = "polkadot-availability-store"
description = "Persistent database for parachain data"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -10,7 +10,7 @@ polkadot-primitives = { path = "../primitives" }
parking_lot = "0.9.0"
log = "0.4.8"
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
kvdb = "0.1.1"
kvdb-memorydb = "0.1.2"
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-cli"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot node implementation in Rust."
edition = "2018"
@@ -11,7 +11,7 @@ tokio = "0.1.22"
futures = { version = "0.3.1", features = ["compat"] }
futures01 = { package = "futures", version = "0.1.29" }
structopt = "0.3.4"
cli = { package = "substrate-cli", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
cli = { package = "sc-cli", git = "https://github.com/paritytech/substrate", branch = "master" }
service = { package = "polkadot-service", path = "../service" }
[features]
+7 -7
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-collator"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Collator node implementation"
edition = "2018"
@@ -8,11 +8,11 @@ edition = "2018"
[dependencies]
futures01 = { package = "futures", version = "0.1.17" }
futures = { version = "0.3.1", features = ["compat"] }
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client-api = { package = "substrate-client-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
primitives = { package = "substrate-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
consensus_common = { package = "substrate-consensus-common", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client = { package = "sc-client", git = "https://github.com/paritytech/substrate", branch = "master" }
client-api = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-runtime = { path = "../runtime" }
polkadot-primitives = { path = "../primitives" }
polkadot-cli = { path = "../cli" }
@@ -24,4 +24,4 @@ tokio = "0.1.22"
futures-timer = "1.0"
[dev-dependencies]
keyring = { package = "substrate-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
+1 -1
View File
@@ -74,7 +74,7 @@ pub use polkadot_cli::{VersionInfo, TaskExecutor};
pub use polkadot_network::validation::Incoming;
pub use polkadot_validation::SignedStatement;
pub use polkadot_primitives::parachain::CollatorId;
pub use substrate_network::PeerId;
pub use sc_network::PeerId;
const COLLATION_TIMEOUT: Duration = Duration::from_secs(30);
+3 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-erasure-coding"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -8,5 +8,5 @@ edition = "2018"
primitives = { package = "polkadot-primitives", path = "../primitives" }
reed_solomon = { package = "reed-solomon-erasure", git = "https://github.com/paritytech/reed-solomon-erasure" }
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
trie = { package = "substrate-trie", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" }
+1 -1
View File
@@ -28,7 +28,7 @@ use codec::{Encode, Decode};
use reed_solomon::galois_16::{self, ReedSolomon};
use primitives::{Hash as H256, BlakeTwo256, HashT};
use primitives::parachain::{BlockData, OutgoingMessages};
use substrate_primitives::Blake2Hasher;
use sp_core::Blake2Hasher;
use trie::{EMPTY_PREFIX, MemoryDB, Trie, TrieMut, trie_types::{TrieDBMut, TrieDB}};
use self::wrapped_shard::WrappedShard;
+2 -2
View File
@@ -1,10 +1,10 @@
[package]
name = "polkadot-executor"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot node implementation in Rust."
edition = "2018"
[dependencies]
substrate-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-runtime = { path = "../runtime" }
+1 -1
View File
@@ -17,7 +17,7 @@
//! A `CodeExecutor` specialisation which uses natively compiled runtime when the wasm to be
//! executed is equivalent to the natively compiled code.
use substrate_executor::native_executor_instance;
use sc_executor::native_executor_instance;
native_executor_instance!(
pub Executor,
+8 -8
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-network"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Polkadot-specific networking protocol"
edition = "2018"
@@ -12,16 +12,16 @@ av_store = { package = "polkadot-availability-store", path = "../availability-st
polkadot-validation = { path = "../validation" }
polkadot-primitives = { path = "../primitives" }
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
substrate-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sr-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
futures = "0.1"
futures03 = { package = "futures", version = "0.3.1", features = ["compat"] }
log = "0.4.8"
exit-future = "0.1.4"
substrate-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sc-client = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
[dev-dependencies]
substrate-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
+2 -2
View File
@@ -19,7 +19,7 @@
use codec::{Encode, Decode};
use polkadot_primitives::Hash;
use polkadot_primitives::parachain::{CollatorId, Id as ParaId, Collation};
use substrate_network::PeerId;
use sc_network::PeerId;
use futures::sync::oneshot;
use std::collections::hash_map::{HashMap, Entry};
@@ -226,7 +226,7 @@ impl CollatorPool {
#[cfg(test)]
mod tests {
use super::*;
use substrate_primitives::crypto::UncheckedInto;
use sp_core::crypto::UncheckedInto;
use polkadot_primitives::parachain::{
CandidateReceipt, BlockData, PoVBlock, HeadData, ConsolidatedIngress,
};
+8 -8
View File
@@ -49,10 +49,10 @@
//! Peers who send information which was not allowed under a recent neighbor packet
//! will be noted as non-beneficial to Substrate's peer-set management utility.
use sr_primitives::{generic::BlockId, traits::ProvideRuntimeApi};
use sp_runtime::{generic::BlockId, traits::ProvideRuntimeApi};
use sp_blockchain::Error as ClientError;
use substrate_network::{config::Roles, PeerId};
use substrate_network::consensus_gossip::{
use sc_network::{config::Roles, PeerId};
use sc_network::consensus_gossip::{
self as network_gossip, ValidationResult as GossipValidationResult,
ValidatorContext, MessageIntent, ConsensusMessage,
};
@@ -78,7 +78,7 @@ mod attestation;
mod message_routing;
/// The engine ID of the polkadot attestation system.
pub const POLKADOT_ENGINE_ID: sr_primitives::ConsensusEngineId = *b"dot1";
pub const POLKADOT_ENGINE_ID: sp_runtime::ConsensusEngineId = *b"dot1";
// arbitrary; in practice this should not be more than 2.
pub(crate) const MAX_CHAIN_HEADS: usize = 5;
@@ -330,7 +330,7 @@ impl NewLeafActions {
pub fn perform(
self,
gossip: &mut dyn crate::GossipService,
ctx: &mut dyn substrate_network::Context<Block>,
ctx: &mut dyn sc_network::Context<Block>,
) {
for action in self.actions {
match action {
@@ -655,12 +655,12 @@ impl<C: ChainContext + ?Sized> network_gossip::Validator<Block> for MessageValid
#[cfg(test)]
mod tests {
use super::*;
use substrate_network::consensus_gossip::Validator as ValidatorT;
use sc_network::consensus_gossip::Validator as ValidatorT;
use std::sync::mpsc;
use parking_lot::Mutex;
use polkadot_primitives::parachain::{CandidateReceipt, HeadData};
use substrate_primitives::crypto::UncheckedInto;
use substrate_primitives::sr25519::{Public as Sr25519Public, Signature as Sr25519Signature};
use sp_core::crypto::UncheckedInto;
use sp_core::sr25519::{Public as Sr25519Public, Signature as Sr25519Signature};
use polkadot_validation::GenericStatement;
use super::message_routing::queue_topic;
+1 -1
View File
@@ -30,7 +30,7 @@
//! a `Candidate` we are aware of. Otherwise, it is possible we could be forced to
//! consider an infinite amount of attestations produced by a misbehaving validator.
use substrate_network::consensus_gossip::{ValidationResult as GossipValidationResult};
use sc_network::consensus_gossip::{ValidationResult as GossipValidationResult};
use polkadot_validation::GenericStatement;
use polkadot_primitives::Hash;
@@ -60,7 +60,7 @@
//! We prune messages that are not un-routed from the view of any leaf and cease
//! to attempt to send them to any peer.
use sr_primitives::traits::{BlakeTwo256, Hash as HashT};
use sp_runtime::traits::{BlakeTwo256, Hash as HashT};
use polkadot_primitives::Hash;
use std::collections::{HashMap, HashSet};
use sp_blockchain::Error as ClientError;
+4 -4
View File
@@ -34,11 +34,11 @@ use polkadot_primitives::parachain::{
Id as ParaId, BlockData, CollatorId, CandidateReceipt, Collation, PoVBlock,
StructuredUnroutedIngress, ValidatorId, OutgoingMessages,
};
use substrate_network::{
use sc_network::{
PeerId, RequestId, Context, StatusMessage as GenericFullStatus,
specialization::NetworkSpecialization as Specialization,
};
use substrate_network::consensus_gossip::{
use sc_network::consensus_gossip::{
self, TopicNotification, MessageRecipient as GossipMessageRecipient, ConsensusMessage,
};
use self::validation::{LiveValidationLeaves, RecentValidatorIds, InsertedRecentKey};
@@ -76,7 +76,7 @@ mod benefit {
type FullStatus = GenericFullStatus<Block>;
/// Specialization of the network service for the polkadot protocol.
pub type PolkadotNetworkService = substrate_network::NetworkService<Block, PolkadotProtocol, Hash>;
pub type PolkadotNetworkService = sc_network::NetworkService<Block, PolkadotProtocol, Hash>;
/// Basic functionality that a network has to fulfill.
pub trait NetworkService: Send + Sync + 'static {
@@ -588,7 +588,7 @@ impl Specialization<Block> for PolkadotProtocol {
let local_status = Status::decode(&mut &status.chain_status[..])
.unwrap_or_else(|_| Status { collating_for: None });
let validator = status.roles.contains(substrate_network::config::Roles::AUTHORITY);
let validator = status.roles.contains(sc_network::config::Roles::AUTHORITY);
let mut peer_info = PeerInfo {
collating_for: local_status.collating_for.clone(),
+1 -1
View File
@@ -128,7 +128,7 @@ impl<C: Clone> LocalCollations<C> {
#[cfg(test)]
mod tests {
use super::*;
use substrate_primitives::crypto::UncheckedInto;
use sp_core::crypto::UncheckedInto;
use polkadot_primitives::parachain::ValidatorId;
#[test]
+1 -1
View File
@@ -23,7 +23,7 @@
//! the `TableRouter` trait from `polkadot-validation`, which is expected to call into a shared statement table
//! and dispatch evaluation work as necessary when new statements come in.
use sr_primitives::traits::{ProvideRuntimeApi, BlakeTwo256, Hash as HashT};
use sp_runtime::traits::{ProvideRuntimeApi, BlakeTwo256, Hash as HashT};
use polkadot_validation::{
SharedTable, TableRouter, SignedStatement, GenericStatement, ParachainWork, Validated
};
+2 -2
View File
@@ -26,9 +26,9 @@ use polkadot_primitives::parachain::{
CandidateReceipt, HeadData, PoVBlock, BlockData, CollatorId, ValidatorId,
StructuredUnroutedIngress
};
use substrate_primitives::crypto::UncheckedInto;
use sp_core::crypto::UncheckedInto;
use codec::Encode;
use substrate_network::{
use sc_network::{
PeerId, Context, config::Roles, message::generic::ConsensusMessage,
specialization::NetworkSpecialization,
};
+7 -7
View File
@@ -19,10 +19,10 @@
#![allow(unused)]
use crate::gossip::GossipMessage;
use substrate_network::Context as NetContext;
use substrate_network::consensus_gossip::TopicNotification;
use substrate_primitives::{NativeOrEncoded, ExecutionContext};
use substrate_keyring::Sr25519Keyring;
use sc_network::Context as NetContext;
use sc_network::consensus_gossip::TopicNotification;
use sp_core::{NativeOrEncoded, ExecutionContext};
use sp_keyring::Sr25519Keyring;
use crate::{GossipService, PolkadotProtocol, NetworkService, GossipMessageStream};
use polkadot_validation::{SharedTable, Network};
@@ -34,8 +34,8 @@ use polkadot_primitives::parachain::{
};
use parking_lot::Mutex;
use sp_blockchain::Result as ClientResult;
use sr_api::{Core, RuntimeVersion, StorageProof, ApiExt};
use sr_primitives::traits::{ApiRef, ProvideRuntimeApi};
use sp_api::{Core, RuntimeVersion, StorageProof, ApiExt};
use sp_runtime::traits::{ApiRef, ProvideRuntimeApi};
use std::collections::HashMap;
use std::sync::Arc;
@@ -401,7 +401,7 @@ impl IngressBuilder {
fn make_table(data: &ApiData, local_key: &Sr25519Keyring, parent_hash: Hash) -> Arc<SharedTable> {
use av_store::Store;
use substrate_primitives::crypto::Pair;
use sp_core::crypto::Pair;
let sr_pair = local_key.pair();
let local_key = polkadot_primitives::parachain::ValidatorPair::from(local_key.pair());
+3 -3
View File
@@ -19,8 +19,8 @@
//! This fulfills the `polkadot_validation::Network` trait, providing a hook to be called
//! each time validation leaf work begins on a new chain head.
use sr_primitives::traits::ProvideRuntimeApi;
use substrate_network::PeerId;
use sp_runtime::traits::ProvideRuntimeApi;
use sc_network::PeerId;
use polkadot_validation::{
Network as ParachainNetwork, SharedTable, Collators, Statement, GenericStatement, SignedStatement,
};
@@ -706,7 +706,7 @@ impl<P: ProvideRuntimeApi + Send, E, N, T> LeafWorkDataFetcher<P, E, N, T> where
#[cfg(test)]
mod tests {
use super::*;
use substrate_primitives::crypto::UncheckedInto;
use sp_core::crypto::UncheckedInto;
#[test]
fn last_keys_works() {
+4 -4
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-parachain"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Types and utilities for creating and working with parachains"
edition = "2018"
@@ -10,8 +10,8 @@ codec = { package = "parity-scale-codec", version = "1.1.0", default-features =
wasmi = { version = "0.4.5", optional = true }
derive_more = { version = "0.14.1", optional = true }
serde = { version = "1.0.102", default-features = false, features = [ "derive" ] }
rstd = { package = "sr-std", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
lazy_static = { version = "1.4.0", optional = true }
parking_lot = { version = "0.7.1", optional = true }
log = { version = "0.4.8", optional = true }
@@ -34,7 +34,7 @@ std = [
"serde/std",
"rstd/std",
"shared_memory",
"substrate-primitives/std",
"sp-core/std",
"lazy_static",
"parking_lot",
"log"
+2 -2
View File
@@ -54,7 +54,7 @@ pub mod wasm_api;
use rstd::vec::Vec;
use codec::{Encode, Decode, CompactAs};
use substrate_primitives::{RuntimeDebug, TypeId};
use sp_core::{RuntimeDebug, TypeId};
/// Validation parameters for evaluating the parachain validity function.
// TODO: balance downloads (https://github.com/paritytech/polkadot/issues/220)
@@ -127,7 +127,7 @@ impl rstd::ops::Add<u32> for Id {
}
}
// TODO: Remove all of this, move sr-primitives::AccountIdConversion to own crate and and use that.
// TODO: Remove all of this, move sp-runtime::AccountIdConversion to own crate and and use that.
// #360
struct TrailingZeroInput<'a>(&'a [u8]);
impl<'a> codec::Input for TrailingZeroInput<'a> {
+11 -11
View File
@@ -1,24 +1,24 @@
[package]
name = "polkadot-primitives"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
serde = { version = "1.0.102", optional = true, features = ["derive"] }
parity-scale-codec = { version = "1.1.0", default-features = false, features = ["bit-vec", "derive"] }
primitives = { package = "substrate-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
application-crypto = { package = "substrate-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
sr-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
rstd = { package = "sr-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
runtime_primitives = { package = "sr-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
application-crypto = { package = "sc-application-crypto", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
polkadot-parachain = { path = "../parachain", default-features = false }
bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
[dev-dependencies]
substrate-serializer = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-serializer = { git = "https://github.com/paritytech/substrate", branch = "master" }
pretty_assertions = "0.5.1"
[features]
@@ -26,9 +26,9 @@ default = ["std"]
std = [
"parity-scale-codec/std",
"primitives/std",
"sr-api/std",
"sp-api/std",
"rstd/std",
"sr-version/std",
"sp-version/std",
"runtime_primitives/std",
"serde",
"polkadot-parachain/std",
+2 -2
View File
@@ -483,7 +483,7 @@ pub struct Status {
pub fee_schedule: FeeSchedule,
}
sr_api::decl_runtime_apis! {
sp_api::decl_runtime_apis! {
/// The API for querying the state of parachains on-chain.
pub trait ParachainHost {
/// Get the current validators.
@@ -507,7 +507,7 @@ sr_api::decl_runtime_apis! {
/// Runtime ID module.
pub mod id {
use sr_version::ApiId;
use sp_version::ApiId;
/// Parachain host runtime API id.
pub const PARACHAIN_HOST: ApiId = *b"parahost";
+7 -7
View File
@@ -1,17 +1,17 @@
[package]
name = "polkadot-rpc"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client = { package = "sc-client", git = "https://github.com/paritytech/substrate", branch = "master" }
jsonrpc-core = "14.0.3"
polkadot-primitives = { path = "../primitives" }
sr-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
txpool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
txpool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "master" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-runtime = { path = "../runtime" }
+2 -2
View File
@@ -21,12 +21,12 @@
use std::sync::Arc;
use polkadot_primitives::{Block, AccountId, Nonce, Balance};
use sr_primitives::traits::ProvideRuntimeApi;
use sp_runtime::traits::ProvideRuntimeApi;
use txpool_api::TransactionPool;
use polkadot_runtime::UncheckedExtrinsic;
/// A type representing all RPC extensions.
pub type RpcExtension = jsonrpc_core::IoHandler<substrate_rpc::Metadata>;
pub type RpcExtension = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
/// Instantiate all RPC extensions.
pub fn create_full<C, P>(client: Arc<C>, pool: Arc<P>) -> RpcExtension where
+51 -51
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-runtime"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
build = "build.rs"
@@ -14,49 +14,49 @@ safe-mix = { version = "1.0.0", default-features = false }
serde = { version = "1.0.102", default-features = false }
serde_derive = { version = "1.0.102", optional = true }
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
babe-primitives = { package = "substrate-consensus-babe-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
inherents = { package = "substrate-inherents", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
offchain-primitives = { package = "substrate-offchain-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
rstd = { package = "sr-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sr-staking-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-primitives = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-serializer = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
substrate-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
version = { package = "sr-version", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
tx-pool-api = { package = "sp-transaction-pool-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
block-builder-api = { package = "substrate-block-builder-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-serializer = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-sesssion = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
version = { package = "sp-version", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
tx-pool-api = { package = "sp-transaction-pool-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
authority-discovery = { package = "pallet-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
transaction-payment = { package = "pallet-transaction-payment", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
collective = { package = "pallet-collective", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", default-features = false, features = ["migrate-authorities"], branch = "polkadot-master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
membership = { package = "pallet-membership", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
nicks = { package = "pallet-nicks", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
offences = { package = "pallet-offences", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
session = { package = "pallet-session", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
staking = { package = "pallet-staking", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
system = { package = "frame-system", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authority-discovery = { package = "pallet-authority-discovery", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
transaction-payment = { package = "pallet-transaction-payment", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
collective = { package = "pallet-collective", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", default-features = false, features = ["migrate-authorities"], branch = "master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
membership = { package = "pallet-membership", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
nicks = { package = "pallet-nicks", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
offences = { package = "pallet-offences", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
session = { package = "pallet-session", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
staking = { package = "pallet-staking", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-staking-reward-curve = { git = "https://github.com/paritytech/substrate", branch = "master" }
sudo = { package = "pallet-sudo", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
system = { package = "frame-system", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
primitives = { package = "polkadot-primitives", path = "../primitives", default-features = false }
polkadot-parachain = { path = "../parachain", default-features = false }
@@ -65,8 +65,8 @@ polkadot-parachain = { path = "../parachain", default-features = false }
hex-literal = "0.2.1"
libsecp256k1 = "0.3.2"
tiny-keccak = "1.5.0"
keyring = { package = "substrate-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master" }
trie-db = "0.16.0"
serde_json = "1.0.41"
@@ -85,14 +85,14 @@ std = [
"rustc-hex/std",
"codec/std",
"inherents/std",
"substrate-primitives/std",
"sp-core/std",
"polkadot-parachain/std",
"sr-api/std",
"sp-api/std",
"tx-pool-api/std",
"block-builder-api/std",
"offchain-primitives/std",
"rstd/std",
"sr-io/std",
"sp-io/std",
"frame-support/std",
"authorship/std",
"balances/std",
@@ -109,8 +109,8 @@ std = [
"membership/std",
"nicks/std",
"offences/std",
"sr-primitives/std",
"sr-staking-primitives/std",
"sp-runtime/std",
"sp-staking/std",
"session/std",
"staking/std",
"sudo/std",
@@ -125,6 +125,6 @@ std = [
"safe-mix/std",
"babe/std",
"babe-primitives/std",
"substrate-session/std",
"sp-sesssion/std",
"randomness-collective-flip/std",
]
+2 -2
View File
@@ -24,8 +24,8 @@ use codec::{Encode, Decode};
use frame_support::{decl_storage, decl_module, ensure, dispatch::Result, traits::Get};
use primitives::{Hash, parachain::{AttestedCandidate, CandidateReceipt, Id as ParaId}};
use sr_primitives::RuntimeDebug;
use sr_staking_primitives::SessionIndex;
use sp_runtime::RuntimeDebug;
use sp_staking::SessionIndex;
use inherents::{ProvideInherent, InherentData, MakeFatalError, InherentIdentifier};
use system::ensure_none;
+8 -8
View File
@@ -17,7 +17,7 @@
//! Module to process claims from Ethereum addresses.
use rstd::prelude::*;
use sr_io::{hashing::keccak_256, crypto::secp256k1_ecdsa_recover};
use sp_io::{hashing::keccak_256, crypto::secp256k1_ecdsa_recover};
use frame_support::{decl_event, decl_storage, decl_module};
use frame_support::weights::SimpleDispatchInfo;
use frame_support::traits::{Currency, Get};
@@ -26,8 +26,8 @@ use codec::{Encode, Decode};
#[cfg(feature = "std")]
use serde::{self, Serialize, Deserialize, Serializer, Deserializer};
#[cfg(feature = "std")]
use sr_primitives::traits::Zero;
use sr_primitives::{
use sp_runtime::traits::Zero;
use sp_runtime::{
RuntimeDebug, transaction_validity::{
TransactionLongevity, TransactionValidity, ValidTransaction, InvalidTransaction
},
@@ -200,7 +200,7 @@ impl<T: Trait> Module<T> {
}
#[allow(deprecated)] // Allow `ValidateUnsigned`
impl<T: Trait> sr_primitives::traits::ValidateUnsigned for Module<T> {
impl<T: Trait> sp_runtime::traits::ValidateUnsigned for Module<T> {
type Call = Call<T>;
fn validate_unsigned(call: &Self::Call) -> TransactionValidity {
@@ -244,11 +244,11 @@ mod tests {
use hex_literal::hex;
use super::*;
use substrate_primitives::H256;
use sp_core::H256;
use codec::Encode;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sr_primitives::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use balances;
use frame_support::{impl_outer_origin, assert_ok, assert_err, assert_noop, parameter_types};
@@ -339,7 +339,7 @@ mod tests {
// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sr_io::TestExternalities {
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
balances::GenesisConfig::<Test>::default().assimilate_storage(&mut t).unwrap();
@@ -442,7 +442,7 @@ mod tests {
#[test]
fn validate_unsigned_works() {
#![allow(deprecated)] // Allow `ValidateUnsigned`
use sr_primitives::traits::ValidateUnsigned;
use sp_runtime::traits::ValidateUnsigned;
new_test_ext().execute_with(|| {
assert_eq!(
+1 -1
View File
@@ -50,7 +50,7 @@ pub mod time {
/// Fee-related.
pub mod fee {
pub use sr_primitives::Perbill;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
+5 -5
View File
@@ -72,14 +72,14 @@ use frame_support::{
}
};
use system::ensure_signed;
use sr_primitives::{ModuleId,
use sp_runtime::{ModuleId,
traits::{AccountIdConversion, Hash, Saturating, Zero, CheckedAdd}
};
use frame_support::weights::SimpleDispatchInfo;
use crate::slots;
use codec::{Encode, Decode};
use rstd::vec::Vec;
use substrate_primitives::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX;
use sp_core::storage::well_known_keys::CHILD_STORAGE_KEY_PREFIX;
use primitives::parachain::Id as ParaId;
const MODULE_ID: ModuleId = ModuleId(*b"py/cfund");
@@ -491,11 +491,11 @@ mod tests {
use std::{collections::HashMap, cell::RefCell};
use frame_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types};
use substrate_primitives::H256;
use sp_core::H256;
use primitives::parachain::{Info as ParaInfo, Id as ParaId};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
use sr_primitives::{
use sp_runtime::{
Perbill, Permill, testing::Header,
traits::{BlakeTwo256, OnInitialize, OnFinalize, IdentityLookup},
};
@@ -643,7 +643,7 @@ mod tests {
// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sr_io::TestExternalities {
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
balances::GenesisConfig::<Test>{
balances: vec![(1, 1000), (2, 2000), (3, 3000), (4, 4000)],
+2 -2
View File
@@ -17,8 +17,8 @@
//! Auxillary struct/enums for polkadot runtime.
use primitives::Balance;
use sr_primitives::traits::{Convert, Saturating};
use sr_primitives::{Fixed64, Perbill};
use sp_runtime::traits::{Convert, Saturating};
use sp_runtime::{Fixed64, Perbill};
use frame_support::weights::Weight;
use frame_support::traits::{OnUnbalanced, Currency, Get};
use crate::{Balances, System, Authorship, MaximumBlockWeight, NegativeImbalance};
+11 -11
View File
@@ -29,13 +29,13 @@ mod slots;
mod crowdfund;
use rstd::prelude::*;
use substrate_primitives::u32_trait::{_1, _2, _3, _4, _5};
use sp_core::u32_trait::{_1, _2, _3, _4, _5};
use codec::{Encode, Decode};
use primitives::{
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
parachain::{self, ActiveParas}, ValidityError,
};
use sr_primitives::{
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
ApplyExtrinsicResult, Permill, Perbill, RuntimeDebug,
transaction_validity::{TransactionValidity, InvalidTransaction, TransactionValidityError},
@@ -46,8 +46,8 @@ use version::RuntimeVersion;
use grandpa::{AuthorityId as GrandpaId, fg_primitives};
#[cfg(any(feature = "std", test))]
use version::NativeVersion;
use substrate_primitives::OpaqueMetadata;
use sr_staking_primitives::SessionIndex;
use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, traits::{SplitTwoWays, Currency, Randomness},
weights::{Weight, DispatchInfo},
@@ -60,7 +60,7 @@ use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
#[cfg(feature = "std")]
pub use staking::StakerStatus;
#[cfg(any(feature = "std", test))]
pub use sr_primitives::BuildStorage;
pub use sp_runtime::BuildStorage;
pub use timestamp::Call as TimestampCall;
pub use balances::Call as BalancesCall;
pub use attestations::{Call as AttestationsCall, MORE_ATTESTATIONS_IDENTIFIER};
@@ -97,7 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kusama"),
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1022,
spec_version: 1023,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
};
@@ -641,8 +641,8 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Runtime, AllModules>;
sr_api::impl_runtime_apis! {
impl sr_api::Core<Block> for Runtime {
sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
@@ -656,7 +656,7 @@ sr_api::impl_runtime_apis! {
}
}
impl sr_api::Metadata<Block> for Runtime {
impl sp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
Runtime::metadata().into()
}
@@ -694,7 +694,7 @@ sr_api::impl_runtime_apis! {
}
impl offchain_primitives::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(number: sr_primitives::traits::NumberFor<Block>) {
fn offchain_worker(number: sp_runtime::traits::NumberFor<Block>) {
Executive::offchain_worker(number)
}
}
@@ -752,7 +752,7 @@ sr_api::impl_runtime_apis! {
}
}
impl substrate_session::SessionKeys<Block> for Runtime {
impl sp_sesssion::SessionKeys<Block> for Runtime {
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
SessionKeys::generate(seed)
}
+9 -9
View File
@@ -21,7 +21,7 @@ use rstd::result;
use rstd::collections::btree_map::BTreeMap;
use codec::{Encode, Decode};
use sr_primitives::traits::{
use sp_runtime::traits::{
Hash as HashT, BlakeTwo256, Saturating, One, Zero, Dispatchable,
AccountIdConversion,
};
@@ -455,7 +455,7 @@ impl<T: Trait> Module<T> {
// same.
ordered_needs_dispatch.insert(i, id);
} else {
sr_primitives::print("ordered_needs_dispatch contains id?!");
sp_runtime::print("ordered_needs_dispatch contains id?!");
}
}
}
@@ -657,7 +657,7 @@ impl<T: Trait> Module<T> {
) -> rstd::result::Result<IncludedBlocks<T>, &'static str>
{
use primitives::parachain::ValidityAttestation;
use sr_primitives::traits::AppVerify;
use sp_runtime::traits::AppVerify;
// returns groups of slices that have the same chain ID.
// assumes the inner slice is sorted by id.
@@ -841,7 +841,7 @@ impl<T: Trait> Module<T> {
*/
}
impl<T: Trait> sr_primitives::BoundToRuntimeAppPublic for Module<T> {
impl<T: Trait> sp_runtime::BoundToRuntimeAppPublic for Module<T> {
type Public = ValidatorId;
}
@@ -901,10 +901,10 @@ mod tests {
use super::*;
use super::Call as ParachainsCall;
use bitvec::{bitvec, vec::BitVec};
use sr_io::TestExternalities;
use substrate_primitives::{H256, Blake2Hasher};
use substrate_trie::NodeCodec;
use sr_primitives::{
use sp_io::TestExternalities;
use sp_core::{H256, Blake2Hasher};
use sp_trie::NodeCodec;
use sp_runtime::{
Perbill, curve::PiecewiseLinear, testing::{UintAuthorityId, Header},
traits::{BlakeTwo256, IdentityLookup, OnInitialize, OnFinalize},
};
@@ -1038,7 +1038,7 @@ mod tests {
}
parameter_types! {
pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6;
pub const SessionsPerEra: sp_staking::SessionIndex = 6;
pub const BondingDuration: staking::EraIndex = 28;
pub const SlashDeferDuration: staking::EraIndex = 7;
pub const AttestationPeriod: BlockNumber = 100;
+6 -6
View File
@@ -23,7 +23,7 @@ use rstd::{prelude::*, result};
use rstd::marker::PhantomData;
use codec::{Encode, Decode};
use sr_primitives::{
use sp_runtime::{
transaction_validity::{TransactionValidityError, ValidTransaction, TransactionValidity},
traits::{Hash as HashT, SignedExtension}
};
@@ -39,7 +39,7 @@ use primitives::parachain::{
Retriable
};
use crate::parachains;
use sr_primitives::transaction_validity::InvalidTransaction;
use sp_runtime::transaction_validity::InvalidTransaction;
/// Parachain registration API.
pub trait Registrar<AccountId> {
@@ -178,7 +178,7 @@ decl_storage! {
#[cfg(feature = "std")]
fn build<T: Trait>(config: &GenesisConfig<T>) {
use sr_primitives::traits::Zero;
use sp_runtime::traits::Zero;
let mut p = config.parachains.clone();
p.sort_unstable_by_key(|&(ref id, _, _)| *id);
@@ -574,9 +574,9 @@ impl<T: Trait + Send + Sync> SignedExtension for LimitParathreadCommits<T> where
mod tests {
use super::*;
use bitvec::vec::BitVec;
use sr_io::TestExternalities;
use substrate_primitives::{H256, Pair};
use sr_primitives::{
use sp_io::TestExternalities;
use sp_core::{H256, Pair};
use sp_runtime::{
traits::{
BlakeTwo256, IdentityLookup, OnInitialize, OnFinalize, Dispatchable,
AccountIdConversion,
+1 -1
View File
@@ -18,7 +18,7 @@
//! represent all sub ranges between 0 and 3 inclusive.
use rstd::{result, ops::Add, convert::{TryFrom, TryInto}};
use sr_primitives::traits::CheckedSub;
use sp_runtime::traits::CheckedSub;
use codec::{Encode, Decode};
/// Total number of possible sub ranges of slots.
+4 -4
View File
@@ -19,7 +19,7 @@
//! information for commissioning and decommissioning them.
use rstd::{prelude::*, mem::swap, convert::TryInto};
use sr_primitives::traits::{
use sp_runtime::traits::{
CheckedSub, StaticLookup, Zero, One, CheckedConversion, Hash, AccountIdConversion,
};
use frame_support::weights::SimpleDispatchInfo;
@@ -820,8 +820,8 @@ mod tests {
use super::*;
use std::{result::Result, collections::HashMap, cell::RefCell};
use substrate_primitives::H256;
use sr_primitives::{
use sp_core::H256;
use sp_runtime::{
Perbill, testing::Header,
traits::{BlakeTwo256, Hash, IdentityLookup, OnInitialize, OnFinalize},
};
@@ -948,7 +948,7 @@ mod tests {
// This function basically just builds a genesis storage key/value store according to
// our desired mock up.
fn new_test_ext() -> sr_io::TestExternalities {
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
balances::GenesisConfig::<Test>{
balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)],
+26 -26
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-service"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -20,28 +20,28 @@ polkadot-runtime = { path = "../runtime" }
polkadot-executor = { path = "../executor" }
polkadot-network = { path = "../network" }
polkadot-rpc = { path = "../rpc" }
sr-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sr-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
primitives = { package = "substrate-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client-api = { package = "substrate-client-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client-db = { package = "substrate-client-db", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
consensus_common = { package = "substrate-consensus-common", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
grandpa = { package = "substrate-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
grandpa_primitives = { package = "substrate-finality-grandpa-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
inherents = { package = "substrate-inherents", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
service = { package = "substrate-service", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
telemetry = { package = "substrate-telemetry", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
txpool = { package = "sc-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
txpool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
substrate-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
authority-discovery = { package = "substrate-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
babe = { package = "substrate-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
babe-primitives = { package = "substrate-consensus-babe-primitives", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-master" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
client = { package = "sc-client", git = "https://github.com/paritytech/substrate", branch = "master" }
client-api = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
client-db = { package = "sc-client-db", git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" }
grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
grandpa_primitives = { package = "sp-finality-granpda", git = "https://github.com/paritytech/substrate", branch = "master" }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" }
service = { package = "sc-service", git = "https://github.com/paritytech/substrate", branch = "master" }
telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/substrate", branch = "master" }
txpool = { package = "sc-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master" }
txpool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "master" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-babe = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-staking = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
authority-discovery = { package = "sc-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master" }
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master" }
babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" }
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
+1 -1
View File
@@ -24,7 +24,7 @@ use polkadot_runtime::{
IndicesConfig, StakerStatus, WASM_BINARY, ClaimsConfig, ParachainsConfig, RegistrarConfig
};
use polkadot_runtime::constants::currency::DOTS;
use sr_primitives::{traits::IdentifyAccount, Perbill};
use sp_runtime::{traits::IdentifyAccount, Perbill};
use telemetry::TelemetryEndpoints;
use hex_literal::hex;
use babe_primitives::AuthorityId as BabeId;
+4 -4
View File
@@ -34,15 +34,15 @@ pub use service::ServiceBuilderCommand;
pub use service::config::{DatabaseConfig, full_version_from_strs};
pub use client::{ExecutionStrategy, CallExecutor};
pub use client_api::backend::Backend;
pub use sr_api::{Core as CoreApi, ConstructRuntimeApi};
pub use sp_api::{Core as CoreApi, ConstructRuntimeApi};
pub use consensus_common::SelectChain;
pub use polkadot_network::{PolkadotProtocol};
pub use polkadot_primitives::parachain::{CollatorId, ParachainHost};
pub use polkadot_primitives::Block;
pub use polkadot_runtime::RuntimeApi;
pub use primitives::Blake2Hasher;
pub use sr_primitives::traits::ProvideRuntimeApi;
pub use substrate_network::specialization::NetworkSpecialization;
pub use sp_runtime::traits::ProvideRuntimeApi;
pub use sc_network::specialization::NetworkSpecialization;
pub use chain_spec::ChainSpec;
pub use consensus::run_validation_worker;
@@ -150,7 +150,7 @@ pub fn new_full(config: Configuration<CustomConfiguration, GenesisConfig>)
CallExecutor = impl CallExecutor<Block, Blake2Hasher> + Clone + Send + Sync + 'static,
>, ServiceError>
{
use substrate_network::DhtEvent;
use sc_network::DhtEvent;
use futures03::{
compat::Stream01CompatExt,
stream::StreamExt,
+2 -2
View File
@@ -1,10 +1,10 @@
[package]
name = "polkadot-statement-table"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
primitives = { package = "polkadot-primitives", path = "../primitives" }
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "adder"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which adds to a number as its state transition"
edition = "2018"
@@ -13,7 +13,7 @@ tiny-keccak = "1.5.0"
dlmalloc = { version = "0.1.3", features = [ "global" ] }
# We need to make sure the global allocator is disabled until we have support of full substrate externalities
runtime-io = { package = "sr-io", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false, features = [ "disable_allocator" ] }
runtime-io = { package = "sp-io", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, features = [ "disable_allocator" ] }
[build-dependencies]
wasm-builder-runner = { package = "substrate-wasm-builder-runner", version = "1.0.4" }
@@ -9,9 +9,9 @@ adder = { path = ".." }
parachain = { package = "polkadot-parachain", path = "../../../parachain" }
collator = { package = "polkadot-collator", path = "../../../collator" }
primitives = { package = "polkadot-primitives", path = "../../../primitives" }
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client-api = { package = "substrate-client-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
client = { package = "sc-client", git = "https://github.com/paritytech/substrate", branch = "master" }
client-api = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
parking_lot = "0.9.0"
ctrlc = { version = "3.1.3", features = ["termination"] }
futures = "0.3.1"
@@ -21,7 +21,7 @@ use std::collections::HashMap;
use std::sync::Arc;
use adder::{HeadData as AdderHead, BlockData as AdderBody};
use substrate_primitives::{Pair, Blake2Hasher};
use sp_core::{Pair, Blake2Hasher};
use parachain::codec::{Encode, Decode};
use primitives::{
Hash, Block,
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "halt"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
description = "Test parachain which executes forever"
edition = "2018"
+17 -17
View File
@@ -1,6 +1,6 @@
[package]
name = "polkadot-validation"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
@@ -21,22 +21,22 @@ parachain = { package = "polkadot-parachain", path = "../parachain" }
polkadot-primitives = { path = "../primitives" }
polkadot-runtime = { path = "../runtime" }
table = { package = "polkadot-statement-table", path = "../statement-table" }
grandpa = { package = "substrate-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
inherents = { package = "substrate-inherents", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
consensus = { package = "substrate-consensus-common", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
primitives = { package = "substrate-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
txpool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
client = { package = "substrate-client-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
block-builder = { package = "substrate-block-builder", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
trie = { package = "substrate-trie", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
runtime_primitives = { package = "sr-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
grandpa = { package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" }
consensus = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" }
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
txpool-api = { package = "sp-transaction-pool-api", git = "https://github.com/paritytech/substrate", branch = "master" }
client = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
block-builder = { package = "sc-block-builder", git = "https://github.com/paritytech/substrate", branch = "master" }
trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" }
runtime_primitives = { package = "sp-runtime", git = "https://github.com/paritytech/substrate", branch = "master" }
bitvec = { version = "0.15.2", default-features = false, features = ["alloc"] }
runtime_babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
babe-primitives = { package = "substrate-consensus-babe-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
keystore = { package = "substrate-keystore", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
runtime_babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", branch = "master" }
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" }
keystore = { package = "sc-keystore", git = "https://github.com/paritytech/substrate", branch = "master" }
[dev-dependencies]
substrate-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -38,7 +38,7 @@ use polkadot_primitives::parachain::{CandidateReceipt, ParachainHost};
use runtime_primitives::traits::{ProvideRuntimeApi};
use babe_primitives::BabeApi;
use keystore::KeyStorePtr;
use sr_api::ApiExt;
use sp_api::ApiExt;
use tokio::{timer::Interval, runtime::current_thread::Runtime as LocalRuntime};
use log::{warn, debug};
+2 -2
View File
@@ -67,7 +67,7 @@ use inherents::InherentData;
use sp_timestamp::TimestampInherentData;
use log::{info, debug, warn, trace, error};
use keystore::KeyStorePtr;
use sr_api::ApiExt;
use sp_api::ApiExt;
type TaskExecutor = Arc<dyn futures::future::Executor<Box<dyn Future<Item = (), Error = ()> + Send>> + Send + Sync>;
@@ -865,7 +865,7 @@ impl<C, TxPool> futures03::Future for CreateProposal<C, TxPool> where
#[cfg(test)]
mod tests {
use super::*;
use substrate_keyring::Sr25519Keyring;
use sp_keyring::Sr25519Keyring;
#[test]
fn sign_and_check_statement() {
+1 -1
View File
@@ -571,7 +571,7 @@ impl SharedTable {
#[cfg(test)]
mod tests {
use super::*;
use substrate_keyring::Sr25519Keyring;
use sp_keyring::Sr25519Keyring;
use primitives::crypto::UncheckedInto;
use polkadot_primitives::parachain::{BlockData, ConsolidatedIngress};
use futures::future;