Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update runtime v1.2.8 #127

Merged
merged 15 commits into from
Sep 12, 2024
189 changes: 151 additions & 38 deletions Cargo.lock

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ repository = "https://github.com/paseo-network/runtimes.git"
license = "GPL-3.0-only"

[workspace.dependencies]
kusama-runtime-constants = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "kusama-runtime-constants", default-features = false }
bp-bridge-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-bridge-hub-kusama", default-features = false }
bp-bridge-hub-polkadot = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-bridge-hub-polkadot", default-features = false }

bp-asset-hub-kusama = { git = "https://github.com/polkadot-fellows/runtimes", tag = "v1.2.8", package = "bp-asset-hub-kusama", default-features = false }

asset-hub-paseo-runtime = { path = "system-parachains/asset-hub-paseo", default-features = false }
bridge-hub-paseo-runtime = { path = "system-parachains/bridge-hub-paseo", default-features = false }
bp-bridge-hub-paseo = { path = "system-parachains/bridge-hub-paseo/primitives", default-features = false}
Expand All @@ -18,14 +24,17 @@ bridge-hub-paseo-emulated-chain = { path = "integration-tests/emulated/chains/pa
penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/testing/penpal"}
paseo-emulated-chain = { path = "integration-tests/emulated/chains/relays/paseo"}
assert_matches = { version = "1.5.0" }

asset-test-utils = { version = "8.0.1" }
assets-common = { version = "0.8.0", default-features = false }
authority-discovery-primitives = { version = "27.0.0", default-features = false, package = "sp-authority-discovery" }
babe-primitives = { version = "0.33.0", default-features = false, package = "sp-consensus-babe" }
beefy-primitives = { version = "14.0.0", default-features = false, package = "sp-consensus-beefy" }
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 @@ -153,17 +162,17 @@ separator = { version = "0.4.1" }
serde = { version = "1.0.196" }
serde_json = { version = "1.0.113" }
smallvec = { version = "1.13.1" }
snowbridge-beacon-primitives = { version = "0.1.0", default-features = false }
snowbridge-core = { version = "0.1.1", default-features = false }
snowbridge-beacon-primitives = { version = "0.1.2", default-features = false }
snowbridge-core = { version = "0.1.3", default-features = false }
snowbridge-outbound-queue-runtime-api = { version = "0.1.1", default-features = false }
snowbridge-pallet-ethereum-client = { version = "0.1.2", default-features = false }
snowbridge-pallet-inbound-queue = { version = "0.1.1", default-features = false }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.0" }
snowbridge-pallet-ethereum-client = { version = "0.1.3", default-features = false }
snowbridge-pallet-inbound-queue = { version = "0.1.3", default-features = false }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.1" }
snowbridge-pallet-outbound-queue = { version = "0.1.1", default-features = false }
snowbridge-pallet-system = { version = "0.1.1", default-features = false }
snowbridge-router-primitives = { version = "0.1.0", default-features = false }
snowbridge-runtime-common = { version = "0.1.0", default-features = false }
snowbridge-runtime-test-common = { version = "0.1.0" }
snowbridge-runtime-test-common = { version = "0.1.2" }
snowbridge-system-runtime-api = { version = "0.1.0", default-features = false }
sp-api = { version = "27.0.1", default-features = false }
sp-application-crypto = { version = "31.0.0", default-features = false }
Expand Down
15 changes: 6 additions & 9 deletions chain-spec-generator/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,12 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result<Box<dyn Chain
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("paseo") | x.starts_with("dot") => {
Ok(Box::new(PaseoChainSpec::from_json_file(path)?))
},
x if x.starts_with("asset-hub-paseo") => {
Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?))
},
x if x.starts_with("bridge-hub-paseo") => {
Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?))
},
x if x.starts_with("paseo") | x.starts_with("dot") =>
Ok(Box::new(PaseoChainSpec::from_json_file(path)?)),
x if x.starts_with("asset-hub-paseo") =>
Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?)),
x if x.starts_with("bridge-hub-paseo") =>
Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?)),
_ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")),
}
}
5 changes: 2 additions & 3 deletions chain-spec-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ fn main() -> Result<(), String> {
),
(
"people-paseo-local",
Box::new(|| system_parachains_specs::people_paseo_local_testnet_config())
as Box<_>,
Box::new(|| system_parachains_specs::people_paseo_local_testnet_config()) as Box<_>,
),
]);

