Skip to content

Commit a390b69

Browse files
authored
chore: upgrade to polkadot 0.9.4 (#107)
* chore(deps): update substrate cumulus polkadot deps * chore(deps): use latest polkadot release branch * fix: breaking changes from latest relase branch * use chainlink master * update polkadot deps * use compact Cargo.toml fromat everywhere * update to master * update tests * add sp-runtime as optional dependency * update chainlink * switch to polkadot v0.9.4 branches * update runtime * revert new pallet balances types * revert config name change * add license header * revert naming conventions
1 parent 49ce268 commit a390b69

File tree

32 files changed

+2376
-2032
lines changed

32 files changed

+2376
-2032
lines changed

Cargo.lock

Lines changed: 1206 additions & 675 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 179 additions & 0 deletions
Large diffs are not rendered by default.

node/Cargo.toml

Lines changed: 85 additions & 213 deletions
Original file line numberDiff line numberDiff line change
@@ -1,224 +1,96 @@
1-
[dependencies]
2-
derive_more = '0.15.0'
3-
log = "0.4.13"
4-
codec = { package = 'parity-scale-codec', version = '2.0.0' }
5-
structopt = "0.3.8"
6-
serde = { version = "1.0.119", features = ["derive"] }
7-
hex-literal = "0.2.1"
8-
# RPC related dependencies
9-
jsonrpc-core = "15.1.0"
10-
11-
[dependencies.frame-benchmarking]
12-
git = 'https://github.com/paritytech/substrate.git'
13-
branch = 'rococo-v1'
14-
version = '3.0.0'
15-
16-
[dependencies.frame-benchmarking-cli]
17-
git = 'https://github.com/paritytech/substrate.git'
18-
branch = 'rococo-v1'
19-
version = '3.0.0'
20-
optional = true
21-
22-
[dependencies.parachain-runtime]
23-
path = '../runtime'
24-
version = '2.0.0'
25-
26-
[dependencies.pallet-transaction-payment-rpc]
27-
git = 'https://github.com/paritytech/substrate.git'
28-
branch = 'rococo-v1'
29-
version = '3.0.0'
30-
31-
[dependencies.sc-basic-authorship]
32-
git = 'https://github.com/paritytech/substrate.git'
33-
branch = 'rococo-v1'
34-
version = '0.9.0'
35-
36-
[dependencies.sc-chain-spec]
37-
git = 'https://github.com/paritytech/substrate.git'
38-
branch = 'rococo-v1'
39-
version = '3.0.0'
40-
41-
[dependencies.sc-cli]
42-
features = ['wasmtime']
43-
git = 'https://github.com/paritytech/substrate.git'
44-
branch = 'rococo-v1'
45-
version = '0.9.0'
46-
47-
[dependencies.sc-client-api]
48-
git = 'https://github.com/paritytech/substrate.git'
49-
branch = 'rococo-v1'
50-
version = '3.0.0'
51-
52-
[dependencies.sc-consensus]
53-
git = 'https://github.com/paritytech/substrate.git'
54-
branch = 'rococo-v1'
55-
version = '0.9.0'
56-
57-
[dependencies.sc-executor]
58-
features = ['wasmtime']
59-
git = 'https://github.com/paritytech/substrate.git'
60-
branch = 'rococo-v1'
61-
version = '0.9.0'
62-
63-
[dependencies.sc-keystore]
64-
git = 'https://github.com/paritytech/substrate.git'
65-
branch = 'rococo-v1'
66-
version = '3.0.0'
67-
68-
[dependencies.sc-rpc]
69-
git = 'https://github.com/paritytech/substrate.git'
70-
branch = 'rococo-v1'
71-
version = '3.0.0'
72-
73-
[dependencies.sc-rpc-api]
74-
git = 'https://github.com/paritytech/substrate.git'
75-
branch = 'rococo-v1'
76-
version = '0.9.0'
77-
78-
[dependencies.sc-service]
79-
features = ['wasmtime']
80-
git = 'https://github.com/paritytech/substrate.git'
81-
branch = 'rococo-v1'
82-
version = '0.9.0'
83-
84-
[dependencies.sc-telemetry]
85-
git = 'https://github.com/paritytech/substrate.git'
86-
branch = 'rococo-v1'
87-
version = '3.0.0'
88-
89-
[dependencies.sc-transaction-pool]
90-
git = 'https://github.com/paritytech/substrate.git'
91-
branch = 'rococo-v1'
92-
version = '3.0.0'
93-
94-
[dependencies.sc-tracing]
95-
git = 'https://github.com/paritytech/substrate.git'
96-
branch = 'rococo-v1'
97-
version = '3.0.0'
98-
99-
[dependencies.sp-api]
100-
git = 'https://github.com/paritytech/substrate.git'
101-
branch = 'rococo-v1'
102-
version = '3.0.0'
103-
104-
[dependencies.sp-block-builder]
105-
git = 'https://github.com/paritytech/substrate.git'
106-
branch = 'rococo-v1'
107-
version = '3.0.0'
108-
109-
[dependencies.sp-blockchain]
110-
git = 'https://github.com/paritytech/substrate.git'
111-
branch = 'rococo-v1'
112-
version = '3.0.0'
113-
114-
[dependencies.sp-consensus]
115-
git = 'https://github.com/paritytech/substrate.git'
116-
branch = 'rococo-v1'
117-
version = '0.9.0'
118-
119-
[dependencies.sp-core]
120-
git = 'https://github.com/paritytech/substrate.git'
121-
branch = 'rococo-v1'
122-
version = '3.0.0'
123-
124-
[dependencies.sp-inherents]
125-
git = 'https://github.com/paritytech/substrate.git'
126-
branch = 'rococo-v1'
127-
version = '3.0.0'
128-
129-
[dependencies.sp-runtime]
130-
git = 'https://github.com/paritytech/substrate.git'
131-
branch = 'rococo-v1'
132-
version = '3.0.0'
133-
134-
[dependencies.sp-timestamp]
135-
git = 'https://github.com/paritytech/substrate.git'
136-
branch = 'rococo-v1'
137-
version = '3.0.0'
138-
139-
[dependencies.sp-transaction-pool]
140-
git = 'https://github.com/paritytech/substrate.git'
141-
branch = 'rococo-v1'
142-
version = '3.0.0'
143-
144-
[dependencies.sp-trie]
145-
git = 'https://github.com/paritytech/substrate.git'
146-
branch = 'rococo-v1'
147-
version = '3.0.0'
148-
149-
[dependencies.substrate-frame-rpc-system]
150-
git = 'https://github.com/paritytech/substrate.git'
151-
branch = 'rococo-v1'
152-
version = '3.0.0'
153-
154-
[build-dependencies.substrate-build-script-utils]
155-
git = 'https://github.com/paritytech/substrate.git'
156-
branch = 'rococo-v1'
157-
version = '3.0.0'
158-
159-
# Cumulus dependencies
160-
[dependencies.cumulus-client-consensus-relay-chain]
161-
git = 'https://github.com/paritytech/cumulus.git'
162-
branch = 'rococo-v1'
163-
164-
[dependencies.cumulus-client-collator]
165-
git = 'https://github.com/paritytech/cumulus.git'
166-
branch = 'rococo-v1'
167-
168-
[dependencies.cumulus-client-cli]
169-
git = 'https://github.com/paritytech/cumulus.git'
170-
branch = 'rococo-v1'
171-
172-
[dependencies.cumulus-client-network]
173-
git = 'https://github.com/paritytech/cumulus.git'
174-
branch = 'rococo-v1'
175-
176-
[dependencies.cumulus-primitives-core]
177-
git = 'https://github.com/paritytech/cumulus.git'
178-
branch = 'rococo-v1'
179-
180-
[dependencies.cumulus-client-service]
181-
git = 'https://github.com/paritytech/cumulus.git'
182-
branch = 'rococo-v1'
183-
184-
# Polkadot dependencies
185-
[dependencies.polkadot-primitives]
186-
git = "https://github.com/paritytech/polkadot"
187-
branch = 'rococo-v1'
188-
189-
[dependencies.polkadot-service]
190-
git = "https://github.com/paritytech/polkadot"
191-
branch = 'rococo-v1'
192-
193-
[dependencies.polkadot-cli]
194-
git = "https://github.com/paritytech/polkadot"
195-
branch = 'rococo-v1'
196-
197-
[dependencies.polkadot-test-service]
198-
git = "https://github.com/paritytech/polkadot"
199-
branch = 'rococo-v1'
200-
201-
[dependencies.polkadot-parachain]
202-
git = "https://github.com/paritytech/polkadot"
203-
branch = 'rococo-v1'
204-
2051
[package]
206-
authors = ['Anonymous']
207-
build = 'build.rs'
2+
name = 'pint'
3+
authors = ['ChainSafe Systems']
2084
description = 'A new Cumulus FRAME-based Substrate node, ready for hacking.'
209-
edition = '2018'
5+
license = 'Unlicense'
6+
version = '3.0.0'
2107
homepage = 'https://substrate.dev'
211-
license = 'LGPL-3.0-only'
212-
name = 'pint'
2138
repository = 'https://github.com/substrate-developer-hub/substrate-parachain-template'
214-
version = '2.0.0'
9+
edition = '2018'
10+
build = 'build.rs'
11+
21512
[package.metadata.docs.rs]
21613
targets = ['x86_64-unknown-linux-gnu']
21714

15+
[build-dependencies]
16+
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
17+
21818
[features]
21919
default = []
22020
runtime-benchmarks = [
221-
'frame-benchmarking-cli',
222-
'parachain-runtime/runtime-benchmarks',
223-
'polkadot-service/runtime-benchmarks'
21+
'parachain-runtime/runtime-benchmarks',
22+
'polkadot-service/runtime-benchmarks'
22423
]
24+
[dependencies]
25+
derive_more = '0.15.0'
26+
log = '0.4.14'
27+
codec = { package = 'parity-scale-codec', version = '2.0.0' }
28+
structopt = '0.3.8'
29+
serde = { version = '1.0.119', features = ['derive'] }
30+
hex-literal = '0.2.1'
31+
futures = { version = "0.3.1", features = ["compat"] }
32+
# RPC related Dependencies
33+
jsonrpc-core = '15.1.0'
34+
35+
# Local Dependencies
36+
parachain-runtime = { path = '../runtime' }
37+
38+
# Substrate Dependencies
39+
frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
40+
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
41+
42+
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
43+
44+
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
45+
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" }
46+
47+
## Substrate Client Dependencies
48+
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
49+
sc-chain-spec = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
50+
sc-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
51+
sc-client-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
52+
sc-consensus = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
53+
sc-executor = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
54+
sc-network = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
55+
sc-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
56+
sc-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
57+
sc-rpc-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
58+
sc-service = { git = 'https://github.com/paritytech/substrate', branch = "master", version = '0.9.0', features = ['wasmtime'] }
59+
sc-telemetry = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
60+
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
61+
sc-tracing = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
62+
63+
## Substrate Primitive Dependencies
64+
sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
65+
sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
66+
sp-blockchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
67+
sp-consensus = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
68+
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
69+
sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
70+
sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
71+
sp-keystore = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
72+
sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
73+
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
74+
sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
75+
sp-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
76+
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.4' }
77+
78+
# Cumulus dependencies
79+
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
80+
cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
81+
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
82+
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
83+
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
84+
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
85+
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
86+
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
87+
cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.4' }
88+
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.4" }
89+
90+
91+
# Polkadot dependencies
92+
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
93+
polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
94+
polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
95+
polkadot-test-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}
96+
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.4'}

