Skip to content

Commit

Permalink
Merge pull request #528 from Cerebellum-Network/refeactoring
Browse files Browse the repository at this point in the history
Use Kusama for Testnet for Hyperbridge testnet integration
  • Loading branch information
ayushmishra2005 authored Jan 14, 2025
2 parents ef23bc1 + 03f6ef1 commit dd58c4a
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 23 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "7.0.0"
version = "7.1.1"
authors = ["Cerebellum-Network"]
edition = "2021"
homepage = "https://cere.network/"
Expand Down
60 changes: 60 additions & 0 deletions consensus.toml
Original file line number Diff line number Diff line change
@@ -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
]
2 changes: 1 addition & 1 deletion runtime/cere-dev/src/hyperbridge_ismp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use super::*;

parameter_types! {
// The hyperbridge parachain on Polkadot
pub const Coprocessor: Option<StateMachine> = Some(StateMachine::Polkadot(4009));
pub const Coprocessor: Option<StateMachine> = 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
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/cere-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion runtime/cere/src/hyperbridge_ismp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use super::*;

parameter_types! {
// The hyperbridge parachain on Polkadot
pub const Coprocessor: Option<StateMachine> = Some(StateMachine::Polkadot(4009));
pub const Coprocessor: Option<StateMachine> = 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
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/cere/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dd58c4a

Please sign in to comment.