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

fix: add legacy messages back to codec #2909

Merged
merged 10 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* [2842](https://github.com/zeta-chain/node/pull/2842) - fix: move interval assignment out of cctx loop in EVM outbound tx scheduler
* [2853](https://github.com/zeta-chain/node/pull/2853) - calling precompile through sc with sc state update
* [2925](https://github.com/zeta-chain/node/pull/2925) - add recover to init chainer to diplay informative message when starting a node from block 1
* [2909](https://github.com/zeta-chain/node/pull/2909) - add legacy messages back to codec for querier backward compatibility

## v20.0.0

Expand Down
1 change: 1 addition & 0 deletions docs/spec/crosschain/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ message MsgVoteGasPrice {
uint64 price = 3;
uint64 priority_fee = 6;
uint64 block_number = 4;
string supply = 5;
lumtis marked this conversation as resolved.
Show resolved Hide resolved
}
```

Expand Down
102 changes: 102 additions & 0 deletions proto/zetachain/zetacore/crosschain/legacy_msgs.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
syntax = "proto3";
package zetachain.zetacore.crosschain;

import "gogoproto/gogo.proto";
lumtis marked this conversation as resolved.
Show resolved Hide resolved
import "zetachain/zetacore/pkg/chains/chains.proto";
import "zetachain/zetacore/pkg/coin/coin.proto";
import "zetachain/zetacore/pkg/proofs/proofs.proto";
import "zetachain/zetacore/crosschain/rate_limiter_flags.proto";
import "zetachain/zetacore/crosschain/cross_chain_tx.proto";

option go_package = "github.com/zeta-chain/node/x/crosschain/types";

// legacy MsgAddOutboundTracker
// defined to keep codec compatibility
message MsgAddToOutTxTracker {
string creator = 1;
int64 chain_id = 2;
uint64 nonce = 3;
string tx_hash = 4;
pkg.proofs.Proof proof = 5;
string block_hash = 6;
int64 tx_index = 7;
}

// legacy MsgAddInboundTracker
lumtis marked this conversation as resolved.
Show resolved Hide resolved
// defined to keep codec compatibility
message MsgAddToInTxTracker {
string creator = 1;
int64 chain_id = 2;
string tx_hash = 3;
pkg.coin.CoinType coin_type = 4;
pkg.proofs.Proof proof = 5;
string block_hash = 6;
int64 tx_index = 7;
}

// legacy MsgRemoveOutboundTracker
// defined to keep codec compatibility
message MsgRemoveFromOutTxTracker {
string creator = 1;
int64 chain_id = 2;
uint64 nonce = 3;
}

// legacy MsgVoteOutbound
// defined to keep codec compatibility
message MsgVoteOnObservedOutboundTx {
string creator = 1;
string cctx_hash = 2;
string observed_outTx_hash = 3;
uint64 observed_outTx_blockHeight = 4;
uint64 observed_outTx_gas_used = 10;
string observed_outTx_effective_gas_price = 11 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
uint64 observed_outTx_effective_gas_limit = 12;
string value_received = 5 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"value_received\""
];
pkg.chains.ReceiveStatus status = 6;
int64 outTx_chain = 7;
uint64 outTx_tss_nonce = 8;
pkg.coin.CoinType coin_type = 9;
lumtis marked this conversation as resolved.
Show resolved Hide resolved
}

// legacy MsgVoteInbound
// defined to keep codec compatibility
message MsgVoteOnObservedInboundTx {
string creator = 1;
string sender = 2;
int64 sender_chain_id = 3;
string receiver = 4;
int64 receiver_chain = 5;
// string zeta_burnt = 6;
string amount = 6 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint",
(gogoproto.nullable) = false
];
// string mMint = 7;
string message = 8;
string in_tx_hash = 9;
uint64 in_block_height = 10;
uint64 gas_limit = 11;
pkg.coin.CoinType coin_type = 12;
string tx_origin = 13;
string asset = 14;
// event index of the sent asset in the observed tx
uint64 event_index = 15;
}
lumtis marked this conversation as resolved.
Show resolved Hide resolved

// legacy MsgVoteGasPrice
// defined to keep codec compatibility
message MsgGasPriceVoter {
string creator = 1;
int64 chain_id = 2;
uint64 price = 3;
uint64 block_number = 4;
string supply = 5;
}
3 changes: 2 additions & 1 deletion proto/zetachain/zetacore/crosschain/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ message MsgVoteGasPrice {

uint64 block_number = 4;

reserved 5; // deprecated `string supply`
// unused
lumtis marked this conversation as resolved.
Show resolved Hide resolved
string supply = 5;
lumtis marked this conversation as resolved.
Show resolved Hide resolved
}

message MsgVoteGasPriceResponse {}
Expand Down
1 change: 1 addition & 0 deletions typescript/zetachain/zetacore/crosschain/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export * from "./genesis_pb";
export * from "./inbound_hash_to_cctx_pb";
export * from "./inbound_tracker_pb";
export * from "./last_block_height_pb";
export * from "./legacy_msgs_pb";
export * from "./outbound_tracker_pb";
export * from "./query_pb";
export * from "./rate_limiter_flags_pb";
Expand Down
Loading
Loading