From 83c3269154346b48d565b6a51f221b85d9e1c078 Mon Sep 17 00:00:00 2001 From: Sergej Sakac <73715684+Szegoo@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:51:39 +0200 Subject: [PATCH 1/2] Zobmienet docs (#88) * Zobmienet docs * fix * ... * grammar --- README.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 6dcc70c5..25982308 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,26 @@ -# Substrate Cumulus Parachain Template +# RegionX parachain -A new [Cumulus](https://github.com/paritytech/cumulus/)-based Substrate node, ready for hacking ☁️.. +### Running zombienet tests -This project is originally a fork of the -[Substrate Node Template](https://github.com/substrate-developer-hub/substrate-node-template) -modified to include dependencies required for registering this node as a **parathread** or -**parachain** to a **relay chain**. +1. Install the latest zombienet release from the [Zombienet release page](https://github.com/paritytech/zombienet/releases). -The stand-alone version of this template is hosted on the -[Substrate Devhub Parachain Template](https://github.com/substrate-developer-hub/substrate-parachain-template/) -for each release of Polkadot. It is generated directly to the upstream -[Parachain Template in Cumulus](https://github.com/paritytech/cumulus/tree/master/parachain-template) -at each release branch using the -[Substrate Template Generator](https://github.com/paritytech/substrate-template-generator/). +2. Build the `regionx-node` by running: -👉 Learn more about parachains [here](https://wiki.polkadot.network/docs/learn-parachains), and -parathreads [here](https://wiki.polkadot.network/docs/learn-parathreads). + ``` + cargo build --release + ``` +3. Get the polkadot binary: -🧙 Learn about how to use this template and run your own parachain testnet for it in the -[Devhub Cumulus Tutorial](https://docs.substrate.io/tutorials/v3/cumulus/start-relay/). \ No newline at end of file + ```sh + zombienet-linux setup polkadot + + Please add the dir to your $PATH by running the command: + export PATH=/home//zombienet/dist:$PATH + ``` + +4. Run the test: + + ``` + zombienet-linux -p native test ./zombienet_tests/0001-smoke-test.zndsl + ``` From 3b26a94260912eb31aad40e828647c27e1de9dc5 Mon Sep 17 00:00:00 2001 From: Sergej Sakac <73715684+Szegoo@users.noreply.github.com> Date: Sat, 20 Apr 2024 09:22:13 +0200 Subject: [PATCH 2/2] ISMP dependency update (#89) --- Cargo.lock | 42 ++++++++++++++++++------------------- Cargo.toml | 12 +++++------ runtime/regionx/Cargo.toml | 4 ++-- runtime/regionx/src/ismp.rs | 1 - runtime/regionx/src/lib.rs | 4 ++-- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c0d31cbf..e84fb915 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4162,7 +4162,7 @@ dependencies = [ [[package]] name = "ismp" version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" dependencies = [ "derive_more", "hex", @@ -4176,7 +4176,7 @@ dependencies = [ [[package]] name = "ismp-parachain" version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -4200,7 +4200,7 @@ dependencies = [ [[package]] name = "ismp-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" dependencies = [ "anyhow", "async-trait", @@ -4219,25 +4219,11 @@ dependencies = [ [[package]] name = "ismp-parachain-runtime-api" version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" dependencies = [ "sp-api", ] -[[package]] -name = "ismp-runtime-api" -version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" -dependencies = [ - "ismp", - "pallet-ismp", - "parity-scale-codec", - "serde", - "sp-api", - "sp-core", - "sp-std", -] - [[package]] name = "itertools" version = "0.10.5" @@ -6460,7 +6446,7 @@ dependencies = [ [[package]] name = "pallet-ismp" version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" dependencies = [ "ckb-merkle-mountain-range", "derive_more", @@ -6483,6 +6469,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-ismp-runtime-api" +version = "0.1.0" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" +dependencies = [ + "ismp", + "pallet-ismp", + "parity-scale-codec", + "serde", + "sp-api", + "sp-core", + "sp-std", +] + [[package]] name = "pallet-membership" version = "28.0.0" @@ -9325,7 +9325,6 @@ dependencies = [ "ismp", "ismp-parachain", "ismp-parachain-runtime-api", - "ismp-runtime-api", "log", "orml-asset-registry", "orml-traits", @@ -9335,6 +9334,7 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-ismp", + "pallet-ismp-runtime-api", "pallet-message-queue", "pallet-multisig", "pallet-proxy", @@ -12627,7 +12627,7 @@ dependencies = [ [[package]] name = "substrate-state-machine" version = "0.1.0" -source = "git+https://github.com/Szegoo/hyperbridge.git?branch=fix-try-runtime#554bb4ba0e108ab4d4958ab45e38809e1a51f10f" +source = "git+https://github.com/polytope-labs/hyperbridge.git?branch=main#a58262ac7acf9dc96e1bed233a67251d97fb2d62" dependencies = [ "ckb-merkle-mountain-range", "frame-support", diff --git a/Cargo.toml b/Cargo.toml index cda66da2..072cbcfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,12 +136,12 @@ orml-asset-registry = { version = "0.7.0", default-features = false } orml-traits = { version = "0.7.0", default-features = false } # Polytope Labs -ismp = { git="https://github.com/Szegoo/hyperbridge.git", branch="fix-try-runtime", default-features = false } -pallet-ismp = { git="https://github.com/Szegoo/hyperbridge.git", branch="fix-try-runtime", default-features = false } -ismp-parachain = { git="https://github.com/Szegoo/hyperbridge.git", branch="fix-try-runtime", default-features = false } -ismp-parachain-inherent = { git="https://github.com/Szegoo/hyperbridge.git", branch="fix-try-runtime", default-features = false } -ismp-runtime-api = { git="https://github.com/Szegoo/hyperbridge.git", branch="fix-try-runtime", default-features = false } -ismp-parachain-runtime-api = { git="https://github.com/Szegoo/hyperbridge.git", branch="fix-try-runtime", default-features = false } +ismp = { git="https://github.com/polytope-labs/hyperbridge.git", branch="main", default-features = false } +pallet-ismp = { git="https://github.com/polytope-labs/hyperbridge.git", branch="main", default-features = false } +ismp-parachain = { git="https://github.com/polytope-labs/hyperbridge.git", branch="main", default-features = false } +ismp-parachain-inherent = { git="https://github.com/polytope-labs/hyperbridge.git", branch="main", default-features = false } +pallet-ismp-runtime-api = { git="https://github.com/polytope-labs/hyperbridge.git", branch="main", default-features = false } +ismp-parachain-runtime-api = { git="https://github.com/polytope-labs/hyperbridge.git", branch="main", default-features = false } # Local regionx-primitives = { path = "./runtime/primitives", default-features = false } diff --git a/runtime/regionx/Cargo.toml b/runtime/regionx/Cargo.toml index 583bd00c..5cb1cf0b 100644 --- a/runtime/regionx/Cargo.toml +++ b/runtime/regionx/Cargo.toml @@ -26,7 +26,7 @@ regionx-primitives = { workspace = true } ismp = { workspace = true, default-features = false } pallet-ismp = { workspace = true, default-features = false } ismp-parachain = { workspace = true, default-features = false } -ismp-runtime-api = { workspace = true, default-features = false } +pallet-ismp-runtime-api = { workspace = true, default-features = false } ismp-parachain-runtime-api = { workspace = true, default-features = false } # Orml @@ -103,7 +103,7 @@ std = [ "cumulus-primitives-utility/std", "ismp/std", "pallet-ismp/std", - "ismp-runtime-api/std", + "pallet-ismp-runtime-api/std", "ismp-parachain/std", "ismp-parachain-runtime-api/std", "frame-benchmarking?/std", diff --git a/runtime/regionx/src/ismp.rs b/runtime/regionx/src/ismp.rs index 82eca5a5..55da4e52 100644 --- a/runtime/regionx/src/ismp.rs +++ b/runtime/regionx/src/ismp.rs @@ -56,7 +56,6 @@ impl pallet_ismp::Config for Runtime { type TimeProvider = Timestamp; type Router = Router; type ConsensusClients = (ParachainConsensusClient,); - type WeightInfo = (); type WeightProvider = (); } diff --git a/runtime/regionx/src/lib.rs b/runtime/regionx/src/lib.rs index 390293ab..7313576b 100644 --- a/runtime/regionx/src/lib.rs +++ b/runtime/regionx/src/lib.rs @@ -74,7 +74,7 @@ use frame_system::{ EnsureRoot, EnsureSigned, Phase, }; use pallet_ismp::{ - mmr_primitives::{Leaf, LeafIndex}, + mmr::primitives::{Leaf, LeafIndex}, primitives::Proof, ProofKeys, }; @@ -809,7 +809,7 @@ impl_runtime_apis! { } } - impl ismp_runtime_api::IsmpRuntimeApi::Hash> for Runtime { + impl pallet_ismp_runtime_api::IsmpRuntimeApi::Hash> for Runtime { /// Return the number of MMR leaves. fn mmr_leaf_count() -> Result { Ok(Ismp::mmr_leaf_count())