From 1f2c1e16c1c2b89d5292154b6d603820430916db Mon Sep 17 00:00:00 2001 From: Dmitry S <11892559+swift1337@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:37:31 +0100 Subject: [PATCH] refactor(votes)!: drop support for header proofs (#3125) * Revome block header proofs from zetaclient * Remove proofs from NewMsgAddOutboundTracker * Removed block header proofs from cctx cosmos module * Removed block header proof for vote inbound tracker * Update changelog * Update codegen * Address PR comments --- changelog.md | 5 +- docs/openapi/openapi.swagger.yaml | 2 - docs/spec/crosschain/messages.md | 6 - .../crosschain/outbound_tracker.proto | 4 +- proto/zetachain/zetacore/crosschain/tx.proto | 12 +- .../crosschain/outbound_tracker_pb.d.ts | 5 - .../zetachain/zetacore/crosschain/tx_pb.d.ts | 31 - .../client/cli/tx_add_outbound_tracker.go | 11 +- .../keeper/msg_server_add_inbound_tracker.go | 55 +- .../msg_server_add_inbound_tracker_test.go | 245 +------- .../keeper/msg_server_add_outbound_tracker.go | 74 +-- .../msg_server_add_outbound_tracker_test.go | 320 ++-------- .../types/message_add_outbound_tracker.go | 23 +- .../message_add_outbound_tracker_test.go | 34 +- x/crosschain/types/outbound_tracker.pb.go | 81 +-- x/crosschain/types/tx.pb.go | 545 ++++-------------- zetaclient/chains/bitcoin/signer/signer.go | 5 +- .../evm/signer/outbound_tracker_reporter.go | 2 +- zetaclient/chains/interfaces/interfaces.go | 22 +- .../signer/outbound_tracker_reporter.go | 2 +- .../chains/ton/observer/observer_test.go | 5 +- zetaclient/chains/ton/observer/outbound.go | 4 +- zetaclient/chains/ton/signer/signer_test.go | 5 +- .../chains/ton/signer/signer_tracker.go | 2 +- zetaclient/testutils/mocks/zetacore_client.go | 102 +--- zetaclient/zetacore/broadcast_test.go | 22 +- zetaclient/zetacore/client_vote.go | 29 - zetaclient/zetacore/tx.go | 16 +- zetaclient/zetacore/tx_test.go | 53 +- 29 files changed, 269 insertions(+), 1453 deletions(-) diff --git a/changelog.md b/changelog.md index 846a76f2e7..074a2877aa 100644 --- a/changelog.md +++ b/changelog.md @@ -6,14 +6,13 @@ * [2984](https://github.com/zeta-chain/node/pull/2984) - add Whitelist message ability to whitelist SPL tokens on Solana * [3091](https://github.com/zeta-chain/node/pull/3091) - improve build reproducability. `make release{,-build-only}` checksums should now be stable. -### Refactor -* [3122](https://github.com/zeta-chain/node/pull/3122) - improve & refactor zetaclientd cli - ### Tests * [3075](https://github.com/zeta-chain/node/pull/3075) - ton: withdraw concurrent, deposit & revert. ### Refactor * [3118](https://github.com/zeta-chain/node/pull/3118) - zetaclient: remove hsm signer +* [3122](https://github.com/zeta-chain/node/pull/3122) - improve & refactor zetaclientd cli +* [3125](https://github.com/zeta-chain/node/pull/3125) - drop support for header proofs ### Fixes * [3041](https://github.com/zeta-chain/node/pull/3041) - replace libp2p public DHT with private gossip peer discovery and connection gater for inbound connections diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 9dc72eabb9..110426210b 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -57603,8 +57603,6 @@ definitions: type: string tx_signer: type: string - proved: - type: boolean cryptoPubKeySet: type: object properties: diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index 3182bec082..1a2a8629e5 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -12,9 +12,6 @@ message MsgAddOutboundTracker { int64 chain_id = 2; uint64 nonce = 3; string tx_hash = 4; - pkg.proofs.Proof proof = 5; - string block_hash = 6; - int64 tx_index = 7; } ``` @@ -28,9 +25,6 @@ message MsgAddInboundTracker { 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; } ``` diff --git a/proto/zetachain/zetacore/crosschain/outbound_tracker.proto b/proto/zetachain/zetacore/crosschain/outbound_tracker.proto index 4f5b6108b8..bca9a89ca8 100644 --- a/proto/zetachain/zetacore/crosschain/outbound_tracker.proto +++ b/proto/zetachain/zetacore/crosschain/outbound_tracker.proto @@ -6,7 +6,9 @@ option go_package = "github.com/zeta-chain/node/x/crosschain/types"; message TxHash { string tx_hash = 1; string tx_signer = 2; - bool proved = 3; + + // used to be `bool proven` (for block header verification) + reserved 3; } message OutboundTracker { string index = 1; // format: "chain-nonce" diff --git a/proto/zetachain/zetacore/crosschain/tx.proto b/proto/zetachain/zetacore/crosschain/tx.proto index ed8b6b6f59..283f42a3c1 100644 --- a/proto/zetachain/zetacore/crosschain/tx.proto +++ b/proto/zetachain/zetacore/crosschain/tx.proto @@ -65,9 +65,9 @@ message MsgAddInboundTracker { 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; + + // used to be block header profs properties + reserved 5, 6, 7; } message MsgAddInboundTrackerResponse {} @@ -92,9 +92,9 @@ message MsgAddOutboundTracker { int64 chain_id = 2; uint64 nonce = 3; string tx_hash = 4; - pkg.proofs.Proof proof = 5; - string block_hash = 6; - int64 tx_index = 7; + + // used to be block header profs properties + reserved 5, 6, 7; } message MsgAddOutboundTrackerResponse { diff --git a/typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.d.ts b/typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.d.ts index ddf1798fc8..cf91859db6 100644 --- a/typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.d.ts +++ b/typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.d.ts @@ -20,11 +20,6 @@ export declare class TxHash extends Message { */ txSigner: string; - /** - * @generated from field: bool proved = 3; - */ - proved: boolean; - constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts b/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts index db3e7073ea..ecef50f7a9 100644 --- a/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts +++ b/typescript/zetachain/zetacore/crosschain/tx_pb.d.ts @@ -6,7 +6,6 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; import type { CoinType } from "../pkg/coin/coin_pb.js"; -import type { Proof } from "../pkg/proofs/proofs_pb.js"; import type { ReceiveStatus } from "../pkg/chains/chains_pb.js"; import type { CallOptions, ProtocolContractVersion, RevertOptions } from "./cross_chain_tx_pb.js"; import type { RateLimiterFlags } from "./rate_limiter_flags_pb.js"; @@ -136,21 +135,6 @@ export declare class MsgAddInboundTracker extends Message */ coinType: CoinType; - /** - * @generated from field: zetachain.zetacore.pkg.proofs.Proof proof = 5; - */ - proof?: Proof; - - /** - * @generated from field: string block_hash = 6; - */ - blockHash: string; - - /** - * @generated from field: int64 tx_index = 7; - */ - txIndex: bigint; - constructor(data?: PartialMessage); static readonly runtime: typeof proto3; @@ -294,21 +278,6 @@ export declare class MsgAddOutboundTracker extends Message); static readonly runtime: typeof proto3; diff --git a/x/crosschain/client/cli/tx_add_outbound_tracker.go b/x/crosschain/client/cli/tx_add_outbound_tracker.go index a7a07ece29..83ecc824e0 100644 --- a/x/crosschain/client/cli/tx_add_outbound_tracker.go +++ b/x/crosschain/client/cli/tx_add_outbound_tracker.go @@ -32,15 +32,8 @@ func CmdAddOutboundTracker() *cobra.Command { return err } - msg := types.NewMsgAddOutboundTracker( - clientCtx.GetFromAddress().String(), - argChain, - argNonce, - argTxHash, - nil, // TODO: add option to provide a proof from CLI arguments https://github.com/zeta-chain/node/issues/1134 - "", - -1, - ) + creator := clientCtx.GetFromAddress().String() + msg := types.NewMsgAddOutboundTracker(creator, argChain, argNonce, argTxHash) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, diff --git a/x/crosschain/keeper/msg_server_add_inbound_tracker.go b/x/crosschain/keeper/msg_server_add_inbound_tracker.go index bec2eb2abf..499f6edfc9 100644 --- a/x/crosschain/keeper/msg_server_add_inbound_tracker.go +++ b/x/crosschain/keeper/msg_server_add_inbound_tracker.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -23,27 +22,14 @@ func (k msgServer) AddInboundTracker( return nil, observertypes.ErrSupportedChains } - // check if the msg signer is from the emergency group policy address.It is okay to ignore the error as the sender can also be an observer - isAuthorizedPolicy := false - err := k.GetAuthorityKeeper().CheckAuthorization(ctx, msg) - if err == nil { - isAuthorizedPolicy = true - } - - // check if the msg signer is an observer - isObserver := k.GetObserverKeeper().IsNonTombstonedObserver(ctx, msg.Creator) + // only emergency group and observer can submit a tracker + var ( + isAuthorizedPolicy = k.GetAuthorityKeeper().CheckAuthorization(ctx, msg) == nil + isObserver = k.GetObserverKeeper().IsNonTombstonedObserver(ctx, msg.Creator) + ) - // only emergency group and observer can submit tracker without proof - // if the sender is not from the emergency group or observer, the inbound proof must be provided if !(isAuthorizedPolicy || isObserver) { - if msg.Proof == nil { - return nil, errorsmod.Wrap(authoritytypes.ErrUnauthorized, fmt.Sprintf("Creator %s", msg.Creator)) - } - - // verify the proof and tx body - if err := verifyProofAndInboundBody(ctx, k, msg); err != nil { - return nil, err - } + return nil, errorsmod.Wrapf(authoritytypes.ErrUnauthorized, "Creator %s", msg.Creator) } // add the inTx tracker @@ -55,32 +41,3 @@ func (k msgServer) AddInboundTracker( return &types.MsgAddInboundTrackerResponse{}, nil } - -// verifyProofAndInboundBody verifies the proof and inbound tx body -func verifyProofAndInboundBody(ctx sdk.Context, k msgServer, msg *types.MsgAddInboundTracker) error { - txBytes, err := k.GetLightclientKeeper().VerifyProof(ctx, msg.Proof, msg.ChainId, msg.BlockHash, msg.TxIndex) - if err != nil { - return types.ErrProofVerificationFail.Wrap(err.Error()) - } - - // get chain params and tss addresses to verify the inTx body - chainParams, found := k.GetObserverKeeper().GetChainParamsByChainID(ctx, msg.ChainId) - if !found || chainParams == nil { - return types.ErrUnsupportedChain.Wrapf("chain params not found for chain %d", msg.ChainId) - } - tss, err := k.GetObserverKeeper().GetTssAddress(ctx, &observertypes.QueryGetTssAddressRequest{ - BitcoinChainId: msg.ChainId, - }) - if err != nil { - return observertypes.ErrTssNotFound.Wrap(err.Error()) - } - if tss == nil { - return observertypes.ErrTssNotFound.Wrapf("tss address nil") - } - - if err := types.VerifyInboundBody(*msg, txBytes, *chainParams, *tss); err != nil { - return types.ErrTxBodyVerificationFail.Wrap(err.Error()) - } - - return nil -} diff --git a/x/crosschain/keeper/msg_server_add_inbound_tracker_test.go b/x/crosschain/keeper/msg_server_add_inbound_tracker_test.go index e20cb21f69..ecaf21d495 100644 --- a/x/crosschain/keeper/msg_server_add_inbound_tracker_test.go +++ b/x/crosschain/keeper/msg_server_add_inbound_tracker_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "errors" "testing" "github.com/stretchr/testify/mock" @@ -9,7 +8,6 @@ import ( "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" - "github.com/zeta-chain/node/pkg/proofs" keepertest "github.com/zeta-chain/node/testutil/keeper" "github.com/zeta-chain/node/testutil/sample" authoritytypes "github.com/zeta-chain/node/x/authority/types" @@ -19,7 +17,7 @@ import ( ) func TestMsgServer_AddToInboundTracker(t *testing.T) { - t.Run("fail normal user submit without proof", func(t *testing.T) { + t.Run("fail normal user submit", func(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ UseAuthorityMock: true, UseObserverMock: true, @@ -37,13 +35,10 @@ func TestMsgServer_AddToInboundTracker(t *testing.T) { observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) msg := types.MsgAddInboundTracker{ - Creator: nonAdmin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: nil, - BlockHash: "", - TxIndex: 0, + Creator: nonAdmin, + ChainId: chainID, + TxHash: txHash, + CoinType: coin.CoinType_Zeta, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) _, err := msgServer.AddInboundTracker(ctx, &msg) @@ -65,13 +60,10 @@ func TestMsgServer_AddToInboundTracker(t *testing.T) { observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, false) msg := types.MsgAddInboundTracker{ - Creator: sample.AccAddress(), - ChainId: chainID + 1, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: nil, - BlockHash: "", - TxIndex: 0, + Creator: sample.AccAddress(), + ChainId: chainID + 1, + TxHash: txHash, + CoinType: coin.CoinType_Zeta, } _, err := msgServer.AddInboundTracker(ctx, &msg) require.ErrorIs(t, err, observertypes.ErrSupportedChains) @@ -98,13 +90,10 @@ func TestMsgServer_AddToInboundTracker(t *testing.T) { setSupportedChain(ctx, zk, chainID) msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: nil, - BlockHash: "", - TxIndex: 0, + Creator: admin, + ChainId: chainID, + TxHash: txHash, + CoinType: coin.CoinType_Zeta, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, nil) _, err := msgServer.AddInboundTracker(ctx, &msg) @@ -131,210 +120,10 @@ func TestMsgServer_AddToInboundTracker(t *testing.T) { observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(true) msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: nil, - BlockHash: "", - TxIndex: 0, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - _, err := msgServer.AddInboundTracker(ctx, &msg) - require.NoError(t, err) - _, found := k.GetInboundTracker(ctx, chainID, txHash) - require.True(t, found) - }) - - t.Run("fail if proof is provided but not verified", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseLightclientMock: true, - UseObserverMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - admin := sample.AccAddress() - txHash := "string" - chainID := getValidEthChainID() - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(nil, errors.New("error")) - - msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - _, err := msgServer.AddInboundTracker(ctx, &msg) - require.ErrorIs(t, err, types.ErrProofVerificationFail) - }) - - t.Run("fail if proof is provided but can't find chain params to verify body", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseLightclientMock: true, - UseObserverMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - admin := sample.AccAddress() - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - txHash := "string" - chainID := getValidEthChainID() - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(sample.Bytes(), nil) - observerMock.On("GetChainParamsByChainID", mock.Anything, mock.Anything).Return(nil, false) - - msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - _, err := msgServer.AddInboundTracker(ctx, &msg) - require.ErrorIs(t, err, types.ErrUnsupportedChain) - }) - - t.Run("fail if proof is provided but can't find tss to verify body", func(t *testing.T) { - k, ctx, _, zk := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseLightclientMock: true, - UseObserverMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - admin := sample.AccAddress() - txHash := "string" - chainID := getValidEthChainID() - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(sample.Bytes(), nil) - observerMock.On("GetChainParamsByChainID", mock.Anything, mock.Anything). - Return(sample.ChainParams(chains.Ethereum.ChainId), true) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(nil, errors.New("error")) - - setSupportedChain(ctx, zk, chainID) - - msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - _, err := msgServer.AddInboundTracker(ctx, &msg) - require.ErrorIs(t, err, observertypes.ErrTssNotFound) - }) - - t.Run("fail if proof is provided but error while verifying tx body", func(t *testing.T) { - k, ctx, _, zk := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseLightclientMock: true, - UseObserverMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - admin := sample.AccAddress() - txHash := "string" - chainID := getValidEthChainID() - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - observerMock.On("GetChainParamsByChainID", mock.Anything, mock.Anything). - Return(sample.ChainParams(chains.Ethereum.ChainId), true) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(&observertypes.QueryGetTssAddressResponse{ - Eth: sample.EthAddress().Hex(), - }, nil) - - // verifying the body will fail because the bytes are tried to be unmarshaled but they are not valid - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return([]byte("invalid"), nil) - - setSupportedChain(ctx, zk, chainID) - - msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Zeta, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - _, err := msgServer.AddInboundTracker(ctx, &msg) - require.ErrorIs(t, err, types.ErrTxBodyVerificationFail) - }) - - t.Run("can add a in tx tracker with a proof", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseLightclientMock: true, - UseObserverMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - chainID := chains.Ethereum.ChainId - tssAddress := sample.EthAddress() - ethTx, ethTxBytes := sample.EthTx(t, chainID, tssAddress, 42) - admin := sample.AccAddress() - txHash := ethTx.Hash().Hex() - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - observerMock.On("GetChainParamsByChainID", mock.Anything, mock.Anything). - Return(sample.ChainParams(chains.Ethereum.ChainId), true) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(&observertypes.QueryGetTssAddressResponse{ - Eth: tssAddress.Hex(), - }, nil) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(ethTxBytes, nil) - - msg := types.MsgAddInboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - CoinType: coin.CoinType_Gas, // use coin types gas: the receiver must be the tss address - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, + Creator: admin, + ChainId: chainID, + TxHash: txHash, + CoinType: coin.CoinType_Zeta, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) _, err := msgServer.AddInboundTracker(ctx, &msg) diff --git a/x/crosschain/keeper/msg_server_add_outbound_tracker.go b/x/crosschain/keeper/msg_server_add_outbound_tracker.go index 39002d3155..9beffffd1e 100644 --- a/x/crosschain/keeper/msg_server_add_outbound_tracker.go +++ b/x/crosschain/keeper/msg_server_add_outbound_tracker.go @@ -2,13 +2,11 @@ package keeper import ( "context" - "fmt" "strings" cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/node/pkg/chains" authoritytypes "github.com/zeta-chain/node/x/authority/types" "github.com/zeta-chain/node/x/crosschain/types" observertypes "github.com/zeta-chain/node/x/observer/types" @@ -56,38 +54,21 @@ func (k msgServer) AddOutboundTracker( return &types.MsgAddOutboundTrackerResponse{IsRemoved: true}, nil } - // check if the msg signer is from the emergency group policy address.It is okay to ignore the error as the sender can also be an observer - isAuthorizedPolicy := false - if k.GetAuthorityKeeper().CheckAuthorization(ctx, msg) == nil { - isAuthorizedPolicy = true - } - - // check if the msg signer is an observer - isObserver := k.GetObserverKeeper().IsNonTombstonedObserver(ctx, msg.Creator) - isProven := false + // check if the msg signer is from the emergency group policy address. + // or an observer + var ( + isAuthorizedPolicy = k.GetAuthorityKeeper().CheckAuthorization(ctx, msg) == nil + isObserver = k.GetObserverKeeper().IsNonTombstonedObserver(ctx, msg.Creator) + ) - // only emergency group and observer can submit tracker without proof - // if the sender is not from the emergency group or observer, the outbound proof must be provided if !(isAuthorizedPolicy || isObserver) { - if msg.Proof == nil { - return nil, cosmoserrors.Wrap(authoritytypes.ErrUnauthorized, fmt.Sprintf("Creator %s", msg.Creator)) - } - // verify proof when it is provided - if err := verifyProofAndOutboundBody(ctx, k, msg); err != nil { - return nil, err - } - - isProven = true + return nil, cosmoserrors.Wrapf(authoritytypes.ErrUnauthorized, "Creator %s", msg.Creator) } // fetch the tracker // if the tracker does not exist, initialize a new one tracker, found := k.GetOutboundTracker(ctx, msg.ChainId, msg.Nonce) - hash := types.TxHash{ - TxHash: msg.TxHash, - TxSigner: msg.Creator, - Proved: isProven, - } + hash := types.TxHash{TxHash: msg.TxHash, TxSigner: msg.Creator} if !found { k.SetOutboundTracker(ctx, types.OutboundTracker{ Index: "", @@ -99,14 +80,8 @@ func (k msgServer) AddOutboundTracker( } // check if the hash is already in the tracker - for i, hash := range tracker.HashList { - hash := hash + for _, hash := range tracker.HashList { if strings.EqualFold(hash.TxHash, msg.TxHash) { - // if the hash is already in the tracker but we have a proof, mark it as proven and only keep this one in the list - if isProven { - tracker.HashList[i].Proved = true - k.SetOutboundTracker(ctx, tracker) - } return &types.MsgAddOutboundTrackerResponse{}, nil } } @@ -126,34 +101,3 @@ func (k msgServer) AddOutboundTracker( k.SetOutboundTracker(ctx, tracker) return &types.MsgAddOutboundTrackerResponse{}, nil } - -// verifyProofAndOutboundBody verifies the proof and outbound tx body -// Precondition: the proof must be non-nil -func verifyProofAndOutboundBody(ctx sdk.Context, k msgServer, msg *types.MsgAddOutboundTracker) error { - txBytes, err := k.lightclientKeeper.VerifyProof(ctx, msg.Proof, msg.ChainId, msg.BlockHash, msg.TxIndex) - if err != nil { - return types.ErrProofVerificationFail.Wrap(err.Error()) - } - - // get tss address - var bitcoinChainID int64 - if chains.IsBitcoinChain(msg.ChainId, k.GetAuthorityKeeper().GetAdditionalChainList(ctx)) { - bitcoinChainID = msg.ChainId - } - - tss, err := k.GetObserverKeeper().GetTssAddress(ctx, &observertypes.QueryGetTssAddressRequest{ - BitcoinChainId: bitcoinChainID, - }) - if err != nil { - return observertypes.ErrTssNotFound.Wrap(err.Error()) - } - if tss == nil { - return observertypes.ErrTssNotFound.Wrapf("tss address nil") - } - - if err := types.VerifyOutboundBody(*msg, txBytes, *tss); err != nil { - return types.ErrTxBodyVerificationFail.Wrap(err.Error()) - } - - return nil -} diff --git a/x/crosschain/keeper/msg_server_add_outbound_tracker_test.go b/x/crosschain/keeper/msg_server_add_outbound_tracker_test.go index d243a3a7e6..fb477c9920 100644 --- a/x/crosschain/keeper/msg_server_add_outbound_tracker_test.go +++ b/x/crosschain/keeper/msg_server_add_outbound_tracker_test.go @@ -1,14 +1,12 @@ package keeper_test import ( - "errors" "testing" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/zeta-chain/node/pkg/chains" - "github.com/zeta-chain/node/pkg/proofs" keepertest "github.com/zeta-chain/node/testutil/keeper" "github.com/zeta-chain/node/testutil/sample" authoritytypes "github.com/zeta-chain/node/x/authority/types" @@ -21,9 +19,6 @@ func getEthereumChainID() int64 { return 5 // Goerli } -// TODO: Add a test case with proof and Bitcoin chain -// https://github.com/zeta-chain/node/issues/1994 - func TestMsgServer_AddToOutboundTracker(t *testing.T) { t.Run("admin can add tracker", func(t *testing.T) { k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ @@ -44,13 +39,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: hash, - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 0, + Creator: admin, + ChainId: chainID, + TxHash: hash, + Nonce: 0, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, nil) _, err := msgServer.AddOutboundTracker(ctx, &msg) @@ -79,13 +71,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: hash, - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 0, + Creator: admin, + ChainId: chainID, + TxHash: hash, + Nonce: 0, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) _, err := msgServer.AddOutboundTracker(ctx, &msg) @@ -125,13 +114,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { }) msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: newHash, - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 42, + Creator: admin, + ChainId: chainID, + TxHash: newHash, + Nonce: 42, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, nil) _, err := msgServer.AddOutboundTracker(ctx, &msg) @@ -153,13 +139,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { admin := sample.AccAddress() chainID := getEthereumChainID() msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: sample.Hash().Hex(), - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 0, + Creator: admin, + ChainId: chainID, + TxHash: sample.Hash().Hex(), + Nonce: 0, } observerMock := keepertest.GetCrosschainObserverMock(t, k) @@ -192,13 +175,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { chainID := getEthereumChainID() _, err := msgServer.AddOutboundTracker(ctx, &types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: sample.Hash().Hex(), - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 0, + Creator: admin, + ChainId: chainID, + TxHash: sample.Hash().Hex(), + Nonce: 0, }) require.ErrorIs(t, err, observertypes.ErrSupportedChains) }) @@ -220,13 +200,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { chainID := getEthereumChainID() _, err := msgServer.AddOutboundTracker(ctx, &types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: sample.Hash().Hex(), - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 0, + Creator: admin, + ChainId: chainID, + TxHash: sample.Hash().Hex(), + Nonce: 0, }) require.ErrorIs(t, err, types.ErrCannotFindCctx) }) @@ -263,13 +240,11 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { }) msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: newHash, - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 42, + Creator: admin, + ChainId: chainID, + TxHash: newHash, + + Nonce: 42, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, nil) _, err := msgServer.AddOutboundTracker(ctx, &msg) @@ -306,13 +281,10 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { }) msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: existinghHash, - Proof: nil, - BlockHash: "", - TxIndex: 0, - Nonce: 42, + Creator: admin, + ChainId: chainID, + TxHash: existinghHash, + Nonce: 42, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, nil) _, err := msgServer.AddOutboundTracker(ctx, &msg) @@ -322,230 +294,4 @@ func TestMsgServer_AddToOutboundTracker(t *testing.T) { require.Len(t, tracker.HashList, 1) require.EqualValues(t, existinghHash, tracker.HashList[0].TxHash) }) - - t.Run("can add tracker with proof", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseObserverMock: true, - UseLightclientMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - admin := sample.AccAddress() - chainID := getEthereumChainID() - ethTx, ethTxBytes, tssAddress := sample.EthTxSigned(t, chainID, sample.EthAddress(), 42) - txHash := ethTx.Hash().Hex() - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(&observertypes.QueryGetTssAddressResponse{ - Eth: tssAddress.Hex(), - }, nil) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(ethTxBytes, nil) - - msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - Nonce: 42, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - keepertest.MockGetChainListEmpty(&authorityMock.Mock) - _, err := msgServer.AddOutboundTracker(ctx, &msg) - require.NoError(t, err) - tracker, found := k.GetOutboundTracker(ctx, chainID, 42) - require.True(t, found) - require.EqualValues(t, txHash, tracker.HashList[0].TxHash) - require.True(t, tracker.HashList[0].Proved) - }) - - t.Run("adding existing hash with proof make it proven", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseObserverMock: true, - UseLightclientMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - admin := sample.AccAddress() - chainID := getEthereumChainID() - ethTx, ethTxBytes, tssAddress := sample.EthTxSigned(t, chainID, sample.EthAddress(), 42) - txHash := ethTx.Hash().Hex() - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(&observertypes.QueryGetTssAddressResponse{ - Eth: tssAddress.Hex(), - }, nil) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(ethTxBytes, nil) - - k.SetOutboundTracker(ctx, types.OutboundTracker{ - ChainId: chainID, - Nonce: 42, - HashList: []*types.TxHash{ - { - TxHash: sample.Hash().Hex(), - Proved: false, - }, - { - TxHash: txHash, - Proved: false, - }, - }, - }) - - msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - Nonce: 42, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - keepertest.MockGetChainListEmpty(&authorityMock.Mock) - _, err := msgServer.AddOutboundTracker(ctx, &msg) - require.NoError(t, err) - tracker, found := k.GetOutboundTracker(ctx, chainID, 42) - require.True(t, found) - require.Len(t, tracker.HashList, 2) - require.EqualValues(t, txHash, tracker.HashList[1].TxHash) - require.True(t, tracker.HashList[1].Proved) - }) - - t.Run("should fail if verify proof fail", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseObserverMock: true, - UseLightclientMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - admin := sample.AccAddress() - chainID := getEthereumChainID() - ethTx, ethTxBytes, _ := sample.EthTxSigned(t, chainID, sample.EthAddress(), 42) - txHash := ethTx.Hash().Hex() - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(ethTxBytes, errors.New("error")) - - msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - Nonce: 42, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - _, err := msgServer.AddOutboundTracker(ctx, &msg) - require.ErrorIs(t, err, types.ErrProofVerificationFail) - }) - - t.Run("should fail if no tss when adding hash with proof", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseObserverMock: true, - UseLightclientMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - admin := sample.AccAddress() - chainID := getEthereumChainID() - ethTx, ethTxBytes, tssAddress := sample.EthTxSigned(t, chainID, sample.EthAddress(), 42) - txHash := ethTx.Hash().Hex() - - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(ethTxBytes, nil) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(&observertypes.QueryGetTssAddressResponse{ - Eth: tssAddress.Hex(), - }, errors.New("error")) - - msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - Nonce: 42, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - keepertest.MockGetChainListEmpty(&authorityMock.Mock) - _, err := msgServer.AddOutboundTracker(ctx, &msg) - require.ErrorIs(t, err, observertypes.ErrTssNotFound) - }) - - t.Run("should fail if body verification fail with proof", func(t *testing.T) { - k, ctx, _, _ := keepertest.CrosschainKeeperWithMocks(t, keepertest.CrosschainMockOptions{ - UseAuthorityMock: true, - UseObserverMock: true, - UseLightclientMock: true, - }) - msgServer := keeper.NewMsgServerImpl(*k) - - admin := sample.AccAddress() - chainID := getEthereumChainID() - ethTx, _, tssAddress := sample.EthTxSigned(t, chainID, sample.EthAddress(), 42) - txHash := ethTx.Hash().Hex() - authorityMock := keepertest.GetCrosschainAuthorityMock(t, k) - observerMock := keepertest.GetCrosschainObserverMock(t, k) - lightclientMock := keepertest.GetCrosschainLightclientMock(t, k) - - observerMock.On("GetSupportedChainFromChainID", mock.Anything, mock.Anything).Return(chains.Chain{}, true) - observerMock.On("IsNonTombstonedObserver", mock.Anything, mock.Anything).Return(false) - keepertest.MockCctxByNonce(t, ctx, *k, observerMock, types.CctxStatus_PendingOutbound, false) - observerMock.On("GetTssAddress", mock.Anything, mock.Anything).Return(&observertypes.QueryGetTssAddressResponse{ - Eth: tssAddress.Hex(), - }, nil) - - // makes VerifyProof returning an invalid hash - lightclientMock.On("VerifyProof", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(sample.Bytes(), nil) - - msg := types.MsgAddOutboundTracker{ - Creator: admin, - ChainId: chainID, - TxHash: txHash, - Proof: &proofs.Proof{}, - BlockHash: "", - TxIndex: 0, - Nonce: 42, - } - keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, authoritytypes.ErrUnauthorized) - keepertest.MockGetChainListEmpty(&authorityMock.Mock) - _, err := msgServer.AddOutboundTracker(ctx, &msg) - require.ErrorIs(t, err, types.ErrTxBodyVerificationFail) - }) } diff --git a/x/crosschain/types/message_add_outbound_tracker.go b/x/crosschain/types/message_add_outbound_tracker.go index dddb19900a..d81ccf98bb 100644 --- a/x/crosschain/types/message_add_outbound_tracker.go +++ b/x/crosschain/types/message_add_outbound_tracker.go @@ -4,31 +4,18 @@ import ( cosmoserrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/zeta-chain/node/pkg/proofs" ) const TypeMsgAddOutboundTracker = "AddOutboundTracker" var _ sdk.Msg = &MsgAddOutboundTracker{} -func NewMsgAddOutboundTracker( - creator string, - chain int64, - nonce uint64, - txHash string, - proof *proofs.Proof, - blockHash string, - txIndex int64, -) *MsgAddOutboundTracker { +func NewMsgAddOutboundTracker(creator string, chain int64, nonce uint64, txHash string) *MsgAddOutboundTracker { return &MsgAddOutboundTracker{ - Creator: creator, - ChainId: chain, - Nonce: nonce, - TxHash: txHash, - Proof: proof, - BlockHash: blockHash, - TxIndex: txIndex, + Creator: creator, + ChainId: chain, + Nonce: nonce, + TxHash: txHash, } } diff --git a/x/crosschain/types/message_add_outbound_tracker_test.go b/x/crosschain/types/message_add_outbound_tracker_test.go index 5eafc7b31c..8f664da6f5 100644 --- a/x/crosschain/types/message_add_outbound_tracker_test.go +++ b/x/crosschain/types/message_add_outbound_tracker_test.go @@ -19,41 +19,17 @@ func TestMsgAddOutboundTracker_ValidateBasic(t *testing.T) { }{ { name: "invalid address", - msg: types.NewMsgAddOutboundTracker( - "invalid", - 1, - 1, - "", - nil, - "", - 1, - ), - err: sdkerrors.ErrInvalidAddress, + msg: types.NewMsgAddOutboundTracker("invalid", 1, 1, ""), + err: sdkerrors.ErrInvalidAddress, }, { name: "invalid chain id", - msg: types.NewMsgAddOutboundTracker( - sample.AccAddress(), - -1, - 1, - "", - nil, - "", - 1, - ), - err: sdkerrors.ErrInvalidChainID, + msg: types.NewMsgAddOutboundTracker(sample.AccAddress(), -1, 1, ""), + err: sdkerrors.ErrInvalidChainID, }, { name: "valid address", - msg: types.NewMsgAddOutboundTracker( - sample.AccAddress(), - 1, - 1, - "", - nil, - "", - 1, - ), + msg: types.NewMsgAddOutboundTracker(sample.AccAddress(), 1, 1, ""), }, } for _, tt := range tests { diff --git a/x/crosschain/types/outbound_tracker.pb.go b/x/crosschain/types/outbound_tracker.pb.go index 5002924b2b..a80ef25247 100644 --- a/x/crosschain/types/outbound_tracker.pb.go +++ b/x/crosschain/types/outbound_tracker.pb.go @@ -25,7 +25,6 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TxHash struct { TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` TxSigner string `protobuf:"bytes,2,opt,name=tx_signer,json=txSigner,proto3" json:"tx_signer,omitempty"` - Proved bool `protobuf:"varint,3,opt,name=proved,proto3" json:"proved,omitempty"` } func (m *TxHash) Reset() { *m = TxHash{} } @@ -75,13 +74,6 @@ func (m *TxHash) GetTxSigner() string { return "" } -func (m *TxHash) GetProved() bool { - if m != nil { - return m.Proved - } - return false -} - type OutboundTracker struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -160,26 +152,26 @@ func init() { } var fileDescriptor_77cb2cfe04eb42d9 = []byte{ - // 304 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xcd, 0x4a, 0x33, 0x31, - 0x14, 0x86, 0x9b, 0xaf, 0xfd, 0xa6, 0xd3, 0xb8, 0x10, 0x82, 0xe8, 0x88, 0x18, 0x4a, 0x41, 0xe8, - 0xa6, 0x29, 0xa8, 0x57, 0xd0, 0x8d, 0x0a, 0x82, 0x30, 0x16, 0x17, 0x6e, 0x86, 0xe9, 0x24, 0x74, - 0x82, 0x9a, 0x94, 0xe4, 0x54, 0xa2, 0x57, 0xe1, 0x05, 0x78, 0x41, 0x2e, 0xbb, 0x74, 0x29, 0x33, - 0x37, 0x22, 0x93, 0x8c, 0x3f, 0x2b, 0x77, 0x79, 0x72, 0x78, 0x0e, 0xef, 0x79, 0xf1, 0xe9, 0xb3, - 0x80, 0xbc, 0x28, 0x73, 0xa9, 0xa6, 0xfe, 0xa5, 0x8d, 0x98, 0x16, 0x46, 0x5b, 0x1b, 0xfe, 0xf4, - 0x1a, 0x16, 0x7a, 0xad, 0x78, 0x06, 0x26, 0x2f, 0xee, 0x84, 0x61, 0x2b, 0xa3, 0x41, 0x93, 0xc3, - 0x6f, 0x8b, 0x7d, 0x59, 0xec, 0xc7, 0x1a, 0xdd, 0xe0, 0x68, 0xee, 0xce, 0x73, 0x5b, 0x92, 0x3d, - 0xdc, 0x07, 0x97, 0x95, 0xb9, 0x2d, 0x13, 0x34, 0x44, 0xe3, 0x41, 0x1a, 0x41, 0x18, 0x1c, 0xe0, - 0x01, 0xb8, 0xcc, 0xca, 0xa5, 0x12, 0x26, 0xf9, 0xe7, 0x47, 0x31, 0xb8, 0x6b, 0xcf, 0x64, 0x17, - 0x47, 0x2b, 0xa3, 0x1f, 0x05, 0x4f, 0xba, 0x43, 0x34, 0x8e, 0xd3, 0x96, 0x46, 0xaf, 0x08, 0x6f, - 0x5f, 0xb5, 0x89, 0xe6, 0x21, 0x10, 0xd9, 0xc1, 0xff, 0xa5, 0xe2, 0xc2, 0xb5, 0xfb, 0x03, 0x90, - 0x7d, 0x1c, 0xfb, 0x28, 0x99, 0xe4, 0x7e, 0x7b, 0x37, 0xed, 0x7b, 0xbe, 0xe0, 0x8d, 0xa0, 0xb4, - 0x2a, 0x84, 0xdf, 0xdd, 0x4b, 0x03, 0x90, 0x19, 0x1e, 0x34, 0x29, 0xb3, 0x7b, 0x69, 0x21, 0xe9, - 0x0d, 0xbb, 0xe3, 0xad, 0xe3, 0x23, 0xf6, 0xe7, 0x95, 0x2c, 0x9c, 0x98, 0xc6, 0x8d, 0x77, 0x29, - 0x2d, 0xcc, 0xce, 0xde, 0x2a, 0x8a, 0x36, 0x15, 0x45, 0x1f, 0x15, 0x45, 0x2f, 0x35, 0xed, 0x6c, - 0x6a, 0xda, 0x79, 0xaf, 0x69, 0xe7, 0x76, 0xb2, 0x94, 0x50, 0xae, 0x17, 0xac, 0xd0, 0x0f, 0xbe, - 0xe6, 0x49, 0x68, 0x57, 0x69, 0x2e, 0xa6, 0xee, 0x77, 0xdf, 0xf0, 0xb4, 0x12, 0x76, 0x11, 0xf9, - 0x96, 0x4f, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x6a, 0xcf, 0xa4, 0x9d, 0x01, 0x00, 0x00, + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xa9, 0x4a, 0x2d, 0x49, + 0x4c, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x07, 0xb3, 0xf2, 0x8b, 0x52, 0xf5, 0x93, 0x8b, 0xf2, 0x8b, + 0x8b, 0x21, 0x62, 0xf9, 0xa5, 0x25, 0x49, 0xf9, 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x1c, + 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, + 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, + 0xf9, 0xb9, 0xe0, 0x40, 0xd5, 0x85, 0x84, 0x65, 0x5e, 0x7e, 0x4a, 0xaa, 0x7e, 0x05, 0x72, 0xe8, + 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xd4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, + 0xd8, 0x18, 0x1c, 0x85, 0x8b, 0x01, 0x00, 0x00, } func (m *TxHash) Marshal() (dAtA []byte, err error) { @@ -202,16 +194,6 @@ func (m *TxHash) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Proved { - i-- - if m.Proved { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } if len(m.TxSigner) > 0 { i -= len(m.TxSigner) copy(dAtA[i:], m.TxSigner) @@ -308,9 +290,6 @@ func (m *TxHash) Size() (n int) { if l > 0 { n += 1 + l + sovOutboundTracker(uint64(l)) } - if m.Proved { - n += 2 - } return n } @@ -438,26 +417,6 @@ func (m *TxHash) Unmarshal(dAtA []byte) error { } m.TxSigner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proved", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOutboundTracker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Proved = bool(v != 0) default: iNdEx = preIndex skippy, err := skipOutboundTracker(dAtA[iNdEx:]) diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 52facc862d..5624d99667 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -12,7 +12,7 @@ import ( proto "github.com/cosmos/gogoproto/proto" chains "github.com/zeta-chain/node/pkg/chains" coin "github.com/zeta-chain/node/pkg/coin" - proofs "github.com/zeta-chain/node/pkg/proofs" + _ "github.com/zeta-chain/node/pkg/proofs" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -210,13 +210,10 @@ func (m *MsgUpdateTssAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateTssAddressResponse proto.InternalMessageInfo type MsgAddInboundTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - CoinType coin.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=zetachain.zetacore.pkg.coin.CoinType" json:"coin_type,omitempty"` - Proof *proofs.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + CoinType coin.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=zetachain.zetacore.pkg.coin.CoinType" json:"coin_type,omitempty"` } func (m *MsgAddInboundTracker) Reset() { *m = MsgAddInboundTracker{} } @@ -280,27 +277,6 @@ func (m *MsgAddInboundTracker) GetCoinType() coin.CoinType { return coin.CoinType_Zeta } -func (m *MsgAddInboundTracker) GetProof() *proofs.Proof { - if m != nil { - return m.Proof - } - return nil -} - -func (m *MsgAddInboundTracker) GetBlockHash() string { - if m != nil { - return m.BlockHash - } - return "" -} - -func (m *MsgAddInboundTracker) GetTxIndex() int64 { - if m != nil { - return m.TxIndex - } - return 0 -} - type MsgAddInboundTrackerResponse struct { } @@ -483,13 +459,10 @@ func (m *MsgWhitelistERC20Response) GetCctxIndex() string { } type MsgAddOutboundTracker struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Proof *proofs.Proof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"` - BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - TxIndex int64 `protobuf:"varint,7,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` } func (m *MsgAddOutboundTracker) Reset() { *m = MsgAddOutboundTracker{} } @@ -553,27 +526,6 @@ func (m *MsgAddOutboundTracker) GetTxHash() string { return "" } -func (m *MsgAddOutboundTracker) GetProof() *proofs.Proof { - if m != nil { - return m.Proof - } - return nil -} - -func (m *MsgAddOutboundTracker) GetBlockHash() string { - if m != nil { - return m.BlockHash - } - return "" -} - -func (m *MsgAddOutboundTracker) GetTxIndex() int64 { - if m != nil { - return m.TxIndex - } - return 0 -} - type MsgAddOutboundTrackerResponse struct { IsRemoved bool `protobuf:"varint,1,opt,name=is_removed,json=isRemoved,proto3" json:"is_removed,omitempty"` } @@ -995,9 +947,9 @@ type MsgVoteInbound struct { SenderChainId int64 `protobuf:"varint,3,opt,name=sender_chain_id,json=senderChainId,proto3" json:"sender_chain_id,omitempty"` Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` ReceiverChain int64 `protobuf:"varint,5,opt,name=receiver_chain,json=receiverChain,proto3" json:"receiver_chain,omitempty"` - // string zeta_burnt = 6; + // string zeta_burnt = 6; Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` - // string mMint = 7; + // string mMint = 7; Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` InboundHash string `protobuf:"bytes,9,opt,name=inbound_hash,json=inboundHash,proto3" json:"inbound_hash,omitempty"` InboundBlockHeight uint64 `protobuf:"varint,10,opt,name=inbound_block_height,json=inboundBlockHeight,proto3" json:"inbound_block_height,omitempty"` @@ -1734,122 +1686,121 @@ func init() { } var fileDescriptor_15f0860550897740 = []byte{ - // 1840 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, - 0x11, 0xf6, 0xd8, 0x12, 0x4d, 0x16, 0x25, 0x59, 0x6e, 0xcb, 0x36, 0x35, 0x5a, 0xc9, 0x32, 0x1d, - 0x3b, 0xc2, 0xc2, 0x22, 0x1d, 0x7a, 0xe3, 0x6c, 0xbc, 0x41, 0x36, 0x16, 0x77, 0xad, 0x15, 0x60, - 0xda, 0xc2, 0xac, 0xbc, 0x79, 0x5c, 0x06, 0xc3, 0x99, 0xd6, 0x68, 0x20, 0x72, 0x9a, 0x98, 0x6e, - 0x72, 0x29, 0x23, 0x40, 0x82, 0x00, 0x01, 0x72, 0x4c, 0x82, 0x9c, 0xf6, 0x90, 0x5b, 0x0e, 0xf9, - 0x13, 0x39, 0xef, 0xd1, 0xc8, 0x29, 0xc8, 0xc1, 0x08, 0xec, 0x43, 0xae, 0x49, 0xae, 0xb9, 0x04, - 0x5d, 0xdd, 0x33, 0x22, 0x87, 0x4f, 0x51, 0x08, 0xf6, 0x22, 0x76, 0x57, 0xd7, 0x57, 0x5d, 0x55, - 0x5d, 0xdd, 0x55, 0x35, 0x82, 0x7b, 0xaf, 0xa8, 0x70, 0xdc, 0x23, 0x27, 0x08, 0xcb, 0x38, 0x62, - 0x11, 0x2d, 0xbb, 0x11, 0xe3, 0x5c, 0xd1, 0x44, 0xb7, 0xd4, 0x8a, 0x98, 0x60, 0x64, 0x3d, 0xe1, - 0x2b, 0xc5, 0x7c, 0xa5, 0x53, 0x3e, 0x73, 0xc5, 0x67, 0x3e, 0x43, 0xce, 0xb2, 0x1c, 0x29, 0x90, - 0xf9, 0xfe, 0x10, 0xe1, 0xad, 0x63, 0xbf, 0x8c, 0x24, 0xae, 0x7f, 0x34, 0xef, 0xbd, 0x51, 0xbc, - 0x2c, 0x08, 0xf1, 0xcf, 0x04, 0x99, 0xad, 0x88, 0xb1, 0x43, 0xae, 0x7f, 0x34, 0xef, 0xa3, 0xf1, - 0xc6, 0x45, 0x8e, 0xa0, 0x76, 0x23, 0x68, 0x06, 0x82, 0x46, 0xf6, 0x61, 0xc3, 0xf1, 0x63, 0x5c, - 0x65, 0x3c, 0x0e, 0x87, 0x36, 0x8e, 0xed, 0xd8, 0x41, 0xc5, 0xdf, 0x1b, 0x40, 0x6a, 0xdc, 0xaf, - 0x05, 0xbe, 0x14, 0x7b, 0xc0, 0xf9, 0xd3, 0x76, 0xe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x3b, 0x90, 0x93, - 0xe1, 0x62, 0x4b, 0x77, 0x14, 0xe6, 0x36, 0x8d, 0xad, 0xa5, 0xca, 0xdd, 0xd2, 0x90, 0xe8, 0x6d, - 0x1d, 0xfb, 0x25, 0x8c, 0xab, 0x2a, 0x0b, 0xc2, 0x83, 0x93, 0x16, 0xb5, 0xb2, 0xae, 0x1e, 0x91, - 0xc7, 0x30, 0x8f, 0x81, 0x54, 0x98, 0xdf, 0x34, 0xb6, 0xf2, 0x95, 0x6f, 0x8d, 0xc2, 0xeb, 0x68, - 0xdb, 0x97, 0x3f, 0x96, 0x82, 0x48, 0x27, 0xd5, 0x1b, 0xcc, 0x3d, 0x56, 0xba, 0x65, 0x94, 0x93, - 0x90, 0x82, 0xea, 0xad, 0x42, 0x56, 0x74, 0xed, 0x20, 0xf4, 0x68, 0xb7, 0x70, 0x59, 0x99, 0x24, - 0xba, 0x7b, 0x72, 0x5a, 0xdc, 0x80, 0xf7, 0x86, 0xf9, 0x27, 0x71, 0xe0, 0x5f, 0x0d, 0xb8, 0x5a, - 0xe3, 0xfe, 0x8f, 0x8f, 0x02, 0x41, 0x1b, 0x01, 0x17, 0x9f, 0x5a, 0xd5, 0xca, 0x83, 0x31, 0xde, - 0xbb, 0x03, 0x8b, 0x34, 0x72, 0x2b, 0x0f, 0x6c, 0x47, 0x9d, 0x84, 0x3e, 0xb1, 0x05, 0x24, 0xc6, - 0xa7, 0xdd, 0xeb, 0xe2, 0x4b, 0xfd, 0x2e, 0x26, 0x30, 0x17, 0x3a, 0x4d, 0xe5, 0xc4, 0x9c, 0x85, - 0x63, 0x72, 0x03, 0x32, 0xfc, 0xa4, 0x59, 0x67, 0x0d, 0x74, 0x4d, 0xce, 0xd2, 0x33, 0x62, 0x42, - 0xd6, 0xa3, 0x6e, 0xd0, 0x74, 0x1a, 0x1c, 0x6d, 0x5e, 0xb4, 0x92, 0x39, 0x59, 0x83, 0x9c, 0xef, - 0x70, 0x75, 0xd3, 0xb4, 0xcd, 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x7e, 0xc4, 0x34, 0x67, - 0x30, 0xbc, 0xc4, 0xc0, 0x27, 0x68, 0xb0, 0xc0, 0x78, 0x38, 0xcd, 0xed, 0x4d, 0x81, 0xa6, 0x79, - 0x82, 0x46, 0x96, 0x14, 0xe4, 0x0f, 0x06, 0xdc, 0x18, 0x51, 0x4f, 0x7c, 0x38, 0xed, 0xe9, 0xa6, - 0x91, 0xe6, 0x8f, 0x66, 0x45, 0x26, 0x6a, 0x7d, 0x65, 0x40, 0x61, 0x64, 0x91, 0xf0, 0x78, 0xea, - 0x43, 0x1f, 0xc0, 0x9a, 0x3b, 0xb3, 0x63, 0x13, 0xe5, 0xfe, 0x6c, 0xc0, 0xfa, 0xf8, 0x4c, 0xfc, - 0xf1, 0xb4, 0x0e, 0x18, 0x21, 0xc0, 0xdc, 0x3d, 0xa7, 0x80, 0x58, 0xd7, 0x9d, 0xdd, 0xaf, 0xdf, - 0x6e, 0x18, 0xaf, 0xdf, 0x6e, 0x18, 0xff, 0x78, 0xbb, 0x61, 0xfc, 0xf6, 0xdd, 0xc6, 0x85, 0xd7, - 0xef, 0x36, 0x2e, 0xfc, 0xed, 0xdd, 0xc6, 0x85, 0x9f, 0x6d, 0xf7, 0x14, 0x32, 0x72, 0x8b, 0x6d, - 0xf5, 0x6f, 0x87, 0x90, 0x79, 0xb4, 0xdc, 0xed, 0xfb, 0xef, 0x8c, 0xac, 0x69, 0xea, 0x19, 0x6c, - 0x45, 0x1e, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x5c, 0xd9, 0x42, 0xd4, 0xcb, 0x19, 0x00, 0x00, + // 1817 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x0f, 0x37, 0xb2, 0x2c, 0x3d, 0xd9, 0x8e, 0x33, 0x71, 0x12, 0x86, 0x5e, 0x3b, 0x0e,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xc6, 0x4b, 0x73, 0x9d, 0x31, 0x57, 0xc0, 0x7a, 0x36, 0x89, 0x02, 0x3f, 0x08, 0xf5, 0x65, 0x19, + 0x5c, 0xd6, 0x7b, 0x21, 0xd6, 0xfc, 0xed, 0x76, 0x28, 0xc5, 0x4c, 0x5f, 0x11, 0x1b, 0x72, 0x81, + 0x6e, 0x42, 0x09, 0x77, 0x71, 0xc8, 0x54, 0x55, 0xbe, 0x24, 0xac, 0x02, 0x41, 0x12, 0x65, 0x19, + 0x45, 0x70, 0x43, 0x34, 0xb5, 0x2e, 0x69, 0xda, 0x2e, 0x09, 0x59, 0xe4, 0xb8, 0xcc, 0xee, 0xe2, + 0x88, 0x06, 0x24, 0xd4, 0x57, 0x85, 0x9d, 0x0f, 0xca, 0x13, 0x07, 0x82, 0xf2, 0xa1, 0xc2, 0x57, + 0x15, 0xfc, 0x4b, 0x89, 0xb6, 0xae, 0xb7, 0x47, 0x6f, 0xa0, 0x9f, 0xf1, 0x3c, 0xe8, 0xe2, 0x88, + 0xd9, 0xa4, 0xcd, 0x02, 0x12, 0x52, 0xfd, 0xf2, 0x96, 0xb6, 0x5d, 0x1a, 0x7d, 0x25, 0x53, 0x8a, + 0x2c, 0x01, 0x7a, 0x21, 0x31, 0x7b, 0x39, 0x9e, 0x16, 0x3c, 0x77, 0x52, 0x44, 0x54, 0x83, 0x25, + 0xd7, 0x69, 0x36, 0x13, 0xc1, 0x48, 0x08, 0xfe, 0x60, 0x8a, 0xe0, 0xaa, 0xd3, 0x6c, 0x2a, 0x09, + 0x56, 0xc9, 0x3d, 0x5d, 0xa0, 0x1d, 0xb8, 0x12, 0x50, 0x3b, 0x3d, 0x04, 0xf0, 0x5d, 0xfd, 0x8a, + 0x68, 0x06, 0x56, 0x03, 0x5a, 0xe5, 0x3b, 0x22, 0x6b, 0xb9, 0x08, 0x53, 0x87, 0x6b, 0x83, 0x17, + 0x2d, 0xb9, 0x83, 0xcf, 0x44, 0xcb, 0xf8, 0xa8, 0x4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 0x66, 0x39, 0x83, 0xd1, 0x2d, 0x86, 0x78, 0x82, 0x86, 0x1b, + 0x8c, 0xfb, 0xb3, 0xdc, 0xde, 0x0c, 0x68, 0x96, 0x27, 0x68, 0x6c, 0x4b, 0x81, 0xfe, 0xa4, 0xc1, + 0xb5, 0x31, 0xfd, 0xc4, 0xc7, 0xb3, 0x9e, 0x6e, 0x16, 0x69, 0xfc, 0x78, 0x5e, 0x64, 0x62, 0xd6, + 0xd7, 0x1a, 0xe8, 0x63, 0x9b, 0x84, 0x87, 0x33, 0x1f, 0xfa, 0x10, 0xd6, 0xd8, 0x9b, 0x1f, 0x9b, + 0x18, 0xf7, 0x17, 0x0d, 0x36, 0x26, 0x57, 0xe2, 0x4f, 0x67, 0x0d, 0xc0, 0x18, 0x01, 0xc6, 0xfe, + 0x39, 0x05, 0xc4, 0xb6, 0xee, 0xed, 0x7f, 0xf3, 0x76, 0x53, 0x7b, 0xfd, 0x76, 0x53, 0xfb, 0xd7, + 0xdb, 0x4d, 0xed, 0xf7, 0xef, 0x36, 0x2f, 0xbc, 0x7e, 0xb7, 0x79, 0xe1, 0x1f, 0xef, 0x36, 0x2f, + 0xfc, 0x7c, 0x27, 0xd5, 0xc8, 0x70, 0x15, 0x3b, 0xf2, 0xe7, 0xfa, 0x90, 0x78, 0xb8, 0xd2, 0x1b, + 0xf8, 0x5f, 0x0d, 0xde, 0xd3, 0xd4, 0xf3, 0x62, 0x14, 0xb9, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xbe, 0xc4, 0x2d, 0x51, 0x03, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2548,30 +2499,6 @@ func (m *MsgAddInboundTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TxIndex != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TxIndex)) - i-- - dAtA[i] = 0x38 - } - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0x32 - } - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } if m.CoinType != 0 { i = encodeVarintTx(dAtA, i, uint64(m.CoinType)) i-- @@ -2745,30 +2672,6 @@ func (m *MsgAddOutboundTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TxIndex != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TxIndex)) - i-- - dAtA[i] = 0x38 - } - if len(m.BlockHash) > 0 { - i -= len(m.BlockHash) - copy(dAtA[i:], m.BlockHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.BlockHash))) - i-- - dAtA[i] = 0x32 - } - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } if len(m.TxHash) > 0 { i -= len(m.TxHash) copy(dAtA[i:], m.TxHash) @@ -3712,17 +3615,6 @@ func (m *MsgAddInboundTracker) Size() (n int) { if m.CoinType != 0 { n += 1 + sovTx(uint64(m.CoinType)) } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.TxIndex != 0 { - n += 1 + sovTx(uint64(m.TxIndex)) - } return n } @@ -3806,17 +3698,6 @@ func (m *MsgAddOutboundTracker) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.BlockHash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.TxIndex != 0 { - n += 1 + sovTx(uint64(m.TxIndex)) - } return n } @@ -4668,93 +4549,6 @@ func (m *MsgAddInboundTracker) Unmarshal(dAtA []byte) error { break } } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &proofs.Proof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) - } - m.TxIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TxIndex |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -5306,93 +5100,6 @@ func (m *MsgAddOutboundTracker) Unmarshal(dAtA []byte) error { } m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &proofs.Proof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BlockHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TxIndex", wireType) - } - m.TxIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TxIndex |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/zetaclient/chains/bitcoin/signer/signer.go b/zetaclient/chains/bitcoin/signer/signer.go index 90257e019e..1c08dcdcd6 100644 --- a/zetaclient/chains/bitcoin/signer/signer.go +++ b/zetaclient/chains/bitcoin/signer/signer.go @@ -469,14 +469,11 @@ func (signer *Signer) TryProcessOutbound( } logger.Info(). Msgf("Broadcast success: nonce %d to chain %s outboundHash %s", outboundTssNonce, chain.String(), outboundHash) - zetaHash, err := zetacoreClient.AddOutboundTracker( + zetaHash, err := zetacoreClient.PostOutboundTracker( ctx, chain.ChainId, outboundTssNonce, outboundHash, - nil, - "", - -1, ) if err != nil { logger.Err(err). diff --git a/zetaclient/chains/evm/signer/outbound_tracker_reporter.go b/zetaclient/chains/evm/signer/outbound_tracker_reporter.go index d4562cee9b..8be76f66a4 100644 --- a/zetaclient/chains/evm/signer/outbound_tracker_reporter.go +++ b/zetaclient/chains/evm/signer/outbound_tracker_reporter.go @@ -70,7 +70,7 @@ func (signer *Signer) reportToOutboundTracker( } // report outbound hash to tracker - zetaHash, err := zetacoreClient.AddOutboundTracker(ctx, chainID, nonce, outboundHash, nil, "", -1) + zetaHash, err := zetacoreClient.PostOutboundTracker(ctx, chainID, nonce, outboundHash) if err != nil { logger.Err(err).Msg("error adding outbound to tracker") } else if zetaHash != "" { diff --git a/zetaclient/chains/interfaces/interfaces.go b/zetaclient/chains/interfaces/interfaces.go index c89a77e4b8..0043d0a7a9 100644 --- a/zetaclient/chains/interfaces/interfaces.go +++ b/zetaclient/chains/interfaces/interfaces.go @@ -21,9 +21,7 @@ import ( "gitlab.com/thorchain/tss/go-tss/blame" "github.com/zeta-chain/node/pkg/chains" - "github.com/zeta-chain/node/pkg/proofs" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" - lightclienttypes "github.com/zeta-chain/node/x/lightclient/types" observertypes "github.com/zeta-chain/node/x/observer/types" keyinterfaces "github.com/zeta-chain/node/zetaclient/keys/interfaces" "github.com/zeta-chain/node/zetaclient/outboundprocessor" @@ -75,15 +73,7 @@ type ChainSigner interface { GetGatewayAddress() string } -// ZetacoreVoter represents voter interface. type ZetacoreVoter interface { - PostVoteBlockHeader( - ctx context.Context, - chainID int64, - txhash []byte, - height int64, - header proofs.HeaderData, - ) (string, error) PostVoteGasPrice( ctx context.Context, chain chains.Chain, @@ -117,7 +107,6 @@ type ZetacoreClient interface { GetTSSHistory(ctx context.Context) ([]observertypes.TSS, error) GetBlockHeight(ctx context.Context) (int64, error) - GetBlockHeaderChainState(ctx context.Context, chainID int64) (*lightclienttypes.ChainState, error) ListPendingCCTX(ctx context.Context, chainID int64) ([]*crosschaintypes.CrossChainTx, uint64, error) ListPendingCCTXWithinRateLimit( @@ -141,16 +130,7 @@ type ZetacoreClient interface { GetZetaHotKeyBalance(ctx context.Context) (sdkmath.Int, error) GetInboundTrackersForChain(ctx context.Context, chainID int64) ([]crosschaintypes.InboundTracker, error) - // todo(revamp): refactor input to struct - AddOutboundTracker( - ctx context.Context, - chainID int64, - nonce uint64, - txHash string, - proof *proofs.Proof, - blockHash string, - txIndex int64, - ) (string, error) + PostOutboundTracker(ctx context.Context, chainID int64, nonce uint64, txHash string) (string, error) Stop() OnBeforeStop(callback func()) diff --git a/zetaclient/chains/solana/signer/outbound_tracker_reporter.go b/zetaclient/chains/solana/signer/outbound_tracker_reporter.go index 74d2b7eb52..3fc8acf181 100644 --- a/zetaclient/chains/solana/signer/outbound_tracker_reporter.go +++ b/zetaclient/chains/solana/signer/outbound_tracker_reporter.go @@ -81,7 +81,7 @@ func (signer *Signer) reportToOutboundTracker( } // report outbound hash to zetacore - zetaHash, err := zetacoreClient.AddOutboundTracker(ctx, chainID, nonce, txSig.String(), nil, "", -1) + zetaHash, err := zetacoreClient.PostOutboundTracker(ctx, chainID, nonce, txSig.String()) if err != nil { logger.Err(err).Msg("error adding outbound to tracker") } else if zetaHash != "" { diff --git a/zetaclient/chains/ton/observer/observer_test.go b/zetaclient/chains/ton/observer/observer_test.go index 290e34081a..45a79f65ec 100644 --- a/zetaclient/chains/ton/observer/observer_test.go +++ b/zetaclient/chains/ton/observer/observer_test.go @@ -251,10 +251,7 @@ func setupTrackersBag(ts *testSuite) { } ts.zetacore.On( - "AddOutboundTracker", - mock.Anything, - mock.Anything, - mock.Anything, + "PostOutboundTracker", mock.Anything, mock.Anything, mock.Anything, diff --git a/zetaclient/chains/ton/observer/outbound.go b/zetaclient/chains/ton/observer/outbound.go index b4a466bcf2..deacb8e359 100644 --- a/zetaclient/chains/ton/observer/outbound.go +++ b/zetaclient/chains/ton/observer/outbound.go @@ -208,9 +208,7 @@ func (ob *Observer) addOutboundTracker(ctx context.Context, tx *toncontracts.Tra ) // note it has a check for noop - _, err = ob. - ZetacoreClient(). - AddOutboundTracker(ctx, chainID, nonce, hash, nil, "", 0) + _, err = ob.ZetacoreClient().PostOutboundTracker(ctx, chainID, nonce, hash) return err } diff --git a/zetaclient/chains/ton/signer/signer_test.go b/zetaclient/chains/ton/signer/signer_test.go index dcd78c9817..f491b59391 100644 --- a/zetaclient/chains/ton/signer/signer_test.go +++ b/zetaclient/chains/ton/signer/signer_test.go @@ -246,10 +246,7 @@ func setupTrackersBag(ts *testSuite) { } ts.zetacore.On( - "AddOutboundTracker", - mock.Anything, - mock.Anything, - mock.Anything, + "PostOutboundTracker", mock.Anything, mock.Anything, mock.Anything, diff --git a/zetaclient/chains/ton/signer/signer_tracker.go b/zetaclient/chains/ton/signer/signer_tracker.go index 065d0f8204..e698830269 100644 --- a/zetaclient/chains/ton/signer/signer_tracker.go +++ b/zetaclient/chains/ton/signer/signer_tracker.go @@ -64,7 +64,7 @@ func (s *Signer) trackOutbound( } // Note that this method has a check for noop - _, err = zetacore.AddOutboundTracker(ctx, chainID, nonce, txHash, nil, "", 0) + _, err = zetacore.PostOutboundTracker(ctx, chainID, nonce, txHash) if err != nil { return errors.Wrap(err, "unable to add outbound tracker") } diff --git a/zetaclient/testutils/mocks/zetacore_client.go b/zetaclient/testutils/mocks/zetacore_client.go index 864b130560..5bd9b685f9 100644 --- a/zetaclient/testutils/mocks/zetacore_client.go +++ b/zetaclient/testutils/mocks/zetacore_client.go @@ -12,16 +12,12 @@ import ( keysinterfaces "github.com/zeta-chain/node/zetaclient/keys/interfaces" - lightclienttypes "github.com/zeta-chain/node/x/lightclient/types" - math "cosmossdk.io/math" mock "github.com/stretchr/testify/mock" observertypes "github.com/zeta-chain/node/x/observer/types" - proofs "github.com/zeta-chain/node/pkg/proofs" - types "github.com/zeta-chain/node/x/crosschain/types" zerolog "github.com/rs/zerolog" @@ -32,34 +28,6 @@ type ZetacoreClient struct { mock.Mock } -// AddOutboundTracker provides a mock function with given fields: ctx, chainID, nonce, txHash, proof, blockHash, txIndex -func (_m *ZetacoreClient) AddOutboundTracker(ctx context.Context, chainID int64, nonce uint64, txHash string, proof *proofs.Proof, blockHash string, txIndex int64) (string, error) { - ret := _m.Called(ctx, chainID, nonce, txHash, proof, blockHash, txIndex) - - if len(ret) == 0 { - panic("no return value specified for AddOutboundTracker") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, string, *proofs.Proof, string, int64) (string, error)); ok { - return rf(ctx, chainID, nonce, txHash, proof, blockHash, txIndex) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, string, *proofs.Proof, string, int64) string); ok { - r0 = rf(ctx, chainID, nonce, txHash, proof, blockHash, txIndex) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, uint64, string, *proofs.Proof, string, int64) error); ok { - r1 = rf(ctx, chainID, nonce, txHash, proof, blockHash, txIndex) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // Chain provides a mock function with given fields: func (_m *ZetacoreClient) Chain() chains.Chain { ret := _m.Called() @@ -136,36 +104,6 @@ func (_m *ZetacoreClient) GetBTCTSSAddress(ctx context.Context, chainID int64) ( return r0, r1 } -// GetBlockHeaderChainState provides a mock function with given fields: ctx, chainID -func (_m *ZetacoreClient) GetBlockHeaderChainState(ctx context.Context, chainID int64) (*lightclienttypes.ChainState, error) { - ret := _m.Called(ctx, chainID) - - if len(ret) == 0 { - panic("no return value specified for GetBlockHeaderChainState") - } - - var r0 *lightclienttypes.ChainState - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*lightclienttypes.ChainState, error)); ok { - return rf(ctx, chainID) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *lightclienttypes.ChainState); ok { - r0 = rf(ctx, chainID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*lightclienttypes.ChainState) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, chainID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // GetBlockHeight provides a mock function with given fields: ctx func (_m *ZetacoreClient) GetBlockHeight(ctx context.Context) (int64, error) { ret := _m.Called(ctx) @@ -654,27 +592,27 @@ func (_m *ZetacoreClient) OnBeforeStop(callback func()) { _m.Called(callback) } -// PostVoteBlameData provides a mock function with given fields: ctx, _a1, chainID, index -func (_m *ZetacoreClient) PostVoteBlameData(ctx context.Context, _a1 *blame.Blame, chainID int64, index string) (string, error) { - ret := _m.Called(ctx, _a1, chainID, index) +// PostOutboundTracker provides a mock function with given fields: ctx, chainID, nonce, txHash +func (_m *ZetacoreClient) PostOutboundTracker(ctx context.Context, chainID int64, nonce uint64, txHash string) (string, error) { + ret := _m.Called(ctx, chainID, nonce, txHash) if len(ret) == 0 { - panic("no return value specified for PostVoteBlameData") + panic("no return value specified for PostOutboundTracker") } var r0 string var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *blame.Blame, int64, string) (string, error)); ok { - return rf(ctx, _a1, chainID, index) + if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, string) (string, error)); ok { + return rf(ctx, chainID, nonce, txHash) } - if rf, ok := ret.Get(0).(func(context.Context, *blame.Blame, int64, string) string); ok { - r0 = rf(ctx, _a1, chainID, index) + if rf, ok := ret.Get(0).(func(context.Context, int64, uint64, string) string); ok { + r0 = rf(ctx, chainID, nonce, txHash) } else { r0 = ret.Get(0).(string) } - if rf, ok := ret.Get(1).(func(context.Context, *blame.Blame, int64, string) error); ok { - r1 = rf(ctx, _a1, chainID, index) + if rf, ok := ret.Get(1).(func(context.Context, int64, uint64, string) error); ok { + r1 = rf(ctx, chainID, nonce, txHash) } else { r1 = ret.Error(1) } @@ -682,27 +620,27 @@ func (_m *ZetacoreClient) PostVoteBlameData(ctx context.Context, _a1 *blame.Blam return r0, r1 } -// PostVoteBlockHeader provides a mock function with given fields: ctx, chainID, txhash, height, header -func (_m *ZetacoreClient) PostVoteBlockHeader(ctx context.Context, chainID int64, txhash []byte, height int64, header proofs.HeaderData) (string, error) { - ret := _m.Called(ctx, chainID, txhash, height, header) +// PostVoteBlameData provides a mock function with given fields: ctx, _a1, chainID, index +func (_m *ZetacoreClient) PostVoteBlameData(ctx context.Context, _a1 *blame.Blame, chainID int64, index string) (string, error) { + ret := _m.Called(ctx, _a1, chainID, index) if len(ret) == 0 { - panic("no return value specified for PostVoteBlockHeader") + panic("no return value specified for PostVoteBlameData") } var r0 string var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, []byte, int64, proofs.HeaderData) (string, error)); ok { - return rf(ctx, chainID, txhash, height, header) + if rf, ok := ret.Get(0).(func(context.Context, *blame.Blame, int64, string) (string, error)); ok { + return rf(ctx, _a1, chainID, index) } - if rf, ok := ret.Get(0).(func(context.Context, int64, []byte, int64, proofs.HeaderData) string); ok { - r0 = rf(ctx, chainID, txhash, height, header) + if rf, ok := ret.Get(0).(func(context.Context, *blame.Blame, int64, string) string); ok { + r0 = rf(ctx, _a1, chainID, index) } else { r0 = ret.Get(0).(string) } - if rf, ok := ret.Get(1).(func(context.Context, int64, []byte, int64, proofs.HeaderData) error); ok { - r1 = rf(ctx, chainID, txhash, height, header) + if rf, ok := ret.Get(1).(func(context.Context, *blame.Blame, int64, string) error); ok { + r1 = rf(ctx, _a1, chainID, index) } else { r1 = ret.Error(1) } diff --git a/zetaclient/zetacore/broadcast_test.go b/zetaclient/zetacore/broadcast_test.go index 97f335abfd..3fb5093963 100644 --- a/zetaclient/zetacore/broadcast_test.go +++ b/zetaclient/zetacore/broadcast_test.go @@ -2,7 +2,6 @@ package zetacore import ( "context" - "encoding/hex" "errors" "net" "testing" @@ -16,7 +15,6 @@ import ( "github.com/zeta-chain/node/pkg/chains" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" - observerTypes "github.com/zeta-chain/node/x/observer/types" "github.com/zeta-chain/node/zetaclient/keys" "github.com/zeta-chain/node/zetaclient/testutils/mocks" ) @@ -84,15 +82,7 @@ func TestBroadcast(t *testing.T) { withTendermint(mocks.NewSDKClientWithErr(t, nil, 0)), ) - blockHash, err := hex.DecodeString(ethBlockHash) - require.NoError(t, err) - msg := observerTypes.NewMsgVoteBlockHeader( - address.String(), - chains.Ethereum.ChainId, - blockHash, - 18495266, - getHeaderData(t), - ) + msg := crosschaintypes.NewMsgVoteGasPrice(address.String(), chains.Ethereum.ChainId, 10000, 1000, 1) authzMsg, authzSigner, err := WrapMessageWithAuthz(msg) require.NoError(t, err) @@ -108,15 +98,7 @@ func TestBroadcast(t *testing.T) { ), ) - blockHash, err := hex.DecodeString(ethBlockHash) - require.NoError(t, err) - msg := observerTypes.NewMsgVoteBlockHeader( - address.String(), - chains.Ethereum.ChainId, - blockHash, - 18495266, - getHeaderData(t), - ) + msg := crosschaintypes.NewMsgVoteGasPrice(address.String(), chains.Ethereum.ChainId, 10000, 1000, 1) authzMsg, authzSigner, err := WrapMessageWithAuthz(msg) require.NoError(t, err) diff --git a/zetaclient/zetacore/client_vote.go b/zetaclient/zetacore/client_vote.go index a6eec263c4..491ec892e0 100644 --- a/zetaclient/zetacore/client_vote.go +++ b/zetaclient/zetacore/client_vote.go @@ -7,7 +7,6 @@ import ( "gitlab.com/thorchain/tss/go-tss/blame" "github.com/zeta-chain/node/pkg/chains" - "github.com/zeta-chain/node/pkg/proofs" "github.com/zeta-chain/node/pkg/retry" "github.com/zeta-chain/node/x/crosschain/types" observerclient "github.com/zeta-chain/node/x/observer/client/cli" @@ -15,34 +14,6 @@ import ( zctx "github.com/zeta-chain/node/zetaclient/context" ) -// PostVoteBlockHeader posts a vote on an observed block header -func (c *Client) PostVoteBlockHeader( - ctx context.Context, - chainID int64, - blockHash []byte, - height int64, - header proofs.HeaderData, -) (string, error) { - signerAddress := c.keys.GetOperatorAddress().String() - - msg := observertypes.NewMsgVoteBlockHeader(signerAddress, chainID, blockHash, height, header) - - authzMsg, authzSigner, err := WrapMessageWithAuthz(msg) - if err != nil { - return "", err - } - - zetaTxHash, err := retry.DoTypedWithRetry(func() (string, error) { - return c.Broadcast(ctx, DefaultGasLimit, authzMsg, authzSigner) - }) - - if err != nil { - return "", errors.Wrap(err, "unable to broadcast vote block header") - } - - return zetaTxHash, nil -} - // PostVoteGasPrice posts a gas price vote. Returns txHash and error. func (c *Client) PostVoteGasPrice( ctx context.Context, diff --git a/zetaclient/zetacore/tx.go b/zetaclient/zetacore/tx.go index bb7b106fd5..59fbc92edd 100644 --- a/zetaclient/zetacore/tx.go +++ b/zetaclient/zetacore/tx.go @@ -11,7 +11,6 @@ import ( "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" - "github.com/zeta-chain/node/pkg/proofs" "github.com/zeta-chain/node/x/crosschain/types" clientauthz "github.com/zeta-chain/node/zetaclient/authz" clientcommon "github.com/zeta-chain/node/zetaclient/common" @@ -84,17 +83,8 @@ func WrapMessageWithAuthz(msg sdk.Msg) (sdk.Msg, clientauthz.Signer, error) { return &authzMessage, authzSigner, nil } -// AddOutboundTracker adds an outbound tracker -// TODO(revamp): rename to PostAddOutboundTracker -func (c *Client) AddOutboundTracker( - ctx context.Context, - chainID int64, - nonce uint64, - txHash string, - proof *proofs.Proof, - blockHash string, - txIndex int64, -) (string, error) { +// PostOutboundTracker adds an outbound tracker +func (c *Client) PostOutboundTracker(ctx context.Context, chainID int64, nonce uint64, txHash string) (string, error) { // don't report if the tracker already contains the txHash tracker, err := c.GetOutboundTracker(ctx, chains.Chain{ChainId: chainID}, nonce) if err == nil { @@ -106,7 +96,7 @@ func (c *Client) AddOutboundTracker( } signerAddress := c.keys.GetOperatorAddress().String() - msg := types.NewMsgAddOutboundTracker(signerAddress, chainID, nonce, txHash, proof, blockHash, txIndex) + msg := types.NewMsgAddOutboundTracker(signerAddress, chainID, nonce, txHash) authzMsg, authzSigner, err := WrapMessageWithAuthz(msg) if err != nil { diff --git a/zetaclient/zetacore/tx_test.go b/zetaclient/zetacore/tx_test.go index b58981f67b..f1cac183f1 100644 --- a/zetaclient/zetacore/tx_test.go +++ b/zetaclient/zetacore/tx_test.go @@ -1,11 +1,8 @@ package zetacore import ( - "bytes" "context" - "encoding/hex" "net" - "os" "testing" "github.com/zeta-chain/node/testutil/sample" @@ -14,7 +11,6 @@ import ( "cosmossdk.io/math" sdktypes "github.com/cosmos/cosmos-sdk/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" @@ -26,7 +22,6 @@ import ( "github.com/zeta-chain/node/pkg/chains" "github.com/zeta-chain/node/pkg/coin" - "github.com/zeta-chain/node/pkg/proofs" crosschaintypes "github.com/zeta-chain/node/x/crosschain/types" lightclienttypes "github.com/zeta-chain/node/x/lightclient/types" observertypes "github.com/zeta-chain/node/x/observer/types" @@ -106,22 +101,6 @@ func Test_GasPriceMultiplier(t *testing.T) { } } -func getHeaderData(t *testing.T) proofs.HeaderData { - var header ethtypes.Header - file, err := os.Open("../../testutil/testdata/eth_header_18495266.json") - require.NoError(t, err) - defer file.Close() - headerBytes := make([]byte, 4096) - n, err := file.Read(headerBytes) - require.NoError(t, err) - err = header.UnmarshalJSON(headerBytes[:n]) - require.NoError(t, err) - var buffer bytes.Buffer - err = header.EncodeRLP(&buffer) - require.NoError(t, err) - return proofs.NewEthereumHeader(buffer.Bytes()) -} - func TestZetacore_PostGasPrice(t *testing.T) { ctx := context.Background() @@ -183,14 +162,14 @@ func TestZetacore_AddOutboundTracker(t *testing.T) { t.Run("add tx hash success", func(t *testing.T) { tendermintMock.SetBroadcastTxHash(sampleHash) - hash, err := client.AddOutboundTracker(ctx, chainID, nonce, "", nil, "", 456) + hash, err := client.PostOutboundTracker(ctx, chainID, nonce, "") assert.NoError(t, err) assert.Equal(t, sampleHash, hash) }) t.Run("add tx hash fail", func(t *testing.T) { tendermintMock.SetError(errors.New("broadcast error")) - hash, err := client.AddOutboundTracker(ctx, chainID, nonce, "", nil, "", 456) + hash, err := client.PostOutboundTracker(ctx, chainID, nonce, "") assert.Error(t, err) assert.Empty(t, hash) }) @@ -391,34 +370,6 @@ func TestZetacore_PostBlameData(t *testing.T) { }) } -func TestZetacore_PostVoteBlockHeader(t *testing.T) { - ctx := context.Background() - - extraGRPC := withDummyServer(100) - setupMockServer(t, observertypes.RegisterQueryServer, skipMethod, nil, nil, extraGRPC...) - - client := setupZetacoreClient(t, - withDefaultObserverKeys(), - withAccountRetriever(t, 100, 100), - withTendermint(mocks.NewSDKClientWithErr(t, nil, 0).SetBroadcastTxHash(sampleHash)), - ) - - blockHash, err := hex.DecodeString(ethBlockHash) - require.NoError(t, err) - - t.Run("post add block header success", func(t *testing.T) { - hash, err := client.PostVoteBlockHeader( - ctx, - chains.Ethereum.ChainId, - blockHash, - 18495266, - getHeaderData(t), - ) - require.NoError(t, err) - require.Equal(t, sampleHash, hash) - }) -} - func TestZetacore_PostVoteInbound(t *testing.T) { ctx := context.Background()