Skip to content

Commit ebe7427

Browse files
authored
Merge pull request #7 from webb-tools/async
2 parents 0236dc5 + b842d3f commit ebe7427

32 files changed

+3855
-3222
lines changed

Cargo.lock

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ git clone https://github.com/paritytech/polkadot.git
225225
cd polkadot
226226

227227
# Checkout the proper commit
228-
git checkout v0.9.17
228+
git checkout v0.9.22
229229

230230
# Build the relay chain Node
231231
cargo build --release

node/Cargo.toml

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build = "build.rs"
1313
targets = ["x86_64-unknown-linux-gnu"]
1414

1515
[build-dependencies]
16-
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
16+
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
1717

1818
[[bin]]
1919
name = "egg-collator"
@@ -28,20 +28,20 @@ rococo-native = [
2828
[dependencies]
2929
derive_more = "0.99.2"
3030
log = "0.4.14"
31-
codec = { package = "parity-scale-codec", version = "2.0.0" }
31+
codec = { package = "parity-scale-codec", version = "3" }
3232
structopt = "0.3.8"
3333
serde = { version = "1.0.119", features = ["derive"] }
3434
hex-literal = "0.3.1"
3535
clap = { version = "3.1", features = ["derive"] }
3636

3737
# RPC related Dependencies
38-
jsonrpc-core = "18.0.0"
38+
jsonrpsee = { version = "0.13.0", features = ["server"] }
3939

4040
# Local Dependencies
4141
egg-runtime = { path = "../runtime" }
42-
dkg-runtime-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git" }
43-
dkg-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git" }
44-
dkg-gadget = { git = "https://github.com/webb-tools/dkg-substrate.git" }
42+
dkg-runtime-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git", branch = "async" }
43+
dkg-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git", branch = "async" }
44+
dkg-gadget = { git = "https://github.com/webb-tools/dkg-substrate.git", branch = "async" }
4545

4646
# Arkworks
4747
arkworks-setups = { version = "1.0.0", features = ["r1cs"], default-features = false }
@@ -50,60 +50,64 @@ ark-serialize = { version = "^0.3.0", default-features = false }
5050
ark-bn254 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
5151

5252
# Substrate Dependencies
53-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
54-
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
53+
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
54+
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
5555

56-
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
56+
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
5757

58-
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
59-
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
58+
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
59+
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
6060

6161
## Substrate Client Dependencies
62-
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
63-
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
64-
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
65-
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
66-
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
67-
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
68-
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
69-
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
70-
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
71-
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
72-
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", features = ["wasmtime"] }
73-
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
74-
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
75-
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
62+
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
63+
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
64+
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
65+
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
66+
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
67+
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
68+
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
69+
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
70+
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
71+
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
72+
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22", features = ["wasmtime"] }
73+
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
74+
sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
75+
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
76+
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
77+
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
78+
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
7679

7780
## Substrate Primitive Dependencies
78-
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
79-
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
80-
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
81-
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
82-
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
83-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
84-
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
85-
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
86-
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
87-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
88-
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
89-
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
90-
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
81+
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
82+
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
83+
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
84+
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
85+
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
86+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
87+
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
88+
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
89+
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
90+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
91+
sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
92+
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
93+
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
9194

9295
# Cumulus dependencies
93-
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
94-
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
95-
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
96-
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
97-
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
98-
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
99-
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
100-
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
101-
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
102-
cumulus-relay-chain-local = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.17" }
96+
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
97+
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
98+
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
99+
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
100+
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
101+
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
102+
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
103+
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
104+
cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
105+
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
106+
cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.22"}
103107

104108
# Polkadot dependencies
105-
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
106-
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
107-
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
108-
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
109-
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
109+
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
110+
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
111+
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
112+
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
113+
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}

