mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 18:41:05 +00:00
The crate rename (#4223)
* Adding script for rename, could be applicable for nodes on top of it, too * add stderr and gitlab ci features * apply script * fix now minor details in expected stderr * Update the Cargo.lock * fix name: sc-transaction -> sc-tracing * fix rename in script, too
This commit is contained in:
committed by
GitHub
parent
40f6d05a4c
commit
927e13c13a
+18
-18
@@ -1,41 +1,41 @@
|
||||
[package]
|
||||
name = "substrate-client"
|
||||
name = "sc-client"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
block-builder = { package = "substrate-block-builder", path = "block-builder" }
|
||||
client-api = { package = "substrate-client-api", path = "api" }
|
||||
block-builder = { package = "sc-block-builder", path = "block-builder" }
|
||||
client-api = { package = "sc-client-api", path = "api" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
consensus = { package = "substrate-consensus-common", path = "../primitives/consensus/common" }
|
||||
consensus = { package = "sp-consensus", path = "../primitives/consensus/common" }
|
||||
derive_more = { version = "0.99.2" }
|
||||
executor = { package = "substrate-executor", path = "executor" }
|
||||
externalities = { package = "substrate-externalities", path = "../primitives/externalities" }
|
||||
executor = { package = "sc-executor", path = "executor" }
|
||||
externalities = { package = "sp-externalities", path = "../primitives/externalities" }
|
||||
fnv = { version = "1.0.6" }
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
hash-db = { version = "0.15.2" }
|
||||
hex-literal = { version = "0.2.1" }
|
||||
inherents = { package = "substrate-inherents", path = "../primitives/inherents" }
|
||||
keyring = { package = "substrate-keyring", path = "../primitives/keyring" }
|
||||
inherents = { package = "sp-inherents", path = "../primitives/inherents" }
|
||||
keyring = { package = "sp-keyring", path = "../primitives/keyring" }
|
||||
kvdb = "0.1.1"
|
||||
log = { version = "0.4.8" }
|
||||
parking_lot = { version = "0.9.0" }
|
||||
primitives = { package = "substrate-primitives", path = "../primitives/core" }
|
||||
rstd = { package = "sr-std", path = "../primitives/sr-std" }
|
||||
runtime-version = { package = "sr-version", path = "../primitives/sr-version" }
|
||||
sr-api = { path = "../primitives/sr-api" }
|
||||
sr-primitives = { path = "../primitives/sr-primitives" }
|
||||
primitives = { package = "sp-core", path = "../primitives/core" }
|
||||
rstd = { package = "sp-std", path = "../primitives/sr-std" }
|
||||
runtime-version = { package = "sp-version", path = "../primitives/sr-version" }
|
||||
sp-api = { path = "../primitives/sr-api" }
|
||||
sp-runtime = { path = "../primitives/sr-primitives" }
|
||||
sp-blockchain = { path = "../primitives/blockchain" }
|
||||
state-machine = { package = "substrate-state-machine", path = "../primitives/state-machine" }
|
||||
substrate-telemetry = { path = "telemetry" }
|
||||
trie = { package = "substrate-trie", path = "../primitives/trie" }
|
||||
state-machine = { package = "sp-state-machine", path = "../primitives/state-machine" }
|
||||
sc-telemetry = { path = "telemetry" }
|
||||
trie = { package = "sp-trie", path = "../primitives/trie" }
|
||||
tracing = "0.1.10"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.7.0"
|
||||
tempfile = "3.1.0"
|
||||
client-db = { package = "substrate-client-db", path = "./db", features = ["kvdb-rocksdb"] }
|
||||
client-db = { package = "sc-client-db", path = "./db", features = ["kvdb-rocksdb"] }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../test/utils/runtime/client" }
|
||||
kvdb-memorydb = "0.1.2"
|
||||
panic-handler = { package = "substrate-panic-handler", path = "../primitives/panic-handler" }
|
||||
panic-handler = { package = "sp-panic-handler", path = "../primitives/panic-handler" }
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
[package]
|
||||
name = "substrate-client-api"
|
||||
name = "sc-client-api"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
block-builder = { package = "substrate-block-builder", path = "../block-builder" }
|
||||
block-builder = { package = "sc-block-builder", path = "../block-builder" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
consensus = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" }
|
||||
consensus = { package = "sp-consensus", path = "../../primitives/consensus/common" }
|
||||
derive_more = { version = "0.99.2" }
|
||||
executor = { package = "substrate-executor", path = "../executor" }
|
||||
externalities = { package = "substrate-externalities", path = "../../primitives/externalities" }
|
||||
executor = { package = "sc-executor", path = "../executor" }
|
||||
externalities = { package = "sp-externalities", path = "../../primitives/externalities" }
|
||||
fnv = { version = "1.0.6" }
|
||||
futures = { version = "0.3.1" }
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
hex-literal = { version = "0.2.1" }
|
||||
inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
keyring = { package = "substrate-keyring", path = "../../primitives/keyring" }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
keyring = { package = "sp-keyring", path = "../../primitives/keyring" }
|
||||
kvdb = "0.1.1"
|
||||
log = { version = "0.4.8" }
|
||||
parking_lot = { version = "0.9.0" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false }
|
||||
runtime-version = { package = "sr-version", path = "../../primitives/sr-version", default-features = false }
|
||||
sr-api = { path = "../../primitives/sr-api" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives", default-features = false }
|
||||
state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
substrate-telemetry = { path = "../telemetry" }
|
||||
trie = { package = "substrate-trie", path = "../../primitives/trie" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
runtime-version = { package = "sp-version", path = "../../primitives/sr-version", default-features = false }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives", default-features = false }
|
||||
state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
sc-telemetry = { path = "../telemetry" }
|
||||
trie = { package = "sp-trie", path = "../../primitives/trie" }
|
||||
txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.7.0"
|
||||
tempfile = "3.1.0"
|
||||
client-db = { package = "substrate-client-db", path = ".././db", features = ["kvdb-rocksdb"] }
|
||||
client-db = { package = "sc-client-db", path = ".././db", features = ["kvdb-rocksdb"] }
|
||||
test-primitives = { package = "substrate-test-primitives", path = "../../test/utils/primitives" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
kvdb-memorydb = "0.1.2"
|
||||
panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" }
|
||||
panic-handler = { package = "sp-panic-handler", path = "../../primitives/panic-handler" }
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ use std::sync::Arc;
|
||||
use std::collections::HashMap;
|
||||
use primitives::ChangesTrieConfiguration;
|
||||
use primitives::offchain::OffchainStorage;
|
||||
use sr_primitives::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay};
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use sp_runtime::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use state_machine::backend::Backend as StateBackend;
|
||||
use state_machine::{ChangesTrieStorage as StateChangesTrieStorage, ChangesTrieTransaction};
|
||||
use crate::{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
use std::{cmp::Ord, panic::UnwindSafe, result, cell::RefCell};
|
||||
use codec::{Encode, Decode};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
generic::BlockId, traits::Block as BlockT, traits::NumberFor,
|
||||
};
|
||||
use state_machine::{
|
||||
@@ -30,7 +30,7 @@ use externalities::Extensions;
|
||||
use hash_db::Hasher;
|
||||
use primitives::{Blake2Hasher, NativeOrEncoded};
|
||||
|
||||
use sr_api::{ProofRecorder, InitializeBlock};
|
||||
use sp_api::{ProofRecorder, InitializeBlock};
|
||||
use sp_blockchain;
|
||||
|
||||
/// Method call executor.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use std::collections::HashMap;
|
||||
use futures::channel::mpsc;
|
||||
use primitives::storage::StorageKey;
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
traits::{Block as BlockT, NumberFor},
|
||||
generic::BlockId
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ use primitives::{
|
||||
offchain::{self, OffchainExt, TransactionPoolExt},
|
||||
traits::{BareCryptoStorePtr, KeystoreExt},
|
||||
};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits,
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ pub use state_machine::{StorageProof, ExecutionStrategy};
|
||||
pub mod utils {
|
||||
use sp_blockchain::{HeaderBackend, HeaderMetadata, Error};
|
||||
use primitives::H256;
|
||||
use sr_primitives::traits::{Block as BlockT};
|
||||
use sp_runtime::traits::{Block as BlockT};
|
||||
use std::borrow::Borrow;
|
||||
|
||||
/// Returns a function for checking block ancestry, the returned function will
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::sync::Arc;
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::future::Future;
|
||||
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
traits::{
|
||||
Block as BlockT, Header as HeaderT, NumberFor,
|
||||
},
|
||||
|
||||
@@ -24,7 +24,7 @@ use std::{
|
||||
use fnv::{FnvHashSet, FnvHashMap};
|
||||
use futures::channel::mpsc;
|
||||
use primitives::storage::{StorageKey, StorageData};
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// Storage change set
|
||||
#[derive(Debug)]
|
||||
@@ -307,7 +307,7 @@ impl<Block: BlockT> StorageNotifications<Block> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use sr_primitives::testing::{H256 as Hash, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::testing::{H256 as Hash, Block as RawBlock, ExtrinsicWrapper};
|
||||
use super::*;
|
||||
use std::iter::{empty, Empty};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-authority-discovery"
|
||||
name = "sc-authority-discovery"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -9,25 +9,25 @@ build = "build.rs"
|
||||
prost-build = "0.5.0"
|
||||
|
||||
[dependencies]
|
||||
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../primitives/authority-discovery" }
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../primitives/authority-discovery" }
|
||||
bytes = "0.4.12"
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
codec = { package = "parity-scale-codec", default-features = false, version = "1.0.3" }
|
||||
derive_more = "0.99.2"
|
||||
futures = "0.3.1"
|
||||
futures-timer = "2.0"
|
||||
keystore = { package = "substrate-keystore", path = "../keystore" }
|
||||
keystore = { package = "sc-keystore", path = "../keystore" }
|
||||
libp2p = { version = "0.13.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
|
||||
log = "0.4.8"
|
||||
network = { package = "substrate-network", path = "../network" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
network = { package = "sc-network", path = "../network" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
prost = "0.5.0"
|
||||
serde_json = "1.0.41"
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
|
||||
[dev-dependencies]
|
||||
parking_lot = "0.9.0"
|
||||
peerset = { package = "substrate-peerset", path = "../peerset" }
|
||||
peerset = { package = "sc-peerset", path = "../peerset" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
sr-api = { path = "../../primitives/sr-api" }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
|
||||
@@ -64,8 +64,8 @@ use network::{DhtEvent, ExHashT};
|
||||
use primitives::crypto::{key_types, Pair};
|
||||
use primitives::traits::BareCryptoStorePtr;
|
||||
use prost::Message;
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{Block as BlockT, ProvideRuntimeApi};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{Block as BlockT, ProvideRuntimeApi};
|
||||
|
||||
type Interval = Box<dyn Stream<Item = ()> + Unpin + Send + Sync>;
|
||||
|
||||
@@ -472,13 +472,13 @@ fn interval_at(start: Instant, duration: Duration) -> Interval {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sr_api::{ApiExt, Core, RuntimeVersion, StorageProof};
|
||||
use sp_api::{ApiExt, Core, RuntimeVersion, StorageProof};
|
||||
use futures::channel::mpsc::channel;
|
||||
use futures::executor::block_on;
|
||||
use futures::future::poll_fn;
|
||||
use primitives::{ExecutionContext, NativeOrEncoded, testing::KeyStore};
|
||||
use sr_primitives::traits::Zero;
|
||||
use sr_primitives::traits::{ApiRef, Block as BlockT, NumberFor, ProvideRuntimeApi};
|
||||
use sp_runtime::traits::Zero;
|
||||
use sp_runtime::traits::{ApiRef, Block as BlockT, NumberFor, ProvideRuntimeApi};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use test_client::runtime::Block;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-basic-authorship"
|
||||
name = "sc-basic-authority"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -8,19 +8,19 @@ edition = "2018"
|
||||
log = "0.4.8"
|
||||
futures = "0.3.1"
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
client = { package = "substrate-client", path = "../" }
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" }
|
||||
inherents = { package = "substrate-inherents", path = "../../primitives/inherents" }
|
||||
substrate-telemetry = { path = "../telemetry" }
|
||||
client = { package = "sc-client", path = "../" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents" }
|
||||
sc-telemetry = { path = "../telemetry" }
|
||||
txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" }
|
||||
block-builder = { package = "substrate-block-builder", path = "../block-builder" }
|
||||
block-builder = { package = "sc-block-builder", path = "../block-builder" }
|
||||
tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] }
|
||||
|
||||
[dev-dependencies]
|
||||
txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" }
|
||||
txpool = { package = "sc-tracing-pool", path = "../../client/transaction-pool" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
parking_lot = "0.9"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! A consensus proposer for "basic" chains which use the primitive inherent-data.
|
||||
|
||||
// FIXME #1021 move this into substrate-consensus-common
|
||||
// FIXME #1021 move this into sp-consensus
|
||||
|
||||
use std::{time, sync::Arc};
|
||||
use client_api::CallExecutor;
|
||||
@@ -27,14 +27,14 @@ use consensus_common::{evaluation};
|
||||
use inherents::InherentData;
|
||||
use log::{error, info, debug, trace};
|
||||
use primitives::{H256, Blake2Hasher, ExecutionContext};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
traits::{
|
||||
Block as BlockT, Hash as HashT, Header as HeaderT, ProvideRuntimeApi, DigestFor, BlakeTwo256
|
||||
},
|
||||
generic::BlockId,
|
||||
};
|
||||
use txpool_api::{TransactionPool, InPoolTransaction};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use block_builder::BlockBuilderApi;
|
||||
|
||||
/// Proposer factory.
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! # use substrate_basic_authorship::ProposerFactory;
|
||||
//! # use sc_basic_authority::ProposerFactory;
|
||||
//! # use consensus_common::{Environment, Proposer};
|
||||
//! # use sr_primitives::generic::BlockId;
|
||||
//! # use sp_runtime::generic::BlockId;
|
||||
//! # use std::{sync::Arc, time::Duration};
|
||||
//! # use test_client::{self, runtime::{Extrinsic, Transfer}, AccountKeyring};
|
||||
//! # use txpool::{BasicPool, FullChainApi};
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[package]
|
||||
name = "substrate-block-builder"
|
||||
name = "sc-block-builder"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.6", features = ["derive"] }
|
||||
runtime_api = { package = "substrate-block-builder-runtime-api", path = "../../primitives/block-builder/runtime-api" }
|
||||
sr-api = { path = "../../primitives/sr-api" }
|
||||
runtime_api = { package = "sp-block-builder", path = "../../primitives/block-builder/runtime-api" }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
use codec::Encode;
|
||||
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{
|
||||
Header as HeaderT, Hash, Block as BlockT, HashFor, ProvideRuntimeApi, ApiRef, DigestFor,
|
||||
@@ -36,7 +36,7 @@ use sr_primitives::{
|
||||
use sp_blockchain::{ApplyExtrinsicFailed, Error};
|
||||
use primitives::ExecutionContext;
|
||||
use state_machine::StorageProof;
|
||||
use sr_api::{Core, ApiExt, ApiErrorFor};
|
||||
use sp_api::{Core, ApiExt, ApiErrorFor};
|
||||
|
||||
pub use runtime_api::BlockBuilder as BlockBuilderApi;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[package]
|
||||
name = "substrate-chain-spec"
|
||||
name = "sc-chain-spec"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
substrate-chain-spec-derive = { path = "./derive" }
|
||||
sc-chain-spec-derive = { path = "./derive" }
|
||||
impl-trait-for-tuples = "0.1.3"
|
||||
network = { package = "substrate-network", path = "../network" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
network = { package = "sc-network", path = "../network" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
serde = { version = "1.0.101", features = ["derive"] }
|
||||
serde_json = "1.0.41"
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
tel = { package = "substrate-telemetry", path = "../telemetry" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
tel = { package = "sc-telemetry", path = "../telemetry" }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-chain-spec-derive"
|
||||
name = "sc-chain-spec-derive"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -19,7 +19,7 @@ use quote::quote;
|
||||
use syn::{DeriveInput, Ident, Error};
|
||||
use proc_macro_crate::crate_name;
|
||||
|
||||
const CRATE_NAME: &str = "substrate-chain-spec";
|
||||
const CRATE_NAME: &str = "sc-chain-spec";
|
||||
const ATTRIBUTE_NAME: &str = "forks";
|
||||
|
||||
/// Implements `Extension's` `Group` accessor.
|
||||
|
||||
@@ -23,7 +23,7 @@ use std::path::PathBuf;
|
||||
use std::rc::Rc;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use primitives::storage::{StorageKey, StorageData};
|
||||
use sr_primitives::{BuildStorage, StorageOverlay, ChildrenStorageOverlay};
|
||||
use sp_runtime::{BuildStorage, StorageOverlay, ChildrenStorageOverlay};
|
||||
use serde_json as json;
|
||||
use crate::RuntimeGenesis;
|
||||
use network::Multiaddr;
|
||||
|
||||
@@ -253,9 +253,9 @@ impl<B, E> Extension for Forks<B, E> where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use substrate_chain_spec_derive::{ChainSpecGroup, ChainSpecExtension};
|
||||
use sc_chain_spec_derive::{ChainSpecGroup, ChainSpecExtension};
|
||||
// Make the proc macro work for tests and doc tests.
|
||||
use crate as substrate_chain_spec;
|
||||
use crate as sc_chain_spec;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//! ```rust
|
||||
//! use std::collections::HashMap;
|
||||
//! use serde::{Serialize, Deserialize};
|
||||
//! use substrate_chain_spec::{ChainSpec, ChainSpecExtension};
|
||||
//! use sc_chain_spec::{ChainSpec, ChainSpecExtension};
|
||||
//!
|
||||
//! #[derive(Clone, Debug, Serialize, Deserialize, ChainSpecExtension)]
|
||||
//! pub struct MyExtension {
|
||||
@@ -49,7 +49,7 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! use serde::{Serialize, Deserialize};
|
||||
//! use substrate_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension};
|
||||
//! use sc_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension};
|
||||
//!
|
||||
//! #[derive(Clone, Debug, Serialize, Deserialize, ChainSpecGroup)]
|
||||
//! pub struct ClientParams {
|
||||
@@ -84,7 +84,7 @@
|
||||
//!
|
||||
//! ```rust
|
||||
//! use serde::{Serialize, Deserialize};
|
||||
//! use substrate_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension};
|
||||
//! use sc_chain_spec::{Forks, ChainSpec, ChainSpecGroup, ChainSpecExtension};
|
||||
//!
|
||||
//! #[derive(Clone, Debug, Serialize, Deserialize, ChainSpecGroup)]
|
||||
//! pub struct ClientParams {
|
||||
@@ -113,10 +113,10 @@ mod extension;
|
||||
|
||||
pub use chain_spec::{ChainSpec, Properties, NoExtension};
|
||||
pub use extension::{Group, Fork, Forks, Extension};
|
||||
pub use substrate_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup};
|
||||
pub use sc_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup};
|
||||
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
use sr_primitives::BuildStorage;
|
||||
use sp_runtime::BuildStorage;
|
||||
|
||||
/// A set of traits for the runtime genesis config.
|
||||
pub trait RuntimeGenesis: Serialize + DeserializeOwned + BuildStorage {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-cli"
|
||||
name = "sc-cli"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Substrate CLI interface."
|
||||
@@ -21,20 +21,20 @@ futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = "0.1.29"
|
||||
fdlimit = "0.1.1"
|
||||
serde_json = "1.0.41"
|
||||
panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" }
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
panic-handler = { package = "sp-panic-handler", path = "../../primitives/panic-handler" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
network = { package = "substrate-network", path = "../network" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
service = { package = "substrate-service", path = "../service", default-features = false }
|
||||
state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
substrate-telemetry = { path = "../telemetry" }
|
||||
keyring = { package = "substrate-keyring", path = "../../primitives/keyring" }
|
||||
network = { package = "sc-network", path = "../network" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
service = { package = "sc-service", path = "../service", default-features = false }
|
||||
state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
sc-telemetry = { path = "../telemetry" }
|
||||
keyring = { package = "sp-keyring", path = "../../primitives/keyring" }
|
||||
names = "0.11.0"
|
||||
structopt = "0.3.3"
|
||||
rpassword = "4.0.1"
|
||||
substrate-tracing = { package = "substrate-tracing", path = "../tracing" }
|
||||
sc-tracing = { package = "sc-tracing", path = "../tracing" }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use client_api::BlockchainEvents;
|
||||
use futures::{StreamExt, TryStreamExt, FutureExt, future, compat::Stream01CompatExt};
|
||||
use log::{info, warn};
|
||||
use sr_primitives::traits::Header;
|
||||
use sp_runtime::traits::Header;
|
||||
use service::AbstractService;
|
||||
use std::time::Duration;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ use ansi_term::Colour;
|
||||
use client_api::ClientInfo;
|
||||
use log::info;
|
||||
use network::SyncState;
|
||||
use sr_primitives::traits::{Block as BlockT, CheckedDiv, NumberFor, Zero, Saturating};
|
||||
use sp_runtime::traits::{Block as BlockT, CheckedDiv, NumberFor, Zero, Saturating};
|
||||
use service::NetworkStatus;
|
||||
use std::{convert::{TryFrom, TryInto}, fmt, time};
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ use log::info;
|
||||
use lazy_static::lazy_static;
|
||||
use futures::{Future, FutureExt, TryFutureExt};
|
||||
use futures01::{Async, Future as _};
|
||||
use substrate_telemetry::TelemetryEndpoints;
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sc_telemetry::TelemetryEndpoints;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// default sub directory to store network config
|
||||
const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network";
|
||||
@@ -970,8 +970,8 @@ fn init_logger(pattern: &str) {
|
||||
builder.filter(Some("ws"), log::LevelFilter::Off);
|
||||
builder.filter(Some("hyper"), log::LevelFilter::Warn);
|
||||
builder.filter(Some("cranelift_wasm"), log::LevelFilter::Warn);
|
||||
// Always log the special target `substrate_tracing`, overrides global level
|
||||
builder.filter(Some("substrate_tracing"), log::LevelFilter::Info);
|
||||
// Always log the special target `sc_tracing`, overrides global level
|
||||
builder.filter(Some("sc_tracing"), log::LevelFilter::Info);
|
||||
// Enable info for others.
|
||||
builder.filter(None, log::LevelFilter::Info);
|
||||
|
||||
|
||||
@@ -311,12 +311,12 @@ arg_enum! {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<substrate_tracing::TracingReceiver> for TracingReceiver {
|
||||
fn into(self) -> substrate_tracing::TracingReceiver {
|
||||
impl Into<sc_tracing::TracingReceiver> for TracingReceiver {
|
||||
fn into(self) -> sc_tracing::TracingReceiver {
|
||||
match self {
|
||||
TracingReceiver::Log => substrate_tracing::TracingReceiver::Log,
|
||||
TracingReceiver::Telemetry => substrate_tracing::TracingReceiver::Telemetry,
|
||||
TracingReceiver::Grafana => substrate_tracing::TracingReceiver::Grafana,
|
||||
TracingReceiver::Log => sc_tracing::TracingReceiver::Log,
|
||||
TracingReceiver::Telemetry => sc_tracing::TracingReceiver::Telemetry,
|
||||
TracingReceiver::Grafana => sc_tracing::TracingReceiver::Grafana,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
[package]
|
||||
name = "substrate-consensus-aura"
|
||||
name = "sc-consensus-aura"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Aura consensus algorithm for substrate"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
aura_primitives = { package = "substrate-consensus-aura-primitives", path = "../../../primitives/consensus/aura" }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" }
|
||||
client = { package = "substrate-client", path = "../../" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
aura_primitives = { package = "sp-consensus-aura", path = "../../../primitives/consensus/aura" }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" }
|
||||
client = { package = "sc-client", path = "../../" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
derive_more = "0.99.2"
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
futures-timer = "0.4.0"
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
keystore = { package = "substrate-keystore", path = "../../keystore" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
keystore = { package = "sc-keystore", path = "../../keystore" }
|
||||
log = "0.4.8"
|
||||
parking_lot = "0.9.0"
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" }
|
||||
runtime_version = { package = "sr-version", path = "../../../primitives/sr-version" }
|
||||
slots = { package = "substrate-consensus-slots", path = "../slots" }
|
||||
sr-api = { path = "../../../primitives/sr-api" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" }
|
||||
runtime_version = { package = "sp-version", path = "../../../primitives/sr-version" }
|
||||
slots = { package = "sc-consensus-slots", path = "../slots" }
|
||||
sp-api = { path = "../../../primitives/sr-api" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
sc-telemetry = { path = "../../telemetry" }
|
||||
|
||||
[dev-dependencies]
|
||||
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" }
|
||||
substrate-executor = { path = "../../executor" }
|
||||
network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "substrate-service", path = "../../service" }
|
||||
keyring = { package = "sp-keyring", path = "../../../primitives/keyring" }
|
||||
sc-executor = { path = "../../executor" }
|
||||
network = { package = "sc-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "sc-service", path = "../../service" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" }
|
||||
tokio = "0.1.22"
|
||||
env_logger = "0.7.0"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
use primitives::Pair;
|
||||
use aura_primitives::AURA_ENGINE_ID;
|
||||
use sr_primitives::generic::{DigestItem, OpaqueDigestItemId};
|
||||
use sp_runtime::generic::{DigestItem, OpaqueDigestItemId};
|
||||
use codec::{Encode, Codec};
|
||||
use std::fmt::Debug;
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ use sp_blockchain::{
|
||||
|
||||
use block_builder_api::BlockBuilder as BlockBuilderApi;
|
||||
|
||||
use sr_primitives::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sr_primitives::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member};
|
||||
use sp_runtime::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sp_runtime::traits::{Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi, Zero, Member};
|
||||
|
||||
use primitives::crypto::Pair;
|
||||
use inherents::{InherentDataProviders, InherentData};
|
||||
@@ -63,14 +63,14 @@ use sp_timestamp::{
|
||||
TimestampInherentData, InherentType as TimestampInherent, InherentError as TIError
|
||||
};
|
||||
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
|
||||
use slots::{CheckedHeader, SlotData, SlotWorker, SlotInfo, SlotCompatible};
|
||||
use slots::check_equivocation;
|
||||
|
||||
use keystore::KeyStorePtr;
|
||||
|
||||
use sr_api::ApiExt;
|
||||
use sp_api::ApiExt;
|
||||
|
||||
pub use aura_primitives::{
|
||||
ConsensusLog, AuraApi, AURA_ENGINE_ID,
|
||||
@@ -256,7 +256,7 @@ impl<H, B, C, E, I, P, Error, SO> slots::SimpleSlotWorker<B> for AuraWorker<C, E
|
||||
})
|
||||
}
|
||||
|
||||
fn pre_digest_data(&self, slot_number: u64, _claim: &Self::Claim) -> Vec<sr_primitives::DigestItem<B::Hash>> {
|
||||
fn pre_digest_data(&self, slot_number: u64, _claim: &Self::Claim) -> Vec<sp_runtime::DigestItem<B::Hash>> {
|
||||
vec![
|
||||
<DigestItemFor<B> as CompatibleDigestItem<P>>::aura_pre_digest(slot_number),
|
||||
]
|
||||
@@ -720,7 +720,7 @@ mod tests {
|
||||
use consensus_common::NoNetwork as DummyOracle;
|
||||
use network::test::*;
|
||||
use network::test::{Block as TestBlock, PeersClient, PeersFullClient};
|
||||
use sr_primitives::traits::{Block as BlockT, DigestFor};
|
||||
use sp_runtime::traits::{Block as BlockT, DigestFor};
|
||||
use network::config::ProtocolConfig;
|
||||
use parking_lot::Mutex;
|
||||
use tokio::runtime::current_thread;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-consensus-babe"
|
||||
name = "sc-consensus-babe"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "BABE consensus algorithm for substrate"
|
||||
@@ -7,27 +7,27 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
babe_primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
babe_primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../../primitives/application-crypto" }
|
||||
num-bigint = "0.2.3"
|
||||
num-rational = "0.2.2"
|
||||
num-traits = "0.2.8"
|
||||
runtime-version = { package = "sr-version", path = "../../../primitives/sr-version" }
|
||||
runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
runtime-version = { package = "sp-version", path = "../../../primitives/sr-version" }
|
||||
runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
keystore = { package = "substrate-keystore", path = "../../keystore" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
client = { package = "substrate-client", path = "../../" }
|
||||
sr-api = { path = "../../../primitives/sr-api" }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" }
|
||||
sc-telemetry = { path = "../../telemetry" }
|
||||
keystore = { package = "sc-keystore", path = "../../keystore" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
client = { package = "sc-client", path = "../../" }
|
||||
sp-api = { path = "../../../primitives/sr-api" }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
uncles = { package = "substrate-consensus-uncles", path = "../uncles" }
|
||||
slots = { package = "substrate-consensus-slots", path = "../slots" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
uncles = { package = "sc-consensus-uncles", path = "../uncles" }
|
||||
slots = { package = "sc-consensus-slots", path = "../slots" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
fork-tree = { path = "../../../utils/fork-tree" }
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
@@ -41,12 +41,12 @@ pdqselect = "0.1.0"
|
||||
derive_more = "0.99.2"
|
||||
|
||||
[dev-dependencies]
|
||||
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" }
|
||||
substrate-executor = { path = "../../executor" }
|
||||
network = { package = "substrate-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "substrate-service", path = "../../service" }
|
||||
keyring = { package = "sp-keyring", path = "../../../primitives/keyring" }
|
||||
sc-executor = { path = "../../executor" }
|
||||
network = { package = "sc-network", path = "../../network", features = ["test-helpers"]}
|
||||
service = { package = "sc-service", path = "../../service" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../../test/utils/runtime/client" }
|
||||
block-builder = { package = "substrate-block-builder", path = "../../block-builder" }
|
||||
block-builder = { package = "sc-block-builder", path = "../../block-builder" }
|
||||
tokio = "0.1.22"
|
||||
env_logger = "0.7.0"
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -21,7 +21,7 @@ use codec::{Decode, Encode};
|
||||
|
||||
use client_api::backend::AuxStore;
|
||||
use sp_blockchain::{Result as ClientResult, Error as ClientError};
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use babe_primitives::BabeBlockWeight;
|
||||
|
||||
use super::{epoch_changes::EpochChangesFor, SharedEpochChanges};
|
||||
|
||||
@@ -23,7 +23,7 @@ use std::sync::Arc;
|
||||
use babe_primitives::{Epoch, SlotNumber, NextEpochDescriptor};
|
||||
use fork_tree::ForkTree;
|
||||
use parking_lot::{Mutex, MutexGuard};
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor, One, Zero};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor, One, Zero};
|
||||
use codec::{Encode, Decode};
|
||||
use client_api::utils::is_descendent_of;
|
||||
use sp_blockchain::{HeaderMetadata, HeaderBackend, Error as ClientError};
|
||||
|
||||
@@ -69,8 +69,8 @@ use consensus_common::{ImportResult, CanAuthorWith};
|
||||
use consensus_common::import_queue::{
|
||||
BoxJustificationImport, BoxFinalityProofImport,
|
||||
};
|
||||
use sr_primitives::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::{generic::{BlockId, OpaqueDigestItemId}, Justification};
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, Header, DigestItemFor, ProvideRuntimeApi,
|
||||
Zero,
|
||||
};
|
||||
@@ -78,7 +78,7 @@ use keystore::KeyStorePtr;
|
||||
use parking_lot::Mutex;
|
||||
use primitives::{Blake2Hasher, H256, Pair};
|
||||
use inherents::{InherentDataProviders, InherentData};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_TRACE, CONSENSUS_DEBUG};
|
||||
use consensus_common::{
|
||||
self, BlockImport, Environment, Proposer, BlockCheckParams,
|
||||
ForkChoiceStrategy, BlockImportParams, BlockOrigin, Error as ConsensusError,
|
||||
@@ -107,7 +107,7 @@ use sp_blockchain::{
|
||||
};
|
||||
use schnorrkel::SignatureError;
|
||||
|
||||
use sr_api::ApiExt;
|
||||
use sp_api::ApiExt;
|
||||
|
||||
mod aux_schema;
|
||||
mod verification;
|
||||
@@ -411,7 +411,7 @@ impl<B, C, E, I, Error, SO> slots::SimpleSlotWorker<B> for BabeWorker<B, C, E, I
|
||||
s
|
||||
}
|
||||
|
||||
fn pre_digest_data(&self, _slot_number: u64, claim: &Self::Claim) -> Vec<sr_primitives::DigestItem<B::Hash>> {
|
||||
fn pre_digest_data(&self, _slot_number: u64, claim: &Self::Claim) -> Vec<sp_runtime::DigestItem<B::Hash>> {
|
||||
vec![
|
||||
<DigestItemFor<B> as CompatibleDigestItem>::babe_pre_digest(claim.0.clone()),
|
||||
]
|
||||
|
||||
@@ -31,7 +31,7 @@ use consensus_common::import_queue::{
|
||||
use network::test::*;
|
||||
use network::test::{Block as TestBlock, PeersClient};
|
||||
use network::config::BoxFinalityProofRequestBuilder;
|
||||
use sr_primitives::{generic::DigestItem, traits::{Block as BlockT, DigestFor}};
|
||||
use sp_runtime::{generic::DigestItem, traits::{Block as BlockT, DigestFor}};
|
||||
use network::config::ProtocolConfig;
|
||||
use tokio::runtime::current_thread;
|
||||
use client_api::BlockchainEvents;
|
||||
@@ -540,7 +540,7 @@ fn propose_and_import_block(
|
||||
parent_pre_digest.slot_number() + 1
|
||||
});
|
||||
|
||||
let pre_digest = sr_primitives::generic::Digest {
|
||||
let pre_digest = sp_runtime::generic::Digest {
|
||||
logs: vec![
|
||||
Item::babe_pre_digest(
|
||||
BabePreDigest::Secondary {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Verification for BABE headers.
|
||||
use schnorrkel::vrf::{VRFOutput, VRFProof};
|
||||
use sr_primitives::{traits::Header, traits::DigestItemFor};
|
||||
use sp_runtime::{traits::Header, traits::DigestItemFor};
|
||||
use primitives::{Pair, Public};
|
||||
use babe_primitives::{Epoch, BabePreDigest, CompatibleDigestItem, AuthorityId};
|
||||
use babe_primitives::{AuthoritySignature, SlotNumber, AuthorityIndex, AuthorityPair};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-consensus-pow"
|
||||
name = "sc-consensus-pow"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "PoW consensus algorithm for substrate"
|
||||
@@ -7,14 +7,14 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
pow-primitives = { package = "substrate-consensus-pow-primitives", path = "../../../primitives/consensus/pow" }
|
||||
consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
pow-primitives = { package = "sp-consensus-pow", path = "../../../primitives/consensus/pow" }
|
||||
consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
log = "0.4.8"
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
|
||||
@@ -35,9 +35,9 @@ use std::collections::HashMap;
|
||||
use client_api::{BlockOf, backend::AuxStore};
|
||||
use sp_blockchain::{HeaderBackend, ProvideCache, well_known_cache_keys::Id as CacheKeyId};
|
||||
use block_builder_api::BlockBuilder as BlockBuilderApi;
|
||||
use sr_primitives::{Justification, RuntimeString};
|
||||
use sr_primitives::generic::{BlockId, Digest, DigestItem};
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi};
|
||||
use sp_runtime::{Justification, RuntimeString};
|
||||
use sp_runtime::generic::{BlockId, Digest, DigestItem};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, ProvideRuntimeApi};
|
||||
use sp_timestamp::{TimestampInherentData, InherentError as TIError};
|
||||
use pow_primitives::{Seal, TotalDifficulty, POW_ENGINE_ID};
|
||||
use primitives::H256;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-consensus-slots"
|
||||
name = "sc-consensus-slots"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Generic slots-based utilities for consensus"
|
||||
@@ -8,13 +8,13 @@ build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
sc-telemetry = { path = "../../telemetry" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
futures = "0.3.1"
|
||||
futures-timer = "2.0"
|
||||
parking_lot = "0.9.0"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use codec::{Encode, Decode};
|
||||
use client_api::backend::AuxStore;
|
||||
use sp_blockchain::{Result as ClientResult, Error as ClientError};
|
||||
use sr_primitives::traits::Header;
|
||||
use sp_runtime::traits::Header;
|
||||
|
||||
const SLOT_HEADER_MAP_KEY: &[u8] = b"slot_header_map";
|
||||
const SLOT_HEADER_START: &[u8] = b"slot_header_start";
|
||||
@@ -153,7 +153,7 @@ pub fn check_equivocation<C, H, P>(
|
||||
mod test {
|
||||
use primitives::{sr25519, Pair};
|
||||
use primitives::hash::H256;
|
||||
use sr_primitives::testing::{Header as HeaderTest, Digest as DigestTest};
|
||||
use sp_runtime::testing::{Header as HeaderTest, Digest as DigestTest};
|
||||
use test_client;
|
||||
|
||||
use super::{MAX_SLOT_CAPACITY, PRUNING_BOUND, check_equivocation};
|
||||
|
||||
@@ -36,10 +36,10 @@ use futures::{prelude::*, future::{self, Either}};
|
||||
use futures_timer::Delay;
|
||||
use inherents::{InherentData, InherentDataProviders};
|
||||
use log::{debug, error, info, warn};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{ApiRef, Block as BlockT, Header, ProvideRuntimeApi};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{ApiRef, Block as BlockT, Header, ProvideRuntimeApi};
|
||||
use std::{fmt::Debug, ops::Deref, pin::Pin, sync::Arc, time::{Instant, Duration}};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_WARN, CONSENSUS_INFO};
|
||||
use parking_lot::Mutex;
|
||||
use client_api;
|
||||
|
||||
@@ -94,7 +94,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
) -> Option<Self::Claim>;
|
||||
|
||||
/// Return the pre digest data to include in a block authored with the given claim.
|
||||
fn pre_digest_data(&self, slot_number: u64, claim: &Self::Claim) -> Vec<sr_primitives::DigestItem<B::Hash>>;
|
||||
fn pre_digest_data(&self, slot_number: u64, claim: &Self::Claim) -> Vec<sp_runtime::DigestItem<B::Hash>>;
|
||||
|
||||
/// Returns a function which produces a `BlockImportParams`.
|
||||
fn block_import_params(&self) -> Box<dyn Fn(
|
||||
@@ -218,7 +218,7 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
// deadline our production to approx. the end of the slot
|
||||
let proposing = proposer.propose(
|
||||
slot_info.inherent_data,
|
||||
sr_primitives::generic::Digest {
|
||||
sp_runtime::generic::Digest {
|
||||
logs,
|
||||
},
|
||||
slot_remaining_duration,
|
||||
@@ -448,7 +448,7 @@ impl<T: Clone> SlotDuration<T> {
|
||||
})
|
||||
}),
|
||||
None => {
|
||||
use sr_primitives::traits::Zero;
|
||||
use sp_runtime::traits::Zero;
|
||||
let genesis_slot_duration =
|
||||
cb(client.runtime_api(), &BlockId::number(Zero::zero()))?;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
[package]
|
||||
name = "substrate-consensus-uncles"
|
||||
name = "sc-consensus-uncles"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Generic uncle inclusion utilities for consensus"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
client-api = { package = "sc-client-api", path = "../../api" }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core" }
|
||||
sp-runtime = { path = "../../../primitives/sr-primitives" }
|
||||
sp-authorship = { path = "../../../primitives/authorship" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
|
||||
log = "0.4.8"
|
||||
|
||||
@@ -23,7 +23,7 @@ use consensus_common::SelectChain;
|
||||
use inherents::{InherentDataProviders};
|
||||
use log::warn;
|
||||
use client_api::ProvideUncles;
|
||||
use sr_primitives::traits::{Block as BlockT, Header};
|
||||
use sp_runtime::traits::{Block as BlockT, Header};
|
||||
use std::sync::Arc;
|
||||
use sp_authorship;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-client-db"
|
||||
name = "sc-client-db"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -12,20 +12,20 @@ kvdb-rocksdb = { version = "0.2", optional = true }
|
||||
kvdb-memorydb = "0.1.2"
|
||||
linked-hash-map = "0.5.2"
|
||||
hash-db = "0.15.2"
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
client = { package = "substrate-client", path = "../" }
|
||||
state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
client = { package = "sc-client", path = "../" }
|
||||
state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
executor = { package = "substrate-executor", path = "../executor" }
|
||||
state_db = { package = "substrate-state-db", path = "../state-db" }
|
||||
trie = { package = "substrate-trie", path = "../../primitives/trie" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" }
|
||||
executor = { package = "sc-executor", path = "../executor" }
|
||||
state_db = { package = "sc-state-db", path = "../state-db" }
|
||||
trie = { package = "sp-trie", path = "../../primitives/trie" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
|
||||
[dev-dependencies]
|
||||
substrate-keyring = { path = "../../primitives/keyring" }
|
||||
sp-keyring = { path = "../../primitives/keyring" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
env_logger = "0.7.0"
|
||||
quickcheck = "0.9"
|
||||
|
||||
+4
-4
@@ -44,7 +44,7 @@ use std::collections::{BTreeSet, BTreeMap};
|
||||
use log::warn;
|
||||
|
||||
use sp_blockchain::{Error as ClientError, Result as ClientResult};
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, NumberFor, Zero, Bounded, CheckedSub
|
||||
};
|
||||
|
||||
@@ -651,7 +651,7 @@ pub fn destroy_fork<Block: BlockT, T: CacheItemT, S: Storage<Block, T>, Tx: Stor
|
||||
|
||||
/// Blockchain related functions.
|
||||
mod chain {
|
||||
use sr_primitives::traits::Header as HeaderT;
|
||||
use sp_runtime::traits::Header as HeaderT;
|
||||
use super::*;
|
||||
|
||||
/// Is the block1 connected both ends of the range.
|
||||
@@ -725,8 +725,8 @@ fn read_forks<Block: BlockT, T: CacheItemT, S: Storage<Block, T>>(
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use test_client::runtime::H256;
|
||||
use sr_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sr_primitives::traits::Header as HeaderT;
|
||||
use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::traits::Header as HeaderT;
|
||||
use crate::cache::list_storage::tests::{DummyStorage, FaultyStorage, DummyTransaction};
|
||||
use super::*;
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
//! List-cache storage entries.
|
||||
|
||||
use sp_blockchain::Result as ClientResult;
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use codec::{Encode, Decode};
|
||||
|
||||
use crate::cache::{CacheItemT, ComplexBlockId};
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ use kvdb::{KeyValueDB, DBTransaction};
|
||||
|
||||
use sp_blockchain::{Error as ClientError, Result as ClientResult};
|
||||
use codec::{Encode, Decode};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use crate::utils::{self, db_err, meta_keys};
|
||||
|
||||
use crate::cache::{CacheItemT, ComplexBlockId};
|
||||
|
||||
Vendored
+2
-2
@@ -24,8 +24,8 @@ use kvdb::{KeyValueDB, DBTransaction};
|
||||
use client_api::blockchain::{well_known_cache_keys::{self, Id as CacheKeyId}, Cache as BlockchainCache};
|
||||
use sp_blockchain::Result as ClientResult;
|
||||
use codec::{Encode, Decode};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero};
|
||||
use crate::utils::{self, COLUMN_META, db_err};
|
||||
|
||||
use self::list_cache::{ListCache, PruningStrategy};
|
||||
|
||||
@@ -53,11 +53,11 @@ use trie::{MemoryDB, PrefixedMemoryDB, prefixed_key};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use primitives::{H256, Blake2Hasher, ChangesTrieConfiguration, convert_hash, traits::CodeExecutor};
|
||||
use primitives::storage::well_known_keys;
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
generic::{BlockId, DigestItem}, Justification, StorageOverlay, ChildrenStorageOverlay,
|
||||
BuildStorage,
|
||||
};
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, Header as HeaderT, NumberFor, Zero, One, SaturatedConversion
|
||||
};
|
||||
use executor::RuntimeInfo;
|
||||
@@ -1561,8 +1561,8 @@ mod tests {
|
||||
use crate::columns;
|
||||
use client_api::backend::{Backend as BTrait, BlockImportOperation as Op};
|
||||
use client::blockchain::Backend as BLBTrait;
|
||||
use sr_primitives::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sr_primitives::traits::{Hash, BlakeTwo256};
|
||||
use sp_runtime::testing::{Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::traits::{Hash, BlakeTwo256};
|
||||
use state_machine::{TrieMut, TrieDBMut, ChangesTrieRootsStorage, ChangesTrieStorage};
|
||||
use sp_blockchain::{lowest_common_ancestor, tree_route};
|
||||
|
||||
@@ -1593,7 +1593,7 @@ mod tests {
|
||||
changes: Vec<(Vec<u8>, Vec<u8>)>,
|
||||
extrinsics_root: H256,
|
||||
) -> H256 {
|
||||
use sr_primitives::testing::Digest;
|
||||
use sp_runtime::testing::Digest;
|
||||
let (changes_root, changes_trie_update) = prepare_changes(changes);
|
||||
let digest = Digest {
|
||||
logs: vec![
|
||||
|
||||
@@ -36,8 +36,8 @@ use sp_blockchain::{
|
||||
use client::light::blockchain::Storage as LightBlockchainStorage;
|
||||
use codec::{Decode, Encode};
|
||||
use primitives::Blake2Hasher;
|
||||
use sr_primitives::generic::{DigestItem, BlockId};
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor};
|
||||
use sp_runtime::generic::{DigestItem, BlockId};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, Zero, One, NumberFor};
|
||||
use crate::cache::{DbCacheSync, DbCache, ComplexBlockId, EntryType as CacheEntryType};
|
||||
use crate::utils::{self, meta_keys, Meta, db_err, read_db, block_id_to_lookup_key, read_meta};
|
||||
use crate::DatabaseSettings;
|
||||
@@ -560,8 +560,8 @@ fn cht_key<N: TryInto<u32>>(cht_type: u8, block: N) -> ClientResult<[u8; 5]> {
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use client::cht;
|
||||
use sr_primitives::generic::DigestItem;
|
||||
use sr_primitives::testing::{H256 as Hash, Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::generic::DigestItem;
|
||||
use sp_runtime::testing::{H256 as Hash, Header, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_blockchain::{lowest_common_ancestor, tree_route};
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ use std::sync::Arc;
|
||||
use parking_lot::{Mutex, RwLock, RwLockUpgradableReadGuard};
|
||||
use linked_hash_map::{LinkedHashMap, Entry};
|
||||
use hash_db::Hasher;
|
||||
use sr_primitives::traits::{Block as BlockT, Header};
|
||||
use sp_runtime::traits::{Block as BlockT, Header};
|
||||
use primitives::hexdisplay::HexDisplay;
|
||||
use state_machine::{backend::Backend as StateBackend, TrieBackend};
|
||||
use log::trace;
|
||||
@@ -596,7 +596,7 @@ impl<H: Hasher, S: StateBackend<H>, B: BlockT> StateBackend<H> for CachingState<
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
|
||||
use state_machine::backend::InMemory;
|
||||
use primitives::Blake2Hasher;
|
||||
|
||||
@@ -844,7 +844,7 @@ mod qc {
|
||||
use quickcheck::{quickcheck, TestResult, Arbitrary};
|
||||
|
||||
use super::*;
|
||||
use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
|
||||
use state_machine::backend::InMemory;
|
||||
use primitives::Blake2Hasher;
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ use log::debug;
|
||||
|
||||
use codec::Decode;
|
||||
use trie::DBValue;
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, Header as HeaderT, Zero,
|
||||
UniqueSaturatedFrom, UniqueSaturatedInto,
|
||||
};
|
||||
@@ -184,7 +184,7 @@ pub fn block_id_to_lookup_key<Block>(
|
||||
id: BlockId<Block>
|
||||
) -> Result<Option<Vec<u8>>, sp_blockchain::Error> where
|
||||
Block: BlockT,
|
||||
::sr_primitives::traits::NumberFor<Block>: UniqueSaturatedFrom<u64> + UniqueSaturatedInto<u64>,
|
||||
::sp_runtime::traits::NumberFor<Block>: UniqueSaturatedFrom<u64> + UniqueSaturatedInto<u64>,
|
||||
{
|
||||
let res = match id {
|
||||
BlockId::Number(n) => db.get(
|
||||
@@ -357,7 +357,7 @@ pub fn read_meta<Block>(db: &dyn KeyValueDB, col_meta: Option<u32>, col_header:
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sr_primitives::testing::{Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::testing::{Block as RawBlock, ExtrinsicWrapper};
|
||||
type Block = RawBlock<ExtrinsicWrapper<u32>>;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-executor"
|
||||
name = "sc-executor"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -7,18 +7,18 @@ edition = "2018"
|
||||
[dependencies]
|
||||
derive_more = "0.99.2"
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
runtime_io = { package = "sr-io", path = "../../primitives/sr-io" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
trie = { package = "substrate-trie", path = "../../primitives/trie" }
|
||||
serializer = { package = "substrate-serializer", path = "../../primitives/serializer" }
|
||||
runtime_version = { package = "sr-version", path = "../../primitives/sr-version" }
|
||||
panic-handler = { package = "substrate-panic-handler", path = "../../primitives/panic-handler" }
|
||||
runtime_io = { package = "sp-io", path = "../../primitives/sr-io" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
trie = { package = "sp-trie", path = "../../primitives/trie" }
|
||||
serializer = { package = "sp-serializer", path = "../../primitives/serializer" }
|
||||
runtime_version = { package = "sp-version", path = "../../primitives/sr-version" }
|
||||
panic-handler = { package = "sp-panic-handler", path = "../../primitives/panic-handler" }
|
||||
wasmi = "0.6.2"
|
||||
parity-wasm = "0.41.0"
|
||||
lazy_static = "1.4.0"
|
||||
wasm-interface = { package = "substrate-wasm-interface", path = "../../primitives/wasm-interface" }
|
||||
runtime-interface = { package = "substrate-runtime-interface", path = "../../primitives/runtime-interface" }
|
||||
externalities = { package = "substrate-externalities", path = "../../primitives/externalities" }
|
||||
wasm-interface = { package = "sp-wasm-interface", path = "../../primitives/wasm-interface" }
|
||||
runtime-interface = { package = "sp-runtime-interface", path = "../../primitives/runtime-interface" }
|
||||
externalities = { package = "sp-externalities", path = "../../primitives/externalities" }
|
||||
parking_lot = "0.9.0"
|
||||
log = "0.4.8"
|
||||
libsecp256k1 = "0.3.2"
|
||||
@@ -36,12 +36,12 @@ wasmtime-runtime = { version = "0.8", optional = true }
|
||||
assert_matches = "1.3.0"
|
||||
wabt = "0.9.2"
|
||||
hex-literal = "0.2.1"
|
||||
runtime-test = { package = "substrate-runtime-test", path = "runtime-test" }
|
||||
runtime-test = { package = "sc-runtime-test", path = "runtime-test" }
|
||||
test-runtime = { package = "substrate-test-runtime", path = "../../test/utils/runtime" }
|
||||
runtime-interface = { package = "substrate-runtime-interface", path = "../../primitives/runtime-interface" }
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
substrate-offchain = { path = "../offchain/" }
|
||||
state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
runtime-interface = { package = "sp-runtime-interface", path = "../../primitives/runtime-interface" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
sc-offchain = { path = "../offchain/" }
|
||||
state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
test-case = "0.3.3"
|
||||
|
||||
[features]
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
[package]
|
||||
name = "substrate-runtime-test"
|
||||
name = "sc-runtime-test"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
sandbox = { package = "sr-sandbox", path = "../../../primitives/sr-sandbox", default-features = false }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false }
|
||||
sr-primitives = { package = "sr-primitives", path = "../../../primitives/sr-primitives", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false }
|
||||
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
sandbox = { package = "sp-sandbox", path = "../../../primitives/sr-sandbox", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
sp-runtime = { package = "sp-runtime", path = "../../../primitives/sr-primitives", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" }
|
||||
|
||||
@@ -14,7 +14,7 @@ use runtime_io::{
|
||||
crypto::{ed25519_verify, sr25519_verify},
|
||||
};
|
||||
#[cfg(not(feature = "std"))]
|
||||
use sr_primitives::{print, traits::{BlakeTwo256, Hash}};
|
||||
use sp_runtime::{print, traits::{BlakeTwo256, Hash}};
|
||||
#[cfg(not(feature = "std"))]
|
||||
use primitives::{ed25519, sr25519};
|
||||
|
||||
|
||||
@@ -79,13 +79,13 @@ impl_wasm_host_interface! {
|
||||
impl SubstrateExternals where context {
|
||||
ext_malloc(size: WordSize) -> Pointer<u8> {
|
||||
let r = context.allocate_memory(size)?;
|
||||
debug_trace!(target: "sr-io", "malloc {} bytes at {:?}", size, r);
|
||||
debug_trace!(target: "sp-io", "malloc {} bytes at {:?}", size, r);
|
||||
Ok(r)
|
||||
}
|
||||
|
||||
ext_free(addr: Pointer<u8>) {
|
||||
context.deallocate_memory(addr)?;
|
||||
debug_trace!(target: "sr-io", "free {:?}", addr);
|
||||
debug_trace!(target: "sp-io", "free {:?}", addr);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ impl<D: NativeExecutionDispatch> CodeExecutor for NativeExecutor<D> {
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// substrate_executor::native_executor_instance!(
|
||||
/// sc_executor::native_executor_instance!(
|
||||
/// pub MyExecutor,
|
||||
/// test_runtime::api::dispatch,
|
||||
/// test_runtime::native_version,
|
||||
@@ -287,7 +287,7 @@ impl<D: NativeExecutionDispatch> CodeExecutor for NativeExecutor<D> {
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// substrate_executor::native_executor_instance!(
|
||||
/// sc_executor::native_executor_instance!(
|
||||
/// pub MyExecutor,
|
||||
/// test_runtime::api::dispatch,
|
||||
/// test_runtime::native_version,
|
||||
|
||||
@@ -206,7 +206,7 @@ impl<'a> Sandbox for FunctionExecutor<'a> {
|
||||
return_val_len: WordSize,
|
||||
state: u32,
|
||||
) -> WResult<u32> {
|
||||
trace!(target: "sr-sandbox", "invoke, instance_idx={}", instance_id);
|
||||
trace!(target: "sp-sandbox", "invoke, instance_idx={}", instance_id);
|
||||
|
||||
// Deserialize arguments and convert them into wasmi types.
|
||||
let args = Vec::<sandbox_primitives::TypedValue>::decode(&mut &args[..])
|
||||
|
||||
@@ -283,7 +283,7 @@ impl<'a> Sandbox for FunctionExecutor<'a> {
|
||||
return_val_len: u32,
|
||||
state: u32,
|
||||
) -> WResult<u32> {
|
||||
trace!(target: "sr-sandbox", "invoke, instance_idx={}", instance_id);
|
||||
trace!(target: "sp-sandbox", "invoke, instance_idx={}", instance_id);
|
||||
|
||||
// Deserialize arguments and convert them into wasmi types.
|
||||
let args = Vec::<sandbox_primitives::TypedValue>::decode(&mut &args[..])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-finality-grandpa"
|
||||
name = "sc-finality-grandpa"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -14,29 +14,29 @@ tokio-executor = "0.1.8"
|
||||
tokio-timer = "0.2.11"
|
||||
rand = "0.7.2"
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
substrate-telemetry = { path = "../telemetry" }
|
||||
keystore = { package = "substrate-keystore", path = "../keystore" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
consensus_common = { package = "sp-consensus", path = "../../primitives/consensus/common" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
sc-telemetry = { path = "../telemetry" }
|
||||
keystore = { package = "sc-keystore", path = "../keystore" }
|
||||
serde_json = "1.0.41"
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
client = { package = "substrate-client", path = "../" }
|
||||
inherents = { package = "substrate-inherents", path = "../../primitives/inherents" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
client = { package = "sc-client", path = "../" }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
network = { package = "substrate-network", path = "../network" }
|
||||
network = { package = "sc-network", path = "../network" }
|
||||
sp-finality-tracker = { path = "../../primitives/finality-tracker" }
|
||||
fg_primitives = { package = "substrate-finality-grandpa-primitives", path = "../../primitives/finality-grandpa" }
|
||||
fg_primitives = { package = "sp-finality-granpda", path = "../../primitives/finality-grandpa" }
|
||||
grandpa = { package = "finality-grandpa", version = "0.10.1", features = ["derive-codec"] }
|
||||
|
||||
[dev-dependencies]
|
||||
grandpa = { package = "finality-grandpa", version = "0.10.1", features = ["derive-codec", "test-helpers"] }
|
||||
network = { package = "substrate-network", path = "../network", features = ["test-helpers"] }
|
||||
keyring = { package = "substrate-keyring", path = "../../primitives/keyring" }
|
||||
network = { package = "sc-network", path = "../network", features = ["test-helpers"] }
|
||||
keyring = { package = "sp-keyring", path = "../../primitives/keyring" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client"}
|
||||
babe_primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" }
|
||||
state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
babe_primitives = { package = "sp-consensus-babe", path = "../../primitives/consensus/babe" }
|
||||
state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
env_logger = "0.7.0"
|
||||
tokio = "0.1.22"
|
||||
tempfile = "3.1.0"
|
||||
sr-api = { path = "../../primitives/sr-api" }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
|
||||
@@ -21,7 +21,7 @@ use parking_lot::RwLock;
|
||||
use grandpa::voter_set::VoterSet;
|
||||
use codec::{Encode, Decode};
|
||||
use log::{debug, info};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use fg_primitives::{AuthorityId, AuthorityList};
|
||||
|
||||
use std::cmp::Ord;
|
||||
|
||||
@@ -23,7 +23,7 @@ use client_api::backend::AuxStore;
|
||||
use sp_blockchain::{Result as ClientResult, Error as ClientError};
|
||||
use fork_tree::ForkTree;
|
||||
use grandpa::round::State as RoundState;
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor};
|
||||
use log::{info, warn};
|
||||
use fg_primitives::{AuthorityList, SetId, RoundNumber};
|
||||
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
//!
|
||||
//! We only send polite messages to peers,
|
||||
|
||||
use sr_primitives::traits::{NumberFor, Block as BlockT, Zero};
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT, Zero};
|
||||
use network::consensus_gossip::{self as network_gossip, MessageIntent, ValidatorContext};
|
||||
use network::{config::Roles, PeerId};
|
||||
use codec::{Encode, Decode};
|
||||
use fg_primitives::AuthorityId;
|
||||
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_DEBUG};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_DEBUG};
|
||||
use log::{trace, debug, warn};
|
||||
use futures::prelude::*;
|
||||
use futures::sync::mpsc;
|
||||
|
||||
@@ -39,8 +39,8 @@ use network::{consensus_gossip as network_gossip, NetworkService};
|
||||
use network_gossip::ConsensusMessage;
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::Pair;
|
||||
use sr_primitives::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use tokio_executor::Executor;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -25,7 +25,7 @@ use log::{debug, warn};
|
||||
use tokio_timer::Delay;
|
||||
|
||||
use network::PeerId;
|
||||
use sr_primitives::traits::{NumberFor, Block as BlockT};
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT};
|
||||
use super::{gossip::{NeighborPacket, GossipMessage}, Network};
|
||||
|
||||
// how often to rebroadcast, if no other
|
||||
|
||||
@@ -25,7 +25,7 @@ use tokio::runtime::current_thread;
|
||||
use std::sync::Arc;
|
||||
use keyring::Ed25519Keyring;
|
||||
use codec::Encode;
|
||||
use sr_primitives::traits::NumberFor;
|
||||
use sp_runtime::traits::NumberFor;
|
||||
|
||||
use crate::environment::SharedVoterSetState;
|
||||
use fg_primitives::AuthorityList;
|
||||
|
||||
@@ -41,11 +41,11 @@ use grandpa::{
|
||||
voter, voter_set::VoterSet,
|
||||
};
|
||||
use primitives::{Blake2Hasher, H256, Pair};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, Header as HeaderT, NumberFor, One, Zero,
|
||||
};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
|
||||
use crate::{
|
||||
CommandOrError, Commit, Config, Error, Network, Precommit, Prevote,
|
||||
|
||||
@@ -46,12 +46,12 @@ use client_api::{
|
||||
use client::Client;
|
||||
use codec::{Encode, Decode};
|
||||
use grandpa::BlockNumberOps;
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
Justification, generic::BlockId,
|
||||
traits::{NumberFor, Block as BlockT, Header as HeaderT, One},
|
||||
};
|
||||
use primitives::{H256, Blake2Hasher, storage::StorageKey};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_INFO};
|
||||
use fg_primitives::{AuthorityId, AuthorityList, VersionedAuthorityList, GRANDPA_AUTHORITIES_KEY};
|
||||
|
||||
use crate::justification::GrandpaJustification;
|
||||
|
||||
@@ -30,9 +30,9 @@ use consensus_common::{
|
||||
SelectChain,
|
||||
};
|
||||
use fg_primitives::{GRANDPA_ENGINE_ID, ScheduledChange, ConsensusLog};
|
||||
use sr_primitives::Justification;
|
||||
use sr_primitives::generic::{BlockId, OpaqueDigestItemId};
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::Justification;
|
||||
use sp_runtime::generic::{BlockId, OpaqueDigestItemId};
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, DigestFor, Header as HeaderT, NumberFor, Zero,
|
||||
};
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
|
||||
@@ -22,8 +22,8 @@ use sp_blockchain::Error as ClientError;
|
||||
use codec::{Encode, Decode};
|
||||
use grandpa::voter_set::VoterSet;
|
||||
use grandpa::{Error as GrandpaError};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{NumberFor, Block as BlockT, Header as HeaderT};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT, Header as HeaderT};
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
use fg_primitives::AuthorityId;
|
||||
|
||||
|
||||
@@ -59,13 +59,13 @@ use client_api::{BlockchainEvents, CallExecutor, backend::Backend, ExecutionStra
|
||||
use sp_blockchain::{HeaderBackend, Error as ClientError};
|
||||
use client::Client;
|
||||
use codec::{Decode, Encode};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{NumberFor, Block as BlockT, DigestFor, Zero};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT, DigestFor, Zero};
|
||||
use keystore::KeyStorePtr;
|
||||
use inherents::InherentDataProviders;
|
||||
use consensus_common::SelectChain;
|
||||
use primitives::{H256, Blake2Hasher, Pair};
|
||||
use substrate_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG, CONSENSUS_WARN};
|
||||
use sc_telemetry::{telemetry, CONSENSUS_INFO, CONSENSUS_DEBUG, CONSENSUS_WARN};
|
||||
use serde_json;
|
||||
|
||||
use sp_finality_tracker;
|
||||
|
||||
@@ -28,10 +28,10 @@ use consensus_common::{
|
||||
BlockCheckParams, Error as ConsensusError,
|
||||
};
|
||||
use network::config::{BoxFinalityProofRequestBuilder, FinalityProofRequestBuilder};
|
||||
use sr_primitives::Justification;
|
||||
use sr_primitives::traits::{NumberFor, Block as BlockT, Header as HeaderT, DigestFor};
|
||||
use sp_runtime::Justification;
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT, Header as HeaderT, DigestFor};
|
||||
use fg_primitives::{self, AuthorityList};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
|
||||
use crate::GenesisAuthoritySetProvider;
|
||||
|
||||
@@ -27,7 +27,7 @@ use log::{debug, info, warn};
|
||||
use consensus_common::SelectChain;
|
||||
use client_api::{CallExecutor, backend::Backend};
|
||||
use client::Client;
|
||||
use sr_primitives::traits::{NumberFor, Block as BlockT};
|
||||
use sp_runtime::traits::{NumberFor, Block as BlockT};
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -27,15 +27,15 @@ use tokio::runtime::current_thread;
|
||||
use keyring::Ed25519Keyring;
|
||||
use client::LongestChain;
|
||||
use sp_blockchain::Result;
|
||||
use sr_api::{Core, RuntimeVersion, ApiExt, StorageProof};
|
||||
use sp_api::{Core, RuntimeVersion, ApiExt, StorageProof};
|
||||
use test_client::{self, runtime::BlockNumber};
|
||||
use consensus_common::{BlockOrigin, ForkChoiceStrategy, ImportedAux, BlockImportParams, ImportResult};
|
||||
use consensus_common::import_queue::{BoxBlockImport, BoxJustificationImport, BoxFinalityProofImport};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::result;
|
||||
use codec::Decode;
|
||||
use sr_primitives::traits::{ApiRef, ProvideRuntimeApi, Header as HeaderT};
|
||||
use sr_primitives::generic::{BlockId, DigestItem};
|
||||
use sp_runtime::traits::{ApiRef, ProvideRuntimeApi, Header as HeaderT};
|
||||
use sp_runtime::generic::{BlockId, DigestItem};
|
||||
use primitives::{NativeOrEncoded, ExecutionContext, crypto::Public};
|
||||
use fg_primitives::{GRANDPA_ENGINE_ID, AuthorityList, GrandpaApi};
|
||||
use state_machine::{backend::InMemory, prove_read, read_proof_check};
|
||||
|
||||
@@ -35,7 +35,7 @@ use futures::stream::Fuse;
|
||||
use futures03::{StreamExt as _, TryStreamExt as _};
|
||||
use grandpa::voter;
|
||||
use parking_lot::Mutex;
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use tokio_timer::Interval;
|
||||
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use client_api::blockchain::HeaderBackend;
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sr_primitives::traits::{Block as BlockT, Header, NumberFor, One, Zero};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_runtime::traits::{Block as BlockT, Header, NumberFor, One, Zero};
|
||||
|
||||
/// A trait for custom voting rules in GRANDPA.
|
||||
pub trait VotingRule<Block, B>: Send + Sync where
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "substrate-keystore"
|
||||
name = "sc-keystore"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
derive_more = "0.99.2"
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
app-crypto = { package = "sc-application-crypto", path = "../../primitives/application-crypto" }
|
||||
hex = "0.4.0"
|
||||
rand = "0.7.2"
|
||||
serde_json = "1.0.41"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
description = "Substrate network protocol"
|
||||
name = "substrate-network"
|
||||
name = "sc-network"
|
||||
version = "2.0.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
@@ -24,16 +24,16 @@ rustc-hex = "2.0.1"
|
||||
rand = "0.7.2"
|
||||
libp2p = { version = "0.13.0", default-features = false, features = ["libp2p-websocket"] }
|
||||
fork-tree = { path = "../../utils/fork-tree" }
|
||||
consensus = { package = "substrate-consensus-common", path = "../../primitives/consensus/common" }
|
||||
client = { package = "substrate-client", path = "../" }
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
consensus = { package = "sp-consensus", path = "../../primitives/consensus/common" }
|
||||
client = { package = "sc-client", path = "../" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
sr-arithmetic = { path = "../../primitives/sr-arithmetic" }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
block-builder = { package = "substrate-block-builder", path = "../block-builder" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
sp-arithmetic = { path = "../../primitives/sr-arithmetic" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
block-builder = { package = "sc-block-builder", path = "../block-builder" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
peerset = { package = "substrate-peerset", path = "../peerset" }
|
||||
peerset = { package = "sc-peerset", path = "../peerset" }
|
||||
serde = { version = "1.0.101", features = ["derive"] }
|
||||
serde_json = "1.0.41"
|
||||
slog = { version = "2.5.2", features = ["nested-values"] }
|
||||
@@ -42,17 +42,17 @@ smallvec = "0.6.10"
|
||||
tokio-io = "0.1.12"
|
||||
tokio = { version = "0.1.22", optional = true }
|
||||
unsigned-varint = { version = "0.2.2", features = ["codec"] }
|
||||
keyring = { package = "substrate-keyring", path = "../../primitives/keyring", optional = true }
|
||||
keyring = { package = "sp-keyring", path = "../../primitives/keyring", optional = true }
|
||||
test_client = { package = "substrate-test-client", path = "../../test/utils/client", optional = true }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client", optional = true }
|
||||
erased-serde = "0.3.9"
|
||||
void = "1.0.2"
|
||||
zeroize = "1.0.0"
|
||||
babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" }
|
||||
babe-primitives = { package = "sp-consensus-babe", path = "../../primitives/consensus/babe" }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.7.0"
|
||||
keyring = { package = "substrate-keyring", path = "../../primitives/keyring" }
|
||||
keyring = { package = "sp-keyring", path = "../../primitives/keyring" }
|
||||
quickcheck = "0.9.0"
|
||||
rand = "0.7.2"
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
|
||||
@@ -27,7 +27,7 @@ use libp2p::kad::record;
|
||||
use libp2p::swarm::{NetworkBehaviourAction, NetworkBehaviourEventProcess};
|
||||
use libp2p::core::{nodes::Substream, muxing::StreamMuxerBox};
|
||||
use log::{debug, warn};
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use std::iter;
|
||||
use void;
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ use client::Client as SubstrateClient;
|
||||
use sp_blockchain::Error;
|
||||
use client_api::{ChangesProof, StorageProof, ClientInfo, CallExecutor};
|
||||
use consensus::{BlockImport, BlockStatus, Error as ConsensusError};
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT};
|
||||
use sr_primitives::generic::{BlockId};
|
||||
use sr_primitives::Justification;
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT};
|
||||
use sp_runtime::generic::{BlockId};
|
||||
use sp_runtime::Justification;
|
||||
use primitives::{H256, Blake2Hasher, storage::StorageKey};
|
||||
|
||||
/// Local client abstraction for the network.
|
||||
|
||||
@@ -27,7 +27,7 @@ use crate::on_demand_layer::OnDemand;
|
||||
use crate::service::{ExHashT, TransactionPool};
|
||||
use bitflags::bitflags;
|
||||
use consensus::{block_validation::BlockAnnounceValidator, import_queue::ImportQueue};
|
||||
use sr_primitives::traits::{Block as BlockT};
|
||||
use sp_runtime::traits::{Block as BlockT};
|
||||
use libp2p::identity::{Keypair, ed25519};
|
||||
use libp2p::wasm_ext;
|
||||
use libp2p::{PeerId, Multiaddr, multiaddr};
|
||||
@@ -171,7 +171,7 @@ impl ProtocolId {
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # use substrate_network::{Multiaddr, PeerId, config::parse_str_addr};
|
||||
/// # use sc_network::{Multiaddr, PeerId, config::parse_str_addr};
|
||||
/// let (peer_id, addr) = parse_str_addr(
|
||||
/// "/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV"
|
||||
/// ).unwrap();
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
//! if necessary and open a unique substream for Substrate-based communications. If the PSM decides
|
||||
//! that we should disconnect a node, then that substream is closed.
|
||||
//!
|
||||
//! For more information about the PSM, see the *substrate-peerset* crate.
|
||||
//! For more information about the PSM, see the *sc-peerset* crate.
|
||||
//!
|
||||
//! Note that at the moment there is no mechanism in place to solve the issues that arise where the
|
||||
//! two sides of a connection open the unique substream simultaneously. In order to not run into
|
||||
@@ -151,7 +151,7 @@
|
||||
//!
|
||||
//! # Usage
|
||||
//!
|
||||
//! Using the `substrate-network` crate is done through the [`NetworkWorker`] struct. Create this
|
||||
//! Using the `sc-network` crate is done through the [`NetworkWorker`] struct. Create this
|
||||
//! struct by passing a [`config::Params`], then poll it as if it was a `Future`. You can extract an
|
||||
//! `Arc<NetworkService>` from the `NetworkWorker`, which can be shared amongst multiple places
|
||||
//! in order to give orders to the networking.
|
||||
@@ -202,7 +202,7 @@ pub use on_demand_layer::{OnDemand, RemoteResponse};
|
||||
|
||||
// Used by the `construct_simple_protocol!` macro.
|
||||
#[doc(hidden)]
|
||||
pub use sr_primitives::traits::Block as BlockT;
|
||||
pub use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
use libp2p::core::ConnectedPoint;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -26,7 +26,7 @@ use sp_blockchain::Error as ClientError;
|
||||
use client_api::{Fetcher, FetchChecker, RemoteHeaderRequest,
|
||||
RemoteCallRequest, RemoteReadRequest, RemoteChangesRequest,
|
||||
RemoteReadChildRequest, RemoteBodyRequest};
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
|
||||
/// Implements the `Fetcher` trait of the client. Makes it possible for the light client to perform
|
||||
/// network requests for some state.
|
||||
|
||||
@@ -31,11 +31,11 @@ use consensus::{
|
||||
import_queue::{BlockImportResult, BlockImportError, IncomingBlock, Origin}
|
||||
};
|
||||
use codec::{Decode, Encode};
|
||||
use sr_primitives::{generic::BlockId, ConsensusEngineId, Justification};
|
||||
use sr_primitives::traits::{
|
||||
use sp_runtime::{generic::BlockId, ConsensusEngineId, Justification};
|
||||
use sp_runtime::traits::{
|
||||
Block as BlockT, Header as HeaderT, NumberFor, One, Zero, CheckedSub
|
||||
};
|
||||
use sr_arithmetic::traits::SaturatedConversion;
|
||||
use sp_arithmetic::traits::SaturatedConversion;
|
||||
use message::{BlockAnnounce, BlockAttributes, Direction, FromBlock, Message, RequestId};
|
||||
use message::generic::{Message as GenericMessage, ConsensusMessage};
|
||||
use consensus_gossip::{ConsensusGossip, MessageRecipient as GossipMessageRecipient};
|
||||
|
||||
@@ -51,8 +51,8 @@ use log::{trace, debug};
|
||||
use futures03::channel::mpsc;
|
||||
use lru::LruCache;
|
||||
use libp2p::PeerId;
|
||||
use sr_primitives::traits::{Block as BlockT, Hash, HashFor};
|
||||
use sr_primitives::ConsensusEngineId;
|
||||
use sp_runtime::traits::{Block as BlockT, Hash, HashFor};
|
||||
use sp_runtime::ConsensusEngineId;
|
||||
pub use crate::message::generic::{Message, ConsensusMessage};
|
||||
use crate::protocol::Context;
|
||||
use crate::config::Roles;
|
||||
@@ -632,7 +632,7 @@ impl<B: BlockT> Validator<B> for DiscardAll {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::sync::Arc;
|
||||
use sr_primitives::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::testing::{H256, Block as RawBlock, ExtrinsicWrapper};
|
||||
use futures03::executor::block_on_stream;
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -32,7 +32,7 @@ use client_api::{FetchChecker, RemoteHeaderRequest,
|
||||
use crate::message::{self, BlockAttributes, Direction, FromBlock, RequestId};
|
||||
use libp2p::PeerId;
|
||||
use crate::config::Roles;
|
||||
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
|
||||
/// Remote request timeout.
|
||||
const REQUEST_TIMEOUT: Duration = Duration::from_secs(15);
|
||||
@@ -676,7 +676,7 @@ pub mod tests {
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
use futures::{Future, sync::oneshot};
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor, Header as HeaderT};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor, Header as HeaderT};
|
||||
use sp_blockchain::{Error as ClientError, Result as ClientResult};
|
||||
use client_api::{FetchChecker, RemoteHeaderRequest,
|
||||
ChangesProof, RemoteCallRequest, RemoteReadRequest,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Network packet message types. These get serialized and put into the lower level protocol payload.
|
||||
|
||||
use bitflags::bitflags;
|
||||
use sr_primitives::{ConsensusEngineId, traits::{Block as BlockT, Header as HeaderT}};
|
||||
use sp_runtime::{ConsensusEngineId, traits::{Block as BlockT, Header as HeaderT}};
|
||||
use codec::{Encode, Decode, Input, Output, Error};
|
||||
pub use self::generic::{
|
||||
BlockAnnounce, RemoteCallRequest, RemoteReadRequest,
|
||||
@@ -138,7 +138,7 @@ pub struct RemoteReadResponse {
|
||||
/// Generic types.
|
||||
pub mod generic {
|
||||
use codec::{Encode, Decode, Input, Output};
|
||||
use sr_primitives::Justification;
|
||||
use sp_runtime::Justification;
|
||||
use crate::config::Roles;
|
||||
use super::{
|
||||
RemoteReadResponse, Transactions, Direction,
|
||||
|
||||
@@ -20,7 +20,7 @@ pub use crate::protocol::event::{DhtEvent, Event};
|
||||
|
||||
use crate::protocol::Context;
|
||||
use libp2p::PeerId;
|
||||
use sr_primitives::traits::Block as BlockT;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// A specialization of the substrate network protocol. Handles events and sends messages.
|
||||
pub trait NetworkSpecialization<B: BlockT>: Send + Sync + 'static {
|
||||
|
||||
@@ -43,7 +43,7 @@ use either::Either;
|
||||
use extra_requests::ExtraRequests;
|
||||
use libp2p::PeerId;
|
||||
use log::{debug, trace, warn, info, error};
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
Justification,
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, Header, NumberFor, Zero, One, CheckedSub, SaturatedConversion}
|
||||
|
||||
@@ -21,7 +21,7 @@ use std::collections::{HashMap, BTreeMap};
|
||||
use std::collections::hash_map::Entry;
|
||||
use log::trace;
|
||||
use libp2p::PeerId;
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor, One};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor, One};
|
||||
use crate::message;
|
||||
|
||||
/// Block data with origin.
|
||||
@@ -215,7 +215,7 @@ impl<B: BlockT> BlockCollection<B> {
|
||||
mod test {
|
||||
use super::{BlockCollection, BlockData, BlockRangeState};
|
||||
use crate::{message, PeerId};
|
||||
use sr_primitives::testing::{Block as RawBlock, ExtrinsicWrapper};
|
||||
use sp_runtime::testing::{Block as RawBlock, ExtrinsicWrapper};
|
||||
use primitives::H256;
|
||||
|
||||
type Block = RawBlock<ExtrinsicWrapper<u64>>;
|
||||
|
||||
@@ -19,7 +19,7 @@ use crate::protocol::sync::{PeerSync, PeerSyncState};
|
||||
use fork_tree::ForkTree;
|
||||
use libp2p::PeerId;
|
||||
use log::{debug, warn};
|
||||
use sr_primitives::traits::{Block as BlockT, NumberFor, Zero};
|
||||
use sp_runtime::traits::{Block as BlockT, NumberFor, Zero};
|
||||
use std::collections::{HashMap, HashSet, VecDeque};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Main entry point of the substrate-network crate.
|
||||
//! Main entry point of the sc-network crate.
|
||||
//!
|
||||
//! There are two main structs in this module: [`NetworkWorker`] and [`NetworkService`].
|
||||
//! The [`NetworkWorker`] *is* the network and implements the `Future` trait. It must be polled in
|
||||
@@ -38,7 +38,7 @@ use libp2p::core::{transport::boxed::Boxed, muxing::StreamMuxerBox};
|
||||
use libp2p::swarm::NetworkBehaviour;
|
||||
use parking_lot::Mutex;
|
||||
use peerset::PeersetHandle;
|
||||
use sr_primitives::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId};
|
||||
use sp_runtime::{traits::{Block as BlockT, NumberFor}, ConsensusEngineId};
|
||||
|
||||
use crate::{behaviour::{Behaviour, BehaviourOut}, config::{parse_str_addr, parse_addr}};
|
||||
use crate::{NetworkState, NetworkStateNotConnectedPeer, NetworkStatePeer};
|
||||
@@ -607,7 +607,7 @@ pub trait NetworkStateInfo {
|
||||
|
||||
impl<B, S, H> NetworkStateInfo for NetworkService<B, S, H>
|
||||
where
|
||||
B: sr_primitives::traits::Block,
|
||||
B: sp_runtime::traits::Block,
|
||||
S: NetworkSpecialization<B>,
|
||||
H: ExHashT,
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ use consensus::import_queue::{
|
||||
};
|
||||
use test_client::{self, prelude::*};
|
||||
use test_client::runtime::{Block, Hash};
|
||||
use sr_primitives::generic::BlockId;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use super::*;
|
||||
|
||||
fn prepare_good_block() -> (TestClient, Hash, u64, PeerId, IncomingBlock<Block>) {
|
||||
|
||||
@@ -55,9 +55,9 @@ use libp2p::PeerId;
|
||||
use parking_lot::Mutex;
|
||||
use primitives::H256;
|
||||
use crate::protocol::{Context, ProtocolConfig};
|
||||
use sr_primitives::generic::{BlockId, OpaqueDigestItemId};
|
||||
use sr_primitives::traits::{Block as BlockT, Header, NumberFor};
|
||||
use sr_primitives::Justification;
|
||||
use sp_runtime::generic::{BlockId, OpaqueDigestItemId};
|
||||
use sp_runtime::traits::{Block as BlockT, Header, NumberFor};
|
||||
use sp_runtime::Justification;
|
||||
use crate::service::TransactionPool;
|
||||
use crate::specialization::NetworkSpecialization;
|
||||
use test_client::{self, AccountKeyring};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
description = "Substrate offchain workers"
|
||||
name = "substrate-offchain"
|
||||
name = "sc-offchain"
|
||||
version = "2.0.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
@@ -8,8 +8,8 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4.12"
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
sr-api = { path = "../../primitives/sr-api" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
fnv = "1.0.6"
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
futures = "0.3.1"
|
||||
@@ -17,25 +17,25 @@ futures-timer = "2.0"
|
||||
log = "0.4.8"
|
||||
threadpool = "1.7"
|
||||
num_cpus = "1.10"
|
||||
offchain-primitives = { package = "substrate-offchain-primitives", path = "../../primitives/offchain" }
|
||||
offchain-primitives = { package = "sp-offchain", path = "../../primitives/offchain" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", features = ["derive"] }
|
||||
parking_lot = "0.9.0"
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
rand = "0.7.2"
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
network = { package = "substrate-network", path = "../network" }
|
||||
keystore = { package = "substrate-keystore", path = "../keystore" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
network = { package = "sc-network", path = "../network" }
|
||||
keystore = { package = "sc-keystore", path = "../keystore" }
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
hyper = "0.12.35"
|
||||
hyper-rustls = "0.17.1"
|
||||
|
||||
[dev-dependencies]
|
||||
client-db = { package = "substrate-client-db", path = "../db/", default-features = true }
|
||||
client-db = { package = "sc-client-db", path = "../db/", default-features = true }
|
||||
env_logger = "0.7.0"
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
tokio = "0.1.22"
|
||||
txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" }
|
||||
txpool = { package = "sc-tracing-pool", path = "../../client/transaction-pool" }
|
||||
txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -37,12 +37,12 @@ use std::{fmt, marker::PhantomData, sync::Arc};
|
||||
|
||||
use parking_lot::Mutex;
|
||||
use threadpool::ThreadPool;
|
||||
use sr_api::ApiExt;
|
||||
use sp_api::ApiExt;
|
||||
use futures::future::Future;
|
||||
use log::{debug, warn};
|
||||
use network::NetworkStateInfo;
|
||||
use primitives::{offchain::{self, OffchainStorage}, ExecutionContext};
|
||||
use sr_primitives::{generic::BlockId, traits::{self, ProvideRuntimeApi}};
|
||||
use sp_runtime::{generic::BlockId, traits::{self, ProvideRuntimeApi}};
|
||||
|
||||
mod api;
|
||||
|
||||
@@ -169,7 +169,7 @@ mod tests {
|
||||
fn submit_at(
|
||||
&self,
|
||||
at: &BlockId<Block>,
|
||||
extrinsic: <Block as sr_primitives::traits::Block>::Extrinsic,
|
||||
extrinsic: <Block as sp_runtime::traits::Block>::Extrinsic,
|
||||
) -> Result<(), ()> {
|
||||
futures::executor::block_on(self.0.submit_one(&at, extrinsic))
|
||||
.map(|_| ())
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
description = "Connectivity manager based on reputation"
|
||||
homepage = "http://parity.io"
|
||||
license = "GPL-3.0"
|
||||
name = "substrate-peerset"
|
||||
name = "sc-peerset"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -19,7 +19,7 @@ use libp2p::PeerId;
|
||||
use rand::distributions::{Distribution, Uniform, WeightedIndex};
|
||||
use rand::seq::IteratorRandom;
|
||||
use std::{collections::HashMap, collections::HashSet, iter, pin::Pin, task::Poll};
|
||||
use substrate_peerset::{IncomingIndex, Message, PeersetConfig, Peerset};
|
||||
use sc_peerset::{IncomingIndex, Message, PeersetConfig, Peerset};
|
||||
|
||||
#[test]
|
||||
fn run() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "substrate-rpc-servers"
|
||||
name = "sc-rpc-server"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
@@ -10,7 +10,7 @@ pubsub = { package = "jsonrpc-pubsub", version = "14.0.3" }
|
||||
log = "0.4.8"
|
||||
serde = "1.0.101"
|
||||
serde_json = "1.0.41"
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
|
||||
[target.'cfg(not(target_os = "unknown"))'.dependencies]
|
||||
http = { package = "jsonrpc-http-server", version = "14.0.3" }
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
[package]
|
||||
name = "substrate-rpc"
|
||||
name = "sc-rpc"
|
||||
version = "2.0.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
api = { package = "sc-rpc-api", path = "./api" }
|
||||
client-api = { package = "substrate-client-api", path = "../api" }
|
||||
client = { package = "substrate-client", path = "../" }
|
||||
sr-api = { path = "../../primitives/sr-api" }
|
||||
client-api = { package = "sc-client-api", path = "../api" }
|
||||
client = { package = "sc-client", path = "../" }
|
||||
sp-api = { path = "../../primitives/sr-api" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
jsonrpc-pubsub = "14.0.3"
|
||||
log = "0.4.8"
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core" }
|
||||
rpc = { package = "jsonrpc-core", version = "14.0.3" }
|
||||
runtime_version = { package = "sr-version", path = "../../primitives/sr-version" }
|
||||
runtime_version = { package = "sp-version", path = "../../primitives/sr-version" }
|
||||
serde_json = "1.0.41"
|
||||
session = { package = "substrate-session", path = "../../primitives/session" }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives" }
|
||||
rpc-primitives = { package = "substrate-rpc-primitives", path = "../../primitives/rpc" }
|
||||
state_machine = { package = "substrate-state-machine", path = "../../primitives/state-machine" }
|
||||
substrate-executor = { path = "../executor" }
|
||||
substrate-keystore = { path = "../keystore" }
|
||||
session = { package = "sp-sesssion", path = "../../primitives/session" }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives" }
|
||||
rpc-primitives = { package = "sp-rpc", path = "../../primitives/rpc" }
|
||||
state_machine = { package = "sp-state-machine", path = "../../primitives/state-machine" }
|
||||
sc-executor = { path = "../executor" }
|
||||
sc-keystore = { path = "../keystore" }
|
||||
txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" }
|
||||
sp-blockchain = { path = "../../primitives/blockchain" }
|
||||
hash-db = { version = "0.15.2", default-features = false }
|
||||
@@ -31,9 +31,9 @@ parking_lot = { version = "0.9.0" }
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.3.0"
|
||||
futures01 = { package = "futures", version = "0.1.29" }
|
||||
network = { package = "substrate-network", path = "../network" }
|
||||
network = { package = "sc-network", path = "../network" }
|
||||
rustc-hex = "2.0.1"
|
||||
sr-io = { path = "../../primitives/sr-io" }
|
||||
sp-io = { path = "../../primitives/sr-io" }
|
||||
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }
|
||||
tokio = "0.1.22"
|
||||
txpool = { package = "sc-transaction-pool", path = "../transaction-pool" }
|
||||
txpool = { package = "sc-tracing-pool", path = "../transaction-pool" }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user