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
88
README.md
88
README.md
|
@ -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
|
||||||
|
@ -90,34 +90,34 @@ directories.
|
||||||
A blockchain node is an application that allows users to participate in a blockchain network.
|
A blockchain node is an application that allows users to participate in a blockchain network.
|
||||||
Substrate-based blockchain nodes expose a number of capabilities:
|
Substrate-based blockchain nodes expose a number of capabilities:
|
||||||
|
|
||||||
- Networking: Substrate nodes use the [`libp2p`](https://libp2p.io/) networking stack to allow the
|
- Networking: Substrate nodes use the [`libp2p`](https://libp2p.io/) networking stack to allow the
|
||||||
nodes in the network to communicate with one another.
|
nodes in the network to communicate with one another.
|
||||||
- Consensus: Blockchains must have a way to come to
|
- Consensus: Blockchains must have a way to come to
|
||||||
[consensus](https://substrate.dev/docs/en/knowledgebase/advanced/consensus) on the state of the
|
[consensus](https://substrate.dev/docs/en/knowledgebase/advanced/consensus) on the state of the
|
||||||
network. Substrate makes it possible to supply custom consensus engines and also ships with
|
network. Substrate makes it possible to supply custom consensus engines and also ships with
|
||||||
several consensus mechanisms that have been built on top of
|
several consensus mechanisms that have been built on top of
|
||||||
[Web3 Foundation research](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html).
|
[Web3 Foundation research](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html).
|
||||||
- RPC Server: A remote procedure call (RPC) server is used to interact with Substrate nodes.
|
- RPC Server: A remote procedure call (RPC) server is used to interact with Substrate nodes.
|
||||||
|
|
||||||
There are several files in the `node` directory - take special note of the following:
|
There are several files in the `node` directory - take special note of the following:
|
||||||
|
|
||||||
- [`chain_spec.rs`](./node/src/chain_spec.rs): A
|
- [`chain_spec.rs`](./node/src/chain_spec.rs): A
|
||||||
[chain specification](https://substrate.dev/docs/en/knowledgebase/integrate/chain-spec) is a
|
[chain specification](https://substrate.dev/docs/en/knowledgebase/integrate/chain-spec) is a
|
||||||
source code file that defines a Substrate chain's initial (genesis) state. Chain specifications
|
source code file that defines a Substrate chain's initial (genesis) state. Chain specifications
|
||||||
are useful for development and testing, and critical when architecting the launch of a
|
are useful for development and testing, and critical when architecting the launch of a
|
||||||
production chain. Take note of the `development_config` and `testnet_genesis` functions, which
|
production chain. Take note of the `development_config` and `testnet_genesis` functions, which
|
||||||
are used to define the genesis state for the local development chain configuration. These
|
are used to define the genesis state for the local development chain configuration. These
|
||||||
functions identify some
|
functions identify some
|
||||||
[well-known accounts](https://substrate.dev/docs/en/knowledgebase/integrate/subkey#well-known-keys)
|
[well-known accounts](https://substrate.dev/docs/en/knowledgebase/integrate/subkey#well-known-keys)
|
||||||
and use them to configure the blockchain's initial state.
|
and use them to configure the blockchain's initial state.
|
||||||
- [`service.rs`](./node/src/service.rs): This file defines the node implementation. Take note of
|
- [`service.rs`](./node/src/service.rs): This file defines the node implementation. Take note of
|
||||||
the libraries that this file imports and the names of the functions it invokes. In particular,
|
the libraries that this file imports and the names of the functions it invokes. In particular,
|
||||||
there are references to consensus-related topics, such as the
|
there are references to consensus-related topics, such as the
|
||||||
[longest chain rule](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#longest-chain-rule),
|
[longest chain rule](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#longest-chain-rule),
|
||||||
the [Aura](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#aura) block authoring
|
the [Aura](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#aura) block authoring
|
||||||
mechanism and the
|
mechanism and the
|
||||||
[GRANDPA](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#grandpa) finality
|
[GRANDPA](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#grandpa) finality
|
||||||
gadget.
|
gadget.
|
||||||
|
|
||||||
After the node has been [built](#build), refer to the embedded documentation to learn more about the
|
After the node has been [built](#build), refer to the embedded documentation to learn more about the
|
||||||
capabilities and configuration parameters that it exposes:
|
capabilities and configuration parameters that it exposes:
|
||||||
|
@ -143,13 +143,13 @@ create pallets and flexibly compose them to create blockchains that can address
|
||||||
Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this template and note
|
Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this template and note
|
||||||
the following:
|
the following:
|
||||||
|
|
||||||
- This file configures several pallets to include in the runtime. Each pallet configuration is
|
- This file configures several pallets to include in the runtime. Each pallet configuration is
|
||||||
defined by a code block that begins with `impl $PALLET_NAME::Config for Runtime`.
|
defined by a code block that begins with `impl $PALLET_NAME::Config for Runtime`.
|
||||||
- The pallets are composed into a single runtime by way of the
|
- The pallets are composed into a single runtime by way of the
|
||||||
[`construct_runtime!`](https://crates.parity.io/frame_support/macro.construct_runtime.html)
|
[`construct_runtime!`](https://crates.parity.io/frame_support/macro.construct_runtime.html)
|
||||||
macro, which is part of the core
|
macro, which is part of the core
|
||||||
[FRAME Support](https://substrate.dev/docs/en/knowledgebase/runtime/frame#support-library)
|
[FRAME Support](https://substrate.dev/docs/en/knowledgebase/runtime/frame#support-library)
|
||||||
library.
|
library.
|
||||||
|
|
||||||
### Pallets
|
### Pallets
|
||||||
|
|
||||||
|
@ -159,17 +159,17 @@ template pallet that is [defined in the `pallets`](./pallets/template/src/lib.rs
|
||||||
|
|
||||||
A FRAME pallet is compromised of a number of blockchain primitives:
|
A FRAME pallet is compromised of a number of blockchain primitives:
|
||||||
|
|
||||||
- Storage: FRAME defines a rich set of powerful
|
- Storage: FRAME defines a rich set of powerful
|
||||||
[storage abstractions](https://substrate.dev/docs/en/knowledgebase/runtime/storage) that makes
|
[storage abstractions](https://substrate.dev/docs/en/knowledgebase/runtime/storage) that makes
|
||||||
it easy to use Substrate's efficient key-value database to manage the evolving state of a
|
it easy to use Substrate's efficient key-value database to manage the evolving state of a
|
||||||
blockchain.
|
blockchain.
|
||||||
- Dispatchables: FRAME pallets define special types of functions that can be invoked (dispatched)
|
- Dispatchables: FRAME pallets define special types of functions that can be invoked (dispatched)
|
||||||
from outside of the runtime in order to update its state.
|
from outside of the runtime in order to update its state.
|
||||||
- Events: Substrate uses [events](https://substrate.dev/docs/en/knowledgebase/runtime/events) to
|
- Events: Substrate uses [events](https://substrate.dev/docs/en/knowledgebase/runtime/events) to
|
||||||
notify users of important changes in the runtime.
|
notify users of important changes in the runtime.
|
||||||
- Errors: When a dispatchable fails, it returns an error.
|
- Errors: When a dispatchable fails, it returns an error.
|
||||||
- Config: The `Config` configuration interface is used to define the types and parameters upon
|
- Config: The `Config` configuration interface is used to define the types and parameters upon
|
||||||
which a FRAME pallet depends.
|
which a FRAME pallet depends.
|
||||||
|
|
||||||
### Run in Docker
|
### Run in Docker
|
||||||
|
|
||||||
|
|
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