From 56842443297ab959822ffae4c1a2f31a04c3725b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 20 Sep 2023 15:37:14 +0100 Subject: [PATCH 01/53] Adds chain spec generator --- Cargo.lock | 97 +++- Cargo.toml | 1 + chain-spec-generator/Cargo.toml | 29 ++ chain-spec-generator/src/main.rs | 48 ++ chain-spec-generator/src/relay_chain_specs.rs | 474 ++++++++++++++++++ 5 files changed, 643 insertions(+), 6 deletions(-) create mode 100644 chain-spec-generator/Cargo.toml create mode 100644 chain-spec-generator/src/main.rs create mode 100644 chain-spec-generator/src/relay_chain_specs.rs diff --git a/Cargo.lock b/Cargo.lock index c9865981cf..505978728e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1516,6 +1516,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "chain-spec-generator" +version = "1.0.0" +dependencies = [ + "clap", + "hex-literal", + "kusama-runtime-constants 1.0.0", + "pallet-im-online", + "pallet-staking", + "polkadot-primitives", + "polkadot-runtime", + "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-parachains", + "sc-chain-spec", + "sc-consensus-grandpa", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "staging-kusama-runtime", +] + [[package]] name = "chrono" version = "0.4.27" @@ -1594,9 +1618,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", @@ -1604,9 +1628,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", @@ -9229,6 +9253,48 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-grandpa" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc9029e051a1ff62dff58219ca654ebecc669e3746cf4a0bc1515f96c2220c9b" +dependencies = [ + "ahash 0.8.3", + "array-bytes", + "async-trait", + "dyn-clone", + "finality-grandpa", + "fork-tree", + "futures", + "futures-timer", + "log", + "parity-scale-codec", + "parking_lot 0.12.1", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + [[package]] name = "sc-executor" version = "0.27.0" @@ -9396,6 +9462,25 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "sc-network-gossip" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "596fa23e269e218a5cbd9928fa1df30c46fbf9f04cdcf0cbd6549c47e952ad77" +dependencies = [ + "ahash 0.8.3", + "futures", + "futures-timer", + "libp2p", + "log", + "sc-network", + "sc-network-common", + "schnellru", + "sp-runtime", + "substrate-prometheus-endpoint", + "tracing", +] + [[package]] name = "sc-network-light" version = "0.28.0" @@ -10026,9 +10111,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index ae60da4073..0403703dd9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ license = "GPL-3.0-only" # TODO Result<(), String> { + let cli = Cli::parse(); + + let supported_chains = + HashMap::<_, Box Result, String>>>::from([ + ( + "polkadot-dev", + Box::new(|| relay_chain_specs::polkadot_development_config()) as Box<_>, + ), + ( + "polkadot-local", + Box::new(|| relay_chain_specs::polkadot_local_testnet_config()) as Box<_>, + ), + ("kusama-dev", Box::new(|| relay_chain_specs::kusama_development_config()) as Box<_>), + ( + "kusama-local", + Box::new(|| relay_chain_specs::kusama_local_testnet_config()) as Box<_>, + ), + ]); + + if let Some(function) = supported_chains.get(&*cli.chain) { + let chain_spec = (*function)()?.as_json(cli.raw)?; + print!("{chain_spec}"); + Ok(()) + } else { + let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { + let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); + format!("{c}{k}{extra}") + }); + Err(format!("Unknown chain, only supported: {supported}")) + } +} diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs new file mode 100644 index 0000000000..6ebb8b4ee7 --- /dev/null +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -0,0 +1,474 @@ +use kusama_runtime_constants::currency::UNITS as KSM; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use pallet_staking::Forcing; +use polkadot_primitives::{AccountId, AccountPublic, AssignmentId, ValidatorId}; +use polkadot_runtime_constants::currency::UNITS as DOT; +use polkadot_runtime_parachains::configuration::HostConfiguration; +use sc_chain_spec::{ChainSpec, ChainType, NoExtension}; +use sc_consensus_grandpa::AuthorityId as GrandpaId; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::{traits::IdentifyAccount, Perbill}; + +pub type PolkadotChainSpec = + sc_chain_spec::GenericChainSpec; + +pub type KusamaChainSpec = + sc_chain_spec::GenericChainSpec; + +const DEFAULT_PROTOCOL_ID: &str = "dot"; + +/// Returns the properties for the [`PolkadotChainSpec`]. +pub fn polkadot_chain_spec_properties() -> serde_json::map::Map { + serde_json::json!({ + "tokenDecimals": 10, + }) + .as_object() + .expect("Map given; qed") + .clone() +} + +fn default_parachains_host_configuration() -> HostConfiguration { + use polkadot_primitives::{MAX_CODE_SIZE, MAX_POV_SIZE}; + + polkadot_runtime_parachains::configuration::HostConfiguration { + validation_upgrade_cooldown: 2u32, + validation_upgrade_delay: 2, + code_retention_period: 1200, + max_code_size: MAX_CODE_SIZE, + max_pov_size: MAX_POV_SIZE, + max_head_data_size: 32 * 1024, + group_rotation_frequency: 20, + paras_availability_period: 4, + max_upward_queue_count: 8, + max_upward_queue_size: 1024 * 1024, + max_downward_message_size: 1024 * 1024, + max_upward_message_size: 50 * 1024, + max_upward_message_num_per_candidate: 5, + hrmp_sender_deposit: 0, + hrmp_recipient_deposit: 0, + hrmp_channel_max_capacity: 8, + hrmp_channel_max_total_size: 8 * 1024, + hrmp_max_parachain_inbound_channels: 4, + hrmp_channel_max_message_size: 1024 * 1024, + hrmp_max_parachain_outbound_channels: 4, + hrmp_max_message_num_per_candidate: 5, + dispute_period: 6, + no_show_slots: 2, + n_delay_tranches: 25, + needed_approvals: 2, + relay_vrf_modulo_samples: 2, + zeroth_delay_tranche_width: 0, + minimum_validation_upgrade_delay: 5, + ..Default::default() + } +} + +fn polkadot_session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, +) -> polkadot_runtime::SessionKeys { + polkadot_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + } +} + +fn kusama_session_keys( + babe: BabeId, + grandpa: GrandpaId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, +) -> kusama_runtime::SessionKeys { + kusama_runtime::SessionKeys { + babe, + grandpa, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } +} + +/// Helper function to generate a crypto pair from seed +pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +/// Helper function to generate an account ID from seed +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +/// Helper function to generate stash, controller and session key from seed +pub fn get_authority_keys_from_seed( + seed: &str, +) -> ( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, +) { + let keys = get_authority_keys_from_seed_no_beefy(seed); + (keys.0, keys.1, keys.2, keys.3, keys.4, keys.5, keys.6, keys.7, get_from_seed::(seed)) +} + +/// Helper function to generate stash, controller and session key from seed +pub fn get_authority_keys_from_seed_no_beefy( + seed: &str, +) -> ( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, +) { + ( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + ) +} + +fn testnet_accounts() -> Vec { + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ] +} + +pub fn polkadot_testnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + )>, + _root_key: AccountId, + endowed_accounts: Option>, +) -> polkadot_runtime::RuntimeGenesisConfig { + let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); + + const ENDOWMENT: u128 = 1_000_000 * DOT; + const STASH: u128 = 100 * DOT; + + polkadot_runtime::RuntimeGenesisConfig { + system: polkadot_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, + indices: polkadot_runtime::IndicesConfig { indices: vec![] }, + balances: polkadot_runtime::BalancesConfig { + balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + session: polkadot_runtime::SessionConfig { + keys: initial_authorities + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + polkadot_session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + ), + ) + }) + .collect::>(), + }, + staking: polkadot_runtime::StakingConfig { + minimum_validator_count: 1, + validator_count: initial_authorities.len() as u32, + stakers: initial_authorities + .iter() + .map(|x| { + (x.0.clone(), x.0.clone(), STASH, polkadot_runtime::StakerStatus::Validator) + }) + .collect(), + invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), + force_era: Forcing::NotForcing, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: polkadot_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + grandpa: Default::default(), + im_online: Default::default(), + authority_discovery: polkadot_runtime::AuthorityDiscoveryConfig { + keys: vec![], + ..Default::default() + }, + claims: polkadot_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, + vesting: polkadot_runtime::VestingConfig { vesting: vec![] }, + treasury: Default::default(), + hrmp: Default::default(), + configuration: polkadot_runtime::ConfigurationConfig { + config: default_parachains_host_configuration(), + }, + paras: Default::default(), + xcm_pallet: Default::default(), + nomination_pools: Default::default(), + } +} + +/// Helper function to create kusama `RuntimeGenesisConfig` for testing +pub fn kusama_testnet_genesis( + wasm_binary: &[u8], + initial_authorities: Vec<( + AccountId, + AccountId, + BabeId, + GrandpaId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )>, + _root_key: AccountId, + endowed_accounts: Option>, +) -> kusama_runtime::RuntimeGenesisConfig { + let endowed_accounts: Vec = endowed_accounts.unwrap_or_else(testnet_accounts); + + const ENDOWMENT: u128 = 1_000_000 * KSM; + const STASH: u128 = 100 * KSM; + + kusama_runtime::RuntimeGenesisConfig { + system: kusama_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, + indices: kusama_runtime::IndicesConfig { indices: vec![] }, + balances: kusama_runtime::BalancesConfig { + balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + beefy: Default::default(), + session: kusama_runtime::SessionConfig { + keys: initial_authorities + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + kusama_session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + staking: kusama_runtime::StakingConfig { + minimum_validator_count: 1, + validator_count: initial_authorities.len() as u32, + stakers: initial_authorities + .iter() + .map(|x| (x.0.clone(), x.0.clone(), STASH, kusama_runtime::StakerStatus::Validator)) + .collect(), + invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(), + force_era: Forcing::NotForcing, + slash_reward_fraction: Perbill::from_percent(10), + ..Default::default() + }, + babe: kusama_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + grandpa: Default::default(), + im_online: Default::default(), + authority_discovery: kusama_runtime::AuthorityDiscoveryConfig { + keys: vec![], + ..Default::default() + }, + claims: kusama_runtime::ClaimsConfig { claims: vec![], vesting: vec![] }, + vesting: kusama_runtime::VestingConfig { vesting: vec![] }, + treasury: Default::default(), + hrmp: Default::default(), + configuration: kusama_runtime::ConfigurationConfig { + config: default_parachains_host_configuration(), + }, + paras: Default::default(), + xcm_pallet: Default::default(), + nomination_pools: Default::default(), + nis_counterpart_balances: Default::default(), + } +} + +fn polkadot_development_config_genesis( + wasm_binary: &[u8], +) -> polkadot_runtime::RuntimeGenesisConfig { + polkadot_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed_no_beefy("Alice")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +fn kusama_development_config_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { + kusama_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed("Alice")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +/// Polkadot development config (single validator Alice) +pub fn polkadot_development_config() -> Result, String> { + let wasm_binary = + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; + + Ok(Box::new(PolkadotChainSpec::from_genesis( + "Development", + "polkadot_dev", + ChainType::Development, + move || polkadot_development_config_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + Some(polkadot_chain_spec_properties()), + Default::default(), + ))) +} + +/// Kusama development config (single validator Alice) +pub fn kusama_development_config() -> Result, String> { + let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; + + Ok(Box::new(KusamaChainSpec::from_genesis( + "Development", + "kusama_dev", + ChainType::Development, + move || kusama_development_config_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + None, + Default::default(), + ))) +} + +fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::RuntimeGenesisConfig { + polkadot_testnet_genesis( + wasm_binary, + vec![ + get_authority_keys_from_seed_no_beefy("Alice"), + get_authority_keys_from_seed_no_beefy("Bob"), + ], + get_account_id_from_seed::("Alice"), + None, + ) +} + +/// Polkadot local testnet config (multivalidator Alice + Bob) +pub fn polkadot_local_testnet_config() -> Result, String> { + let wasm_binary = + polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; + + Ok(Box::new(PolkadotChainSpec::from_genesis( + "Local Testnet", + "local_testnet", + ChainType::Local, + move || polkadot_local_testnet_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + Some(polkadot_chain_spec_properties()), + Default::default(), + ))) +} + +fn kusama_local_testnet_genesis(wasm_binary: &[u8]) -> kusama_runtime::RuntimeGenesisConfig { + kusama_testnet_genesis( + wasm_binary, + vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], + get_account_id_from_seed::("Alice"), + None, + ) +} + +/// Kusama local testnet config (multivalidator Alice + Bob) +pub fn kusama_local_testnet_config() -> Result, String> { + let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; + + Ok(Box::new(KusamaChainSpec::from_genesis( + "Kusama Local Testnet", + "kusama_local_testnet", + ChainType::Local, + move || kusama_local_testnet_genesis(wasm_binary), + vec![], + None, + Some(DEFAULT_PROTOCOL_ID), + None, + None, + Default::default(), + ))) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_parachains_host_configuration_is_consistent() { + default_parachains_host_configuration().panic_if_not_consistent(); + } +} From dc17212e5504c9b37707d92c4eafde3a798dbbab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 25 Oct 2023 16:03:48 +0200 Subject: [PATCH 02/53] Enable `derive` feature --- chain-spec-generator/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 66d8e287ee..a627c2ebf7 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -7,7 +7,7 @@ repository.workspace = true license.workspace = true [dependencies] -clap = "4.4.4" +clap = { version = "4.4.4", features = [ "derive" ] } hex-literal = "0.4.1" serde_json = "1.0.107" From 08d8f9410436c5941d2cecaad6856431d6101949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 25 Oct 2023 16:11:23 +0200 Subject: [PATCH 03/53] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52211be6e2..2e921cbde6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +### Added + +- Introduce chain spec generator ([polkadot-fellows/runtimes#78](https://github.com/polkadot-fellows/runtimes/pull/78)) + ## [1.0.0] 22.10.2023 ### Changed From 8e960736c3284638ad8772ca77797f9532f25b77 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Fri, 27 Oct 2023 15:54:02 -0300 Subject: [PATCH 04/53] chain spec generator, load from json (#79) Hi @bkchr, I know that this is temporary tool but in order to create a workaround for zombienet is useful to allow to pass customized plain spec file and get the `raw` one. Thx! --- chain-spec-generator/src/main.rs | 16 +++++++++++----- chain-spec-generator/src/relay_chain_specs.rs | 10 ++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 32af258e12..2c949eccb1 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -39,10 +39,16 @@ fn main() -> Result<(), String> { print!("{chain_spec}"); Ok(()) } else { - let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { - let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); - format!("{c}{k}{extra}") - }); - Err(format!("Unknown chain, only supported: {supported}")) + if cli.chain.ends_with(".json") { + let chain_spec = relay_chain_specs::from_json_file(&cli.chain)?.as_json(cli.raw)?; + print!("{chain_spec}"); + Ok(()) + } else { + let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { + let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); + format!("{c}{k}{extra}") + }); + Err(format!("Unknown chain, only supported: {supported} or a json file")) + } } } diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 6ebb8b4ee7..44c1f0f7d0 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -463,6 +463,16 @@ pub fn kusama_local_testnet_config() -> Result, String> { ))) } +pub fn from_json_file(filepath: &str) -> Result, String> { + let path = std::path::PathBuf::from(&filepath); + let chain_spec = PolkadotChainSpec::from_json_file(path.clone())?; + match chain_spec.id() { + x if x.starts_with("kusama") | x.starts_with("ksm") => + Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), + _ => Ok(Box::new(chain_spec)), + } +} + #[cfg(test)] mod tests { use super::*; From 7fca7651ada71b1632191eb9ef02bfaf36141e1a Mon Sep 17 00:00:00 2001 From: NachoPal Date: Wed, 1 Nov 2023 15:42:55 +0100 Subject: [PATCH 05/53] working for asset-hub-polkadot --- Cargo.lock | 8 + chain-spec-generator/Cargo.toml | 9 + chain-spec-generator/src/common.rs | 54 ++++++ chain-spec-generator/src/main.rs | 16 +- chain-spec-generator/src/relay_chain_specs.rs | 10 -- .../src/system_parachains_specs.rs | 155 ++++++++++++++++++ 6 files changed, 241 insertions(+), 11 deletions(-) create mode 100644 chain-spec-generator/src/common.rs create mode 100644 chain-spec-generator/src/system_parachains_specs.rs diff --git a/Cargo.lock b/Cargo.lock index 505978728e..2114aca00f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1520,17 +1520,24 @@ dependencies = [ name = "chain-spec-generator" version = "1.0.0" dependencies = [ + "asset-hub-kusama-runtime", + "asset-hub-polkadot-runtime", "clap", + "collectives-polkadot-runtime", + "cumulus-primitives-core", "hex-literal", "kusama-runtime-constants 1.0.0", "pallet-im-online", "pallet-staking", + "parachains-common", "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-constants 1.0.0", "polkadot-runtime-parachains", "sc-chain-spec", "sc-consensus-grandpa", + "sc-service", + "serde", "serde_json", "sp-authority-discovery", "sp-consensus-babe", @@ -1538,6 +1545,7 @@ dependencies = [ "sp-core", "sp-runtime", "staging-kusama-runtime", + "staging-xcm", ] [[package]] diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index a627c2ebf7..46de044942 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -10,13 +10,19 @@ license.workspace = true clap = { version = "4.4.4", features = [ "derive" ] } hex-literal = "0.4.1" serde_json = "1.0.107" +serde = { version = "1.0.188", features = ["derive"] } polkadot-runtime = { path = "../relay/polkadot" } polkadot-runtime-constants = { path = "../relay/polkadot/constants" } kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" } kusama-runtime-constants = { path = "../relay/kusama/constants" } +asset-hub-polkadot-runtime = { path = "../system-parachains/asset-hubs/asset-hub-polkadot" } +asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-kusama" } +collectives-polkadot-runtime = { path = "../system-parachains/collectives/collectives-polkadot" } + sc-chain-spec = "22.0.0" +sc-service = "0.30.0" polkadot-runtime-parachains = "2.0.0" polkadot-primitives = "2.0.0" sp-consensus-babe = "0.27.0" @@ -27,3 +33,6 @@ sc-consensus-grandpa = "0.14.0" pallet-im-online = "22.0.0" sp-runtime = "26.0.0" sp-consensus-beefy = "8.0.0" +xcm = { package = "staging-xcm", version = "2.0.1" } +parachains-common = { version = "2.0.0" } +cumulus-primitives-core = { version = "0.2.0" } diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs new file mode 100644 index 0000000000..07564cdca5 --- /dev/null +++ b/chain-spec-generator/src/common.rs @@ -0,0 +1,54 @@ +use crate::{ + ChainSpec, + relay_chain_specs::{PolkadotChainSpec, KusamaChainSpec}, + system_parachains_specs::{AssetHubPolkadotChainSpec}, +}; +use polkadot_primitives::{AccountId, AccountPublic}; +use sp_core::{sr25519, Pair, Public}; +use sp_runtime::traits::IdentifyAccount; + +pub fn testnet_accounts() -> Vec { + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + ] +} + +/// Helper function to generate a crypto pair from seed +pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() +} + +/// Helper function to generate an account ID from seed +pub fn get_account_id_from_seed(seed: &str) -> AccountId +where + AccountPublic: From<::Public>, +{ + AccountPublic::from(get_from_seed::(seed)).into_account() +} + +pub fn from_json_file(filepath: &str) -> Result, String> { + let path = std::path::PathBuf::from(&filepath); + let chain_spec = PolkadotChainSpec::from_json_file(path.clone())?; + match chain_spec.id() { + x if x.starts_with("polkadot") | x.starts_with("dot") => + Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("kusama") | x.starts_with("ksm") => + Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("asset-hub-polkadot") | x.starts_with("ksm") => + Ok(Box::new(AssetHubPolkadotChainSpec::from_json_file(path)?)), + _ => Ok(Box::new(chain_spec)), + } +} diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 2c949eccb1..96034a726d 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -3,6 +3,8 @@ use sc_chain_spec::ChainSpec; use std::collections::HashMap; mod relay_chain_specs; +mod system_parachains_specs; +mod common; #[derive(Parser)] struct Cli { @@ -32,6 +34,18 @@ fn main() -> Result<(), String> { "kusama-local", Box::new(|| relay_chain_specs::kusama_local_testnet_config()) as Box<_>, ), + // ( + // "asset-hub-kusama-local", + // Box::new(|| system_parachains_chain_specs::asset_hub_kusama_local_testnet_config()) as Box<_>, + // ), + ( + "asset-hub-polkadot-local", + Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config()) as Box<_>, + ), + // ( + // "collectives-polkadot-local", + // Box::new(|| system_parachains_chain_specs::collectives_polakdot_local_testnet_config()) as Box<_>, + // ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { @@ -40,7 +54,7 @@ fn main() -> Result<(), String> { Ok(()) } else { if cli.chain.ends_with(".json") { - let chain_spec = relay_chain_specs::from_json_file(&cli.chain)?.as_json(cli.raw)?; + let chain_spec = common::from_json_file(&cli.chain)?.as_json(cli.raw)?; print!("{chain_spec}"); Ok(()) } else { diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 44c1f0f7d0..6ebb8b4ee7 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -463,16 +463,6 @@ pub fn kusama_local_testnet_config() -> Result, String> { ))) } -pub fn from_json_file(filepath: &str) -> Result, String> { - let path = std::path::PathBuf::from(&filepath); - let chain_spec = PolkadotChainSpec::from_json_file(path.clone())?; - match chain_spec.id() { - x if x.starts_with("kusama") | x.starts_with("ksm") => - Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), - _ => Ok(Box::new(chain_spec)), - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs new file mode 100644 index 0000000000..e933dde186 --- /dev/null +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -0,0 +1,155 @@ +use serde::{Deserialize, Serialize}; +use polkadot_runtime_constants::currency::UNITS as DOT; +use sc_chain_spec::{ChainSpec, ChainType, ChainSpecExtension, ChainSpecGroup}; +use cumulus_primitives_core::ParaId; +use sp_core::sr25519; +use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance as AssetHubBalance}; +use crate::common::{testnet_accounts, get_from_seed, get_account_id_from_seed}; + +/// Generic extensions for Parachain ChainSpecs. +#[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, +} + +pub type AssetHubPolkadotChainSpec = + sc_service::GenericChainSpec; +pub type AssetHubKusamaChainSpec = + sc_service::GenericChainSpec; + +const DEFAULT_PROTOCOL_ID: &str = "dot"; + +const ASSET_HUB_POLKADOT_ED: AssetHubBalance = + parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + +const ASSET_HUB_KUSAMA_ED: AssetHubBalance = + parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + +/// The default XCM version to set in genesis config. +const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; + +/// Invulnerable Collators +pub fn invulnerables() -> Vec<(AccountId, AuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), + ] +} + +/// Invulnerable Collators for the particular case of AssetHubPolkadot +pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_from_seed::("Bob"), + ), + ] +} + +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn asset_hub_polkadot_session_keys( + keys: AssetHubPolkadotAuraId, +) -> asset_hub_polkadot_runtime::SessionKeys { + asset_hub_polkadot_runtime::SessionKeys { aura: keys } +} + +fn asset_hub_polkadot_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { + asset_hub_polkadot_runtime::RuntimeGenesisConfig { + system: asset_hub_polkadot_runtime::SystemConfig { + code: wasm_binary.to_vec(), ..Default::default() }, + balances: asset_hub_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: asset_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, + ..Default::default() + }, + session: asset_hub_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn asset_hub_polkadot_local_genesis(wasm_binary: &[u8]) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { + asset_hub_polkadot_genesis( + // initial collators. + wasm_binary, + invulnerables_asset_hub_polkadot(), + testnet_accounts(), + 1000.into(), + ) +} + +pub fn asset_hub_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + let wasm_binary = + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + + Ok(Box::new(AssetHubPolkadotChainSpec::from_genesis( + // Name + "Polkadot Asset Hub Local", + // ID + "asset-hub-polkadot-local", + ChainType::Local, + move || { + asset_hub_polkadot_local_genesis( + wasm_binary + ) + }, + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, + ))) +} From 3fb93047b05c2200aad2648b1b23851f80eb3f89 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Wed, 1 Nov 2023 15:58:56 +0100 Subject: [PATCH 06/53] working for asset-hub-kusama --- chain-spec-generator/src/common.rs | 9 +- chain-spec-generator/src/main.rs | 8 +- .../src/system_parachains_specs.rs | 97 +++++++++++++++++++ 3 files changed, 108 insertions(+), 6 deletions(-) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 07564cdca5..40c2b69a13 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -1,7 +1,10 @@ use crate::{ ChainSpec, relay_chain_specs::{PolkadotChainSpec, KusamaChainSpec}, - system_parachains_specs::{AssetHubPolkadotChainSpec}, + system_parachains_specs::{ + AssetHubPolkadotChainSpec, + AssetHubKusamaChainSpec + }, }; use polkadot_primitives::{AccountId, AccountPublic}; use sp_core::{sr25519, Pair, Public}; @@ -47,8 +50,10 @@ pub fn from_json_file(filepath: &str) -> Result, String> { Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), x if x.starts_with("kusama") | x.starts_with("ksm") => Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), - x if x.starts_with("asset-hub-polkadot") | x.starts_with("ksm") => + x if x.starts_with("asset-hub-polkadot") => Ok(Box::new(AssetHubPolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("asset-hub-kusama") => + Ok(Box::new(AssetHubKusamaChainSpec::from_json_file(path)?)), _ => Ok(Box::new(chain_spec)), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 96034a726d..7083f9dc6a 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -34,10 +34,10 @@ fn main() -> Result<(), String> { "kusama-local", Box::new(|| relay_chain_specs::kusama_local_testnet_config()) as Box<_>, ), - // ( - // "asset-hub-kusama-local", - // Box::new(|| system_parachains_chain_specs::asset_hub_kusama_local_testnet_config()) as Box<_>, - // ), + ( + "asset-hub-kusama-local", + Box::new(|| system_parachains_specs::asset_hub_kusama_local_testnet_config()) as Box<_>, + ), ( "asset-hub-polkadot-local", Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config()) as Box<_>, diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index e933dde186..491c39e7f8 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -66,6 +66,14 @@ pub fn asset_hub_polkadot_session_keys( asset_hub_polkadot_runtime::SessionKeys { aura: keys } } +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn asset_hub_kusama_session_keys(keys: AuraId) -> asset_hub_kusama_runtime::SessionKeys { + asset_hub_kusama_runtime::SessionKeys { aura: keys } +} + +// AssetHubPolkadot fn asset_hub_polkadot_genesis( wasm_binary: &[u8], invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, @@ -153,3 +161,92 @@ pub fn asset_hub_polkadot_local_testnet_config() -> Result, S Extensions { relay_chain: "polkadot-local".into(), para_id: 1000 }, ))) } + +// AssetHubKusama +fn asset_hub_kusama_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { + asset_hub_kusama_runtime::RuntimeGenesisConfig { + system: asset_hub_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), ..Default::default() }, + balances: asset_hub_kusama_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, + ..Default::default() + }, + session: asset_hub_kusama_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + asset_hub_kusama_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn asset_hub_kusama_local_genesis(wasm_binary: &[u8]) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { + asset_hub_kusama_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1000.into(), + ) +} + +pub fn asset_hub_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + + Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( + // Name + "Kusama Asset Hub Local", + // ID + "asset-hub-kusama-local", + ChainType::Local, + move || { + asset_hub_kusama_local_genesis( + wasm_binary + ) + }, + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, + ))) +} From 39a447c960e3217e1161bc9de9199b7505fea847 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Wed, 1 Nov 2023 16:36:55 +0100 Subject: [PATCH 07/53] working for collectives-polkadot --- chain-spec-generator/src/common.rs | 9 +- chain-spec-generator/src/main.rs | 18 +-- .../src/system_parachains_specs.rs | 117 +++++++++++++++++- 3 files changed, 127 insertions(+), 17 deletions(-) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 40c2b69a13..5e638a8699 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -3,7 +3,8 @@ use crate::{ relay_chain_specs::{PolkadotChainSpec, KusamaChainSpec}, system_parachains_specs::{ AssetHubPolkadotChainSpec, - AssetHubKusamaChainSpec + AssetHubKusamaChainSpec, + CollectivesPolkadotChainSpec, }, }; use polkadot_primitives::{AccountId, AccountPublic}; @@ -42,7 +43,7 @@ where AccountPublic::from(get_from_seed::(seed)).into_account() } -pub fn from_json_file(filepath: &str) -> Result, String> { +pub fn from_json_file(filepath: &str, supported: String) -> Result, String> { let path = std::path::PathBuf::from(&filepath); let chain_spec = PolkadotChainSpec::from_json_file(path.clone())?; match chain_spec.id() { @@ -54,6 +55,8 @@ pub fn from_json_file(filepath: &str) -> Result, String> { Ok(Box::new(AssetHubPolkadotChainSpec::from_json_file(path)?)), x if x.starts_with("asset-hub-kusama") => Ok(Box::new(AssetHubKusamaChainSpec::from_json_file(path)?)), - _ => Ok(Box::new(chain_spec)), + x if x.starts_with("collectives-polkadot") => + Ok(Box::new(CollectivesPolkadotChainSpec::from_json_file(path)?)), + _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 7083f9dc6a..d3113f5eff 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -42,10 +42,10 @@ fn main() -> Result<(), String> { "asset-hub-polkadot-local", Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config()) as Box<_>, ), - // ( - // "collectives-polkadot-local", - // Box::new(|| system_parachains_chain_specs::collectives_polakdot_local_testnet_config()) as Box<_>, - // ), + ( + "collectives-polkadot-local", + Box::new(|| system_parachains_specs::collectives_polkadot_local_testnet_config()) as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { @@ -53,15 +53,15 @@ fn main() -> Result<(), String> { print!("{chain_spec}"); Ok(()) } else { + let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { + let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); + format!("{c}{k}{extra}") + }); if cli.chain.ends_with(".json") { - let chain_spec = common::from_json_file(&cli.chain)?.as_json(cli.raw)?; + let chain_spec = common::from_json_file(&cli.chain, supported)?.as_json(cli.raw)?; print!("{chain_spec}"); Ok(()) } else { - let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { - let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); - format!("{c}{k}{extra}") - }); Err(format!("Unknown chain, only supported: {supported} or a json file")) } } diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 491c39e7f8..09ef930eb4 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -3,7 +3,7 @@ use polkadot_runtime_constants::currency::UNITS as DOT; use sc_chain_spec::{ChainSpec, ChainType, ChainSpecExtension, ChainSpecGroup}; use cumulus_primitives_core::ParaId; use sp_core::sr25519; -use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance as AssetHubBalance}; +use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance}; use crate::common::{testnet_accounts, get_from_seed, get_account_id_from_seed}; /// Generic extensions for Parachain ChainSpecs. @@ -18,15 +18,22 @@ pub struct Extensions { pub type AssetHubPolkadotChainSpec = sc_service::GenericChainSpec; + pub type AssetHubKusamaChainSpec = sc_service::GenericChainSpec; +pub type CollectivesPolkadotChainSpec = + sc_service::GenericChainSpec; + +const COLLECTIVES_POLKADOT_ED: Balance = + parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + const DEFAULT_PROTOCOL_ID: &str = "dot"; -const ASSET_HUB_POLKADOT_ED: AssetHubBalance = +const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; -const ASSET_HUB_KUSAMA_ED: AssetHubBalance = +const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; /// The default XCM version to set in genesis config. @@ -73,6 +80,15 @@ pub fn asset_hub_kusama_session_keys(keys: AuraId) -> asset_hub_kusama_runtime:: asset_hub_kusama_runtime::SessionKeys { aura: keys } } +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn collectives_polkadot_session_keys( + keys: AuraId, +) -> collectives_polkadot_runtime::SessionKeys { + collectives_polkadot_runtime::SessionKeys { aura: keys } +} + // AssetHubPolkadot fn asset_hub_polkadot_genesis( wasm_binary: &[u8], @@ -176,7 +192,7 @@ fn asset_hub_kusama_genesis( balances: endowed_accounts .iter() .cloned() - .map(|k| (k, ASSET_HUB_POLKADOT_ED * 4096)) + .map(|k| (k, ASSET_HUB_KUSAMA_ED * 4096)) .collect(), }, parachain_info: asset_hub_kusama_runtime::ParachainInfoConfig { @@ -185,7 +201,7 @@ fn asset_hub_kusama_genesis( }, collator_selection: asset_hub_kusama_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), - candidacy_bond: ASSET_HUB_POLKADOT_ED * 16, + candidacy_bond: ASSET_HUB_KUSAMA_ED * 16, ..Default::default() }, session: asset_hub_kusama_runtime::SessionConfig { @@ -250,3 +266,94 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str Extensions { relay_chain: "kusama-local".into(), para_id: 1000 }, ))) } + +// CollectivesPolkadot +fn collectives_polkadot_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> collectives_polkadot_runtime::RuntimeGenesisConfig { + collectives_polkadot_runtime::RuntimeGenesisConfig { + system: collectives_polkadot_runtime::SystemConfig { + code: wasm_binary.to_vec(), ..Default::default() }, + balances: collectives_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, COLLECTIVES_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: collectives_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: collectives_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: COLLECTIVES_POLKADOT_ED * 16, + ..Default::default() + }, + session: collectives_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + collectives_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + alliance: Default::default(), + alliance_motion: Default::default(), + } +} + +fn collectives_polkadot_local_genesis(wasm_binary: &[u8]) -> collectives_polkadot_runtime::RuntimeGenesisConfig { + collectives_polkadot_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1002.into(), + ) +} + +pub fn collectives_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + let wasm_binary = + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + + Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( + // Name + "Polkadot Collectives Local", + // ID + "collectives-polkadot-local", + ChainType::Local, + move || { + collectives_polkadot_local_genesis( + wasm_binary + ) + }, + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, + ))) +} From 7f08136561fa74617d06beb022754f6d72bc3718 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Wed, 1 Nov 2023 17:01:33 +0100 Subject: [PATCH 08/53] working for bridge-hub-polkadot --- Cargo.lock | 2 + chain-spec-generator/Cargo.toml | 2 + chain-spec-generator/src/common.rs | 3 + chain-spec-generator/src/main.rs | 4 + .../src/system_parachains_specs.rs | 115 ++++++++++++++++-- 5 files changed, 119 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2114aca00f..1b809e138d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1522,6 +1522,8 @@ version = "1.0.0" dependencies = [ "asset-hub-kusama-runtime", "asset-hub-polkadot-runtime", + "bridge-hub-kusama-runtime", + "bridge-hub-polkadot-runtime", "clap", "collectives-polkadot-runtime", "cumulus-primitives-core", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 46de044942..18639142dc 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -20,6 +20,8 @@ kusama-runtime-constants = { path = "../relay/kusama/constants" } asset-hub-polkadot-runtime = { path = "../system-parachains/asset-hubs/asset-hub-polkadot" } asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-kusama" } collectives-polkadot-runtime = { path = "../system-parachains/collectives/collectives-polkadot" } +bridge-hub-polkadot-runtime = { path = "../system-parachains/bridge-hubs/bridge-hub-polkadot" } +bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hub-kusama" } sc-chain-spec = "22.0.0" sc-service = "0.30.0" diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 5e638a8699..eb86ef1689 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -5,6 +5,7 @@ use crate::{ AssetHubPolkadotChainSpec, AssetHubKusamaChainSpec, CollectivesPolkadotChainSpec, + BridgeHubPolkadotChainSpec, }, }; use polkadot_primitives::{AccountId, AccountPublic}; @@ -57,6 +58,8 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result Ok(Box::new(CollectivesPolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("bridge-hub-polkadot") => + Ok(Box::new(BridgeHubPolkadotChainSpec::from_json_file(path)?)), _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index d3113f5eff..28f62876b1 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -46,6 +46,10 @@ fn main() -> Result<(), String> { "collectives-polkadot-local", Box::new(|| system_parachains_specs::collectives_polkadot_local_testnet_config()) as Box<_>, ), + ( + "bridge-hub-polkadot-local", + Box::new(|| system_parachains_specs::bridge_hub_polkadot_local_testnet_config()) as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 09ef930eb4..35c446f8b8 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -1,5 +1,4 @@ use serde::{Deserialize, Serialize}; -use polkadot_runtime_constants::currency::UNITS as DOT; use sc_chain_spec::{ChainSpec, ChainType, ChainSpecExtension, ChainSpecGroup}; use cumulus_primitives_core::ParaId; use sp_core::sr25519; @@ -25,10 +24,8 @@ pub type AssetHubKusamaChainSpec = pub type CollectivesPolkadotChainSpec = sc_service::GenericChainSpec; -const COLLECTIVES_POLKADOT_ED: Balance = - parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; - -const DEFAULT_PROTOCOL_ID: &str = "dot"; +pub type BridgeHubPolkadotChainSpec = + sc_service::GenericChainSpec; const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; @@ -36,6 +33,12 @@ const ASSET_HUB_POLKADOT_ED: Balance = const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const COLLECTIVES_POLKADOT_ED: Balance = + parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + +const BRIDGE_HUB_POLKADOT_ED: Balance = + parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; + /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; @@ -89,6 +92,15 @@ pub fn collectives_polkadot_session_keys( collectives_polkadot_runtime::SessionKeys { aura: keys } } +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn bridge_hub_polkadot_session_keys( + keys: AuraId, +) -> bridge_hub_polkadot_runtime::SessionKeys { + bridge_hub_polkadot_runtime::SessionKeys { aura: keys } +} + // AssetHubPolkadot fn asset_hub_polkadot_genesis( wasm_binary: &[u8], @@ -245,7 +257,7 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str properties.insert("tokenDecimals".into(), 12.into()); let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( // Name @@ -336,7 +348,7 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, properties.insert("tokenDecimals".into(), 10.into()); let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("CollectivesPolkadot wasm not available")?; Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( // Name @@ -357,3 +369,92 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, ))) } + +// BridgeHubPolkadot +fn bridge_hub_polkadot_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + system: bridge_hub_polkadot_runtime::SystemConfig { + code: wasm_binary.to_vec(), ..Default::default() }, + balances: bridge_hub_polkadot_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, BRIDGE_HUB_POLKADOT_ED * 4096)) + .collect(), + }, + parachain_info: bridge_hub_polkadot_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: bridge_hub_polkadot_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: BRIDGE_HUB_POLKADOT_ED * 16, + ..Default::default() + }, + session: bridge_hub_polkadot_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_polkadot_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn bridge_hub_polkadot_local_genesis(wasm_binary: &[u8]) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { + bridge_hub_polkadot_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1003.into(), + ) +} + +pub fn bridge_hub_polkadot_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); + + let wasm_binary = + bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubPolkadot wasm not available")?; + + Ok(Box::new(BridgeHubPolkadotChainSpec::from_genesis( + // Name + "Polkadot Bridge Hub Local", + // ID + "bridge-hub-polkadot-local", + ChainType::Local, + move || { + bridge_hub_polkadot_local_genesis( + wasm_binary + ) + }, + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "polkadot-local".into(), para_id: 1003 }, + ))) +} From bddb677a99ae69628b065b155ac957aeddf6985c Mon Sep 17 00:00:00 2001 From: NachoPal Date: Wed, 1 Nov 2023 19:24:00 +0100 Subject: [PATCH 09/53] done --- chain-spec-generator/src/common.rs | 19 +++- chain-spec-generator/src/main.rs | 4 + .../src/system_parachains_specs.rs | 104 ++++++++++++++++++ 3 files changed, 123 insertions(+), 4 deletions(-) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index eb86ef1689..54db38016a 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -6,6 +6,7 @@ use crate::{ AssetHubKusamaChainSpec, CollectivesPolkadotChainSpec, BridgeHubPolkadotChainSpec, + BridgeHubKusamaChainSpec, }, }; use polkadot_primitives::{AccountId, AccountPublic}; @@ -44,12 +45,20 @@ where AccountPublic::from(get_from_seed::(seed)).into_account() } +#[derive(Debug, serde::Deserialize)] +struct EmptyChainSpecWithId { + id: String, +} + pub fn from_json_file(filepath: &str, supported: String) -> Result, String> { - let path = std::path::PathBuf::from(&filepath); - let chain_spec = PolkadotChainSpec::from_json_file(path.clone())?; - match chain_spec.id() { + let path = std::path::PathBuf::from(&filepath); + let file = std::fs::File::open(&filepath).expect("Failed to open file"); + let reader = std::io::BufReader::new(file); + let chain_spec: EmptyChainSpecWithId = serde_json::from_reader(reader) + .expect("Failed to read 'json' file with ChainSpec configuration"); + match &chain_spec.id { x if x.starts_with("polkadot") | x.starts_with("dot") => - Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), + Ok(Box::new(PolkadotChainSpec::from_json_file(path)?)), x if x.starts_with("kusama") | x.starts_with("ksm") => Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), x if x.starts_with("asset-hub-polkadot") => @@ -60,6 +69,8 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result Ok(Box::new(BridgeHubPolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("bridge-hub-kusama") => + Ok(Box::new(BridgeHubKusamaChainSpec::from_json_file(path)?)), _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 28f62876b1..c12f763f30 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -50,6 +50,10 @@ fn main() -> Result<(), String> { "bridge-hub-polkadot-local", Box::new(|| system_parachains_specs::bridge_hub_polkadot_local_testnet_config()) as Box<_>, ), + ( + "bridge-hub-kusama-local", + Box::new(|| system_parachains_specs::bridge_hub_kusama_local_testnet_config()) as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 35c446f8b8..2845a60ee5 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -27,6 +27,9 @@ pub type CollectivesPolkadotChainSpec = pub type BridgeHubPolkadotChainSpec = sc_service::GenericChainSpec; +pub type BridgeHubKusamaChainSpec = + sc_service::GenericChainSpec; + const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; @@ -39,6 +42,9 @@ const COLLECTIVES_POLKADOT_ED: Balance = const BRIDGE_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const BRIDGE_HUB_KUSAMA_ED: Balance = + parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; @@ -101,6 +107,15 @@ pub fn bridge_hub_polkadot_session_keys( bridge_hub_polkadot_runtime::SessionKeys { aura: keys } } +/// Generate the session keys from individual elements. +/// +/// The input must be a tuple of individual keys (a single arg for now since we have just one key). +pub fn bridge_hub_kusama_session_keys( + keys: AuraId, +) -> bridge_hub_kusama_runtime::SessionKeys { + bridge_hub_kusama_runtime::SessionKeys { aura: keys } +} + // AssetHubPolkadot fn asset_hub_polkadot_genesis( wasm_binary: &[u8], @@ -458,3 +473,92 @@ pub fn bridge_hub_polkadot_local_testnet_config() -> Result, Extensions { relay_chain: "polkadot-local".into(), para_id: 1003 }, ))) } + +// BridgeHubKusama +fn bridge_hub_kusama_genesis( + wasm_binary: &[u8], + invulnerables: Vec<(AccountId, AuraId)>, + endowed_accounts: Vec, + id: ParaId, +) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { + bridge_hub_kusama_runtime::RuntimeGenesisConfig { + system: bridge_hub_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), ..Default::default() }, + balances: bridge_hub_kusama_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, BRIDGE_HUB_KUSAMA_ED * 4096)) + .collect(), + }, + parachain_info: bridge_hub_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collator_selection: bridge_hub_kusama_runtime::CollatorSelectionConfig { + invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), + candidacy_bond: BRIDGE_HUB_KUSAMA_ED * 16, + ..Default::default() + }, + session: bridge_hub_kusama_runtime::SessionConfig { + keys: invulnerables + .into_iter() + .map(|(acc, aura)| { + ( + acc.clone(), // account id + acc, // validator id + bridge_hub_kusama_session_keys(aura), // session keys + ) + }) + .collect(), + }, + // no need to pass anything to aura, in fact it will panic if we do. Session will take care + // of this. + aura: Default::default(), + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn bridge_hub_kusama_local_genesis(wasm_binary: &[u8]) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { + bridge_hub_kusama_genesis( + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1003.into(), + ) +} + +pub fn bridge_hub_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; + + Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( + // Name + "Kusama Bridge Hub Local", + // ID + "bridge-hub-kusama-local", + ChainType::Local, + move || { + bridge_hub_kusama_local_genesis( + wasm_binary + ) + }, + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1003 }, + ))) +} From 089e21065f40497a3809d65ee54d28f192ba74e6 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Fri, 3 Nov 2023 17:26:15 +0100 Subject: [PATCH 10/53] fix tool runtimes --- chain-spec-generator/src/relay_chain_specs.rs | 2 +- chain-spec-generator/src/system_parachains_specs.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 6ebb8b4ee7..361abf4ac5 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -424,7 +424,7 @@ pub fn polkadot_local_testnet_config() -> Result, String> { Ok(Box::new(PolkadotChainSpec::from_genesis( "Local Testnet", - "local_testnet", + "polkadot_testnet", ChainType::Local, move || polkadot_local_testnet_genesis(wasm_binary), vec![], diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 2845a60ee5..b1a2b73551 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -272,7 +272,7 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str properties.insert("tokenDecimals".into(), 12.into()); let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; + asset_hub_kusama_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( // Name @@ -363,7 +363,7 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, properties.insert("tokenDecimals".into(), 10.into()); let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("CollectivesPolkadot wasm not available")?; + collectives_polkadot_runtime::WASM_BINARY.ok_or("CollectivesPolkadot wasm not available")?; Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( // Name @@ -541,7 +541,7 @@ pub fn bridge_hub_kusama_local_testnet_config() -> Result, St properties.insert("tokenDecimals".into(), 12.into()); let wasm_binary = - bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; + bridge_hub_kusama_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( // Name From 36e7ce2a3f0d1106c18a576296441a34a53b9be8 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Fri, 3 Nov 2023 17:32:28 +0100 Subject: [PATCH 11/53] nits --- chain-spec-generator/src/relay_chain_specs.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 361abf4ac5..d907d966ad 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -374,7 +374,7 @@ pub fn polkadot_development_config() -> Result, String> { polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; Ok(Box::new(PolkadotChainSpec::from_genesis( - "Development", + "Polakdot Development", "polkadot_dev", ChainType::Development, move || polkadot_development_config_genesis(wasm_binary), @@ -392,7 +392,7 @@ pub fn kusama_development_config() -> Result, String> { let wasm_binary = kusama_runtime::WASM_BINARY.ok_or("Kusama development wasm not available")?; Ok(Box::new(KusamaChainSpec::from_genesis( - "Development", + "Kusama Development", "kusama_dev", ChainType::Development, move || kusama_development_config_genesis(wasm_binary), @@ -423,7 +423,7 @@ pub fn polkadot_local_testnet_config() -> Result, String> { polkadot_runtime::WASM_BINARY.ok_or("Polkadot development wasm not available")?; Ok(Box::new(PolkadotChainSpec::from_genesis( - "Local Testnet", + "Polkadot Local Testnet", "polkadot_testnet", ChainType::Local, move || polkadot_local_testnet_genesis(wasm_binary), From 48da42614a6f9389acfb0bf093d455abcbd71d08 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Thu, 9 Nov 2023 11:30:45 +0100 Subject: [PATCH 12/53] remove sc-service --- Cargo.lock | 1 - chain-spec-generator/Cargo.toml | 1 - chain-spec-generator/src/system_parachains_specs.rs | 10 +++++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b809e138d..19228c4360 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1538,7 +1538,6 @@ dependencies = [ "polkadot-runtime-parachains", "sc-chain-spec", "sc-consensus-grandpa", - "sc-service", "serde", "serde_json", "sp-authority-discovery", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 18639142dc..cd0411428d 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -24,7 +24,6 @@ bridge-hub-polkadot-runtime = { path = "../system-parachains/bridge-hubs/bridge- bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hub-kusama" } sc-chain-spec = "22.0.0" -sc-service = "0.30.0" polkadot-runtime-parachains = "2.0.0" polkadot-primitives = "2.0.0" sp-consensus-babe = "0.27.0" diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index b1a2b73551..a0ae6e7b9c 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -16,19 +16,19 @@ pub struct Extensions { } pub type AssetHubPolkadotChainSpec = - sc_service::GenericChainSpec; + sc_chain_spec::GenericChainSpec; pub type AssetHubKusamaChainSpec = - sc_service::GenericChainSpec; + sc_chain_spec::GenericChainSpec; pub type CollectivesPolkadotChainSpec = - sc_service::GenericChainSpec; + sc_chain_spec::GenericChainSpec; pub type BridgeHubPolkadotChainSpec = - sc_service::GenericChainSpec; + sc_chain_spec::GenericChainSpec; pub type BridgeHubKusamaChainSpec = - sc_service::GenericChainSpec; + sc_chain_spec::GenericChainSpec; const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; From 2033d5a7e9a1f8f13b9088a323230897f10056c5 Mon Sep 17 00:00:00 2001 From: NachoPal Date: Thu, 9 Nov 2023 11:32:15 +0100 Subject: [PATCH 13/53] fmt --- chain-spec-generator/src/common.rs | 43 ++- chain-spec-generator/src/main.rs | 35 +-- .../src/system_parachains_specs.rs | 246 +++++++++--------- 3 files changed, 157 insertions(+), 167 deletions(-) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 54db38016a..4c92a8dffb 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -1,13 +1,10 @@ use crate::{ - ChainSpec, - relay_chain_specs::{PolkadotChainSpec, KusamaChainSpec}, - system_parachains_specs::{ - AssetHubPolkadotChainSpec, - AssetHubKusamaChainSpec, - CollectivesPolkadotChainSpec, - BridgeHubPolkadotChainSpec, - BridgeHubKusamaChainSpec, - }, + relay_chain_specs::{KusamaChainSpec, PolkadotChainSpec}, + system_parachains_specs::{ + AssetHubKusamaChainSpec, AssetHubPolkadotChainSpec, BridgeHubKusamaChainSpec, + BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, + }, + ChainSpec, }; use polkadot_primitives::{AccountId, AccountPublic}; use sp_core::{sr25519, Pair, Public}; @@ -47,30 +44,30 @@ where #[derive(Debug, serde::Deserialize)] struct EmptyChainSpecWithId { - id: String, + id: String, } pub fn from_json_file(filepath: &str, supported: String) -> Result, String> { - let path = std::path::PathBuf::from(&filepath); - let file = std::fs::File::open(&filepath).expect("Failed to open file"); - let reader = std::io::BufReader::new(file); - let chain_spec: EmptyChainSpecWithId = serde_json::from_reader(reader) - .expect("Failed to read 'json' file with ChainSpec configuration"); + let path = std::path::PathBuf::from(&filepath); + let file = std::fs::File::open(&filepath).expect("Failed to open file"); + let reader = std::io::BufReader::new(file); + let chain_spec: EmptyChainSpecWithId = serde_json::from_reader(reader) + .expect("Failed to read 'json' file with ChainSpec configuration"); match &chain_spec.id { - x if x.starts_with("polkadot") | x.starts_with("dot") => - Ok(Box::new(PolkadotChainSpec::from_json_file(path)?)), + x if x.starts_with("polkadot") | x.starts_with("dot") => + Ok(Box::new(PolkadotChainSpec::from_json_file(path)?)), x if x.starts_with("kusama") | x.starts_with("ksm") => Ok(Box::new(KusamaChainSpec::from_json_file(path)?)), - x if x.starts_with("asset-hub-polkadot") => + x if x.starts_with("asset-hub-polkadot") => Ok(Box::new(AssetHubPolkadotChainSpec::from_json_file(path)?)), - x if x.starts_with("asset-hub-kusama") => + x if x.starts_with("asset-hub-kusama") => Ok(Box::new(AssetHubKusamaChainSpec::from_json_file(path)?)), - x if x.starts_with("collectives-polkadot") => + x if x.starts_with("collectives-polkadot") => Ok(Box::new(CollectivesPolkadotChainSpec::from_json_file(path)?)), - x if x.starts_with("bridge-hub-polkadot") => + x if x.starts_with("bridge-hub-polkadot") => Ok(Box::new(BridgeHubPolkadotChainSpec::from_json_file(path)?)), - x if x.starts_with("bridge-hub-kusama") => + x if x.starts_with("bridge-hub-kusama") => Ok(Box::new(BridgeHubKusamaChainSpec::from_json_file(path)?)), - _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), + _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index c12f763f30..6cf7b3109c 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -2,9 +2,9 @@ use clap::Parser; use sc_chain_spec::ChainSpec; use std::collections::HashMap; +mod common; mod relay_chain_specs; mod system_parachains_specs; -mod common; #[derive(Parser)] struct Cli { @@ -34,25 +34,30 @@ fn main() -> Result<(), String> { "kusama-local", Box::new(|| relay_chain_specs::kusama_local_testnet_config()) as Box<_>, ), - ( + ( "asset-hub-kusama-local", - Box::new(|| system_parachains_specs::asset_hub_kusama_local_testnet_config()) as Box<_>, + Box::new(|| system_parachains_specs::asset_hub_kusama_local_testnet_config()) + as Box<_>, ), - ( + ( "asset-hub-polkadot-local", - Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config()) as Box<_>, + Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config()) + as Box<_>, ), - ( + ( "collectives-polkadot-local", - Box::new(|| system_parachains_specs::collectives_polkadot_local_testnet_config()) as Box<_>, + Box::new(|| system_parachains_specs::collectives_polkadot_local_testnet_config()) + as Box<_>, ), - ( + ( "bridge-hub-polkadot-local", - Box::new(|| system_parachains_specs::bridge_hub_polkadot_local_testnet_config()) as Box<_>, + Box::new(|| system_parachains_specs::bridge_hub_polkadot_local_testnet_config()) + as Box<_>, ), - ( + ( "bridge-hub-kusama-local", - Box::new(|| system_parachains_specs::bridge_hub_kusama_local_testnet_config()) as Box<_>, + Box::new(|| system_parachains_specs::bridge_hub_kusama_local_testnet_config()) + as Box<_>, ), ]); @@ -61,10 +66,10 @@ fn main() -> Result<(), String> { print!("{chain_spec}"); Ok(()) } else { - let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { - let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); - format!("{c}{k}{extra}") - }); + let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| { + let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or(""); + format!("{c}{k}{extra}") + }); if cli.chain.ends_with(".json") { let chain_spec = common::from_json_file(&cli.chain, supported)?.as_json(cli.raw)?; print!("{chain_spec}"); diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index a0ae6e7b9c..9f32b1719e 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -1,9 +1,9 @@ -use serde::{Deserialize, Serialize}; -use sc_chain_spec::{ChainSpec, ChainType, ChainSpecExtension, ChainSpecGroup}; +use crate::common::{get_account_id_from_seed, get_from_seed, testnet_accounts}; use cumulus_primitives_core::ParaId; -use sp_core::sr25519; use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance}; -use crate::common::{testnet_accounts, get_from_seed, get_account_id_from_seed}; +use sc_chain_spec::{ChainSpec, ChainSpecExtension, ChainSpecGroup, ChainType}; +use serde::{Deserialize, Serialize}; +use sp_core::sr25519; /// Generic extensions for Parachain ChainSpecs. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)] @@ -30,47 +30,39 @@ pub type BridgeHubPolkadotChainSpec = pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec; -const ASSET_HUB_POLKADOT_ED: Balance = - parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; -const ASSET_HUB_KUSAMA_ED: Balance = - parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; -const COLLECTIVES_POLKADOT_ED: Balance = - parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const COLLECTIVES_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; -const BRIDGE_HUB_POLKADOT_ED: Balance = - parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; +const BRIDGE_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; -const BRIDGE_HUB_KUSAMA_ED: Balance = - parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const BRIDGE_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; /// Invulnerable Collators pub fn invulnerables() -> Vec<(AccountId, AuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), - ] + vec![ + (get_account_id_from_seed::("Alice"), get_from_seed::("Alice")), + (get_account_id_from_seed::("Bob"), get_from_seed::("Bob")), + ] } /// Invulnerable Collators for the particular case of AssetHubPolkadot pub fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { - vec![ - ( - get_account_id_from_seed::("Alice"), - get_from_seed::("Alice"), - ), - ( - get_account_id_from_seed::("Bob"), - get_from_seed::("Bob"), - ), - ] + vec![ + ( + get_account_id_from_seed::("Alice"), + get_from_seed::("Alice"), + ), + ( + get_account_id_from_seed::("Bob"), + get_from_seed::("Bob"), + ), + ] } /// Generate the session keys from individual elements. @@ -101,31 +93,29 @@ pub fn collectives_polkadot_session_keys( /// Generate the session keys from individual elements. /// /// The input must be a tuple of individual keys (a single arg for now since we have just one key). -pub fn bridge_hub_polkadot_session_keys( - keys: AuraId, -) -> bridge_hub_polkadot_runtime::SessionKeys { +pub fn bridge_hub_polkadot_session_keys(keys: AuraId) -> bridge_hub_polkadot_runtime::SessionKeys { bridge_hub_polkadot_runtime::SessionKeys { aura: keys } } /// Generate the session keys from individual elements. /// /// The input must be a tuple of individual keys (a single arg for now since we have just one key). -pub fn bridge_hub_kusama_session_keys( - keys: AuraId, -) -> bridge_hub_kusama_runtime::SessionKeys { +pub fn bridge_hub_kusama_session_keys(keys: AuraId) -> bridge_hub_kusama_runtime::SessionKeys { bridge_hub_kusama_runtime::SessionKeys { aura: keys } } // AssetHubPolkadot fn asset_hub_polkadot_genesis( - wasm_binary: &[u8], + wasm_binary: &[u8], invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>, endowed_accounts: Vec, id: ParaId, ) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { asset_hub_polkadot_runtime::RuntimeGenesisConfig { system: asset_hub_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), ..Default::default() }, + code: wasm_binary.to_vec(), + ..Default::default() + }, balances: asset_hub_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() @@ -166,13 +156,15 @@ fn asset_hub_polkadot_genesis( } } -fn asset_hub_polkadot_local_genesis(wasm_binary: &[u8]) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { +fn asset_hub_polkadot_local_genesis( + wasm_binary: &[u8], +) -> asset_hub_polkadot_runtime::RuntimeGenesisConfig { asset_hub_polkadot_genesis( - // initial collators. - wasm_binary, - invulnerables_asset_hub_polkadot(), - testnet_accounts(), - 1000.into(), + // initial collators. + wasm_binary, + invulnerables_asset_hub_polkadot(), + testnet_accounts(), + 1000.into(), ) } @@ -182,20 +174,16 @@ pub fn asset_hub_polkadot_local_testnet_config() -> Result, S properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; + let wasm_binary = + asset_hub_polkadot_runtime::WASM_BINARY.ok_or("AssetHubPolkadot wasm not available")?; - Ok(Box::new(AssetHubPolkadotChainSpec::from_genesis( + Ok(Box::new(AssetHubPolkadotChainSpec::from_genesis( // Name "Polkadot Asset Hub Local", // ID "asset-hub-polkadot-local", ChainType::Local, - move || { - asset_hub_polkadot_local_genesis( - wasm_binary - ) - }, + move || asset_hub_polkadot_local_genesis(wasm_binary), Vec::new(), None, None, @@ -207,14 +195,16 @@ pub fn asset_hub_polkadot_local_testnet_config() -> Result, S // AssetHubKusama fn asset_hub_kusama_genesis( - wasm_binary: &[u8], + wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, ) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { asset_hub_kusama_runtime::RuntimeGenesisConfig { system: asset_hub_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), ..Default::default() }, + code: wasm_binary.to_vec(), + ..Default::default() + }, balances: asset_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() @@ -236,8 +226,8 @@ fn asset_hub_kusama_genesis( .into_iter() .map(|(acc, aura)| { ( - acc.clone(), // account id - acc, // validator id + acc.clone(), // account id + acc, // validator id asset_hub_kusama_session_keys(aura), // session keys ) }) @@ -255,13 +245,15 @@ fn asset_hub_kusama_genesis( } } -fn asset_hub_kusama_local_genesis(wasm_binary: &[u8]) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { +fn asset_hub_kusama_local_genesis( + wasm_binary: &[u8], +) -> asset_hub_kusama_runtime::RuntimeGenesisConfig { asset_hub_kusama_genesis( - // initial collators. - wasm_binary, - invulnerables(), - testnet_accounts(), - 1000.into(), + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1000.into(), ) } @@ -271,20 +263,16 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str properties.insert("tokenSymbol".into(), "KSM".into()); properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - asset_hub_kusama_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; + let wasm_binary = + asset_hub_kusama_runtime::WASM_BINARY.ok_or("AssetHubKusama wasm not available")?; - Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( + Ok(Box::new(AssetHubKusamaChainSpec::from_genesis( // Name "Kusama Asset Hub Local", // ID "asset-hub-kusama-local", ChainType::Local, - move || { - asset_hub_kusama_local_genesis( - wasm_binary - ) - }, + move || asset_hub_kusama_local_genesis(wasm_binary), Vec::new(), None, None, @@ -296,14 +284,16 @@ pub fn asset_hub_kusama_local_testnet_config() -> Result, Str // CollectivesPolkadot fn collectives_polkadot_genesis( - wasm_binary: &[u8], + wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, ) -> collectives_polkadot_runtime::RuntimeGenesisConfig { collectives_polkadot_runtime::RuntimeGenesisConfig { system: collectives_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), ..Default::default() }, + code: wasm_binary.to_vec(), + ..Default::default() + }, balances: collectives_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() @@ -346,13 +336,15 @@ fn collectives_polkadot_genesis( } } -fn collectives_polkadot_local_genesis(wasm_binary: &[u8]) -> collectives_polkadot_runtime::RuntimeGenesisConfig { +fn collectives_polkadot_local_genesis( + wasm_binary: &[u8], +) -> collectives_polkadot_runtime::RuntimeGenesisConfig { collectives_polkadot_genesis( - // initial collators. - wasm_binary, - invulnerables(), - testnet_accounts(), - 1002.into(), + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1002.into(), ) } @@ -362,20 +354,16 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, properties.insert("tokenSymbol".into(), "DOT".into()); properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - collectives_polkadot_runtime::WASM_BINARY.ok_or("CollectivesPolkadot wasm not available")?; + let wasm_binary = collectives_polkadot_runtime::WASM_BINARY + .ok_or("CollectivesPolkadot wasm not available")?; - Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( + Ok(Box::new(CollectivesPolkadotChainSpec::from_genesis( // Name "Polkadot Collectives Local", // ID "collectives-polkadot-local", ChainType::Local, - move || { - collectives_polkadot_local_genesis( - wasm_binary - ) - }, + move || collectives_polkadot_local_genesis(wasm_binary), Vec::new(), None, None, @@ -387,14 +375,16 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, // BridgeHubPolkadot fn bridge_hub_polkadot_genesis( - wasm_binary: &[u8], + wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, ) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { bridge_hub_polkadot_runtime::RuntimeGenesisConfig { system: bridge_hub_polkadot_runtime::SystemConfig { - code: wasm_binary.to_vec(), ..Default::default() }, + code: wasm_binary.to_vec(), + ..Default::default() + }, balances: bridge_hub_polkadot_runtime::BalancesConfig { balances: endowed_accounts .iter() @@ -416,8 +406,8 @@ fn bridge_hub_polkadot_genesis( .into_iter() .map(|(acc, aura)| { ( - acc.clone(), // account id - acc, // validator id + acc.clone(), // account id + acc, // validator id bridge_hub_polkadot_session_keys(aura), // session keys ) }) @@ -435,36 +425,34 @@ fn bridge_hub_polkadot_genesis( } } -fn bridge_hub_polkadot_local_genesis(wasm_binary: &[u8]) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { +fn bridge_hub_polkadot_local_genesis( + wasm_binary: &[u8], +) -> bridge_hub_polkadot_runtime::RuntimeGenesisConfig { bridge_hub_polkadot_genesis( - // initial collators. - wasm_binary, - invulnerables(), - testnet_accounts(), - 1003.into(), + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1003.into(), ) } pub fn bridge_hub_polkadot_local_testnet_config() -> Result, String> { let mut properties = sc_chain_spec::Properties::new(); - properties.insert("ss58Format".into(), 0.into()); - properties.insert("tokenSymbol".into(), "DOT".into()); - properties.insert("tokenDecimals".into(), 10.into()); + properties.insert("ss58Format".into(), 0.into()); + properties.insert("tokenSymbol".into(), "DOT".into()); + properties.insert("tokenDecimals".into(), 10.into()); - let wasm_binary = - bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubPolkadot wasm not available")?; + let wasm_binary = + bridge_hub_polkadot_runtime::WASM_BINARY.ok_or("BridgeHubPolkadot wasm not available")?; - Ok(Box::new(BridgeHubPolkadotChainSpec::from_genesis( + Ok(Box::new(BridgeHubPolkadotChainSpec::from_genesis( // Name "Polkadot Bridge Hub Local", // ID "bridge-hub-polkadot-local", ChainType::Local, - move || { - bridge_hub_polkadot_local_genesis( - wasm_binary - ) - }, + move || bridge_hub_polkadot_local_genesis(wasm_binary), Vec::new(), None, None, @@ -476,14 +464,16 @@ pub fn bridge_hub_polkadot_local_testnet_config() -> Result, // BridgeHubKusama fn bridge_hub_kusama_genesis( - wasm_binary: &[u8], + wasm_binary: &[u8], invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, ) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { bridge_hub_kusama_runtime::RuntimeGenesisConfig { system: bridge_hub_kusama_runtime::SystemConfig { - code: wasm_binary.to_vec(), ..Default::default() }, + code: wasm_binary.to_vec(), + ..Default::default() + }, balances: bridge_hub_kusama_runtime::BalancesConfig { balances: endowed_accounts .iter() @@ -505,8 +495,8 @@ fn bridge_hub_kusama_genesis( .into_iter() .map(|(acc, aura)| { ( - acc.clone(), // account id - acc, // validator id + acc.clone(), // account id + acc, // validator id bridge_hub_kusama_session_keys(aura), // session keys ) }) @@ -524,36 +514,34 @@ fn bridge_hub_kusama_genesis( } } -fn bridge_hub_kusama_local_genesis(wasm_binary: &[u8]) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { +fn bridge_hub_kusama_local_genesis( + wasm_binary: &[u8], +) -> bridge_hub_kusama_runtime::RuntimeGenesisConfig { bridge_hub_kusama_genesis( - // initial collators. - wasm_binary, - invulnerables(), - testnet_accounts(), - 1003.into(), + // initial collators. + wasm_binary, + invulnerables(), + testnet_accounts(), + 1003.into(), ) } pub fn bridge_hub_kusama_local_testnet_config() -> Result, String> { let mut properties = sc_chain_spec::Properties::new(); - properties.insert("ss58Format".into(), 2.into()); - properties.insert("tokenSymbol".into(), "KSM".into()); - properties.insert("tokenDecimals".into(), 12.into()); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); - let wasm_binary = - bridge_hub_kusama_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; + let wasm_binary = + bridge_hub_kusama_runtime::WASM_BINARY.ok_or("BridgeHubKusama wasm not available")?; - Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( + Ok(Box::new(BridgeHubKusamaChainSpec::from_genesis( // Name "Kusama Bridge Hub Local", // ID "bridge-hub-kusama-local", ChainType::Local, - move || { - bridge_hub_kusama_local_genesis( - wasm_binary - ) - }, + move || bridge_hub_kusama_local_genesis(wasm_binary), Vec::new(), None, None, From 11122b9cff38693537c83cef77adbaa58f14cdbb Mon Sep 17 00:00:00 2001 From: NachoPal Date: Fri, 10 Nov 2023 10:37:31 +0100 Subject: [PATCH 14/53] fix paras ids --- chain-spec-generator/src/system_parachains_specs.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 9f32b1719e..9980742441 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -344,7 +344,7 @@ fn collectives_polkadot_local_genesis( wasm_binary, invulnerables(), testnet_accounts(), - 1002.into(), + 1001.into(), ) } @@ -369,7 +369,7 @@ pub fn collectives_polkadot_local_testnet_config() -> Result, None, None, Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, + Extensions { relay_chain: "polkadot-local".into(), para_id: 1001 }, ))) } @@ -433,7 +433,7 @@ fn bridge_hub_polkadot_local_genesis( wasm_binary, invulnerables(), testnet_accounts(), - 1003.into(), + 1002.into(), ) } @@ -458,7 +458,7 @@ pub fn bridge_hub_polkadot_local_testnet_config() -> Result, None, None, Some(properties), - Extensions { relay_chain: "polkadot-local".into(), para_id: 1003 }, + Extensions { relay_chain: "polkadot-local".into(), para_id: 1002 }, ))) } @@ -522,7 +522,7 @@ fn bridge_hub_kusama_local_genesis( wasm_binary, invulnerables(), testnet_accounts(), - 1003.into(), + 1002.into(), ) } @@ -547,6 +547,6 @@ pub fn bridge_hub_kusama_local_testnet_config() -> Result, St None, None, Some(properties), - Extensions { relay_chain: "kusama-local".into(), para_id: 1003 }, + Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, ))) } From 46f9d2ccbb679bf8bd23fcf24cf8546bc0ec379f Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Fri, 10 Nov 2023 17:39:39 +0300 Subject: [PATCH 15/53] add runtime-benchmarks feature to chain spec generator --- chain-spec-generator/Cargo.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index cd0411428d..78e8d8c8c3 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -37,3 +37,14 @@ sp-consensus-beefy = "8.0.0" xcm = { package = "staging-xcm", version = "2.0.1" } parachains-common = { version = "2.0.0" } cumulus-primitives-core = { version = "0.2.0" } + +[features] +runtime-benchmarks = [ + "asset-hub-polkadot-runtime/runtime-benchmarks", + "asset-hub-kusama-runtime/runtime-benchmarks", + "bridge-hub-polkadot-runtime/runtime-benchmarks", + "bridge-hub-kusama-runtime/runtime-benchmarks", + "collectives-polkadot-runtime/runtime-benchmarks", + "kusama-runtime/runtime-benchmarks", + "polkadot-runtime/runtime-benchmarks", +] From a6336ed4736891de4fdc4c31c27e6a20641f943b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 16 Nov 2023 13:02:22 +0100 Subject: [PATCH 16/53] Enable `runtime-benchmarks` feature for chain spec generator (#91) Based on: https://github.com/polkadot-fellows/runtimes/pull/78 Without this fix we cannot run benchmarks for kusama/polkadot. Tested here: https://github.com/polkadot-fellows/runtimes/pull/58#issuecomment-1814123768 --- chain-spec-generator/Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index a627c2ebf7..60c16ca1e0 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -27,3 +27,9 @@ sc-consensus-grandpa = "0.14.0" pallet-im-online = "22.0.0" sp-runtime = "26.0.0" sp-consensus-beefy = "8.0.0" + +[features] +runtime-benchmarks = [ + "kusama-runtime/runtime-benchmarks", + "polkadot-runtime/runtime-benchmarks", +] \ No newline at end of file From cd4368d944cf63f5fb17dc804198662b83983812 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 13:04:03 +0400 Subject: [PATCH 17/53] update to master polkadot-sdk version --- Cargo.lock | 1850 ++++++++++------- chain-spec-generator/Cargo.toml | 24 +- chain-spec-generator/src/relay_chain_specs.rs | 14 +- 3 files changed, 1167 insertions(+), 721 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 505978728e..2985580d96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,7 +110,7 @@ dependencies = [ "cipher 0.3.0", "ctr 0.8.0", "ghash 0.4.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -124,7 +124,7 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -179,6 +179,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -205,9 +211,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -243,12 +249,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -273,7 +279,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" dependencies = [ "include_dir", - "itertools", + "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", @@ -286,6 +292,141 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" version = "6.1.0" @@ -405,7 +546,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", @@ -440,6 +581,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", @@ -502,13 +644,14 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "scale-info", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", @@ -527,9 +670,9 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8c54a703225defe6b87f7b715bf72723342ef1ecf9a5e96d02c55a5bc31959" +checksum = "de674aa0b8f0c31a00fd99a4003751c788c7023ed62527097a1286dd530fbe60" dependencies = [ "assets-common", "cumulus-pallet-dmp-queue", @@ -545,6 +688,7 @@ dependencies = [ "pallet-collator-selection", "pallet-session", "pallet-xcm", + "pallet-xcm-bridge-hub-router", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -556,15 +700,16 @@ dependencies = [ "sp-std", "staging-parachain-info", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", ] [[package]] name = "assets-common" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b1f6400a746207ff6e077b13103427c646914d49cc459977090a966908ff91" +checksum = "f8b8aa1c485e12af4a0a2b48402fa85d382ab4962731e71f5edc0f85c4cba28c" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -625,17 +770,6 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-recursion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.31", -] - [[package]] name = "async-trait" version = "0.1.73" @@ -644,7 +778,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -745,9 +879,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc86c4514675732c8bdc8a8bfc78b2e1b50dcce1a4aa5baea3338c9f2c3c1790" +checksum = "a399848a68a5196a04c19db5bfc4dca3cd0989a3165150f06c1ad1bc8882aa34" dependencies = [ "hash-db", "log", @@ -780,7 +914,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -807,6 +941,18 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.10.6" @@ -930,9 +1076,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f657204b8e931d9c9b78139e661b7b58b005f627f0caf5c98257df0b81a97b" +checksum = "9b18aaf9ed9ecffade4d56bb1a63cd70b9e61ea4ef69023f2dcd0fd54d18f280" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -946,9 +1092,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-rococo" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6819a3f7a5c6c48ca4796ba70a586b5736baeb2e7542907f1c675d986141b20" +checksum = "7dcb3425030c446f51c0d9bc71605b42dc96acff94b2feff51cd09a5e58dc0dd" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -961,9 +1107,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-wococo" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5145dec4dbeb78e65f44b0f2a4953d5f276f8db140906b9831aee1434c9988e" +checksum = "0ecd2e53fcb7b489a544e27474839586b662bd0c5eea0a9bd21d5eaeae8e6b0b" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -976,9 +1122,9 @@ dependencies = [ [[package]] name = "bp-header-chain" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842dd43f5229669efb74cdc909c0e9315a7cdbe4513b6225dc0ab0ec21e4a1b8" +checksum = "fb057324305f7cacce9d87a82d0e6e8de8ec2ff40fd2df707f97f74ddd0631f9" dependencies = [ "bp-runtime", "finality-grandpa", @@ -994,9 +1140,9 @@ dependencies = [ [[package]] name = "bp-messages" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb9128928257331dfb41c4c283549a7795447ca5dc5bc5b6753ee6118912651" +checksum = "c4df7b23c2c5cdfb7260c0c88835e554f857b0a80e4c1cfa48dd1194e6fb6c6d" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1010,9 +1156,9 @@ dependencies = [ [[package]] name = "bp-parachains" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a2ffaab775e6e0295d52bd9b768862e522823ef8ecb1a0f05f87953b496239" +checksum = "16a644c3fa5ac2233dd2de94ebe2a4aa98c7cca36b34d96e6604f4d34b0758b4" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1028,9 +1174,9 @@ dependencies = [ [[package]] name = "bp-polkadot-core" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953c2ec80269860053085ac259da9ed7b1ad3b8985435255f7635000dbd3c440" +checksum = "34f0342d051a3b07fecbcabc7efca35880865ede7ef5b2b49ca323c94bdb6d53" dependencies = [ "bp-messages", "bp-runtime", @@ -1047,9 +1193,9 @@ dependencies = [ [[package]] name = "bp-relayers" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4c6316868f49602c4a011d850444181d2f1b837a238214f1e287a0e6d74710" +checksum = "e11ea832eedd3bb19a13f77474b4eced1782914527fc54404a423d6259095bdb" dependencies = [ "bp-messages", "bp-runtime", @@ -1062,9 +1208,9 @@ dependencies = [ [[package]] name = "bp-runtime" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6356e28b2d80b622e95914d130db0a4a9d2deb27863930228eb53b29bc6f28a5" +checksum = "8c4fd30d6814b73c245c40c760ffbadec3f834865ddd681161ef33672a766e50" dependencies = [ "frame-support", "frame-system", @@ -1086,15 +1232,15 @@ dependencies = [ [[package]] name = "bp-test-utils" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb045c0076d4f12de4ada37b5a30df377eb69988b577c98fe2c311da34b531" +checksum = "e625f0def0740566ca053a7b7076c301992eed132b3821a07e835bb8062fb79a" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", "bp-runtime", - "ed25519-dalek 1.0.1", + "ed25519-dalek", "finality-grandpa", "parity-scale-codec", "sp-application-crypto", @@ -1107,9 +1253,9 @@ dependencies = [ [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e48a83f01c1469df3803773535052444c25ac050b070b1c18b48a378d913c8" +checksum = "be3b4fafc31f17da1b4ea403c4118e4f4f1d9a5a696729b374551d582e48633b" dependencies = [ "parity-scale-codec", "scale-info", @@ -1138,7 +1284,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "log", "pallet-aura", "pallet-authorship", @@ -1164,6 +1310,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -1219,7 +1366,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "scale-info", "serde", "smallvec", @@ -1227,6 +1374,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", @@ -1245,11 +1393,10 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3840cd4df9976e371b178033469cdcf1f68ab34f5e5fa43675bc1c5374d97786" +checksum = "a3598ffa3d0c5f5651dee8aea016b69c5a3be48ab01fb83f773c93af0cf77c68" dependencies = [ - "assert_matches", "asset-test-utils", "bp-bridge-hub-rococo", "bp-bridge-hub-wococo", @@ -1286,6 +1433,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", + "sp-tracing", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1294,9 +1442,9 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87df6d2289a3ab0699d97b40ac3ef83f944b0db738e326327c267fdeca92b3a6" +checksum = "a585d0a58356e3a6131a2cb77a69af5580af278075cac46a85d54e5f6ea1b982" dependencies = [ "bp-header-chain", "bp-messages", @@ -1408,6 +1556,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" version = "1.1.6" @@ -1458,7 +1616,7 @@ checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" dependencies = [ "aead 0.3.2", "cipher 0.2.5", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1472,9 +1630,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", ] @@ -1491,6 +1649,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.8.2" @@ -1522,12 +1690,12 @@ version = "1.0.0" dependencies = [ "clap", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "pallet-im-online", "pallet-staking", "polkadot-primitives", "polkadot-runtime", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "polkadot-runtime-parachains", "sc-chain-spec", "sc-consensus-grandpa", @@ -1618,9 +1786,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.4" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive", @@ -1628,9 +1796,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.4" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -1640,21 +1808,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "coarsetime" @@ -1700,6 +1868,7 @@ dependencies = [ "hex-literal", "log", "pallet-alliance", + "pallet-asset-rate", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -1717,6 +1886,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -1724,7 +1894,7 @@ dependencies = [ "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "scale-info", "smallvec", "sp-api", @@ -1732,8 +1902,8 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", - "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -1822,6 +1992,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + [[package]] name = "convert_case" version = "0.4.0" @@ -1962,7 +2138,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -2060,7 +2236,7 @@ checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2072,7 +2248,7 @@ checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2087,6 +2263,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -2094,7 +2280,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2104,7 +2290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2127,9 +2313,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc007c63cdec6ce1f8e51cb98cce4631889881b9b9b763823164d362621afa0" +checksum = "071cdddd31e2b0d47a74249675de828857f61eb5f6afa36cfcf63ea6ee2b60f2" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -2146,9 +2332,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320bbaf34d68a20f48c20b751df15aad015d43f8089994761ff0234cdfc40e9a" +checksum = "5d1cb9d43cdfeedea19b4f6b8386e5b6264a97938b29f5c711a84e9dc7105ff7" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2164,9 +2350,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" -version = "0.2.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0328425da88d976f122d28fdf23b094b6171b3c33adda8789495bb84ff0cece" +checksum = "d20d2280051998fcf113f04d25d4b39f27b449570b6350fdfb7e92541cb0aae7" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -2179,6 +2365,7 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-parachains", "scale-info", "sp-core", "sp-externalities", @@ -2195,21 +2382,21 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7dde6ab318d17f36551556bed0f525cb7c823ab8da06ecd7b65140932da3a4" +checksum = "84baea20d10325b2501b6fa06d4a7902a43d6a6c62c71b5309e75c3ad8ae1441" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5345c0370ae667404209f674b0d1e40c6a476ba4d8fce2cd645fa224394d35" +checksum = "0bf9aaa60ed60ee9cbfc55535a6e2a01353c8308135e24d6c50ba989e518f17d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2222,9 +2409,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45dc968dcf8a41f72b1035f1ba1dc43d3577192e612bf4f19bbc6c34b73c8a1a" +checksum = "4ff03e14a0f5847bdee67a673ee945d3acd5c1d7238d46993208dcbfb774e27f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2239,10 +2426,11 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c6c8e354bcfc7ca04f316e1d4ef8e33b17efaae8f15af3ed8d360fb2bf0589" +checksum = "b6af9816dd6564149729ba133c2c984c88fb15c4a2cb66f57be06b9147744e51" dependencies = [ + "bp-xcm-bridge-hub-router", "cumulus-primitives-core", "frame-benchmarking", "frame-support", @@ -2250,8 +2438,10 @@ dependencies = [ "log", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "rand_chacha 0.3.1", "scale-info", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -2261,9 +2451,9 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63861b6bfd937c5eaf60058147c036caf07c4462d3f5098af24a4a757b64fe29" +checksum = "d40f62add2352287be4cb58b0017a91f61d953e2c6d2777c20d93185558196e1" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2279,9 +2469,9 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffef2e14f1dc33bd098050209d75c9ab12512498bb498bc8f252f05e3b425853" +checksum = "9d0b1e0e6dcf393dbf05b31122a8c4739acf407a96ec8fd707886f36ee95c355" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2303,15 +2493,17 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e444b76437537a1e045b3d5e20b10117389eb865c60ce044c88dfd59261bff2" +checksum = "6b4ef704f5a346711d0448f82e57dc5784b186f4bf5e3efbbca0df814b203539" dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "sp-io", "sp-runtime", "sp-std", @@ -2322,9 +2514,9 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e11d8ee7a514ba2bc309f5b52da520c719250a9622189f40256268db38c9db" +checksum = "af081ef8885042e7ae96e9d1cf32ec6f0616fe4cb78f0325ed7c5accded687fb" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2341,9 +2533,9 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0100a89d8a8924934f861c427cc0e6ec8e5255f79ee8aab5faa87888e2d5b91" +checksum = "59b921a9cb6758faa1c739f135fd87aa1e10a4e86a1c1db3119b396a62287cf2" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2363,7 +2555,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2376,7 +2568,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2393,7 +2585,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2405,7 +2597,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -2432,7 +2624,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -2449,7 +2641,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -2667,14 +2859,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -2691,13 +2883,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2719,23 +2912,23 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "docify" -version = "0.2.1" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029de870d175d11969524d91a3fb2cbf6d488b853bff99d41cf65e533ac7d9d2" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.1" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac43324656a1b05eb0186deb51f27d2d891c704c37f34de281ef6297ba193e5" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", @@ -2743,9 +2936,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.31", + "syn 2.0.41", "termcolor", - "toml 0.7.6", + "toml 0.8.2", "walkdir", ] @@ -2814,15 +3007,6 @@ dependencies = [ "spki 0.7.2", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.2" @@ -2833,20 +3017,6 @@ dependencies = [ "signature 2.1.0", ] -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - [[package]] name = "ed25519-dalek" version = "2.0.0" @@ -2854,7 +3024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ "curve25519-dalek 4.0.0", - "ed25519 2.2.2", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.7", @@ -2899,7 +3069,7 @@ dependencies = [ "pkcs8 0.9.0", "rand_core 0.6.4", "sec1 0.3.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2918,7 +3088,7 @@ dependencies = [ "pkcs8 0.10.2", "rand_core 0.6.4", "sec1 0.7.3", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -2957,7 +3127,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -2968,7 +3138,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -3071,29 +3241,17 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", -] - [[package]] name = "expander" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -3164,7 +3322,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3174,7 +3332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3267,9 +3425,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4797e9270d3315a1724880ca63eaaab8f11cccbd76943a0f5c6ace9621016b47" +checksum = "1c2d0a4310dcf0e5cce78e35e60dc2fda80ef61c8f8fc382e685dfc24fcf5db9" dependencies = [ "parity-scale-codec", ] @@ -3291,9 +3449,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949ba5b5c9d552c37d7ad39bd837394c1d21727281ef32882539bc2ec6687b2d" +checksum = "3dd4946d63eab00d899f08a7e74e965cc6785c2298efaea6a2752905f4810407" dependencies = [ "frame-support", "frame-support-procedural", @@ -3317,21 +3475,21 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad4e68676c4d0160a7d9134f2376c29fd927844bff2aee1b35dd10d295d2856" +checksum = "03911cf3675af64252a6de7b4f383eafa80d5ea5830184e7a0739aeb0b95272d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "frame-election-provider-support" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e605b5c5ce6abeba8db09dda9ad74a6d781e5c5e722670096df48917f0a33d26" +checksum = "ebad507fb038db2f7ce982d30bd9828a59785c9a4780348d59cd6cceaee80d1a" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3347,9 +3505,9 @@ dependencies = [ [[package]] name = "frame-executive" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382016f6286f2b05a1f65dd97509bc70afd59e26dc8c7ab0126e4220c19abb58" +checksum = "2dda2c20ea3267ee20c9a5482f320236510c4ade6aec1dd930cb57dc5651c64f" dependencies = [ "frame-support", "frame-system", @@ -3378,11 +3536,10 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e4661884c0ac3f2391cfaf4b210af3fdf89216e8e245c843798de23d182a62" +checksum = "a30013df51f4d4e58472c4fecdbfeb141234ece5f6355e5b3a3e51d3f87d452d" dependencies = [ - "async-recursion", "futures", "indicatif", "jsonrpsee", @@ -3401,9 +3558,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "609125451f5ffb1675998e07e64e05e4b3dad330b1537952ace5897d6ed24f0a" +checksum = "023504bbdd0e8d1ebe3d9d289b009337cdb9a24c5e74615ffd7b188aa1664c2d" dependencies = [ "aquamarine", "bitflags 1.3.2", @@ -3442,52 +3599,53 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd22a1ed96e765ec763bbaef2089ed8bb5f8539df40181ddac57be7be74685c7" +checksum = "1d6bc383298353ff2790ac1a301262c21ac196dbc26ef67a2213c46524a06dd1" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "expander 2.0.0", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.31", + "sp-core-hashing", + "syn 2.0.41", ] [[package]] name = "frame-support-procedural-tools" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82858452d9332de312f5ff411fd8aecee2323a344b241078f565b8c3c2e47d38" +checksum = "b3ac1266522a8c9a2d2d26d205ec3028b88582d5f3cd5cbc75d0ec8271d197b7" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c7a09be6bd676fc01c5dd5ba057ba1f7e492e071d4a5fd7c579d99a96093d6" +checksum = "d9c078db2242ea7265faa486004e7fd8daaf1a577cfcac0070ce55d926922883" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "frame-system" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40dc2f4182ad4c05275b0d3f38e3e74bd1cd17231f28ce1e879177fd9829887c" +checksum = "57e316407c45a5093c833966a906301aa0dcbd05048061cd9cde2548d017bfd9" dependencies = [ "cfg-if", "frame-support", @@ -3505,9 +3663,9 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "097cc1f91dc52a648c6b983ebf7aa75bf395b038354772b47e190ecd4caac9a8" +checksum = "b5b1388055d29a7a1c4d41b1623d3fcbc9d7f31d17abe04500b270b26901d926" dependencies = [ "frame-benchmarking", "frame-support", @@ -3521,9 +3679,9 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27a0f4c5811e962938b8f93787ae907eacf8312f6797d5efd53fd9d1f4590562" +checksum = "17572a34fd866ad6cab6977a2c30b38645e0a499b3486de00ae9103f7002d6d3" dependencies = [ "parity-scale-codec", "sp-api", @@ -3531,9 +3689,9 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6becaab3f4648f9c5eeb8eb270614b7e4b5fd7d1deccab1d4a86cb41f8fb06d4" +checksum = "f082e770275f9b46ddf46b09bc7a993f84db691c39d9e4d038ac07443cb17a18" dependencies = [ "frame-support", "parity-scale-codec", @@ -3636,7 +3794,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -3815,6 +3973,7 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", @@ -3838,7 +3997,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3849,7 +4008,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3909,6 +4068,19 @@ name = "hashbrown" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.0", +] [[package]] name = "heck" @@ -4378,6 +4550,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -4569,23 +4750,14 @@ dependencies = [ ] [[package]] -name = "kusama-runtime-constants" +name = "keystream" version = "1.0.0" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kusama-runtime-constants" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87fa26eba25489f17e493dd50a8b8f49448432bfd98ec06f730c83034a154e" +version = "1.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -4594,6 +4766,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", ] [[package]] @@ -4657,6 +4830,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libp2p" version = "0.51.3" @@ -4786,7 +4965,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek 2.0.0", + "ed25519-dalek", "log", "multiaddr", "multihash", @@ -5124,7 +5303,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5207,6 +5386,18 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +[[package]] +name = "lioness" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] + [[package]] name = "lock_api" version = "0.4.10" @@ -5281,50 +5472,50 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -5482,6 +5673,31 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.0.0", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.4.1", + "thiserror", + "zeroize", +] + [[package]] name = "mockall" version = "0.11.4" @@ -5790,6 +6006,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -5871,11 +6088,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orchestra" -version = "0.0.5" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" +checksum = "46d78e1deb2a8d54fc1f063a544130db4da31dfe4d5d3b493186424910222a76" dependencies = [ "async-trait", "dyn-clonable", @@ -5890,12 +6113,13 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.5" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" +checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" dependencies = [ - "expander 0.0.6", - "itertools", + "expander 2.0.0", + "indexmap 2.0.0", + "itertools 0.11.0", "petgraph", "proc-macro-crate", "proc-macro2", @@ -5936,11 +6160,11 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e332ac5e332a88494488e502425aab59fbb8aaa96068c5ec75020b0ddd5eecc8" +checksum = "a3526a94a8aca9d98f06eb8ee76e1bf65f80fd23c278b25e6537a23b51392a85" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-benchmarking", "frame-support", "frame-system", @@ -5958,9 +6182,9 @@ dependencies = [ [[package]] name = "pallet-asset-conversion" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1661ad646244fd155fae26799b9f12246aac8a18ed785550ceea6e4ac25cfbdc" +checksum = "dd7f0ae643c877d9a36d7335bcda6614861b846a60f448da8cf3276d4042ef33" dependencies = [ "frame-benchmarking", "frame-support", @@ -5977,9 +6201,9 @@ dependencies = [ [[package]] name = "pallet-asset-conversion-tx-payment" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47e76551d0029aa4e8d28d0108c4575fae812ff2c9e7a7fd79890a4c7a8223f" +checksum = "64952179a5a409dead964a387c86a29d16d40a34cf54bf88e4d74ffdcdddf7a6" dependencies = [ "frame-support", "frame-system", @@ -5991,11 +6215,27 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-asset-rate" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740aebbcfefe8528f56ff8a339f810520a28df3ec159d016ef719aaa9f131af4" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-asset-tx-payment" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b0aea073ae2b627ddb7e775abb7872df8efb7fabd7c50dd05d3ca6ef0c72a4" +checksum = "028e30633114612160fc4e7add46504790abb3780db79eae1efae98c034dca0b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6012,9 +6252,9 @@ dependencies = [ [[package]] name = "pallet-assets" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2efdbd9727983844e1b82da41870829c0fd5d47ccb700fb27d734b3823d44ae" +checksum = "09b91035c82dc9e64eaf52f3f6a39f4674bcb56333553882d6ff5d12500a9182" dependencies = [ "frame-benchmarking", "frame-support", @@ -6029,9 +6269,9 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2cf20aa88b42b71e70d254db752673e0a67f4cefd070b33c1e42d8b7d25d9a" +checksum = "04fbef67cf62445b7fd8e68241e6b71d9fb8c77abb3d52259eebf525a4cd5586" dependencies = [ "frame-support", "frame-system", @@ -6047,9 +6287,9 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a335fdce40d450adf27def590d1f1c1f42a49f6f91420063ae2391b9eb88b4d4" +checksum = "fda272a66bbf1602579efcede67606ac43cda6d462ad551c527d8cadc871813d" dependencies = [ "frame-support", "frame-system", @@ -6064,9 +6304,9 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cda9086337d01cdb509422cbe7290aa17edab7bf5677218faae30dab23205a6" +checksum = "2d38eab59f7d15fe43c81fc3cd92f4c1f895ca6d0efb74fc2a6d6d7d3d34d413" dependencies = [ "frame-support", "frame-system", @@ -6079,9 +6319,9 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d7e474e0f5e9987b315dabe11269520cec98b44131e51a342e6a9d3a3d3f36" +checksum = "6b12430ca4b79b27231acb1ff3f99d33d6503fbeba40bfc8380e42d59b6d52b0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6104,9 +6344,9 @@ dependencies = [ [[package]] name = "pallet-bags-list" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd87d03bd1aee46275df25838fc5ba8c01fdb8df8a6860daa3d0f0b973a74ace" +checksum = "5d49c4448e51a5c64d63a4263aebeb2dfb90dabb48746e178b337fb7f533d45f" dependencies = [ "aquamarine", "docify", @@ -6127,9 +6367,9 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0486a52507072bd738dc851acf7b42def3645db10777f93dccdaa5933e41269b" +checksum = "9de2915b425ae77d63ba25c194780599b7be25307454a138cfb316c16d001e68" dependencies = [ "frame-benchmarking", "frame-support", @@ -6143,9 +6383,9 @@ dependencies = [ [[package]] name = "pallet-beefy" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7b81cbf5d642ee2881f7860390e70a290e1f94afbc3b27d59f137e8fdeb69" +checksum = "8563fce9fdb0e557015c0b58ed7ea7d5c1a4a1ddb1d27bf56e040d6bbf5c79e9" dependencies = [ "frame-support", "frame-system", @@ -6164,11 +6404,11 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60cca2fe7df196e41e2d43fcb97a76f68ff76dae38861b60e837d1a86ea9aa1a" +checksum = "ee3ed75c348ba23064cea40dab623719ef348bfe67ea39f195f82e2e7a7d0115" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "binary-merkle-tree", "frame-support", "frame-system", @@ -6190,9 +6430,9 @@ dependencies = [ [[package]] name = "pallet-bounties" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf8df1ab55bac70ea7a99794d7bace2a311cc3049654aef3965516b181654b88" +checksum = "74c0fb83c88f217e5bfe07a69a6d8a6c32d01241159ab81705ba5d4c3e24aaab" dependencies = [ "frame-benchmarking", "frame-support", @@ -6209,9 +6449,9 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15ac3a6a500cf11ec838450054d26c330ea9dc792a5a7c2fc469d69e31e8816" +checksum = "1fc5083b92333f5ad64eb97d7e54978bd53c9ac8de8ac3c4056585fd236254d0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -6231,9 +6471,9 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c4b5a64fd5ea73836f03c04c290ec66b53aca8f5c714bd805508a6e84ef904" +checksum = "c8e61922a3b67f17508e27ab2bba9dd03d4b2e6878d8c0819f7e155544443cfd" dependencies = [ "bp-messages", "bp-runtime", @@ -6251,9 +6491,9 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c179f0b5b698b0f643c7eac740a9e3bdea6561a3539aa45930f074f1bc1c8c" +checksum = "88703f22433e3bc5ba69f89b6002fd28c74753a1ab425117f103e91fec05696a" dependencies = [ "bp-header-chain", "bp-parachains", @@ -6273,9 +6513,9 @@ dependencies = [ [[package]] name = "pallet-bridge-relayers" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ec236d325f1d9c5d24023088181449ca9f41e9351a2be25b2f82796be16450" +checksum = "04af803c4fb3e48a83325bb4781505fc5268e364f488116cf6718ddbbe57937d" dependencies = [ "bp-messages", "bp-relayers", @@ -6294,9 +6534,9 @@ dependencies = [ [[package]] name = "pallet-child-bounties" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03417c311cb707b1f0994397856e9a3611dd358f0caf67ccff91ac4ae45a005b" +checksum = "2246ce705aee37f9b6ad818e3646910d31ef4191e1c234bff054a710ef8d8a38" dependencies = [ "frame-benchmarking", "frame-support", @@ -6314,9 +6554,9 @@ dependencies = [ [[package]] name = "pallet-collator-selection" -version = "4.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2716f12bd4d379080b8d6de82c8293f6ba2a4b4268fdf690dd71e68d52ad4ab9" +checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6334,9 +6574,9 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2afbe5f8793d4d01e88e39ad02c656333bafabd86f87e5699f2b4022d8057eaa" +checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6352,9 +6592,9 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520968f141a44b3dfd73ce4be80de07010c3847460bfbc5fb726d329f765f903" +checksum = "1c8ff7512a377b708f71772e5169550cebc8f74bc8c26553015698eaa0975356" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6370,9 +6610,9 @@ dependencies = [ [[package]] name = "pallet-core-fellowship" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aeaa8fe18020ff64792b883e1be6cadf695556e44279893216cb48bc0d7270" +checksum = "0c52f9f5ce35127f55972845c49604309e8df81facbc34560abc680df5515383" dependencies = [ "frame-benchmarking", "frame-support", @@ -6389,9 +6629,9 @@ dependencies = [ [[package]] name = "pallet-democracy" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d44914750d93d466020b7d90c1170ce3e3b1fe3876df428749f4896a37bb5a" +checksum = "ed9f24ad18db2eeae0f03ba1743a82aaf300e0bbd6cdcb1119b0da93eef3d77f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6408,9 +6648,9 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed40f39a03e6734c60d760e6b7ad5f1e115ac1d36f02a3111e60421b9ba0d2e" +checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6432,9 +6672,9 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b31f394ea662fa9199c89c5712046fbd18e52211937332016b359ac81aef69" +checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6447,9 +6687,9 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1373439465e6110ed0ab60905660d097df2d05736e008d6bc1d415b5fdb2386a" +checksum = "021da1d28b604b3654f895987dcb1ccb47d73102b31bc84c8f784bed261f01d8" dependencies = [ "frame-benchmarking", "frame-support", @@ -6467,9 +6707,9 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87789ed95833afcface11a8048708dafa35951308d7de5e9aed666e8044b3cc6" +checksum = "05634a197738c999a3032393916182fedccce13cb063fc330ee9bf810cd53b49" dependencies = [ "docify", "frame-benchmarking", @@ -6487,11 +6727,11 @@ dependencies = [ [[package]] name = "pallet-glutton" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e705170005c5ebf054dae6252aea11082231e1d45ef4f54794313183b71bbc" +checksum = "9c3686506ac15f9b0442f5dffe496b68fca391116acfb6baef65524bb08c94f4" dependencies = [ - "blake2", + "blake2 0.10.6", "frame-benchmarking", "frame-support", "frame-system", @@ -6506,9 +6746,9 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b77a81a40b8f2cf6dcd49eaa69b882c1ebb651a381e959a62a875d782cac856a" +checksum = "b87c7f4cd94a526054dfebf7a84fbcaf6385033defa246ad83e321e71f8c5a92" dependencies = [ "frame-benchmarking", "frame-support", @@ -6530,9 +6770,9 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c9a8b0a02ae7650a8fd188b26fa0852152021fafb5da6d69e1d17f9d03e714" +checksum = "735bf6c19d30299e2d448797170a67d41c6a8ba593fb3a71ce4e11d3b85c60e9" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6547,9 +6787,9 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70314914e290dbdb52adea50bf3e15965ca7b72c5a02d35dd6b9ded60bfb4877" +checksum = "59eb1c68cc6b4700ad1d2a81ba847ff7b37406aa0326b7716825155d3f985762" dependencies = [ "frame-benchmarking", "frame-support", @@ -6568,9 +6808,9 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b23c5b95f9ef2fd17c01cc6948c88aa9e263a49a90e1a5665798d744e5f8956" +checksum = "0893ae7f2211010e92bf57fe31f18e2223a2f97f6d6393aa7192e283ec520beb" dependencies = [ "frame-benchmarking", "frame-support", @@ -6586,9 +6826,9 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a055f189d360aca0919b65b91ab0b701e6bac2143ac46a285a9faf9ec7208e" +checksum = "2e1504034588eb733f8ce98b77757e9a7390662313aa133ef1e3b9fbb94359c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -6604,9 +6844,9 @@ dependencies = [ [[package]] name = "pallet-message-queue" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa98dc8e920cf04f55c8d5ee878477a5be826952b99fe106e72c847c3391d0e" +checksum = "0776bf51d03bd746159063fa1357234feb85114273d40ef3aa3efba65d091eb4" dependencies = [ "frame-benchmarking", "frame-support", @@ -6624,9 +6864,9 @@ dependencies = [ [[package]] name = "pallet-mmr" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7596f59b17e1ee05040d4fc0070d3ae781de34e847be95423d7f5310c3a9d63" +checksum = "e2b9789cac80b48e9427724d0b400f984fb844fc711fc2dd2d0cdccdedda7169" dependencies = [ "frame-benchmarking", "frame-support", @@ -6643,9 +6883,9 @@ dependencies = [ [[package]] name = "pallet-multisig" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e44176821dc2c2caface4303cfac8e8aa18ecf2bb15504f4a460abd2cb52dcd" +checksum = "fea2785a0bfb1884a8283bf65010bb7189c8fce958ced9947a8c71c148ef199f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6660,9 +6900,9 @@ dependencies = [ [[package]] name = "pallet-nft-fractionalization" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3160a1cbdc2a28363bd2ff4cba72ccb96a98cbb86a81ab694b4e99b79a62fcee" +checksum = "959fb2e68e4421650538d9b64a3243f0a0cdc8962f35f749af18bf9b70f7253d" dependencies = [ "frame-benchmarking", "frame-support", @@ -6678,9 +6918,9 @@ dependencies = [ [[package]] name = "pallet-nfts" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3650227e8678336e93b679e9eeafdb1e0ff04bffcca148c00e3fb906ff5b08" +checksum = "999a30c5861a83a6ab38a564df99f976f0bc6bf54b03620abc568bba5f7b4834" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6697,9 +6937,9 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de7f6a1613d3391121afd73548f4f37bea22cd7d5ce269db83a497ccc286c86" +checksum = "f1a64c725e28fdf7d2512c1ce8eab8ba05fc7211fb864ee6c3d2300a2b3bd381" dependencies = [ "pallet-nfts", "parity-scale-codec", @@ -6708,9 +6948,9 @@ dependencies = [ [[package]] name = "pallet-nis" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422715b4239456d73a78bae69a7411836c54bda35f69753524eff601ca910102" +checksum = "7aa7ec891b7f1801a405095a2ad2c70eef94d2abe86792eee54794de23cbd035" dependencies = [ "frame-benchmarking", "frame-support", @@ -6725,9 +6965,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ab7e472a983273ad52af65ac431769fda82a272e54631e451a47ea99c24b15" +checksum = "1896f33fff0c41934532fb492078d78b784f301ddd81e5041dd8e8279e652c49" dependencies = [ "frame-support", "frame-system", @@ -6745,9 +6985,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f6f692dd7cab2ab8aeafe3a9dce645afe818712df62ac3ae432696731bb509" +checksum = "b27cbf4a47cc79862d254f16b38c68fd2dda087ce58e7c0021859d89718e865a" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6766,9 +7006,9 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5eb57e511e2d084b4d3b00b70cb36d0b8474222a86b2195da6b61503ac6f8" +checksum = "65c256cc530a19ff614f2af9b5c95ae9aa777a2bf1542aa455ae65e842f8c924" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6778,9 +7018,9 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa80a36a4d7d42d2aab354242dbd37c1d253f30255be2b3edc357dc9f2ad7916" +checksum = "f3fd14c02ed4b689652826aa93284aada5a2cf859df3cc34ad88b2fd410a8c50" dependencies = [ "frame-support", "frame-system", @@ -6796,9 +7036,9 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b4aabb1ea386486bd4a42ab3a067fdffae6716876d59c0e3fa1cf3e1040201" +checksum = "b1b3ae77cfb16f0495372853d42a44e34ab7b183bd8996a8cee91715f783ff49" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6821,9 +7061,9 @@ dependencies = [ [[package]] name = "pallet-preimage" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e00ea296ac3f7f543a409e177b771459b14c76b33145d1374eabf984ebc34f14" +checksum = "a1ed40405c758b52375cfc75aac74f10ff9bb9480569e5cfca42682e2db6c387" dependencies = [ "frame-benchmarking", "frame-support", @@ -6839,9 +7079,9 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186b0aa4c542217f8c6e0afaa1f5d9aea257019af6d426f591c2764e7b71d3c8" +checksum = "0fbc0b550f5cbbad51f9daf795cc7046d40bbff256dae8d6072fd710ab40fd3a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6855,9 +7095,9 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8cf8915fcdb60a6dffd6cc20eb4bf2f95bd1f9424f598d1e99d47be0d84fa0" +checksum = "8181da7fd6b9adf4f8641c5bcb156cd209e3226eea87ee9f9b1ac41f8e37c714" dependencies = [ "frame-benchmarking", "frame-support", @@ -6874,9 +7114,9 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8c78735503c504465acf94b6ea3174f1a046bbbd8246d357fee0ed422e8a26b" +checksum = "889fddd16cfdea09c2ae4dc8e9f67a1ec4b8ac680412cffb772fa572489ec687" dependencies = [ "frame-benchmarking", "frame-support", @@ -6890,9 +7130,9 @@ dependencies = [ [[package]] name = "pallet-referenda" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99bdb6d7fcdda9c4a85efbbc5ea5499e07e339491d25ac913649c196a78b6d31" +checksum = "592ff9873af379bf55e835072afd787cd6435204213ac484e86345b026f4ae4e" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6910,9 +7150,9 @@ dependencies = [ [[package]] name = "pallet-salary" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "477ba8329b1984377cd94d62b869ce976de2176c3126f58aa6efdcec808b236c" +checksum = "22ac035a8cccd7297ad03ad8ebe372b01f451aaafa9b243f5ce59b061d0806b1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6929,9 +7169,9 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfdb4f02689fb9c4f22190f60be1acc5e6553d1c89b44272509bea2ebd1855a" +checksum = "3508a51d359c6640577feead9dc00667f38cec385baad77b636c61ff746ffe24" dependencies = [ "docify", "frame-benchmarking", @@ -6948,9 +7188,9 @@ dependencies = [ [[package]] name = "pallet-session" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f6f04ae97b311aa20a91a8b0bf92f7e231cff993547d3e874c3e60020cfa96" +checksum = "768a6fb5333efc2bd2a3538c1d6ffa4178398660d4e3be89f2eb82d4e9088ae6" dependencies = [ "frame-support", "frame-system", @@ -6971,9 +7211,9 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a370a07dbfaa94bcc5e01f4e9cda1ad6fbca019bcb0a172a2ee26f61e736dbab" +checksum = "5401cee669394e86a15851ace4ad60ef1b4d656f11ff22c83d8004051279ea59" dependencies = [ "frame-benchmarking", "frame-support", @@ -6989,9 +7229,9 @@ dependencies = [ [[package]] name = "pallet-society" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548b95cf82dd9caa346469a679cdef63a34d7105a009e33eb3930f41a70b2b64" +checksum = "36959be2c7f810ba6b8ece8cfe2ee515774c1c776f1ed0bebf3b9e8068f6a435" dependencies = [ "frame-benchmarking", "frame-support", @@ -7008,9 +7248,9 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b9b137b78565e4012edf20a3c9fd10fa03e3b857dd3999239454da5d4d2431" +checksum = "bed335abd32d357dd9750dae7fb87b01dfd8fe69faadcb94a6e0e0a43057d923" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7032,21 +7272,21 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b1438535c3430a1c3de1d4c92d9a2c0cb664deb8433c8bf4c5298012ab50c3" +checksum = "df8878e29f3d001ac1b1b714621f462e41a9d1fa8f385657f955e8a1ec0684d7" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "pallet-staking-reward-fn" -version = "14.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d48988f4264ff9a8088d40e4f4bfdee9606a9abef1e432987f6e40aec76da6" +checksum = "45b6f832653badb5f70bdfecc1ded64b02b8159b27f18515af03f8b80f1b023b" dependencies = [ "log", "sp-arithmetic", @@ -7054,9 +7294,9 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a3b908034f3c688deacd672a0c838826edb5a3c980c04faf8f5b84edabbc8a6" +checksum = "773c0d24ad4da4b505e47b43e91c8c0af4e835f16104bc770732a4796c174748" dependencies = [ "parity-scale-codec", "sp-api", @@ -7064,9 +7304,9 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8084d2091a88147c1caad25bc03b15f3f7320c18087cfe037b8e21b13bd068" +checksum = "550292d79f281fd1bfbbf2643f10cef3d67068075d46374295f2efe7f7113da0" dependencies = [ "frame-benchmarking", "frame-support", @@ -7082,10 +7322,11 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f10e6b5329062c8d78a9d845ebd1201b9b505e2a4b5aa6b4fdceeeccde0c323c" +checksum = "fcec9f73ecb8d0439a13043a253a9fd90aa6bf5aece6470194bbfc7f79256d88" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7098,10 +7339,11 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924bc62e043df933e6067a2a70a71a16823253e46765e36800f0dc60a0a59018" +checksum = "b25ec8749cf3f481b5e5199be701bac0dea835851b83fc7c455192762711858d" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7118,9 +7360,9 @@ dependencies = [ [[package]] name = "pallet-tips" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8874f39912e560ea6de9c1e51d50dcd8e9fe7a68f2f9b89e5bf42bfc637cdf36" +checksum = "81b17cf8b964e5533f1f5ac1f087f3f69adfead754cb5dd25abe395ec1e7abc9" dependencies = [ "frame-benchmarking", "frame-support", @@ -7138,9 +7380,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eeaaeaf89f80fe3d19ff9ed60430423a7ea70ca91747b04be830499334d55d3" +checksum = "87ef7ceaac786e41613731e3bc48284f1aa3ec260934abda2daed949de6e5ada" dependencies = [ "frame-support", "frame-system", @@ -7155,9 +7397,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8ee4c219399d7353548641d31aea760007f88223d6de72048fd9d13a9a6601" +checksum = "07d87fdc4028155367c6ea98143054a6c00b38bfd77ec08681e289e429e35505" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7168,10 +7410,11 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f099cd65be6adbd3602e5b3df680a5ab868b79c990c5c7b3977e849728632e" +checksum = "8dd462af11574485864023849e0622916b611dbc88111192fb39b1e6d7e666ba" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -7180,15 +7423,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "pallet-uniques" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6615e1af20293b33ec6c2bb30b9e1a9b4e0420c78b5f2aeed8afe244d9cdc6a" +checksum = "8010c79bac1b78fb35b3ee17b40469dec3fcf2eaa6fd863c5be5d96f2ad46bfd" dependencies = [ "frame-benchmarking", "frame-support", @@ -7202,9 +7446,9 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c463bcdbe9b5f84b816ea4095d1aea776acd7bae0e9f6fe074acd84094ace" +checksum = "85a8a6941da32837e4297e0d8abe0a5c94f348a119cccbf27b0f99ee01246c0e" dependencies = [ "frame-benchmarking", "frame-support", @@ -7219,9 +7463,9 @@ dependencies = [ [[package]] name = "pallet-vesting" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fdc85285a6ced9b1ce722d4e7681b6b97ccf3a9ee439eeaf6bfc33c2022cbb" +checksum = "fd29411ef24eb6a856adf1bc33b37ead4835a25dafb1c4c8c95b13fa5247748f" dependencies = [ "frame-benchmarking", "frame-support", @@ -7235,9 +7479,9 @@ dependencies = [ [[package]] name = "pallet-whitelist" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a09403cca331027032f2ba9a992e8b6bcd27d95255dfc30f1f6da5fd32ef57bc" +checksum = "d37304829099cfec7d17df70cfe11ccf6cb7bd624eab80e8e79e895859454540" dependencies = [ "frame-benchmarking", "frame-support", @@ -7251,9 +7495,9 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b913e408dfd2e3b1a1834aa03965b1616bf2d4c24c635a1cdd3ae10335c97e48" +checksum = "04d5e5404d9dadb39390949aadc2c641c16ce4cb0f47ed7a7ff584ab914c2984" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -7273,9 +7517,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49d6f43940cf0146a59ce21a495f32edb746ec16ec67f41d8a4ad4ada79afe1" +checksum = "e6bfdc94e39541b111db7d2c2a95a18a3c3bb42dd37c20b8705727e617ce00c9" dependencies = [ "frame-benchmarking", "frame-support", @@ -7291,17 +7535,36 @@ dependencies = [ "staging-xcm-executor", ] +[[package]] +name = "pallet-xcm-bridge-hub-router" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e2d8a783510d2fb4c0e81f591baad76fa8ebbed0f77852bf23720b299539b61" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", +] + [[package]] name = "parachains-common" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f61ccf16fd574bc10480b1a106bb8536b5dddd38a44de0ce20e6f44b0cb4e1" +checksum = "c7ab598917585ae55b892dbfb6fa5073eb40454c47504a0d0db2634505538632" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", "frame-support", "frame-system", - "kusama-runtime-constants 2.0.0", "log", "num-traits", "pallet-asset-tx-payment", @@ -7312,7 +7575,6 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", - "polkadot-runtime-constants 2.0.0", "rococo-runtime-constants", "scale-info", "smallvec", @@ -7321,18 +7583,18 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", - "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", ] [[package]] name = "parachains-runtimes-test-utils" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f653770c9ad5b9209e76bee456c2979a46a2a0245a8488b70311e005b68d80" +checksum = "4473cc6319cada74f52b4c0b35a7a8b248e0db661aed4e65bd3a4cf676c9d4ff" dependencies = [ "assets-common", "cumulus-pallet-dmp-queue", @@ -7369,7 +7631,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", @@ -7592,7 +7854,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -7647,9 +7909,9 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polkadot-core-primitives" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960aeac8618063cd9eca2a3551a92234a4c9007a970df7bf61d6fc2f9b4b85ff" +checksum = "b08d1d6ca24e1b13f8069e015cfab794344212dd7436aadd61de8086a82664ef" dependencies = [ "parity-scale-codec", "scale-info", @@ -7660,9 +7922,9 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edffd01480c2a68452ea585cd5316447b236eb9c02bc95dba5c9654f8f4a15b1" +checksum = "2cfe6d4769181dce55b1b8fc53f0bd85bb4aa20473702fbce95a94abafa19379" dependencies = [ "lazy_static", "log", @@ -7679,9 +7941,9 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08e1c66cc711d6f5c04be591021c6dedaad1e074f66f3b8bd06553c7f8e5ba2" +checksum = "c51a586fc3ef87c685588a650c18882b4cf069d8adc0d7d9bd2670749cb4e82b" dependencies = [ "bs58 0.5.0", "futures", @@ -7699,9 +7961,9 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f269984611861c4a5297234b4b649a483a5428194790dbea8b711b6e16ea93" +checksum = "f6de513655bf71400299cda1ccaebfa612fd3965e7ce5a9120b4ff37bfc80931" dependencies = [ "async-channel", "async-trait", @@ -7724,9 +7986,9 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883c5f3b51182a2f2f560230bd8e395bafa231dbc50335a4cc7eb3049860fcb4" +checksum = "3e82ee5edac871310bd1ce16a035ad2fc901d6ddd69ea0bbabc7f0a70a02770a" dependencies = [ "bounded-vec", "futures", @@ -7747,9 +8009,9 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07bd4e5a7e83b15fea91d92767e5c2a6a3e280a55d21f9bed9e96c25019cfb" +checksum = "8e1013b3bac6e9b76bbd71433c3eba36b5c0fa9306bfc473ec02e3a104e156d2" dependencies = [ "async-trait", "derive_more", @@ -7760,6 +8022,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-primitives", "polkadot-statement-table", + "sc-client-api", "sc-network", "sc-transaction-pool-api", "smallvec", @@ -7772,9 +8035,9 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2012254af68764032245239030ffdfca0c2b0d126de84c0abb3f62a02dba3b68" +checksum = "e2f547e981cbd72357ba30952193844d30de5063e9d304c117c9b941f12b5f84" dependencies = [ "async-trait", "futures", @@ -7787,7 +8050,6 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", - "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -7796,9 +8058,9 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be23c13fd44bab7ed83eea35e1b68bcd21d61cbc6bb15451a8b0a00e627f0ab" +checksum = "42265630c0c48e25d7ee5a9f4bdcafd003be65c0a44deeb6541620ca169fa519" dependencies = [ "bounded-collections", "derive_more", @@ -7814,9 +8076,9 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2c1568c0e0e40b24e8aa149c9194f692c9f9d1f999ab2024974bf47b9323bb" +checksum = "ee4508ff6b035edc08c54bb61238500179963f6f1eb8266dce6a5625509124bc" dependencies = [ "bitvec", "hex-literal", @@ -7843,6 +8105,7 @@ dependencies = [ name = "polkadot-runtime" version = "1.0.0" dependencies = [ + "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -7855,11 +8118,14 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-bounties", "pallet-child-bounties", "pallet-collective", @@ -7875,6 +8141,7 @@ dependencies = [ "pallet-indices", "pallet-membership", "pallet-message-queue", + "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -7904,7 +8171,7 @@ dependencies = [ "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants 1.0.0", + "polkadot-runtime-constants", "polkadot-runtime-parachains", "rustc-hex", "scale-info", @@ -7914,12 +8181,14 @@ dependencies = [ "serde_json", "smallvec", "sp-api", + "sp-application-crypto", "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -7946,9 +8215,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92ab9a0a68d66e0541a150e00e90480e94992d5d7e0494248a4661b1f355ee8" +checksum = "a788f8ed8b33262c33f72d78e3416c5991e40d333178ae43000a92181ee44bca" dependencies = [ "bitvec", "frame-benchmarking", @@ -7958,6 +8227,7 @@ dependencies = [ "impl-trait-for-tuples", "libsecp256k1", "log", + "pallet-asset-rate", "pallet-authorship", "pallet-babe", "pallet-balances", @@ -7970,6 +8240,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-parachains", @@ -7988,6 +8259,8 @@ dependencies = [ "sp-staking", "sp-std", "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] @@ -8002,28 +8275,14 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", -] - -[[package]] -name = "polkadot-runtime-constants" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9006804184f3f06e5c513d125aebb7764ab8116a340d71ff07ea266c2ae5b159" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", + "staging-xcm", ] [[package]] name = "polkadot-runtime-metrics" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4bb4e450cc3683d3e583067549c292db2c153a80da0af9717e41549a0a9979" +checksum = "bfe45b01d9d621174c9c0eef0871aeead5986393838206fe58df3ae414bcb8d2" dependencies = [ "bs58 0.5.0", "frame-benchmarking", @@ -8035,9 +8294,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b7d429eda889f6511ff5d1a1a86765978e59f4dc9b9b692d5d5dfa22a7436b" +checksum = "936dbae8a7a88dba07da726d779126716e05364d8475ced1c313f32755050a02" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -8057,6 +8316,7 @@ dependencies = [ "pallet-timestamp", "pallet-vesting", "parity-scale-codec", + "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", @@ -8083,9 +8343,9 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b55bf808133addad3d826c344681cf6272acba60a2b9a007f4e4076c2e77eda" +checksum = "22b2a11cb8871f7e30a8f5e455c92d19a186065644ee00f9acda550ff89dacce" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8163,7 +8423,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -8202,14 +8462,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -8222,9 +8482,9 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" -version = "0.2.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" +checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" dependencies = [ "coarsetime", "crossbeam-queue", @@ -8243,7 +8503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.14", ] [[package]] @@ -8278,20 +8538,20 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -8330,7 +8590,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -8351,7 +8611,7 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -8372,7 +8632,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -8530,6 +8790,16 @@ dependencies = [ "getrandom 0.2.10", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -8647,7 +8917,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -8734,7 +9004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -8774,9 +9044,9 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f5a684888cc4995b2916f22014e0356f0a81fd8086079b4c1c11aaf62a8965" +checksum = "272eaa4f1b4b5357d89d1f8f504cb5ee81a105bf7e5c295f053c6e521f2a199b" dependencies = [ "frame-support", "polkadot-primitives", @@ -8785,6 +9055,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", ] [[package]] @@ -9046,9 +9317,9 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75d11155f65cf4e548b916a95fd3c1193d3fa89cbece489e3627cb5cd93e77c" +checksum = "66b4c5976a9cff7fcf24c946276a62ea7837862b6f3bf9f8011f08faf4f08474" dependencies = [ "log", "sp-core", @@ -9058,9 +9329,9 @@ dependencies = [ [[package]] name = "sc-authority-discovery" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1903c35451b28ef27e5fd7cd07f4cb906fa368626e733b6b7315c285d8c3079f" +checksum = "fb7e0e8a4ea5304b65d49c0085a458ed2e43394f95457689875d3e0c6e118dee" dependencies = [ "async-trait", "futures", @@ -9087,9 +9358,9 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5dc368497d940a5744cf427253a4b2f8d2a2cad9b2fbb897a270a939e54b5f" +checksum = "9d3999b9b758c09a6c1155e481b683ee87712f071cc5a0679f9ee4906a14a404" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9103,9 +9374,9 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26e51780635e06b9ff2c41a953c57dcc83d86c9459ee432f24775a44b61f2bd3" +checksum = "ec7e711ea9870d3fb8e2a3ea5b601a9e20c63d0d2f457f40146407721e246a77" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9123,23 +9394,23 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b01ae962b09bc4c95661eed1d6c4996cf72b54f522d0e41d81ae1da65d7bd3c" +checksum = "1f25158f791eb48715da9322375598b541cadd1f193674e8a4d77c79ffa3d95d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sc-cli" -version = "0.31.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0e347f8c3fe530de1e8e3f735cc826d46fb9b53bd41604f1b82159a2186c6af" +checksum = "22c61058223f80c1f961b03f7737529609a3283eef91129e971a1966101c18ea" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "chrono", "clap", "fdlimit", @@ -9154,6 +9425,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -9175,9 +9447,9 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c17ac3b6dcc569998527e9228f6370d22ba84136f4c1753f6ba4d07c41a3f1" +checksum = "c7d32101f415f4d7ddbe8b5de1c1387a78d6dce070e26407ec605fe9f3fc9e23" dependencies = [ "fnv", "futures", @@ -9197,14 +9469,15 @@ dependencies = [ "sp-state-machine", "sp-statement-store", "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c292bad8f2f55772953fc6d0b6970089eb3b1782862799828413b0db847473" +checksum = "d4ced79f609a44782874d856cf39d256838957195ef34f4fb8ced90bf4b725d0" dependencies = [ "hash-db", "kvdb", @@ -9229,9 +9502,9 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc2effbf5b5be7e7b5a0d448d6b83f446cd2425b9be0ab55b97bde8f60a8f46" +checksum = "86e4100cc8fb3876708e1ec5a7c63af3baa75febd5051beb9ddd1e4835fdfc27" dependencies = [ "async-trait", "futures", @@ -9255,12 +9528,12 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9029e051a1ff62dff58219ca654ebecc669e3746cf4a0bc1515f96c2220c9b" +checksum = "30cbc5db21ea2c4ba65b23315e73e69e8155630fb47c84b93d40b0e759c9d86d" dependencies = [ "ahash 0.8.3", - "array-bytes", + "array-bytes 6.1.0", "async-trait", "dyn-clone", "finality-grandpa", @@ -9297,9 +9570,9 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b38c64210870649f89b476295ccd7c078ed7c2b9a3c82f413ad2c9396b63a" +checksum = "225f2ad733bc7234a6638d5203624194824b2f78ab631bc911223f536a66b9c8" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -9320,9 +9593,9 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7023e1d9c86b817995a72e294b98f196cc3eb9c162f0b69ba95c3b0bd841ef32" +checksum = "169c1cfe81ba0e0d44ab4ada1600e30b6a9de588c792db73e32a854a6e3e1a87" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -9333,14 +9606,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61689d40f3840a20d8987cb2a86d3841f2c3ab851a5cea0c6f466a062abbcd" +checksum = "f9167d733e928c528273be63b905ec750cfda85d740453071463da69f7d633bc" dependencies = [ "anyhow", "cfg-if", "libc", "log", + "parking_lot 0.12.1", "rustix 0.36.15", "sc-allocator", "sc-executor-common", @@ -9351,9 +9625,9 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da26c939c308d9bad95a7489a64c84863149451f6b6f5d77be1f8acbba0aa9e8" +checksum = "7189a0b95fe5d79895a107c6c057bc9351cd9c867552200815199cde25bcdb9d" dependencies = [ "ansi_term", "futures", @@ -9368,11 +9642,11 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a26be641a4d25ec382a340f90c26f5422644269422d2f6e8390073a26d9023" +checksum = "abecdf9778fccc254c0b5e227ea8b90fd59247044a30ad293a068b180427d244" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -9381,13 +9655,42 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53ea71ec60601c18d6adcaf7a62698fc2e886c16dc8fdf8d61b3b76244dea38" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0d414c9e17d563a0c0dce01c6b6f10aa50d9ba0e904c2fe5e6b2aaf845f5de" +checksum = "01f519592a971199c486d412dbf38ba54096857080bf4b9d29c9ffabcfee3745" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "asynchronous-codec", @@ -9425,9 +9728,9 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d188183e28b77d7cdfbd07cc251d9e6c6b1c9960405d92943cfc642be1758ef" +checksum = "8fe63a55e03d8bc796ff1e94e7fb62a62acfd7a80a47865a97b55c13371c3e05" dependencies = [ "async-channel", "cid", @@ -9446,9 +9749,9 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d09f99d3845d5bb325641a3de1db8049bccca29e8272e65b8ea415c1153b01" +checksum = "8d236686d15275e4aa49ca929a06fb6fac28aa70e35ee185b981036c149f9e9d" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -9464,9 +9767,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "596fa23e269e218a5cbd9928fa1df30c46fbf9f04cdcf0cbd6549c47e952ad77" +checksum = "b884a9f7cd348c4c1899c0bbf95237e39dffba4baec48d4b98c1046f6bb04fa5" dependencies = [ "ahash 0.8.3", "futures", @@ -9483,11 +9786,11 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f0d6072d48cc9ae8ce06ee8790eccb5268c9af083a9029ff8d38d0e3eb541d" +checksum = "aac888fd720ef8bb2ff7d2b7f7b2e54d17bb85a417cf1e1b6f0f64f7e644936d" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "futures", "libp2p-identity", @@ -9505,11 +9808,11 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b26c047661612e72321a1df53d76e79aad99b0846d795ea3807d9b25baf6d1" +checksum = "10c697aa8f52cf194b9f00113a7d0d3ce5d1456bedd6169a9caae10737f02907" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "fork-tree", @@ -9536,15 +9839,16 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio-stream", ] [[package]] name = "sc-network-transactions" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940233816ec996869ca47c2153d4e66c9df376cf32e62b6c78630f418705fd62" +checksum = "bb7c9bfc7b58ce229d1512158b8f13dc849ec24857d1c29a41a867fb8afb5c09" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", "libp2p", "log", @@ -9559,9 +9863,9 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86ce48d8c8c6b4ebaf4775955cc79985732db5407e4893e0976be8f6b28eb5b" +checksum = "eb277280b6b3519e4a2e693b75d4ca516ebb4a928162e6a1791b217b2be60c9f" dependencies = [ "futures", "jsonrpsee", @@ -9571,6 +9875,7 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -9591,13 +9896,14 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60585da26d11aefb112d3a6925cc75fd76bee1961b2de615e6207df2b86a459c" +checksum = "def499ac717db8442fe18543e52330d5f105027b666df73c0b38e81e9105078b" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -9611,9 +9917,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc99b691cc6a88afc9c64b40e50cdef64920f7b3c3e2d752aa8dfe192a4c2f0" +checksum = "9e8083e1b026dcf397f8c1122b3fba6cc744c6962996df6a30e0fb75223f7637" dependencies = [ "http", "jsonrpsee", @@ -9627,11 +9933,11 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d4a55644ca962d4a094b54bb0e2a30bcbe12c17385096650c771c14f7318c8e" +checksum = "198ea9287111b4060ce1d70dce99804b99d1a92b5fb23a79d94bf0cb460ca3ce" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", "futures-util", "hex", @@ -9656,9 +9962,9 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58550b3ee0bba7beec7d2ce5612b712a34d3326ff68fa95799f6c328f5bb8dd" +checksum = "3623ae5bd7b089da9796a3f1edd974c94f34dd4b4b527146662ef409ae9cd38c" dependencies = [ "async-trait", "directories", @@ -9721,9 +10027,9 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b72de87b85342d40852e2dd8b17c07a47406ffe8f1ce97acb2605769df7ed7" +checksum = "3635fe572adfe796886e18910c8b94f7ce67f9ae3e2c161176e122ddf0baa7e4" dependencies = [ "log", "parity-scale-codec", @@ -9733,9 +10039,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca1dc4ea7ab8b96f0c948d26b2af7e540a8d182ba13f7b81930c119dc50f7087" +checksum = "60967710b85e650652832df73915b64c315f7b437e53c4635bd26106d6d05c21" dependencies = [ "futures", "libc", @@ -9753,9 +10059,9 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba96178e1d0286ecc4a37fbf39a4660d8d10640baedffb58ff18de7162d117cb" +checksum = "28e214e4d46cac02321bc3dc6fd72f019ac10819d1ac8f24f6935a4ae74ef273" dependencies = [ "chrono", "futures", @@ -9773,9 +10079,9 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e86aa30a30596a5ca9e0492474d907edff1e5e569a121bb4eb178f4a262b8d1" +checksum = "83bcd745ea216ba0c0a344cff2c41b12e27846d5fca4b28f56ff77e1d3ff3634" dependencies = [ "ansi_term", "atty", @@ -9803,21 +10109,21 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f602d1fa418385ed0e25be1305c9b03f68ff7ccb3b5df88a2145e7e1fb9117e" +checksum = "9c4ae9e4f957d7274ac6b59d667b66262caf6482dbb1b63f1c370528626b1272" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sc-transaction-pool" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1787f18283fa7714203a705ff3b7bcb288eb85149e3679db0197f09319503f9" +checksum = "6f6db45a057a619670e07deefb4e69aab83386f076363db424907da2b2e82590" dependencies = [ "async-trait", "futures", @@ -9842,9 +10148,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "792c4841d8fba48d4a61e03db45854d8273dee31ae0d4ffb98af5176d0e31a03" +checksum = "1491607f296bb8cce09a5eb3a03320c60ad52bb8120127b26f69c32bcaccd8f2" dependencies = [ "async-trait", "futures", @@ -9859,9 +10165,9 @@ dependencies = [ [[package]] name = "sc-utils" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "563bde62fa4681746c8960d434fa65e7ea40c7fab46692b26998132f43e1e100" +checksum = "81a4769c82dde62b9243dcc166be52e0c5d2d61cf2599923271118d9c8b997b1" dependencies = [ "async-channel", "futures", @@ -9933,7 +10239,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -9991,7 +10297,7 @@ dependencies = [ "der 0.6.1", "generic-array 0.14.7", "pkcs8 0.9.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10005,7 +10311,7 @@ dependencies = [ "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -10106,7 +10412,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -10279,9 +10585,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25d332388412dc3ccbd1c4332876984736ee46b8f4a0ae6ea626d8ebf24ac312" +checksum = "1e902c6b7e8f86718aee7989d6c8ea851d9772cb54a3389f2d729d8df41167ec" dependencies = [ "enumn", "parity-scale-codec", @@ -10309,14 +10615,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", - "blake2", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring", "rustc_version", "sha2 0.10.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -10358,9 +10664,9 @@ dependencies = [ [[package]] name = "sp-api" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86901915aaf9c73f9a8588fae10072c6082e7bf169edae175950410b77ad8103" +checksum = "f582f92ce47c86e4ffffe81fdd5120fea7c850dc0800653a7fa203bcc1532335" dependencies = [ "hash-db", "log", @@ -10380,24 +10686,24 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972809a3e3a583423bca2ee6d08eb5397814ef6b265abf43e888c4ed9916ff83" +checksum = "a896941b2d27365a6f937ebce11e36d55132dc32104f6a48b4cd765b55efd252" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sp-application-crypto" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa730e4f3a2aec3f4ee777410599a86eb17067ee5410c58ab496e88d7bb840c" +checksum = "a93da025616ab59639f8e378df579c5aaa2c8b9999f328a0239156a57c991b53" dependencies = [ "parity-scale-codec", "scale-info", @@ -10409,9 +10715,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3d3ff6d6d717d7563659e9e47e958d33ebd2d0b3d8b1a9961cf9832944375e" +checksum = "f80b5c16afb61dde1037a469d570adcc686440036429e50abe2301ba9d61aad5" dependencies = [ "integer-sqrt", "num-traits", @@ -10424,9 +10730,9 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a92d2af502f53c11c4656f58a1f49856b633f455433c6e0c94e59039f560f0" +checksum = "e204d85bad6f02a5ae8fbba83c365e20459e979fd69db5575ba4b3ea1025ab3c" dependencies = [ "parity-scale-codec", "scale-info", @@ -10438,9 +10744,9 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "149acca1cfe20a2fc888e2e04b2811f7fd04a5bc47630a5d6191664f4ed7b224" +checksum = "6cd16df3d1cdad862d3e764f10f7675876b011e032907423fdfa377ae2ec8575" dependencies = [ "sp-api", "sp-inherents", @@ -10450,9 +10756,9 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4d1f97e0cb623f919b6c6dbcd1d6438b8d8c456df4d045fb2778251d9d7803" +checksum = "4932b97cde61874f395bab9b02443e3bd2046943abb280b63f83da9d0b623ea7" dependencies = [ "futures", "log", @@ -10469,9 +10775,9 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e74272780c5c6ea026b3e66cdd7b369b90e1e94c17d91c41e2359224f2439ea" +checksum = "2c5d7170fb7cfb18024ef7eeb40d272d22b9c3587d85cde2d091e8463b397f06" dependencies = [ "async-trait", "futures", @@ -10485,9 +10791,9 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564b98aa33315f542ba0ace2bb5f94a1a0503608b125edbd6537420fcf03a47" +checksum = "643a7c486a645f398d219d1fbcc8a416cad5018164a212fefde5c2ef00a182e4" dependencies = [ "async-trait", "parity-scale-codec", @@ -10503,9 +10809,9 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53de79497a7ac68e7f414c2fea712b255b129991fbf6cbd63002fab9314437fe" +checksum = "268f9b2e36d4e136c09ad87876cdcfd7ff734cb5917f333fefebff248f95a24f" dependencies = [ "async-trait", "parity-scale-codec", @@ -10523,9 +10829,9 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd87757ce886d92502d11b84022ee42d268ba3a63703c273c1f31f536b01b7b" +checksum = "90e18fe984ea745727e645c43d6a955bc471b3bcd36aa8d260c3bd0deeada0c5" dependencies = [ "lazy_static", "parity-scale-codec", @@ -10543,9 +10849,9 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c750af0e64f19a5c364748c49339900e12f6ecd577f71879052604fd7f9312c4" +checksum = "28bbee685900110419913f281ce0f29457fbc17418f00d15f0212c8043aba167" dependencies = [ "finality-grandpa", "log", @@ -10562,9 +10868,9 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9edd2b6ac697a55075e3a4c5697f1142cd59de015f93aaf0aa843d1194ae268" +checksum = "895b0c176d4eead833ddee5251d3cccbaeb0191ca3f33f84b11d347bebc6e21f" dependencies = [ "parity-scale-codec", "scale-info", @@ -10575,14 +10881,13 @@ dependencies = [ [[package]] name = "sp-core" -version = "23.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "412e2ec53b1bc63778e2d70c347224e6cd2e25c4bacb509585db85f0788747b7" +checksum = "f9ebb090ead698a6df04347c86a31ba91a387edb8a58534ec70c4f977d1e1e87" dependencies = [ - "array-bytes", - "arrayvec 0.7.4", + "array-bytes 6.1.0", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", @@ -10617,14 +10922,15 @@ dependencies = [ "thiserror", "tiny-bip39", "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "558116d02341b6f28b033c19a2a5fa555afa3c52628639170087e7685d51e743" +checksum = "cb8524f01591ee58b46cd83c9dbc0fcffd2fd730dabec4f59326cd58a00f17e2" dependencies = [ "blake2b_simd", "byteorder", @@ -10636,20 +10942,20 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "11.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8681fa136cf504ba2b722fcb10d78df147c15d201b997e06c4c8c72258001a" +checksum = "42ce3e6931303769197da81facefa86159fa1085dcd96ecb7e7407b5b93582a0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sp-database" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac16ca1b4f309dd51a7a06b1843b73e6e81ff70a05dac17d3c8f9c86e4fba5da" +checksum = "9c6e8c710d6a71512af6f42d9dba9c3d1f6ad793846480babf459bbde3d60a94" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10657,20 +10963,20 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b235a0ad7124d58e6f0a728c8354da5b185b77bcf18b131b3a480cdaa23d95" +checksum = "50535e1a5708d3ba5c1195b59ebefac61cc8679c2c24716b87a86e8b7ed2e4a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sp-externalities" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588cf40c36de918f545d712ad1a70631ae71653e4a321506dfcd8fa6fd26453c" +checksum = "884d05160bc89d0943d1c9fb8006c3d44b80f37f8af607aeff8d4d9cc82e279a" dependencies = [ "environmental", "parity-scale-codec", @@ -10680,9 +10986,9 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae51f8a24e1be6593be94581f3465a10d7c86ce403cbf9dcf703d14f35309d1" +checksum = "a0cb71d40ad47e40bdcce5ae5531c7d7ba579cd495a0e0413642fb063fa66f84" dependencies = [ "serde_json", "sp-api", @@ -10692,9 +10998,9 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4355b6a68001ff5308a09fe069c778c184030ee3b95271dd44841d056ecadf13" +checksum = "604229aa145be0cff853b47ffed8bc2c62eb08ec6974d6307b9a559c378e6dc5" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10707,12 +11013,12 @@ dependencies = [ [[package]] name = "sp-io" -version = "25.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9926dba7d67d87e40f49e18ff6cfc01373d5be13e3d373f02182bb5ec8ab37b" +checksum = "0ced350da15e8ba3a106206840acc42a6d3eb0d7e8bf7aa43ab00eac0bdf956f" dependencies = [ "bytes", - "ed25519-dalek 2.0.0", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec", @@ -10732,9 +11038,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfcca2fad349d5fd197a56b4deef229b872c9172a8267d77c81a9f45a38f18a" +checksum = "655ec0b35cb9cb9029fb323aa676b07d58deb872cecc7566e50278409a00ee95" dependencies = [ "lazy_static", "sp-core", @@ -10744,9 +11050,9 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f0f9546dd151881c60e75355806f1cbbc893f64aa465fc5bf87a47de59467b" +checksum = "8b8ec5ebbba70bee83d79c3fe5e49f12df0a4bb6029858ddf9a15eea7539a592" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", @@ -10757,9 +11063,9 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cb1a26782e618f26b43ec8c6ecd799657134cd12af1902ceddaf1fad8031a1b" +checksum = "8846768f036429227e49f6ab523fbee4bc6edfee278a361bf27999590fe020d4" dependencies = [ "thiserror", "zstd 0.12.4", @@ -10767,9 +11073,9 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d493f8324241f20d80cbc920fa0ab7a173907d0bf1a10812098a924cdff48d7" +checksum = "7ca9ff0e522a74725ac92f009d38deeb12e880f5296afbd78a6c6b970b773278" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -10777,11 +11083,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-mixnet" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf61f28ca97aab6c21a3c6e0ed496e60d505e5de1f43fd4ba748c9afaa4fc85" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-std", +] + [[package]] name = "sp-mmr-primitives" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74488c6296d65190b67a3945ef2f5cc8ac0f8b92023dcfc6e88164380654b6a0" +checksum = "0c3b33c20a4b1dd5a0069ced6997078a2af5d625f2c53d1b69bef9e131f42d77" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -10798,9 +11117,9 @@ dependencies = [ [[package]] name = "sp-npos-elections" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234e5bf197f5232cd00aeab2dc0b4c69b9fc2179d4ea67abd11fdea00a54bddf" +checksum = "9ee3536d7fd990c30864ca545d7bdbee02dc66a92ac2a7a66ab4e21521992a7b" dependencies = [ "parity-scale-codec", "scale-info", @@ -10813,9 +11132,9 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e1b9996004e6a39c06e6d66bd7684c8a07e73dd9137a2b6f2bbfde675d636a" +checksum = "9310227f043ed99877b0449a683025a7461431a00995dcd6ef423a273d0fd85d" dependencies = [ "sp-api", "sp-core", @@ -10824,9 +11143,9 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261572cc0db4b41cf7587b4f7bdc15b8f83f748f17ae1c3c2f56a3e8e62ee913" +checksum = "b00e40857ed3e0187f145b037c733545c5633859f1bd1d1b09deb52805fa696a" dependencies = [ "backtrace", "lazy_static", @@ -10835,9 +11154,9 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5828020dd51228aeee12a571720f3354deb95bc159f5edf4b7f2ffb3e023a12e" +checksum = "51867fea921f54bbaa2bf505f373559b5f3b80e8d7f38ecb9677f0d3795a3e6a" dependencies = [ "rustc-hash", "serde", @@ -10846,9 +11165,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f645e9e2c82d052ea48ed987a8789daca1c03f9b5ed1aa49cd080092eda85330" +checksum = "6d9c40ff7303e62219b55635e5245d963358cb77d6916250991ebcb82c0be2c6" dependencies = [ "either", "hash256-std-hasher", @@ -10869,9 +11188,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "19.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef767d6e400ee54a420bcbc570030741420c2d938a6e379d21cab9875a339c5" +checksum = "4f365332922a8cfa98ab00c6d08b1b0f24e159e730dd554e720d950ff3371b1f" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10888,22 +11207,22 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "13.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd795a4a2205b64d95da897f85b7c83a0044f30df22b0ea282f8387dc6ca428" +checksum = "9b2afcbd1bd18d323371111b66b7ac2870bdc1c86c3d7b0dae67b112ca52b4d8" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sp-session" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff5d53ba296b793574fc12b6ebf49d6755d24439979290682ca58d759db5bb73" +checksum = "248dd8f49aa96b56bf0a7d513691ddb4194f9359fdb93e94397eabdef1036085" dependencies = [ "parity-scale-codec", "scale-info", @@ -10917,9 +11236,9 @@ dependencies = [ [[package]] name = "sp-staking" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb11c6a7765d2df277110fe25bba075f697aba999b29a6c9b55eb2b95401b0" +checksum = "ee0feed0137234598bd1f76d0b468c585ea16619ea9ed1acbba82dd24ac79788" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10932,9 +11251,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771dce7d78335718ab8475984b6dbc1f374777049ed1c308186679e611333be2" +checksum = "96e087fa4430befd2047b61d912c9d6fa4eaed408c4b58b46c6e9acd7965f2d3" dependencies = [ "hash-db", "log", @@ -10954,13 +11273,13 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "5.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c431b349889565a6b7f13eaa8216af8f826b015cbe1c9ef21999a44edd61d7" +checksum = "4b8654bcd37602b1811414050d34d14f543873bd4e64e50d210a0116b660c600" dependencies = [ "aes-gcm 0.10.2", "curve25519-dalek 4.0.0", - "ed25519-dalek 2.0.0", + "ed25519-dalek", "hkdf", "parity-scale-codec", "rand 0.8.5", @@ -10979,15 +11298,15 @@ dependencies = [ [[package]] name = "sp-std" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed09ef1760e8be9b64b7f739f1cf9a94528130be475d8e4f2d1be1e690c9f9c" +checksum = "54c78c5a66682568cc7b153603c5d01a2cc8f5c221c7b1e921517a0eef18ae05" [[package]] name = "sp-storage" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20f503280c004d94033a32cb84274ede30ef0b4b634770b1e7d595f8245bda4" +checksum = "016f20812cc51bd479cc88d048c35d44cd3adde4accdb159d49d6050f2953595" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10999,9 +11318,9 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d60953f7fc9b4f51bbcbac8f0cd8d6e6266a7cc18f661330308bbcec1eb053" +checksum = "004a7f453240db80b2967c0e1c6411836efc7daa7afae98fd16202caa51460e0" dependencies = [ "async-trait", "parity-scale-codec", @@ -11013,9 +11332,9 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "12.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebabec43485ebdb2fdb5c6f9b388590d4797a3888024d74724ada2f16b2113b8" +checksum = "0d727cb5265641ffbb7d4e42c18b63e29f6cfdbd240aae3bcf093c3d6eb29a19" dependencies = [ "parity-scale-codec", "sp-std", @@ -11026,9 +11345,9 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa16493e2b8f84b03167c901f4ef7af8fe3e58c4c3426d41cc48dc10597d255d" +checksum = "c7cd2afe89c474339d15d06e73639171ebe4d280be6904d9349072103da21427" dependencies = [ "sp-api", "sp-runtime", @@ -11036,9 +11355,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a926dbe30a0af60eae24ff01c532e545b9093eda36f520f2a744e40112e62b" +checksum = "39ae7c4954431b8479f7b2b6b82f0551cc360a1ee59b6a5276eef86a1099eaed" dependencies = [ "async-trait", "parity-scale-codec", @@ -11052,9 +11371,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78585a84d02d1c71e8eb8c00ed586c22a46ad4e773d9ff65c8ed3b8e98b9f51" +checksum = "1e359b358263cc322c3f678c272a3a519621d9853dcfa1374dfcbdb5f54c6f85" dependencies = [ "ahash 0.8.3", "hash-db", @@ -11064,6 +11383,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", @@ -11076,9 +11396,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a8d11b816cd2c68467c697aecca868ab5828af02ef093681a88554d045b878" +checksum = "3e93da332eba3cb59a65f128da5edd5c70e1475692b45470104e7465b1278471" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11094,21 +11414,21 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "10.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6de7bbf860de93bb9b0ccd8e4a74e0dc40089e7192c397bac2b357d4da74e20c" +checksum = "49535d8c7184dab46d15639c68374a30cbb1534e392fa09a1ebb059a993ad436" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] name = "sp-wasm-interface" -version = "16.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee009ac79098027f5990984e0c5ee2fd4883b16bbd6ab97931f28c2148aaa3ea" +checksum = "d5d85813d46a22484cdf5e5afddbbe85442dd1b4d84d67a8c7792f92f9f93607" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11120,9 +11440,9 @@ dependencies = [ [[package]] name = "sp-weights" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86566cae93412e40bea0db9e6b110a7379105412a9aed1af73b5d2fb69cb7000" +checksum = "751676c1263e7f3600af16bad26a7978a816bc532676fe05eafa23b862c05b9e" dependencies = [ "parity-scale-codec", "scale-info", @@ -11208,8 +11528,9 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants 1.0.0", + "kusama-runtime-constants", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -11281,6 +11602,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -11307,9 +11629,9 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1938a5d4938701c5a1ffd9c6cac6e906e219d85557f061f55f9f41e8d886c6" +checksum = "3a1bcf863664ca5708d92894fc30d2c6606c7dbb7d7cfcf43b9ae69d5b83f4fb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -11322,9 +11644,9 @@ dependencies = [ [[package]] name = "staging-xcm" -version = "2.0.1" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eec456fd5fcbc4dffe9c6042b452c1930eb1d5af5534d6ef36b8238b4517c9b7" +checksum = "7abd0c2e401a1e264379131c27676bc65c9631aaa508044bc04d8ce60a7d8524" dependencies = [ "bounded-collections", "derivative", @@ -11340,9 +11662,9 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "2.0.1" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c1ca6d8f2b7fcbfe8866c1a1cb8105b62c72a74e727dd8c9943e8ac0c410eb" +checksum = "aa3b14246daaf0301dd35d698bac570d82ba0c6c6c1d3e149b93bcf377b2fc6b" dependencies = [ "frame-support", "frame-system", @@ -11363,9 +11685,9 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2ab1d434de75fb698d07d863ebede9745bd500d0284c659055201024627ca" +checksum = "3a85a421053f810f3ed988ba3cc39d926c95f70f1ae73282aa8cd5c50072173b" dependencies = [ "environmental", "frame-benchmarking", @@ -11456,7 +11778,7 @@ dependencies = [ "md-5", "rand 0.8.5", "ring", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "url", @@ -11478,9 +11800,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055e4661d7d20f68388a26419216035df64a06f34506b947c8a6e2db49d85461" +checksum = "ededbe617291db8a47d6e5155486ff1e5425f0bbf5dcb7f752730466a62bd293" dependencies = [ "hyper", "log", @@ -11491,9 +11813,9 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c3d8512f21a03e4eda6b3bb6da45c6840266c66f82a31b57eb183b33d67c7f2" +checksum = "5575c2bef89385e5406565b8fe5620856d414e3846c60927a78f0788cb288c8c" dependencies = [ "async-trait", "jsonrpsee", @@ -11505,9 +11827,9 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "12.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e792ccae135d69e0bc0eaeafc649e356cc9844017502496364d6b13db09e18" +checksum = "12ab1707dbbd129622b771a9b80b25f0ebf1c04854b907bc44b51ec96fb4005b" dependencies = [ "ansi_term", "build-helper", @@ -11531,6 +11853,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" version = "2.4.1" @@ -11550,9 +11878,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.31" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -11649,7 +11977,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -11824,7 +12152,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -11893,7 +12221,19 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.14", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -11918,6 +12258,19 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.0.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -11980,7 +12333,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -12005,9 +12358,9 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d0644282db9729b5e373c01e8c8ba6d239e18989749c8aead177fe293eb5ca" +checksum = "32c0555bd635d9adbf8dec0bf45f7c2aef7541121d648ba37f5f792a211077b6" dependencies = [ "coarsetime", "polkadot-node-jaeger", @@ -12018,15 +12371,15 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599cd79d4843008763dd613a19ca7d28e12e6c43ab69fc5089b7ce587dd8e021" +checksum = "35756d8c1a227ec525853a1080bf890d03d939deb2bc50d4d43c96516c795d0d" dependencies = [ "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -12075,9 +12428,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -12242,7 +12595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12252,7 +12605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -12323,6 +12676,30 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.7", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "waitgroup" version = "0.1.2" @@ -12396,7 +12773,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", "wasm-bindgen-shared", ] @@ -12430,7 +12807,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12452,9 +12829,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", @@ -12468,9 +12845,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -12480,9 +12857,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -12851,7 +13228,7 @@ dependencies = [ "sha1", "sha2 0.10.7", "signature 1.6.4", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webpki 0.21.4", @@ -12945,7 +13322,7 @@ dependencies = [ "rtcp", "rtp", "sha-1", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webrtc-util", @@ -12974,9 +13351,9 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c4085403f25dda1eb8ce8859a118f9681c35687e893a8a2511179f7436643a" +checksum = "682c32c5f5e6d51c431bf66c33fc502c66e7b25488c0bd92f5ee020c329f2beb" dependencies = [ "frame-support", "polkadot-primitives", @@ -12985,6 +13362,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", ] [[package]] @@ -13085,6 +13463,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -13115,6 +13502,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -13127,6 +13529,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -13145,6 +13553,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -13163,6 +13577,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -13181,6 +13601,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -13199,6 +13625,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -13211,6 +13643,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -13229,6 +13667,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" version = "0.5.15" @@ -13319,14 +13763,14 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "2.0.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bde452a547dd6926f94539b113171419b10d2b642a59cad296754259733bca6" +checksum = "401e2b62628da9246dececb06fe58118196557dd8deb9ce12d95cc4aaf56003f" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] @@ -13369,7 +13813,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.41", ] [[package]] diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 60c16ca1e0..f6e63c338a 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -16,20 +16,20 @@ polkadot-runtime-constants = { path = "../relay/polkadot/constants" } kusama-runtime = { package = "staging-kusama-runtime", path = "../relay/kusama" } kusama-runtime-constants = { path = "../relay/kusama/constants" } -sc-chain-spec = "22.0.0" -polkadot-runtime-parachains = "2.0.0" -polkadot-primitives = "2.0.0" -sp-consensus-babe = "0.27.0" -sp-authority-discovery = "21.0.0" -sp-core = "23.0.0" -pallet-staking = "23.0.0" -sc-consensus-grandpa = "0.14.0" -pallet-im-online = "22.0.0" -sp-runtime = "26.0.0" -sp-consensus-beefy = "8.0.0" +sc-chain-spec = "24.0.0" +polkadot-runtime-parachains = "4.0.0" +polkadot-primitives = "4.0.0" +sp-consensus-babe = "0.29.0" +sp-authority-discovery = "23.0.0" +sp-core = "25.0.0" +pallet-staking = "25.0.0" +sc-consensus-grandpa = "0.16.0" +pallet-im-online = "24.0.0" +sp-runtime = "28.0.0" +sp-consensus-beefy = "10.0.0" [features] runtime-benchmarks = [ "kusama-runtime/runtime-benchmarks", "polkadot-runtime/runtime-benchmarks", -] \ No newline at end of file +] diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 44c1f0f7d0..e5c6e6580e 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -8,7 +8,7 @@ use sc_chain_spec::{ChainSpec, ChainType, NoExtension}; use sc_consensus_grandpa::AuthorityId as GrandpaId; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; -use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; +use sp_consensus_beefy::{ecdsa_crypto::AuthorityId as BeefyId, BeefyPayloadId}; use sp_core::{sr25519, Pair, Public}; use sp_runtime::{traits::IdentifyAccount, Perbill}; @@ -73,6 +73,7 @@ fn polkadot_session_keys( para_validator: ValidatorId, para_assignment: AssignmentId, authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, ) -> polkadot_runtime::SessionKeys { polkadot_runtime::SessionKeys { babe, @@ -81,6 +82,7 @@ fn polkadot_session_keys( para_validator, para_assignment, authority_discovery, + beefy, } } @@ -190,6 +192,7 @@ pub fn polkadot_testnet_genesis( ValidatorId, AssignmentId, AuthorityDiscoveryId, + BeefyId, )>, _root_key: AccountId, endowed_accounts: Option>, @@ -200,6 +203,7 @@ pub fn polkadot_testnet_genesis( const STASH: u128 = 100 * DOT; polkadot_runtime::RuntimeGenesisConfig { + beefy: Default::default(), system: polkadot_runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, indices: polkadot_runtime::IndicesConfig { indices: vec![] }, balances: polkadot_runtime::BalancesConfig { @@ -219,6 +223,7 @@ pub fn polkadot_testnet_genesis( x.5.clone(), x.6.clone(), x.7.clone(), + x.8.clone(), ), ) }) @@ -353,7 +358,7 @@ fn polkadot_development_config_genesis( ) -> polkadot_runtime::RuntimeGenesisConfig { polkadot_testnet_genesis( wasm_binary, - vec![get_authority_keys_from_seed_no_beefy("Alice")], + vec![get_authority_keys_from_seed("Alice")], get_account_id_from_seed::("Alice"), None, ) @@ -408,10 +413,7 @@ pub fn kusama_development_config() -> Result, String> { fn polkadot_local_testnet_genesis(wasm_binary: &[u8]) -> polkadot_runtime::RuntimeGenesisConfig { polkadot_testnet_genesis( wasm_binary, - vec![ - get_authority_keys_from_seed_no_beefy("Alice"), - get_authority_keys_from_seed_no_beefy("Bob"), - ], + vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")], get_account_id_from_seed::("Alice"), None, ) From d5028f53ae957c60d55ec580fd21192e763f28ce Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 18:26:42 +0400 Subject: [PATCH 18/53] remove unused import --- chain-spec-generator/src/relay_chain_specs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index c6d5e4dd8c..6429fbf764 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -8,7 +8,7 @@ use sc_chain_spec::{ChainSpec, ChainType, NoExtension}; use sc_consensus_grandpa::AuthorityId as GrandpaId; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; -use sp_consensus_beefy::{ecdsa_crypto::AuthorityId as BeefyId, BeefyPayloadId}; +use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; use sp_core::{sr25519, Pair, Public}; use sp_runtime::{traits::IdentifyAccount, Perbill}; From e9087eaf79ab3163c12baa007da27e24e1722720 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 18:26:52 +0400 Subject: [PATCH 19/53] add weight generation readme --- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/README.md b/README.md index e24a7e40db..60d9c64e29 100644 --- a/README.md +++ b/README.md @@ -57,3 +57,79 @@ Releases are automatically pushed on commits merged to master that fulfill the f The release process is building all runtimes and then puts them into a release in this github repository. The format of [`CHANGELOG.md`](CHANGELOG.md) is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +# Weight Generation + +To generate weights for a runtime, run: + +1. Build `chain-spec-generator` with `--features runtime-benchmarks` +2. Use it to build a chain spec for your runtime, e.g. `./target/release/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` +3. Create `file_header.txt` + +```text +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +``` + +4. `rsync` chain spec/s and the file header to a benchmark machine + +5. Build `polkadot-sdk` with `--features runtime-benchmarks` on the benchmark machine + +6. Create output directories for the weights on the benchmark machine + +7. Run (on the benchmark machine): + +```bash +for pallet in \ + frame_system \ + # other pallets you want to benchmark + pallet_proxy; do + echo "Running benchmark for $pallet" + ./target/release/polkadot benchmark pallet \ + --chain=/path/to/chain-spec.json \ + --steps 50 \ + --repeat 20 \ + --pallet=$pallet \ + --extrinsic=* \ + --wasm-execution=compiled \ + --heap-pages=4096 \ + --output /path/to/runtime/weights/directory \ + --header /path/to/file_header.txt +done +``` + +You probably want to do this inside a `tmux` session or similar, as it will take a while. + +7a. If benchmarking `pallet_alliance` + +Rename `fn add_scrupulous_items` to `fn add_unscrupulous_items` (see `https://github.com/paritytech/polkadot-sdk/pull/2173`). + +8. `rsync` the weights back to your local machine + +## FAQ + +### Why not use `--pallet=*` when generating benchmarks? + +XCM benchmarks are broken until runtimes repo gets . Once this is fixed, we can use `--pallet=*` instead of a list of pallets. + +### Why is this such a manual task? + +It shouldn't be. Now that we have a process to follow, it should be automated by a script that takes as input: + +1. List of runtimes & pallets to bench +2. SSH credentials for a benchmark machine +3. Output dir + +and writes the weights to the local output dir. From 2cd8fbf1e8ec36bf1d2390f74fa9c9d2979f17a4 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 18:28:52 +0400 Subject: [PATCH 20/53] fix changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b6e9f8e93..1591579857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Restore governance lock periods to 7 days in Polkadot ([polkadot-fellows/runtimes#86](https://github.com/polkadot-fellows/runtimes/pull/86)) - > > > > > > > main ## [1.0.0] 22.10.2023 From 5fbce11fe49c3e8642fa31dfd4657344df6ba73b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 18:37:46 +0400 Subject: [PATCH 21/53] improve readme --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60d9c64e29..54d64a9a35 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The format of [`CHANGELOG.md`](CHANGELOG.md) is based on [Keep a Changelog](http # Weight Generation -To generate weights for a runtime, run: +To generate weights for a runtime 1. Build `chain-spec-generator` with `--features runtime-benchmarks` 2. Use it to build a chain spec for your runtime, e.g. `./target/release/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` @@ -89,7 +89,7 @@ To generate weights for a runtime, run: 6. Create output directories for the weights on the benchmark machine -7. Run (on the benchmark machine): +7. Run on the benchmark machine: ```bash for pallet in \ @@ -120,6 +120,10 @@ Rename `fn add_scrupulous_items` to `fn add_unscrupulous_items` (see `https://gi ## FAQ +### What benchmark machine spec should I use? + +We currently use a machine with a Intel(R) Xeon(R) CPU @ 2.60GHz. + ### Why not use `--pallet=*` when generating benchmarks? XCM benchmarks are broken until runtimes repo gets . Once this is fixed, we can use `--pallet=*` instead of a list of pallets. From 3df88f3a13934f15b86f65410873640002036fd3 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 18:39:37 +0400 Subject: [PATCH 22/53] fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1591579857..9f2b49a670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added -- Introduce chain spec generator ([polkadot-fellows/runtimes#78](https://github.com/polkadot-fellows/runtimes/pull/78)) +- Introduce chain spec generator ([polkadot-fellows/runtimes#127](https://github.com/polkadot-fellows/runtimes/pull/127)) ### Changed From dd6ec802098942fb63a09fd38492fe1f31cda857 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Dec 2023 19:34:40 +0400 Subject: [PATCH 23/53] fix readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54d64a9a35..9b8326a8ee 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Rename `fn add_scrupulous_items` to `fn add_unscrupulous_items` (see `https://gi ### What benchmark machine spec should I use? -We currently use a machine with a Intel(R) Xeon(R) CPU @ 2.60GHz. +Google Cloud `n2-standard-8` or equivalent. ### Why not use `--pallet=*` when generating benchmarks? From 19d42617ba521702f352e356dd696a18998bf650 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 15 Dec 2023 11:11:22 +0400 Subject: [PATCH 24/53] profile production --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9b8326a8ee..19b29ca892 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ The format of [`CHANGELOG.md`](CHANGELOG.md) is based on [Keep a Changelog](http To generate weights for a runtime -1. Build `chain-spec-generator` with `--features runtime-benchmarks` -2. Use it to build a chain spec for your runtime, e.g. `./target/release/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` +1. Build `chain-spec-generator` with `--profile production --features runtime-benchmarks` +2. Use it to build a chain spec for your runtime, e.g. `./target/production/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` 3. Create `file_header.txt` ```text @@ -85,7 +85,7 @@ To generate weights for a runtime 4. `rsync` chain spec/s and the file header to a benchmark machine -5. Build `polkadot-sdk` with `--features runtime-benchmarks` on the benchmark machine +5. Build `polkadot-sdk` with `--profile production --features runtime-benchmarks` on the benchmark machine 6. Create output directories for the weights on the benchmark machine @@ -97,7 +97,7 @@ for pallet in \ # other pallets you want to benchmark pallet_proxy; do echo "Running benchmark for $pallet" - ./target/release/polkadot benchmark pallet \ + ./target/production/polkadot benchmark pallet \ --chain=/path/to/chain-spec.json \ --steps 50 \ --repeat 20 \ From 944fccc9f412136cd1a25fa40d075a24d1fb161f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Dec 2023 13:55:32 +0400 Subject: [PATCH 25/53] improve script --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 19b29ca892..be8a382fab 100644 --- a/README.md +++ b/README.md @@ -92,10 +92,16 @@ To generate weights for a runtime 7. Run on the benchmark machine: ```bash -for pallet in \ - frame_system \ - # other pallets you want to benchmark - pallet_proxy; do +local pallets=($( + ./target/production/polkadot benchmark pallet --list \ + --chain=/path/to/chain-spec.json | + tail -n+2 | + cut -d',' -f1 | + sort | + uniq +)) + +for pallet in "${pallets[@]}"; do echo "Running benchmark for $pallet" ./target/production/polkadot benchmark pallet \ --chain=/path/to/chain-spec.json \ From 8226b2718e0677e92d96394d3da7ddf88081b96e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Dec 2023 14:04:28 +0400 Subject: [PATCH 26/53] address comments --- README.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index be8a382fab..c58e6904f6 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ local pallets=($( )) for pallet in "${pallets[@]}"; do - echo "Running benchmark for $pallet" + echo "Running benchmarks for $pallet" ./target/production/polkadot benchmark pallet \ --chain=/path/to/chain-spec.json \ --steps 50 \ @@ -118,28 +118,17 @@ done You probably want to do this inside a `tmux` session or similar, as it will take a while. -7a. If benchmarking `pallet_alliance` - -Rename `fn add_scrupulous_items` to `fn add_unscrupulous_items` (see `https://github.com/paritytech/polkadot-sdk/pull/2173`). - 8. `rsync` the weights back to your local machine ## FAQ ### What benchmark machine spec should I use? -Google Cloud `n2-standard-8` or equivalent. - -### Why not use `--pallet=*` when generating benchmarks? - -XCM benchmarks are broken until runtimes repo gets . Once this is fixed, we can use `--pallet=*` instead of a list of pallets. +See the [Polkadot Wiki Reference Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware). ### Why is this such a manual task? -It shouldn't be. Now that we have a process to follow, it should be automated by a script that takes as input: +It shouldn't be. Now that we have a process to follow, it should be automated by a script that takes as input. -1. List of runtimes & pallets to bench -2. SSH credentials for a benchmark machine -3. Output dir +Tracked in [this issue](https://github.com/polkadot-fellows/runtimes/issues/128). -and writes the weights to the local output dir. From 644181a836b2107dd1fec9e68d507e6deae11a07 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Dec 2023 14:30:23 +0400 Subject: [PATCH 27/53] add subweight instructions --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c58e6904f6..99ffc85cf1 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,11 @@ done You probably want to do this inside a `tmux` session or similar, as it will take a while. -8. `rsync` the weights back to your local machine +8. `rsync` the weights back to your local machine, replacing the existing weights. + +9. Commit the weight changes. + +10. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./relay/polkadot/src/weights/*.rs" --method asymptotic --ignore-errors HEAD HEAD^1`. Ensure the changes are reasonable. ## FAQ From 8e7e6d9bebc813bfa7306d07b52e2921ba7be6b5 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Dec 2023 14:38:38 +0400 Subject: [PATCH 28/53] remove local --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 99ffc85cf1..fbde497666 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ To generate weights for a runtime 7. Run on the benchmark machine: ```bash -local pallets=($( +pallets=($( ./target/production/polkadot benchmark pallet --list \ --chain=/path/to/chain-spec.json | tail -n+2 | From 4a9dac3915fb74d52b1491a6b33f4c5c5a15a2d0 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 19 Dec 2023 10:12:54 +0400 Subject: [PATCH 29/53] add note on how to fix xcm weights --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fbde497666..8f72abb516 100644 --- a/README.md +++ b/README.md @@ -120,9 +120,13 @@ You probably want to do this inside a `tmux` session or similar, as it will take 8. `rsync` the weights back to your local machine, replacing the existing weights. -9. Commit the weight changes. +9. Manually fix XCM weights by +- Resetting the `impl xxx::WeightInfo {` to just `impl WeightInfo {` +- Marking all functions `pub(crate)` -10. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./relay/polkadot/src/weights/*.rs" --method asymptotic --ignore-errors HEAD HEAD^1`. Ensure the changes are reasonable. +10. Commit the weight changes. + +11. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./relay/polkadot/src/weights/*.rs" --method asymptotic --ignore-errors HEAD HEAD^1`. Ensure the changes are reasonable. ## FAQ From 7b210e98b4fc53980d1331f11f63b54773a3e9c7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 19 Dec 2023 10:28:28 +0400 Subject: [PATCH 30/53] xcm edge cases --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f72abb516..b904189219 100644 --- a/README.md +++ b/README.md @@ -121,8 +121,9 @@ You probably want to do this inside a `tmux` session or similar, as it will take 8. `rsync` the weights back to your local machine, replacing the existing weights. 9. Manually fix XCM weights by -- Resetting the `impl xxx::WeightInfo {` to just `impl WeightInfo {` +- Resetting the `impl xxx::yyy::WeightInfo for WeightInfo {` to just `impl WeightInfo {` - Marking all functions `pub(crate)` +- Remove any unused functions 10. Commit the weight changes. From 3673bc444910a11c090021408b3f5c801eb467f7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 19 Dec 2023 10:55:06 +0400 Subject: [PATCH 31/53] chain agnostic bench script --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b904189219..34ae23fb79 100644 --- a/README.md +++ b/README.md @@ -92,27 +92,32 @@ To generate weights for a runtime 7. Run on the benchmark machine: ```bash +#!/bin/bash + +# Default value is 'polkadot', but you can override it by passing a different value as an argument +CHAIN=${1:-polkadot} + pallets=($( ./target/production/polkadot benchmark pallet --list \ - --chain=/path/to/chain-spec.json | + --chain=./$CHAIN-chain-spec.json | tail -n+2 | cut -d',' -f1 | sort | uniq -)) +); for pallet in "${pallets[@]}"; do echo "Running benchmarks for $pallet" ./target/production/polkadot benchmark pallet \ - --chain=/path/to/chain-spec.json \ - --steps 50 \ - --repeat 20 \ + --chain=./$CHAIN-chain-spec.json \ + --steps=50 \ + --repeat=20 \ --pallet=$pallet \ --extrinsic=* \ --wasm-execution=compiled \ --heap-pages=4096 \ - --output /path/to/runtime/weights/directory \ - --header /path/to/file_header.txt + --output=./$CHAIN-weights \ + --header=./file_header.txt done ``` From 187781f7606960d1a61d74a5c2c12d78dfe98bf4 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Dec 2023 12:21:33 +0400 Subject: [PATCH 32/53] better wording --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 34ae23fb79..9d48cd4183 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,9 @@ You probably want to do this inside a `tmux` session or similar, as it will take 8. `rsync` the weights back to your local machine, replacing the existing weights. 9. Manually fix XCM weights by -- Resetting the `impl xxx::yyy::WeightInfo for WeightInfo {` to just `impl WeightInfo {` +- Replacing `impl xxx::yyy::WeightInfo for WeightInfo {` with `impl WeightInfo {` - Marking all functions `pub(crate)` -- Remove any unused functions +- Removing any unused functions 10. Commit the weight changes. From ba037ac31ee0140ca93b4f58673955617816a9b8 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 22:45:19 +1100 Subject: [PATCH 33/53] Update README.md Co-authored-by: Oliver Tale-Yazdi --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d48cd4183..158064ae2d 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ You probably want to do this inside a `tmux` session or similar, as it will take 10. Commit the weight changes. -11. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./relay/polkadot/src/weights/*.rs" --method asymptotic --ignore-errors HEAD HEAD^1`. Ensure the changes are reasonable. +11. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./**/weights/*.rs" --method asymptotic --ignore-errors HEAD origin/main`. Ensure the changes are reasonable. ## FAQ From 5b14c89022eaa6b479aa7205392631c33e8546ad Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 22:45:39 +1100 Subject: [PATCH 34/53] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bastian Köcher --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 158064ae2d..7a3e62a667 100644 --- a/README.md +++ b/README.md @@ -140,9 +140,3 @@ You probably want to do this inside a `tmux` session or similar, as it will take See the [Polkadot Wiki Reference Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware). -### Why is this such a manual task? - -It shouldn't be. Now that we have a process to follow, it should be automated by a script that takes as input. - -Tracked in [this issue](https://github.com/polkadot-fellows/runtimes/issues/128). - From abe398b81491f9a0b97d41e4bdc2c30d265d448c Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 22:49:55 +1100 Subject: [PATCH 35/53] Update README.md Co-authored-by: Branislav Kontur --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a3e62a667..f63623ca3c 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ To generate weights for a runtime 4. `rsync` chain spec/s and the file header to a benchmark machine -5. Build `polkadot-sdk` with `--profile production --features runtime-benchmarks` on the benchmark machine +5. Build `polkadot` binary from the latest release of `polkadot-sdk` with `--profile production --features runtime-benchmarks --bin polkadot` on the benchmark machine 6. Create output directories for the weights on the benchmark machine From 1d9be859321bdf86fca9794b73060b57fa04a5e9 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 16:01:13 +0400 Subject: [PATCH 36/53] update cargo.lock --- Cargo.lock | 924 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 860 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a64002e078..2a7f6749f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,7 +348,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.0", "zeroize", ] @@ -524,12 +524,39 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "asset-hub-kusama-integration-tests" +version = "1.0.0" +dependencies = [ + "assert_matches", + "asset-hub-kusama-runtime", + "frame-support", + "frame-system", + "integration-tests-common", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", + "sp-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "asset-hub-kusama-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", "assets-common", + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -569,11 +596,14 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub-router", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", + "polkadot-runtime-constants", "primitive-types", "scale-info", "smallvec", @@ -583,6 +613,7 @@ dependencies = [ "sp-core", "sp-genesis-builder", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -596,6 +627,28 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", +] + +[[package]] +name = "asset-hub-polkadot-integration-tests" +version = "1.0.0" +dependencies = [ + "frame-support", + "frame-system", + "integration-tests-common", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", + "sp-runtime", + "staging-xcm", + "xcm-emulator", ] [[package]] @@ -604,6 +657,10 @@ version = "1.0.0" dependencies = [ "asset-test-utils", "assets-common", + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -620,6 +677,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", + "kusama-runtime-constants", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -639,7 +697,9 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub-router", "parachains-common", + "parachains-runtimes-test-utils", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -653,6 +713,7 @@ dependencies = [ "sp-core", "sp-genesis-builder", "sp-inherents", + "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -666,6 +727,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -1074,6 +1136,30 @@ dependencies = [ "thiserror", ] +[[package]] +name = "bp-asset-hub-kusama" +version = "1.0.0" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-std", + "staging-xcm", +] + +[[package]] +name = "bp-asset-hub-polkadot" +version = "1.0.0" +dependencies = [ + "bp-xcm-bridge-hub-router", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-std", + "staging-xcm", +] + [[package]] name = "bp-bridge-hub-cumulus" version = "0.4.0" @@ -1090,6 +1176,36 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-bridge-hub-kusama" +version = "1.0.0" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "kusama-runtime-constants", + "polkadot-runtime-constants", + "sp-api", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-bridge-hub-polkadot" +version = "1.0.0" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "kusama-runtime-constants", + "polkadot-runtime-constants", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "bp-bridge-hub-rococo" version = "0.4.0" @@ -1138,6 +1254,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-kusama" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69f61df356df3dbedf2dfbfec65ce673ff80121ad7eb319b84a093ebc24aaf9" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std", +] + [[package]] name = "bp-messages" version = "0.4.0" @@ -1172,6 +1302,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "bp-polkadot" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2643dd8c1c9f82517cb0f438bb66533e8f0b54d8c4b063d24f835aa620e4034" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std", +] + [[package]] name = "bp-polkadot-core" version = "0.4.0" @@ -1267,7 +1411,20 @@ dependencies = [ name = "bridge-hub-kusama-runtime" version = "1.0.0" dependencies = [ + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", + "bp-header-chain", + "bp-kusama", + "bp-messages", + "bp-parachains", + "bp-polkadot", + "bp-polkadot-core", + "bp-relayers", + "bp-runtime", "bridge-hub-test-utils", + "bridge-runtime-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -1289,6 +1446,10 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", + "pallet-bridge-grandpa", + "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-bridge-relayers", "pallet-collator-selection", "pallet-multisig", "pallet-session", @@ -1313,6 +1474,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-keyring", "sp-offchain", "sp-runtime", "sp-session", @@ -1324,14 +1486,29 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "static_assertions", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] name = "bridge-hub-polkadot-runtime" version = "1.0.0" dependencies = [ + "bp-asset-hub-kusama", + "bp-asset-hub-polkadot", + "bp-bridge-hub-kusama", + "bp-bridge-hub-polkadot", + "bp-header-chain", + "bp-kusama", + "bp-messages", + "bp-parachains", + "bp-polkadot", + "bp-polkadot-core", + "bp-relayers", + "bp-runtime", "bridge-hub-test-utils", + "bridge-runtime-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -1352,6 +1529,10 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", + "pallet-bridge-grandpa", + "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-bridge-relayers", "pallet-collator-selection", "pallet-multisig", "pallet-session", @@ -1377,6 +1558,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-keyring", "sp-offchain", "sp-runtime", "sp-session", @@ -1388,7 +1570,9 @@ dependencies = [ "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "static_assertions", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -1473,6 +1657,7 @@ dependencies = [ "sp-trie", "staging-xcm", "staging-xcm-builder", + "static_assertions", ] [[package]] @@ -1925,6 +2110,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -2154,15 +2340,30 @@ dependencies = [ "wasmtime-types", ] +[[package]] +name = "crc" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +dependencies = [ + "crc-catalog 1.1.1", +] + [[package]] name = "crc" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" dependencies = [ - "crc-catalog", + "crc-catalog 2.2.0", ] +[[package]] +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + [[package]] name = "crc-catalog" version = "2.2.0" @@ -2500,6 +2701,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "cumulus-primitives-timestamp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771ef4a34f7bcd4e8782f73d8dbd0df031b1c1c82e54b06af69f88df2cddc316" +dependencies = [ + "cumulus-primitives-core", + "futures", + "parity-scale-codec", + "sp-inherents", + "sp-std", + "sp-timestamp", +] + [[package]] name = "cumulus-primitives-utility" version = "0.4.0" @@ -2593,7 +2808,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version", + "rustc_version 0.4.0", "subtle 2.4.1", "zeroize", ] @@ -2831,7 +3046,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -3107,6 +3322,154 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encointer-balances-tx-payment" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574a256785661fe0353b6664a896b03eaac804e01de3b7146a1e68bea23823c6" +dependencies = [ + "encointer-primitives", + "frame-support", + "frame-system", + "log", + "pallet-asset-tx-payment", + "pallet-encointer-balances", + "pallet-encointer-ceremonies", + "pallet-transaction-payment", + "sp-runtime", +] + +[[package]] +name = "encointer-balances-tx-payment-rpc-runtime-api" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc19094858c453d1622fee74cd5ac4aeafc5afcc1695c442361528604f3a3cd" +dependencies = [ + "encointer-primitives", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-std", +] + +[[package]] +name = "encointer-ceremonies-assignment" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0e915dfb90455b04de86863d5e8c28727b88a5e79035d1592f5340befc2d31a" +dependencies = [ + "encointer-primitives", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "encointer-kusama-runtime" +version = "1.0.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-timestamp", + "cumulus-primitives-utility", + "encointer-balances-tx-payment", + "encointer-balances-tx-payment-rpc-runtime-api", + "encointer-primitives", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-tx-payment", + "pallet-aura", + "pallet-balances", + "pallet-collective", + "pallet-encointer-balances", + "pallet-encointer-bazaar", + "pallet-encointer-bazaar-rpc-runtime-api", + "pallet-encointer-ceremonies", + "pallet-encointer-ceremonies-rpc-runtime-api", + "pallet-encointer-communities", + "pallet-encointer-communities-rpc-runtime-api", + "pallet-encointer-faucet", + "pallet-encointer-reputation-commitments", + "pallet-encointer-scheduler", + "pallet-insecure-randomness-collective-flip", + "pallet-membership", + "pallet-proxy", + "pallet-scheduler", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "encointer-meetup-validation" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bef78af8c5897da00bb93d7d77573ad7d4e6169f3daac2a36ba450760611c94" +dependencies = [ + "encointer-primitives", + "parity-scale-codec", + "scale-info", + "serde", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "encointer-primitives" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306cf10a0e74f42080c064fdc1d827b5c3fd6e0c40ee5f4e36bb2f5ee76c51dc" +dependencies = [ + "bs58 0.4.0", + "crc 2.1.0", + "ep-core", + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-geohash", +] + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -3169,6 +3532,24 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "ep-core" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfa4c3869cba69547a6cf0b80faf892822cee70027f86439ea7d145286fc6ba" +dependencies = [ + "array-bytes 6.1.0", + "impl-serde", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", + "substrate-fixed", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -3996,6 +4377,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "system-parachains-constants", ] [[package]] @@ -4485,6 +4867,53 @@ dependencies = [ "num-traits", ] +[[package]] +name = "integration-tests-common" +version = "1.0.0" +dependencies = [ + "asset-hub-kusama-runtime", + "asset-hub-polkadot-runtime", + "asset-test-utils", + "bp-messages", + "bridge-hub-kusama-runtime", + "bridge-hub-polkadot-runtime", + "bridge-runtime-common", + "collectives-polkadot-runtime", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "kusama-runtime-constants", + "pallet-assets", + "pallet-balances", + "pallet-bridge-messages", + "pallet-im-online", + "pallet-message-queue", + "pallet-staking", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "paste", + "penpal-runtime", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime", + "polkadot-runtime-constants", + "polkadot-runtime-parachains", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "staging-kusama-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "interceptor" version = "0.8.2" @@ -6565,71 +6994,225 @@ dependencies = [ name = "pallet-collator-selection" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" +checksum = "66c093c8867dbdb540da33076566605320b2eda78da5062d3d954f05862db18d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-collective" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-conviction-voting" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c8ff7512a377b708f71772e5169550cebc8f74bc8c26553015698eaa0975356" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-core-fellowship" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c52f9f5ce35127f55972845c49604309e8df81facbc34560abc680df5515383" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-democracy" +version = "25.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9f24ad18db2eeae0f03ba1743a82aaf300e0bbd6cdcb1119b0da93eef3d77f" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-election-provider-multi-phase" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-election-provider-support-benchmarking", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-std", + "strum", +] + +[[package]] +name = "pallet-election-provider-support-benchmarking" +version = "24.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-system", + "parity-scale-codec", + "sp-npos-elections", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-elections-phragmen" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "021da1d28b604b3654f895987dcb1ccb47d73102b31bc84c8f784bed261f01d8" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-npos-elections", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "pallet-encointer-balances" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a2ea2b74c36582daf64b632064b3525da8aa2cdced57581272264ebd811a7a" dependencies = [ + "approx", + "encointer-primitives", "frame-benchmarking", "frame-support", "frame-system", "log", - "pallet-authorship", - "pallet-session", + "pallet-asset-tx-payment", + "pallet-transaction-payment", "parity-scale-codec", - "rand 0.8.5", "scale-info", "sp-runtime", - "sp-staking", "sp-std", ] [[package]] -name = "pallet-collective" -version = "25.0.0" +name = "pallet-encointer-bazaar" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dddb120b5ee520146617a8c49b4d4c980ba9188918d43085539bf78815e7ec1d" +checksum = "0858d85b205d1026ccfc7e617d0028357efcfdaa9918e6ad4896f93eda3bc960" dependencies = [ + "encointer-primitives", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-encointer-communities", "parity-scale-codec", "scale-info", "sp-core", - "sp-io", - "sp-runtime", "sp-std", ] [[package]] -name = "pallet-conviction-voting" -version = "25.0.0" +name = "pallet-encointer-bazaar-rpc-runtime-api" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c8ff7512a377b708f71772e5169550cebc8f74bc8c26553015698eaa0975356" +checksum = "6471fa29e940363ff8090bb620ad82564286f955bfaa33a15147190438542aa6" dependencies = [ - "assert_matches", - "frame-benchmarking", + "encointer-primitives", "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-io", - "sp-runtime", + "sp-api", "sp-std", ] [[package]] -name = "pallet-core-fellowship" -version = "9.0.0" +name = "pallet-encointer-ceremonies" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c52f9f5ce35127f55972845c49604309e8df81facbc34560abc680df5515383" +checksum = "3a35401aa2ffbae97ba5f981542c20ca4c8609c115078a2a84835336921d5208" dependencies = [ + "encointer-ceremonies-assignment", + "encointer-meetup-validation", + "encointer-primitives", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-encointer-balances", + "pallet-encointer-communities", + "pallet-encointer-scheduler", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-arithmetic", + "sp-application-crypto", "sp-core", "sp-io", "sp-runtime", @@ -6637,80 +7220,109 @@ dependencies = [ ] [[package]] -name = "pallet-democracy" -version = "25.0.0" +name = "pallet-encointer-ceremonies-rpc-runtime-api" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9f24ad18db2eeae0f03ba1743a82aaf300e0bbd6cdcb1119b0da93eef3d77f" +checksum = "af85c19a7b83a255348a95ee0b691810088320c36319eb4446eb527f0e854a04" +dependencies = [ + "encointer-primitives", + "frame-support", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-encointer-communities" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b78031c09e3adc31ba279bb18186e379222a7b54a14d59288040dc205621e49" dependencies = [ + "encointer-primitives", "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-encointer-balances", + "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "serde", - "sp-core", "sp-io", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-election-provider-multi-phase" -version = "24.0.0" +name = "pallet-encointer-communities-rpc-runtime-api" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "481178ef558a9409d9c12fc01279b517e3a0a7797664e89761447dba3a182ce6" +checksum = "1808d7908167315f12204db923a35f4af851e7c53b73351ed7d1b9e53a8c948d" +dependencies = [ + "encointer-primitives", + "sp-api", + "sp-std", +] + +[[package]] +name = "pallet-encointer-faucet" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fdd1b8885dfb83e249af6a8914a38e3d5ea5f01d196ae35ec1420e502a54ef" dependencies = [ + "approx", + "encointer-primitives", "frame-benchmarking", - "frame-election-provider-support", "frame-support", "frame-system", "log", - "pallet-election-provider-support-benchmarking", + "pallet-encointer-communities", + "pallet-encointer-reputation-commitments", + "pallet-treasury", "parity-scale-codec", - "rand 0.8.5", "scale-info", - "sp-arithmetic", "sp-core", - "sp-io", - "sp-npos-elections", "sp-runtime", "sp-std", - "strum", ] [[package]] -name = "pallet-election-provider-support-benchmarking" -version = "24.0.0" +name = "pallet-encointer-reputation-commitments" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ab6413ec88b64acf849a202795c67940dc3bcc846ce03bd0893b90e2119ecf" +checksum = "27da548ae6f6070797c3270160cc0c76d4ddc20575d63e5a615d6f28d99c7cb5" dependencies = [ + "approx", + "encointer-primitives", "frame-benchmarking", - "frame-election-provider-support", + "frame-support", "frame-system", + "log", + "pallet-encointer-ceremonies", + "pallet-encointer-communities", + "pallet-encointer-scheduler", + "pallet-timestamp", "parity-scale-codec", - "sp-npos-elections", + "scale-info", + "sp-core", "sp-runtime", "sp-std", ] [[package]] -name = "pallet-elections-phragmen" -version = "26.0.0" +name = "pallet-encointer-scheduler" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021da1d28b604b3654f895987dcb1ccb47d73102b31bc84c8f784bed261f01d8" +checksum = "2ffe4e1efc5084466c4c0ae1d835651a29ab3ee8fc68933ae14df00d0875441b" dependencies = [ + "encointer-primitives", "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-npos-elections", "sp-runtime", - "sp-staking", "sp-std", ] @@ -6833,6 +7445,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df4d7fab2948940925d4c0076ec542b2c67b37a5332449f102241993d31a8b41" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-membership" version = "25.0.0" @@ -7830,6 +8457,68 @@ dependencies = [ "base64ct", ] +[[package]] +name = "penpal-runtime" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63d1c2aa2cbc5012e6af2781ff7fb0bf7188ff4d25643a0f36a44f327b779fb4" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-common", + "scale-info", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + [[package]] name = "percent-encoding" version = "2.3.0" @@ -9146,6 +9835,15 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -9306,6 +10004,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version 0.2.3", +] + [[package]] name = "safe_arch" version = "0.7.1" @@ -10383,6 +11090,15 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.18" @@ -10426,9 +11142,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" dependencies = [ "itoa", "ryu", @@ -10607,9 +11323,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" [[package]] name = "snap" @@ -10629,7 +11345,7 @@ dependencies = [ "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring", - "rustc_version", + "rustc_version 0.4.0", "sha2 0.10.7", "subtle 2.4.1", ] @@ -11782,7 +12498,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" dependencies = [ "base64 0.13.1", - "crc", + "crc 3.0.1", "lazy_static", "md-5", "rand 0.8.5", @@ -11807,6 +12523,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "substrate-fixed" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e83ba2b4f68f12ec6b0f55bac0a23a5bcaaf2676f1109c7a5ead6121c7f0622" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "substrate-typenum", +] + +[[package]] +name = "substrate-geohash" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa2aad67d4ac1b37d97338ab6fd18fd5ec79c35a24112028e6feda0d67142e9a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "substrate-fixed", +] + [[package]] name = "substrate-prometheus-endpoint" version = "0.16.0" @@ -11834,6 +12573,16 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "substrate-typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f0091e93c2c75b233ae39424c52cb8a662c0811fb68add149e20e5d7e8a788" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + [[package]] name = "substrate-wasm-builder" version = "14.0.0" @@ -11929,6 +12678,20 @@ dependencies = [ "libc", ] +[[package]] +name = "system-parachains-constants" +version = "1.0.0" +dependencies = [ + "frame-support", + "kusama-runtime-constants", + "parachains-common", + "polkadot-core-primitives", + "polkadot-primitives", + "polkadot-runtime-constants", + "smallvec", + "sp-runtime", +] + [[package]] name = "tap" version = "1.0.1" @@ -13254,7 +14017,7 @@ checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" dependencies = [ "arc-swap", "async-trait", - "crc", + "crc 3.0.1", "log", "rand 0.8.5", "serde", @@ -13305,7 +14068,7 @@ dependencies = [ "arc-swap", "async-trait", "bytes", - "crc", + "crc 3.0.1", "log", "rand 0.8.5", "thiserror", @@ -13770,6 +14533,39 @@ dependencies = [ "time 0.3.27", ] +[[package]] +name = "xcm-emulator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd344ca12e6217fbbc6ee27bedb01113357ea31bea198e74b76f618102b6f06c" +dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "lazy_static", + "log", + "pallet-balances", + "pallet-message-queue", + "parachains-common", + "parity-scale-codec", + "paste", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", + "staging-xcm", + "staging-xcm-executor", +] + [[package]] name = "xcm-procedural" version = "4.0.0" From 8b31d21e34149b3acb29317c076522ac31e7c2b7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 23:10:41 +1100 Subject: [PATCH 37/53] Update chain-spec-generator/Cargo.toml Co-authored-by: Branislav Kontur --- chain-spec-generator/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 055fb95369..0fdeaf6651 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -37,6 +37,8 @@ asset-hub-kusama-runtime = { path = "../system-parachains/asset-hubs/asset-hub-k collectives-polkadot-runtime = { path = "../system-parachains/collectives/collectives-polkadot" } bridge-hub-polkadot-runtime = { path = "../system-parachains/bridge-hubs/bridge-hub-polkadot" } bridge-hub-kusama-runtime = { path = "../system-parachains/bridge-hubs/bridge-hub-kusama" } +encointer-kusama-runtime = { path = "../system-parachains/encointer" } +glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" } [features] runtime-benchmarks = [ From fcbdc75df257b5a08f1f983df2a26f7ff99bf5f6 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 16:20:47 +0400 Subject: [PATCH 38/53] add missing properties --- chain-spec-generator/src/system_parachains_specs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 9980742441..41c97cb1a6 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -413,6 +413,8 @@ fn bridge_hub_polkadot_genesis( }) .collect(), }, + bridge_kusama_grandpa: Default::default(), + bridge_kusama_messages: Default::default(), // no need to pass anything to aura, in fact it will panic if we do. Session will take care // of this. aura: Default::default(), @@ -502,6 +504,8 @@ fn bridge_hub_kusama_genesis( }) .collect(), }, + bridge_polkadot_grandpa: Default::default(), + bridge_polkadot_messages: Default::default(), // no need to pass anything to aura, in fact it will panic if we do. Session will take care // of this. aura: Default::default(), From 2eb38009b0cc25441fc14d09fcb68fc31efc6660 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 15 Jan 2024 17:42:43 +0400 Subject: [PATCH 39/53] add glutton --- Cargo.lock | 2 + chain-spec-generator/Cargo.toml | 2 + chain-spec-generator/src/main.rs | 5 ++ .../src/system_parachains_specs.rs | 54 +++++++++++++++++++ 4 files changed, 63 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 2a7f6749f9..51ad1c2b9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1880,6 +1880,8 @@ dependencies = [ "clap", "collectives-polkadot-runtime", "cumulus-primitives-core", + "encointer-kusama-runtime", + "glutton-kusama-runtime", "hex-literal", "kusama-runtime-constants", "pallet-im-online", diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 0fdeaf6651..c6b5275467 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -49,4 +49,6 @@ runtime-benchmarks = [ "collectives-polkadot-runtime/runtime-benchmarks", "kusama-runtime/runtime-benchmarks", "polkadot-runtime/runtime-benchmarks", + "encointer-kusama-runtime/runtime-benchmarks", + "glutton-kusama-runtime/runtime-benchmarks", ] diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index 6cf7b3109c..e4673c5b51 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -59,6 +59,11 @@ fn main() -> Result<(), String> { Box::new(|| system_parachains_specs::bridge_hub_kusama_local_testnet_config()) as Box<_>, ), + ( + "glutton-kusama-local", + Box::new(|| system_parachains_specs::glutton_kusama_local_testnet_config()) + as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 41c97cb1a6..9b494f5460 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -30,6 +30,9 @@ pub type BridgeHubPolkadotChainSpec = pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec; +pub type GluttonKusamaChainSpec = + sc_chain_spec::GenericChainSpec; + const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; @@ -554,3 +557,54 @@ pub fn bridge_hub_kusama_local_testnet_config() -> Result, St Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, ))) } + +// GluttonKusama +fn glutton_kusama_genesis( + wasm_binary: &[u8], + id: ParaId, +) -> glutton_kusama_runtime::RuntimeGenesisConfig { + glutton_kusama_runtime::RuntimeGenesisConfig { + system: glutton_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + glutton: Default::default(), + sudo: Default::default(), + parachain_system: Default::default(), + parachain_info: glutton_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + } +} + +fn glutton_kusama_local_genesis( + wasm_binary: &[u8], +) -> glutton_kusama_runtime::RuntimeGenesisConfig { + glutton_kusama_genesis(wasm_binary, 1002.into()) +} + +pub fn glutton_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + glutton_kusama_runtime::WASM_BINARY.ok_or("GluttonKusama wasm not available")?; + + Ok(Box::new(GluttonKusamaChainSpec::from_genesis( + // Name + "Glutton Kusama Local", + // ID + "glutton-kusama-local", + ChainType::Local, + move || glutton_kusama_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, + ))) +} From d691fa86386b6f727bc2606376d71acdd9923400 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:05:31 +1100 Subject: [PATCH 40/53] Update README.md Co-authored-by: Branislav Kontur --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1cb284083c..194fef5b6a 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ pallets=($( cut -d',' -f1 | sort | uniq -); +)); for pallet in "${pallets[@]}"; do echo "Running benchmarks for $pallet" From 807316b612d88b2c505cbcbcade6de54aafdb8d2 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 11:14:32 +0400 Subject: [PATCH 41/53] add encointer --- chain-spec-generator/src/main.rs | 5 ++ .../src/system_parachains_specs.rs | 83 +++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index e4673c5b51..e36a4e897c 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -64,6 +64,11 @@ fn main() -> Result<(), String> { Box::new(|| system_parachains_specs::glutton_kusama_local_testnet_config()) as Box<_>, ), + ( + "encointer-kusama-local", + Box::new(|| system_parachains_specs::encointer_kusama_local_testnet_config()) + as Box<_>, + ), ]); if let Some(function) = supported_chains.get(&*cli.chain) { diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 9b494f5460..d7d7f61a50 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -33,6 +33,9 @@ pub type BridgeHubKusamaChainSpec = pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec; +pub type EncointerKusamaChainSpec = + sc_chain_spec::GenericChainSpec; + const ASSET_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::EXISTENTIAL_DEPOSIT; const ASSET_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; @@ -43,6 +46,8 @@ const BRIDGE_HUB_POLKADOT_ED: Balance = parachains_common::polkadot::currency::E const BRIDGE_HUB_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; +const ENCOINTER_KUSAMA_ED: Balance = parachains_common::kusama::currency::EXISTENTIAL_DEPOSIT; + /// The default XCM version to set in genesis config. const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION; @@ -608,3 +613,81 @@ pub fn glutton_kusama_local_testnet_config() -> Result, Strin Extensions { relay_chain: "kusama-local".into(), para_id: 1002 }, ))) } + +// EncointerKusama +fn encointer_kusama_genesis( + wasm_binary: &[u8], + endowed_accounts: Vec, + id: ParaId, +) -> encointer_kusama_runtime::RuntimeGenesisConfig { + encointer_kusama_runtime::RuntimeGenesisConfig { + system: encointer_kusama_runtime::SystemConfig { + code: wasm_binary.to_vec(), + ..Default::default() + }, + balances: encointer_kusama_runtime::BalancesConfig { + balances: endowed_accounts + .iter() + .cloned() + .map(|k| (k, ENCOINTER_KUSAMA_ED * 4096)) + .collect(), + }, + parachain_info: encointer_kusama_runtime::ParachainInfoConfig { + parachain_id: id, + ..Default::default() + }, + collective: Default::default(), + encointer_balances: Default::default(), + encointer_ceremonies: Default::default(), + encointer_communities: Default::default(), + encointer_faucet: Default::default(), + encointer_scheduler: Default::default(), + membership: Default::default(), + treasury: Default::default(), + aura: encointer_kusama_runtime::AuraConfig { + authorities: vec![get_from_seed::("Alice").into()], + }, + aura_ext: Default::default(), + parachain_system: Default::default(), + polkadot_xcm: encointer_kusama_runtime::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + } +} + +fn encointer_kusama_local_genesis( + wasm_binary: &[u8], +) -> encointer_kusama_runtime::RuntimeGenesisConfig { + encointer_kusama_genesis( + // initial collators. + wasm_binary, + testnet_accounts(), + 1002.into(), + ) +} + +pub fn encointer_kusama_local_testnet_config() -> Result, String> { + let mut properties = sc_chain_spec::Properties::new(); + properties.insert("ss58Format".into(), 2.into()); + properties.insert("tokenSymbol".into(), "KSM".into()); + properties.insert("tokenDecimals".into(), 12.into()); + + let wasm_binary = + encointer_kusama_runtime::WASM_BINARY.ok_or("EncointerKusama wasm not available")?; + + Ok(Box::new(EncointerKusamaChainSpec::from_genesis( + // Name + "Kusama Encointer Local", + // ID + "encointer-kusama-local", + ChainType::Local, + move || encointer_kusama_local_genesis(wasm_binary), + Vec::new(), + None, + None, + None, + Some(properties), + Extensions { relay_chain: "kusama-local".into(), para_id: 1001 }, + ))) +} From 1951e78acc3e28eca391f88c281c412276200872 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 11:17:18 +0400 Subject: [PATCH 42/53] update common.rs --- chain-spec-generator/src/common.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 4c92a8dffb..6a58709dca 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -2,7 +2,8 @@ use crate::{ relay_chain_specs::{KusamaChainSpec, PolkadotChainSpec}, system_parachains_specs::{ AssetHubKusamaChainSpec, AssetHubPolkadotChainSpec, BridgeHubKusamaChainSpec, - BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, + BridgeHubPolkadotChainSpec, CollectivesPolkadotChainSpec, EncointerKusamaChainSpec, + GluttonKusamaChainSpec, }, ChainSpec, }; @@ -68,6 +69,10 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result Ok(Box::new(BridgeHubKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("glutton-kusama") => + Ok(Box::new(GluttonKusamaChainSpec::from_json_file(path)?)), + x if x.starts_with("encointer-kusama") => + Ok(Box::new(EncointerKusamaChainSpec::from_json_file(path)?)), _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } From 2564ccb4d38f28a2e4fb969f5f22e65f0a509d9d Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 11:23:21 +0400 Subject: [PATCH 43/53] fix paraid --- chain-spec-generator/src/system_parachains_specs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index d7d7f61a50..86a3f180e0 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -663,7 +663,7 @@ fn encointer_kusama_local_genesis( // initial collators. wasm_binary, testnet_accounts(), - 1002.into(), + 1001.into(), ) } From 23f1ae5ff2b17ce3a1e5e813a21bdf7630cca2ef Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:26:04 +1100 Subject: [PATCH 44/53] Update chain-spec-generator/src/relay_chain_specs.rs Co-authored-by: Branislav Kontur --- chain-spec-generator/src/relay_chain_specs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 6429fbf764..b2f7a9bb00 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -380,7 +380,7 @@ pub fn polkadot_development_config() -> Result, String> { Ok(Box::new(PolkadotChainSpec::from_genesis( "Polakdot Development", - "polkadot_dev", + "polkadot-dev", ChainType::Development, move || polkadot_development_config_genesis(wasm_binary), vec![], From dbd200d8d8d9e9e67bf9dae0fb9f871cd9b490d2 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:26:17 +1100 Subject: [PATCH 45/53] Update chain-spec-generator/src/relay_chain_specs.rs Co-authored-by: Branislav Kontur --- chain-spec-generator/src/relay_chain_specs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index b2f7a9bb00..aa661c6dcf 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -453,7 +453,7 @@ pub fn kusama_local_testnet_config() -> Result, String> { Ok(Box::new(KusamaChainSpec::from_genesis( "Kusama Local Testnet", - "kusama_local_testnet", + "kusama-local", ChainType::Local, move || kusama_local_testnet_genesis(wasm_binary), vec![], From 558657296208843ee5f8b5073c64aa1929aee78b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:26:23 +1100 Subject: [PATCH 46/53] Update chain-spec-generator/src/relay_chain_specs.rs Co-authored-by: Branislav Kontur --- chain-spec-generator/src/relay_chain_specs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index aa661c6dcf..51da13bdcd 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -398,7 +398,7 @@ pub fn kusama_development_config() -> Result, String> { Ok(Box::new(KusamaChainSpec::from_genesis( "Kusama Development", - "kusama_dev", + "kusama-dev", ChainType::Development, move || kusama_development_config_genesis(wasm_binary), vec![], From c3351abdeaabc23e3b82b34ebbd2d948ac88a37d Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:26:41 +1100 Subject: [PATCH 47/53] Update README.md Co-authored-by: Branislav Kontur --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 194fef5b6a..05ba1a5313 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,12 @@ pallets=($( )); for pallet in "${pallets[@]}"; do - echo "Running benchmarks for $pallet" + output_file=./$CHAIN-weights/ + # a little hack for pallet_xcm_benchmarks - we want to force custom implementation for XcmWeightInfo + if [[ "$pallet" == "pallet_xcm_benchmarks::generic" ]] || [[ "$pallet" == "pallet_xcm_benchmarks::fungible" ]]; then + output_file="${output_file}xcm/${pallet//::/_}.rs" + fi + echo "Running benchmarks for $pallet to $output_file" ./target/production/polkadot benchmark pallet \ --chain=./$CHAIN-chain-spec.json \ --steps=50 \ From 9fa600a7dc9d64c11c407fa0471034ed9e9919c7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:26:52 +1100 Subject: [PATCH 48/53] Update README.md Co-authored-by: Branislav Kontur --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 05ba1a5313..03a0317707 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ for pallet in "${pallets[@]}"; do --extrinsic=* \ --wasm-execution=compiled \ --heap-pages=4096 \ - --output=./$CHAIN-weights \ + --output="$output_file" \ --header=./file_header.txt done ``` From 718dc1b7f7e078c526a6504192cdda37bbaae86d Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 18:27:04 +1100 Subject: [PATCH 49/53] Update chain-spec-generator/src/relay_chain_specs.rs Co-authored-by: Branislav Kontur --- chain-spec-generator/src/relay_chain_specs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 51da13bdcd..183f75a0ca 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -426,7 +426,7 @@ pub fn polkadot_local_testnet_config() -> Result, String> { Ok(Box::new(PolkadotChainSpec::from_genesis( "Polkadot Local Testnet", - "polkadot_testnet", + "polkadot-local", ChainType::Local, move || polkadot_local_testnet_genesis(wasm_binary), vec![], From 57a80b0bc618015dc7f60772848fbbb637e5be0b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 11:35:43 +0400 Subject: [PATCH 50/53] automatically create directory --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 03a0317707..dd0545e6e3 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,7 @@ To generate weights for a runtime 5. Build `polkadot` binary from the latest release of `polkadot-sdk` with `--profile production --features runtime-benchmarks --bin polkadot` on the benchmark machine -6. Create output directories for the weights on the benchmark machine - -7. Run on the benchmark machine: +6. Run on the benchmark machine: ```bash #!/bin/bash @@ -109,10 +107,12 @@ pallets=($( uniq )); +mkdir -p ./$CHAIN-weights for pallet in "${pallets[@]}"; do output_file=./$CHAIN-weights/ - # a little hack for pallet_xcm_benchmarks - we want to force custom implementation for XcmWeightInfo + # a little hack for pallet_xcm_benchmarks - we want to output them to a nested directory if [[ "$pallet" == "pallet_xcm_benchmarks::generic" ]] || [[ "$pallet" == "pallet_xcm_benchmarks::fungible" ]]; then + mkdir -p ./$CHAIN-weights/xcm output_file="${output_file}xcm/${pallet//::/_}.rs" fi echo "Running benchmarks for $pallet to $output_file" @@ -131,16 +131,16 @@ done You probably want to do this inside a `tmux` session or similar, as it will take a while. -8. `rsync` the weights back to your local machine, replacing the existing weights. +7. `rsync` the weights back to your local machine, replacing the existing weights. -9. Manually fix XCM weights by +8. Manually fix XCM weights by - Replacing `impl xxx::yyy::WeightInfo for WeightInfo {` with `impl WeightInfo {` - Marking all functions `pub(crate)` - Removing any unused functions -10. Commit the weight changes. +9. Commit the weight changes. -11. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./**/weights/*.rs" --method asymptotic --ignore-errors HEAD origin/main`. Ensure the changes are reasonable. +10. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./**/weights/*.rs" --method asymptotic --ignore-errors HEAD origin/main`. Ensure the changes are reasonable. ## FAQ From 38ce0a48fcd2ce04180ed46d574a488b8ae91b4e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 20:10:51 +0400 Subject: [PATCH 51/53] update copyright --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd0545e6e3..b86bbce2ba 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,8 @@ To generate weights for a runtime 3. Create `file_header.txt` ```text -// Copyright (C) Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); From 914c7843787ce3c95ff23b3bcfd090b90d5878a9 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 16 Jan 2024 20:15:07 +0400 Subject: [PATCH 52/53] copyright --- chain-spec-generator/src/common.rs | 17 +++++++++++++++++ chain-spec-generator/src/main.rs | 17 +++++++++++++++++ chain-spec-generator/src/relay_chain_specs.rs | 17 +++++++++++++++++ .../src/system_parachains_specs.rs | 17 +++++++++++++++++ 4 files changed, 68 insertions(+) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 6a58709dca..2c2fe95ff8 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -1,3 +1,20 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + use crate::{ relay_chain_specs::{KusamaChainSpec, PolkadotChainSpec}, system_parachains_specs::{ diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index e36a4e897c..d24cc8766a 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -1,3 +1,20 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + use clap::Parser; use sc_chain_spec::ChainSpec; use std::collections::HashMap; diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 183f75a0ca..b6b58ba5d8 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -1,3 +1,20 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + use kusama_runtime_constants::currency::UNITS as KSM; use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_staking::Forcing; diff --git a/chain-spec-generator/src/system_parachains_specs.rs b/chain-spec-generator/src/system_parachains_specs.rs index 86a3f180e0..83d7caa0af 100644 --- a/chain-spec-generator/src/system_parachains_specs.rs +++ b/chain-spec-generator/src/system_parachains_specs.rs @@ -1,3 +1,20 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + use crate::common::{get_account_id_from_seed, get_from_seed, testnet_accounts}; use cumulus_primitives_core::ParaId; use parachains_common::{AccountId, AssetHubPolkadotAuraId, AuraId, Balance}; From 82298fe58d82d8a3e5eea86073bbf09cf3f49987 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 17 Jan 2024 11:46:53 +0400 Subject: [PATCH 53/53] move weight generation doc out of readme to standalone --- README.md | 88 --------------------------------------- docs/weight-generation.md | 88 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 88 deletions(-) create mode 100644 docs/weight-generation.md diff --git a/README.md b/README.md index b86bbce2ba..858d6e7dee 100644 --- a/README.md +++ b/README.md @@ -61,91 +61,3 @@ The release process is building all runtimes and then puts them into a release i The format of [`CHANGELOG.md`](CHANGELOG.md) is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -# Weight Generation - -To generate weights for a runtime - -1. Build `chain-spec-generator` with `--profile production --features runtime-benchmarks` -2. Use it to build a chain spec for your runtime, e.g. `./target/production/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` -3. Create `file_header.txt` - -```text -// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md -// for a list of specific contributors. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -``` - -4. `rsync` chain spec/s and the file header to a benchmark machine - -5. Build `polkadot` binary from the latest release of `polkadot-sdk` with `--profile production --features runtime-benchmarks --bin polkadot` on the benchmark machine - -6. Run on the benchmark machine: - -```bash -#!/bin/bash - -# Default value is 'polkadot', but you can override it by passing a different value as an argument -CHAIN=${1:-polkadot} - -pallets=($( - ./target/production/polkadot benchmark pallet --list \ - --chain=./$CHAIN-chain-spec.json | - tail -n+2 | - cut -d',' -f1 | - sort | - uniq -)); - -mkdir -p ./$CHAIN-weights -for pallet in "${pallets[@]}"; do - output_file=./$CHAIN-weights/ - # a little hack for pallet_xcm_benchmarks - we want to output them to a nested directory - if [[ "$pallet" == "pallet_xcm_benchmarks::generic" ]] || [[ "$pallet" == "pallet_xcm_benchmarks::fungible" ]]; then - mkdir -p ./$CHAIN-weights/xcm - output_file="${output_file}xcm/${pallet//::/_}.rs" - fi - echo "Running benchmarks for $pallet to $output_file" - ./target/production/polkadot benchmark pallet \ - --chain=./$CHAIN-chain-spec.json \ - --steps=50 \ - --repeat=20 \ - --pallet=$pallet \ - --extrinsic=* \ - --wasm-execution=compiled \ - --heap-pages=4096 \ - --output="$output_file" \ - --header=./file_header.txt -done -``` - -You probably want to do this inside a `tmux` session or similar, as it will take a while. - -7. `rsync` the weights back to your local machine, replacing the existing weights. - -8. Manually fix XCM weights by -- Replacing `impl xxx::yyy::WeightInfo for WeightInfo {` with `impl WeightInfo {` -- Marking all functions `pub(crate)` -- Removing any unused functions - -9. Commit the weight changes. - -10. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./**/weights/*.rs" --method asymptotic --ignore-errors HEAD origin/main`. Ensure the changes are reasonable. - -## FAQ - -### What benchmark machine spec should I use? - -See the [Polkadot Wiki Reference Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware). - diff --git a/docs/weight-generation.md b/docs/weight-generation.md new file mode 100644 index 0000000000..9a1eae34e7 --- /dev/null +++ b/docs/weight-generation.md @@ -0,0 +1,88 @@ +# Weight Generation + +To generate weights for a runtime + +1. Build `chain-spec-generator` with `--profile production --features runtime-benchmarks` +2. Use it to build a chain spec for your runtime, e.g. `./target/production/chain-spec-generator --raw polkadot-local > polkadot-chain-spec.json` +3. Create `file_header.txt` + +```text +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +``` + +4. `rsync` chain spec/s and the file header to a benchmark machine + +5. Build `polkadot` binary from the latest release of `polkadot-sdk` with `--profile production --features runtime-benchmarks --bin polkadot` on the benchmark machine + +6. Run on the benchmark machine: + +```bash +#!/bin/bash + +# Default value is 'polkadot', but you can override it by passing a different value as an argument +CHAIN=${1:-polkadot} + +pallets=($( + ./target/production/polkadot benchmark pallet --list \ + --chain=./$CHAIN-chain-spec.json | + tail -n+2 | + cut -d',' -f1 | + sort | + uniq +)); + +mkdir -p ./$CHAIN-weights +for pallet in "${pallets[@]}"; do + output_file=./$CHAIN-weights/ + # a little hack for pallet_xcm_benchmarks - we want to output them to a nested directory + if [[ "$pallet" == "pallet_xcm_benchmarks::generic" ]] || [[ "$pallet" == "pallet_xcm_benchmarks::fungible" ]]; then + mkdir -p ./$CHAIN-weights/xcm + output_file="${output_file}xcm/${pallet//::/_}.rs" + fi + echo "Running benchmarks for $pallet to $output_file" + ./target/production/polkadot benchmark pallet \ + --chain=./$CHAIN-chain-spec.json \ + --steps=50 \ + --repeat=20 \ + --pallet=$pallet \ + --extrinsic=* \ + --wasm-execution=compiled \ + --heap-pages=4096 \ + --output="$output_file" \ + --header=./file_header.txt +done +``` + +You probably want to do this inside a `tmux` session or similar, as it will take a while. + +7. `rsync` the weights back to your local machine, replacing the existing weights. + +8. Manually fix XCM weights by +- Replacing `impl xxx::yyy::WeightInfo for WeightInfo {` with `impl WeightInfo {` +- Marking all functions `pub(crate)` +- Removing any unused functions + +9. Commit the weight changes. + +10. If not installed, `cargo install subweight`, and check the weight changes with `subweight compare commits --path-pattern "./**/weights/*.rs" --method asymptotic --ignore-errors HEAD origin/main`. Ensure the changes are reasonable. + +## FAQ + +### What benchmark machine spec should I use? + +See the [Polkadot Wiki Reference Hardware](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#standard-hardware). +