Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit 28c8ed2

Browse files
boozookborispovod
andauthored
update to polkadot-v0.9.18 (#194)
* update to polkadot-v0.9.18 and deps * update deps (xcm) * remove patch-version binding for serde * [runtime] use ParentIsPreset instead of ParentIsDefault (following changes: paritytech/polkadot PR #4712) * just plug the AbsoluteReserveProvider for MultiNativeAsset, temporary * set MinXcmFee & MultiLocationsFilter * swap structopt to clap because of substrate & polkadot * fix missed types in tests * use `ParentIsPreset` instead `ParentIsDefault` in tests * fix parachain mock * fix relaychain tests and default fees * bump version * remove unused imports Co-authored-by: borispovod <boris@pontem.network>
1 parent 07f7d14 commit 28c8ed2

File tree

29 files changed

+2634
-2309
lines changed

29 files changed

+2634
-2309
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[workspace]
22
resolver = "2"
33

4-
members = [
5-
'node',
6-
'pallets/*',
7-
'runtime',
8-
]
4+
members = ['node', 'pallets/*', 'runtime']
95

106
[profile.release]
117
panic = 'unwind'
128
rpath = false
9+
10+
11+
# [patch.'https://github.com/pontem-network/xcm-simulator']
12+
# xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator.git", rev = "22d94e7754b7d8b956b20855b51891928ed0a2f5" }

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Pontem parachain node with [Move VM pallet](/pallets/sp-mvm/) on board.
55
* [Pontem docs](https://docs.pontem.network) - if you want to learn about Pontem network.
66
* [Validator docs](https://docs.pontem.network/03.-staking/collator) - if you want to launch a validator node.
77
* [Bootstrap](https://github.com/pontem-network/bootstrap) - if you want to up node quickly (not for development).
8-
8+
99
## Local Relaychain & Parachain Launch
1010

1111
Current version built with Nimbus consensus and Parachain Staking implementation.
@@ -42,7 +42,7 @@ There are several options to launch Pontem local parachain:
4242

4343
Install [polkadot-launch](https://github.com/paritytech/polkadot-launch).
4444

45-
**Note:** you must have polkadot node `v0.9.16` compiled and built placed in `../polkadot/target/release/`.
45+
**Note:** you must have polkadot node `v0.9.18` compiled and built placed in `../polkadot/target/release/`.
4646
To use different localion you can modify `./launch-config.json`.
4747

4848
Create keystore path for Pontem:
@@ -105,7 +105,7 @@ Build Polkadot:
105105
git clone https://github.com/paritytech/polkadot.git
106106
cd polkadot
107107
git fetch origin
108-
git checkout release-v0.9.16
108+
git checkout release-v0.9.18
109109
cargo build --release
110110
```
111111

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
dockerfile: launch.Dockerfile
99
args:
1010
PONTEM_VERSION: v0.5.1
11-
POLKADOT_VERSION: v0.9.16
11+
POLKADOT_VERSION: v0.9.18
1212
NODE_VERSION: 16
1313
ports:
1414
- "9944:9944" # Alice relaychain

node/Cargo.toml

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = 'Apache-2.0'
77
name = 'pontem-node'
88
edition = '2021'
99
build = 'build.rs'
10-
version = '0.5.2'
10+
version = '0.5.3'
1111

1212
[[bin]]
1313
name = 'pontem'
@@ -17,79 +17,79 @@ path = "src/main.rs"
1717
targets = ['x86_64-unknown-linux-gnu']
1818

1919
[build-dependencies]
20-
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
20+
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
2121
stdlib-fetch = { path = "../utils/stdlib-fetch" }
2222

2323
[dependencies]
2424
async-io = "1.3"
2525
futures = { version = "0.3.1", features = ["compat"] }
2626
jsonrpc-core = '18.0'
2727
serde_json = '1.0'
28-
structopt = '0.3.8'
29-
codec = { package = 'parity-scale-codec', version = '2.3.1' }
28+
clap = { version = "3.1.6", features = ["derive"] }
29+
codec = { package = 'parity-scale-codec', version = '3.0.0' }
3030
log = "0.4"
3131
serde = { version = "1.0", features = ["derive"] }
3232

3333
# Substrate dependencies
34-
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
35-
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
36-
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
37-
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
38-
substrate-prometheus-endpoint = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
34+
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
35+
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
36+
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
37+
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
38+
substrate-prometheus-endpoint = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
3939

4040
# Substarte Client Dependencies
41-
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
42-
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16', features = ['wasmtime'] }
43-
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
44-
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
45-
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16', features = ['wasmtime'] }
46-
sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
47-
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
48-
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
49-
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
50-
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16', features = ['wasmtime'] }
51-
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
52-
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
53-
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
54-
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
55-
sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
56-
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
57-
sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
41+
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
42+
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] }
43+
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
44+
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
45+
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] }
46+
sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
47+
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
48+
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
49+
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
50+
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] }
51+
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
52+
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
53+
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
54+
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
55+
sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
56+
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
57+
sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
5858

5959
# Substrate Primitive Dependencies
60-
sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
61-
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
62-
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
63-
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
64-
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
65-
sp-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
66-
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
67-
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
68-
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
69-
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
70-
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
71-
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
72-
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
60+
sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
61+
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
62+
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
63+
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
64+
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
65+
sp-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
66+
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
67+
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
68+
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
69+
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
70+
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
71+
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
72+
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
7373

7474
# Nimbus dependencies
75-
nimbus-primitives = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.16' }
76-
nimbus-consensus = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.16' }
75+
nimbus-primitives = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.18' }
76+
nimbus-consensus = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.18' }
7777

7878
# Cumulus dependencies
79-
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.16' }
80-
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.16' }
81-
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
82-
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
83-
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
84-
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
85-
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
86-
cumulus-relay-chain-local = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
87-
cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
79+
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.18' }
80+
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.18' }
81+
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
82+
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
83+
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
84+
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
85+
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
86+
cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
87+
cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
8888

8989
# Polkadot dependencies
90-
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16' }
91-
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16' }
92-
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16' }
90+
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18' }
91+
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18' }
92+
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18' }
9393

9494
flume = "0.10.9"
9595

@@ -109,12 +109,12 @@ constants = { path = "../constants" }
109109
#
110110
# ** Don't enable relay chains you don't need, as this is a **very** heavy build for no reason**
111111
# More info: https://github.com/paritytech/polkadot/pull/3189
112-
polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16', features = ["kusama-native"] }
112+
polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18', features = ["kusama-native"] }
113113

114114
[dependencies.move-vm]
115115
package = "mvm"
116116
git = "https://github.com/pontem-network/sp-move-vm.git"
117-
rev = "c8ac6f91c7ec95e62afa3ee9ef9884eec113511c"
117+
rev = "c922f60b747bfba0d0f01ab77bd3091d3e43454c"
118118
default-features = false
119119
features = [ "move_stdlib" ]
120120

node/src/chain_spec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use pontem_runtime::{
1010
GenesisConfig, SudoConfig, SystemConfig, BalancesConfig, WASM_BINARY, ParachainInfoConfig,
1111
VestingConfig, MvmConfig, TransactionPauseConfig, ParachainStakingConfig, InflationInfo,
1212
Range, AuthorFilterConfig, AuthorMappingConfig, TreasuryConfig, TokensConfig,
13-
DemocracyConfig, PolkadotXcmConfig,
13+
DemocracyConfig, PolkadotXcmConfig, EligibilityValue,
1414
};
1515
use primitives::{currency::CurrencyId, AccountId, Signature, Balance, BlockNumber};
1616
use constants::SS58_PREFIX;
@@ -774,7 +774,7 @@ fn genesis(
774774
inflation_config: pontem_inflation_config(),
775775
},
776776
author_filter: AuthorFilterConfig {
777-
eligible_ratio: sp_runtime::Percent::from_percent(50),
777+
eligible_count: EligibilityValue::new_unchecked(50),
778778
},
779779
author_mapping: AuthorMappingConfig {
780780
mappings: candidates

node/src/cli.rs

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use structopt::StructOpt;
1+
use clap::Parser as Clap;
22
use std::path::PathBuf;
33
use sc_cli::SubstrateCli;
44

@@ -26,38 +26,39 @@ impl std::str::FromStr for Sealing {
2626
}
2727
}
2828

29-
#[derive(Debug, StructOpt)]
29+
#[derive(Debug, Clap)]
3030
pub struct Cli {
31-
#[structopt(subcommand)]
31+
#[clap(subcommand)]
3232
pub subcommand: Option<Subcommand>,
3333

34-
#[structopt(flatten)]
34+
#[clap(flatten)]
3535
pub run: cumulus_client_cli::RunCmd,
3636

3737
/// Sealing mode for --dev-service
38-
#[structopt(long, default_value = "instant")]
38+
#[clap(long, default_value = "instant")]
3939
pub sealing: Sealing,
4040

4141
/// Whether to run node in development node (single node, no consensus)
42-
#[structopt(long)]
42+
#[clap(long)]
4343
pub dev_service: bool,
4444

4545
/// Relaychain arguments
46-
#[structopt(raw = true)]
46+
#[clap(raw = true)]
4747
pub relaychain_args: Vec<String>,
4848
}
4949

50-
#[derive(Debug, StructOpt)]
50+
#[derive(Debug, Clap)]
5151
pub enum Subcommand {
5252
/// Export the genesis state of the parachain.
53-
#[structopt(name = "export-genesis-state")]
53+
#[clap(name = "export-genesis-state")]
5454
ExportGenesisState(ExportGenesisStateCommand),
5555

5656
/// Export the genesis wasm of the parachain.
57-
#[structopt(name = "export-genesis-wasm")]
57+
#[clap(name = "export-genesis-wasm")]
5858
ExportGenesisWasm(ExportGenesisWasmCommand),
5959

6060
/// Key management cli utilities
61+
#[clap(subcommand)]
6162
Key(sc_cli::KeySubcommand),
6263
/// Build a chain specification.
6364
BuildSpec(sc_cli::BuildSpecCmd),
@@ -81,39 +82,39 @@ pub enum Subcommand {
8182
Revert(sc_cli::RevertCmd),
8283

8384
/// The custom benchmark subcommmand benchmarking runtime pallets.
84-
#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
85+
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
8586
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
8687
}
8788

8889
/// Command for exporting the genesis state of the parachain
89-
#[derive(Debug, StructOpt)]
90+
#[derive(Debug, Clap)]
9091
pub struct ExportGenesisStateCommand {
9192
/// Output file name or stdout if unspecified.
92-
#[structopt(parse(from_os_str))]
93+
#[clap(parse(from_os_str))]
9394
pub output: Option<PathBuf>,
9495

9596
/// Write output in binary. Default is to write in hex.
96-
#[structopt(short, long)]
97+
#[clap(short, long)]
9798
pub raw: bool,
9899

99100
/// The name of the chain for that the genesis state should be exported.
100-
#[structopt(long)]
101+
#[clap(long)]
101102
pub chain: Option<String>,
102103
}
103104

104105
/// Command for exporting the genesis wasm file.
105-
#[derive(Debug, StructOpt)]
106+
#[derive(Debug, Clap)]
106107
pub struct ExportGenesisWasmCommand {
107108
/// Output file name or stdout if unspecified.
108-
#[structopt(parse(from_os_str))]
109+
#[clap(parse(from_os_str))]
109110
pub output: Option<PathBuf>,
110111

111112
/// Write output in binary. Default is to write in hex.
112-
#[structopt(short, long)]
113+
#[clap(short, long)]
113114
pub raw: bool,
114115

115116
/// The name of the chain for that the genesis wasm file should be exported.
116-
#[structopt(long)]
117+
#[clap(long)]
117118
pub chain: Option<String>,
118119
}
119120

@@ -145,7 +146,7 @@ impl RelayChainCli {
145146
Self {
146147
base_path,
147148
chain_id,
148-
base: polkadot_cli::RunCmd::from_iter(args),
149+
base: polkadot_cli::RunCmd::parse_from(args),
149150
}
150151
}
151152
}

0 commit comments

Comments
 (0)