Update to 3e65111 (#18)

main
Ricardo Rius 2020-01-06 14:58:38 -06:00 committed by GitHub
parent 8fea1dc6dd
commit 9e02251a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 1413 additions and 1320 deletions

2307
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,21 @@
[workspace]
members = ['runtime']
[profile.release]
panic = 'unwind'
[package]
authors = ['Anonymous']
build = 'build.rs'
edition = '2018'
name = 'node-template'
version = '2.0.0'
[build-dependencies]
vergen = '3.0.4'
[build-dependencies.build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-build-script-utils'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies]
futures = '0.3.1'
@ -23,93 +39,96 @@ version = '0.1.29'
[dependencies.grandpa]
git = 'https://github.com/paritytech/substrate.git'
package = 'sc-finality-grandpa'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.grandpa-primitives]
git = 'https://github.com/paritytech/substrate.git'
package = 'sp-finality-grandpa'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.node-template-runtime]
path = 'runtime'
version = '2.0.0'
[dependencies.sc-basic-authority]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
[dependencies.sc-cli]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sc-client]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sc-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '0.8'
[dependencies.sc-executor]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sc-network]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '0.8'
[dependencies.sc-service]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sc-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-consensus]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '0.8'
[dependencies.sp-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '0.8'
[dependencies.sp-core]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-inherents]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-io]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-runtime]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[package]
authors = ['Anonymous']
build = 'build.rs'
edition = '2018'
name = 'node-template'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[workspace]
members = ['runtime']
[[bin]]
name = 'node-template'
path = 'src/main.rs'
[profile.release]
panic = 'unwind'
[build-dependencies]
vergen = '3.0.4'
[build-dependencies.build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-build-script-utils'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'

View File

@ -1,6 +1,6 @@
# Substrate Node Template
A new SRML-based Substrate node, ready for hacking.
A new FRAME-based Substrate node, ready for hacking.
## Build
@ -26,7 +26,7 @@ cargo build --release
### Single node development chain
Purge any existing development chain state:
Purge any existing developer chain state:
```bash
./target/release/node-template purge-chain --dev

View File

@ -1,7 +1,161 @@
[package]
authors = ['Anonymous']
edition = '2018'
name = 'node-template-runtime'
[dependencies.aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-aura'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-balances'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
version = '1.0.0'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.grandpa]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-grandpa'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.indices]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-indices'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-randomness-collective-flip'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.safe-mix]
default-features = false
version = '1.0.0'
[dependencies.serde]
features = ['derive']
optional = true
version = '1.0.101'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '0.8'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-sudo'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'frame-system'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-timestamp'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[dependencies.transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-transaction-payment'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '2.0.0'
[features]
@ -34,146 +188,14 @@ std = [
'timestamp/std',
'transaction-payment/std',
]
[package]
authors = ['Anonymous']
edition = '2018'
name = 'node-template-runtime'
version = '2.0.0'
[build-dependencies.wasm-builder-runner]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-wasm-builder-runner'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
rev = '3e651110aa06aa835790df63410a29676243fc54'
version = '1.0.4'
[dependencies.aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-aura'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-balances'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
version = '1.0.0'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.grandpa]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-grandpa'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.indices]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-indices'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-randomness-collective-flip'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.safe-mix]
default-features = false
version = '1.0.0'
[dependencies.serde]
features = ['derive']
optional = true
version = '1.0.101'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-sudo'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'frame-system'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-timestamp'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'
[dependencies.transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-transaction-payment'
rev = '40a16efefc070faf5a25442bc3ae1d0ea2478eee'

View File

@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd.
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of Substrate.
// Substrate is free software: you can redistribute it and/or modify

View File

@ -157,6 +157,10 @@ impl system::Trait for Runtime {
type AvailableBlockRatio = AvailableBlockRatio;
/// Version of the runtime.
type Version = Version;
/// Converts a module to the index of the module in `construct_runtime!`.
///
/// This type is being generated by `construct_runtime!`.
type ModuleToIndex = ModuleToIndex;
}
impl aura::Trait for Runtime {
@ -247,7 +251,7 @@ construct_runtime!(
Aura: aura::{Module, Config<T>, Inherent(Timestamp)},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
Indices: indices,
Balances: balances::{default, Error},
Balances: balances,
TransactionPayment: transaction_payment::{Module, Storage},
Sudo: sudo,
// Used for the module template in `./template.rs`

View File

@ -8,7 +8,7 @@
/// For more guidance on Substrate modules, see the example module
/// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs
use frame_support::{decl_module, decl_storage, decl_event, dispatch};
use frame_support::{decl_module, decl_storage, decl_event, dispatch::DispatchResult};
use system::ensure_signed;
/// The module's configuration trait.
@ -40,7 +40,7 @@ decl_module! {
// Just a dummy entry point.
// function that can be called by the external world as an extrinsics call
// takes a parameter of the type `AccountId`, stores it and emits an event
pub fn do_something(origin, something: u32) -> dispatch::Result {
pub fn do_something(origin, something: u32) -> DispatchResult {
// TODO: You only need this if you want to check it was signed.
let who = ensure_signed(origin)?;
@ -106,6 +106,7 @@ mod tests {
type MaximumBlockLength = MaximumBlockLength;
type AvailableBlockRatio = AvailableBlockRatio;
type Version = ();
type ModuleToIndex = ();
}
impl Trait for Test {
type Event = ();

View File

@ -56,9 +56,13 @@ macro_rules! new_full_start {
client.clone(), &*client, select_chain
)?;
let import_queue = sc_consensus_aura::import_queue::<_, _, AuraPair, _>(
let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
grandpa_block_import.clone(), client.clone(),
);
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(
sc_consensus_aura::SlotDuration::get_or_compute(&*client)?,
Box::new(grandpa_block_import.clone()),
aura_block_import,
Some(Box::new(grandpa_block_import.clone())),
None,
client,
@ -220,9 +224,9 @@ pub fn new_light<C: Send + Default + 'static>(config: Configuration<C, GenesisCo
let finality_proof_request_builder =
finality_proof_import.create_finality_proof_request_builder();
let import_queue = sc_consensus_aura::import_queue::<_, _, AuraPair, ()>(
let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, ()>(
sc_consensus_aura::SlotDuration::get_or_compute(&*client)?,
Box::new(grandpa_block_import),
grandpa_block_import,
None,
Some(Box::new(finality_proof_import)),
client,