From 36ed534bad589ab7f0b525ee64ced1300a0cc07b Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Tue, 14 Jan 2025 17:32:50 +0530 Subject: [PATCH 1/2] Use Kusama for Testnet for Hyperbridge testnet integration --- Cargo.lock | 36 ++++++++++++------------ Cargo.toml | 2 +- runtime/cere-dev/src/hyperbridge_ismp.rs | 2 +- runtime/cere-dev/src/lib.rs | 2 +- runtime/cere/src/hyperbridge_ismp.rs | 2 +- runtime/cere/src/lib.rs | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 500dd58ab..7272ddf02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1053,7 +1053,7 @@ dependencies = [ [[package]] name = "cere-cli" -version = "7.0.0" +version = "7.1.1" dependencies = [ "cere-client", "cere-service", @@ -1071,7 +1071,7 @@ dependencies = [ [[package]] name = "cere-client" -version = "7.0.0" +version = "7.1.1" dependencies = [ "cere-dev-runtime", "cere-runtime", @@ -1106,7 +1106,7 @@ dependencies = [ [[package]] name = "cere-dev-runtime" -version = "7.0.0" +version = "7.1.1" dependencies = [ "anyhow", "cere-runtime-common", @@ -1209,7 +1209,7 @@ dependencies = [ [[package]] name = "cere-rpc" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "jsonrpsee", @@ -1241,7 +1241,7 @@ dependencies = [ [[package]] name = "cere-runtime" -version = "7.0.0" +version = "7.1.1" dependencies = [ "anyhow", "cere-runtime-common", @@ -1344,7 +1344,7 @@ dependencies = [ [[package]] name = "cere-runtime-common" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "frame-support", @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "cere-service" -version = "7.0.0" +version = "7.1.1" dependencies = [ "cere-client", "cere-dev-runtime", @@ -2091,7 +2091,7 @@ dependencies = [ [[package]] name = "ddc-primitives" -version = "7.0.0" +version = "7.1.1" dependencies = [ "frame-support", "frame-system", @@ -6068,7 +6068,7 @@ dependencies = [ [[package]] name = "pallet-chainbridge" -version = "7.0.0" +version = "7.1.1" dependencies = [ "frame-support", "frame-system", @@ -6193,7 +6193,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -6219,7 +6219,7 @@ dependencies = [ [[package]] name = "pallet-ddc-clusters-gov" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -6254,7 +6254,7 @@ dependencies = [ [[package]] name = "pallet-ddc-customers" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -6277,7 +6277,7 @@ dependencies = [ [[package]] name = "pallet-ddc-nodes" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -6298,7 +6298,7 @@ dependencies = [ [[package]] name = "pallet-ddc-payouts" -version = "7.0.0" +version = "7.1.1" dependencies = [ "byte-unit", "chrono", @@ -6322,7 +6322,7 @@ dependencies = [ [[package]] name = "pallet-ddc-staking" -version = "7.0.0" +version = "7.1.1" dependencies = [ "ddc-primitives", "frame-benchmarking", @@ -6438,7 +6438,7 @@ dependencies = [ [[package]] name = "pallet-erc20" -version = "7.0.0" +version = "7.1.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6457,7 +6457,7 @@ dependencies = [ [[package]] name = "pallet-erc721" -version = "7.0.0" +version = "7.1.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6818,7 +6818,7 @@ dependencies = [ [[package]] name = "pallet-origins" -version = "7.0.0" +version = "7.1.1" dependencies = [ "cere-runtime-common", "frame-benchmarking", diff --git a/Cargo.toml b/Cargo.toml index cedc0c6e9..2fd53b7a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "7.0.0" +version = "7.1.1" authors = ["Cerebellum-Network"] edition = "2021" homepage = "https://cere.network/" diff --git a/runtime/cere-dev/src/hyperbridge_ismp.rs b/runtime/cere-dev/src/hyperbridge_ismp.rs index 208452f20..67c7a83ca 100644 --- a/runtime/cere-dev/src/hyperbridge_ismp.rs +++ b/runtime/cere-dev/src/hyperbridge_ismp.rs @@ -9,7 +9,7 @@ use super::*; parameter_types! { // The hyperbridge parachain on Polkadot - pub const Coprocessor: Option = Some(StateMachine::Polkadot(4009)); + pub const Coprocessor: Option = Some(StateMachine::Kusama(4009)); // The host state machine of this pallet, this must be unique to all every solochain pub const HostStateMachine: StateMachine = StateMachine::Substrate(*b"cere"); // your unique chain id here } diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index 0d84411bc..132551cfc 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -163,7 +163,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 71000, + spec_version: 71100, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 24, diff --git a/runtime/cere/src/hyperbridge_ismp.rs b/runtime/cere/src/hyperbridge_ismp.rs index 4c9ddea69..de23a7fb2 100644 --- a/runtime/cere/src/hyperbridge_ismp.rs +++ b/runtime/cere/src/hyperbridge_ismp.rs @@ -9,7 +9,7 @@ use super::*; parameter_types! { // The hyperbridge parachain on Polkadot - pub const Coprocessor: Option = Some(StateMachine::Polkadot(4009)); + pub const Coprocessor: Option = Some(StateMachine::Kusama(4009)); // The host state machine of this pallet, this must be unique to all every solochain pub const HostStateMachine: StateMachine = StateMachine::Substrate(*b"cere"); // your unique chain id here } diff --git a/runtime/cere/src/lib.rs b/runtime/cere/src/lib.rs index 9bf451243..a958c433f 100644 --- a/runtime/cere/src/lib.rs +++ b/runtime/cere/src/lib.rs @@ -158,7 +158,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 71000, + spec_version: 71100, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 24, From 03f6ef121ef6d60ea14fb44821861942b5ac9c8c Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Tue, 14 Jan 2025 18:08:21 +0530 Subject: [PATCH 2/2] configuration file for relayer --- consensus.toml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 consensus.toml diff --git a/consensus.toml b/consensus.toml new file mode 100644 index 000000000..286025dbd --- /dev/null +++ b/consensus.toml @@ -0,0 +1,60 @@ +# Required +[hyperbridge] +type = "grandpa" + +[hyperbridge.grandpa] +# Hyperbridge's relay chain websocket RPC +rpc = "wss://hyperbridge-paseo-relay.blockops.network:443" +# Hyperbridge's slot duration +slot_duration = 6 +# How frequently to exchange consensus proofs +consensus_update_frequency = 60 +# Hyperbridge's paraId on the provided relay chain +# For Paseo Testnet: para_ids = [4009] +# For Polkadot Mainnet: para_ids = [3367] +para_ids = [4009] + +[hyperbridge.substrate] +# Hyperbridge's relay chain websocket RPC +rpc_ws = "wss://hyperbridge-paseo-rpc.blockops.network:443" +# Hyperbridge's hashing algorithm +hashing = "Keccak" +# Hyperbridge's consensus state id +# For Paseo Testnet: PAS0 +# For Polkadot Mainnet: DOT0 +consensus_state_id = "PAS0" +# Hyperbridge's state machine ID +# For Paseo Testnet: KUSAMA-4009 +# For Polkadot Mainnet: POLKADOT-3367 +state_machine = "KUSAMA-4009" + +# can use any key here +[cere] +type = "grandpa" + +[cere.substrate] +# Solochains's websocket RPC +rpc_ws = "wss://rpc.testnet.cere.network:443" +# Hashing can be "Keccak" or "Blake2" +hashing = "Blake2" +# Solochains's consensus state id on Hyperbridge +# should be 4 utf-8 chars chosen by solochain +consensus_state_id = "CERE" +# Solochains's state machine id. eg +state_machine = "SUBSTRATE-cere" + +[cere.grandpa] +# Solochains's websocket RPC +rpc = "wss://rpc.testnet.cere.network:443" +# Solochains's slot duration +slot_duration = 6 +# How frequently to exchange consensus proofs +consensus_update_frequency = 60 +# Any para ids to prove if solochain is actually a relay chain +para_ids = [] + +[relayer] +maximum_update_intervals = [ + [{ state_id = "SUBSTRATE-cere", consensus_state_id = "CERE" }, 180], # Restart if no update after 3 minutes + [{ state_id = "KUSAMA-4009", consensus_state_id = "PAS0" }, 180], # Restart if no update after 3 minutes +]