Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to polkadot 0.9.4 #107

Merged
merged 17 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,881 changes: 1,206 additions & 675 deletions Cargo.lock

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions Cargo.toml

Large diffs are not rendered by default.

298 changes: 85 additions & 213 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,224 +1,96 @@
[dependencies]
derive_more = '0.15.0'
log = "0.4.13"
codec = { package = 'parity-scale-codec', version = '2.0.0' }
structopt = "0.3.8"
serde = { version = "1.0.119", features = ["derive"] }
hex-literal = "0.2.1"
# RPC related dependencies
jsonrpc-core = "15.1.0"

[dependencies.frame-benchmarking]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.frame-benchmarking-cli]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'
optional = true

[dependencies.parachain-runtime]
path = '../runtime'
version = '2.0.0'

[dependencies.pallet-transaction-payment-rpc]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sc-chain-spec]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-cli]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sc-client-api]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-consensus]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sc-executor]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sc-keystore]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-rpc]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-rpc-api]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sc-service]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sc-telemetry]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sc-tracing]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-api]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-block-builder]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-blockchain]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-consensus]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '0.9.0'

[dependencies.sp-core]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-inherents]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-runtime]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-timestamp]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.sp-trie]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[dependencies.substrate-frame-rpc-system]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

[build-dependencies.substrate-build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
branch = 'rococo-v1'
version = '3.0.0'

# Cumulus dependencies
[dependencies.cumulus-client-consensus-relay-chain]
git = 'https://github.com/paritytech/cumulus.git'
branch = 'rococo-v1'

[dependencies.cumulus-client-collator]
git = 'https://github.com/paritytech/cumulus.git'
branch = 'rococo-v1'

[dependencies.cumulus-client-cli]
git = 'https://github.com/paritytech/cumulus.git'
branch = 'rococo-v1'

[dependencies.cumulus-client-network]
git = 'https://github.com/paritytech/cumulus.git'
branch = 'rococo-v1'

[dependencies.cumulus-primitives-core]
git = 'https://github.com/paritytech/cumulus.git'
branch = 'rococo-v1'

[dependencies.cumulus-client-service]
git = 'https://github.com/paritytech/cumulus.git'
branch = 'rococo-v1'

# Polkadot dependencies
[dependencies.polkadot-primitives]
git = "https://github.com/paritytech/polkadot"
branch = 'rococo-v1'

[dependencies.polkadot-service]
git = "https://github.com/paritytech/polkadot"
branch = 'rococo-v1'

[dependencies.polkadot-cli]
git = "https://github.com/paritytech/polkadot"
branch = 'rococo-v1'

[dependencies.polkadot-test-service]
git = "https://github.com/paritytech/polkadot"
branch = 'rococo-v1'

[dependencies.polkadot-parachain]
git = "https://github.com/paritytech/polkadot"
branch = 'rococo-v1'

[package]
authors = ['Anonymous']
build = 'build.rs'
name = 'pint'
authors = ['ChainSafe Systems']
description = 'A new Cumulus FRAME-based Substrate node, ready for hacking.'
edition = '2018'
license = 'Unlicense'
version = '3.0.0'
homepage = 'https://substrate.dev'
license = 'LGPL-3.0-only'
name = 'pint'
repository = 'https://github.com/substrate-developer-hub/substrate-parachain-template'
version = '2.0.0'
edition = '2018'
build = 'build.rs'

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']

[build-dependencies]
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }

[features]
default = []
runtime-benchmarks = [
'frame-benchmarking-cli',
'parachain-runtime/runtime-benchmarks',
'polkadot-service/runtime-benchmarks'
'parachain-runtime/runtime-benchmarks',
'polkadot-service/runtime-benchmarks'
]
[dependencies]
derive_more = '0.15.0'
log = '0.4.14'
codec = { package = 'parity-scale-codec', version = '2.0.0' }
structopt = '0.3.8'
serde = { version = '1.0.119', features = ['derive'] }
hex-literal = '0.2.1'
futures = { version = "0.3.1", features = ["compat"] }
# RPC related Dependencies
jsonrpc-core = '15.1.0'

# Local Dependencies
parachain-runtime = { path = '../runtime' }

# Substrate Dependencies
frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }

pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }

substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" }

## Substrate Client Dependencies
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-client-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-consensus = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-executor = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-network = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-service = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '0.9.0', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sc-tracing = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }

## Substrate Primitive Dependencies
sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-consensus = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }

# Cumulus dependencies
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }


# Polkadot dependencies
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
polkadot-test-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
24 changes: 19 additions & 5 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

use cumulus_primitives_core::ParaId;
use parachain_runtime::{AccountId, Signature};
use parachain_runtime::{AccountId, AuraId, Signature};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -56,6 +56,10 @@ pub fn pint_development_config(id: ParaId) -> ChainSpec {
move || {
pint_testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_from_seed::<AuraId>("Alice"),
get_from_seed::<AuraId>("Bob"),
],
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
Expand Down Expand Up @@ -92,6 +96,10 @@ pub fn pint_local_config(id: ParaId) -> ChainSpec {
move || {
pint_testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_from_seed::<AuraId>("Alice"),
get_from_seed::<AuraId>("Bob"),
],
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
Expand Down Expand Up @@ -128,6 +136,7 @@ pub fn pint_local_config(id: ParaId) -> ChainSpec {

fn pint_testnet_genesis(
root_key: AccountId,
_initial_authorities: Vec<AuraId>,
endowed_accounts: Vec<AccountId>,
council_members: Vec<AccountId>,
id: ParaId,
Expand All @@ -139,18 +148,23 @@ fn pint_testnet_genesis(
.to_vec(),
changes_trie_config: Default::default(),
},
pallet_committee: parachain_runtime::CommitteeConfig {
council_members,
..Default::default()
},
pallet_balances: parachain_runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1 << 60))
.collect(),
},
pallet_committee: parachain_runtime::CommitteeConfig {
council_members,
..Default::default()
},
pallet_sudo: parachain_runtime::SudoConfig { key: root_key },
parachain_info: parachain_runtime::ParachainInfoConfig { parachain_id: id },
// no need to pass anything to aura, in fact it will panic if we do. Session will take care
// of this.
pallet_aura: Default::default(),
cumulus_pallet_aura_ext: Default::default(),
cumulus_pallet_parachain_system: Default::default(),
}
}
Loading