Update to substrate `monthly-2021-08` (#222)
* update to substrate `monthly-2021-08` * clean and update cargo files, use correct monthly version * rev -> tag in cargomain
parent
6de2bf2e83
commit
e5366c11cc
File diff suppressed because it is too large
Load Diff
|
@ -67,7 +67,7 @@ Purge the development chain's state:
|
||||||
Start the development chain with detailed logging:
|
Start the development chain with detailed logging:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/node-template -lruntime=debug --dev
|
RUST_BACKTRACE=1 ./target/release/node-template -ldebug --dev
|
||||||
```
|
```
|
||||||
|
|
||||||
### Connect with Polkadot-JS Apps Front-end
|
### Connect with Polkadot-JS Apps Front-end
|
||||||
|
|
153
node/Cargo.toml
153
node/Cargo.toml
|
@ -1,175 +1,176 @@
|
||||||
[features]
|
|
||||||
default = []
|
|
||||||
runtime-benchmarks = ['node-template-runtime/runtime-benchmarks']
|
|
||||||
|
|
||||||
[build-dependencies.substrate-build-script-utils]
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
|
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
|
||||||
build = 'build.rs'
|
|
||||||
description = 'A fresh FRAME-based Substrate node, ready for hacking.'
|
description = 'A fresh FRAME-based Substrate node, ready for hacking.'
|
||||||
edition = '2018'
|
edition = '2018'
|
||||||
homepage = 'https://substrate.dev'
|
homepage = 'https://substrate.dev'
|
||||||
license = 'Unlicense'
|
license = 'Unlicense'
|
||||||
name = 'node-template'
|
name = 'node-template'
|
||||||
|
publish = false
|
||||||
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
|
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
|
||||||
version = '3.0.0'
|
version = '3.0.0-monthly-2021-08'
|
||||||
|
build = 'build.rs'
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ['x86_64-unknown-linux-gnu']
|
targets = ['x86_64-unknown-linux-gnu']
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = 'node-template'
|
||||||
|
[build-dependencies.substrate-build-script-utils]
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '3.0.0'
|
||||||
|
|
||||||
|
[dependencies.node-template-runtime]
|
||||||
|
path = '../runtime'
|
||||||
|
version = '3.0.0-monthly-2021-08'
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
jsonrpc-core = '15.1.0'
|
jsonrpc-core = '15.1.0'
|
||||||
structopt = '0.3.8'
|
structopt = '0.3.8'
|
||||||
|
|
||||||
[dependencies.frame-benchmarking]
|
[dependencies.frame-benchmarking]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.1.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.frame-benchmarking-cli]
|
[dependencies.frame-benchmarking-cli]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.node-template-runtime]
|
|
||||||
path = '../runtime'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-transaction-payment-rpc]
|
[dependencies.pallet-transaction-payment-rpc]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-basic-authorship]
|
[dependencies.sc-basic-authorship]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-cli]
|
[dependencies.sc-cli]
|
||||||
features = ['wasmtime']
|
features = ['wasmtime']
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-client-api]
|
[dependencies.sc-client-api]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-consensus]
|
[dependencies.sc-consensus]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-consensus-aura]
|
[dependencies.sc-consensus-aura]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-executor]
|
[dependencies.sc-executor]
|
||||||
features = ['wasmtime']
|
features = ['wasmtime']
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-finality-grandpa]
|
[dependencies.sc-finality-grandpa]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-keystore]
|
[dependencies.sc-keystore]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-rpc]
|
[dependencies.sc-rpc]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-rpc-api]
|
[dependencies.sc-rpc-api]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-service]
|
[dependencies.sc-service]
|
||||||
features = ['wasmtime']
|
features = ['wasmtime']
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-telemetry]
|
[dependencies.sc-telemetry]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sc-transaction-pool]
|
[dependencies.sc-transaction-pool]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sc-transaction-pool-api]
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-api]
|
[dependencies.sp-api]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-block-builder]
|
[dependencies.sp-block-builder]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-blockchain]
|
[dependencies.sp-blockchain]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-consensus]
|
[dependencies.sp-consensus]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-consensus-aura]
|
[dependencies.sp-consensus-aura]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '0.9.0'
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-core]
|
[dependencies.sp-core]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-finality-grandpa]
|
[dependencies.sp-finality-grandpa]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-inherents]
|
[dependencies.sp-inherents]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-runtime]
|
[dependencies.sp-runtime]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-timestamp]
|
[dependencies.sp-timestamp]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dependencies.sp-transaction-pool]
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.substrate-frame-rpc-system]
|
[dependencies.substrate-frame-rpc-system]
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[[bin]]
|
[features]
|
||||||
name = 'node-template'
|
default = []
|
||||||
|
runtime-benchmarks = ['node-template-runtime/runtime-benchmarks']
|
||||||
|
|
|
@ -121,8 +121,8 @@ pub fn run() -> sc_cli::Result<()> {
|
||||||
|
|
||||||
runner.sync_run(|config| cmd.run::<Block, service::Executor>(config))
|
runner.sync_run(|config| cmd.run::<Block, service::Executor>(config))
|
||||||
} else {
|
} else {
|
||||||
Err("Benchmarking wasn't enabled when building the node. \
|
Err("Benchmarking wasn't enabled when building the node. You can enable it with \
|
||||||
You can enable it with `--features runtime-benchmarks`."
|
`--features runtime-benchmarks`."
|
||||||
.into())
|
.into())
|
||||||
},
|
},
|
||||||
None => {
|
None => {
|
||||||
|
|
|
@ -9,10 +9,10 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use node_template_runtime::{opaque::Block, AccountId, Balance, Index};
|
use node_template_runtime::{opaque::Block, AccountId, Balance, Index};
|
||||||
pub use sc_rpc_api::DenyUnsafe;
|
pub use sc_rpc_api::DenyUnsafe;
|
||||||
|
use sc_transaction_pool_api::TransactionPool;
|
||||||
use sp_api::ProvideRuntimeApi;
|
use sp_api::ProvideRuntimeApi;
|
||||||
use sp_block_builder::BlockBuilder;
|
use sp_block_builder::BlockBuilder;
|
||||||
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||||
use sp_transaction_pool::TransactionPool;
|
|
||||||
|
|
||||||
/// Full client dependencies.
|
/// Full client dependencies.
|
||||||
pub struct FullDeps<C, P> {
|
pub struct FullDeps<C, P> {
|
||||||
|
|
|
@ -32,7 +32,7 @@ pub fn new_partial(
|
||||||
FullClient,
|
FullClient,
|
||||||
FullBackend,
|
FullBackend,
|
||||||
FullSelectChain,
|
FullSelectChain,
|
||||||
sp_consensus::DefaultImportQueue<Block, FullClient>,
|
sc_consensus::DefaultImportQueue<Block, FullClient>,
|
||||||
sc_transaction_pool::FullPool<Block, FullClient>,
|
sc_transaction_pool::FullPool<Block, FullClient>,
|
||||||
(
|
(
|
||||||
sc_finality_grandpa::GrandpaBlockImport<
|
sc_finality_grandpa::GrandpaBlockImport<
|
||||||
|
|
|
@ -1,35 +1,63 @@
|
||||||
[package]
|
[package]
|
||||||
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
|
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
|
||||||
description = 'FRAME pallet template for defining custom runtime logic.'
|
description = 'Substrate FRAME pallet template for defining custom runtime logic.'
|
||||||
edition = '2018'
|
edition = '2018'
|
||||||
homepage = 'https://substrate.dev'
|
homepage = 'https://substrate.dev'
|
||||||
license = 'Unlicense'
|
license = 'Unlicense'
|
||||||
name = 'pallet-template'
|
name = 'pallet-template'
|
||||||
readme = 'README.md'
|
publish = false
|
||||||
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
|
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
|
||||||
version = '3.0.0'
|
version = '3.0.0-monthly-2021-08'
|
||||||
|
readme = 'README.md'
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ['x86_64-unknown-linux-gnu']
|
targets = ['x86_64-unknown-linux-gnu']
|
||||||
|
|
||||||
[dev-dependencies.serde]
|
[dev-dependencies.serde]
|
||||||
version = '1.0.119'
|
version = '1.0.126'
|
||||||
|
|
||||||
[dev-dependencies.sp-core]
|
[dev-dependencies.sp-core]
|
||||||
default-features = false
|
default-features = false
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dev-dependencies.sp-io]
|
[dev-dependencies.sp-io]
|
||||||
default-features = false
|
default-features = false
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[dev-dependencies.sp-runtime]
|
[dev-dependencies.sp-runtime]
|
||||||
default-features = false
|
default-features = false
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
tag = 'monthly-2021-07'
|
tag = 'monthly-2021-08'
|
||||||
version = '3.0.0'
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.codec]
|
||||||
|
default-features = false
|
||||||
|
features = ['derive']
|
||||||
|
package = 'parity-scale-codec'
|
||||||
|
version = '2.0.0'
|
||||||
|
|
||||||
|
[dependencies.frame-benchmarking]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
optional = true
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-support]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-system]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ['std']
|
default = ['std']
|
||||||
|
@ -41,27 +69,3 @@ std = [
|
||||||
'frame-benchmarking/std',
|
'frame-benchmarking/std',
|
||||||
]
|
]
|
||||||
try-runtime = ['frame-support/try-runtime']
|
try-runtime = ['frame-support/try-runtime']
|
||||||
[dependencies.codec]
|
|
||||||
default-features = false
|
|
||||||
features = ['derive']
|
|
||||||
package = 'parity-scale-codec'
|
|
||||||
version = '2.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-benchmarking]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
optional = true
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.1.0'
|
|
||||||
|
|
||||||
[dependencies.frame-support]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-system]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
|
@ -17,4 +17,4 @@ benchmarks! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test,);
|
impl_benchmark_test_suite!(Template, crate::mock::new_test_ext(), crate::mock::Test);
|
||||||
|
|
|
@ -28,7 +28,7 @@ parameter_types! {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl system::Config for Test {
|
impl system::Config for Test {
|
||||||
type BaseCallFilter = ();
|
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||||
type BlockWeights = ();
|
type BlockWeights = ();
|
||||||
type BlockLength = ();
|
type BlockLength = ();
|
||||||
type DbWeight = ();
|
type DbWeight = ();
|
||||||
|
|
|
@ -1,19 +1,189 @@
|
||||||
[build-dependencies.substrate-wasm-builder]
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '4.0.0'
|
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
|
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
|
||||||
|
description = 'Substrate FRAME based template for composing and building WASM runtimes.'
|
||||||
edition = '2018'
|
edition = '2018'
|
||||||
homepage = 'https://substrate.dev'
|
homepage = 'https://substrate.dev'
|
||||||
license = 'Unlicense'
|
license = 'Unlicense'
|
||||||
name = 'node-template-runtime'
|
name = 'node-template-runtime'
|
||||||
|
publish = false
|
||||||
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
|
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
|
||||||
version = '3.0.0'
|
version = '3.0.0-monthly-2021-08'
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ['x86_64-unknown-linux-gnu']
|
targets = ['x86_64-unknown-linux-gnu']
|
||||||
|
|
||||||
|
[dependencies.pallet-template]
|
||||||
|
default-features = false
|
||||||
|
path = '../pallets/template'
|
||||||
|
version = '3.0.0-monthly-2021-08'
|
||||||
|
|
||||||
|
[build-dependencies.substrate-wasm-builder]
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '5.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.codec]
|
||||||
|
default-features = false
|
||||||
|
features = ['derive']
|
||||||
|
package = 'parity-scale-codec'
|
||||||
|
version = '2.0.0'
|
||||||
|
|
||||||
|
[dependencies.frame-benchmarking]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
optional = true
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-executive]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-support]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-system]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-system-benchmarking]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
optional = true
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.frame-system-rpc-runtime-api]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.hex-literal]
|
||||||
|
optional = true
|
||||||
|
version = '0.3.1'
|
||||||
|
|
||||||
|
[dependencies.pallet-aura]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-balances]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-grandpa]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-randomness-collective-flip]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-sudo]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-timestamp]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-transaction-payment]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.pallet-transaction-payment-rpc-runtime-api]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-api]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-block-builder]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-consensus-aura]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '0.10.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-core]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-inherents]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-offchain]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-runtime]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-session]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-std]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-transaction-pool]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
|
[dependencies.sp-version]
|
||||||
|
default-features = false
|
||||||
|
git = 'https://github.com/paritytech/substrate.git'
|
||||||
|
tag = 'monthly-2021-08'
|
||||||
|
version = '4.0.0-dev'
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ['std']
|
default = ['std']
|
||||||
runtime-benchmarks = [
|
runtime-benchmarks = [
|
||||||
|
@ -54,169 +224,3 @@ std = [
|
||||||
'sp-transaction-pool/std',
|
'sp-transaction-pool/std',
|
||||||
'sp-version/std',
|
'sp-version/std',
|
||||||
]
|
]
|
||||||
[dependencies.codec]
|
|
||||||
default-features = false
|
|
||||||
features = ['derive']
|
|
||||||
package = 'parity-scale-codec'
|
|
||||||
version = '2.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-benchmarking]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
optional = true
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.1.0'
|
|
||||||
|
|
||||||
[dependencies.frame-executive]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-support]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-system]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-system-benchmarking]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
optional = true
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.frame-system-rpc-runtime-api]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.hex-literal]
|
|
||||||
optional = true
|
|
||||||
version = '0.3.1'
|
|
||||||
|
|
||||||
[dependencies.pallet-aura]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-balances]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-grandpa]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.1.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-randomness-collective-flip]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-sudo]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-template]
|
|
||||||
default-features = false
|
|
||||||
path = '../pallets/template'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-timestamp]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-transaction-payment]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.pallet-transaction-payment-rpc-runtime-api]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-api]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-block-builder]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-consensus-aura]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '0.9.0'
|
|
||||||
|
|
||||||
[dependencies.sp-core]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-inherents]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-offchain]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-runtime]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-session]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-std]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-transaction-pool]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
||||||
[dependencies.sp-version]
|
|
||||||
default-features = false
|
|
||||||
git = 'https://github.com/paritytech/substrate.git'
|
|
||||||
tag = 'monthly-2021-07'
|
|
||||||
version = '3.0.0'
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ use sp_version::RuntimeVersion;
|
||||||
// A few exports that help ease life for downstream crates.
|
// A few exports that help ease life for downstream crates.
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{KeyOwnerProofSystem, Randomness},
|
traits::{KeyOwnerProofSystem, Randomness, StorageInfo},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||||
IdentityFee, Weight,
|
IdentityFee, Weight,
|
||||||
|
@ -144,7 +144,7 @@ parameter_types! {
|
||||||
|
|
||||||
impl frame_system::Config for Runtime {
|
impl frame_system::Config for Runtime {
|
||||||
/// The basic call filter to use in dispatchable.
|
/// The basic call filter to use in dispatchable.
|
||||||
type BaseCallFilter = ();
|
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||||
/// Block & extrinsics weights: base values and limits.
|
/// Block & extrinsics weights: base values and limits.
|
||||||
type BlockWeights = BlockWeights;
|
type BlockWeights = BlockWeights;
|
||||||
/// The maximum length of a block (in bytes).
|
/// The maximum length of a block (in bytes).
|
||||||
|
@ -363,8 +363,9 @@ impl_runtime_apis! {
|
||||||
fn validate_transaction(
|
fn validate_transaction(
|
||||||
source: TransactionSource,
|
source: TransactionSource,
|
||||||
tx: <Block as BlockT>::Extrinsic,
|
tx: <Block as BlockT>::Extrinsic,
|
||||||
|
block_hash: <Block as BlockT>::Hash,
|
||||||
) -> TransactionValidity {
|
) -> TransactionValidity {
|
||||||
Executive::validate_transaction(source, tx)
|
Executive::validate_transaction(source, tx, block_hash)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -447,8 +448,12 @@ impl_runtime_apis! {
|
||||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||||
fn dispatch_benchmark(
|
fn dispatch_benchmark(
|
||||||
config: frame_benchmarking::BenchmarkConfig
|
config: frame_benchmarking::BenchmarkConfig
|
||||||
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
|
) -> Result<
|
||||||
|
(Vec<frame_benchmarking::BenchmarkBatch>, Vec<StorageInfo>),
|
||||||
|
sp_runtime::RuntimeString,
|
||||||
|
> {
|
||||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
|
||||||
|
use frame_support::traits::StorageInfoTrait;
|
||||||
|
|
||||||
use frame_system_benchmarking::Pallet as SystemBench;
|
use frame_system_benchmarking::Pallet as SystemBench;
|
||||||
impl frame_system_benchmarking::Config for Runtime {}
|
impl frame_system_benchmarking::Config for Runtime {}
|
||||||
|
@ -466,6 +471,8 @@ impl_runtime_apis! {
|
||||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
|
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let storage_info = AllPalletsWithSystem::storage_info();
|
||||||
|
|
||||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||||
let params = (&config, &whitelist);
|
let params = (&config, &whitelist);
|
||||||
|
|
||||||
|
@ -475,7 +482,7 @@ impl_runtime_apis! {
|
||||||
add_benchmark!(params, batches, pallet_template, TemplateModule);
|
add_benchmark!(params, batches, pallet_template, TemplateModule);
|
||||||
|
|
||||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||||
Ok(batches)
|
Ok((batches, storage_info))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,5 @@ echo "*** Start Substrate node template ***"
|
||||||
|
|
||||||
cd $(dirname ${BASH_SOURCE[0]})/..
|
cd $(dirname ${BASH_SOURCE[0]})/..
|
||||||
|
|
||||||
mkdir -p ./.local
|
|
||||||
|
|
||||||
docker-compose down --remove-orphans
|
docker-compose down --remove-orphans
|
||||||
docker-compose run --rm --service-ports dev $@
|
docker-compose run --rm --service-ports dev $@
|
||||||
|
|
Loading…
Reference in New Issue