Skip to content
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
4,663 changes: 2,449 additions & 2,214 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ git clone https://github.com/paritytech/polkadot.git
cd polkadot

# Checkout the proper commit
git checkout v0.9.17
git checkout v0.9.22

# Build the relay chain Node
cargo build --release
Expand Down
110 changes: 57 additions & 53 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build = "build.rs"
targets = ["x86_64-unknown-linux-gnu"]

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

[[bin]]
name = "egg-collator"
Expand All @@ -28,20 +28,20 @@ rococo-native = [
[dependencies]
derive_more = "0.99.2"
log = "0.4.14"
codec = { package = "parity-scale-codec", version = "2.0.0" }
codec = { package = "parity-scale-codec", version = "3" }
structopt = "0.3.8"
serde = { version = "1.0.119", features = ["derive"] }
hex-literal = "0.3.1"
clap = { version = "3.1", features = ["derive"] }

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

# Local Dependencies
egg-runtime = { path = "../runtime" }
dkg-runtime-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git" }
dkg-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git" }
dkg-gadget = { git = "https://github.com/webb-tools/dkg-substrate.git" }
dkg-runtime-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git", branch = "async" }
dkg-primitives = { git = "https://github.com/webb-tools/dkg-substrate.git", branch = "async" }
dkg-gadget = { git = "https://github.com/webb-tools/dkg-substrate.git", branch = "async" }

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

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

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

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

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

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

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

# Polkadot dependencies
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.17"}
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.22"}
1 change: 1 addition & 0 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ fn testnet_genesis(
balances: egg_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, MILLIUNIT * 4096_000)).collect(),
},
indices: Default::default(),
parachain_info: egg_runtime::ParachainInfoConfig { parachain_id: id },
collator_selection: egg_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _, _)| acc).collect(),
Expand Down
50 changes: 26 additions & 24 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@

use crate::chain_spec;
use clap::Parser;
use cumulus_client_cli;
use sc_cli::{self, KeySubcommand};
use std::path::PathBuf;

/// Sub-commands supported by the collator.
#[derive(Debug, clap::Parser)]
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Export the genesis state of the parachain.
#[clap(name = "export-genesis-state")]
Expand All @@ -29,10 +27,6 @@ pub enum Subcommand {
#[clap(name = "export-genesis-wasm")]
ExportGenesisWasm(ExportGenesisWasmCommand),

/// Key management cli utilities
#[clap(subcommand)]
Key(KeySubcommand),

/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),

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

/// The custom benchmark subcommmand benchmarking runtime pallets.
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[clap(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// Try some testing command against a specified runtime state.
TryRuntime(try_runtime_cli::TryRuntimeCmd),
}

/// Command for exporting the genesis state of the parachain
#[derive(Debug, clap::Parser)]
#[derive(Debug, Parser)]
pub struct ExportGenesisStateCommand {
/// Output file name or stdout if unspecified.
#[clap(parse(from_os_str))]
pub output: Option<PathBuf>,

/// Id of the parachain this state is for.
///
/// Default: 100
#[clap(long, conflicts_with = "chain")]
pub parachain_id: Option<u32>,

/// Write output in binary. Default is to write in hex.
#[clap(short, long)]
pub raw: bool,

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

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

#[derive(Debug, clap::Parser)]
#[clap(settings = &[
clap::AppSettings::GlobalVersion,
clap::AppSettings::ArgsNegateSubcommands,
clap::AppSettings::SubcommandsNegateReqs,
])]
#[derive(Debug, Parser)]
#[clap(
propagate_version = true,
args_conflicts_with_subcommands = true,
subcommand_negates_reqs = true
)]
pub struct Cli {
#[clap(subcommand)]
pub subcommand: Option<Subcommand>,

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

/// Disable automatic hardware benchmarks.
///
/// By default these benchmarks are automatically ran at startup and measure
/// the CPU speed, the memory bandwidth and the disk speed.
///
/// The results are then printed out in the logs, and also sent as part of
/// telemetry, if telemetry is enabled.
#[clap(long)]
pub no_hardware_benchmarks: bool,

/// Relay chain arguments
#[clap(raw = true)]
pub relay_chain_args: Vec<String>,
Expand Down
Loading