node/src/chain_spec.rs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: LGPL-3.0-only
33

44
use cumulus_primitives_core::ParaId;
5-
use parachain_runtime::{AccountId, Signature};
5+
use parachain_runtime::{AccountId, AuraId, Signature};
66
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
77
use sc_service::ChainType;
88
use serde::{Deserialize, Serialize};
@@ -56,6 +56,10 @@ pub fn pint_development_config(id: ParaId) -> ChainSpec {
5656
move || {
5757
pint_testnet_genesis(
5858
get_account_id_from_seed::<sr25519::Public>("Alice"),
59+
vec![
60+
get_from_seed::<AuraId>("Alice"),
61+
get_from_seed::<AuraId>("Bob"),
62+
],
5963
vec![
6064
get_account_id_from_seed::<sr25519::Public>("Alice"),
6165
get_account_id_from_seed::<sr25519::Public>("Bob"),
@@ -92,6 +96,10 @@ pub fn pint_local_config(id: ParaId) -> ChainSpec {
9296
move || {
9397
pint_testnet_genesis(
9498
get_account_id_from_seed::<sr25519::Public>("Alice"),
99+
vec![
100+
get_from_seed::<AuraId>("Alice"),
101+
get_from_seed::<AuraId>("Bob"),
102+
],
95103
vec![
96104
get_account_id_from_seed::<sr25519::Public>("Alice"),
97105
get_account_id_from_seed::<sr25519::Public>("Bob"),
@@ -128,6 +136,7 @@ pub fn pint_local_config(id: ParaId) -> ChainSpec {
128136

129137
fn pint_testnet_genesis(
130138
root_key: AccountId,
139+
_initial_authorities: Vec<AuraId>,
131140
endowed_accounts: Vec<AccountId>,
132141
council_members: Vec<AccountId>,
133142
id: ParaId,
@@ -139,18 +148,23 @@ fn pint_testnet_genesis(
139148
.to_vec(),
140149
changes_trie_config: Default::default(),
141150
},
142-
pallet_committee: parachain_runtime::CommitteeConfig {
143-
council_members,
144-
..Default::default()
145-
},
146151
pallet_balances: parachain_runtime::BalancesConfig {
147152
balances: endowed_accounts
148153
.iter()
149154
.cloned()
150155
.map(|k| (k, 1 << 60))
151156
.collect(),
152157
},
158+
pallet_committee: parachain_runtime::CommitteeConfig {
159+
council_members,
160+
..Default::default()
161+
},
153162
pallet_sudo: parachain_runtime::SudoConfig { key: root_key },
154163
parachain_info: parachain_runtime::ParachainInfoConfig { parachain_id: id },
164+
// no need to pass anything to aura, in fact it will panic if we do. Session will take care
165+
// of this.
166+
pallet_aura: Default::default(),
167+
cumulus_pallet_aura_ext: Default::default(),
168+
cumulus_pallet_parachain_system: Default::default(),
155169
}
156170
}

0 commit comments

Comments
 (0)