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 cargo
main
Dan Shields 2021-08-06 08:51:49 -06:00 committed by GitHub
parent 6de2bf2e83
commit e5366c11cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 923 additions and 917 deletions

1164
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -67,7 +67,7 @@ Purge the development chain's state:
Start the development chain with detailed logging:
```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

View File

@ -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]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
build = 'build.rs'
description = 'A fresh FRAME-based Substrate node, ready for hacking.'
edition = '2018'
homepage = 'https://substrate.dev'
license = 'Unlicense'
name = 'node-template'
publish = false
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]
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]
jsonrpc-core = '15.1.0'
structopt = '0.3.8'
[dependencies.frame-benchmarking]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.1.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.frame-benchmarking-cli]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
[dependencies.node-template-runtime]
path = '../runtime'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.pallet-transaction-payment-rpc]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sc-basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-cli]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-client-api]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sc-consensus]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-executor]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-keystore]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sc-rpc]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sc-rpc-api]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-service]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sc-telemetry]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sc-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
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]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-block-builder]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-blockchain]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-consensus]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sp-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '0.9.0'
tag = 'monthly-2021-08'
version = '0.10.0-dev'
[dependencies.sp-core]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-inherents]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-runtime]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.sp-timestamp]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
[dependencies.sp-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dependencies.substrate-frame-rpc-system]
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[[bin]]
name = 'node-template'
[features]
default = []
runtime-benchmarks = ['node-template-runtime/runtime-benchmarks']

View File

@ -121,8 +121,8 @@ pub fn run() -> sc_cli::Result<()> {
runner.sync_run(|config| cmd.run::<Block, service::Executor>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
Err("Benchmarking wasn't enabled when building the node. You can enable it with \
`--features runtime-benchmarks`."
.into())
},
None => {

View File

@ -9,10 +9,10 @@ use std::sync::Arc;
use node_template_runtime::{opaque::Block, AccountId, Balance, Index};
pub use sc_rpc_api::DenyUnsafe;
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use sp_transaction_pool::TransactionPool;
/// Full client dependencies.
pub struct FullDeps<C, P> {

View File

@ -32,7 +32,7 @@ pub fn new_partial(
FullClient,
FullBackend,
FullSelectChain,
sp_consensus::DefaultImportQueue<Block, FullClient>,
sc_consensus::DefaultImportQueue<Block, FullClient>,
sc_transaction_pool::FullPool<Block, FullClient>,
(
sc_finality_grandpa::GrandpaBlockImport<

View File

@ -1,35 +1,63 @@
[package]
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'
homepage = 'https://substrate.dev'
license = 'Unlicense'
name = 'pallet-template'
readme = 'README.md'
publish = false
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]
targets = ['x86_64-unknown-linux-gnu']
[dev-dependencies.serde]
version = '1.0.119'
version = '1.0.126'
[dev-dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dev-dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
version = '4.0.0-dev'
[dev-dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'monthly-2021-07'
version = '3.0.0'
tag = 'monthly-2021-08'
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]
default = ['std']
@ -41,27 +69,3 @@ std = [
'frame-benchmarking/std',
]
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'

View File

@ -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);

View File

@ -28,7 +28,7 @@ parameter_types! {
}
impl system::Config for Test {
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::AllowAll;
type BlockWeights = ();
type BlockLength = ();
type DbWeight = ();

View File

@ -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]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
description = 'Substrate FRAME based template for composing and building WASM runtimes.'
edition = '2018'
homepage = 'https://substrate.dev'
license = 'Unlicense'
name = 'node-template-runtime'
publish = false
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]
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]
default = ['std']
runtime-benchmarks = [
@ -54,169 +224,3 @@ std = [
'sp-transaction-pool/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'

View File

@ -26,7 +26,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates.
pub use frame_support::{
construct_runtime, parameter_types,
traits::{KeyOwnerProofSystem, Randomness},
traits::{KeyOwnerProofSystem, Randomness, StorageInfo},
weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
IdentityFee, Weight,
@ -144,7 +144,7 @@ parameter_types! {
impl frame_system::Config for Runtime {
/// The basic call filter to use in dispatchable.
type BaseCallFilter = ();
type BaseCallFilter = frame_support::traits::AllowAll;
/// Block & extrinsics weights: base values and limits.
type BlockWeights = BlockWeights;
/// The maximum length of a block (in bytes).
@ -363,8 +363,9 @@ impl_runtime_apis! {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
block_hash: <Block as BlockT>::Hash,
) -> 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 {
fn dispatch_benchmark(
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_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
@ -466,6 +471,8 @@ impl_runtime_apis! {
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
];
let storage_info = AllPalletsWithSystem::storage_info();
let mut batches = Vec::<BenchmarkBatch>::new();
let params = (&config, &whitelist);
@ -475,7 +482,7 @@ impl_runtime_apis! {
add_benchmark!(params, batches, pallet_template, TemplateModule);
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
Ok(batches)
Ok((batches, storage_info))
}
}
}

View File

@ -6,7 +6,5 @@ echo "*** Start Substrate node template ***"
cd $(dirname ${BASH_SOURCE[0]})/..
mkdir -p ./.local
docker-compose down --remove-orphans
docker-compose run --rm --service-ports dev $@