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

WIP: Hyperspace mantis #515

Draft
wants to merge 24 commits into
base: hyperspace-solana
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
396 changes: 310 additions & 86 deletions Cargo.lock

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ members = [
"hyperspace/parachain",
"hyperspace/cosmos",
"hyperspace/solana",
"hyperspace/rollup",
"hyperspace/testsuite",
"hyperspace/metrics",
# utilities
"utils/subxt/codegen",
"utils/subxt/generated",
"utils/parachain-node",
"utils/parachain-node/runtime",
"utils/parachain-node/runtime", "light-clients/cf-solana",
# "utils/simnode"
]

Expand All @@ -58,21 +59,21 @@ jsonrpsee = { version = "0.16.3" }
aes-gcm-siv = { git = "https://github.com/RustCrypto/AEADs", rev = "6105d7a5591aefa646a95d12b5e8d3f55a9214ef" }
curve25519-dalek-new = { git = "https://github.com/dalek-cryptography/curve25519-dalek", rev = "0cd099a9fb8ff9f6fedc8723d44dbb1c743e9d35", package = "curve25519-dalek" }
curve25519-dalek = { git = "https://github.com/solana-labs/curve25519-dalek.git", rev = "b500cdc2a920cd5bff9e2dd974d7b97349d61464" }
anchor-client = { git = "https://github.com/dhruvja/anchor" }
anchor-lang = { git = "https://github.com/dhruvja/anchor" }
anchor-client = { git = "https://github.com/mina86/anchor", branch = "send-sync" }
anchor-lang = { git = "https://github.com/mina86/anchor", branch = "send-sync" }

ibc = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false, features = ["borsh", "serde"] }
ibc-client-tendermint-types = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-channel-types = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-client-context = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-client-types = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-commitment-types = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-connection-types = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-host = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-core-host-types = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-primitives = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
ibc-testkit = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054", default-features = false }
# ibc-testkit = { git = "https://github.com/mina86/ibc-rs", rev = "f07276383091f75b7ee8bff6fd434f8214ac5054" }
ibc = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false, features = ["borsh", "serde"] }
ibc-client-tendermint-types = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-channel-types = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-client-context = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-client-types = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-commitment-types = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-connection-types = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-host = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-core-host-types = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-primitives = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
ibc-testkit = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d", default-features = false }
# ibc-testkit = { git = "https://github.com/mina86/ibc-rs", rev = "e1be8c9292c82c1e7c158067f0014fb292ee652d" }
#ibc = { path = "../ibc-rs-mina/ibc" }
#ibc-app-nft-transfer = { path = "../ibc-rs-mina/ibc-apps/ics721-nft-transfer" }
#ibc-app-nft-transfer-types = { path = "../ibc-rs-mina/ibc-apps/ics721-nft-transfer/types" }
Expand Down
33 changes: 33 additions & 0 deletions config/mantis-testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
type = "rollup"
name = "mantis"
rpc_url = "https://mantis-rollup.composable-shared-artifacts.composablenodes.tech/rpc"
ws_url = "wss://mantis-rollup.composable-shared-artifacts.composablenodes.tech/ws"
chain_id = "mantis-1"
client_id = "cf-solana-13"
connection_id = "connection-0"
account_prefix = "ibc"
fee_denom = "stake"
fee_amount = "4000"
gas_limit = 100000000
store_prefix = "ibc"
max_tx_size = 320000
commitment_prefix = [105, 98, 99]
channel_whitelist = [["channel-0", "transfer"]]
commitment_level = "confirmed"
private_key = [
48, 123, 8, 80, 248, 0, 217, 142, 124, 193, 95, 24, 168, 139, 214, 136, 147, 210, 168,
135, 26, 36, 162, 89, 150, 185, 99, 191, 247, 135, 78, 111, 12, 8, 4, 81, 129, 165,
153, 230, 192, 225, 51, 119, 216, 14, 69, 225, 73, 7, 204, 144, 39, 213, 91, 255, 136,
38, 95, 131, 197, 4, 101, 186,
]
solana_ibc_program_id = "2HLLVco5HvwWriNbUhmVwA2pCetRkpgrqwnjcsZdyTKT"
write_program_id = "FufGpHqMQgGVjtMH9AV8YMrJYq8zaK6USRsJkZP4yDjo"
signature_verifier_program_id = "C6r1VEbn3mSpecgrZ7NdBvWUtYVJWrDPv4uU9Xs956gc"
trie_db_path = "../solana-ibc-indexer/indexer.db3"
transaction_sender = "RPC"
trie_rpc_url = "http://34.140.169.227:42069"

