Skip to content

Commit

Permalink
fix for latest substrate crate renaming (paritytech#641)
Browse files Browse the repository at this point in the history
* rename crates as appropriate

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

* Bump runtime version

* Bump version

* Bump Substrate again
  • Loading branch information
gnunicorn authored and gavofyork committed Dec 2, 2019
1 parent f7d4826 commit abb5111
Show file tree
Hide file tree
Showing 50 changed files with 1,760 additions and 1,760 deletions.
3,026 changes: 1,513 additions & 1,513 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ path = "src/main.rs"

[package]
name = "polkadot"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
build = "build.rs"
edition = "2018"
Expand Down
4 changes: 2 additions & 2 deletions availability-store/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
edition = "2018"

Expand All @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-cli"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
description = "Polkadot node implementation in Rust."
edition = "2018"
Expand All @@ -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]
Expand Down
14 changes: 7 additions & 7 deletions collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "polkadot-collator"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
description = "Collator node implementation"
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" }
Expand All @@ -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" }
2 changes: 1 addition & 1 deletion collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions erasure-coding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "polkadot-erasure-coding"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
edition = "2018"

[dependencies]
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" }
2 changes: 1 addition & 1 deletion erasure-coding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "polkadot-executor"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
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" }
2 changes: 1 addition & 1 deletion executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions network/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-network"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
description = "Polkadot-specific networking protocol"
edition = "2018"
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions network/src/collator_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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,
};
Expand Down
16 changes: 8 additions & 8 deletions network/src/gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion network/src/gossip/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion network/src/gossip/message_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion network/src/local_collations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion network/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
4 changes: 2 additions & 2 deletions network/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
14 changes: 7 additions & 7 deletions network/src/tests/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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;
Expand Down Expand Up @@ -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());
Expand Down
6 changes: 3 additions & 3 deletions network/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions parachain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-parachain"
version = "0.7.1"
version = "0.7.2"
authors = ["Parity Technologies <[email protected]>"]
description = "Types and utilities for creating and working with parachains"
edition = "2018"
Expand All @@ -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 }
Expand All @@ -34,7 +34,7 @@ std = [
"serde/std",
"rstd/std",
"shared_memory",
"substrate-primitives/std",
"sp-core/std",
"lazy_static",
"parking_lot",
"log"
Expand Down
Loading

0 comments on commit abb5111

Please sign in to comment.