Skip to content

Commit

Permalink
add ismp-grandpa to gargantua-runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Sep 19, 2024
1 parent 9775197 commit d817801
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,13 @@ geth-primitives = { path = "./modules/consensus/geth-primitives", default-featur
sync-committee-primitives = { path = "./modules/consensus/sync-committee/primitives", default-features = false }
sync-committee-prover = { path = "./modules/consensus/sync-committee/prover" }
sync-committee-verifier = { path = "./modules/consensus/sync-committee/verifier", default-features = false }
grandpa-verifier-primitives = { path = "./modules/consensus/grandpa/primitives", default-features = false }
grandpa-verifier-primitives = { version = "0.1.0", path = "./modules/consensus/grandpa/primitives", default-features = false }
grandpa-verifier = { version = "0.1.0", path = "./modules/consensus/grandpa/verifier", default-features = false }
grandpa-prover = { path = "./modules/consensus/grandpa/prover" }
grandpa-verifier = { path = "./modules/consensus/grandpa/verifier", default-features = false }

# consensus clients
ismp-bsc = { path = "./modules/ismp/clients/bsc", default-features = false }
ismp-grandpa = { version = "1.15.0", path = "./modules/ismp/clients/grandpa", default-features = false }
ismp-parachain = { version = "1.15.0", path = "./modules/ismp/clients/parachain/client", default-features = false }
ismp-parachain-inherent = { version = "1.15.0", path = "./modules/ismp/clients/parachain/inherent" }
ismp-parachain-runtime-api = { version = "1.15.0", path = "./modules/ismp/clients/parachain/runtime-api", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/clients/grandpa/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ismp-grandpa"
version = "0.1.0"
version = "1.15.0"
edition = "2021"
authors = ["Polytope Labs <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 2 additions & 0 deletions parachain/runtimes/gargantua/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ pallet-ismp-runtime-api = { workspace = true }
ismp-sync-committee = { workspace = true }
ismp-bsc = { workspace = true }
ismp-parachain = { workspace = true }
ismp-grandpa = { workspace = true }
ismp-parachain-runtime-api = { workspace = true }
pallet-ismp-relayer = { workspace = true }
pallet-ismp-host-executive = { workspace = true }
Expand Down Expand Up @@ -162,6 +163,7 @@ std = [
"parachains-common/std",
"sp-genesis-builder/std",
"ismp-bsc/std",
"ismp-grandpa/std",
"ismp-parachain/std",
"ismp-parachain-runtime-api/std",
"pallet-ismp-relayer/std",
Expand Down
7 changes: 7 additions & 0 deletions parachain/runtimes/gargantua/src/ismp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl Get<Option<StateMachine>> for Coprocessor {
Some(HostStateMachine::get())
}
}

impl pallet_ismp::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type AdminOrigin = EnsureRoot<AccountId>;
Expand All @@ -90,11 +91,17 @@ impl pallet_ismp::Config for Runtime {
IsmpParachain,
HyperbridgeClientMachine<Runtime, Ismp>,
>,
ismp_grandpa::consensus::GrandpaConsensusClient<Runtime>,
);
type Mmr = Mmr;
type WeightProvider = ();
}

impl ismp_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type IsmpHost = Ismp;
}

impl pallet_token_governor::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Dispatcher = Ismp;
Expand Down
4 changes: 3 additions & 1 deletion parachain/runtimes/gargantua/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,9 @@ construct_runtime!(
StateCoprocessor: pallet_state_coprocessor = 60,

// Governance
TechnicalCollective: pallet_collective = 80
TechnicalCollective: pallet_collective = 80,
// consensus clients
IsmpGrandpa: ismp_grandpa = 255
}
);

Expand Down

0 comments on commit d817801

Please sign in to comment.