node icon indicating copy to clipboard operation
node copied to clipboard

`zetacore` : Remove redundant CoinType in Inbound and Outbound params

Open kingpinXD opened this issue 1 year ago • 1 comments

Cointype is duplicated in the Inbound and Outbound params. The value for both of these is always the same https://github.com/zeta-chain/zeta-node/blob/develop/proto/crosschain/cross_chain_tx.proto#L25-L40 https://github.com/zeta-chain/zeta-node/blob/develop/proto/crosschain/cross_chain_tx.proto#L50-L74

This can be removed and the CoinType field can be moved directly under the CCTX struct

message CrossChainTx {
  string creator = 1;
  string index = 2;
  string zeta_fees = 5 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
    (gogoproto.nullable) = false,
    (gogoproto.moretags) = "yaml:\"zeta_fees\""
  ];
  string relayed_message = 6; // Not used by protocol , just relayed across
  Status cctx_status = 8;
  InboundTxParams inbound_tx_params = 9;
  repeated OutboundTxParams outbound_tx_params = 10;
  common.CoinType coin_type = 11;
}

kingpinXD avatar Mar 25 '24 19:03 kingpinXD

The cointype is not correctly added for revert outbounds https://github.com/zeta-chain/zeta-node/blob/aa81140f78031087d89e0344896d00034fa13dbf/x/crosschain/types/cctx.go#L119-L128

implementing the mentioned changes should also fix this problem

kingpinXD avatar Sep 16 '24 09:09 kingpinXD