[common_state_config]
skip_optional_client_updates = true
max_packets_to_process = 10
handshake_completed = true
26 changes: 16 additions & 10 deletions config/solana-devnet.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
type = "solana"
name = "solana"
rpc_url = "https://devnet.helius-rpc.com/?api-key=bc5c0cfc-46df-4781-978f-af6ca7a202c2"
ws_url = "wss://devnet.helius-rpc.com/?api-key=bc5c0cfc-46df-4781-978f-af6ca7a202c2"
rpc_url = "https://devnet.helius-rpc.com/?api-key=5ae782d8-6bf6-489c-b6df-ef7e6289e193"
ws_url = "wss://devnet.helius-rpc.com/?api-key=5ae782d8-6bf6-489c-b6df-ef7e6289e193"
chain_id = "solana-1"
client_id = "08-wasm-201"
connection_id = "connection-1"
client_id = "cf-guest-1"
connection_id = "connection-15"
account_prefix = "ibc"
fee_denom = "stake"
fee_amount = "4000"
gas_limit = 100000000
store_prefix = "ibc"
max_tx_size = 320000
commitment_prefix = [105, 98, 99]
channel_whitelist = [["channel-1", "transfer"]]
channel_whitelist = [["channel-2", "transfer"]]
commitment_level = "confirmed"
private_key = [48, 123, 8, 80, 248, 0, 217, 142, 124, 193, 95, 24, 168, 139, 214, 136, 147, 210, 168, 135, 26, 36, 162, 89, 150, 185, 99, 191, 247, 135, 78, 111, 12, 8, 4, 81, 129, 165, 153, 230, 192, 225, 51, 119, 216, 14, 69, 225, 73, 7, 204, 144, 39, 213, 91, 255, 136, 38, 95, 131, 197, 4, 101, 186]
solana_ibc_program_id = "FeFjYj2YuMsk87Cp48ubzQPtW4MWDaKJrCs1TcdgosZJ"
write_program_id = "FufGpHqMQgGVjtMH9AV8YMrJYq8zaK6USRsJkZP4yDjo"
private_key = [
48, 123, 8, 80, 248, 0, 217, 142, 124, 193, 95, 24, 168, 139, 214, 136, 147, 210, 168,
135, 26, 36, 162, 89, 150, 185, 99, 191, 247, 135, 78, 111, 12, 8, 4, 81, 129, 165,
153, 230, 192, 225, 51, 119, 216, 14, 69, 225, 73, 7, 204, 144, 39, 213, 91, 255, 136,
38, 95, 131, 197, 4, 101, 186,
]
solana_ibc_program_id = "8o54PU8EcKtf4AqkFfqNhCWBqwpvFki64WEVNWAUP84c"
write_program_id = "9tjGWBMR6u6mBzEiW7j6A72KyxzEmcEsW3oV7ijBLmFb"
signature_verifier_program_id = "C6r1VEbn3mSpecgrZ7NdBvWUtYVJWrDPv4uU9Xs956gc"
trie_db_path = "../solana-ibc-indexer/indexer.db3"
transaction_sender = "JITO"
transaction_sender = "RPC"

