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.17 #120

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
3,324 changes: 1,931 additions & 1,393 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ members = [
"bin/node-prep/executor",
"bin/node-dev",

"runtime/jupiter",
"runtime/jupiter-prep",
"runtime/jupiter-dev",
"runtime/jupiter",
"runtime/jupiter-prep",
"runtime/jupiter-dev",

"primitives",
"primitives/chain-extension",
Expand All @@ -18,7 +18,6 @@ members = [
"pallets/currencies",
"rpc",
]
exclude = ["vendor/substrate"]

[profile.release]
panic = "unwind"
43 changes: 22 additions & 21 deletions bin/node-dev/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,38 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.9"
log = "0.4.8"
structopt = "0.3.8"
clap = { version = "3.0", features = ["derive"] }
parking_lot = "0.11"
serde_json = "1.0"
serde = { version = "1.0.136", features = ["derive"] }

sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", features = ["wasmtime"] }
sp-core = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-inherents = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus-manual-seal = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-runtime = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }

frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-contracts = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", features = ["wasmtime"] }
sp-core = { version = "5.0.0", 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-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-inherents = { 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-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-consensus-manual-seal = { 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" }
sp-api = { 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-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-telemetry = { 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" }
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" }
pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }

# Jupiter
jupiter-primitives = { path = "../../../primitives" }
jupiter-rpc = { path = "../../../rpc" }
jupiter-dev-runtime = { path = "../../../runtime/jupiter-dev" }

[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.17" }

[features]
runtime-benchmarks = [
Expand Down
44 changes: 27 additions & 17 deletions bin/node-dev/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! Jupiter chain configurations.

use serde_json::json;

use sc_service::ChainType;
use sp_core::{sr25519, Pair, Public};
use sp_runtime::traits::{IdentifyAccount, Verify};
Expand All @@ -10,12 +7,14 @@ use jupiter_dev_runtime::{AccountId, Signature};
use jupiter_dev_runtime::{
BalancesConfig, GenesisConfig, IndicesConfig, SudoConfig, SystemConfig, WASM_BINARY,
};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use serde::{Deserialize, Serialize};

// The URL for the telemetry server.
// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";

/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>;
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>;

/// Generate a crypto pair from seed.
pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
Expand All @@ -34,6 +33,23 @@ where
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
}

/// The extensions for the [`ChainSpec`].
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
#[serde(deny_unknown_fields)]
pub struct Extensions {
/// The relay chain of the Parachain.
pub relay_chain: String,
/// The id of the Parachain.
pub para_id: u32,
}

impl Extensions {
/// Try to get the extension from the given `ChainSpec`.
pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {
sc_chain_spec::get_extension(chain_spec.extensions())
}
}

/// Development testnet config.
pub fn development_config() -> Result<ChainSpec, String> {
let wasm_binary =
Expand Down Expand Up @@ -66,18 +82,12 @@ pub fn development_config() -> Result<ChainSpec, String> {
// Protocol ID
None,
// Properties
Some(
json!({
"ss58Format": 42,
"tokenDecimals": 10,
"tokenSymbol": "DOT"
})
.as_object()
.expect("network properties generation can not fail; qed")
.to_owned(),
),
// Extensions
None,
None,
Extensions {
relay_chain: "rococo-local".into(), // You MUST set this to the correct network!
para_id: 2000,
},
))
}

Expand All @@ -103,7 +113,7 @@ fn testnet_genesis(
indices: IndicesConfig { indices: vec![] },
sudo: SudoConfig {
// Assign network admin rights.
key: root_key,
key: Some(root_key),
},
}
}
15 changes: 8 additions & 7 deletions bin/node-dev/cli/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
use sc_cli::{KeySubcommand, RunCmd, SignCmd, VanityCmd, VerifyCmd};
use structopt::StructOpt;
use clap::Parser;
use sc_cli::{clap, KeySubcommand, RunCmd, SignCmd, VanityCmd, VerifyCmd};

#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
pub struct Cli {
#[structopt(subcommand)]
#[clap(subcommand)]
pub subcommand: Option<Subcommand>,

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

/// Possible subcommands of the main binary.
#[derive(Debug, StructOpt)]
#[derive(Debug, Parser)]
pub enum Subcommand {
/// Key management cli utilities
#[clap(subcommand)]
Key(KeySubcommand),

/// Verify a signature for a message, provided on STDIN, with a given (public or secret) key.
Expand All @@ -29,6 +30,6 @@ pub enum Subcommand {
ExportState(sc_cli::ExportStateCmd),

/// The custom benchmark subcommmand benchmarking runtime pallets.
#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
}
1 change: 1 addition & 0 deletions bin/node-dev/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub fn new_partial(
config.wasm_method,
config.default_heap_pages,
config.max_runtime_instances,
config.runtime_cache_size,
);

let (client, backend, keystore_container, task_manager) =
Expand Down
79 changes: 48 additions & 31 deletions bin/node-prep/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,57 @@ edition = "2021"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
futures = "0.3.4"
clap = { version = "3.1.6", features = ["derive"], optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = { version = "1.0.136", features = ["derive"] }
futures = "0.3.9"
log = "0.4.8"
structopt = "0.3.8"
#clap = { version = "3.0", features = ["derive"] }
parking_lot = "0.11"
serde_json = "1.0"
hex-literal = "0.3.1"

sc-authority-discovery = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-network = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-consensus-uncles = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
#pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-authority-discovery = { 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-basic-authorship = { 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-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sc-consensus-aura = { 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-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
grandpa = { git = "https://github.com/paritytech/substrate", package = "sc-finality-grandpa", branch = "polkadot-v0.9.17" }
sc-client-api = { 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-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }

sp-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-authorship = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-core = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-inherents = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-finality-grandpa = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-runtime = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-core = { version = "5.0.0", 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-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-consensus-babe = { 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-finality-grandpa = { git = "https://github.com/paritytech/substrate", package = "sp-finality-grandpa", branch = "polkadot-v0.9.17" }
grandpa-primitives = { git = "https://github.com/paritytech/substrate", package = "sp-finality-grandpa", branch = "polkadot-v0.9.17" }
sp-runtime = { 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-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }

sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", optional = true }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", optional = true }

pallet-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-im-online = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-contracts = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
pallet-mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }

jupiter-primitives = { path = "../../../primitives" }
jupiter-runtime-common = { path = "../../../runtime/common" }
Expand All @@ -54,13 +67,17 @@ jupiter-rpc = { path = "../../../rpc" }
jupiter-runtime = { package = "jupiter-prep-runtime", path = "../../../runtime/jupiter-prep" }

[build-dependencies]
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
clap = { version = "3.1.6", optional = true }
clap_complete = { version = "3.0", optional = true }
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }

[features]
default = ["cli"]
cli = [
"sc-cli",
"sc-service/db",
"clap",
"clap_complete",
"jupiter-executor/wasmi-errno",
]
wasmtime = [
Expand Down
Loading