Expand All @@ -70,7 +69,7 @@ fn main() -> Result<(), String> {
print!("{chain_spec}");
Ok(())
} else {
let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| {
let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| {
let extra = if n + 1 < supported_chains.len() { ", " } else { "" };
format!("{c}{k}{extra}")
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// limitations under the License.

// Substrate
use sp_core::{storage::Storage};
use sp_core::storage::Storage;

// Cumulus
use emulated_integration_tests_common::{
Expand Down Expand Up @@ -46,8 +46,8 @@ pub fn genesis() -> Storage {
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc, // validator id
acc.clone(), // account id
acc, // validator id
bridge_hub_paseo_runtime::SessionKeys { aura }, // session keys
)
})
Expand All @@ -67,7 +67,6 @@ pub fn genesis() -> Storage {

build_genesis_storage(
&genesis_config,
bridge_hub_paseo_runtime::WASM_BINARY
.expect("WASM binary was not built, please build it!"),
bridge_hub_paseo_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ pub fn genesis() -> Storage {
minimum_validator_count: 1,
stakers: validators::initial_authorities()
.iter()
.map(|x| {
(x.0.clone(), x.1.clone(), STASH, paseo_runtime::StakerStatus::Validator)
})
.map(|x| (x.0.clone(), x.1.clone(), STASH, paseo_runtime::StakerStatus::Validator))
.collect(),
invulnerables: validators::initial_authorities().iter().map(|x| x.0.clone()).collect(),
force_era: pallet_staking::Forcing::ForceNone,
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/emulated/networks/paseo-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

pub use asset_hub_paseo_emulated_chain;
pub use bridge_hub_paseo_emulated_chain;
pub use penpal_emulated_chain;
pub use paseo_emulated_chain;
pub use penpal_emulated_chain;

use asset_hub_paseo_emulated_chain::AssetHubPaseo;
use bridge_hub_paseo_emulated_chain::BridgeHubPaseo;
use penpal_emulated_chain::PenpalB;
use paseo_emulated_chain::Paseo;
use penpal_emulated_chain::PenpalB;

// Cumulus
use emulated_integration_tests_common::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ pub use sp_runtime::DispatchError;
pub use xcm::{
latest::ParentThen,
prelude::{AccountId32 as AccountId32Junction, *},
v3::{
self, Error,
NetworkId::{Polkadot as PolkadotId},
},
v3::{self, Error, NetworkId::Polkadot as PolkadotId},
};

// Bridges
Expand All @@ -42,25 +39,20 @@ pub use emulated_integration_tests_common::{
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
};
pub use integration_tests_helpers::test_sibling_is_trusted_teleporter;
pub use parachains_common::{AccountId, Balance};
pub use paseo_system_emulated_network::{
asset_hub_paseo_emulated_chain::{
genesis::ED as ASSET_HUB_POLKADOT_ED, AssetHubPaseoParaPallet as AssetHubPaseoPallet,
},
bridge_hub_paseo_emulated_chain::{
genesis::ED as BRIDGE_HUB_POLKADOT_ED,
BridgeHubPaseoParaPallet as BridgeHubPaseoPallet,
genesis::ED as BRIDGE_HUB_POLKADOT_ED, BridgeHubPaseoParaPallet as BridgeHubPaseoPallet,
},
paseo_emulated_chain::{genesis::ED as POLKADOT_ED, PaseoRelayPallet as PaseoPallet},
AssetHubPaseoPara as AssetHubPaseo,
AssetHubPaseoParaReceiver as AssetHubPaseoReceiver,
AssetHubPaseoParaSender as AssetHubPaseoSender,
BridgeHubPaseoPara as BridgeHubPaseo,
BridgeHubPaseoParaSender as BridgeHubPaseoSender, PaseoRelay as Paseo,
};
pub use parachains_common::{AccountId, Balance};
pub use paseo_system_emulated_network::{
penpal_emulated_chain::PenpalBParaPallet as PenpalBPallet,
BridgeHubPaseoParaReceiver as BridgeHubPaseoReceiver, PenpalBPara as PenpalB,
AssetHubPaseoPara as AssetHubPaseo, AssetHubPaseoParaReceiver as AssetHubPaseoReceiver,
AssetHubPaseoParaSender as AssetHubPaseoSender, BridgeHubPaseoPara as BridgeHubPaseo,
BridgeHubPaseoParaReceiver as BridgeHubPaseoReceiver,
BridgeHubPaseoParaSender as BridgeHubPaseoSender, PaseoRelay as Paseo, PenpalBPara as PenpalB,
PenpalBParaReceiver as PenpalBReceiver, PenpalBParaSender as PenpalBSender,
};

Expand Down
Loading
Loading