From 7108038ef97d1df836edc213b0d28582a5b98125 Mon Sep 17 00:00:00 2001 From: Grant Zukel <80433392+gzukel@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:04:38 -0700 Subject: [PATCH 1/5] ci: Finalize typescript NPM package publish on release creation. (#1548) * ci: add typescript publishing --- .github/workflows/publish-typescript.yaml | 16 ++++++++++------ scripts/protoc-gen-typescript.sh | 2 +- typescript/package.json | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-typescript.yaml b/.github/workflows/publish-typescript.yaml index a5906d5047..890f867d8b 100644 --- a/.github/workflows/publish-typescript.yaml +++ b/.github/workflows/publish-typescript.yaml @@ -16,16 +16,20 @@ jobs: node-version: '20.x' registry-url: 'https://registry.npmjs.org' + - name: Install buf + run: | + curl -sSL https://github.com/bufbuild/buf/releases/download/v1.28.1/buf-Linux-x86_64 -o /usr/local/bin/buf + chmod +x /usr/local/bin/buf + + - name: Generate + run: | + make typescript + - name: Set Version working-directory: typescript run: | - version=$(cat app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"') + version=$(cat ../app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"') npm version ${version} - sed -i 's/@zetachain\/blockchain-types/@zetachain\/node-types/' package.json - - - name: Install dependencies and build 🔧 - working-directory: typescript - run: npm ci && npm run build - name: Publish package on NPM 📦 run: npm publish diff --git a/scripts/protoc-gen-typescript.sh b/scripts/protoc-gen-typescript.sh index 526d4773da..e56c951de1 100755 --- a/scripts/protoc-gen-typescript.sh +++ b/scripts/protoc-gen-typescript.sh @@ -8,7 +8,7 @@ rm -rf $DIR cat < $DIR/package.json { - "name": "@zetachain/blockchain-types", + "name": "@zetachain/node-types", "version": "0.0.0-set-on-publish", "description": "", "main": "", diff --git a/typescript/package.json b/typescript/package.json index 369d5cbb82..31e60016e1 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -1,5 +1,5 @@ { - "name": "@zetachain/blockchain-types", + "name": "@zetachain/node-types", "version": "0.0.0-set-on-publish", "description": "", "main": "", From 328319177b2672b005f028462b3076826dfd3f18 Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Wed, 10 Jan 2024 12:46:10 -0800 Subject: [PATCH 2/5] test(`e2e`): improve stateful e2e testing (#1538) * support contracts in config * refactor stateful test * set back e2e test to previous implementation * stateful check some fixes * fix legacy query * use patched v11 for evm addresses * fix wait for logic * comment out tests * fix upgrade tests * go import * add comment for code to be removed * make generate * changelogs * fix typy * test tss height 20 * revert back keygen height --------- Co-authored-by: Tanmay --- Dockerfile-versioned | 5 +- Dockerfile-versioned-source | 23 +- Makefile | 2 +- app/setup_handlers.go | 2 +- changelog.md | 2 + cmd/zetaclientd/start_utils.go | 6 +- cmd/zetae2e/config/config.go | 21 + cmd/zetae2e/config/contracts.go | 28 + cmd/zetae2e/local/local.go | 83 ++- cmd/zetae2e/local/utils.go | 8 +- contrib/localnet/docker-compose.yml | 1 - .../orchestrator/Dockerfile-upgrade.fastbuild | 6 +- .../orchestrator/restart-zetaclientd.sh | 6 +- .../orchestrator/smoketest/config/config.go | 15 +- .../orchestrator/smoketest/runner/bitcoin.go | 33 +- .../orchestrator/smoketest/runner/evm.go | 1 - .../orchestrator/smoketest/runner/runner.go | 24 + .../smoketest/runner/setup_zeta.go | 39 +- .../smoketests/test_crosschain_swap.go | 7 +- .../smoketest/smoketests/test_zrc20_swap.go | 8 +- .../localnet/orchestrator/start-upgrade.sh | 77 +- contrib/localnet/orchestrator/start.sh | 13 +- contrib/localnet/scripts/genesis-stateful.sh | 34 +- contrib/localnet/scripts/genesis-upgrade.sh | 5 + .../scripts/start-zetaclientd-background.sh | 10 +- .../scripts/start-zetaclientd-genesis.sh | 4 +- docs/openapi/openapi.swagger.yaml | 46 +- proto/crosschain/query.proto | 21 + typescript/crosschain/query_pb.d.ts | 56 ++ x/crosschain/keeper/grpc_query.go | 12 + x/crosschain/types/query.pb.go | 703 ++++++++++++++---- x/crosschain/types/query.pb.gw.go | 65 ++ 32 files changed, 1068 insertions(+), 298 deletions(-) diff --git a/Dockerfile-versioned b/Dockerfile-versioned index c948817829..96e8c0e88e 100644 --- a/Dockerfile-versioned +++ b/Dockerfile-versioned @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine +FROM golang:1.20-alpine3.18 ENV GOPATH /go ENV GOOS=linux @@ -38,10 +38,7 @@ RUN cp $GOPATH/bin/smoketest $GOPATH/bin/old/ RUN git clone https://github.com/zeta-chain/cosmos-sdk.git RUN cd cosmos-sdk && git checkout zetavisor-v0.1.5 RUN cd cosmos-sdk/cosmovisor && make zetavisor -# -#FROM golang:1.19-alpine -#RUN apk --no-cache add openssh jq tmux vim curl bash RUN ssh-keygen -A WORKDIR /root diff --git a/Dockerfile-versioned-source b/Dockerfile-versioned-source index a0ee08a782..f6b90d5126 100644 --- a/Dockerfile-versioned-source +++ b/Dockerfile-versioned-source @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine +FROM golang:1.20-alpine3.18 ENV GOPATH /go ENV GOOS=linux @@ -9,12 +9,15 @@ ARG old_version RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux RUN ssh-keygen -b 2048 -t rsa -f /root/.ssh/localtest.pem -q -N "" +# Build cosmovisor +RUN go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0 + WORKDIR /go/delivery/zeta-node RUN mkdir -p $GOPATH/bin/old RUN mkdir -p $GOPATH/bin/new -ENV NEW_VERSION=v42.0.0 +ENV NEW_VERSION=v12.0.0 # Build new release from the current source COPY go.mod /go/delivery/zeta-node/ @@ -22,10 +25,9 @@ COPY go.sum /go/delivery/zeta-node/ RUN cd /go/delivery/zeta-node/ && go mod download COPY . /go/delivery/zeta-node/ RUN cd /go/delivery/zeta-node/ && make install -RUN cd /go/delivery/zeta-node/ && make install-smoketest +RUN cd /go/delivery/zeta-node/ && make install-zetae2e RUN cp $GOPATH/bin/zetacored $GOPATH/bin/new/ RUN cp $GOPATH/bin/zetaclientd $GOPATH/bin/new/ -RUN cp $GOPATH/bin/smoketest $GOPATH/bin/new/ # Checkout and build old binary RUN git clone https://github.com/zeta-chain/node.git @@ -33,18 +35,9 @@ RUN cd node && git fetch RUN cd node && git checkout ${old_version} RUN cd node && make install -RUN cd node && make install-smoketest RUN cp $GOPATH/bin/zetacored $GOPATH/bin/old/ RUN cp $GOPATH/bin/zetaclientd $GOPATH/bin/old/ -RUN cp $GOPATH/bin/smoketest $GOPATH/bin/old/ - -RUN git clone https://github.com/zeta-chain/cosmos-sdk.git -RUN cd cosmos-sdk && git checkout zetavisor-v0.1.5 -RUN cd cosmos-sdk/cosmovisor && make zetavisor -# -#FROM golang:1.19-alpine -#RUN apk --no-cache add openssh jq tmux vim curl bash RUN ssh-keygen -A WORKDIR /root @@ -52,8 +45,8 @@ RUN cp /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys RUN cp /go/bin/zetaclientd /usr/local/bin RUN cp /go/bin/zetacored /usr/local/bin -RUN cp /go/bin/smoketest /usr/local/bin -RUN cp /go/bin/zetavisor /usr/local/bin +RUN cp /go/bin/zetae2e /usr/local/bin +RUN cp /go/bin/cosmovisor /usr/local/bin COPY contrib/localnet/scripts /root COPY contrib/localnet/preparams /root/preparams diff --git a/Makefile b/Makefile index 9bc41f0451..34862f40e3 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,7 @@ stateful-upgrade: stateful-upgrade-source: @echo "--> Starting stateful smoketest" - $(DOCKER) build --build-arg old_version=v10.1.7 -t zetanode -f ./Dockerfile-versioned-source . + $(DOCKER) build --build-arg old_version=v11.0.0-patch-core-params -t zetanode -f ./Dockerfile-versioned-source . $(DOCKER) build -t orchestrator -f contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild . cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml up -d diff --git a/app/setup_handlers.go b/app/setup_handlers.go index 8948c68527..533679f243 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -9,7 +9,7 @@ import ( observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) -const releaseVersion = "v11.0.0" +const releaseVersion = "v12.0.0" func SetupHandlers(app *App) { app.UpgradeKeeper.SetUpgradeHandler(releaseVersion, func(ctx sdk.Context, plan types.Plan, vm module.VersionMap) (module.VersionMap, error) { diff --git a/changelog.md b/changelog.md index f2ec931d7a..0498a869e1 100644 --- a/changelog.md +++ b/changelog.md @@ -59,6 +59,8 @@ ### Tests +* [1538](https://github.com/zeta-chain/node/pull/1538) - improve stateful e2e testing + ### CI * Removed private runners and unused GitHub Action diff --git a/cmd/zetaclientd/start_utils.go b/cmd/zetaclientd/start_utils.go index 1fcdc1945e..47ed135442 100644 --- a/cmd/zetaclientd/start_utils.go +++ b/cmd/zetaclientd/start_utils.go @@ -34,18 +34,18 @@ func validatePeer(seedPeer string) error { parsedPeer := strings.Split(seedPeer, "/") if len(parsedPeer) < 7 { - return errors.New("seed peer missing IP or ID") + return errors.New("seed peer missing IP or ID or both, seed: " + seedPeer) } seedIP := parsedPeer[2] seedID := parsedPeer[6] if net.ParseIP(seedIP) == nil { - return errors.New("invalid seed IP address") + return errors.New("invalid seed IP address format, seed: " + seedPeer) } if len(seedID) == 0 { - return errors.New("seed id is empty") + return errors.New("seed id is empty, seed: " + seedPeer) } return nil diff --git a/cmd/zetae2e/config/config.go b/cmd/zetae2e/config/config.go index f1635f768e..f307afa02e 100644 --- a/cmd/zetae2e/config/config.go +++ b/cmd/zetae2e/config/config.go @@ -74,3 +74,24 @@ func RunnerFromConfig( return sm, err } + +// ExportContractsFromRunner export contracts from the runner to config using a source config +func ExportContractsFromRunner(sm *runner.SmokeTestRunner, conf config.Config) config.Config { + // copy contracts from deployer runner + conf.Contracts.EVM.ZetaEthAddress = sm.ZetaEthAddr.Hex() + conf.Contracts.EVM.ConnectorEthAddr = sm.ConnectorEthAddr.Hex() + conf.Contracts.EVM.CustodyAddr = sm.ERC20CustodyAddr.Hex() + conf.Contracts.EVM.USDT = sm.USDTERC20Addr.Hex() + + conf.Contracts.ZEVM.SystemContractAddr = sm.SystemContractAddr.Hex() + conf.Contracts.ZEVM.ETHZRC20Addr = sm.ETHZRC20Addr.Hex() + conf.Contracts.ZEVM.USDTZRC20Addr = sm.USDTZRC20Addr.Hex() + conf.Contracts.ZEVM.BTCZRC20Addr = sm.BTCZRC20Addr.Hex() + conf.Contracts.ZEVM.UniswapFactoryAddr = sm.UniswapV2FactoryAddr.Hex() + conf.Contracts.ZEVM.UniswapRouterAddr = sm.UniswapV2RouterAddr.Hex() + conf.Contracts.ZEVM.ZEVMSwapAppAddr = sm.ZEVMSwapAppAddr.Hex() + conf.Contracts.ZEVM.ContextAppAddr = sm.ContextAppAddr.Hex() + conf.Contracts.ZEVM.TestDappAddr = sm.TestDAppAddr.Hex() + + return conf +} diff --git a/cmd/zetae2e/config/contracts.go b/cmd/zetae2e/config/contracts.go index 49ad44dc4c..c49ce98f8b 100644 --- a/cmd/zetae2e/config/contracts.go +++ b/cmd/zetae2e/config/contracts.go @@ -12,7 +12,9 @@ import ( "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-core/contracts/uniswapv2factory.sol" uniswapv2router "github.com/zeta-chain/protocol-contracts/pkg/uniswap/v2-periphery/contracts/uniswapv2router02.sol" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/config" + "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/contextapp" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/erc20" + "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/zevmswap" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/runner" ) @@ -133,6 +135,32 @@ func setContractsFromConfig(r *runner.SmokeTestRunner, conf config.Config) error return err } } + if c := conf.Contracts.ZEVM.ZEVMSwapAppAddr; c != "" { + if !ethcommon.IsHexAddress(c) { + return fmt.Errorf("invalid ZEVMSwapAppAddr: %s", c) + } + r.ZEVMSwapAppAddr = ethcommon.HexToAddress(c) + r.ZEVMSwapApp, err = zevmswap.NewZEVMSwapApp(r.ZEVMSwapAppAddr, r.ZevmClient) + if err != nil { + return err + } + } + if c := conf.Contracts.ZEVM.ContextAppAddr; c != "" { + if !ethcommon.IsHexAddress(c) { + return fmt.Errorf("invalid ContextAppAddr: %s", c) + } + r.ContextAppAddr = ethcommon.HexToAddress(c) + r.ContextApp, err = contextapp.NewContextApp(r.ContextAppAddr, r.ZevmClient) + if err != nil { + return err + } + } + if c := conf.Contracts.ZEVM.TestDappAddr; c != "" { + if !ethcommon.IsHexAddress(c) { + return fmt.Errorf("invalid TestDappAddr: %s", c) + } + r.TestDAppAddr = ethcommon.HexToAddress(c) + } return nil } diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index 754f856aa6..72023b8e9b 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -3,11 +3,13 @@ package local import ( "context" "os" + "path/filepath" "time" "github.com/fatih/color" "github.com/spf13/cobra" zetae2econfig "github.com/zeta-chain/zetacore/cmd/zetae2e/config" + "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/config" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/runner" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/utils" "golang.org/x/sync/errgroup" @@ -21,6 +23,9 @@ const ( flagTestAdmin = "test-admin" flagTestCustom = "test-custom" flagSkipRegular = "skip-regular" + flagSetupOnly = "setup-only" + flagConfigOut = "config-out" + flagSkipSetup = "skip-setup" ) var ( @@ -70,6 +75,21 @@ func NewLocalCmd() *cobra.Command { false, "set to true to skip regular tests", ) + cmd.Flags().Bool( + flagSetupOnly, + false, + "set to true to only setup the networks", + ) + cmd.Flags().String( + flagConfigOut, + "", + "config file to write the deployed contracts from the setup", + ) + cmd.Flags().Bool( + flagSkipSetup, + false, + "set to true to skip setup", + ) return cmd } @@ -101,6 +121,18 @@ func localE2ETest(cmd *cobra.Command, _ []string) { if err != nil { panic(err) } + setupOnly, err := cmd.Flags().GetBool(flagSetupOnly) + if err != nil { + panic(err) + } + configOut, err := cmd.Flags().GetString(flagConfigOut) + if err != nil { + panic(err) + } + skipSetup, err := cmd.Flags().GetBool(flagSkipSetup) + if err != nil { + panic(err) + } testStartTime := time.Now() logger.Print("starting tests") @@ -130,8 +162,11 @@ func localE2ETest(cmd *cobra.Command, _ []string) { setCosmosConfig() // wait for Genesis - logger.Print("⏳ wait 70s for genesis") - time.Sleep(70 * time.Second) + // if setup is skipp, we assume that the genesis is already created + if !skipSetup { + logger.Print("⏳ wait 70s for genesis") + time.Sleep(70 * time.Second) + } // initialize deployer runner with config deployerRunner, err := zetae2econfig.RunnerFromConfig( @@ -150,17 +185,45 @@ func localE2ETest(cmd *cobra.Command, _ []string) { } // wait for keygen to be completed - waitKeygenHeight(ctx, deployerRunner.CctxClient, logger) + // if setup is skipped, we assume that the keygen is already completed + if !skipSetup { + waitKeygenHeight(ctx, deployerRunner.CctxClient, logger) + } + + // query and set the TSS + deployerRunner.SetTSSAddresses() // setting up the networks - logger.Print("⚙️ setting up networks") - startTime := time.Now() + if !skipSetup { + logger.Print("⚙️ setting up networks") + startTime := time.Now() + deployerRunner.SetupEVM(contractsDeployed) + deployerRunner.SetZEVMContracts() + deployerRunner.MintUSDTOnEvm(10000) + logger.Print("✅ setup completed in %s", time.Since(startTime)) + deployerRunner.PrintContractAddresses() + } - deployerRunner.SetTSSAddresses() - deployerRunner.SetupEVM(contractsDeployed) - deployerRunner.SetZEVMContracts() - deployerRunner.MintUSDTOnEvm(10000) - logger.Print("✅ setup completed in %s", time.Since(startTime)) + // if a config output is specified, write the config + if configOut != "" { + newConfig := zetae2econfig.ExportContractsFromRunner(deployerRunner, conf) + configOut, err := filepath.Abs(configOut) + if err != nil { + panic(err) + } + + // write config into stdout + if err := config.WriteConfig(configOut, newConfig); err != nil { + panic(err) + } + + logger.Print("✅ config file written in %s", configOut) + } + + // if setup only, quit + if setupOnly { + os.Exit(0) + } // run tests var eg errgroup.Group diff --git a/cmd/zetae2e/local/utils.go b/cmd/zetae2e/local/utils.go index b1ac34924a..8e1ab210c1 100644 --- a/cmd/zetae2e/local/utils.go +++ b/cmd/zetae2e/local/utils.go @@ -2,6 +2,7 @@ package local import ( "context" + "path/filepath" "time" sdk "github.com/cosmos/cosmos-sdk/types" @@ -27,6 +28,11 @@ func getConfig(cmd *cobra.Command) (config.Config, error) { return config.DefaultConfig(), nil } + configFile, err = filepath.Abs(configFile) + if err != nil { + return config.Config{}, err + } + return config.ReadConfig(configFile) } @@ -77,7 +83,7 @@ func waitKeygenHeight( cctxClient crosschaintypes.QueryClient, logger *runner.Logger, ) { - // wait for keygen to be completed. ~ height 30 + // wait for keygen to be completed keygenHeight := int64(60) logger.Print("⏳ wait height %v for keygen to be completed", keygenHeight) for { diff --git a/contrib/localnet/docker-compose.yml b/contrib/localnet/docker-compose.yml index a618bab292..14f1435776 100644 --- a/contrib/localnet/docker-compose.yml +++ b/contrib/localnet/docker-compose.yml @@ -6,7 +6,6 @@ networks: config: - subnet: 172.20.0.0/24 - services: rosetta: image: zetanode:latest diff --git a/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild b/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild index 3fb6b69e67..5cbccbc0a6 100644 --- a/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild +++ b/contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild @@ -16,9 +16,7 @@ COPY contrib/localnet/orchestrator/start-upgrade.sh /work/ COPY contrib/localnet/orchestrator/restart-zetaclientd.sh /work/ RUN chmod +x /work/*.sh - -COPY --from=zeta /go/bin/old/smoketest /usr/local/bin/smoketest-old -COPY --from=zeta /go/bin/new/smoketest /usr/local/bin/smoketest-new -RUN chmod +x /usr/local/bin/smoketest-* +COPY --from=zeta /usr/local/bin/zetae2e /usr/local/bin/ +RUN chmod +x /usr/local/bin/zetae2e WORKDIR /work diff --git a/contrib/localnet/orchestrator/restart-zetaclientd.sh b/contrib/localnet/orchestrator/restart-zetaclientd.sh index d5f8b1becc..207eebf4aa 100644 --- a/contrib/localnet/orchestrator/restart-zetaclientd.sh +++ b/contrib/localnet/orchestrator/restart-zetaclientd.sh @@ -33,11 +33,13 @@ CURRENT_HEIGHT=0 while [[ $CURRENT_HEIGHT -lt $UPGRADE_HEIGHT ]] do - CURRENT_HEIGHT=$(curl zetacore0:26657/status | jq '.result.sync_info.latest_block_height' | tr -d '"') + CURRENT_HEIGHT=$(curl -s zetacore0:26657/status | jq '.result.sync_info.latest_block_height' | tr -d '"') + echo current height is "$CURRENT_HEIGHT", waiting for "$UPGRADE_HEIGHT" sleep 5 done -echo current height is "$CURRENT_HEIGHT", restarting zetaclients +echo upgrade height reached, restarting zetaclients + for NODE in "${CLIENT_LIST[@]}"; do ssh -o "StrictHostKeyChecking no" "$NODE" -i ~/.ssh/localtest.pem killall zetaclientd ssh -o "StrictHostKeyChecking no" "$NODE" -i ~/.ssh/localtest.pem "$GOPATH/bin/new/zetaclientd start < /dev/null > $HOME/zetaclient.log 2>&1 &" diff --git a/contrib/localnet/orchestrator/smoketest/config/config.go b/contrib/localnet/orchestrator/smoketest/config/config.go index 5685fe38c0..097bc58641 100644 --- a/contrib/localnet/orchestrator/smoketest/config/config.go +++ b/contrib/localnet/orchestrator/smoketest/config/config.go @@ -1,14 +1,12 @@ package config import ( + "errors" "os" "gopkg.in/yaml.v2" ) -// TODO: support pre-deployed addresses for zEVM contracts -// https://github.com/zeta-chain/node-private/issues/41 - // Config contains the configuration for the smoke test type Config struct { Accounts Accounts `yaml:"accounts"` @@ -55,6 +53,9 @@ type ZEVM struct { BTCZRC20Addr string `yaml:"btc_zrc20"` UniswapFactoryAddr string `yaml:"uniswap_factory"` UniswapRouterAddr string `yaml:"uniswap_router"` + ZEVMSwapAppAddr string `yaml:"zevm_swap_app"` + ContextAppAddr string `yaml:"context_app"` + TestDappAddr string `yaml:"test_dapp"` } func DefaultConfig() Config { @@ -77,6 +78,10 @@ func DefaultConfig() Config { // ReadConfig reads the config file func ReadConfig(file string) (config Config, err error) { + if file == "" { + return Config{}, errors.New("file name cannot be empty") + } + // #nosec G304 -- this is a config file b, err := os.ReadFile(file) if err != nil { @@ -91,6 +96,10 @@ func ReadConfig(file string) (config Config, err error) { // WriteConfig writes the config file func WriteConfig(file string, config Config) error { + if file == "" { + return errors.New("file name cannot be empty") + } + b, err := yaml.Marshal(config) if err != nil { return err diff --git a/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go b/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go index 0277710e69..9ee876a04e 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go +++ b/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go @@ -7,6 +7,9 @@ import ( "math/big" "time" + "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/utils" + crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" + "github.com/btcsuite/btcd/btcjson" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/rpcclient" @@ -65,7 +68,7 @@ func (sm *SmokeTestRunner) DepositBTC(testHeader bool) { panic(err) } amount2 := 0.05 + zetaclient.BtcDepositorFeeMin - _, err = sm.SendToTSSFromDeployerToDeposit(sm.BTCTSSAddress, amount2, utxos[2:4], btc, sm.BTCDeployerAddress) + txHash2, err := sm.SendToTSSFromDeployerToDeposit(sm.BTCTSSAddress, amount2, utxos[2:4], btc, sm.BTCDeployerAddress) if err != nil { panic(err) } @@ -86,25 +89,21 @@ func (sm *SmokeTestRunner) DepositBTC(testHeader bool) { sm.Logger.Info("testing if the deposit into BTC ZRC20 is successful...") - initialBalance, err := sm.BTCZRC20.BalanceOf(&bind.CallOpts{}, sm.DeployerAddress) + cctx := utils.WaitCctxMinedByInTxHash(sm.Ctx, txHash2.String(), sm.CctxClient, sm.Logger, sm.CctxTimeout) + if cctx.CctxStatus.Status != crosschaintypes.CctxStatus_OutboundMined { + panic(fmt.Sprintf( + "expected mined status; got %s, message: %s", + cctx.CctxStatus.Status.String(), + cctx.CctxStatus.StatusMessage), + ) + } + + balance, err := sm.BTCZRC20.BalanceOf(&bind.CallOpts{}, sm.DeployerAddress) if err != nil { panic(err) } - for { - time.Sleep(2 * time.Second) - balance, err := sm.BTCZRC20.BalanceOf(&bind.CallOpts{}, sm.DeployerAddress) - if err != nil { - panic(err) - } - diff := big.NewInt(0) - diff.Sub(balance, initialBalance) - sm.Logger.Info("BTC Difference in balance: %d", diff.Uint64()) - if diff.Cmp(big.NewInt(1.15*btcutil.SatoshiPerBitcoin)) != 0 { - sm.Logger.Info("waiting for BTC balance to show up in ZRC contract... current bal %d", balance) - } else { - sm.Logger.Info("BTC balance is in ZRC contract! Success") - break - } + if balance.Cmp(big.NewInt(0)) != 1 { + panic("balance should be positive") } // due to the high block throughput in localnet, ZetaClient might catch up slowly with the blocks diff --git a/contrib/localnet/orchestrator/smoketest/runner/evm.go b/contrib/localnet/orchestrator/smoketest/runner/evm.go index fc0734e895..f2bb0aaea5 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/evm.go +++ b/contrib/localnet/orchestrator/smoketest/runner/evm.go @@ -110,7 +110,6 @@ func (sm *SmokeTestRunner) DepositERC20WithAmountAndMessage(amount *big.Int, msg sm.Logger.Info(" Amount: %d", event.Amount) sm.Logger.Info(" Message: %x", event.Message) } - sm.Logger.Info("gas limit %d", sm.ZevmAuth.GasLimit) return tx.Hash() } diff --git a/contrib/localnet/orchestrator/smoketest/runner/runner.go b/contrib/localnet/orchestrator/smoketest/runner/runner.go index a09a351036..60698ac114 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/runner.go +++ b/contrib/localnet/orchestrator/smoketest/runner/runner.go @@ -306,3 +306,27 @@ func (sm *SmokeTestRunner) Lock() { func (sm *SmokeTestRunner) Unlock() { sm.mutex.Unlock() } + +// PrintContractAddresses prints the addresses of the contracts +// the printed contracts are grouped in a zevm and evm section +// there is a padding used to print the addresses at the same position +func (sm *SmokeTestRunner) PrintContractAddresses() { + // zevm contracts + sm.Logger.Print(" --- 📜zEVM contracts ---") + sm.Logger.Print("SystemContract: %s", sm.SystemContractAddr.Hex()) + sm.Logger.Print("ETHZRC20: %s", sm.ETHZRC20Addr.Hex()) + sm.Logger.Print("USDTZRC20: %s", sm.USDTZRC20Addr.Hex()) + sm.Logger.Print("BTCZRC20: %s", sm.BTCZRC20Addr.Hex()) + sm.Logger.Print("UniswapFactory: %s", sm.UniswapV2FactoryAddr.Hex()) + sm.Logger.Print("UniswapRouter: %s", sm.UniswapV2RouterAddr.Hex()) + sm.Logger.Print("ZEVMSwapApp: %s", sm.ZEVMSwapAppAddr.Hex()) + sm.Logger.Print("ContextApp: %s", sm.ContextAppAddr.Hex()) + sm.Logger.Print("TestDapp: %s", sm.TestDAppAddr.Hex()) + + // evm contracts + sm.Logger.Print(" --- 📜EVM contracts ---") + sm.Logger.Print("ZetaEth: %s", sm.ZetaEthAddr.Hex()) + sm.Logger.Print("ConnectorEth: %s", sm.ConnectorEthAddr.Hex()) + sm.Logger.Print("ERC20Custody: %s", sm.ERC20CustodyAddr.Hex()) + sm.Logger.Print("USDTERC20: %s", sm.USDTERC20Addr.Hex()) +} diff --git a/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go b/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go index 80a7606ba2..5a266f3156 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go +++ b/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go @@ -2,10 +2,11 @@ package runner import ( "math/big" + "strings" "time" + "github.com/btcsuite/btcutil" "github.com/ethereum/go-ethereum/accounts/abi/bind" - ethcommon "github.com/ethereum/go-ethereum/common" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/systemcontract.sol" "github.com/zeta-chain/protocol-contracts/pkg/contracts/zevm/zrc20.sol" @@ -15,6 +16,7 @@ import ( "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/contextapp" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/contracts/zevmswap" "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/utils" + crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) @@ -28,7 +30,14 @@ func (sm *SmokeTestRunner) SetTSSAddresses() { for { res, err = sm.ObserverClient.GetTssAddress(sm.Ctx, &observertypes.QueryGetTssAddressRequest{}) if err != nil { - sm.Logger.Info("cctxClient.TSS error %s", err.Error()) + // if error contains unknown method GetTssAddress for service, we might be using an older version of the chain for upgrade test + // we query the TSS address with legacy method + if strings.Contains(err.Error(), "unknown method GetTssAddress for service") { + sm.SetTSSAddressesLegacy() + return + } + + sm.Logger.Info("ObserverClient.TSS error %s", err.Error()) sm.Logger.Info("TSS not ready yet, waiting for TSS to be appear in zetacore network...") time.Sleep(1 * time.Second) continue @@ -176,3 +185,29 @@ func (sm *SmokeTestRunner) SetupBTCZRC20() { } sm.BTCZRC20 = BTCZRC20 } + +// SetTSSAddressesLegacy set TSS addresses from information queried from ZetaChain using legacy TSS query +// TODO: remove this function after v12 once upgrade testing is no longer needed with v11 +func (sm *SmokeTestRunner) SetTSSAddressesLegacy() { + var err error + res := &crosschaintypes.QueryGetTssAddressResponse{} + for { + res, err = sm.CctxClient.GetTssAddress(sm.Ctx, &crosschaintypes.QueryGetTssAddressRequest{}) + if err != nil { + sm.Logger.Info("cctxClient.TSS (legacy) error %s", err.Error()) + sm.Logger.Info("TSS not ready yet, waiting for TSS to be appear in zetacore network...") + time.Sleep(1 * time.Second) + continue + } + break + } + + tssAddress := ethcommon.HexToAddress(res.Eth) + btcTSSAddress, err := btcutil.DecodeAddress(res.Btc, common.BitcoinRegnetParams) + if err != nil { + panic(err) + } + + sm.TSSAddress = tssAddress + sm.BTCTSSAddress = btcTSSAddress +} diff --git a/contrib/localnet/orchestrator/smoketest/smoketests/test_crosschain_swap.go b/contrib/localnet/orchestrator/smoketest/smoketests/test_crosschain_swap.go index 166a6dfec2..1a1ce1aa3c 100644 --- a/contrib/localnet/orchestrator/smoketest/smoketests/test_crosschain_swap.go +++ b/contrib/localnet/orchestrator/smoketest/smoketests/test_crosschain_swap.go @@ -19,9 +19,9 @@ func TestCrosschainSwap(sm *runner.SmokeTestRunner) { // https://github.com/zeta-chain/node-private/issues/88 // it is kept as is for now to be consistent with the old implementation // if the tx fails due to already initialized, it will be ignored - txCreatePair, err := sm.UniswapV2Factory.CreatePair(sm.ZevmAuth, sm.USDTZRC20Addr, sm.BTCZRC20Addr) + _, err := sm.UniswapV2Factory.CreatePair(sm.ZevmAuth, sm.USDTZRC20Addr, sm.BTCZRC20Addr) if err != nil { - panic(err) + sm.Logger.Print("ℹ️create pair error") } txUSDTApprove, err := sm.USDTZRC20.Approve(sm.ZevmAuth, sm.UniswapV2RouterAddr, big.NewInt(1e18)) if err != nil { @@ -42,9 +42,6 @@ func TestCrosschainSwap(sm *runner.SmokeTestRunner) { panic(err) } - if receipt := utils.MustWaitForTxReceipt(sm.Ctx, sm.ZevmClient, txCreatePair, sm.Logger, sm.ReceiptTimeout); receipt.Status != 1 { - panic("create pair failed") - } if receipt := utils.MustWaitForTxReceipt(sm.Ctx, sm.ZevmClient, txUSDTApprove, sm.Logger, sm.ReceiptTimeout); receipt.Status != 1 { panic("usdt approve failed") } diff --git a/contrib/localnet/orchestrator/smoketest/smoketests/test_zrc20_swap.go b/contrib/localnet/orchestrator/smoketest/smoketests/test_zrc20_swap.go index 1f96c46ff9..203fa1df0a 100644 --- a/contrib/localnet/orchestrator/smoketest/smoketests/test_zrc20_swap.go +++ b/contrib/localnet/orchestrator/smoketest/smoketests/test_zrc20_swap.go @@ -17,10 +17,10 @@ func TestZRC20Swap(sm *runner.SmokeTestRunner) { // if the tx fails due to already initialized, it will be ignored tx, err := sm.UniswapV2Factory.CreatePair(sm.ZevmAuth, sm.USDTZRC20Addr, sm.ETHZRC20Addr) if err != nil { - panic(err) + sm.Logger.Print("ℹ️create pair error") + } else { + utils.MustWaitForTxReceipt(sm.Ctx, sm.ZevmClient, tx, sm.Logger, sm.ReceiptTimeout) } - receipt := utils.MustWaitForTxReceipt(sm.Ctx, sm.ZevmClient, tx, sm.Logger, sm.ReceiptTimeout) - //sm.Logger.Info("USDT-ETH pair receipt txhash %s status %d", receipt.TxHash, receipt.Status) usdtEthPair, err := sm.UniswapV2Factory.GetPair(&bind.CallOpts{}, sm.USDTZRC20Addr, sm.ETHZRC20Addr) if err != nil { @@ -32,7 +32,7 @@ func TestZRC20Swap(sm *runner.SmokeTestRunner) { if err != nil { panic(err) } - receipt = utils.MustWaitForTxReceipt(sm.Ctx, sm.ZevmClient, tx, sm.Logger, sm.ReceiptTimeout) + receipt := utils.MustWaitForTxReceipt(sm.Ctx, sm.ZevmClient, tx, sm.Logger, sm.ReceiptTimeout) sm.Logger.Info("USDT ZRC20 approval receipt txhash %s status %d", receipt.TxHash, receipt.Status) tx, err = sm.ETHZRC20.Approve(sm.ZevmAuth, sm.UniswapV2RouterAddr, big.NewInt(1e18)) diff --git a/contrib/localnet/orchestrator/start-upgrade.sh b/contrib/localnet/orchestrator/start-upgrade.sh index a9e123ad72..1d8c5aa570 100644 --- a/contrib/localnet/orchestrator/start-upgrade.sh +++ b/contrib/localnet/orchestrator/start-upgrade.sh @@ -1,42 +1,67 @@ #!/bin/bash -SMOKETEST_CMD=$1 +ZETAE2E_CMD=$1 echo "waiting for geth RPC to start..." -sleep 6 +sleep 2 + +# unlock the deployer account echo "funding deployer address 0xE5C5367B8224807Ac2207d350E60e1b6F27a7ecC with 100 Ether" geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xE5C5367B8224807Ac2207d350E60e1b6F27a7ecC", value: web3.toWei(100,"ether")})' attach http://eth:8545 -echo "funding TSS address 0xF421292cb0d3c97b90EEEADfcD660B893592c6A2 with 1 Ether" -geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xF421292cb0d3c97b90EEEADfcD660B893592c6A2", value: web3.toWei(100,"ether")})' attach http://eth:8545 - -echo "waiting for 6s for the transaction to be mined" -sleep 6 -echo "the new balance of the deployer addrees:" -curl -sS http://eth:8545 \ - -X POST \ - -H "Content-Type: application/json" \ - --data '{"method":"eth_getBalance","params":["0xE5C5367B8224807Ac2207d350E60e1b6F27a7ecC", "latest"],"id":1,"jsonrpc":"2.0"}' -curl -sS http://eth:8545 \ - -X POST \ - -H "Content-Type: application/json" \ - --data '{"method":"eth_getBalance","params":["0xF421292cb0d3c97b90EEEADfcD660B893592c6A2", "latest"],"id":1,"jsonrpc":"2.0"}' -echo "running smoketest..." -smoketest-old "$SMOKETEST_CMD" -SMOKETEST_EXIT_CODE=$? -if [ $SMOKETEST_EXIT_CODE -ne 0 ]; then - echo "smoketest failed" + +# unlock erc20 tester accounts +echo "funding deployer address 0x6F57D5E7c6DBb75e59F1524a3dE38Fc389ec5Fd6 with 100 Ether" +geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0x6F57D5E7c6DBb75e59F1524a3dE38Fc389ec5Fd6", value: web3.toWei(100,"ether")})' attach http://eth:8545 + +# unlock zeta tester accounts +echo "funding deployer address 0x5cC2fBb200A929B372e3016F1925DcF988E081fd with 100 Ether" +geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0x5cC2fBb200A929B372e3016F1925DcF988E081fd", value: web3.toWei(100,"ether")})' attach http://eth:8545 + +# unlock bitcoin tester accounts +echo "funding deployer address 0x283d810090EdF4043E75247eAeBcE848806237fD with 100 Ether" +geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0x283d810090EdF4043E75247eAeBcE848806237fD", value: web3.toWei(100,"ether")})' attach http://eth:8545 + +# unlock ethers tester accounts +echo "funding deployer address 0x8D47Db7390AC4D3D449Cc20D799ce4748F97619A with 100 Ether" +geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0x8D47Db7390AC4D3D449Cc20D799ce4748F97619A", value: web3.toWei(100,"ether")})' attach http://eth:8545 + +# unlock miscellaneous tests accounts +echo "funding deployer address 0x90126d02E41c9eB2a10cfc43aAb3BD3460523Cdf with 100 Ether" +geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0x90126d02E41c9eB2a10cfc43aAb3BD3460523Cdf", value: web3.toWei(100,"ether")})' attach http://eth:8545 + +# unlock advanced erc20 tests accounts +echo "funding deployer address 0xcC8487562AAc220ea4406196Ee902C7c076966af with 100 Ether" +geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xcC8487562AAc220ea4406196Ee902C7c076966af", value: web3.toWei(100,"ether")})' attach http://eth:8545 + + +echo "running E2E command to setup the networks and populate the state..." + +zetae2e "$ZETAE2E_CMD" --config-out deployed.yml + +ZETAE2E_EXIT_CODE=$? +if [ $ZETAE2E_EXIT_CODE -ne 0 ]; then + echo "E2E setup failed" exit 1 fi +echo "E2E setup passed, waiting for upgrade height..." + # Restart zetaclients at upgrade height -/work/restart-zetaclientd.sh -u 400 -n 2 +/work/restart-zetaclientd.sh -u 180 -n 2 + +echo "waiting 10 seconds for node to restart..." + +sleep 10 + +echo "running E2E command to test the network after upgrade..." -smoketest-new "$SMOKETEST_CMD" --deployed --wait-for 405 +zetae2e "$ZETAE2E_CMD" --skip-setup --config deployed.yml -if [ $SMOKETEST_EXIT_CODE -eq 0 ]; then - echo "smoketest passed" +ZETAE2E_EXIT_CODE=$? +if [ $ZETAE2E_EXIT_CODE -eq 0 ]; then + echo "E2E passed after upgrade" exit 0 else - echo "smoketest failed" + echo "E2E failed after upgrade" exit 1 fi \ No newline at end of file diff --git a/contrib/localnet/orchestrator/start.sh b/contrib/localnet/orchestrator/start.sh index e79cb3bb39..2c0901a2c2 100644 --- a/contrib/localnet/orchestrator/start.sh +++ b/contrib/localnet/orchestrator/start.sh @@ -33,22 +33,10 @@ geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0x90126d02E41c9eB2a10 echo "funding deployer address 0xcC8487562AAc220ea4406196Ee902C7c076966af with 100 Ether" geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xcC8487562AAc220ea4406196Ee902C7c076966af", value: web3.toWei(100,"ether")})' attach http://eth:8545 - # unlock the TSS account echo "funding TSS address 0xF421292cb0d3c97b90EEEADfcD660B893592c6A2 with 100 Ether" geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xF421292cb0d3c97b90EEEADfcD660B893592c6A2", value: web3.toWei(100,"ether")})' attach http://eth:8545 -## wait for the transaction to be mined -#echo "waiting for 6s for the transaction to be mined" -#sleep 6 - -# note: uncomment the following lines to print the balance of the deployer address if debugging is needed -#echo "the new balance of the deployer address:" -#curl -sS http://eth:8545 \ -# -X POST \ -# -H "Content-Type: application/json" \ -# --data '{"method":"eth_getBalance","params":["0xE5C5367B8224807Ac2207d350E60e1b6F27a7ecC", "latest"],"id":1,"jsonrpc":"2.0"}' - # run e2e tests echo "running e2e tests..." zetae2e "$ZETAE2E_CMD" @@ -56,6 +44,7 @@ ZETAE2E_EXIT_CODE=$? # if e2e passed, exit with 0, otherwise exit with 1 if [ $ZETAE2E_EXIT_CODE -eq 0 ]; then + cat /work/deployed.yml echo "e2e passed" exit 0 else diff --git a/contrib/localnet/scripts/genesis-stateful.sh b/contrib/localnet/scripts/genesis-stateful.sh index cf2923d5f2..5099fcfc4a 100755 --- a/contrib/localnet/scripts/genesis-stateful.sh +++ b/contrib/localnet/scripts/genesis-stateful.sh @@ -58,7 +58,7 @@ source ~/os-info.sh if [ $HOSTNAME != "zetacore0" ] then echo "Waiting for zetacore0 to create genesis.json" - sleep $((7*NUMOFNODES)) + sleep 10 echo "genesis.json created" fi @@ -91,7 +91,7 @@ then # 2. Add the observers , authorizations and required params to the genesis.json zetacored collect-observer-info - zetacored add-observer-list + zetacored add-observer-list --keygen-block 55 cat $HOME/.zetacored/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="azeta"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json cat $HOME/.zetacored/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="azeta"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json cat $HOME/.zetacored/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="azeta"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json @@ -103,8 +103,8 @@ then # set fungible admin account as admin for fungible token zetacored add-genesis-account zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk 100000000000000000000000000azeta zetacored add-genesis-account zeta1n0rn6sne54hv7w2uu93fl48ncyqz97d3kty6sh 100000000000000000000000000azeta # Funds the localnet_gov_admin account - cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][2]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json - + cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][0]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json + cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][1]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json # 3. Copy the genesis.json to all the nodes .And use it to create a gentx for every node zetacored gentx operator 1000000000000000000000azeta --chain-id=$CHAINID --keyring-backend=$KEYRING @@ -151,36 +151,36 @@ then sed -i -e "/persistent_peers =/s/=.*/= \"$pps\"/" "$HOME"/.zetacored/config/config.toml fi -mkdir -p $DAEMON_HOME/zetavisor/genesis/bin -mkdir -p $DAEMON_HOME/zetavisor/upgrades/"$UpgradeName"/bin +mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin +mkdir -p $DAEMON_HOME/cosmovisor/upgrades/"$UpgradeName"/bin -# Setup zetavisor +# Setup cosmovisor # Genesis -cp $GOPATH/bin/old/zetacored $DAEMON_HOME/zetavisor/genesis/bin -cp $GOPATH/bin/zetaclientd $DAEMON_HOME/zetavisor/genesis/bin +cp $GOPATH/bin/old/zetacored $DAEMON_HOME/cosmovisor/genesis/bin +cp $GOPATH/bin/zetaclientd $DAEMON_HOME/cosmovisor/genesis/bin #Upgrades -cp $GOPATH/bin/new/zetacored $DAEMON_HOME/zetavisor/upgrades/$UpgradeName/bin/ +cp $GOPATH/bin/new/zetacored $DAEMON_HOME/cosmovisor/upgrades/$UpgradeName/bin/ #Permissions -chmod +x $DAEMON_HOME/zetavisor/genesis/bin/zetacored -chmod +x $DAEMON_HOME/zetavisor/genesis/bin/zetaclientd -chmod +x $DAEMON_HOME/zetavisor/upgrades/$UpgradeName/bin/zetacored +chmod +x $DAEMON_HOME/cosmovisor/genesis/bin/zetacored +chmod +x $DAEMON_HOME/cosmovisor/genesis/bin/zetaclientd +chmod +x $DAEMON_HOME/cosmovisor/upgrades/$UpgradeName/bin/zetacored # 7 Start the nodes -zetavisor start --pruning=nothing --minimum-gas-prices=0.0001azeta --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable --home /root/.zetacored >> zetanode.log 2>&1 & +cosmovisor run start --pruning=nothing --minimum-gas-prices=0.0001azeta --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable --home /root/.zetacored >> zetanode.log 2>&1 & sleep 20 echo if [ $HOSTNAME = "zetacore0" ] then -/root/.zetacored/zetavisor/current/bin/zetacored tx gov submit-legacy-proposal software-upgrade $UpgradeName --from hotkey --deposit 100000000azeta --upgrade-height 400 --title $UpgradeName --description $UpgradeName --keyring-backend test --chain-id $CHAINID --yes --no-validate --fees=200azeta --broadcast-mode block +/root/.zetacored/cosmovisor/genesis/bin/zetacored tx gov submit-legacy-proposal software-upgrade $UpgradeName --from hotkey --deposit 100000000azeta --upgrade-height 180 --title $UpgradeName --description $UpgradeName --keyring-backend test --chain-id $CHAINID --yes --no-validate --fees=200azeta --broadcast-mode block fi sleep 8 -/root/.zetacored/zetavisor/current/bin/zetacored tx gov vote 1 yes --from operator --keyring-backend test --chain-id $CHAINID --yes --fees=200azeta --broadcast-mode block +/root/.zetacored/cosmovisor/genesis/bin/zetacored tx gov vote 1 yes --from operator --keyring-backend test --chain-id $CHAINID --yes --fees=200azeta --broadcast-mode block sleep 7 -/root/.zetacored/zetavisor/current/bin/zetacored query gov proposal 1 +/root/.zetacored/cosmovisor/genesis/bin/zetacored query gov proposal 1 tail -f zetanode.log \ No newline at end of file diff --git a/contrib/localnet/scripts/genesis-upgrade.sh b/contrib/localnet/scripts/genesis-upgrade.sh index 489d4f01b5..7e01983e66 100755 --- a/contrib/localnet/scripts/genesis-upgrade.sh +++ b/contrib/localnet/scripts/genesis-upgrade.sh @@ -88,6 +88,11 @@ then cat $HOME/.zetacored/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="500000000"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json cat $HOME/.zetacored/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="100s"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json + # set admin account + zetacored add-genesis-account zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk 100000000000000000000000000azeta + zetacored add-genesis-account zeta1n0rn6sne54hv7w2uu93fl48ncyqz97d3kty6sh 100000000000000000000000000azeta # Funds the localnet_gov_admin account + cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][0]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json + cat $HOME/.zetacored/config/genesis.json | jq '.app_state["observer"]["params"]["admin_policy"][1]["address"]="zeta1srsq755t654agc0grpxj4y3w0znktrpr9tcdgk"' > $HOME/.zetacored/config/tmp_genesis.json && mv $HOME/.zetacored/config/tmp_genesis.json $HOME/.zetacored/config/genesis.json # 3. Copy the genesis.json to all the nodes .And use it to create a gentx for every node zetacored gentx operator 1000000000000000000000azeta --chain-id=$CHAINID --keyring-backend=$KEYRING diff --git a/contrib/localnet/scripts/start-zetaclientd-background.sh b/contrib/localnet/scripts/start-zetaclientd-background.sh index 76726958cc..74ee897fdf 100644 --- a/contrib/localnet/scripts/start-zetaclientd-background.sh +++ b/contrib/localnet/scripts/start-zetaclientd-background.sh @@ -7,8 +7,6 @@ HOSTNAME=$(hostname) cp /root/preparams/PreParams_$HOSTNAME.json /root/preParams.json num=$(echo $HOSTNAME | tr -dc '0-9') node="zetacore$num" -#mv /root/zetacored/zetacored_$node /root/.zetacored -#mv /root/tss/$HOSTNAME /root/.tss echo "Wait for zetacore to exchange genesis file" sleep 30 @@ -20,13 +18,17 @@ if [ $HOSTNAME == "zetaclient0" ] then rm ~/.tss/* MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) - zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" + zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" zetaclientd start > $HOME/zetaclient.log 2>&1 & else num=$(echo $HOSTNAME | tr -dc '0-9') node="zetacore$num" MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) - SEED=$(curl --retry 10 --retry-delay 5 --retry-connrefused -s zetaclient0:8123/p2p) + SEED="" + while [ -z "$SEED" ] + do + SEED=$(curl --retry 10 --retry-delay 5 --retry-connrefused -s zetaclient0:8123/p2p) + done rm ~/.tss/* zetaclientd init --peer /ip4/172.20.0.21/tcp/6668/p2p/"$SEED" --zetacore-url "$node" --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --log-level 0 zetaclientd start > $HOME/zetaclient.log 2>&1 & diff --git a/contrib/localnet/scripts/start-zetaclientd-genesis.sh b/contrib/localnet/scripts/start-zetaclientd-genesis.sh index 1109acaf37..7c23cd0673 100755 --- a/contrib/localnet/scripts/start-zetaclientd-genesis.sh +++ b/contrib/localnet/scripts/start-zetaclientd-genesis.sh @@ -13,8 +13,6 @@ fi cp /root/preparams/PreParams_$HOSTNAME.json /root/preParams.json num=$(echo $HOSTNAME | tr -dc '0-9') node="zetacore$num" -#mv /root/zetacored/zetacored_$node /root/.zetacored -#mv /root/tss/$HOSTNAME /root/.tss echo "Wait for zetacore to exchange genesis file" sleep 40 @@ -26,7 +24,7 @@ if [ $HOSTNAME == "zetaclient0" ] then rm ~/.tss/* MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) - zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --keyring-backend "$BACKEND" + zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --keyring-backend "$BACKEND" zetaclientd start else num=$(echo $HOSTNAME | tr -dc '0-9') diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 6d8b1c4e18..cb87e0dfc4 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -26696,6 +26696,25 @@ paths: type: string tags: - Query + /zeta-chain/crosschain/get_tss_address: + get: + summary: |- + GetTssAddress queries the tss address of the module. + Deprecated: Moved to observer + TODO: remove after v12 once upgrade testing is no longer needed with v11 + https://github.com/zeta-chain/node/issues/1547 + operationId: Query_GetTssAddress + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/zetacorecrosschainQueryGetTssAddressResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Query /zeta-chain/crosschain/in_tx_hash_to_cctx_data/{inTxHash}: get: summary: Queries a InTxHashToCctx data by index. @@ -27806,7 +27825,7 @@ paths: "200": description: A successful response. schema: - $ref: '#/definitions/observerQueryGetTssAddressResponse' + $ref: '#/definitions/zetacoreobserverQueryGetTssAddressResponse' default: description: An unexpected error response. schema: @@ -51622,13 +51641,6 @@ definitions: type: string btc: type: string - observerQueryGetTssAddressResponse: - type: object - properties: - eth: - type: string - btc: - type: string observerQueryHasVotedResponse: type: object properties: @@ -51788,6 +51800,17 @@ definitions: enabled: type: boolean description: Params defines the parameters for the module. + zetacorecrosschainQueryGetTssAddressResponse: + type: object + properties: + eth: + type: string + btc: + type: string + title: |- + Deprecated: Moved to observer + TODO: remove after v12 once upgrade testing is no longer needed with v11 + https://github.com/zeta-chain/node/issues/1547 zetacorecrosschainQueryParamsResponse: type: object properties: @@ -51862,6 +51885,13 @@ definitions: type: string format: int64 description: Params defines the parameters for the module. + zetacoreobserverQueryGetTssAddressResponse: + type: object + properties: + eth: + type: string + btc: + type: string zetacoreobserverQueryParamsResponse: type: object properties: diff --git a/proto/crosschain/query.proto b/proto/crosschain/query.proto index c9eee26378..0df9d8a0b7 100644 --- a/proto/crosschain/query.proto +++ b/proto/crosschain/query.proto @@ -16,6 +16,14 @@ option go_package = "github.com/zeta-chain/zetacore/x/crosschain/types"; // Query defines the gRPC querier service. service Query { + // GetTssAddress queries the tss address of the module. + // Deprecated: Moved to observer + // TODO: remove after v12 once upgrade testing is no longer needed with v11 + // https://github.com/zeta-chain/node/issues/1547 + rpc GetTssAddress(QueryGetTssAddressRequest) returns (QueryGetTssAddressResponse) { + option (google.api.http).get = "/zeta-chain/crosschain/get_tss_address"; + } + // Parameters queries the parameters of the module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/zeta-chain/crosschain/params"; @@ -114,6 +122,19 @@ service Query { } } +// Deprecated: Moved to observer +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +// https://github.com/zeta-chain/node/issues/1547 +message QueryGetTssAddressRequest {} + +// Deprecated: Moved to observer +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +// https://github.com/zeta-chain/node/issues/1547 +message QueryGetTssAddressResponse { + string eth = 1; + string btc = 2; +} + message QueryZetaAccountingRequest {} message QueryZetaAccountingResponse { diff --git a/typescript/crosschain/query_pb.d.ts b/typescript/crosschain/query_pb.d.ts index 17bb54ef27..52d504e4e4 100644 --- a/typescript/crosschain/query_pb.d.ts +++ b/typescript/crosschain/query_pb.d.ts @@ -14,6 +14,62 @@ import type { CrossChainTx } from "./cross_chain_tx_pb.js"; import type { GasPrice } from "./gas_price_pb.js"; import type { LastBlockHeight } from "./last_block_height_pb.js"; +/** + * Deprecated: Moved to observer + * TODO: remove after v12 once upgrade testing is no longer needed with v11 + * https://github.com/zeta-chain/node/issues/1547 + * + * @generated from message zetachain.zetacore.crosschain.QueryGetTssAddressRequest + */ +export declare class QueryGetTssAddressRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.QueryGetTssAddressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryGetTssAddressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryGetTssAddressRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryGetTssAddressRequest; + + static equals(a: QueryGetTssAddressRequest | PlainMessage | undefined, b: QueryGetTssAddressRequest | PlainMessage | undefined): boolean; +} + +/** + * Deprecated: Moved to observer + * TODO: remove after v12 once upgrade testing is no longer needed with v11 + * https://github.com/zeta-chain/node/issues/1547 + * + * @generated from message zetachain.zetacore.crosschain.QueryGetTssAddressResponse + */ +export declare class QueryGetTssAddressResponse extends Message { + /** + * @generated from field: string eth = 1; + */ + eth: string; + + /** + * @generated from field: string btc = 2; + */ + btc: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.crosschain.QueryGetTssAddressResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryGetTssAddressResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryGetTssAddressResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryGetTssAddressResponse; + + static equals(a: QueryGetTssAddressResponse | PlainMessage | undefined, b: QueryGetTssAddressResponse | PlainMessage | undefined): boolean; +} + /** * @generated from message zetachain.zetacore.crosschain.QueryZetaAccountingRequest */ diff --git a/x/crosschain/keeper/grpc_query.go b/x/crosschain/keeper/grpc_query.go index 720f65c8f7..3b2d06620e 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -1,7 +1,19 @@ package keeper import ( + "context" + "github.com/zeta-chain/zetacore/x/crosschain/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) var _ types.QueryServer = Keeper{} + +// GetTssAddress returns the tss address +// Deprecated: GetTssAddress returns the tss address +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +// https://github.com/zeta-chain/node/issues/1547 +func (k Keeper) GetTssAddress(_ context.Context, _ *types.QueryGetTssAddressRequest) (*types.QueryGetTssAddressResponse, error) { + return nil, status.Error(codes.Unimplemented, "Deprecated") +} diff --git a/x/crosschain/types/query.pb.go b/x/crosschain/types/query.pb.go index 7273180766..e2dc8505bf 100644 --- a/x/crosschain/types/query.pb.go +++ b/x/crosschain/types/query.pb.go @@ -31,6 +31,100 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Deprecated: Moved to observer +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +// https://github.com/zeta-chain/node/issues/1547 +type QueryGetTssAddressRequest struct { +} + +func (m *QueryGetTssAddressRequest) Reset() { *m = QueryGetTssAddressRequest{} } +func (m *QueryGetTssAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetTssAddressRequest) ProtoMessage() {} +func (*QueryGetTssAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_65a992045e92a606, []int{0} +} +func (m *QueryGetTssAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetTssAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetTssAddressRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetTssAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetTssAddressRequest.Merge(m, src) +} +func (m *QueryGetTssAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetTssAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetTssAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetTssAddressRequest proto.InternalMessageInfo + +// Deprecated: Moved to observer +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +// https://github.com/zeta-chain/node/issues/1547 +type QueryGetTssAddressResponse struct { + Eth string `protobuf:"bytes,1,opt,name=eth,proto3" json:"eth,omitempty"` + Btc string `protobuf:"bytes,2,opt,name=btc,proto3" json:"btc,omitempty"` +} + +func (m *QueryGetTssAddressResponse) Reset() { *m = QueryGetTssAddressResponse{} } +func (m *QueryGetTssAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetTssAddressResponse) ProtoMessage() {} +func (*QueryGetTssAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_65a992045e92a606, []int{1} +} +func (m *QueryGetTssAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetTssAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetTssAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetTssAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetTssAddressResponse.Merge(m, src) +} +func (m *QueryGetTssAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetTssAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetTssAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetTssAddressResponse proto.InternalMessageInfo + +func (m *QueryGetTssAddressResponse) GetEth() string { + if m != nil { + return m.Eth + } + return "" +} + +func (m *QueryGetTssAddressResponse) GetBtc() string { + if m != nil { + return m.Btc + } + return "" +} + type QueryZetaAccountingRequest struct { } @@ -38,7 +132,7 @@ func (m *QueryZetaAccountingRequest) Reset() { *m = QueryZetaAccountingR func (m *QueryZetaAccountingRequest) String() string { return proto.CompactTextString(m) } func (*QueryZetaAccountingRequest) ProtoMessage() {} func (*QueryZetaAccountingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{0} + return fileDescriptor_65a992045e92a606, []int{2} } func (m *QueryZetaAccountingRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -75,7 +169,7 @@ func (m *QueryZetaAccountingResponse) Reset() { *m = QueryZetaAccounting func (m *QueryZetaAccountingResponse) String() string { return proto.CompactTextString(m) } func (*QueryZetaAccountingResponse) ProtoMessage() {} func (*QueryZetaAccountingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{1} + return fileDescriptor_65a992045e92a606, []int{3} } func (m *QueryZetaAccountingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -119,7 +213,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{2} + return fileDescriptor_65a992045e92a606, []int{4} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +252,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{3} + return fileDescriptor_65a992045e92a606, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -203,7 +297,7 @@ func (m *QueryGetOutTxTrackerRequest) Reset() { *m = QueryGetOutTxTracke func (m *QueryGetOutTxTrackerRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetOutTxTrackerRequest) ProtoMessage() {} func (*QueryGetOutTxTrackerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{4} + return fileDescriptor_65a992045e92a606, []int{6} } func (m *QueryGetOutTxTrackerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,7 +348,7 @@ func (m *QueryGetOutTxTrackerResponse) Reset() { *m = QueryGetOutTxTrack func (m *QueryGetOutTxTrackerResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetOutTxTrackerResponse) ProtoMessage() {} func (*QueryGetOutTxTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{5} + return fileDescriptor_65a992045e92a606, []int{7} } func (m *QueryGetOutTxTrackerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +392,7 @@ func (m *QueryAllOutTxTrackerRequest) Reset() { *m = QueryAllOutTxTracke func (m *QueryAllOutTxTrackerRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllOutTxTrackerRequest) ProtoMessage() {} func (*QueryAllOutTxTrackerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{6} + return fileDescriptor_65a992045e92a606, []int{8} } func (m *QueryAllOutTxTrackerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,7 +437,7 @@ func (m *QueryAllOutTxTrackerResponse) Reset() { *m = QueryAllOutTxTrack func (m *QueryAllOutTxTrackerResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllOutTxTrackerResponse) ProtoMessage() {} func (*QueryAllOutTxTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{7} + return fileDescriptor_65a992045e92a606, []int{9} } func (m *QueryAllOutTxTrackerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -395,7 +489,7 @@ func (m *QueryAllOutTxTrackerByChainRequest) Reset() { *m = QueryAllOutT func (m *QueryAllOutTxTrackerByChainRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllOutTxTrackerByChainRequest) ProtoMessage() {} func (*QueryAllOutTxTrackerByChainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{8} + return fileDescriptor_65a992045e92a606, []int{10} } func (m *QueryAllOutTxTrackerByChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -447,7 +541,7 @@ func (m *QueryAllOutTxTrackerByChainResponse) Reset() { *m = QueryAllOut func (m *QueryAllOutTxTrackerByChainResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllOutTxTrackerByChainResponse) ProtoMessage() {} func (*QueryAllOutTxTrackerByChainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{9} + return fileDescriptor_65a992045e92a606, []int{11} } func (m *QueryAllOutTxTrackerByChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +593,7 @@ func (m *QueryAllInTxTrackerByChainRequest) Reset() { *m = QueryAllInTxT func (m *QueryAllInTxTrackerByChainRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllInTxTrackerByChainRequest) ProtoMessage() {} func (*QueryAllInTxTrackerByChainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{10} + return fileDescriptor_65a992045e92a606, []int{12} } func (m *QueryAllInTxTrackerByChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,7 +645,7 @@ func (m *QueryAllInTxTrackerByChainResponse) Reset() { *m = QueryAllInTx func (m *QueryAllInTxTrackerByChainResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllInTxTrackerByChainResponse) ProtoMessage() {} func (*QueryAllInTxTrackerByChainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{11} + return fileDescriptor_65a992045e92a606, []int{13} } func (m *QueryAllInTxTrackerByChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -602,7 +696,7 @@ func (m *QueryAllInTxTrackersRequest) Reset() { *m = QueryAllInTxTracker func (m *QueryAllInTxTrackersRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllInTxTrackersRequest) ProtoMessage() {} func (*QueryAllInTxTrackersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{12} + return fileDescriptor_65a992045e92a606, []int{14} } func (m *QueryAllInTxTrackersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -647,7 +741,7 @@ func (m *QueryAllInTxTrackersResponse) Reset() { *m = QueryAllInTxTracke func (m *QueryAllInTxTrackersResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllInTxTrackersResponse) ProtoMessage() {} func (*QueryAllInTxTrackersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{13} + return fileDescriptor_65a992045e92a606, []int{15} } func (m *QueryAllInTxTrackersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -698,7 +792,7 @@ func (m *QueryGetInTxHashToCctxRequest) Reset() { *m = QueryGetInTxHashT func (m *QueryGetInTxHashToCctxRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetInTxHashToCctxRequest) ProtoMessage() {} func (*QueryGetInTxHashToCctxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{14} + return fileDescriptor_65a992045e92a606, []int{16} } func (m *QueryGetInTxHashToCctxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -742,7 +836,7 @@ func (m *QueryGetInTxHashToCctxResponse) Reset() { *m = QueryGetInTxHash func (m *QueryGetInTxHashToCctxResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetInTxHashToCctxResponse) ProtoMessage() {} func (*QueryGetInTxHashToCctxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{15} + return fileDescriptor_65a992045e92a606, []int{17} } func (m *QueryGetInTxHashToCctxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -786,7 +880,7 @@ func (m *QueryInTxHashToCctxDataRequest) Reset() { *m = QueryInTxHashToC func (m *QueryInTxHashToCctxDataRequest) String() string { return proto.CompactTextString(m) } func (*QueryInTxHashToCctxDataRequest) ProtoMessage() {} func (*QueryInTxHashToCctxDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{16} + return fileDescriptor_65a992045e92a606, []int{18} } func (m *QueryInTxHashToCctxDataRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -830,7 +924,7 @@ func (m *QueryInTxHashToCctxDataResponse) Reset() { *m = QueryInTxHashTo func (m *QueryInTxHashToCctxDataResponse) String() string { return proto.CompactTextString(m) } func (*QueryInTxHashToCctxDataResponse) ProtoMessage() {} func (*QueryInTxHashToCctxDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{17} + return fileDescriptor_65a992045e92a606, []int{19} } func (m *QueryInTxHashToCctxDataResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -874,7 +968,7 @@ func (m *QueryAllInTxHashToCctxRequest) Reset() { *m = QueryAllInTxHashT func (m *QueryAllInTxHashToCctxRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllInTxHashToCctxRequest) ProtoMessage() {} func (*QueryAllInTxHashToCctxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{18} + return fileDescriptor_65a992045e92a606, []int{20} } func (m *QueryAllInTxHashToCctxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -919,7 +1013,7 @@ func (m *QueryAllInTxHashToCctxResponse) Reset() { *m = QueryAllInTxHash func (m *QueryAllInTxHashToCctxResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllInTxHashToCctxResponse) ProtoMessage() {} func (*QueryAllInTxHashToCctxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{19} + return fileDescriptor_65a992045e92a606, []int{21} } func (m *QueryAllInTxHashToCctxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -970,7 +1064,7 @@ func (m *QueryGetGasPriceRequest) Reset() { *m = QueryGetGasPriceRequest func (m *QueryGetGasPriceRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetGasPriceRequest) ProtoMessage() {} func (*QueryGetGasPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{20} + return fileDescriptor_65a992045e92a606, []int{22} } func (m *QueryGetGasPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1014,7 +1108,7 @@ func (m *QueryGetGasPriceResponse) Reset() { *m = QueryGetGasPriceRespon func (m *QueryGetGasPriceResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetGasPriceResponse) ProtoMessage() {} func (*QueryGetGasPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{21} + return fileDescriptor_65a992045e92a606, []int{23} } func (m *QueryGetGasPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1058,7 +1152,7 @@ func (m *QueryAllGasPriceRequest) Reset() { *m = QueryAllGasPriceRequest func (m *QueryAllGasPriceRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllGasPriceRequest) ProtoMessage() {} func (*QueryAllGasPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{22} + return fileDescriptor_65a992045e92a606, []int{24} } func (m *QueryAllGasPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1103,7 +1197,7 @@ func (m *QueryAllGasPriceResponse) Reset() { *m = QueryAllGasPriceRespon func (m *QueryAllGasPriceResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllGasPriceResponse) ProtoMessage() {} func (*QueryAllGasPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{23} + return fileDescriptor_65a992045e92a606, []int{25} } func (m *QueryAllGasPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1154,7 +1248,7 @@ func (m *QueryGetLastBlockHeightRequest) Reset() { *m = QueryGetLastBloc func (m *QueryGetLastBlockHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetLastBlockHeightRequest) ProtoMessage() {} func (*QueryGetLastBlockHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{24} + return fileDescriptor_65a992045e92a606, []int{26} } func (m *QueryGetLastBlockHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1198,7 +1292,7 @@ func (m *QueryGetLastBlockHeightResponse) Reset() { *m = QueryGetLastBlo func (m *QueryGetLastBlockHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetLastBlockHeightResponse) ProtoMessage() {} func (*QueryGetLastBlockHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{25} + return fileDescriptor_65a992045e92a606, []int{27} } func (m *QueryGetLastBlockHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1242,7 +1336,7 @@ func (m *QueryAllLastBlockHeightRequest) Reset() { *m = QueryAllLastBloc func (m *QueryAllLastBlockHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllLastBlockHeightRequest) ProtoMessage() {} func (*QueryAllLastBlockHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{26} + return fileDescriptor_65a992045e92a606, []int{28} } func (m *QueryAllLastBlockHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1287,7 +1381,7 @@ func (m *QueryAllLastBlockHeightResponse) Reset() { *m = QueryAllLastBlo func (m *QueryAllLastBlockHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllLastBlockHeightResponse) ProtoMessage() {} func (*QueryAllLastBlockHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{27} + return fileDescriptor_65a992045e92a606, []int{29} } func (m *QueryAllLastBlockHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1338,7 +1432,7 @@ func (m *QueryGetCctxRequest) Reset() { *m = QueryGetCctxRequest{} } func (m *QueryGetCctxRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCctxRequest) ProtoMessage() {} func (*QueryGetCctxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{28} + return fileDescriptor_65a992045e92a606, []int{30} } func (m *QueryGetCctxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1383,7 +1477,7 @@ func (m *QueryGetCctxByNonceRequest) Reset() { *m = QueryGetCctxByNonceR func (m *QueryGetCctxByNonceRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetCctxByNonceRequest) ProtoMessage() {} func (*QueryGetCctxByNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{29} + return fileDescriptor_65a992045e92a606, []int{31} } func (m *QueryGetCctxByNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1434,7 +1528,7 @@ func (m *QueryGetCctxResponse) Reset() { *m = QueryGetCctxResponse{} } func (m *QueryGetCctxResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetCctxResponse) ProtoMessage() {} func (*QueryGetCctxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{30} + return fileDescriptor_65a992045e92a606, []int{32} } func (m *QueryGetCctxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1478,7 +1572,7 @@ func (m *QueryAllCctxRequest) Reset() { *m = QueryAllCctxRequest{} } func (m *QueryAllCctxRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllCctxRequest) ProtoMessage() {} func (*QueryAllCctxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{31} + return fileDescriptor_65a992045e92a606, []int{33} } func (m *QueryAllCctxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1523,7 +1617,7 @@ func (m *QueryAllCctxResponse) Reset() { *m = QueryAllCctxResponse{} } func (m *QueryAllCctxResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllCctxResponse) ProtoMessage() {} func (*QueryAllCctxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{32} + return fileDescriptor_65a992045e92a606, []int{34} } func (m *QueryAllCctxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1575,7 +1669,7 @@ func (m *QueryListCctxPendingRequest) Reset() { *m = QueryListCctxPendin func (m *QueryListCctxPendingRequest) String() string { return proto.CompactTextString(m) } func (*QueryListCctxPendingRequest) ProtoMessage() {} func (*QueryListCctxPendingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{33} + return fileDescriptor_65a992045e92a606, []int{35} } func (m *QueryListCctxPendingRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1627,7 +1721,7 @@ func (m *QueryListCctxPendingResponse) Reset() { *m = QueryListCctxPendi func (m *QueryListCctxPendingResponse) String() string { return proto.CompactTextString(m) } func (*QueryListCctxPendingResponse) ProtoMessage() {} func (*QueryListCctxPendingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{34} + return fileDescriptor_65a992045e92a606, []int{36} } func (m *QueryListCctxPendingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1677,7 +1771,7 @@ func (m *QueryLastZetaHeightRequest) Reset() { *m = QueryLastZetaHeightR func (m *QueryLastZetaHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryLastZetaHeightRequest) ProtoMessage() {} func (*QueryLastZetaHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{35} + return fileDescriptor_65a992045e92a606, []int{37} } func (m *QueryLastZetaHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1714,7 +1808,7 @@ func (m *QueryLastZetaHeightResponse) Reset() { *m = QueryLastZetaHeight func (m *QueryLastZetaHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryLastZetaHeightResponse) ProtoMessage() {} func (*QueryLastZetaHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{36} + return fileDescriptor_65a992045e92a606, []int{38} } func (m *QueryLastZetaHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1759,7 +1853,7 @@ func (m *QueryConvertGasToZetaRequest) Reset() { *m = QueryConvertGasToZ func (m *QueryConvertGasToZetaRequest) String() string { return proto.CompactTextString(m) } func (*QueryConvertGasToZetaRequest) ProtoMessage() {} func (*QueryConvertGasToZetaRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{37} + return fileDescriptor_65a992045e92a606, []int{39} } func (m *QueryConvertGasToZetaRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1812,7 +1906,7 @@ func (m *QueryConvertGasToZetaResponse) Reset() { *m = QueryConvertGasTo func (m *QueryConvertGasToZetaResponse) String() string { return proto.CompactTextString(m) } func (*QueryConvertGasToZetaResponse) ProtoMessage() {} func (*QueryConvertGasToZetaResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{38} + return fileDescriptor_65a992045e92a606, []int{40} } func (m *QueryConvertGasToZetaResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1869,7 +1963,7 @@ func (m *QueryMessagePassingProtocolFeeRequest) Reset() { *m = QueryMess func (m *QueryMessagePassingProtocolFeeRequest) String() string { return proto.CompactTextString(m) } func (*QueryMessagePassingProtocolFeeRequest) ProtoMessage() {} func (*QueryMessagePassingProtocolFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{39} + return fileDescriptor_65a992045e92a606, []int{41} } func (m *QueryMessagePassingProtocolFeeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1908,7 +2002,7 @@ func (m *QueryMessagePassingProtocolFeeResponse) Reset() { func (m *QueryMessagePassingProtocolFeeResponse) String() string { return proto.CompactTextString(m) } func (*QueryMessagePassingProtocolFeeResponse) ProtoMessage() {} func (*QueryMessagePassingProtocolFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_65a992045e92a606, []int{40} + return fileDescriptor_65a992045e92a606, []int{42} } func (m *QueryMessagePassingProtocolFeeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1945,6 +2039,8 @@ func (m *QueryMessagePassingProtocolFeeResponse) GetFeeInZeta() string { } func init() { + proto.RegisterType((*QueryGetTssAddressRequest)(nil), "zetachain.zetacore.crosschain.QueryGetTssAddressRequest") + proto.RegisterType((*QueryGetTssAddressResponse)(nil), "zetachain.zetacore.crosschain.QueryGetTssAddressResponse") proto.RegisterType((*QueryZetaAccountingRequest)(nil), "zetachain.zetacore.crosschain.QueryZetaAccountingRequest") proto.RegisterType((*QueryZetaAccountingResponse)(nil), "zetachain.zetacore.crosschain.QueryZetaAccountingResponse") proto.RegisterType((*QueryParamsRequest)(nil), "zetachain.zetacore.crosschain.QueryParamsRequest") @@ -1991,119 +2087,124 @@ func init() { func init() { proto.RegisterFile("crosschain/query.proto", fileDescriptor_65a992045e92a606) } var fileDescriptor_65a992045e92a606 = []byte{ - // 1782 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xdf, 0x6f, 0x14, 0x55, - 0x14, 0xee, 0xed, 0xd2, 0x52, 0x6e, 0x0b, 0x95, 0x4b, 0x85, 0x3a, 0xb4, 0x5b, 0x98, 0x5a, 0x5a, - 0xc1, 0xee, 0xd0, 0x02, 0x45, 0xa0, 0x18, 0xb7, 0x45, 0x0a, 0xb1, 0x40, 0xdd, 0xd4, 0x68, 0x30, - 0x66, 0x73, 0x3b, 0x3b, 0xce, 0x4e, 0x98, 0xce, 0x94, 0x9d, 0x59, 0xd2, 0xd2, 0xf4, 0x85, 0x07, - 0x5f, 0x7c, 0x31, 0x21, 0xd1, 0x17, 0x5f, 0x8d, 0x3e, 0xf8, 0xe0, 0x83, 0xd1, 0x07, 0x13, 0x8c, - 0x51, 0x91, 0x47, 0x12, 0x13, 0x63, 0x34, 0x31, 0x06, 0xfc, 0x43, 0xcc, 0xdc, 0x39, 0xb3, 0x7b, - 0xe7, 0xd7, 0xee, 0xed, 0x76, 0x79, 0xe0, 0xa9, 0x3b, 0x73, 0xef, 0x39, 0xe7, 0xfb, 0xbe, 0xfb, - 0x63, 0xce, 0x39, 0xc5, 0x07, 0xd5, 0x8a, 0xed, 0x38, 0x6a, 0x99, 0x1a, 0x96, 0x72, 0xbb, 0xaa, - 0x55, 0x36, 0x72, 0x6b, 0x15, 0xdb, 0xb5, 0xc9, 0xf0, 0x5d, 0xcd, 0xa5, 0xec, 0x75, 0x8e, 0xfd, - 0xb2, 0x2b, 0x5a, 0xae, 0x3e, 0x55, 0x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0x58, 0xb4, 0x06, 0xf6, 0x0c, 0x03, 0xab, - 0x90, 0xc9, 0x86, 0x60, 0x63, 0xc9, 0xf5, 0x67, 0x08, 0xef, 0x0e, 0xbe, 0x40, 0xd3, 0x82, 0x2b, - 0xba, 0x6d, 0x61, 0x23, 0x1d, 0x08, 0x79, 0x94, 0x61, 0x1d, 0x26, 0x87, 0x1b, 0x60, 0xf5, 0x32, - 0xb0, 0x7e, 0xcf, 0xca, 0xab, 0xdd, 0xa1, 0x74, 0x16, 0x4b, 0xc1, 0x92, 0xbb, 0x07, 0x62, 0x29, - 0x58, 0x4a, 0xa3, 0xa0, 0xe9, 0xcd, 0xa1, 0xd6, 0x6d, 0x58, 0xea, 0x18, 0xfe, 0x9f, 0xba, 0xd8, - 0x66, 0x48, 0xfc, 0x2f, 0xbd, 0x74, 0xbe, 0x15, 0x53, 0xc1, 0xaf, 0xfa, 0xdd, 0x30, 0x4a, 0x0f, - 0x78, 0xb8, 0xed, 0x20, 0x06, 0x3c, 0xb1, 0x91, 0x21, 0x06, 0x3c, 0xb9, 0xcb, 0xd1, 0x14, 0xb8, - 0x19, 0x32, 0x9b, 0x7b, 0xeb, 0xd1, 0x93, 0x2c, 0x7a, 0xfc, 0x24, 0x8b, 0xfe, 0x7d, 0x92, 0x45, - 0x9f, 0x3c, 0xcd, 0x76, 0x3c, 0x7e, 0x9a, 0xed, 0xf8, 0xf3, 0x69, 0xb6, 0xe3, 0xe6, 0x94, 0x6e, - 0xb8, 0xe5, 0xea, 0x4a, 0x4e, 0xb5, 0x57, 0x79, 0x57, 0x01, 0x1e, 0x65, 0x9d, 0xf7, 0xea, 0x6e, - 0xac, 0x69, 0xce, 0x4a, 0x37, 0xfb, 0x0a, 0x9c, 0xfa, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x77, - 0x46, 0x98, 0xb4, 0x22, 0x00, 0x00, + // 1860 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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xb7, 0xad, 0xba, 0x0a, 0xf1, 0xe4, 0x77, 0x55, 0xaf, 0x62, 0x6f, 0x87, + 0xf1, 0xf2, 0xb0, 0xbc, 0x05, 0xbe, 0xfc, 0x2a, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xad, 0xe9, 0xc2, + 0xca, 0x23, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2118,6 +2219,11 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { + // GetTssAddress queries the tss address of the module. + // Deprecated: Moved to observer + // TODO: remove after v12 once upgrade testing is no longer needed with v11 + // https://github.com/zeta-chain/node/issues/1547 + GetTssAddress(ctx context.Context, in *QueryGetTssAddressRequest, opts ...grpc.CallOption) (*QueryGetTssAddressResponse, error) // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a OutTxTracker by index. @@ -2164,6 +2270,15 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } +func (c *queryClient) GetTssAddress(ctx context.Context, in *QueryGetTssAddressRequest, opts ...grpc.CallOption) (*QueryGetTssAddressResponse, error) { + out := new(QueryGetTssAddressResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.crosschain.Query/GetTssAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/zetachain.zetacore.crosschain.Query/Params", in, out, opts...) @@ -2355,6 +2470,11 @@ func (c *queryClient) LastZetaHeight(ctx context.Context, in *QueryLastZetaHeigh // QueryServer is the server API for Query service. type QueryServer interface { + // GetTssAddress queries the tss address of the module. + // Deprecated: Moved to observer + // TODO: remove after v12 once upgrade testing is no longer needed with v11 + // https://github.com/zeta-chain/node/issues/1547 + GetTssAddress(context.Context, *QueryGetTssAddressRequest) (*QueryGetTssAddressResponse, error) // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a OutTxTracker by index. @@ -2397,6 +2517,9 @@ type QueryServer interface { type UnimplementedQueryServer struct { } +func (*UnimplementedQueryServer) GetTssAddress(ctx context.Context, req *QueryGetTssAddressRequest) (*QueryGetTssAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTssAddress not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -2465,6 +2588,24 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } +func _Query_GetTssAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetTssAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetTssAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.crosschain.Query/GetTssAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetTssAddress(ctx, req.(*QueryGetTssAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -2847,6 +2988,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "zetachain.zetacore.crosschain.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "GetTssAddress", + Handler: _Query_GetTssAddress_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -2936,6 +3081,66 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "crosschain/query.proto", } +func (m *QueryGetTssAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetTssAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetTssAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryGetTssAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetTssAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetTssAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Btc) > 0 { + i -= len(m.Btc) + copy(dAtA[i:], m.Btc) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Btc))) + i-- + dAtA[i] = 0x12 + } + if len(m.Eth) > 0 { + i -= len(m.Eth) + copy(dAtA[i:], m.Eth) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Eth))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryZetaAccountingRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4418,6 +4623,32 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *QueryGetTssAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGetTssAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Eth) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Btc) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryZetaAccountingRequest) Size() (n int) { if m == nil { return 0 @@ -5011,6 +5242,170 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryGetTssAddressRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetTssAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetTssAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetTssAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetTssAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetTssAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Eth", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Eth = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Btc", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Btc = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryZetaAccountingRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/crosschain/types/query.pb.gw.go b/x/crosschain/types/query.pb.gw.go index 3e7f8b97c6..d7c90c4180 100644 --- a/x/crosschain/types/query.pb.gw.go +++ b/x/crosschain/types/query.pb.gw.go @@ -33,6 +33,24 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join +func request_Query_GetTssAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetTssAddressRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetTssAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetTssAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetTssAddressRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetTssAddress(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata @@ -965,6 +983,29 @@ func local_request_Query_LastZetaHeight_0(ctx context.Context, marshaler runtime // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + mux.Handle("GET", pattern_Query_GetTssAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetTssAddress_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetTssAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1489,6 +1530,26 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + mux.Handle("GET", pattern_Query_GetTssAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetTssAddress_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetTssAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1913,6 +1974,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( + pattern_Query_GetTssAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "crosschain", "get_tss_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "crosschain", "params"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_OutTxTracker_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"zeta-chain", "crosschain", "outTxTracker", "chainID", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1957,6 +2020,8 @@ var ( ) var ( + forward_Query_GetTssAddress_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_OutTxTracker_0 = runtime.ForwardResponseMessage From 431eff59dac4af8cd8311714389a70480646902a Mon Sep 17 00:00:00 2001 From: Charlie Chen <34498985+ws4charlie@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:49:43 -0600 Subject: [PATCH 3/5] fix: sanity check events of ZetaSent/ZetaReceived/ZetaReverted/Withdrawn/Deposited (#1539) * sanity check events of ZetaSent/ZetaReceived/ZetaRevertedWithdrawn/Deposited * added unit tests, comments --------- Co-authored-by: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> --- changelog.md | 1 + zetaclient/evm_client.go | 73 +++++++++++++++--------- zetaclient/inbound_tracker.go | 44 +++++++++++++-- zetaclient/utils.go | 26 +++++++++ zetaclient/utils_test.go | 102 ++++++++++++++++++++++++++++++++++ 5 files changed, 215 insertions(+), 31 deletions(-) create mode 100644 zetaclient/utils_test.go diff --git a/changelog.md b/changelog.md index 0498a869e1..9ae132349c 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,7 @@ ### Fixes +* [1537](https://github.com/zeta-chain/node/issues/1537) - Sanity check events of ZetaSent/ZetaReceived/ZetaRevertedWithdrawn/Deposited * [1530](https://github.com/zeta-chain/node/pull/1530) - Outbound tx confirmation/inclusion enhancement * [1496](https://github.com/zeta-chain/node/issues/1496) - post block header for enabled EVM chains only * [1518](https://github.com/zeta-chain/node/pull/1518) - Avoid duplicate keysign if an outTx is already pending diff --git a/zetaclient/evm_client.go b/zetaclient/evm_client.go index badce4eca6..86d4444f60 100644 --- a/zetaclient/evm_client.go +++ b/zetaclient/evm_client.go @@ -57,7 +57,12 @@ type EVMLog struct { } const ( - DonationMessage = "I am rich!" + DonationMessage = "I am rich!" + TopicsZetaSent = 3 // [signature, zetaTxSenderAddress, destinationChainId] https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ZetaConnector.base.sol#L34 + TopicsZetaReceived = 4 // [signature, sourceChainId, destinationAddress] https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ZetaConnector.base.sol#L45 + TopicsZetaReverted = 3 // [signature, destinationChainId, internalSendHash] https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ZetaConnector.base.sol#L54 + TopicsWithdrawn = 3 // [signature, recipient, asset] https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ERC20Custody.sol#L43 + TopicsDeposited = 2 // [signature, asset] https://github.com/zeta-chain/protocol-contracts/blob/d65814debf17648a6c67d757ba03646415842790/contracts/evm/ERC20Custody.sol#L42 ) // EVMChainClient represents the chain configuration for an EVM chain @@ -233,24 +238,28 @@ func (ob *EVMChainClient) GetChainParams() observertypes.ChainParams { return ob.params } -func (ob *EVMChainClient) GetConnectorContract() (*zetaconnector.ZetaConnectorNonEth, error) { +func (ob *EVMChainClient) GetConnectorContract() (ethcommon.Address, *zetaconnector.ZetaConnectorNonEth, error) { addr := ethcommon.HexToAddress(ob.GetChainParams().ConnectorContractAddress) - return FetchConnectorContract(addr, ob.evmClient) + contract, err := FetchConnectorContract(addr, ob.evmClient) + return addr, contract, err } -func (ob *EVMChainClient) GetConnectorContractEth() (*zetaconnectoreth.ZetaConnectorEth, error) { +func (ob *EVMChainClient) GetConnectorContractEth() (ethcommon.Address, *zetaconnectoreth.ZetaConnectorEth, error) { addr := ethcommon.HexToAddress(ob.GetChainParams().ConnectorContractAddress) - return FetchConnectorContractEth(addr, ob.evmClient) + contract, err := FetchConnectorContractEth(addr, ob.evmClient) + return addr, contract, err } -func (ob *EVMChainClient) GetZetaTokenNonEthContract() (*zeta.ZetaNonEth, error) { +func (ob *EVMChainClient) GetZetaTokenNonEthContract() (ethcommon.Address, *zeta.ZetaNonEth, error) { addr := ethcommon.HexToAddress(ob.GetChainParams().ZetaTokenContractAddress) - return FetchZetaZetaNonEthTokenContract(addr, ob.evmClient) + contract, err := FetchZetaZetaNonEthTokenContract(addr, ob.evmClient) + return addr, contract, err } -func (ob *EVMChainClient) GetERC20CustodyContract() (*erc20custody.ERC20Custody, error) { +func (ob *EVMChainClient) GetERC20CustodyContract() (ethcommon.Address, *erc20custody.ERC20Custody, error) { addr := ethcommon.HexToAddress(ob.GetChainParams().Erc20CustodyContractAddress) - return FetchERC20CustodyContract(addr, ob.evmClient) + contract, err := FetchERC20CustodyContract(addr, ob.evmClient) + return addr, contract, err } func FetchConnectorContract(addr ethcommon.Address, client EVMRPCClient) (*zetaconnector.ZetaConnectorNonEth, error) { @@ -378,7 +387,7 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co for _, vLog := range logs { confHeight := vLog.BlockNumber + params.ConfirmationCount // TODO rewrite this to return early if not confirmed - connector, err := ob.GetConnectorContract() + connectorAddr, connector, err := ob.GetConnectorContract() if err != nil { return false, false, fmt.Errorf("error getting connector contract: %w", err) } @@ -387,9 +396,11 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co logger.Info().Msgf("Found (outTx) sendHash %s on chain %s txhash %s", sendHash, ob.chain.String(), vLog.TxHash.Hex()) if confHeight <= ob.GetLastBlockHeight() { logger.Info().Msg("Confirmed! Sending PostConfirmation to zetacore...") - if len(vLog.Topics) != 4 { - logger.Error().Msgf("wrong number of topics in log %d", len(vLog.Topics)) - return false, false, fmt.Errorf("wrong number of topics in log %d", len(vLog.Topics)) + // sanity check tx event + err = ob.CheckEvmTxLog(vLog, connectorAddr, transaction.Hash().Hex(), TopicsZetaReceived) + if err != nil { + logger.Error().Err(err).Msgf("CheckEvmTxLog error on ZetaReceived event, chain %d nonce %d txhash %s", ob.chain.ChainId, nonce, transaction.Hash().Hex()) + return false, false, err } sendhash := vLog.Topics[3].Hex() //var rxAddress string = ethcommon.HexToAddress(vLog.Topics[1].Hex()).Hex() @@ -423,9 +434,11 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co logger.Info().Msgf("Found (revertTx) sendHash %s on chain %s txhash %s", sendHash, ob.chain.String(), vLog.TxHash.Hex()) if confHeight <= ob.GetLastBlockHeight() { logger.Info().Msg("Confirmed! Sending PostConfirmation to zetacore...") - if len(vLog.Topics) != 3 { - logger.Error().Msgf("wrong number of topics in log %d", len(vLog.Topics)) - return false, false, fmt.Errorf("wrong number of topics in log %d", len(vLog.Topics)) + // sanity check tx event + err = ob.CheckEvmTxLog(vLog, connectorAddr, transaction.Hash().Hex(), TopicsZetaReverted) + if err != nil { + logger.Error().Err(err).Msgf("CheckEvmTxLog error on ZetaReverted event, chain %d nonce %d txhash %s", ob.chain.ChainId, nonce, transaction.Hash().Hex()) + return false, false, err } sendhash := vLog.Topics[2].Hex() mMint := revertedLog.RemainingZetaValue @@ -480,7 +493,7 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co } else if cointype == common.CoinType_ERC20 { if receipt.Status == 1 { logs := receipt.Logs - ERC20Custody, err := ob.GetERC20CustodyContract() + addrCustody, ERC20Custody, err := ob.GetERC20CustodyContract() if err != nil { logger.Warn().Msgf("NewERC20Custody err: %s", err) } @@ -489,6 +502,12 @@ func (ob *EVMChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64, co confHeight := vLog.BlockNumber + params.ConfirmationCount if err == nil { logger.Info().Msgf("Found (ERC20Custody.Withdrawn Event) sendHash %s on chain %s txhash %s", sendHash, ob.chain.String(), vLog.TxHash.Hex()) + // sanity check tx event + err = ob.CheckEvmTxLog(vLog, addrCustody, transaction.Hash().Hex(), TopicsWithdrawn) + if err != nil { + logger.Error().Err(err).Msgf("CheckEvmTxLog error on Withdrawn event, chain %d nonce %d txhash %s", ob.chain.ChainId, nonce, transaction.Hash().Hex()) + return false, false, err + } if confHeight <= ob.GetLastBlockHeight() { logger.Info().Msg("Confirmed! Sending PostConfirmation to zetacore...") zetaTxHash, ballot, err := ob.zetaClient.PostReceiveConfirmation( @@ -893,7 +912,7 @@ func (ob *EVMChainClient) observeInTX(sampledLogger zerolog.Logger) error { // returns the last block successfully scanned func (ob *EVMChainClient) observeZetaSent(startBlock, toBlock uint64) uint64 { // filter ZetaSent logs - connector, err := ob.GetConnectorContract() + addrConnector, connector, err := ob.GetConnectorContract() if err != nil { ob.logger.ChainLogger.Warn().Err(err).Msgf("observeZetaSent: GetConnectorContract error:") return startBlock - 1 // lastScanned @@ -912,12 +931,14 @@ func (ob *EVMChainClient) observeZetaSent(startBlock, toBlock uint64) uint64 { // collect and sort events by block number, then tx index, then log index (ascending) events := make([]*zetaconnector.ZetaConnectorNonEthZetaSent, 0) for iter.Next() { - if !iter.Event.Raw.Removed && iter.Event.Raw.BlockNumber > 0 { // skip if chain reorg removed this event + // sanity check tx event + err := ob.CheckEvmTxLog(&iter.Event.Raw, addrConnector, "", TopicsZetaSent) + if err == nil { events = append(events, iter.Event) continue } - ob.logger.ExternalChainWatcher.Warn().Msgf("observeZetaSent: invalid event in tx %s at height %d for chain %d", - iter.Event.Raw.TxHash.Hex(), iter.Event.Raw.BlockNumber, ob.chain.ChainId) + ob.logger.ExternalChainWatcher.Warn().Err(err).Msgf("observeZetaSent: invalid ZetaSent event in tx %s on chain %d at height %d", + iter.Event.Raw.TxHash.Hex(), ob.chain.ChainId, iter.Event.Raw.BlockNumber) } sort.SliceStable(events, func(i, j int) bool { if events[i].Raw.BlockNumber == events[j].Raw.BlockNumber { @@ -970,7 +991,7 @@ func (ob *EVMChainClient) observeZetaSent(startBlock, toBlock uint64) uint64 { // returns the last block successfully scanned func (ob *EVMChainClient) observeERC20Deposited(startBlock, toBlock uint64) uint64 { // filter ERC20CustodyDeposited logs - erc20custodyContract, err := ob.GetERC20CustodyContract() + addrCustody, erc20custodyContract, err := ob.GetERC20CustodyContract() if err != nil { ob.logger.ExternalChainWatcher.Warn().Err(err).Msgf("observeERC20Deposited: GetERC20CustodyContract error:") return startBlock - 1 // lastScanned @@ -989,12 +1010,14 @@ func (ob *EVMChainClient) observeERC20Deposited(startBlock, toBlock uint64) uint // collect and sort events by block number, then tx index, then log index (ascending) events := make([]*erc20custody.ERC20CustodyDeposited, 0) for iter.Next() { - if !iter.Event.Raw.Removed && iter.Event.Raw.BlockNumber > 0 { // skip if chain reorg removed this event + // sanity check tx event + err := ob.CheckEvmTxLog(&iter.Event.Raw, addrCustody, "", TopicsDeposited) + if err == nil { events = append(events, iter.Event) continue } - ob.logger.ExternalChainWatcher.Warn().Msgf("observeERC20Deposited: invalid event in tx %s at height %d for chain %d", - iter.Event.Raw.TxHash.Hex(), iter.Event.Raw.BlockNumber, ob.chain.ChainId) + ob.logger.ExternalChainWatcher.Warn().Err(err).Msgf("observeERC20Deposited: invalid Deposited event in tx %s on chain %d at height %d", + iter.Event.Raw.TxHash.Hex(), ob.chain.ChainId, iter.Event.Raw.BlockNumber) } sort.SliceStable(events, func(i, j int) bool { if events[i].Raw.BlockNumber == events[j].Raw.BlockNumber { diff --git a/zetaclient/inbound_tracker.go b/zetaclient/inbound_tracker.go index e5c370b54f..8a7ebd1147 100644 --- a/zetaclient/inbound_tracker.go +++ b/zetaclient/inbound_tracker.go @@ -156,7 +156,7 @@ func (ob *EVMChainClient) ObserveTrackerSuggestions() error { } func (ob *EVMChainClient) CheckReceiptForCoinTypeZeta(txHash string, vote bool) (string, error) { - connector, err := ob.GetConnectorContract() + addrConnector, connector, err := ob.GetConnectorContract() if err != nil { return "", err } @@ -166,13 +166,25 @@ func (ob *EVMChainClient) CheckReceiptForCoinTypeZeta(txHash string, vote bool) return "", err } + // check if the tx is confirmed + lastHeight := ob.GetLastBlockHeight() + if !ob.HasEnoughConfirmations(receipt, lastHeight) { + return "", fmt.Errorf("txHash %s has not been confirmed yet: receipt block %d current block %d", txHash, receipt.BlockNumber, lastHeight) + } + var msg types.MsgVoteOnObservedInboundTx for _, log := range receipt.Logs { event, err := connector.ParseZetaSent(*log) if err == nil && event != nil { - msg, err = ob.GetInboundVoteMsgForZetaSentEvent(event) + // sanity check tx event + err = ob.CheckEvmTxLog(&event.Raw, addrConnector, txHash, TopicsZetaSent) if err == nil { - break + msg, err = ob.GetInboundVoteMsgForZetaSentEvent(event) + if err == nil { + break + } + } else { + ob.logger.ExternalChainWatcher.Error().Err(err).Msg("CheckEvmTxLog error on ZetaSent event") } } } @@ -192,7 +204,7 @@ func (ob *EVMChainClient) CheckReceiptForCoinTypeZeta(txHash string, vote bool) } func (ob *EVMChainClient) CheckReceiptForCoinTypeERC20(txHash string, vote bool) (string, error) { - custody, err := ob.GetERC20CustodyContract() + addrCustory, custody, err := ob.GetERC20CustodyContract() if err != nil { return "", err } @@ -201,13 +213,26 @@ func (ob *EVMChainClient) CheckReceiptForCoinTypeERC20(txHash string, vote bool) if err != nil { return "", err } + + // check if the tx is confirmed + lastHeight := ob.GetLastBlockHeight() + if !ob.HasEnoughConfirmations(receipt, lastHeight) { + return "", fmt.Errorf("txHash %s has not been confirmed yet: receipt block %d current block %d", txHash, receipt.BlockNumber, lastHeight) + } + var msg types.MsgVoteOnObservedInboundTx for _, log := range receipt.Logs { zetaDeposited, err := custody.ParseDeposited(*log) if err == nil && zetaDeposited != nil { - msg, err = ob.GetInboundVoteMsgForDepositedEvent(zetaDeposited) + // sanity check tx event + err = ob.CheckEvmTxLog(&zetaDeposited.Raw, addrCustory, txHash, TopicsDeposited) if err == nil { - break + msg, err = ob.GetInboundVoteMsgForDepositedEvent(zetaDeposited) + if err == nil { + break + } + } else { + ob.logger.ExternalChainWatcher.Error().Err(err).Msg("CheckEvmTxLog error on Deposited event") } } } @@ -245,6 +270,13 @@ func (ob *EVMChainClient) CheckReceiptForCoinTypeGas(txHash string, vote bool) ( ob.logger.ExternalChainWatcher.Info().Msgf("tx %s failed; don't act", tx.Hash().Hex()) return "", errors.New("tx not successful yet") } + + // check if the tx is confirmed + lastHeight := ob.GetLastBlockHeight() + if !ob.HasEnoughConfirmations(receipt, lastHeight) { + return "", fmt.Errorf("txHash %s has not been confirmed yet: receipt block %d current block %d", txHash, receipt.BlockNumber, lastHeight) + } + block, err := ob.evmClient.BlockByNumber(context.Background(), receipt.BlockNumber) if err != nil { ob.logger.ExternalChainWatcher.Err(err).Msg("BlockByNumber error") diff --git a/zetaclient/utils.go b/zetaclient/utils.go index d3702a62e9..0dfa5cb973 100644 --- a/zetaclient/utils.go +++ b/zetaclient/utils.go @@ -170,6 +170,32 @@ func (t *DynamicTicker) Stop() { t.impl.Stop() } +// CheckEvmTxLog checks the basics of an EVM tx log +func (ob *EVMChainClient) CheckEvmTxLog(vLog *ethtypes.Log, wantAddress ethcommon.Address, wantHash string, wantTopics int) error { + if vLog.Removed { + return fmt.Errorf("log is removed, chain reorg?") + } + if vLog.Address != wantAddress { + return fmt.Errorf("log emitter address mismatch: want %s got %s", wantAddress.Hex(), vLog.Address.Hex()) + } + if vLog.TxHash.Hex() == "" { + return fmt.Errorf("log tx hash is empty: %d %s", vLog.BlockNumber, vLog.TxHash.Hex()) + } + if wantHash != "" && vLog.TxHash.Hex() != wantHash { + return fmt.Errorf("log tx hash mismatch: want %s got %s", wantHash, vLog.TxHash.Hex()) + } + if len(vLog.Topics) != wantTopics { + return fmt.Errorf("number of topics mismatch: want %d got %d", wantTopics, len(vLog.Topics)) + } + return nil +} + +// HasEnoughConfirmations checks if the given receipt has enough confirmations +func (ob *EVMChainClient) HasEnoughConfirmations(receipt *ethtypes.Receipt, lastHeight uint64) bool { + confHeight := receipt.BlockNumber.Uint64() + ob.GetChainParams().ConfirmationCount + return lastHeight >= confHeight +} + func (ob *EVMChainClient) GetInboundVoteMsgForDepositedEvent(event *erc20custody.ERC20CustodyDeposited) (types.MsgVoteOnObservedInboundTx, error) { ob.logger.ExternalChainWatcher.Info().Msgf("TxBlockNumber %d Transaction Hash: %s Message : %s", event.Raw.BlockNumber, event.Raw.TxHash, event.Message) if bytes.Equal(event.Message, []byte(DonationMessage)) { diff --git a/zetaclient/utils_test.go b/zetaclient/utils_test.go new file mode 100644 index 0000000000..98355e82ac --- /dev/null +++ b/zetaclient/utils_test.go @@ -0,0 +1,102 @@ +package zetaclient + +import ( + "fmt" + "testing" + + ethcommon "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/require" +) + +func TestCheckEvmTxLog(t *testing.T) { + // test data + connectorAddr := ethcommon.HexToAddress("0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea") + txHash := "0xb252c9e77feafdeeae25cc1f037a16c4b50fa03c494754b99a7339d816c79626" + topics := []ethcommon.Hash{ + // https://goerli.etherscan.io/tx/0xb252c9e77feafdeeae25cc1f037a16c4b50fa03c494754b99a7339d816c79626#eventlog + ethcommon.HexToHash("0x7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4"), + ethcommon.HexToHash("0x00000000000000000000000023856df5d563bd893fc7df864102d8bbfe7fc487"), + ethcommon.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000061"), + } + + tests := []struct { + name string + vLog *ethtypes.Log + fail bool + }{ + { + name: "chain reorganization", + vLog: ðtypes.Log{ + Removed: true, + Address: connectorAddr, + TxHash: ethcommon.HexToHash(txHash), + Topics: topics, + }, + fail: true, + }, + { + name: "emitter address mismatch", + vLog: ðtypes.Log{ + Removed: false, + Address: ethcommon.HexToAddress("0x184ba627DB853244c9f17f3Cb4378cB8B39bf147"), + TxHash: ethcommon.HexToHash(txHash), + Topics: topics, + }, + fail: true, + }, + { + name: "tx hash mismatch", + vLog: ðtypes.Log{ + Removed: false, + Address: connectorAddr, + TxHash: ethcommon.HexToHash("0x781c018d604af4dad0fe5e3cea4ad9fb949a996d8cd0cd04a92cadd7f08c05f2"), + Topics: topics, + }, + fail: true, + }, + { + name: "topics mismatch", + vLog: ðtypes.Log{ + Removed: false, + Address: connectorAddr, + TxHash: ethcommon.HexToHash(txHash), + Topics: []ethcommon.Hash{ + // https://goerli.etherscan.io/tx/0xb252c9e77feafdeeae25cc1f037a16c4b50fa03c494754b99a7339d816c79626#eventlog + ethcommon.HexToHash("0x7ec1c94701e09b1652f3e1d307e60c4b9ebf99aff8c2079fd1d8c585e031c4e4"), + ethcommon.HexToHash("0x00000000000000000000000023856df5d563bd893fc7df864102d8bbfe7fc487"), + }, + }, + fail: true, + }, + { + name: "should pass", + vLog: ðtypes.Log{ + Removed: false, + Address: connectorAddr, + TxHash: ethcommon.HexToHash(txHash), + Topics: topics, + }, + fail: false, + }, + } + + evmClient := EVMChainClient{} + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + fmt.Printf("check test: %s\n", tt.name) + err := evmClient.CheckEvmTxLog( + tt.vLog, + connectorAddr, + "0xb252c9e77feafdeeae25cc1f037a16c4b50fa03c494754b99a7339d816c79626", + TopicsZetaSent, + ) + if tt.fail { + require.Error(t, err) + return + } else { + require.NoError(t, err) + } + }) + } +} From bd88cf0f21f127cc49ff375480ceda0990d41e7e Mon Sep 17 00:00:00 2001 From: Christopher Fuka <97121270+CryptoFewka@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:11:11 -0600 Subject: [PATCH 4/5] docs: Update the --ledger --hd-path hint for clarity (#1553) * Update the --ledger --hd-path hint for clarity - replace the second line of the hint with `Please set a blank path with --hd-path="" to use Cosmos HD path instead.` * Update changelog.md * Update cmd/zetacored/main.go Co-authored-by: Lucas Bertrand --------- Co-authored-by: Charlie <31941002+CharlieMc0@users.noreply.github.com> Co-authored-by: Lucas Bertrand --- changelog.md | 1 + cmd/zetacored/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 9ae132349c..a09cc2d5bb 100644 --- a/changelog.md +++ b/changelog.md @@ -51,6 +51,7 @@ * Remove chain id from the index for observer mapper and rename it to observer set. * Add logger to smoke tests * [1521](https://github.com/zeta-chain/node/pull/1521) - replace go-tss lib version with one that reverts back to thorchain tss-lib +* Update --ledger flag hint ### Chores * [1446](https://github.com/zeta-chain/node/pull/1446) - renamed file `zetaclientd/aux.go` to `zetaclientd/utils.go` to avoid complaints from go package resolver. diff --git a/cmd/zetacored/main.go b/cmd/zetacored/main.go index 5da5d57913..4b12f153c7 100644 --- a/cmd/zetacored/main.go +++ b/cmd/zetacored/main.go @@ -34,7 +34,7 @@ func processError(err error) { if strings.Contains(err.Error(), "cannot set custom bip32 path with ledger") { printNotice([]string{ "note: --ledger flag can't be used with Ethereum HD path (used by default)", - "use --hd-path=\"\" in the command to use Cosmos HD path", + "Please set a blank path with --hd-path=\"\" to use Cosmos HD path instead.", }) os.Exit(1) } From 361fcafceadf6d65df913f833467ec5ac5818d8e Mon Sep 17 00:00:00 2001 From: Charlie Chen <34498985+ws4charlie@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:39:41 -0600 Subject: [PATCH 5/5] fix: unprivileged outtx tracker removal (#1533) * unprivileged outtx tracker removal * updated changelog * added extra comment * differentiate API call failure from ErrCannotFindCctx --------- Co-authored-by: Lucas Bertrand --- changelog.md | 1 + .../keeper/msg_server_add_to_outtx_tracker.go | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/changelog.md b/changelog.md index a09cc2d5bb..a80e9cdd5a 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,7 @@ ### Fixes +* [1516](https://github.com/zeta-chain/node/issues/1516) - Unprivileged outtx tracker removal * [1537](https://github.com/zeta-chain/node/issues/1537) - Sanity check events of ZetaSent/ZetaReceived/ZetaRevertedWithdrawn/Deposited * [1530](https://github.com/zeta-chain/node/pull/1530) - Outbound tx confirmation/inclusion enhancement * [1496](https://github.com/zeta-chain/node/issues/1496) - post block header for enabled EVM chains only diff --git a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go index 0af5fc9a2b..64f1396859 100644 --- a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go +++ b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go @@ -29,6 +29,24 @@ func (k msgServer) AddToOutTxTracker(goCtx context.Context, msg *types.MsgAddToO return nil, observertypes.ErrSupportedChains } + // the cctx must exist + cctx, err := k.CctxByNonce(ctx, &types.QueryGetCctxByNonceRequest{ + ChainID: msg.ChainId, + Nonce: msg.Nonce, + }) + if err != nil { + return nil, cosmoserrors.Wrap(err, "CcxtByNonce failed") + } + if cctx == nil || cctx.CrossChainTx == nil { + return nil, cosmoserrors.Wrapf(types.ErrCannotFindCctx, "no corresponding cctx found for chain %d, nonce %d", msg.ChainId, msg.Nonce) + } + // tracker submission is only allowed when the cctx is pending + if !IsPending(*cctx.CrossChainTx) { + // garbage tracker (for any reason) is harmful to outTx observation and should be removed + k.RemoveOutTxTracker(ctx, msg.ChainId, msg.Nonce) + return &types.MsgAddToOutTxTrackerResponse{IsRemoved: true}, nil + } + if msg.Proof == nil { // without proof, only certain accounts can send this message adminPolicyAccount := k.zetaObserverKeeper.GetParams(ctx).GetAdminPolicyAccount(observertypes.Policy_Type_group1) isAdmin := msg.Creator == adminPolicyAccount @@ -53,18 +71,6 @@ func (k msgServer) AddToOutTxTracker(goCtx context.Context, msg *types.MsgAddToO isProven = true } - cctx, err := k.CctxByNonce(ctx, &types.QueryGetCctxByNonceRequest{ - ChainID: msg.ChainId, - Nonce: msg.Nonce, - }) - if err != nil || cctx == nil || cctx.CrossChainTx == nil { - return nil, cosmoserrors.Wrap(types.ErrCannotFindCctx, "cannot add out tx: no corresponding cctx found") - } - if !IsPending(*cctx.CrossChainTx) { - k.RemoveOutTxTracker(ctx, msg.ChainId, msg.Nonce) - return &types.MsgAddToOutTxTrackerResponse{IsRemoved: true}, nil - } - tracker, found := k.GetOutTxTracker(ctx, msg.ChainId, msg.Nonce) hash := types.TxHashList{ TxHash: msg.TxHash,