Skip to content

Commit

Permalink
feat: upgrade to Polkadot v0.9.16 (#319)
Browse files Browse the repository at this point in the history
* chore: bump Polkadot dependencies to v0.9.16

* refactor: use AllPalletsWithSystem hook

* chore: remove crowdloan pallet

* fix: apply no DefaultAccount check

* fix: switch to default MaxEncodedLen

paritytech/substrate#10662

* fix: apply asset quota + runtime state_version

quota: paritytech/substrate#10382
state: paritytech/substrate#9732

* fix: Preimage registrar and Scheduler integration

Scheduler: paritytech/substrate#10356
OriginPriviligeCmp: paritytech/polkadot#4166

* fix: OrderedSet

* fix: apply new fork_id to chainspecs

paritytech/substrate#10463

* fix: apply no default account for SudoConfig

* fix: apply name changes for GrandPa

paritytech/substrate#10463

* fix: EnsureOneOf

paritytech/substrate#10379

* fix: preimage weights

* fix: parachain client

* fix: clippy copied weights

* fix: bump deps

* tests: attempt staking fix

* bench: attempt to fix default accountid for dids

* fix: staking unit test pallet order execution

* fix: did unit benchmarks

* fix: fmt

* fix: revert to old hook order execution

* bench: run manually for preimage + scheduler

* fix: only import TaskManager for try-runtime feature

* fix: use correct scheduler migration + add logs

* refactor: use explicit para runtime executors

* fix: apply code review by @Diiaablo95

* chore: apply suggestion from @weichweich review

* chore: bump deps

* fix: deps
  • Loading branch information
wischli authored Feb 9, 2022
1 parent 0d1d124 commit 365c716
Show file tree
Hide file tree
Showing 64 changed files with 2,651 additions and 3,417 deletions.
2,560 changes: 1,362 additions & 1,198 deletions Cargo.lock

Large diffs are not rendered by default.

105 changes: 54 additions & 51 deletions nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "kilt-parachain"
path = "src/main.rs"

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

[dependencies]

Expand All @@ -34,67 +34,70 @@ structopt = "0.3.25"
trie-root = "0.15.2"

# Substrate dependencies
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.13"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-trie = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-chain-spec = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-tracing = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-io = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-offchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-runtime = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.16"}
sp-session = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-trie = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
substrate-prometheus-endpoint = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}

# RPC related dependencies
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
jsonrpc-core = "18.0.0"
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}

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

# Polkadot dependencies
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13"}
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.13"}
polkadot-cli = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16"}
polkadot-parachain = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16"}
polkadot-primitives = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16"}
polkadot-service = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16"}
xcm = {git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.16"}

# Benchmarking
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13"}
frame-benchmarking = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16"}

# Runtime tests
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true}
node-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true}
try-runtime-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.16", optional = true}

[features]
default = []
Expand Down
10 changes: 6 additions & 4 deletions nodes/parachain/src/chain_spec/peregrine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ pub fn make_dev_spec() -> Result<ChainSpec, String> {
let wasm = WASM_BINARY.ok_or("No WASM")?;

Ok(ChainSpec::from_genesis(
"KILT Peregrine Local",
"peregrine_local_testnet",
"KILT Peregrine Develop",
"kilt_peregrine_dev",
ChainType::Local,
move || {
testnet_genesis(
Expand Down Expand Up @@ -96,6 +96,7 @@ pub fn make_dev_spec() -> Result<ChainSpec, String> {
vec![],
None,
None,
None,
Some(properties),
Extensions {
relay_chain: "rococo_local_testnet".into(),
Expand All @@ -111,7 +112,7 @@ pub fn make_new_spec() -> Result<ChainSpec, String> {

Ok(ChainSpec::from_genesis(
"KILT Peregrine Testnet",
"kilt_parachain_testnet",
"kilt_peregrine_testnet",
ChainType::Live,
move || {
testnet_genesis(
Expand Down Expand Up @@ -151,6 +152,7 @@ pub fn make_new_spec() -> Result<ChainSpec, String> {
Vec::new(),
None,
None,
None,
Some(properties),
Extensions {
relay_chain: "rococo_local_testnet".into(),
Expand Down Expand Up @@ -200,7 +202,7 @@ fn testnet_genesis(
.chain(botlabs_accounts.iter().cloned().map(|(who, total, _, _)| (who, total)))
.collect(),
},
sudo: SudoConfig { key: root_key },
sudo: SudoConfig { key: Some(root_key) },
parachain_info: ParachainInfoConfig { parachain_id: id },
kilt_launch: KiltLaunchConfig {
vesting: airdrop_accounts
Expand Down
7 changes: 5 additions & 2 deletions nodes/parachain/src/chain_spec/spiritnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ pub fn get_chain_spec_dev() -> Result<ChainSpec, String> {
let wasm = WASM_BINARY.ok_or("No WASM")?;

Ok(ChainSpec::from_genesis(
"KILT Local",
"kilt_parachain_local_testnet",
"KILT Spiritnet Develop",
"kilt_spiritnet_dev",
ChainType::Local,
move || {
testnet_genesis(
Expand Down Expand Up @@ -115,6 +115,7 @@ pub fn get_chain_spec_dev() -> Result<ChainSpec, String> {
vec![],
None,
None,
None,
Some(properties),
Extensions {
relay_chain: "rococo_local_testnet".into(),
Expand Down Expand Up @@ -170,6 +171,7 @@ pub fn get_chain_spec_wilt() -> Result<ChainSpec, String> {
],
Some(TelemetryEndpoints::new(vec![(TELEMETRY_URL.to_string(), 0)]).expect("WILT telemetry url is valid; qed")),
None,
None,
Some(properties),
Extensions {
relay_chain: "westend".into(),
Expand Down Expand Up @@ -225,6 +227,7 @@ pub fn get_chain_spec_rilt() -> Result<ChainSpec, String> {
],
Some(TelemetryEndpoints::new(vec![(TELEMETRY_URL.to_string(), 0)]).expect("RILT telemetry url is valid; qed")),
None,
None,
Some(properties),
Extensions {
relay_chain: "rococo".into(),
Expand Down
Loading

0 comments on commit 365c716

Please sign in to comment.