Update to 2.0.0-alpha.7 (#38)
Closes #35 Thanks to @brenzi for the work he did on #36 I copied a lot of it 🙏main
parent
6c1d11508c
commit
36971ec2ee
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@ homepage = 'https://substrate.dev'
|
||||||
license = 'Unlicense'
|
license = 'Unlicense'
|
||||||
name = 'node-template'
|
name = 'node-template'
|
||||||
repository = 'https://github.com/paritytech/substrate/'
|
repository = 'https://github.com/paritytech/substrate/'
|
||||||
version = '2.0.0-alpha.6'
|
version = '2.0.0-alpha.7'
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ['x86_64-unknown-linux-gnu']
|
targets = ['x86_64-unknown-linux-gnu']
|
||||||
|
@ -19,89 +19,89 @@ structopt = '0.3.8'
|
||||||
|
|
||||||
[dependencies.node-template-runtime]
|
[dependencies.node-template-runtime]
|
||||||
path = '../runtime'
|
path = '../runtime'
|
||||||
version = '2.0.0-alpha.6'
|
version = '2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-basic-authorship]
|
[dependencies.sc-basic-authorship]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-cli]
|
[dependencies.sc-cli]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-client]
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
version = '0.8.0-alpha.6'
|
|
||||||
tag = 'v2.0.0-alpha.6'
|
|
||||||
|
|
||||||
[dependencies.sc-client-api]
|
[dependencies.sc-client-api]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
|
[dependencies.sc-consensus]
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
version = '0.8.0-alpha.7'
|
||||||
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-consensus-aura]
|
[dependencies.sc-consensus-aura]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-executor]
|
[dependencies.sc-executor]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-finality-grandpa]
|
[dependencies.sc-finality-grandpa]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-network]
|
[dependencies.sc-network]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-service]
|
[dependencies.sc-service]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sc-transaction-pool]
|
[dependencies.sc-transaction-pool]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-consensus]
|
[dependencies.sp-consensus]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-consensus-aura]
|
[dependencies.sp-consensus-aura]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-core]
|
[dependencies.sp-core]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-finality-grandpa]
|
[dependencies.sp-finality-grandpa]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-inherents]
|
[dependencies.sp-inherents]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-runtime]
|
[dependencies.sp-runtime]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-transaction-pool]
|
[dependencies.sp-transaction-pool]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[build-dependencies.substrate-build-script-utils]
|
[build-dependencies.substrate-build-script-utils]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = 'node-template'
|
name = 'node-template'
|
||||||
|
|
|
@ -2,15 +2,17 @@
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use sc_client::LongestChain;
|
|
||||||
use sc_client_api::ExecutorProvider;
|
use sc_client_api::ExecutorProvider;
|
||||||
|
use sc_consensus::LongestChain;
|
||||||
use node_template_runtime::{self, opaque::Block, RuntimeApi};
|
use node_template_runtime::{self, opaque::Block, RuntimeApi};
|
||||||
use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder};
|
use sc_service::{error::{Error as ServiceError}, AbstractService, Configuration, ServiceBuilder};
|
||||||
use sp_inherents::InherentDataProviders;
|
use sp_inherents::InherentDataProviders;
|
||||||
use sc_executor::native_executor_instance;
|
use sc_executor::native_executor_instance;
|
||||||
pub use sc_executor::NativeExecutor;
|
pub use sc_executor::NativeExecutor;
|
||||||
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
|
use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
|
||||||
use sc_finality_grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider, StorageAndProofProvider};
|
use sc_finality_grandpa::{
|
||||||
|
self, FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState, StorageAndProofProvider
|
||||||
|
};
|
||||||
|
|
||||||
// Our native executor instance.
|
// Our native executor instance.
|
||||||
native_executor_instance!(
|
native_executor_instance!(
|
||||||
|
@ -33,13 +35,13 @@ macro_rules! new_full_start {
|
||||||
node_template_runtime::opaque::Block, node_template_runtime::RuntimeApi, crate::service::Executor
|
node_template_runtime::opaque::Block, node_template_runtime::RuntimeApi, crate::service::Executor
|
||||||
>($config)?
|
>($config)?
|
||||||
.with_select_chain(|_config, backend| {
|
.with_select_chain(|_config, backend| {
|
||||||
Ok(sc_client::LongestChain::new(backend.clone()))
|
Ok(sc_consensus::LongestChain::new(backend.clone()))
|
||||||
})?
|
})?
|
||||||
.with_transaction_pool(|config, client, _fetcher| {
|
.with_transaction_pool(|config, client, _fetcher, prometheus_registry| {
|
||||||
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
|
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
|
||||||
Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api)))
|
Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api), prometheus_registry))
|
||||||
})?
|
})?
|
||||||
.with_import_queue(|_config, client, mut select_chain, _transaction_pool| {
|
.with_import_queue(|_config, client, mut select_chain, _transaction_pool, spawn_task_handle| {
|
||||||
let select_chain = select_chain.take()
|
let select_chain = select_chain.take()
|
||||||
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
|
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
|
||||||
|
|
||||||
|
@ -50,13 +52,14 @@ macro_rules! new_full_start {
|
||||||
grandpa_block_import.clone(), client.clone(),
|
grandpa_block_import.clone(), client.clone(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair>(
|
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(
|
||||||
sc_consensus_aura::slot_duration(&*client)?,
|
sc_consensus_aura::slot_duration(&*client)?,
|
||||||
aura_block_import,
|
aura_block_import,
|
||||||
Some(Box::new(grandpa_block_import.clone())),
|
Some(Box::new(grandpa_block_import.clone())),
|
||||||
None,
|
None,
|
||||||
client,
|
client,
|
||||||
inherent_data_providers.clone(),
|
inherent_data_providers.clone(),
|
||||||
|
spawn_task_handle,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
import_setup = Some((grandpa_block_import, grandpa_link));
|
import_setup = Some((grandpa_block_import, grandpa_link));
|
||||||
|
@ -153,7 +156,8 @@ pub fn new_full(config: Configuration)
|
||||||
inherent_data_providers: inherent_data_providers.clone(),
|
inherent_data_providers: inherent_data_providers.clone(),
|
||||||
telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
|
telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
|
||||||
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
|
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
|
||||||
prometheus_registry: service.prometheus_registry()
|
prometheus_registry: service.prometheus_registry(),
|
||||||
|
shared_voter_state: SharedVoterState::empty()
|
||||||
};
|
};
|
||||||
|
|
||||||
// the GRANDPA voter task is considered infallible, i.e.
|
// the GRANDPA voter task is considered infallible, i.e.
|
||||||
|
@ -183,17 +187,17 @@ pub fn new_light(config: Configuration)
|
||||||
.with_select_chain(|_config, backend| {
|
.with_select_chain(|_config, backend| {
|
||||||
Ok(LongestChain::new(backend.clone()))
|
Ok(LongestChain::new(backend.clone()))
|
||||||
})?
|
})?
|
||||||
.with_transaction_pool(|config, client, fetcher| {
|
.with_transaction_pool(|config, client, fetcher, prometheus_registry| {
|
||||||
let fetcher = fetcher
|
let fetcher = fetcher
|
||||||
.ok_or_else(|| "Trying to start light transaction pool without active fetcher")?;
|
.ok_or_else(|| "Trying to start light transaction pool without active fetcher")?;
|
||||||
|
|
||||||
let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone());
|
let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone());
|
||||||
let pool = sc_transaction_pool::BasicPool::with_revalidation_type(
|
let pool = sc_transaction_pool::BasicPool::with_revalidation_type(
|
||||||
config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light,
|
config, Arc::new(pool_api), prometheus_registry, sc_transaction_pool::RevalidationType::Light,
|
||||||
);
|
);
|
||||||
Ok(pool)
|
Ok(pool)
|
||||||
})?
|
})?
|
||||||
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool| {
|
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool, spawn_task_handle| {
|
||||||
let fetch_checker = fetcher
|
let fetch_checker = fetcher
|
||||||
.map(|fetcher| fetcher.checker().clone())
|
.map(|fetcher| fetcher.checker().clone())
|
||||||
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
|
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
|
||||||
|
@ -207,13 +211,14 @@ pub fn new_light(config: Configuration)
|
||||||
let finality_proof_request_builder =
|
let finality_proof_request_builder =
|
||||||
finality_proof_import.create_finality_proof_request_builder();
|
finality_proof_import.create_finality_proof_request_builder();
|
||||||
|
|
||||||
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair>(
|
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(
|
||||||
sc_consensus_aura::slot_duration(&*client)?,
|
sc_consensus_aura::slot_duration(&*client)?,
|
||||||
grandpa_block_import,
|
grandpa_block_import,
|
||||||
None,
|
None,
|
||||||
Some(Box::new(finality_proof_import)),
|
Some(Box::new(finality_proof_import)),
|
||||||
client,
|
client,
|
||||||
inherent_data_providers.clone(),
|
inherent_data_providers.clone(),
|
||||||
|
spawn_task_handle,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok((import_queue, finality_proof_request_builder))
|
Ok((import_queue, finality_proof_request_builder))
|
||||||
|
|
|
@ -6,7 +6,7 @@ homepage = 'https://substrate.dev'
|
||||||
license = 'Unlicense'
|
license = 'Unlicense'
|
||||||
name = 'pallet-template'
|
name = 'pallet-template'
|
||||||
repository = 'https://github.com/paritytech/substrate/'
|
repository = 'https://github.com/paritytech/substrate/'
|
||||||
version = '2.0.0-alpha.6'
|
version = '2.0.0-alpha.7'
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ['x86_64-unknown-linux-gnu']
|
targets = ['x86_64-unknown-linux-gnu']
|
||||||
|
@ -20,27 +20,27 @@ version = '1.3.0'
|
||||||
[dependencies.frame-support]
|
[dependencies.frame-support]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.frame-system]
|
[dependencies.frame-system]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dev-dependencies.sp-core]
|
[dev-dependencies.sp-core]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dev-dependencies.sp-io]
|
[dev-dependencies.sp-io]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dev-dependencies.sp-runtime]
|
[dev-dependencies.sp-runtime]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ['std']
|
default = ['std']
|
||||||
|
|
|
@ -75,7 +75,7 @@ decl_module! {
|
||||||
/// Just a dummy entry point.
|
/// Just a dummy entry point.
|
||||||
/// function that can be called by the external world as an extrinsics call
|
/// function that can be called by the external world as an extrinsics call
|
||||||
/// takes a parameter of the type `AccountId`, stores it, and emits an event
|
/// takes a parameter of the type `AccountId`, stores it, and emits an event
|
||||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
#[weight = 10_000]
|
||||||
pub fn do_something(origin, something: u32) -> dispatch::DispatchResult {
|
pub fn do_something(origin, something: u32) -> dispatch::DispatchResult {
|
||||||
// Check it was signed and get the signer. See also: ensure_root and ensure_none
|
// Check it was signed and get the signer. See also: ensure_root and ensure_none
|
||||||
let who = ensure_signed(origin)?;
|
let who = ensure_signed(origin)?;
|
||||||
|
@ -91,7 +91,7 @@ decl_module! {
|
||||||
|
|
||||||
/// Another dummy entry point.
|
/// Another dummy entry point.
|
||||||
/// takes no parameters, attempts to increment storage value, and possibly throws an error
|
/// takes no parameters, attempts to increment storage value, and possibly throws an error
|
||||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
#[weight = 10_000]
|
||||||
pub fn cause_error(origin) -> dispatch::DispatchResult {
|
pub fn cause_error(origin) -> dispatch::DispatchResult {
|
||||||
// Check it was signed and get the signer. See also: ensure_root and ensure_none
|
// Check it was signed and get the signer. See also: ensure_root and ensure_none
|
||||||
let _who = ensure_signed(origin)?;
|
let _who = ensure_signed(origin)?;
|
||||||
|
|
|
@ -38,6 +38,9 @@ impl system::Trait for Test {
|
||||||
type MaximumBlockWeight = MaximumBlockWeight;
|
type MaximumBlockWeight = MaximumBlockWeight;
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
|
type BlockExecutionWeight = ();
|
||||||
|
type DbWeight = ();
|
||||||
|
type ExtrinsicBaseWeight = ();
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type ModuleToIndex = ();
|
type ModuleToIndex = ();
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-aura'
|
package = 'pallet-aura'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.balances]
|
[dependencies.balances]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-balances'
|
package = 'pallet-balances'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.codec]
|
[dependencies.codec]
|
||||||
default-features = false
|
default-features = false
|
||||||
|
@ -19,24 +19,24 @@ version = '1.3.0'
|
||||||
[dependencies.frame-executive]
|
[dependencies.frame-executive]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.frame-support]
|
[dependencies.frame-support]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.grandpa]
|
[dependencies.grandpa]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-grandpa'
|
package = 'pallet-grandpa'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.randomness-collective-flip]
|
[dependencies.randomness-collective-flip]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-randomness-collective-flip'
|
package = 'pallet-randomness-collective-flip'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.serde]
|
[dependencies.serde]
|
||||||
features = ['derive']
|
features = ['derive']
|
||||||
|
@ -46,93 +46,93 @@ version = '1.0.101'
|
||||||
[dependencies.sp-api]
|
[dependencies.sp-api]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-block-builder]
|
[dependencies.sp-block-builder]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-consensus-aura]
|
[dependencies.sp-consensus-aura]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
version = '0.8.0-alpha.6'
|
version = '0.8.0-alpha.7'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-core]
|
[dependencies.sp-core]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-inherents]
|
[dependencies.sp-inherents]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-io]
|
[dependencies.sp-io]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-offchain]
|
[dependencies.sp-offchain]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-runtime]
|
[dependencies.sp-runtime]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-session]
|
[dependencies.sp-session]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-std]
|
[dependencies.sp-std]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-transaction-pool]
|
[dependencies.sp-transaction-pool]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sp-version]
|
[dependencies.sp-version]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.sudo]
|
[dependencies.sudo]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-sudo'
|
package = 'pallet-sudo'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.system]
|
[dependencies.system]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'frame-system'
|
package = 'frame-system'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.template]
|
[dependencies.template]
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-template'
|
package = 'pallet-template'
|
||||||
path = '../pallets/template'
|
path = '../pallets/template'
|
||||||
version = '2.0.0-alpha.6'
|
version = '2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.timestamp]
|
[dependencies.timestamp]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-timestamp'
|
package = 'pallet-timestamp'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[dependencies.transaction-payment]
|
[dependencies.transaction-payment]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
default-features = false
|
default-features = false
|
||||||
package = 'pallet-transaction-payment'
|
package = 'pallet-transaction-payment'
|
||||||
tag = 'v2.0.0-alpha.6'
|
tag = 'v2.0.0-alpha.7'
|
||||||
|
|
||||||
[build-dependencies.wasm-builder-runner]
|
[build-dependencies.wasm-builder-runner]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
@ -146,7 +146,7 @@ homepage = 'https://substrate.dev'
|
||||||
license = 'Unlicense'
|
license = 'Unlicense'
|
||||||
name = 'node-template-runtime'
|
name = 'node-template-runtime'
|
||||||
repository = 'https://github.com/paritytech/substrate/'
|
repository = 'https://github.com/paritytech/substrate/'
|
||||||
version = '2.0.0-alpha.6'
|
version = '2.0.0-alpha.7'
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ['x86_64-unknown-linux-gnu']
|
targets = ['x86_64-unknown-linux-gnu']
|
||||||
|
|
|
@ -34,7 +34,10 @@ pub use sp_runtime::{Permill, Perbill};
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
StorageValue, construct_runtime, parameter_types,
|
StorageValue, construct_runtime, parameter_types,
|
||||||
traits::Randomness,
|
traits::Randomness,
|
||||||
weights::Weight,
|
weights::{
|
||||||
|
Weight,
|
||||||
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Importing a template pallet
|
/// Importing a template pallet
|
||||||
|
@ -97,6 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||||
authoring_version: 1,
|
authoring_version: 1,
|
||||||
spec_version: 1,
|
spec_version: 1,
|
||||||
impl_version: 1,
|
impl_version: 1,
|
||||||
|
transaction_version: 1,
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -120,7 +124,8 @@ pub fn native_version() -> NativeVersion {
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: BlockNumber = 250;
|
pub const BlockHashCount: BlockNumber = 250;
|
||||||
pub const MaximumBlockWeight: Weight = 1_000_000_000;
|
/// We allow for 2 seconds of compute with a 6 second average block time.
|
||||||
|
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
|
||||||
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
|
||||||
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
|
||||||
pub const Version: RuntimeVersion = VERSION;
|
pub const Version: RuntimeVersion = VERSION;
|
||||||
|
@ -155,6 +160,14 @@ impl system::Trait for Runtime {
|
||||||
type MaximumBlockLength = MaximumBlockLength;
|
type MaximumBlockLength = MaximumBlockLength;
|
||||||
/// Portion of the block weight that is available to all normal transactions.
|
/// Portion of the block weight that is available to all normal transactions.
|
||||||
type AvailableBlockRatio = AvailableBlockRatio;
|
type AvailableBlockRatio = AvailableBlockRatio;
|
||||||
|
/// The weight of the overhead invoked on the block import process, independent of the
|
||||||
|
/// extrinsics included in that block.
|
||||||
|
type BlockExecutionWeight = BlockExecutionWeight;
|
||||||
|
/// The weight of database operations that the runtime can invoke.
|
||||||
|
type DbWeight = RocksDbWeight;
|
||||||
|
/// The base weight of any extrinsic processed by the runtime, independent of the
|
||||||
|
/// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...)
|
||||||
|
type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
|
||||||
/// Version of the runtime.
|
/// Version of the runtime.
|
||||||
type Version = Version;
|
type Version = Version;
|
||||||
/// Converts a module to the index of the module in `construct_runtime!`.
|
/// Converts a module to the index of the module in `construct_runtime!`.
|
||||||
|
@ -203,14 +216,12 @@ impl balances::Trait for Runtime {
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const TransactionBaseFee: Balance = 0;
|
|
||||||
pub const TransactionByteFee: Balance = 1;
|
pub const TransactionByteFee: Balance = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl transaction_payment::Trait for Runtime {
|
impl transaction_payment::Trait for Runtime {
|
||||||
type Currency = balances::Module<Runtime>;
|
type Currency = balances::Module<Runtime>;
|
||||||
type OnTransactionPayment = ();
|
type OnTransactionPayment = ();
|
||||||
type TransactionBaseFee = TransactionBaseFee;
|
|
||||||
type TransactionByteFee = TransactionByteFee;
|
type TransactionByteFee = TransactionByteFee;
|
||||||
type WeightToFee = ConvertInto;
|
type WeightToFee = ConvertInto;
|
||||||
type FeeMultiplierUpdate = ();
|
type FeeMultiplierUpdate = ();
|
||||||
|
|
Loading…
Reference in New Issue