Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to polkadot v0.9.26 #646

Merged
merged 31 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d67609b
upgrade to Polkadot-v0.9.25
Jul 12, 2022
509f60f
code migartion
Jul 14, 2022
99a9426
upgrade to Polkadot-v0.9.25
Jul 12, 2022
e96d340
code migartion
Jul 14, 2022
7090b56
merge to upstream master
Jul 15, 2022
fb80523
merge to upstream master
Jul 15, 2022
ffb4b42
upgrade to Polkadot-v0.9.25
Jul 12, 2022
d5695db
code migartion
Jul 14, 2022
39692cf
merge to upstream master
Jul 15, 2022
790b57e
upgrade to Polkadot-v0.9.25
Jul 12, 2022
7346c18
code migartion
Jul 14, 2022
3ed71e1
merge to upstream
Jul 18, 2022
198693a
merge to upstream
Jul 18, 2022
900ab5f
align node folder to cumulus parachain-template
Jul 20, 2022
b1ff1f1
Merge remote-tracking branch 'upstream/master' into shamb0/upgrade-po…
Jul 20, 2022
c33d9e9
node cleanup
Jul 22, 2022
2441bde
merge to upstream master
Jul 25, 2022
d3fbe22
migration changes
Jul 25, 2022
4f3c328
migration changes
Jul 26, 2022
1f484a4
migration changes
Jul 26, 2022
1b25187
migration changes
Jul 26, 2022
8cc707d
migration changes
Jul 26, 2022
057bd60
Merge branch 'shamb0/upgrade-polkadot-v0.9.25' into shamb0/upgrade-po…
Jul 27, 2022
1dd16ac
upgrade to polkadot v0.9.25
Jul 28, 2022
456ea1d
remove dead code
rajesh-nodle Jul 28, 2022
bde700a
Update node/src/rpc.rs
rajesh-nodle Jul 29, 2022
4f4a77a
make codecov happy
Aug 1, 2022
959786e
Merge branch 'shamb0/upgrade-polkadot-v0.9.26' of https://github.com/…
Aug 1, 2022
e6e76e8
upstream merger
Aug 1, 2022
b6a1663
Merge branch 'master' into shamb0/upgrade-polkadot-v0.9.26
aliXsed Aug 2, 2022
315f22c
fix: previous merge issue
aliXsed Aug 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3,852 changes: 1,679 additions & 2,173 deletions Cargo.lock

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ version = "2.0.21"
targets = ["x86_64-unknown-linux-gnu"]

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

[[bin]]
name = "nodle-parachain"
path = "src/main.rs"

[features]
runtime-benchmarks = [
"frame-benchmarking",
"runtime-eden/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
]
Expand All @@ -32,73 +31,74 @@ serde = { version = "1.0.132", features = ["derive"] }
hex-literal = "0.3.4"

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

# Local Dependencies
runtime-eden = { path = "../runtimes/eden" }
primitives = { version = "2.0.17", path = "../primitives" }

# Substrate Dependencies
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.20", optional = true }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.20" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.20" }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" }

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

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

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

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

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

# Polkadot dependencies
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.20" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.20" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.20" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.20" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.20" }
polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.26" }
12 changes: 9 additions & 3 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use serde::{Deserialize, Serialize};
use sp_core::{sr25519, Pair, Public};
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::{
bounded_vec,
traits::{IdentifyAccount, Verify},
BoundedVec,
};

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>;
Expand Down Expand Up @@ -106,6 +110,8 @@ fn eden_testnet_genesis(

const ENDOWMENT: Balance = 10_000 * NODL;

let validator_members: Vec<AccountId> = collators.iter().map(|x| x.0.clone()).collect();

GenesisConfig {
// Core
system: SystemConfig {
Expand All @@ -120,7 +126,7 @@ fn eden_testnet_genesis(

// Consensus
validators_set: ValidatorsSetConfig {
members: collators.iter().map(|x| x.0.clone()).collect::<Vec<_>>(),
members: BoundedVec::try_from(validator_members).expect("Couldbe Max Overflow"),
rajesh-nodle marked this conversation as resolved.
Show resolved Hide resolved
rajesh-nodle marked this conversation as resolved.
Show resolved Hide resolved
phantom: Default::default(),
},
session: SessionConfig {
Expand All @@ -147,7 +153,7 @@ fn eden_testnet_genesis(
usa_reserve: Default::default(),
technical_committee: Default::default(),
technical_membership: TechnicalMembershipConfig {
members: vec![root_key],
members: bounded_vec![root_key],
phantom: Default::default(),
},

Expand Down
74 changes: 27 additions & 47 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@
*/

use crate::chain_spec;
use clap::Parser;

use std::path::PathBuf;

/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Export the genesis state of the parachain.
#[clap(name = "export-genesis-state")]
ExportGenesisState(ExportGenesisStateCommand),

/// Export the genesis wasm of the parachain.
#[clap(name = "export-genesis-wasm")]
ExportGenesisWasm(ExportGenesisWasmCommand),
/// Key management CLI utilities
#[clap(subcommand)]
Key(sc_cli::KeySubcommand),

/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),
Expand All @@ -47,53 +42,28 @@ pub enum Subcommand {
/// Import blocks.
ImportBlocks(sc_cli::ImportBlocksCmd),

/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),

/// Remove the whole chain.
PurgeChain(cumulus_client_cli::PurgeChainCmd),

/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),
/// Export the genesis state of the parachain.
ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand),

/// Export the genesis wasm of the parachain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),

/// The custom benchmark subcommmand benchmarking 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, Parser)]
pub struct ExportGenesisStateCommand {
/// Output file name or stdout if unspecified.
#[clap(parse(from_os_str))]
pub output: Option<PathBuf>,

/// 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)]
pub chain: Option<String>,
}

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

/// 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 wasm file should be exported.
#[clap(long)]
pub chain: Option<String>,
}

#[derive(Debug, Parser)]
#[derive(Debug, clap::Parser)]
#[clap(
propagate_version = true,
args_conflicts_with_subcommands = true,
Expand All @@ -106,9 +76,19 @@ pub struct Cli {
#[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>,
#[clap(raw = true, conflicts_with = "relay-chain-rpc-url")]
pub relaychain_args: Vec<String>,
}

#[derive(Debug)]
Expand All @@ -135,7 +115,7 @@ impl RelayChainCli {
Self {
base_path,
chain_id,
base: polkadot_cli::RunCmd::parse_from(relay_chain_args),
base: clap::Parser::parse_from(relay_chain_args),
}
}
}