From 521aeceafd1a0bf6e5beb886e053bdd07a638cda Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 8 Jan 2024 11:55:59 -0800 Subject: [PATCH 01/16] support contracts in config --- cmd/zetae2e/config/config.go | 21 +++++ cmd/zetae2e/config/contracts.go | 28 +++++++ cmd/zetae2e/local/local.go | 84 ++++++++++++++++--- cmd/zetae2e/local/utils.go | 6 ++ .../orchestrator/smoketest/config/config.go | 15 +++- .../orchestrator/smoketest/runner/evm.go | 1 - .../orchestrator/smoketest/runner/runner.go | 24 ++++++ 7 files changed, 165 insertions(+), 14 deletions(-) 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 bf3fa42540..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,16 +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) + } - // setting up the networks - logger.Print("⚙️ setting up networks") - startTime := time.Now() + // query and set the TSS deployerRunner.SetTSSAddresses() - deployerRunner.SetupEVM(contractsDeployed) - deployerRunner.SetZEVMContracts() - deployerRunner.MintUSDTOnEvm(10000) - logger.Print("✅ setup completed in %s", time.Since(startTime)) + + // setting up the networks + 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() + } + + // 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..8107ead79b 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) } 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/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()) +} From 66574759992fafc8b3bd8565f3468892f0c71f49 Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 8 Jan 2024 11:56:25 -0800 Subject: [PATCH 02/16] refactor stateful test --- Dockerfile-versioned | 7 +- Dockerfile-versioned-source | 23 ++---- Makefile | 2 +- app/setup_handlers.go | 2 +- contrib/localnet/docker-compose.yml | 1 - .../orchestrator/Dockerfile-upgrade.fastbuild | 6 +- .../orchestrator/restart-zetaclientd.sh | 4 +- .../localnet/orchestrator/start-upgrade.sh | 73 ++++++++++++------- contrib/localnet/orchestrator/start.sh | 18 ++--- contrib/localnet/scripts/genesis-stateful.sh | 28 +++---- 10 files changed, 83 insertions(+), 81 deletions(-) diff --git a/Dockerfile-versioned b/Dockerfile-versioned index c948817829..4ea23bcd9c 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 @@ -24,7 +24,7 @@ RUN cd node && git checkout ${new_version} RUN cd node && make install RUN cd node && make install-smoketest RUN cp $GOPATH/bin/zetacored $GOPATH/bin/new/ -RUN cp $GOPATH/bin/zetaclientd $GOPATH/bin/new/ +RUN cp $GOPATH/sbin/zetaclientd $GOPATH/bin/new/ RUN cp $GOPATH/bin/smoketest $GOPATH/bin/new/ # Checkout and build old binary @@ -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 dd47b6a541..50eac6a2d4 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 -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 1a8cb053a3..34d9242d74 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -8,7 +8,7 @@ import ( crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/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/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..018e624810 100644 --- a/contrib/localnet/orchestrator/restart-zetaclientd.sh +++ b/contrib/localnet/orchestrator/restart-zetaclientd.sh @@ -34,10 +34,12 @@ 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 '"') + 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/start-upgrade.sh b/contrib/localnet/orchestrator/start-upgrade.sh index a9e123ad72..34d4a7f025 100644 --- a/contrib/localnet/orchestrator/start-upgrade.sh +++ b/contrib/localnet/orchestrator/start-upgrade.sh @@ -1,42 +1,63 @@ #!/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 "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 --wait-for 185 -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..47cf4c737f 100644 --- a/contrib/localnet/orchestrator/start.sh +++ b/contrib/localnet/orchestrator/start.sh @@ -33,29 +33,21 @@ 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" +zetae2e "$ZETAE2E_CMD" --setup-only --config-out deployed.yml ZETAE2E_EXIT_CODE=$? # if e2e passed, exit with 0, otherwise exit with 1 if [ $ZETAE2E_EXIT_CODE -eq 0 ]; then + echo "starting tests with skip setup..." + + zetae2e "$ZETAE2E_CMD" --skip-setup --config 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..c5102095f2 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 @@ -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 From b57c4863697bdc40a248c16cb0bd3432cf54dc17 Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 8 Jan 2024 11:57:20 -0800 Subject: [PATCH 03/16] set back e2e test to previous implementation --- contrib/localnet/orchestrator/start.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/contrib/localnet/orchestrator/start.sh b/contrib/localnet/orchestrator/start.sh index 47cf4c737f..2c0901a2c2 100644 --- a/contrib/localnet/orchestrator/start.sh +++ b/contrib/localnet/orchestrator/start.sh @@ -39,15 +39,12 @@ geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xF421292cb0d3c97b90E # run e2e tests echo "running e2e tests..." -zetae2e "$ZETAE2E_CMD" --setup-only --config-out deployed.yml +zetae2e "$ZETAE2E_CMD" ZETAE2E_EXIT_CODE=$? # if e2e passed, exit with 0, otherwise exit with 1 if [ $ZETAE2E_EXIT_CODE -eq 0 ]; then - echo "starting tests with skip setup..." - - zetae2e "$ZETAE2E_CMD" --skip-setup --config deployed.yml - + cat /work/deployed.yml echo "e2e passed" exit 0 else From c9f25259f2b002f6cd90e3298cc29f1c493e70b5 Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 8 Jan 2024 16:53:00 -0800 Subject: [PATCH 04/16] stateful check some fixes --- cmd/zetaclientd/start_utils.go | 6 +++--- contrib/localnet/scripts/genesis-stateful.sh | 2 +- .../localnet/scripts/start-zetaclientd-background.sh | 10 ++++++---- contrib/localnet/scripts/start-zetaclientd-genesis.sh | 4 +--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/zetaclientd/start_utils.go b/cmd/zetaclientd/start_utils.go index 6367a5e2d8..4b35dbdd28 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/contrib/localnet/scripts/genesis-stateful.sh b/contrib/localnet/scripts/genesis-stateful.sh index c5102095f2..0a6862f846 100755 --- a/contrib/localnet/scripts/genesis-stateful.sh +++ b/contrib/localnet/scripts/genesis-stateful.sh @@ -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 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 ec1b9f305c..dab3685eef 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 30 @@ -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') From f5f0cfb3a8b19f4d2672e545fe5bd1d160ca5bc7 Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 8 Jan 2024 19:13:49 -0800 Subject: [PATCH 05/16] fix legacy query --- .../smoketest/runner/setup_zeta.go | 40 +- .../localnet/orchestrator/start-upgrade.sh | 2 +- contrib/localnet/scripts/genesis-stateful.sh | 4 +- contrib/localnet/scripts/genesis-upgrade.sh | 5 + proto/crosschain/query.proto | 18 + x/crosschain/keeper/grpc_query.go | 10 + x/crosschain/types/query.pb.go | 699 ++++++++++++++---- x/crosschain/types/query.pb.gw.go | 65 ++ 8 files changed, 683 insertions(+), 160 deletions(-) diff --git a/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go b/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go index 1a04830556..154a229f43 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go +++ b/contrib/localnet/orchestrator/smoketest/runner/setup_zeta.go @@ -2,11 +2,11 @@ package runner import ( "math/big" + "strings" "time" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "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" @@ -16,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" ) @@ -29,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 +184,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/start-upgrade.sh b/contrib/localnet/orchestrator/start-upgrade.sh index 34d4a7f025..7a06b160a2 100644 --- a/contrib/localnet/orchestrator/start-upgrade.sh +++ b/contrib/localnet/orchestrator/start-upgrade.sh @@ -36,7 +36,7 @@ geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xcC8487562AAc220ea44 echo "running E2E command to setup the networks and populate the state..." -zetae2e "$ZETAE2E_CMD" --config-out deployed.yml +zetae2e "$ZETAE2E_CMD" --config-out deployed.yml --verbose ZETAE2E_EXIT_CODE=$? if [ $ZETAE2E_EXIT_CODE -ne 0 ]; then diff --git a/contrib/localnet/scripts/genesis-stateful.sh b/contrib/localnet/scripts/genesis-stateful.sh index 0a6862f846..5099fcfc4a 100755 --- a/contrib/localnet/scripts/genesis-stateful.sh +++ b/contrib/localnet/scripts/genesis-stateful.sh @@ -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 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/proto/crosschain/query.proto b/proto/crosschain/query.proto index c9eee26378..0aa522498d 100644 --- a/proto/crosschain/query.proto +++ b/proto/crosschain/query.proto @@ -16,6 +16,13 @@ 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 + 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 +121,17 @@ service Query { } } +// Deprecated: Moved to observer +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +message QueryGetTssAddressRequest {} + +// Deprecated: Moved to observer +// TODO: remove after v12 once upgrade testing is no longer needed with v11 +message QueryGetTssAddressResponse { + string eth = 1; + string btc = 2; +} + message QueryZetaAccountingRequest {} message QueryZetaAccountingResponse { diff --git a/x/crosschain/keeper/grpc_query.go b/x/crosschain/keeper/grpc_query.go index 720f65c8f7..3225af83e4 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -1,7 +1,17 @@ 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 +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..e2f70c7eb9 100644 --- a/x/crosschain/types/query.pb.go +++ b/x/crosschain/types/query.pb.go @@ -31,6 +31,98 @@ 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 +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 +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 +130,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 +167,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 +211,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 +250,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 +295,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 +346,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 +390,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 +435,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 +487,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 +539,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 +591,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 +643,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 +694,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 +739,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 +790,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 +834,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 +878,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 +922,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 +966,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 +1011,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 +1062,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 +1106,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 +1150,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 +1195,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 +1246,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 +1290,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 +1334,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 +1379,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 +1430,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 +1475,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 +1526,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 +1570,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 +1615,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 +1667,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 +1719,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 +1769,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 +1806,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 +1851,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 +1904,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 +1961,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 +2000,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 +2037,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 +2085,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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8, 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, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0xcd, 0x6f, 0x14, 0xc9, + 0x15, 0x77, 0x79, 0xb0, 0xd7, 0x94, 0xcd, 0x7a, 0xa9, 0x75, 0x58, 0x6f, 0x63, 0x8f, 0x77, 0xdb, + 0x31, 0x26, 0x10, 0xcf, 0xac, 0xbd, 0x60, 0xbe, 0x4c, 0xc4, 0xd8, 0x04, 0x83, 0x62, 0xc0, 0x19, + 0x39, 0x4a, 0x44, 0x14, 0x8d, 0x6a, 0x7a, 0x2a, 0x33, 0x2d, 0xda, 0xdd, 0x66, 0xaa, 0x06, 0xd9, + 0x58, 0xbe, 0x70, 0xc8, 0x39, 0x12, 0x52, 0x72, 0xc9, 0x35, 0x4a, 0x0e, 0x39, 0xe4, 0x80, 0x92, + 0x43, 0x24, 0xa2, 0x7c, 0x11, 0x8e, 0x48, 0x91, 0xa2, 0x28, 0x91, 0xa2, 0x08, 0xf2, 0x87, 0xac, + 0xba, 0xfa, 0xf5, 0x4c, 0x75, 0x4f, 0xf7, 0x4c, 0x79, 0x3c, 0x1c, 0x38, 0x31, 0x5d, 0x55, 0xef, + 0xbd, 0xdf, 0xef, 0x57, 0x5f, 0xaf, 0x1e, 0xc6, 0xa7, 0xac, 0xba, 0xc7, 0xb9, 0x55, 0xa3, 0xb6, + 0x9b, 0x7f, 0xd4, 0x60, 0xf5, 0xbd, 0xdc, 0x4e, 0xdd, 0x13, 0x1e, 0x99, 0x7e, 0xc2, 0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xfe, 0xa2, 0x07, 0x3c, 0xb9, 0x38, 0xd3, 0x15, 0xb8, 0x13, 0x31, + 0x5b, 0xfd, 0xce, 0xab, 0x37, 0x59, 0xf4, 0xfa, 0x4d, 0x16, 0xfd, 0xef, 0x4d, 0x16, 0xfd, 0xf4, + 0x6d, 0x76, 0xe0, 0xf5, 0xdb, 0xec, 0xc0, 0xbf, 0xde, 0x66, 0x07, 0x1e, 0x2c, 0x56, 0x6d, 0x51, + 0x6b, 0x94, 0x73, 0x96, 0xb7, 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 +2217,10 @@ 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 + 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 +2267,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 +2467,10 @@ 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 + 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 +2513,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 +2584,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 +2984,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 +3077,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 +4619,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 +5238,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 e2681fcbca4be72856b22002a3c6b1d9185c6c81 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 06:24:41 -0800 Subject: [PATCH 06/16] use patched v11 for evm addresses --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50eac6a2d4..d6be4b1273 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,7 @@ stateful-upgrade: stateful-upgrade-source: @echo "--> Starting stateful smoketest" - $(DOCKER) build --build-arg old_version=v11.0.0 -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 From 004aa2fe2403e128f0418e43cc65985c9f45b6a5 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 06:24:54 -0800 Subject: [PATCH 07/16] fix wait for logic --- contrib/localnet/orchestrator/start-upgrade.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/localnet/orchestrator/start-upgrade.sh b/contrib/localnet/orchestrator/start-upgrade.sh index 7a06b160a2..1d8c5aa570 100644 --- a/contrib/localnet/orchestrator/start-upgrade.sh +++ b/contrib/localnet/orchestrator/start-upgrade.sh @@ -36,7 +36,7 @@ geth --exec 'eth.sendTransaction({from: eth.coinbase, to: "0xcC8487562AAc220ea44 echo "running E2E command to setup the networks and populate the state..." -zetae2e "$ZETAE2E_CMD" --config-out deployed.yml --verbose +zetae2e "$ZETAE2E_CMD" --config-out deployed.yml ZETAE2E_EXIT_CODE=$? if [ $ZETAE2E_EXIT_CODE -ne 0 ]; then @@ -49,9 +49,13 @@ echo "E2E setup passed, waiting for upgrade height..." # Restart zetaclients at upgrade height /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..." -zetae2e "$ZETAE2E_CMD" --skip-setup --config deployed.yml --wait-for 185 +zetae2e "$ZETAE2E_CMD" --skip-setup --config deployed.yml ZETAE2E_EXIT_CODE=$? if [ $ZETAE2E_EXIT_CODE -eq 0 ]; then From 981afd1db784f81951afa889ac18574483f83829 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 06:25:10 -0800 Subject: [PATCH 08/16] comment out tests --- cmd/zetae2e/local/local.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index 72023b8e9b..18f8559b6d 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -229,9 +229,9 @@ func localE2ETest(cmd *cobra.Command, _ []string) { var eg errgroup.Group if !skipRegular { eg.Go(erc20TestRoutine(conf, deployerRunner, verbose)) - eg.Go(zetaTestRoutine(conf, deployerRunner, verbose)) - eg.Go(bitcoinTestRoutine(conf, deployerRunner, verbose)) - eg.Go(ethereumTestRoutine(conf, deployerRunner, verbose)) + //eg.Go(zetaTestRoutine(conf, deployerRunner, verbose)) + //eg.Go(bitcoinTestRoutine(conf, deployerRunner, verbose)) + //eg.Go(ethereumTestRoutine(conf, deployerRunner, verbose)) } if testAdmin { eg.Go(adminTestRoutine(conf, deployerRunner, verbose)) From 14623ffe9b311107a95f76115459943b5644f2e2 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 13:58:14 -0800 Subject: [PATCH 09/16] fix upgrade tests --- cmd/zetae2e/local/local.go | 6 ++-- .../orchestrator/restart-zetaclientd.sh | 2 +- .../orchestrator/smoketest/runner/bitcoin.go | 32 +++++++++---------- .../smoketests/test_crosschain_swap.go | 7 ++-- .../smoketest/smoketests/test_zrc20_swap.go | 8 ++--- 5 files changed, 25 insertions(+), 30 deletions(-) diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index 18f8559b6d..72023b8e9b 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -229,9 +229,9 @@ func localE2ETest(cmd *cobra.Command, _ []string) { var eg errgroup.Group if !skipRegular { eg.Go(erc20TestRoutine(conf, deployerRunner, verbose)) - //eg.Go(zetaTestRoutine(conf, deployerRunner, verbose)) - //eg.Go(bitcoinTestRoutine(conf, deployerRunner, verbose)) - //eg.Go(ethereumTestRoutine(conf, deployerRunner, verbose)) + eg.Go(zetaTestRoutine(conf, deployerRunner, verbose)) + eg.Go(bitcoinTestRoutine(conf, deployerRunner, verbose)) + eg.Go(ethereumTestRoutine(conf, deployerRunner, verbose)) } if testAdmin { eg.Go(adminTestRoutine(conf, deployerRunner, verbose)) diff --git a/contrib/localnet/orchestrator/restart-zetaclientd.sh b/contrib/localnet/orchestrator/restart-zetaclientd.sh index 018e624810..207eebf4aa 100644 --- a/contrib/localnet/orchestrator/restart-zetaclientd.sh +++ b/contrib/localnet/orchestrator/restart-zetaclientd.sh @@ -33,7 +33,7 @@ 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 diff --git a/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go b/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go index 0277710e69..b295b1ab73 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go +++ b/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go @@ -4,6 +4,8 @@ import ( "bytes" "encoding/hex" "fmt" + "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/utils" + crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "math/big" "time" @@ -65,7 +67,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 +88,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/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)) From 1ff2a34a7b9c8cc6600db0adfb57d87d439529b7 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 14:00:00 -0800 Subject: [PATCH 10/16] go import --- .../orchestrator/smoketest/runner/bitcoin.go | 5 +- docs/openapi/openapi.swagger.yaml | 44 ++++++++++++--- typescript/crosschain/query_pb.d.ts | 54 +++++++++++++++++++ x/crosschain/keeper/grpc_query.go | 1 + 4 files changed, 94 insertions(+), 10 deletions(-) diff --git a/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go b/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go index b295b1ab73..9ee876a04e 100644 --- a/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go +++ b/contrib/localnet/orchestrator/smoketest/runner/bitcoin.go @@ -4,11 +4,12 @@ import ( "bytes" "encoding/hex" "fmt" - "github.com/zeta-chain/zetacore/contrib/localnet/orchestrator/smoketest/utils" - crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" "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" diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 2ae06c6b6d..ca058ae48f 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -26696,6 +26696,24 @@ 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 + 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. @@ -27820,7 +27838,7 @@ paths: "200": description: A successful response. schema: - $ref: '#/definitions/observerQueryGetTssAddressResponse' + $ref: '#/definitions/zetacoreobserverQueryGetTssAddressResponse' default: description: An unexpected error response. schema: @@ -51651,13 +51669,6 @@ definitions: type: string btc: type: string - observerQueryGetTssAddressResponse: - type: object - properties: - eth: - type: string - btc: - type: string observerQueryHasVotedResponse: type: object properties: @@ -51817,6 +51828,16 @@ 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 zetacorecrosschainQueryParamsResponse: type: object properties: @@ -51890,6 +51911,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/typescript/crosschain/query_pb.d.ts b/typescript/crosschain/query_pb.d.ts index 17bb54ef27..03f3085975 100644 --- a/typescript/crosschain/query_pb.d.ts +++ b/typescript/crosschain/query_pb.d.ts @@ -14,6 +14,60 @@ 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 + * + * @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 + * + * @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 3225af83e4..779a9e9f9a 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "github.com/zeta-chain/zetacore/x/crosschain/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" From 59f6a01042a012bc06ed3750482d1c906e8ebb82 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 14:11:01 -0800 Subject: [PATCH 11/16] add comment for code to be removed --- proto/crosschain/query.proto | 3 +++ x/crosschain/keeper/grpc_query.go | 1 + 2 files changed, 4 insertions(+) diff --git a/proto/crosschain/query.proto b/proto/crosschain/query.proto index 0aa522498d..0df9d8a0b7 100644 --- a/proto/crosschain/query.proto +++ b/proto/crosschain/query.proto @@ -19,6 +19,7 @@ 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"; } @@ -123,10 +124,12 @@ 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; diff --git a/x/crosschain/keeper/grpc_query.go b/x/crosschain/keeper/grpc_query.go index 779a9e9f9a..3b2d06620e 100644 --- a/x/crosschain/keeper/grpc_query.go +++ b/x/crosschain/keeper/grpc_query.go @@ -13,6 +13,7 @@ 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") } From fa49e43c559f1007b998300f50ca20ea35acf86b Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 14:25:57 -0800 Subject: [PATCH 12/16] make generate --- docs/openapi/openapi.swagger.yaml | 2 ++ typescript/crosschain/query_pb.d.ts | 2 ++ x/crosschain/types/query.pb.go | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index bafef41620..cb87e0dfc4 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -26702,6 +26702,7 @@ paths: 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": @@ -51809,6 +51810,7 @@ definitions: 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: diff --git a/typescript/crosschain/query_pb.d.ts b/typescript/crosschain/query_pb.d.ts index 03f3085975..52d504e4e4 100644 --- a/typescript/crosschain/query_pb.d.ts +++ b/typescript/crosschain/query_pb.d.ts @@ -17,6 +17,7 @@ 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 */ @@ -39,6 +40,7 @@ export declare class QueryGetTssAddressRequest extends Message Date: Tue, 9 Jan 2024 14:27:10 -0800 Subject: [PATCH 13/16] changelogs --- changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.md b/changelog.md index 17b3450361..53b2621d27 100644 --- a/changelog.md +++ b/changelog.md @@ -58,6 +58,8 @@ ### Tests +* [1538](https://github.com/zeta-chain/node/pull/1538) - improve stateful e2e testing + ### CI * Removed private runners and unused GitHub Action From 4ea984700cdcefdc39bd778eea84b9a0843a3589 Mon Sep 17 00:00:00 2001 From: lumtis Date: Tue, 9 Jan 2024 14:59:13 -0800 Subject: [PATCH 14/16] fix typy --- Dockerfile-versioned | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile-versioned b/Dockerfile-versioned index 4ea23bcd9c..96e8c0e88e 100644 --- a/Dockerfile-versioned +++ b/Dockerfile-versioned @@ -24,7 +24,7 @@ RUN cd node && git checkout ${new_version} RUN cd node && make install RUN cd node && make install-smoketest RUN cp $GOPATH/bin/zetacored $GOPATH/bin/new/ -RUN cp $GOPATH/sbin/zetaclientd $GOPATH/bin/new/ +RUN cp $GOPATH/bin/zetaclientd $GOPATH/bin/new/ RUN cp $GOPATH/bin/smoketest $GOPATH/bin/new/ # Checkout and build old binary From 118ede616cdc70dccb5d34f1717ec95232b803c8 Mon Sep 17 00:00:00 2001 From: lumtis Date: Wed, 10 Jan 2024 11:14:26 -0800 Subject: [PATCH 15/16] test tss height 20 --- cmd/zetae2e/local/utils.go | 4 ++-- contrib/localnet/scripts/genesis-stateful.sh | 2 +- contrib/localnet/scripts/genesis.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/zetae2e/local/utils.go b/cmd/zetae2e/local/utils.go index 8107ead79b..c986d3328b 100644 --- a/cmd/zetae2e/local/utils.go +++ b/cmd/zetae2e/local/utils.go @@ -83,8 +83,8 @@ func waitKeygenHeight( cctxClient crosschaintypes.QueryClient, logger *runner.Logger, ) { - // wait for keygen to be completed. ~ height 30 - keygenHeight := int64(60) + // wait for keygen to be completed + keygenHeight := int64(25) logger.Print("⏳ wait height %v for keygen to be completed", keygenHeight) for { time.Sleep(2 * time.Second) diff --git a/contrib/localnet/scripts/genesis-stateful.sh b/contrib/localnet/scripts/genesis-stateful.sh index 5099fcfc4a..9c36acb95b 100755 --- a/contrib/localnet/scripts/genesis-stateful.sh +++ b/contrib/localnet/scripts/genesis-stateful.sh @@ -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 --keygen-block 55 + zetacored add-observer-list --keygen-block 20 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 diff --git a/contrib/localnet/scripts/genesis.sh b/contrib/localnet/scripts/genesis.sh index 4ed0d22270..edf162e26b 100755 --- a/contrib/localnet/scripts/genesis.sh +++ b/contrib/localnet/scripts/genesis.sh @@ -81,7 +81,7 @@ then # 2. Add the observers, authorizations, required params and accounts to the genesis.json zetacored collect-observer-info - zetacored add-observer-list --keygen-block 55 + zetacored add-observer-list --keygen-block 20 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 From e830f45dc449d3fe8d8ec6a4bcc67f86aceea438 Mon Sep 17 00:00:00 2001 From: lumtis Date: Wed, 10 Jan 2024 11:47:01 -0800 Subject: [PATCH 16/16] revert back keygen height --- cmd/zetae2e/local/utils.go | 2 +- contrib/localnet/scripts/genesis-stateful.sh | 2 +- contrib/localnet/scripts/genesis.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/zetae2e/local/utils.go b/cmd/zetae2e/local/utils.go index c986d3328b..8e1ab210c1 100644 --- a/cmd/zetae2e/local/utils.go +++ b/cmd/zetae2e/local/utils.go @@ -84,7 +84,7 @@ func waitKeygenHeight( logger *runner.Logger, ) { // wait for keygen to be completed - keygenHeight := int64(25) + keygenHeight := int64(60) logger.Print("⏳ wait height %v for keygen to be completed", keygenHeight) for { time.Sleep(2 * time.Second) diff --git a/contrib/localnet/scripts/genesis-stateful.sh b/contrib/localnet/scripts/genesis-stateful.sh index 9c36acb95b..5099fcfc4a 100755 --- a/contrib/localnet/scripts/genesis-stateful.sh +++ b/contrib/localnet/scripts/genesis-stateful.sh @@ -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 --keygen-block 20 + 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 diff --git a/contrib/localnet/scripts/genesis.sh b/contrib/localnet/scripts/genesis.sh index edf162e26b..4ed0d22270 100755 --- a/contrib/localnet/scripts/genesis.sh +++ b/contrib/localnet/scripts/genesis.sh @@ -81,7 +81,7 @@ then # 2. Add the observers, authorizations, required params and accounts to the genesis.json zetacored collect-observer-info - zetacored add-observer-list --keygen-block 20 + 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