[common_state_config]
skip_optional_client_updates = true
max_packets_to_process = 10
max_packets_to_process = 10
handshake_completed = true
5 changes: 4 additions & 1 deletion contracts/pallet-ibc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ ics23 = { git = "https://github.com/cosmos/ics23", rev = "74ce807b7be39a7e0afb4e

#guest-chain
cf-guest = { path = "../../light-clients/cf-guest" }
guestchain = { path = "../../../emulated-light-client/common/guestchain" , default-features = false }
guestchain = { git = "https://github.com/ComposableFi/emulated-light-client/" , default-features = false }
ed25519-dalek = { version = "2.1.1", default-features = false, features = ["pkcs8"] }

#rollup
cf-solana = { path = "../../light-clients/cf-solana" }

grandpa-client-primitives = { package = "grandpa-light-client-primitives", path = "../../algorithms/grandpa/primitives", default-features = false }
beefy-client-primitives = { package = "beefy-light-client-primitives", path = "../../algorithms/beefy/primitives", default-features = false }
light-client-common = { path = "../../light-clients/common", default-features = false }
Expand Down
4 changes: 4 additions & 0 deletions contracts/pallet-ibc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,10 @@ pub mod pallet {
let latest_height = guest.latest_height();
AnyClientState::wrap(&guest)
},
AnyClientState::Rollup(rollup) => {
let latest_height = rollup.latest_height();
AnyClientState::wrap(&rollup)
},
AnyClientState::Wasm(_) => return Err(Error::<T>::ClientFreezeFailed.into()),
#[cfg(any(test, feature = "testing"))]
AnyClientState::Mock(mut ms) => {
Expand Down
104 changes: 79 additions & 25 deletions contracts/pallet-ibc/src/light_clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,32 @@ const GUEST_CONSENSUS_STATE_TYPE_URL: &'static str = cf_guest::proto::ConsensusS
const GUEST_HEADER_TYPE_URL: &'static str = cf_guest::proto::Header::IBC_TYPE_URL;
const GUEST_MISBEHAVIOUR_TYPE_URL: &'static str = cf_guest::proto::Misbehaviour::IBC_TYPE_URL;

const ROLLUP_CLIENT_MESSAGE_TYPE_URL: &'static str = cf_solana::proto::ClientMessage::IBC_TYPE_URL;
const ROLLUP_CLIENT_STATE_TYPE_URL: &'static str = cf_solana::proto::ClientState::IBC_TYPE_URL;
const ROLLUP_CONSENSUS_STATE_TYPE_URL: &'static str =
cf_solana::proto::ConsensusState::IBC_TYPE_URL;
const ROLLUP_HEADER_TYPE_URL: &'static str = cf_solana::proto::Header::IBC_TYPE_URL;
const ROLLUP_MISBEHAVIOUR_TYPE_URL: &'static str = cf_solana::proto::Misbehaviour::IBC_TYPE_URL;

#[derive(Clone, Default, PartialEq, Debug, Eq)]
pub struct HostFunctionsManager;

/// Ed25519 public key (a.k.a. verifying key).
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
#[repr(transparent)]
pub struct PubKey(ed25519_dalek::VerifyingKey);
pub struct PubKey(pub ed25519_dalek::VerifyingKey);

impl PubKey {
pub fn to_bytes(&self) -> [u8; 32] {
self.0.as_bytes().clone()
}
}

impl Signature {
pub fn to_bytes(&self) -> [u8; 64] {
self.0.to_bytes()
}
}

impl guestchain::PubKey for PubKey {
type Signature = Signature;
Expand Down Expand Up @@ -120,7 +139,7 @@ impl Ord for PubKey {
/// Ed25519 signature.
#[derive(Clone, PartialEq, Eq, Debug)]
#[repr(transparent)]
pub struct Signature(ed25519_dalek::Signature);
pub struct Signature(pub ed25519_dalek::Signature);

impl guestchain::Signature for Signature {
fn to_vec(&self) -> Vec<u8> {
Expand Down Expand Up @@ -278,7 +297,7 @@ impl grandpa_client_primitives::HostFunctions for HostFunctionsManager {

fn insert_relay_header_hashes(new_hashes: &[<Self::Header as Header>::Hash]) {
if new_hashes.is_empty() {
return
return;
}

GrandpaHeaderHashesSetStorage::mutate(|hashes_set| {
Expand Down Expand Up @@ -333,6 +352,7 @@ pub enum AnyClient {
Tendermint(ics07_tendermint::client_def::TendermintClient<HostFunctionsManager>),
Wasm(ics08_wasm::client_def::WasmClient<AnyClient, AnyClientState, AnyConsensusState>),
Guest(cf_guest::client_def::GuestClient<PubKey>),
Rollup(cf_solana::client_def::SolanaClient),
#[cfg(any(test, feature = "testing"))]
Mock(ibc::mock::client_def::MockClient),
}
Expand All @@ -344,6 +364,7 @@ pub enum AnyUpgradeOptions {
Tendermint(ics07_tendermint::client_state::UpgradeOptions),
Wasm(Box<Self>),
Guest(cf_guest::client::UpgradeOptions),
Rollup(cf_solana::client::UpgradeOptions),
#[cfg(any(test, feature = "testing"))]
Mock(()),
}
Expand All @@ -360,6 +381,8 @@ pub enum AnyClientState {
Wasm(ics08_wasm::client_state::ClientState<AnyClient, Self, AnyConsensusState>),
#[ibc(proto_url = "GUEST_CLIENT_STATE_TYPE_URL")]
Guest(cf_guest::ClientState<PubKey>),
#[ibc(proto_url = "ROLLUP_CLIENT_STATE_TYPE_URL")]
Rollup(cf_solana::ClientState),
#[cfg(any(test, feature = "testing"))]
#[ibc(proto_url = "MOCK_CLIENT_STATE_TYPE_URL")]
Mock(ibc::mock::client_state::MockClientState),
Expand All @@ -376,14 +399,16 @@ impl AnyClientState {
let client_state = AnyClientState::try_from(any).ok()?;

match client_state {
AnyClientState::Wasm(wasm_client_state) =>
any = Any::decode(&*wasm_client_state.data).ok()?,
c =>
AnyClientState::Wasm(wasm_client_state) => {
any = Any::decode(&*wasm_client_state.data).ok()?
},
c => {
if f(&c) {
break Some(c)
break Some(c);
} else {
return None
},
return None;
}
},
};
}
}
Expand Down Expand Up @@ -417,6 +442,7 @@ impl AnyClientState {
AnyClientState::Tendermint(client_state) => client_state.latest_height(),
AnyClientState::Wasm(client_state) => client_state.latest_height(),
AnyClientState::Guest(client_state) => client_state.latest_height(),
AnyClientState::Rollup(client_state) => client_state.latest_height(),
#[cfg(any(test, feature = "testing"))]
AnyClientState::Mock(client_state) => client_state.latest_height(),
}
Expand All @@ -435,6 +461,8 @@ pub enum AnyConsensusState {
Wasm(ics08_wasm::consensus_state::ConsensusState<Self>),
#[ibc(proto_url = "GUEST_CONSENSUS_STATE_TYPE_URL")]
Guest(cf_guest::ConsensusState),
#[ibc(proto_url = "ROLLUP_CONSENSUS_STATE_TYPE_URL")]
Rollup(cf_solana::ConsensusState),
#[cfg(any(test, feature = "testing"))]
#[ibc(proto_url = "MOCK_CONSENSUS_STATE_TYPE_URL")]
Mock(ibc::mock::client_state::MockConsensusState),
Expand Down Expand Up @@ -462,6 +490,8 @@ pub enum AnyClientMessage {
Wasm(ics08_wasm::client_message::ClientMessage<Self>),
#[ibc(proto_url = "GUEST_CLIENT_MESSAGE_TYPE_URL")]
Guest(cf_guest::ClientMessage<PubKey>),
#[ibc(proto_url = "ROLLUP_CLIENT_MESSAGE_TYPE_URL")]
Rollup(cf_solana::ClientMessage),
#[cfg(any(test, feature = "testing"))]
#[ibc(proto_url = "MOCK_CLIENT_MESSAGE_TYPE_URL")]
Mock(ibc::mock::header::MockClientMessage),
Expand Down Expand Up @@ -494,16 +524,18 @@ impl TryFrom<Any> for AnyClientMessage {
ics10_grandpa::client_message::ClientMessage::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
)),
GRANDPA_HEADER_TYPE_URL =>
GRANDPA_HEADER_TYPE_URL => {
Ok(Self::Grandpa(ics10_grandpa::client_message::ClientMessage::Header(
ics10_grandpa::client_message::Header::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
GRANDPA_MISBEHAVIOUR_TYPE_URL =>
)))
},
GRANDPA_MISBEHAVIOUR_TYPE_URL => {
Ok(Self::Grandpa(ics10_grandpa::client_message::ClientMessage::Misbehaviour(
ics10_grandpa::client_message::Misbehaviour::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
)))
},
// TODO: beefy header, misbehaviour impl From<Any>
BEEFY_CLIENT_MESSAGE_TYPE_URL => Ok(Self::Beefy(
ics11_beefy::client_message::ClientMessage::decode_vec(&value.value)
Expand All @@ -513,16 +545,18 @@ impl TryFrom<Any> for AnyClientMessage {
ics07_tendermint::client_message::ClientMessage::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
)),
TENDERMINT_HEADER_TYPE_URL =>
TENDERMINT_HEADER_TYPE_URL => {
Ok(Self::Tendermint(ics07_tendermint::client_message::ClientMessage::Header(
ics07_tendermint::client_message::Header::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
TENDERMINT_MISBEHAVIOUR_TYPE_URL =>
)))
},
TENDERMINT_MISBEHAVIOUR_TYPE_URL => {
Ok(Self::Tendermint(ics07_tendermint::client_message::ClientMessage::Misbehaviour(
ics07_tendermint::client_message::Misbehaviour::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
)))
},
GUEST_CLIENT_MESSAGE_TYPE_URL => Ok(Self::Guest(
cf_guest::ClientMessage::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
Expand All @@ -535,6 +569,18 @@ impl TryFrom<Any> for AnyClientMessage {
cf_guest::Misbehaviour::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
ROLLUP_CLIENT_MESSAGE_TYPE_URL => Ok(Self::Rollup(
cf_solana::ClientMessage::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
)),
ROLLUP_HEADER_TYPE_URL => Ok(Self::Rollup(cf_solana::ClientMessage::from(
cf_solana::Header::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
ROLLUP_MISBEHAVIOUR_TYPE_URL => Ok(Self::Rollup(cf_solana::ClientMessage::from(
cf_solana::Misbehaviour::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
))),
WASM_CLIENT_MESSAGE_TYPE_URL => Ok(Self::Wasm(
ics08_wasm::client_message::ClientMessage::decode_vec(&value.value)
.map_err(ics02_client::error::Error::decode_raw_header)?,
Expand All @@ -547,24 +593,32 @@ impl TryFrom<Any> for AnyClientMessage {
impl From<AnyClientMessage> for Any {
fn from(client_msg: AnyClientMessage) -> Self {
match client_msg {
AnyClientMessage::Wasm(msg) =>
Any { type_url: WASM_CLIENT_MESSAGE_TYPE_URL.to_string(), value: msg.encode_vec() },
AnyClientMessage::Wasm(msg) => {
Any { type_url: WASM_CLIENT_MESSAGE_TYPE_URL.to_string(), value: msg.encode_vec() }
},
AnyClientMessage::Grandpa(msg) => match msg {
ics10_grandpa::client_message::ClientMessage::Header(h) =>
Any { type_url: GRANDPA_HEADER_TYPE_URL.to_string(), value: h.encode_vec() },
ics10_grandpa::client_message::ClientMessage::Header(h) => {
Any { type_url: GRANDPA_HEADER_TYPE_URL.to_string(), value: h.encode_vec() }
},
ics10_grandpa::client_message::ClientMessage::Misbehaviour(m) => Any {
type_url: GRANDPA_MISBEHAVIOUR_TYPE_URL.to_string(),
value: m.encode_vec(),
},
},
AnyClientMessage::Beefy(msg) =>
Any { type_url: BEEFY_CLIENT_MESSAGE_TYPE_URL.to_string(), value: msg.encode_vec() },
AnyClientMessage::Beefy(msg) => {
Any { type_url: BEEFY_CLIENT_MESSAGE_TYPE_URL.to_string(), value: msg.encode_vec() }
},
AnyClientMessage::Tendermint(msg) => Any {
type_url: TENDERMINT_CLIENT_MESSAGE_TYPE_URL.to_string(),
value: msg.encode_vec(),
},
AnyClientMessage::Guest(msg) =>
Any { type_url: GUEST_CLIENT_MESSAGE_TYPE_URL.to_string(), value: msg.encode_vec() },
AnyClientMessage::Guest(msg) => {
Any { type_url: GUEST_CLIENT_MESSAGE_TYPE_URL.to_string(), value: msg.encode_vec() }
},
AnyClientMessage::Rollup(msg) => Any {
type_url: ROLLUP_CLIENT_MESSAGE_TYPE_URL.to_string(),
value: msg.encode_vec(),
},
#[cfg(any(test, feature = "testing"))]
AnyClientMessage::Mock(_msg) => panic!("MockHeader can't be serialized"),
}
Expand Down
Loading