Skip to content

Commit

Permalink
Merge branch 'release/1.2.6-runtime' into add-people-chain-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
hbulgarini authored Aug 27, 2024
2 parents 8cbe278 + 423a073 commit bf71b58
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 62 deletions.
15 changes: 0 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ beefy-primitives = { version = "14.0.0", default-features = false, package = "sp
binary-merkle-tree = { version = "14.0.0", default-features = false }
bp-bridge-hub-cumulus = { version = "0.8.0", default-features = false }
bp-header-chain = { version = "0.8.1", default-features = false }
bp-kusama = { version = "0.6.0", default-features = false }
bp-messages = { version = "0.8.0", default-features = false }
bp-parachains = { version = "0.8.0", default-features = false }
bp-polkadot = { version = "0.6.0", default-features = false }
Expand Down Expand Up @@ -89,16 +88,6 @@ pallet-conviction-voting = { version = "29.0.0", default-features = false }
pallet-core-fellowship = { version = "13.0.0", default-features = false }
pallet-election-provider-multi-phase = { version = "28.0.0", default-features = false }
pallet-election-provider-support-benchmarking = { version = "28.0.0", default-features = false }
pallet-encointer-balances = { version = "~6.1.0", default-features = false }
pallet-encointer-bazaar = { version = "~6.1.0", default-features = false }
pallet-encointer-bazaar-rpc-runtime-api = { version = "~6.1.0", default-features = false }
pallet-encointer-ceremonies = { version = "~6.1.0", default-features = false }
pallet-encointer-ceremonies-rpc-runtime-api = { version = "~6.1.0", default-features = false }
pallet-encointer-communities = { version = "~6.1.0", default-features = false }
pallet-encointer-communities-rpc-runtime-api = { version = "~6.1.0", default-features = false }
pallet-encointer-faucet = { version = "~6.2.0", default-features = false }
pallet-encointer-reputation-commitments = { version = "~6.1.0", default-features = false }
pallet-encointer-scheduler = { version = "~6.1.0", default-features = false }
pallet-fast-unstake = { version = "28.0.0", default-features = false }
pallet-glutton = { version = "15.0.0", default-features = false }
pallet-grandpa = { version = "29.0.0", default-features = false }
Expand Down
20 changes: 6 additions & 14 deletions chain-spec-generator/src/system_parachains_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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};
use parachains_common::{AccountId, AuraId, Balance};
use sc_chain_spec::{ChainSpec, ChainSpecExtension, ChainSpecGroup, ChainType};
use serde::{Deserialize, Serialize};
use sp_core::{crypto::UncheckedInto, sr25519};
Expand Down Expand Up @@ -56,16 +56,10 @@ pub fn invulnerables() -> Vec<(AccountId, AuraId)> {
}

/// Invulnerable Collators for the particular case of AssetHubPolkadot
pub fn invulnerables_asset_hub_paseo() -> Vec<(AccountId, AssetHubPolkadotAuraId)> {
pub fn invulnerables_asset_hub_paseo() -> Vec<(AccountId, AuraId)> {
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_from_seed::<AssetHubPolkadotAuraId>("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_from_seed::<AssetHubPolkadotAuraId>("Bob"),
),
(get_account_id_from_seed::<sr25519::Public>("Alice"), get_from_seed::<AuraId>("Alice")),
(get_account_id_from_seed::<sr25519::Public>("Bob"), get_from_seed::<AuraId>("Bob")),
]
}

