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:
Benjamin Kampmann
2019-12-02 11:23:53 +01:00
committed by GitHub
parent 40f6d05a4c
commit 927e13c13a
468 changed files with 3383 additions and 3271 deletions
+32 -32
View File
@@ -34,34 +34,34 @@ rand = "0.7.2"
structopt = "0.3.3"
# primitives
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../../primitives/authority-discovery"}
babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe" }
grandpa_primitives = { package = "substrate-finality-grandpa-primitives", path = "../../../primitives/finality-grandpa" }
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
sr-primitives = { path = "../../../primitives/sr-primitives" }
authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../../primitives/authority-discovery"}
babe-primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe" }
grandpa_primitives = { package = "sp-finality-granpda", path = "../../../primitives/finality-grandpa" }
primitives = { package = "sp-core", path = "../../../primitives/core" }
sp-runtime = { path = "../../../primitives/sr-primitives" }
sp-timestamp = { path = "../../../primitives/timestamp", default-features = false }
sp-finality-tracker = { path = "../../../primitives/finality-tracker", default-features = false }
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" }
runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" }
inherents = { package = "sp-inherents", path = "../../../primitives/inherents" }
keyring = { package = "sp-keyring", path = "../../../primitives/keyring" }
runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" }
# client dependencies
client-api = { package = "substrate-client-api", path = "../../../client/api" }
client = { package = "substrate-client", path = "../../../client/" }
chain-spec = { package = "substrate-chain-spec", path = "../../../client/chain-spec" }
txpool = { package = "sc-transaction-pool", path = "../../../client/transaction-pool" }
client-api = { package = "sc-client-api", path = "../../../client/api" }
client = { package = "sc-client", path = "../../../client/" }
chain-spec = { package = "sc-chain-spec", path = "../../../client/chain-spec" }
txpool = { package = "sc-tracing-pool", path = "../../../client/transaction-pool" }
txpool-api = { package = "sp-transaction-pool-api", path = "../../../primitives/transaction-pool" }
network = { package = "substrate-network", path = "../../../client/network" }
babe = { package = "substrate-consensus-babe", path = "../../../client/consensus/babe" }
grandpa = { package = "substrate-finality-grandpa", path = "../../../client/finality-grandpa" }
client_db = { package = "substrate-client-db", path = "../../../client/db", default-features = false }
offchain = { package = "substrate-offchain", path = "../../../client/offchain" }
substrate-rpc = { package = "substrate-rpc", path = "../../../client/rpc" }
substrate-basic-authorship = { path = "../../../client/basic-authorship" }
substrate-service = { path = "../../../client/service", default-features = false }
substrate-telemetry = { package = "substrate-telemetry", path = "../../../client/telemetry" }
authority-discovery = { package = "substrate-authority-discovery", path = "../../../client/authority-discovery"}
consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
network = { package = "sc-network", path = "../../../client/network" }
babe = { package = "sc-consensus-babe", path = "../../../client/consensus/babe" }
grandpa = { package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
client_db = { package = "sc-client-db", path = "../../../client/db", default-features = false }
offchain = { package = "sc-offchain", path = "../../../client/offchain" }
sc-rpc = { package = "sc-rpc", path = "../../../client/rpc" }
sc-basic-authority = { path = "../../../client/basic-authorship" }
sc-service = { path = "../../../client/service", default-features = false }
sc-telemetry = { package = "sc-telemetry", path = "../../../client/telemetry" }
authority-discovery = { package = "sc-authority-discovery", path = "../../../client/authority-discovery"}
consensus-common = { package = "sp-consensus", path = "../../../primitives/consensus/common" }
# frame dependencies
indices = { package = "pallet-indices", path = "../../../frame/indices" }
@@ -82,7 +82,7 @@ node-executor = { path = "../executor" }
# CLI-specific dependencies
tokio = { version = "0.1.22", optional = true }
substrate-cli = { path = "../../../client/cli", optional = true }
sc-cli = { path = "../../../client/cli", optional = true }
transaction-factory = { path = "../../../test/utils/transaction-factory", optional = true }
ctrlc = { version = "3.1.3", features = ["termination"], optional = true }
@@ -98,14 +98,14 @@ kvdb-memorydb = { version = "0.1.1", optional = true }
rand6 = { package = "rand", version = "0.6", features = ["wasm-bindgen"], optional = true } # Imported just for the `wasm-bindgen` feature
[dev-dependencies]
keystore = { package = "substrate-keystore", path = "../../../client/keystore" }
babe = { package = "substrate-consensus-babe", path = "../../../client/consensus/babe", features = ["test-helpers"] }
service-test = { package = "substrate-service-test", path = "../../../client/service/test" }
keystore = { package = "sc-keystore", path = "../../../client/keystore" }
babe = { package = "sc-consensus-babe", path = "../../../client/consensus/babe", features = ["test-helpers"] }
service-test = { package = "sc-service-test", path = "../../../client/service/test" }
futures = "0.3.1"
tempfile = "3.1.0"
[build-dependencies]
substrate-cli = { package = "substrate-cli", path = "../../../client/cli" }
sc-cli = { package = "sc-cli", path = "../../../client/cli" }
build-script-utils = { package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" }
structopt = "0.3.3"
vergen = "3.0.4"
@@ -125,16 +125,16 @@ browser = [
"rand6"
]
cli = [
"substrate-cli",
"sc-cli",
"transaction-factory",
"tokio",
"ctrlc",
"substrate-service/rocksdb",
"sc-service/rocksdb",
"node-executor/wasmi-errno",
]
wasmtime = [
"cli",
"node-executor/wasmtime",
"substrate-cli/wasmtime",
"substrate-service/wasmtime",
"sc-cli/wasmtime",
"sc-service/wasmtime",
]
+3 -3
View File
@@ -20,13 +20,13 @@
use futures::channel::oneshot;
use futures::{future, FutureExt};
use substrate_cli::VersionInfo;
use sc_cli::VersionInfo;
use std::cell::RefCell;
// handles ctrl-c
struct Exit;
impl substrate_cli::IntoExit for Exit {
impl sc_cli::IntoExit for Exit {
type Exit = future::Map<oneshot::Receiver<()>, fn(Result<(), oneshot::Canceled>) -> ()>;
fn into_exit(self) -> Self::Exit {
// can't use signal directly here because CtrlC takes only `Fn`.
@@ -43,7 +43,7 @@ impl substrate_cli::IntoExit for Exit {
}
}
fn main() -> Result<(), substrate_cli::error::Error> {
fn main() -> Result<(), sc_cli::error::Error> {
let version = VersionInfo {
name: "Substrate Node",
commit: env!("VERGEN_SHA_SHORT"),
+1 -1
View File
@@ -16,7 +16,7 @@
use std::{fs, env, path::Path};
use structopt::{StructOpt, clap::Shell};
use substrate_cli::{NoCustom, CoreParams};
use sc_cli::{NoCustom, CoreParams};
use vergen::{ConstantsFlags, generate_cargo_keys};
fn main() {
+1 -1
View File
@@ -19,7 +19,7 @@ use futures01::{prelude::*, sync::oneshot, sync::mpsc};
use libp2p::wasm_ext;
use log::{debug, info};
use std::sync::Arc;
use substrate_service::{AbstractService, RpcSession, Roles as ServiceRoles, Configuration, config::DatabaseConfig};
use sc_service::{AbstractService, RpcSession, Roles as ServiceRoles, Configuration, config::DatabaseConfig};
use wasm_bindgen::prelude::*;
/// Starts the client.
+5 -5
View File
@@ -26,14 +26,14 @@ use node_runtime::{
};
use node_runtime::Block;
use node_runtime::constants::currency::*;
use substrate_service;
use sc_service;
use hex_literal::hex;
use substrate_telemetry::TelemetryEndpoints;
use sc_telemetry::TelemetryEndpoints;
use grandpa_primitives::{AuthorityId as GrandpaId};
use babe_primitives::{AuthorityId as BabeId};
use im_online::sr25519::{AuthorityId as ImOnlineId};
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use sr_primitives::{Perbill, traits::{Verify, IdentifyAccount}};
use sp_runtime::{Perbill, traits::{Verify, IdentifyAccount}};
pub use node_primitives::{AccountId, Balance, Signature};
pub use node_runtime::GenesisConfig;
@@ -53,7 +53,7 @@ pub struct Extensions {
}
/// Specialized `ChainSpec`.
pub type ChainSpec = substrate_service::ChainSpec<
pub type ChainSpec = sc_service::ChainSpec<
GenesisConfig,
Extensions,
>;
@@ -347,7 +347,7 @@ pub fn local_testnet_config() -> ChainSpec {
pub(crate) mod tests {
use super::*;
use crate::service::new_full;
use substrate_service::Roles;
use sc_service::Roles;
use service_test;
fn local_testnet_genesis_instant_single() -> GenesisConfig {
+8 -8
View File
@@ -14,14 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
pub use substrate_cli::VersionInfo;
pub use sc_cli::VersionInfo;
use tokio::prelude::Future;
use tokio::runtime::{Builder as RuntimeBuilder, Runtime};
use substrate_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error};
use substrate_service::{AbstractService, Roles as ServiceRoles, Configuration};
use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error};
use sc_service::{AbstractService, Roles as ServiceRoles, Configuration};
use log::info;
use structopt::{StructOpt, clap::App};
use substrate_cli::{display_role, parse_and_prepare, AugmentClap, GetLogFilter, ParseAndPrepare};
use sc_cli::{display_role, parse_and_prepare, AugmentClap, GetLogFilter, ParseAndPrepare};
use crate::{service, ChainSpec, load_spec};
use crate::factory_impl::FactoryState;
use transaction_factory::RuntimeAdapter;
@@ -93,7 +93,7 @@ impl AugmentClap for FactoryCmd {
}
/// Parse command line arguments into service configuration.
pub fn run<I, T, E>(args: I, exit: E, version: substrate_cli::VersionInfo) -> error::Result<()> where
pub fn run<I, T, E>(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Result<()> where
I: IntoIterator<Item = T>,
T: Into<std::ffi::OsString> + Clone,
E: IntoExit,
@@ -135,13 +135,13 @@ pub fn run<I, T, E>(args: I, exit: E, version: substrate_cli::VersionInfo) -> er
ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Config<_, _>|
Ok(new_full_start!(config).0), load_spec),
ParseAndPrepare::CustomCommand(CustomSubcommands::Factory(cli_args)) => {
let mut config: Config<_, _> = substrate_cli::create_config_with_db_path(
let mut config: Config<_, _> = sc_cli::create_config_with_db_path(
load_spec,
&cli_args.shared_params,
&version,
)?;
substrate_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?;
sc_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?;
match ChainSpec::from(config.chain_spec.id()) {
Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {},
@@ -180,7 +180,7 @@ where
let (exit_send, exit) = oneshot::channel();
let informant = substrate_cli::informant::build(&service);
let informant = sc_cli::informant::build(&service);
let future = select(informant, exit)
.map(|_| Ok(()))
+2 -2
View File
@@ -29,7 +29,7 @@ use node_runtime::{
};
use node_primitives::Signature;
use primitives::{sr25519, crypto::Pair};
use sr_primitives::{
use sp_runtime::{
generic::Era, traits::{Block as BlockT, Header as HeaderT, SignedExtension, Verify, IdentifyAccount}
};
use transaction_factory::RuntimeAdapter;
@@ -71,7 +71,7 @@ impl RuntimeAdapter for FactoryState<Number> {
type AccountId = node_primitives::AccountId;
type Balance = node_primitives::Balance;
type Block = node_primitives::Block;
type Phase = sr_primitives::generic::Phase;
type Phase = sp_runtime::generic::Phase;
type Secret = sr25519::Pair;
type Index = node_primitives::Index;
+13 -13
View File
@@ -26,16 +26,16 @@ use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider};
use node_executor;
use node_primitives::Block;
use node_runtime::{GenesisConfig, RuntimeApi};
use substrate_service::{
use sc_service::{
AbstractService, ServiceBuilder, config::Configuration, error::{Error as ServiceError},
};
use inherents::InherentDataProviders;
use network::construct_simple_protocol;
use substrate_service::{Service, NetworkStatus};
use sc_service::{Service, NetworkStatus};
use client::{Client, LocalCallExecutor};
use client_db::Backend;
use sr_primitives::traits::Block as BlockT;
use sp_runtime::traits::Block as BlockT;
use node_executor::NativeExecutor;
use network::NetworkService;
use offchain::OffchainWorkers;
@@ -52,11 +52,11 @@ construct_simple_protocol! {
/// be able to perform chain operations.
macro_rules! new_full_start {
($config:expr) => {{
type RpcExtension = jsonrpc_core::IoHandler<substrate_rpc::Metadata>;
type RpcExtension = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
let mut import_setup = None;
let inherent_data_providers = inherents::InherentDataProviders::new();
let builder = substrate_service::ServiceBuilder::new_full::<
let builder = sc_service::ServiceBuilder::new_full::<
node_primitives::Block, node_runtime::RuntimeApi, node_executor::Executor
>($config)?
.with_select_chain(|_config, backend| {
@@ -71,7 +71,7 @@ macro_rules! new_full_start {
})?
.with_import_queue(|_config, client, mut select_chain, _transaction_pool| {
let select_chain = select_chain.take()
.ok_or_else(|| substrate_service::Error::SelectChainRequired)?;
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
let (grandpa_block_import, grandpa_link) = grandpa::block_import(
client.clone(),
&*client,
@@ -160,14 +160,14 @@ macro_rules! new_full {
($with_startup_data)(&block_import, &babe_link);
if participates_in_consensus {
let proposer = substrate_basic_authorship::ProposerFactory {
let proposer = sc_basic_authority::ProposerFactory {
client: service.client(),
transaction_pool: service.transaction_pool(),
};
let client = service.client();
let select_chain = service.select_chain()
.ok_or(substrate_service::Error::SelectChainRequired)?;
.ok_or(sc_service::Error::SelectChainRequired)?;
let can_author_with =
consensus_common::CanAuthorWithNativeVersion::new(client.executor().clone());
@@ -314,7 +314,7 @@ pub fn new_full<C: Send + Default + 'static>(config: NodeConfiguration<C>)
/// Builds a new service for a light client.
pub fn new_light<C: Send + Default + 'static>(config: NodeConfiguration<C>)
-> Result<impl AbstractService, ServiceError> {
type RpcExtension = jsonrpc_core::IoHandler<substrate_rpc::Metadata>;
type RpcExtension = jsonrpc_core::IoHandler<sc_rpc::Metadata>;
let inherent_data_providers = InherentDataProviders::new();
let service = ServiceBuilder::new_light::<Block, RuntimeApi, node_executor::Executor>(config)?
@@ -394,7 +394,7 @@ mod tests {
use node_runtime::constants::{currency::CENTS, time::SLOT_DURATION};
use codec::{Encode, Decode};
use primitives::{crypto::Pair as CryptoPair, H256};
use sr_primitives::{
use sp_runtime::{
generic::{BlockId, Era, Digest, SignedPayload},
traits::Block as BlockT,
traits::Verify,
@@ -403,9 +403,9 @@ mod tests {
use sp_timestamp;
use sp_finality_tracker;
use keyring::AccountKeyring;
use substrate_service::{AbstractService, Roles};
use sc_service::{AbstractService, Roles};
use crate::service::new_full;
use sr_primitives::traits::IdentifyAccount;
use sp_runtime::traits::IdentifyAccount;
type AccountPublic = <Signature as Verify>::Signer;
@@ -518,7 +518,7 @@ mod tests {
let parent_id = BlockId::number(service.client().info().chain.best_number);
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
let mut proposer_factory = substrate_basic_authorship::ProposerFactory {
let mut proposer_factory = sc_basic_authority::ProposerFactory {
client: service.client(),
transaction_pool: service.transaction_pool(),
};
+8 -8
View File
@@ -8,18 +8,18 @@ edition = "2018"
[dependencies]
trie-root = "0.15.2"
codec = { package = "parity-scale-codec", version = "1.0.0" }
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" }
state_machine = { package = "substrate-state-machine", path = "../../../primitives/state-machine" }
substrate-executor = { path = "../../../client/executor" }
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
trie = { package = "substrate-trie", path = "../../../primitives/trie" }
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" }
state_machine = { package = "sp-state-machine", path = "../../../primitives/state-machine" }
sc-executor = { path = "../../../client/executor" }
primitives = { package = "sp-core", path = "../../../primitives/core" }
trie = { package = "sp-trie", path = "../../../primitives/trie" }
node-primitives = { path = "../primitives" }
node-runtime = { path = "../runtime" }
[dev-dependencies]
node-testing = { path = "../testing" }
test-client = { package = "substrate-test-client", path = "../../../test/utils/client" }
sr-primitives = { path = "../../../primitives/sr-primitives" }
sp-runtime = { path = "../../../primitives/sr-primitives" }
runtime_support = { package = "frame-support", path = "../../../frame/support" }
balances = { package = "pallet-balances", path = "../../../frame/balances" }
transaction-payment = { package = "pallet-transaction-payment", path = "../../../frame/transaction-payment" }
@@ -35,10 +35,10 @@ criterion = "0.3.0"
[features]
wasmtime = [
"substrate-executor/wasmtime",
"sc-executor/wasmtime",
]
wasmi-errno = [
"substrate-executor/wasmi-errno",
"sc-executor/wasmi-errno",
]
stress-test = []
+1 -1
View File
@@ -28,7 +28,7 @@ use primitives::storage::well_known_keys;
use primitives::traits::CodeExecutor;
use runtime_support::Hashable;
use state_machine::TestExternalities as CoreTestExternalities;
use substrate_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities};
use sc_executor::{NativeExecutor, RuntimeInfo, WasmExecutionMethod, Externalities};
criterion_group!(benches, bench_execute_block);
criterion_main!(benches);
+5 -5
View File
@@ -17,8 +17,8 @@
//! A `CodeExecutor` specialization which uses natively compiled runtime when the wasm to be
//! executed is equivalent to the natively compiled code.
pub use substrate_executor::NativeExecutor;
use substrate_executor::native_executor_instance;
pub use sc_executor::NativeExecutor;
use sc_executor::native_executor_instance;
// Declare an instance of the native executor named `Executor`. Include the wasm binary as the
// equivalent wasm code.
@@ -30,7 +30,7 @@ native_executor_instance!(
#[cfg(test)]
mod tests {
use substrate_executor::error::Result;
use sc_executor::error::Result;
use super::Executor;
use {balances, contracts, indices, system, timestamp};
use codec::{Encode, Decode, Joiner};
@@ -44,12 +44,12 @@ mod tests {
Blake2Hasher, NeverNativeValue, NativeOrEncoded, map,
traits::{CodeExecutor, Externalities}, storage::well_known_keys,
};
use sr_primitives::{
use sp_runtime::{
Fixed64, traits::{Header as HeaderT, Hash as HashT, Convert}, ApplyExtrinsicResult,
transaction_validity::InvalidTransaction,
};
use contracts::ContractAddressFor;
use substrate_executor::{NativeExecutor, WasmExecutionMethod};
use sc_executor::{NativeExecutor, WasmExecutionMethod};
use system::{EventRecord, Phase};
use node_runtime::{
Header, Block, UncheckedExtrinsic, CheckedExtrinsic, Call, Runtime, Balances, BuildStorage,
+4 -4
View File
@@ -5,16 +5,16 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false }
sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false }
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false }
[dev-dependencies]
substrate-serializer = { path = "../../../primitives/serializer" }
sp-serializer = { path = "../../../primitives/serializer" }
pretty_assertions = "0.6.1"
[features]
default = ["std"]
std = [
"primitives/std",
"sr-primitives/std",
"sp-runtime/std",
]
+1 -1
View File
@@ -20,7 +20,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
use sr_primitives::{
use sp_runtime::{
generic, traits::{Verify, BlakeTwo256, IdentifyAccount}, OpaqueExtrinsic, MultiSignature
};
+1 -1
View File
@@ -11,4 +11,4 @@ hyper = "0.12.35"
jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] }
log = "0.4.8"
node-primitives = { path = "../primitives" }
substrate-rpc = { path = "../../../client/rpc", version = "2.0.0" }
sc-rpc = { path = "../../../client/rpc", version = "2.0.0" }
+1 -1
View File
@@ -24,7 +24,7 @@
use futures::Future;
use hyper::rt;
use node_primitives::Hash;
use substrate_rpc::author::{
use sc_rpc::author::{
AuthorClient,
hash::ExtrinsicOrHash,
};
+2 -2
View File
@@ -5,11 +5,11 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
client = { package = "substrate-client", path = "../../../client/" }
client = { package = "sc-client", path = "../../../client/" }
jsonrpc-core = "14.0.3"
node-primitives = { path = "../primitives" }
node-runtime = { path = "../runtime" }
sr-primitives = { path = "../../../primitives/sr-primitives" }
sp-runtime = { path = "../../../primitives/sr-primitives" }
pallet-contracts-rpc = { path = "../../../frame/contracts/rpc/" }
pallet-transaction-payment-rpc = { path = "../../../frame/transaction-payment/rpc/" }
substrate-frame-rpc-system = { path = "../../../utils/frame/rpc/system" }
+2 -2
View File
@@ -18,7 +18,7 @@
//!
//! Since `substrate` core functionality makes no assumptions
//! about the modules used inside the runtime, so do
//! RPC methods defined in `substrate-rpc` crate.
//! RPC methods defined in `sc-rpc` crate.
//! It means that `client/rpc` can't have any methods that
//! need some strong assumptions about the particular runtime.
//!
@@ -33,7 +33,7 @@ use std::sync::Arc;
use node_primitives::{Block, AccountId, Index, Balance};
use node_runtime::UncheckedExtrinsic;
use sr_primitives::traits::ProvideRuntimeApi;
use sp_runtime::traits::ProvideRuntimeApi;
use txpool_api::TransactionPool;
/// Light client extra dependencies.
+19 -19
View File
@@ -14,21 +14,21 @@ rustc-hex = { version = "2.0", optional = true }
serde = { version = "1.0.102", optional = true }
# primitives
authority-discovery-primitives = { package = "substrate-authority-discovery-primitives", path = "../../../primitives/authority-discovery", default-features = false }
babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../../primitives/consensus/babe", default-features = false }
block-builder-api = { package = "substrate-block-builder-runtime-api", path = "../../../primitives/block-builder/runtime-api", default-features = false}
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false }
authority-discovery-primitives = { package = "sp-authority-discovery", path = "../../../primitives/authority-discovery", default-features = false }
babe-primitives = { package = "sp-consensus-babe", path = "../../../primitives/consensus/babe", default-features = false }
block-builder-api = { package = "sp-block-builder", path = "../../../primitives/block-builder/runtime-api", default-features = false}
inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false }
node-primitives = { path = "../primitives", default-features = false }
offchain-primitives = { package = "substrate-offchain-primitives", path = "../../../primitives/offchain", default-features = false }
primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false }
rstd = { package = "sr-std", path = "../../../primitives/sr-std", default-features = false }
sr-api = { path = "../../../primitives/sr-api", default-features = false }
sr-primitives = { path = "../../../primitives/sr-primitives", default-features = false }
sr-staking-primitives = { path = "../../../primitives/sr-staking-primitives", default-features = false }
substrate-keyring = { path = "../../../primitives/keyring", optional = true }
substrate-session = { path = "../../../primitives/session", default-features = false }
offchain-primitives = { package = "sp-offchain", path = "../../../primitives/offchain", default-features = false }
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
rstd = { package = "sp-std", path = "../../../primitives/sr-std", default-features = false }
sp-api = { path = "../../../primitives/sr-api", default-features = false }
sp-runtime = { path = "../../../primitives/sr-primitives", default-features = false }
sp-staking = { path = "../../../primitives/sr-staking-primitives", default-features = false }
sp-keyring = { path = "../../../primitives/keyring", optional = true }
sp-sesssion = { path = "../../../primitives/session", default-features = false }
txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false }
version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false }
version = { package = "sp-version", path = "../../../primitives/sr-version", default-features = false }
# frame dependencies
authority-discovery = { package = "pallet-authority-discovery", path = "../../../frame/authority-discovery", default-features = false }
@@ -66,7 +66,7 @@ transaction-payment-rpc-runtime-api = { package = "pallet-transaction-payment-rp
wasm-builder-runner = { package = "substrate-wasm-builder-runner", path = "../../../client/utils/wasm-builder-runner", version = "1.0.4" }
[dev-dependencies]
runtime_io = { package = "sr-io", path = "../../../primitives/sr-io" }
runtime_io = { package = "sp-io", path = "../../../primitives/sr-io" }
[features]
default = ["std"]
@@ -102,12 +102,12 @@ std = [
"safe-mix/std",
"serde",
"session/std",
"sr-api/std",
"sr-primitives/std",
"sr-staking-primitives/std",
"sp-api/std",
"sp-runtime/std",
"sp-staking/std",
"staking/std",
"substrate-keyring",
"substrate-session/std",
"sp-keyring",
"sp-sesssion/std",
"sudo/std",
"support/std",
"system-rpc-runtime-api/std",
+3 -3
View File
@@ -17,8 +17,8 @@
//! Some configurable implementations as associated type for the substrate runtime.
use node_primitives::Balance;
use sr_primitives::traits::{Convert, Saturating};
use sr_primitives::{Fixed64, Perbill};
use sp_runtime::traits::{Convert, Saturating};
use sp_runtime::{Fixed64, Perbill};
use support::{traits::{OnUnbalanced, Currency, Get}, weights::Weight};
use crate::{Balances, System, Authorship, MaximumBlockWeight, NegativeImbalance};
@@ -115,7 +115,7 @@ impl<T: Get<Perbill>> Convert<Fixed64, Fixed64> for TargetedFeeAdjustment<T> {
#[cfg(test)]
mod tests {
use super::*;
use sr_primitives::assert_eq_error_rate;
use sp_runtime::assert_eq_error_rate;
use crate::{MaximumBlockWeight, AvailableBlockRatio, Runtime};
use crate::{constants::currency::*, TransactionPayment, TargetBlockFullness};
use support::weights::Weight;
+10 -10
View File
@@ -28,11 +28,11 @@ use support::{
};
use primitives::u32_trait::{_1, _2, _3, _4};
use node_primitives::{AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature};
use sr_api::impl_runtime_apis;
use sr_primitives::{Permill, Perbill, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str};
use sr_primitives::curve::PiecewiseLinear;
use sr_primitives::transaction_validity::TransactionValidity;
use sr_primitives::traits::{
use sp_api::impl_runtime_apis;
use sp_runtime::{Permill, Perbill, ApplyExtrinsicResult, impl_opaque_keys, generic, create_runtime_str};
use sp_runtime::curve::PiecewiseLinear;
use sp_runtime::transaction_validity::TransactionValidity;
use sp_runtime::traits::{
self, BlakeTwo256, Block as BlockT, NumberFor, StaticLookup, SaturatedConversion,
OpaqueKeys,
};
@@ -50,7 +50,7 @@ use system::offchain::TransactionSubmitter;
use inherents::{InherentData, CheckInherentsResult};
#[cfg(any(feature = "std", test))]
pub use sr_primitives::BuildStorage;
pub use sp_runtime::BuildStorage;
pub use timestamp::Call as TimestampCall;
pub use balances::Call as BalancesCall;
pub use contracts::Gas;
@@ -248,7 +248,7 @@ pallet_staking_reward_curve::build! {
}
parameter_types! {
pub const SessionsPerEra: sr_staking_primitives::SessionIndex = 6;
pub const SessionsPerEra: sp_staking::SessionIndex = 6;
pub const BondingDuration: staking::EraIndex = 24 * 28;
pub const SlashDeferDuration: staking::EraIndex = 24 * 7; // 1/4 the bonding duration.
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
@@ -571,7 +571,7 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Call, SignedExt
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Runtime, AllModules>;
impl_runtime_apis! {
impl sr_api::Core<Block> for Runtime {
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
@@ -585,7 +585,7 @@ impl_runtime_apis! {
}
}
impl sr_api::Metadata<Block> for Runtime {
impl sp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
Runtime::metadata().into()
}
@@ -711,7 +711,7 @@ impl_runtime_apis! {
}
}
impl substrate_session::SessionKeys<Block> for Runtime {
impl sp_sesssion::SessionKeys<Block> for Runtime {
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
SessionKeys::generate(seed)
}
+6 -6
View File
@@ -7,22 +7,22 @@ edition = "2018"
[dependencies]
balances = { package = "pallet-balances", path = "../../../frame/balances" }
client = { package = "substrate-client", path = "../../../client/" }
client = { package = "sc-client", path = "../../../client/" }
codec = { package = "parity-scale-codec", version = "1.0.0" }
contracts = { package = "pallet-contracts", path = "../../../frame/contracts" }
grandpa = { package = "pallet-grandpa", path = "../../../frame/grandpa" }
indices = { package = "pallet-indices", path = "../../../frame/indices" }
keyring = { package = "substrate-keyring", path = "../../../primitives/keyring" }
keyring = { package = "sp-keyring", path = "../../../primitives/keyring" }
node-executor = { path = "../executor" }
node-primitives = { path = "../primitives" }
node-runtime = { path = "../runtime" }
primitives = { package = "substrate-primitives", path = "../../../primitives/core" }
runtime-io = { package = "sr-io", path = "../../../primitives/sr-io" }
primitives = { package = "sp-core", path = "../../../primitives/core" }
runtime-io = { package = "sp-io", path = "../../../primitives/sr-io" }
runtime_support = { package = "frame-support", path = "../../../frame/support" }
session = { package = "pallet-session", path = "../../../frame/session" }
sr-primitives = { path = "../../../primitives/sr-primitives" }
sp-runtime = { path = "../../../primitives/sr-primitives" }
staking = { package = "pallet-staking", path = "../../../frame/staking" }
substrate-executor = { path = "../../../client/executor" }
sc-executor = { path = "../../../client/executor" }
system = { package = "frame-system", path = "../../../frame/system" }
test-client = { package = "substrate-test-client", path = "../../../test/utils/client" }
timestamp = { package = "pallet-timestamp", path = "../../../frame/timestamp" }
+2 -2
View File
@@ -16,13 +16,13 @@
//! Utilites to build a `TestClient` for `node-runtime`.
use sr_primitives::BuildStorage;
use sp_runtime::BuildStorage;
/// Re-export test-client utilities.
pub use test_client::*;
/// Call executor for `node-runtime` `TestClient`.
pub type Executor = substrate_executor::NativeExecutor<node_executor::Executor>;
pub type Executor = sc_executor::NativeExecutor<node_executor::Executor>;
/// Default backend type.
pub type Backend = client_db::Backend<node_primitives::Block>;
+1 -1
View File
@@ -24,7 +24,7 @@ use node_runtime::{
};
use node_runtime::constants::currency::*;
use primitives::ChangesTrieConfiguration;
use sr_primitives::Perbill;
use sp_runtime::Perbill;
/// Create genesis runtime configuration for tests.
+1 -1
View File
@@ -19,7 +19,7 @@
use keyring::{AccountKeyring, Sr25519Keyring, Ed25519Keyring};
use node_primitives::{AccountId, Balance, Index};
use node_runtime::{CheckedExtrinsic, UncheckedExtrinsic, SessionKeys, SignedExtra};
use sr_primitives::generic::Era;
use sp_runtime::generic::Era;
use codec::Encode;
/// Alice's account id.