Merge pull request #54 from substrate-developer-hub/v2.0.0-rc3

Upgrade to v2.0.0-rc3
main
Joshy Orndorff 2020-06-10 15:52:04 -04:00 committed by GitHub
commit f5acce1e68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 548 additions and 681 deletions

940
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,11 @@
[build-dependencies.substrate-build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[[bin]]
name = 'node-template'
[package]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
build = 'build.rs'
@ -7,7 +15,7 @@ homepage = 'https://substrate.io'
license = 'Unlicense'
name = 'node-template'
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
version = '2.0.0-rc2'
version = '2.0.0-rc3'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
@ -20,97 +28,89 @@ structopt = '0.3.8'
[dependencies.node-template-runtime]
path = '../runtime'
version = '2.0.0-rc2'
version = '2.0.0-rc3'
[dependencies.sc-basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-cli]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-client-api]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sc-consensus]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-executor]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-network]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-service]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sc-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-consensus]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sp-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sp-core]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-inherents]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-runtime]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
[build-dependencies.substrate-build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
[[bin]]
name = 'node-template'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'

View File

@ -34,14 +34,22 @@ macro_rules! new_full_start {
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
let builder = sc_service::ServiceBuilder::new_full::<
node_template_runtime::opaque::Block, node_template_runtime::RuntimeApi, crate::service::Executor
node_template_runtime::opaque::Block,
node_template_runtime::RuntimeApi,
crate::service::Executor
>($config)?
.with_select_chain(|_config, backend| {
Ok(sc_consensus::LongestChain::new(backend.clone()))
})?
.with_transaction_pool(|config, client, _fetcher, prometheus_registry| {
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api), prometheus_registry))
.with_transaction_pool(|builder| {
let pool_api = sc_transaction_pool::FullChainApi::new(
builder.client().clone(),
);
Ok(sc_transaction_pool::BasicPool::new(
builder.config().transaction_pool.clone(),
std::sync::Arc::new(pool_api),
builder.prometheus_registry(),
))
})?
.with_import_queue(|
_config,
@ -199,13 +207,19 @@ pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceE
.with_select_chain(|_config, backend| {
Ok(LongestChain::new(backend.clone()))
})?
.with_transaction_pool(|config, client, fetcher, prometheus_registry| {
let fetcher = fetcher
.with_transaction_pool(|builder| {
let fetcher = builder.fetcher()
.ok_or_else(|| "Trying to start light transaction pool without active fetcher")?;
let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone());
let pool_api = sc_transaction_pool::LightChainApi::new(
builder.client().clone(),
fetcher.clone(),
);
let pool = sc_transaction_pool::BasicPool::with_revalidation_type(
config, Arc::new(pool_api), prometheus_registry, sc_transaction_pool::RevalidationType::Light,
builder.config().transaction_pool.clone(),
Arc::new(pool_api),
builder.prometheus_registry(),
sc_transaction_pool::RevalidationType::Light,
);
Ok(pool)
})?

View File

@ -1,13 +1,3 @@
[package]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
description = 'FRAME pallet template'
edition = '2018'
homepage = 'https://substrate.io'
license = 'Unlicense'
name = 'pallet-template'
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
version = '2.0.0-rc2'
[dependencies.codec]
default-features = false
features = ['derive']
@ -17,32 +7,43 @@ version = '1.3.0'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dev-dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dev-dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dev-dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[package]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
description = 'FRAME pallet template'
edition = '2018'
homepage = 'https://substrate.io'
license = 'Unlicense'
name = 'pallet-template'
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
version = '2.0.0-rc3'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
[features]
default = ['std']

View File

@ -1,28 +1,16 @@
[package]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
edition = '2018'
homepage = 'https://substrate.io'
license = 'Unlicense'
name = 'node-template-runtime'
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
version = '2.0.0-rc2'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
[dependencies.aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-aura'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-balances'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.codec]
default-features = false
@ -33,28 +21,28 @@ version = '1.3.0'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.grandpa]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-grandpa'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-randomness-collective-flip'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.serde]
features = ['derive']
@ -64,108 +52,124 @@ version = '1.0.101'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '0.8.0-rc2'
tag = 'v2.0.0-rc3'
version = '0.8.0-rc3'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-sudo'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'frame-system'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.template]
default-features = false
package = 'pallet-template'
path = '../pallets/template'
version = '2.0.0-rc2'
version = '2.0.0-rc3'
[dependencies.timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-timestamp'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[dependencies.transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'pallet-transaction-payment'
tag = 'v2.0.0-rc2'
version = '2.0.0-rc2'
tag = 'v2.0.0-rc3'
version = '2.0.0-rc3'
[build-dependencies.wasm-builder-runner]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-wasm-builder-runner'
tag = 'v2.0.0-rc3'
version = '1.0.5'
[package]
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
edition = '2018'
homepage = 'https://substrate.io'
license = 'Unlicense'
name = 'node-template-runtime'
repository = 'https://github.com/substrate-developer-hub/substrate-node-template/'
version = '2.0.0-rc3'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
[features]
default = ['std']
@ -196,9 +200,3 @@ std = [
'transaction-payment/std',
'template/std',
]
[build-dependencies.wasm-builder-runner]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-wasm-builder-runner'
tag = 'v2.0.0-rc2'
version = '1.0.5'

View File

@ -3,7 +3,7 @@ use wasm_builder_runner::WasmBuilder;
fn main() {
WasmBuilder::new()
.with_current_project()
.with_wasm_builder_from_crates("1.0.9")
.with_wasm_builder_from_crates("1.0.11")
.export_heap_base()
.import_memory()
.build()

View File

@ -128,7 +128,7 @@ parameter_types! {
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
/// Assume 10% of weight for average on_initialize calls.
pub const MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
.saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
pub const Version: RuntimeVersion = VERSION;