Skip to content

Commit abb5111

Browse files
gnunicorngavofyork
authored andcommitted
fix for latest substrate crate renaming (paritytech#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
1 parent f7d4826 commit abb5111

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1760
-1760
lines changed

Cargo.lock

+1,513-1,513
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ path = "src/main.rs"
44

55
[package]
66
name = "polkadot"
7-
version = "0.7.1"
7+
version = "0.7.2"
88
authors = ["Parity Technologies <admin@parity.io>"]
99
build = "build.rs"
1010
edition = "2018"

availability-store/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "polkadot-availability-store"
33
description = "Persistent database for parachain data"
4-
version = "0.7.1"
4+
version = "0.7.2"
55
authors = ["Parity Technologies <admin@parity.io>"]
66
edition = "2018"
77

@@ -10,7 +10,7 @@ polkadot-primitives = { path = "../primitives" }
1010
parking_lot = "0.9.0"
1111
log = "0.4.8"
1212
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
13-
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
13+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
1414
kvdb = "0.1.1"
1515
kvdb-memorydb = "0.1.2"
1616

cli/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "polkadot-cli"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Parity Technologies <admin@parity.io>"]
55
description = "Polkadot node implementation in Rust."
66
edition = "2018"
@@ -11,7 +11,7 @@ tokio = "0.1.22"
1111
futures = { version = "0.3.1", features = ["compat"] }
1212
futures01 = { package = "futures", version = "0.1.29" }
1313
structopt = "0.3.4"
14-
cli = { package = "substrate-cli", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
14+
cli = { package = "sc-cli", git = "https://github.com/paritytech/substrate", branch = "master" }
1515
service = { package = "polkadot-service", path = "../service" }
1616

1717
[features]

collator/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[package]
22
name = "polkadot-collator"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Parity Technologies <admin@parity.io>"]
55
description = "Collator node implementation"
66
edition = "2018"
77

88
[dependencies]
99
futures01 = { package = "futures", version = "0.1.17" }
1010
futures = { version = "0.3.1", features = ["compat"] }
11-
client = { package = "substrate-client", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
12-
client-api = { package = "substrate-client-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
13-
primitives = { package = "substrate-primitives", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
14-
substrate-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
15-
consensus_common = { package = "substrate-consensus-common", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
11+
client = { package = "sc-client", git = "https://github.com/paritytech/substrate", branch = "master" }
12+
client-api = { package = "sc-client-api", git = "https://github.com/paritytech/substrate", branch = "master" }
13+
primitives = { package = "sp-core", git = "https://github.com/paritytech/substrate", branch = "master" }
14+
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
15+
consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" }
1616
polkadot-runtime = { path = "../runtime" }
1717
polkadot-primitives = { path = "../primitives" }
1818
polkadot-cli = { path = "../cli" }
@@ -24,4 +24,4 @@ tokio = "0.1.22"
2424
futures-timer = "1.0"
2525

2626
[dev-dependencies]
27-
keyring = { package = "substrate-keyring", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
27+
keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate", branch = "master" }

collator/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub use polkadot_cli::{VersionInfo, TaskExecutor};
7474
pub use polkadot_network::validation::Incoming;
7575
pub use polkadot_validation::SignedStatement;
7676
pub use polkadot_primitives::parachain::CollatorId;
77-
pub use substrate_network::PeerId;
77+
pub use sc_network::PeerId;
7878

7979
const COLLATION_TIMEOUT: Duration = Duration::from_secs(30);
8080

erasure-coding/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "polkadot-erasure-coding"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Parity Technologies <admin@parity.io>"]
55
edition = "2018"
66

77
[dependencies]
88
primitives = { package = "polkadot-primitives", path = "../primitives" }
99
reed_solomon = { package = "reed-solomon-erasure", git = "https://github.com/paritytech/reed-solomon-erasure" }
1010
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
11-
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
12-
trie = { package = "substrate-trie", git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
11+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
12+
trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", branch = "master" }

erasure-coding/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use codec::{Encode, Decode};
2828
use reed_solomon::galois_16::{self, ReedSolomon};
2929
use primitives::{Hash as H256, BlakeTwo256, HashT};
3030
use primitives::parachain::{BlockData, OutgoingMessages};
31-
use substrate_primitives::Blake2Hasher;
31+
use sp_core::Blake2Hasher;
3232
use trie::{EMPTY_PREFIX, MemoryDB, Trie, TrieMut, trie_types::{TrieDBMut, TrieDB}};
3333

3434
use self::wrapped_shard::WrappedShard;

executor/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "polkadot-executor"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Parity Technologies <admin@parity.io>"]
55
description = "Polkadot node implementation in Rust."
66
edition = "2018"
77

88
[dependencies]
9-
substrate-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
9+
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
1010
polkadot-runtime = { path = "../runtime" }

executor/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//! A `CodeExecutor` specialisation which uses natively compiled runtime when the wasm to be
1818
//! executed is equivalent to the natively compiled code.
1919
20-
use substrate_executor::native_executor_instance;
20+
use sc_executor::native_executor_instance;
2121

2222
native_executor_instance!(
2323
pub Executor,

network/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "polkadot-network"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Parity Technologies <admin@parity.io>"]
55
description = "Polkadot-specific networking protocol"
66
edition = "2018"
@@ -12,16 +12,16 @@ av_store = { package = "polkadot-availability-store", path = "../availability-st
1212
polkadot-validation = { path = "../validation" }
1313
polkadot-primitives = { path = "../primitives" }
1414
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
15-
substrate-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
16-
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
17-
sr-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
15+
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
16+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
17+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
1818
futures = "0.1"
1919
futures03 = { package = "futures", version = "0.3.1", features = ["compat"] }
2020
log = "0.4.8"
2121
exit-future = "0.1.4"
22-
substrate-client = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
23-
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
22+
sc-client = { git = "https://github.com/paritytech/substrate", branch = "master" }
23+
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
2424

2525
[dev-dependencies]
26-
substrate-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
27-
sr-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master" }
26+
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
27+
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }

network/src/collator_pool.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use codec::{Encode, Decode};
2020
use polkadot_primitives::Hash;
2121
use polkadot_primitives::parachain::{CollatorId, Id as ParaId, Collation};
22-
use substrate_network::PeerId;
22+
use sc_network::PeerId;
2323
use futures::sync::oneshot;
2424

2525
use std::collections::hash_map::{HashMap, Entry};
@@ -226,7 +226,7 @@ impl CollatorPool {
226226
#[cfg(test)]
227227
mod tests {
228228
use super::*;
229-
use substrate_primitives::crypto::UncheckedInto;
229+
use sp_core::crypto::UncheckedInto;
230230
use polkadot_primitives::parachain::{
231231
CandidateReceipt, BlockData, PoVBlock, HeadData, ConsolidatedIngress,
232232
};

network/src/gossip.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
//! Peers who send information which was not allowed under a recent neighbor packet
5050
//! will be noted as non-beneficial to Substrate's peer-set management utility.
5151
52-
use sr_primitives::{generic::BlockId, traits::ProvideRuntimeApi};
52+
use sp_runtime::{generic::BlockId, traits::ProvideRuntimeApi};
5353
use sp_blockchain::Error as ClientError;
54-
use substrate_network::{config::Roles, PeerId};
55-
use substrate_network::consensus_gossip::{
54+
use sc_network::{config::Roles, PeerId};
55+
use sc_network::consensus_gossip::{
5656
self as network_gossip, ValidationResult as GossipValidationResult,
5757
ValidatorContext, MessageIntent, ConsensusMessage,
5858
};
@@ -78,7 +78,7 @@ mod attestation;
7878
mod message_routing;
7979

8080
/// The engine ID of the polkadot attestation system.
81-
pub const POLKADOT_ENGINE_ID: sr_primitives::ConsensusEngineId = *b"dot1";
81+
pub const POLKADOT_ENGINE_ID: sp_runtime::ConsensusEngineId = *b"dot1";
8282

8383
// arbitrary; in practice this should not be more than 2.
8484
pub(crate) const MAX_CHAIN_HEADS: usize = 5;
@@ -330,7 +330,7 @@ impl NewLeafActions {
330330
pub fn perform(
331331
self,
332332
gossip: &mut dyn crate::GossipService,
333-
ctx: &mut dyn substrate_network::Context<Block>,
333+
ctx: &mut dyn sc_network::Context<Block>,
334334
) {
335335
for action in self.actions {
336336
match action {
@@ -655,12 +655,12 @@ impl<C: ChainContext + ?Sized> network_gossip::Validator<Block> for MessageValid
655655
#[cfg(test)]
656656
mod tests {
657657
use super::*;
658-
use substrate_network::consensus_gossip::Validator as ValidatorT;
658+
use sc_network::consensus_gossip::Validator as ValidatorT;
659659
use std::sync::mpsc;
660660
use parking_lot::Mutex;
661661
use polkadot_primitives::parachain::{CandidateReceipt, HeadData};
662-
use substrate_primitives::crypto::UncheckedInto;
663-
use substrate_primitives::sr25519::{Public as Sr25519Public, Signature as Sr25519Signature};
662+
use sp_core::crypto::UncheckedInto;
663+
use sp_core::sr25519::{Public as Sr25519Public, Signature as Sr25519Signature};
664664
use polkadot_validation::GenericStatement;
665665
use super::message_routing::queue_topic;
666666

network/src/gossip/attestation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! a `Candidate` we are aware of. Otherwise, it is possible we could be forced to
3131
//! consider an infinite amount of attestations produced by a misbehaving validator.
3232
33-
use substrate_network::consensus_gossip::{ValidationResult as GossipValidationResult};
33+
use sc_network::consensus_gossip::{ValidationResult as GossipValidationResult};
3434
use polkadot_validation::GenericStatement;
3535
use polkadot_primitives::Hash;
3636

network/src/gossip/message_routing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
//! We prune messages that are not un-routed from the view of any leaf and cease
6161
//! to attempt to send them to any peer.
6262
63-
use sr_primitives::traits::{BlakeTwo256, Hash as HashT};
63+
use sp_runtime::traits::{BlakeTwo256, Hash as HashT};
6464
use polkadot_primitives::Hash;
6565
use std::collections::{HashMap, HashSet};
6666
use sp_blockchain::Error as ClientError;

network/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ use polkadot_primitives::parachain::{
3434
Id as ParaId, BlockData, CollatorId, CandidateReceipt, Collation, PoVBlock,
3535
StructuredUnroutedIngress, ValidatorId, OutgoingMessages,
3636
};
37-
use substrate_network::{
37+
use sc_network::{
3838
PeerId, RequestId, Context, StatusMessage as GenericFullStatus,
3939
specialization::NetworkSpecialization as Specialization,
4040
};
41-
use substrate_network::consensus_gossip::{
41+
use sc_network::consensus_gossip::{
4242
self, TopicNotification, MessageRecipient as GossipMessageRecipient, ConsensusMessage,
4343
};
4444
use self::validation::{LiveValidationLeaves, RecentValidatorIds, InsertedRecentKey};
@@ -76,7 +76,7 @@ mod benefit {
7676
type FullStatus = GenericFullStatus<Block>;
7777

7878
/// Specialization of the network service for the polkadot protocol.
79-
pub type PolkadotNetworkService = substrate_network::NetworkService<Block, PolkadotProtocol, Hash>;
79+
pub type PolkadotNetworkService = sc_network::NetworkService<Block, PolkadotProtocol, Hash>;
8080

8181
/// Basic functionality that a network has to fulfill.
8282
pub trait NetworkService: Send + Sync + 'static {
@@ -588,7 +588,7 @@ impl Specialization<Block> for PolkadotProtocol {
588588
let local_status = Status::decode(&mut &status.chain_status[..])
589589
.unwrap_or_else(|_| Status { collating_for: None });
590590

591-
let validator = status.roles.contains(substrate_network::config::Roles::AUTHORITY);
591+
let validator = status.roles.contains(sc_network::config::Roles::AUTHORITY);
592592

593593
let mut peer_info = PeerInfo {
594594
collating_for: local_status.collating_for.clone(),

network/src/local_collations.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl<C: Clone> LocalCollations<C> {
128128
#[cfg(test)]
129129
mod tests {
130130
use super::*;
131-
use substrate_primitives::crypto::UncheckedInto;
131+
use sp_core::crypto::UncheckedInto;
132132
use polkadot_primitives::parachain::ValidatorId;
133133

134134
#[test]

network/src/router.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! the `TableRouter` trait from `polkadot-validation`, which is expected to call into a shared statement table
2424
//! and dispatch evaluation work as necessary when new statements come in.
2525
26-
use sr_primitives::traits::{ProvideRuntimeApi, BlakeTwo256, Hash as HashT};
26+
use sp_runtime::traits::{ProvideRuntimeApi, BlakeTwo256, Hash as HashT};
2727
use polkadot_validation::{
2828
SharedTable, TableRouter, SignedStatement, GenericStatement, ParachainWork, Validated
2929
};

network/src/tests/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use polkadot_primitives::parachain::{
2626
CandidateReceipt, HeadData, PoVBlock, BlockData, CollatorId, ValidatorId,
2727
StructuredUnroutedIngress
2828
};
29-
use substrate_primitives::crypto::UncheckedInto;
29+
use sp_core::crypto::UncheckedInto;
3030
use codec::Encode;
31-
use substrate_network::{
31+
use sc_network::{
3232
PeerId, Context, config::Roles, message::generic::ConsensusMessage,
3333
specialization::NetworkSpecialization,
3434
};

network/src/tests/validation.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#![allow(unused)]
2020

2121
use crate::gossip::GossipMessage;
22-
use substrate_network::Context as NetContext;
23-
use substrate_network::consensus_gossip::TopicNotification;
24-
use substrate_primitives::{NativeOrEncoded, ExecutionContext};
25-
use substrate_keyring::Sr25519Keyring;
22+
use sc_network::Context as NetContext;
23+
use sc_network::consensus_gossip::TopicNotification;
24+
use sp_core::{NativeOrEncoded, ExecutionContext};
25+
use sp_keyring::Sr25519Keyring;
2626
use crate::{GossipService, PolkadotProtocol, NetworkService, GossipMessageStream};
2727

2828
use polkadot_validation::{SharedTable, Network};
@@ -34,8 +34,8 @@ use polkadot_primitives::parachain::{
3434
};
3535
use parking_lot::Mutex;
3636
use sp_blockchain::Result as ClientResult;
37-
use sr_api::{Core, RuntimeVersion, StorageProof, ApiExt};
38-
use sr_primitives::traits::{ApiRef, ProvideRuntimeApi};
37+
use sp_api::{Core, RuntimeVersion, StorageProof, ApiExt};
38+
use sp_runtime::traits::{ApiRef, ProvideRuntimeApi};
3939

4040
use std::collections::HashMap;
4141
use std::sync::Arc;
@@ -401,7 +401,7 @@ impl IngressBuilder {
401401

402402
fn make_table(data: &ApiData, local_key: &Sr25519Keyring, parent_hash: Hash) -> Arc<SharedTable> {
403403
use av_store::Store;
404-
use substrate_primitives::crypto::Pair;
404+
use sp_core::crypto::Pair;
405405

406406
let sr_pair = local_key.pair();
407407
let local_key = polkadot_primitives::parachain::ValidatorPair::from(local_key.pair());

network/src/validation.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
//! This fulfills the `polkadot_validation::Network` trait, providing a hook to be called
2020
//! each time validation leaf work begins on a new chain head.
2121
22-
use sr_primitives::traits::ProvideRuntimeApi;
23-
use substrate_network::PeerId;
22+
use sp_runtime::traits::ProvideRuntimeApi;
23+
use sc_network::PeerId;
2424
use polkadot_validation::{
2525
Network as ParachainNetwork, SharedTable, Collators, Statement, GenericStatement, SignedStatement,
2626
};
@@ -706,7 +706,7 @@ impl<P: ProvideRuntimeApi + Send, E, N, T> LeafWorkDataFetcher<P, E, N, T> where
706706
#[cfg(test)]
707707
mod tests {
708708
use super::*;
709-
use substrate_primitives::crypto::UncheckedInto;
709+
use sp_core::crypto::UncheckedInto;
710710

711711
#[test]
712712
fn last_keys_works() {

parachain/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "polkadot-parachain"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Parity Technologies <admin@parity.io>"]
55
description = "Types and utilities for creating and working with parachains"
66
edition = "2018"
@@ -10,8 +10,8 @@ codec = { package = "parity-scale-codec", version = "1.1.0", default-features =
1010
wasmi = { version = "0.4.5", optional = true }
1111
derive_more = { version = "0.14.1", optional = true }
1212
serde = { version = "1.0.102", default-features = false, features = [ "derive" ] }
13-
rstd = { package = "sr-std", git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
14-
substrate-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-master", default-features = false }
13+
rstd = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
14+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
1515
lazy_static = { version = "1.4.0", optional = true }
1616
parking_lot = { version = "0.7.1", optional = true }
1717
log = { version = "0.4.8", optional = true }
@@ -34,7 +34,7 @@ std = [
3434
"serde/std",
3535
"rstd/std",
3636
"shared_memory",
37-
"substrate-primitives/std",
37+
"sp-core/std",
3838
"lazy_static",
3939
"parking_lot",
4040
"log"

0 commit comments

Comments
 (0)