node/src/chain_spec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ fn testnet_genesis(
292292
balances: egg_runtime::BalancesConfig {
293293
balances: endowed_accounts.iter().cloned().map(|k| (k, MILLIUNIT * 4096_000)).collect(),
294294
},
295+
indices: Default::default(),
295296
parachain_info: egg_runtime::ParachainInfoConfig { parachain_id: id },
296297
collator_selection: egg_runtime::CollatorSelectionConfig {
297298
invulnerables: invulnerables.iter().cloned().map(|(acc, _, _)| acc).collect(),

node/src/cli.rs

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@
1414

1515
use crate::chain_spec;
1616
use clap::Parser;
17-
use cumulus_client_cli;
18-
use sc_cli::{self, KeySubcommand};
1917
use std::path::PathBuf;
2018

2119
/// Sub-commands supported by the collator.
22-
#[derive(Debug, clap::Parser)]
20+
#[derive(Debug, clap::Subcommand)]
2321
pub enum Subcommand {
2422
/// Export the genesis state of the parachain.
2523
#[clap(name = "export-genesis-state")]
@@ -29,10 +27,6 @@ pub enum Subcommand {
2927
#[clap(name = "export-genesis-wasm")]
3028
ExportGenesisWasm(ExportGenesisWasmCommand),
3129

32-
/// Key management cli utilities
33-
#[clap(subcommand)]
34-
Key(KeySubcommand),
35-
3630
/// Build a chain specification.
3731
BuildSpec(sc_cli::BuildSpecCmd),
3832

@@ -54,35 +48,33 @@ pub enum Subcommand {
5448
/// Revert the chain to a previous state.
5549
Revert(sc_cli::RevertCmd),
5650

57-
/// The custom benchmark subcommmand benchmarking runtime pallets.
58-
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
51+
/// Sub-commands concerned with benchmarking.
52+
/// The pallet benchmarking moved to the `pallet` sub-command.
53+
#[clap(subcommand)]
5954
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
55+
56+
/// Try some testing command against a specified runtime state.
57+
TryRuntime(try_runtime_cli::TryRuntimeCmd),
6058
}
6159

6260
/// Command for exporting the genesis state of the parachain
63-
#[derive(Debug, clap::Parser)]
61+
#[derive(Debug, Parser)]
6462
pub struct ExportGenesisStateCommand {
6563
/// Output file name or stdout if unspecified.
6664
#[clap(parse(from_os_str))]
6765
pub output: Option<PathBuf>,
6866

69-
/// Id of the parachain this state is for.
70-
///
71-
/// Default: 100
72-
#[clap(long, conflicts_with = "chain")]
73-
pub parachain_id: Option<u32>,
74-
7567
/// Write output in binary. Default is to write in hex.
7668
#[clap(short, long)]
7769
pub raw: bool,
7870

7971
/// The name of the chain for that the genesis state should be exported.
80-
#[clap(long, conflicts_with = "parachain-id")]
72+
#[clap(long)]
8173
pub chain: Option<String>,
8274
}
8375

8476
/// Command for exporting the genesis wasm file.
85-
#[derive(Debug, clap::Parser)]
77+
#[derive(Debug, Parser)]
8678
pub struct ExportGenesisWasmCommand {
8779
/// Output file name or stdout if unspecified.
8880
#[clap(parse(from_os_str))]
@@ -97,19 +89,29 @@ pub struct ExportGenesisWasmCommand {
9789
pub chain: Option<String>,
9890
}
9991

100-
#[derive(Debug, clap::Parser)]
101-
#[clap(settings = &[
102-
clap::AppSettings::GlobalVersion,
103-
clap::AppSettings::ArgsNegateSubcommands,
104-
clap::AppSettings::SubcommandsNegateReqs,
105-
])]
92+
#[derive(Debug, Parser)]
93+
#[clap(
94+
propagate_version = true,
95+
args_conflicts_with_subcommands = true,
96+
subcommand_negates_reqs = true
97+
)]
10698
pub struct Cli {
10799
#[clap(subcommand)]
108100
pub subcommand: Option<Subcommand>,
109101

110102
#[clap(flatten)]
111103
pub run: cumulus_client_cli::RunCmd,
112104

105+
/// Disable automatic hardware benchmarks.
106+
///
107+
/// By default these benchmarks are automatically ran at startup and measure
108+
/// the CPU speed, the memory bandwidth and the disk speed.
109+
///
110+
/// The results are then printed out in the logs, and also sent as part of
111+
/// telemetry, if telemetry is enabled.
112+
#[clap(long)]
113+
pub no_hardware_benchmarks: bool,
114+
113115
/// Relay chain arguments
114116
#[clap(raw = true)]
115117
pub relay_chain_args: Vec<String>,

0 commit comments

Comments
 (0)