Expand Down Expand Up @@ -94,9 +88,7 @@ pub fn invulnerables_people_chain() -> Vec<(AccountId, AuraId)> {
/// 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_paseo_session_keys(
keys: AssetHubPolkadotAuraId,
) -> asset_hub_paseo_runtime::SessionKeys {
pub fn asset_hub_paseo_session_keys(keys: AuraId) -> asset_hub_paseo_runtime::SessionKeys {
asset_hub_paseo_runtime::SessionKeys { aura: keys }
}

Expand All @@ -116,7 +108,7 @@ pub fn people_paseo_session_keys(keys: AuraId) -> people_paseo_runtime::SessionK

// AssetHubPaseo
fn asset_hub_paseo_genesis(
invulnerables: Vec<(AccountId, AssetHubPolkadotAuraId)>,
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
) -> serde_json::Value {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,16 @@ use sp_core::storage::Storage;
use emulated_integration_tests_common::{
accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, SAFE_XCM_VERSION,
};
use parachains_common::{AccountId, AssetHubPolkadotAuraId, Balance};
use parachains_common::{AccountId, AuraId, Balance};
use sp_core::sr25519;

pub const PARA_ID: u32 = 1000;
pub const ED: Balance = asset_hub_paseo_runtime::ExistentialDeposit::get();

fn invulnerables_asset_hub_paseo() -> Vec<(AccountId, AssetHubPolkadotAuraId)> {
fn invulnerables_asset_hub_paseo() -> Vec<(AccountId, AuraId)> {
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_from_seed::<AssetHubPolkadotAuraId>("Alice"),
),
(
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_from_seed::<AssetHubPolkadotAuraId>("Bob"),
),
(get_account_id_from_seed::<sr25519::Public>("Alice"), get_from_seed::<AuraId>("Alice")),
(get_account_id_from_seed::<sr25519::Public>("Bob"), get_from_seed::<AuraId>("Bob")),
]
}

Expand Down Expand Up @@ -63,8 +57,8 @@ pub fn genesis() -> Storage {
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
acc.clone(), // account id
acc, // validator id
asset_hub_paseo_runtime::SessionKeys { aura }, // session keys
)
})
Expand All @@ -79,7 +73,6 @@ pub fn genesis() -> Storage {

build_genesis_storage(
&genesis_config,
asset_hub_paseo_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
asset_hub_paseo_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}
4 changes: 2 additions & 2 deletions system-parachains/asset-hub-paseo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ use frame_system::{
};
use pallet_nfts::PalletFeatures;
use parachains_common::{
message_queue::*, AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets,
Balance, BlockNumber, Hash, Header, Nonce, Signature,
message_queue::*, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash,
Header, Nonce, Signature,
};

use sp_runtime::RuntimeDebug;
Expand Down
8 changes: 4 additions & 4 deletions system-parachains/asset-hub-paseo/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use asset_test_utils::{
use codec::{Decode, Encode};
use frame_support::{assert_ok, traits::fungibles::InspectEnumerable};
use parachains_common::{
AccountId, AssetHubPolkadotAuraId as AuraId, AssetIdForTrustBackedAssets, Balance,
AccountId, AuraId, AssetIdForTrustBackedAssets, Balance,
};
use parachains_runtimes_test_utils::SlotDurations;
use sp_consensus_aura::SlotDuration;
Expand All @@ -60,7 +60,7 @@ fn collator_session_key(account: [u8; 32]) -> CollatorSessionKey<Runtime> {
CollatorSessionKey::new(
AccountId::from(account),
AccountId::from(account),
SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(account)) },
SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(account)) },
)
}

Expand Down Expand Up @@ -128,7 +128,7 @@ fn test_ed_is_one_hundredth_of_relay() {
.with_session_keys(vec![(
AccountId::from(ALICE),
AccountId::from(ALICE),
SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) },
SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) },
)])
.build()
.execute_with(|| {
Expand All @@ -147,7 +147,7 @@ fn test_assets_balances_api_works() {
.with_session_keys(vec![(
AccountId::from(ALICE),
AccountId::from(ALICE),
SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) },
SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) },
)])
.build()
.execute_with(|| {
Expand Down
2 changes: 0 additions & 2 deletions system-parachains/bridge-hub-paseo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ bp-parachains = { workspace = true }
bp-polkadot-core = { workspace = true }
bp-relayers = { workspace = true }
bp-runtime = { workspace = true }
bp-kusama = { workspace = true }
bp-polkadot = { workspace = true }
bridge-hub-common = { workspace = true }
bridge-runtime-common = { workspace = true }
Expand Down Expand Up @@ -130,7 +129,6 @@ std = [
"bp-asset-hub-paseo/std",
"bp-bridge-hub-paseo/std",
"bp-header-chain/std",
"bp-kusama/std",
"bp-messages/std",
"bp-parachains/std",
"bp-polkadot-core/std",
Expand Down

0 comments on commit bf71b58

Please sign in to comment.