diff --git a/.dockerignore b/.dockerignore index 48ff9d1a32..adc6255bfe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,5 @@ localnet package.json yarn.lock .github/ -.gitignore \ No newline at end of file +.gitignore +dist/** \ No newline at end of file diff --git a/.github/workflows/chain-operations.yml b/.github/workflows/chain-operations.yml deleted file mode 100644 index 88bd4c06c6..0000000000 --- a/.github/workflows/chain-operations.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Node Operations - Athens2 -on: - workflow_dispatch: - inputs: - ENVIRONMENT: - description: 'Which environment to update?' - type: environment - required: true - ZETACORED_STATUS: - description: 'Do you want to start, stop, or restart the zetacored?' - type: choice - options: - - 'start' - - 'stop' - - 'restart' - required: true - ZETACLIENTD_STATUS: - description: 'Do you want to start, stop, or restart the zetaclientd?' - type: choice - options: - - 'start' - - 'stop' - - 'restart' - required: true - -env: - AWS_REGION: "us-east-1" - -jobs: - start-stop-processes: - runs-on: ubuntu-latest - environment: ${{ github.event.inputs.ENVIRONMENT }} - steps: - - uses: actions/checkout@v3 - - - name: Install Pipeline Dependencies - uses: ./.github/actions/install-dependencies - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Change Zetacored Status - run: | - source .github/actions/deploy-binaries/functions - COMMAND_ID=$(run_ssm_cmds_validators "systemctl ${{ github.event.inputs.ZETACORED_STATUS }} cosmovisor") - check_cmd_status $COMMAND_ID - COMMAND_ID=$(run_ssm_cmds_api_nodes "systemctl ${{ github.event.inputs.ZETACORED_STATUS }} cosmovisor") - check_cmd_status $COMMAND_ID - COMMAND_ID=$(run_ssm_cmds_archive_nodes "systemctl ${{ github.event.inputs.ZETACORED_STATUS }} cosmovisor") - check_cmd_status $COMMAND_ID - - - - name: Change Zetaclientd Status - run: | - source .github/actions/deploy-binaries/functions - COMMAND_ID=$(run_ssm_cmds_validators "systemctl ${{ github.event.inputs.ZETACLIENTD_STATUS }} zetaclientd") - check_cmd_status $COMMAND_ID - diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index e5f234ca6e..0000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Deploy ZetaChain Update - Athens2 -on: - workflow_dispatch: - inputs: - ENVIRONMENT: - description: 'What Environment to deploy into (athens2, development)?' - type: environment - required: true - UPGRADE_BLOCK_HEIGHT: - description: 'What block height to stop and upgrade? (Cosmovisor Only)' - type: string - required: false - DEPLOYMENT_METHOD: - description: 'Do you want to use Cosmovisor or the more dangerous binary replacement method?' - type: choice - required: true - options: - - cosmovisor - - binary_replacement - -env: - S3_BUCKET_PATH: "zetachain-deployment-files/builds/zeta-node" - AWS_REGION: "us-east-1" - -jobs: - deploy-cosmovisor-upgrade: - runs-on: ["zeta-runners-athens2"] - environment: ${{ github.event.inputs.ENVIRONMENT }} - steps: - - uses: actions/checkout@v3 - - - name: Install Pipeline Dependencies - uses: ./.github/actions/install-dependencies - - # - name: setup-git-credentials - # uses: de-vri-es/setup-git-credentials@v2.0.8 - # with: - # credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }} - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Set Chain ID Automatically based on Environment - run: | - if [ ${{ github.event.inputs.ENVIRONMENT }} == "development" ]; then - echo "using development chain id: develop_101-1" - echo "CHAIN_ID=develop_101-1" >> $GITHUB_ENV - elif [ ${{ github.event.inputs.ENVIRONMENT }} == "athens2" ]; then - echo "using athens2 chain id" - echo "CHAIN_ID=athens_7001-1" >> $GITHUB_ENV - fi - - # Approval needed to deploy to environments other than development - # - uses: trstringer/manual-approval@v1 - # if : ${{ github.event.inputs.ENVIRONMENT != 'development' }} - # with: - # secret: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }} - # approvers: charliemc0, brewmaster012, kingpinXD, afzeta, chriskzeta, lucas-janon - # minimum-approvals: 1 - # issue-title: "Protocol Upgrade ${{ github.ref_name }} Env: ${{ github.event.inputs.ENVIRONMENT }}" - # exclude-workflow-initiator-as-approver: false - - - name: Test Inputs - if: ${{ env.ACT }} - run: | - echo ${{ github.ref_name }} - echo ${{ github.event.inputs.ENVIRONMENT }} - echo ${{ env.CHAIN_ID }} - echo ${{ github.event.inputs.UPGRADE_BLOCK_HEIGHT }} - echo ${{ env.ZETACORED_CHECKSUM }} - echo ${{ env.ZETACLIENTD_CHECKSUM }} - echo ${{ github.event.inputs.DEPLOYMENT_METHOD }} - - name: Update Nodes via Binary Replacement (Dangerous Method) - uses: ./.github/actions/deploy-binaries - if: ${{ github.event.inputs.DEPLOYMENT_METHOD == 'binary_replacement' }} - with: - S3_BUCKET_PATH: ${{ env.S3_BUCKET_PATH }} - TAKE_SNAPSHOTS: true - BRANCH_OR_TAG_NAME: ${{ github.ref_name }} - - ## Cosmovisor Actions Start Here - - name: Block Dangerous Updates To Public Networks - if: ${{ github.event.inputs.DEPLOYMENT_METHOD == 'binary_replacement' && github.event.inputs.ENVIRONMENT != 'development' }} - run: | - echo "ERROR: CANNOT USE DANGEROUS DEPLOYMENT METHODS FOR ATHENS AND OTHER PUBLIC NETWORKS" - exit 1 - - - name: Check Upgrade Handler Name Matches Tag - if: ${{ github.event.inputs.DEPLOYMENT_METHOD == 'cosmovisor' }} - run: | - UPGRADE_HANDLER_NAME=$(cat app/setup_handlers.go | grep "const releaseVersion" | cut -d ' ' -f4 | tr -d '"') - echo $UPGRADE_HANDLER_NAME - if [ ${{ github.ref_name }} != $UPGRADE_HANDLER_NAME ]; then - echo "ERROR: The name of this release does not match the releaseVersion const in app/setup_handlers.go" - echo "Did you forget to update the 'releaseVersion' const in app/setup_handlers.go?" - exit 1 - fi - echo "releaseVersion' const in app/setup_handlers.go matches this tagged release - Moving Forward!" - - - name: Get Checksum - if: ${{ github.event.inputs.DEPLOYMENT_METHOD == 'cosmovisor' }} - run: | - aws s3 cp s3://${{ env.S3_BUCKET_PATH }}/${{ github.ref_name }}/zetacored ./ || exit 1 - aws s3 cp s3://${{ env.S3_BUCKET_PATH }}/${{ github.ref_name }}/zetaclientd ./ || exit 1 - ZETACORED_CHECKSUM=$(shasum -b -a 256 zetacored | cut -d ' ' -f 1) - ZETACLIENTD_CHECKSUM=$(shasum -b -a 256 zetaclientd | cut -d ' ' -f 1) - echo "ZETACORED_CHECKSUM=$ZETACORED_CHECKSUM" >> $GITHUB_ENV - echo "ZETACLIENTD_CHECKSUM=$ZETACLIENTD_CHECKSUM" >> $GITHUB_ENV - - - name: Update Nodes via Cosmovisor Upgrade Proposal - uses: ./.github/actions/cosmovisor-upgrade - if: ${{ github.event.inputs.DEPLOYMENT_METHOD == 'cosmovisor' }} - with: - UPGRADE_NAME: ${{ github.ref_name }} - CHAIN_ID: ${{ env.CHAIN_ID }} - DESCRIPTION: ${{ github.event.inputs.UPGRADE_NAME }} - ZETACORED_CHECKSUM: ${{ env.ZETACORED_CHECKSUM }} - ZETACORED_URL: "https://${{ env.S3_BUCKET_PATH }}.s3.amazonaws.com/${{ github.ref_name }}/zetacored" - ZETACLIENTD_CHECKSUM: ${{ env.ZETACLIENTD_CHECKSUM }} - ZETACLIENTD_URL: "https://${{ env.S3_BUCKET_PATH }}.s3.amazonaws.com/${{ github.ref_name }}/zetaclientd" - API_ENDPOINT: "https://api.${{ github.event.inputs.ENVIRONMENT }}.zetachain.com" - UPGRADE_BLOCK_HEIGHT: ${{ github.event.inputs.UPGRADE_BLOCK_HEIGHT }} \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 7f88220c26..773ff28c4d 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -3,8 +3,8 @@ name: Publish Release on: push: tags: - - "v*.*.*" - + - "v*.*.*" + concurrency: group: publish-release cancel-in-progress: false diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1995d6b43d..090108f3fa 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -62,7 +62,7 @@ builds: - -X github.com/zeta-chain/zetacore/common.CommitHash={{ .Env.COMMIT }} - -X github.com/zeta-chain/zetacore/common.BuildTime=={{ .Env.BUILDTIME }} - -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -W + - id: "zetaclientd_testnet" main: ./cmd/zetaclientd binary: "zetaclientd_testnet-{{ .Os }}-{{ .Arch }}" @@ -121,6 +121,46 @@ W flags: *default_mock_mainnet_flags ldflags: *default_ldflags + - id: "zetacored_mainnet" + main: ./cmd/zetacored + binary: "zetacored_mainnet-{{ .Os }}-{{ .Arch }}" + env: + - 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}' + - 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}' + goos: + - linux + - darwin + - windows + goarch: + - arm64 + - amd64 + ignore: + - goos: windows + goarch: arm64 + flags: &default_mainnet_flags + - -tags=pebbledb,ledger,cgo + ldflags: *default_ldflags + + - id: "zetaclientd_mainnet" + main: ./cmd/zetaclientd + binary: "zetaclientd_mainnet-{{ .Os }}-{{ .Arch }}" + env: + - 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}' + - 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}' + goos: + - linux + # - darwin + # - windows + goarch: + - arm64 + - amd64 + ignore: + - goos: windows + goarch: arm64 + flags: *default_mainnet_flags + ldflags: *default_ldflags + + archives: - format: binary name_template: "{{ .Binary }}" diff --git a/Dockerfile-versioned b/Dockerfile-versioned index 0ec85f149e..c948817829 100644 --- a/Dockerfile-versioned +++ b/Dockerfile-versioned @@ -29,7 +29,6 @@ RUN cp $GOPATH/bin/smoketest $GOPATH/bin/new/ # Checkout and build old binary RUN cd node && git checkout ${old_version} -RUN cd node && git pull RUN cd node && make install RUN cd node && make install-smoketest RUN cp $GOPATH/bin/zetacored $GOPATH/bin/old/ diff --git a/Makefile b/Makefile index 575057ef70..c5662752b0 100644 --- a/Makefile +++ b/Makefile @@ -222,7 +222,7 @@ stop-stress-test: stateful-upgrade: @echo "--> Starting stateful smoketest" - $(DOCKER) build --build-arg old_version=v9.0.0-rc2 --build-arg new_version=v10.0.0 -t zetanode -f ./Dockerfile-versioned . + $(DOCKER) build --build-arg old_version=mock-mainnet-01-5-ga66d0b77 --build-arg new_version=v10.0.0-30 -t zetanode -f ./Dockerfile-versioned . $(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/app.go b/app/app.go index 53bfee51cd..fdcd402ed8 100644 --- a/app/app.go +++ b/app/app.go @@ -9,6 +9,9 @@ import ( "github.com/gorilla/mux" "github.com/rakyll/statik/fs" "github.com/spf13/cast" + emissionsModule "github.com/zeta-chain/zetacore/x/emissions" + emissionsModuleKeeper "github.com/zeta-chain/zetacore/x/emissions/keeper" + emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" @@ -97,10 +100,6 @@ import ( zetaCoreModuleKeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper" zetaCoreModuleTypes "github.com/zeta-chain/zetacore/x/crosschain/types" - emissionsModule "github.com/zeta-chain/zetacore/x/emissions" - emissionsModuleKeeper "github.com/zeta-chain/zetacore/x/emissions/keeper" - emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" - fungibleModule "github.com/zeta-chain/zetacore/x/fungible" fungibleModuleKeeper "github.com/zeta-chain/zetacore/x/fungible/keeper" fungibleModuleTypes "github.com/zeta-chain/zetacore/x/fungible/types" diff --git a/cmd/zetaclientd/start.go b/cmd/zetaclientd/start.go index bab4924167..0e770b951f 100644 --- a/cmd/zetaclientd/start.go +++ b/cmd/zetaclientd/start.go @@ -139,6 +139,7 @@ func start(_ *cobra.Command, _ []string) error { err := telemetryServer.Start() if err != nil { startLogger.Error().Err(err).Msg("telemetryServer error") + panic("telemetryServer error") } }() diff --git a/common/chain.go b/common/chain.go index 4d100471d1..63cb26b213 100644 --- a/common/chain.go +++ b/common/chain.go @@ -102,12 +102,6 @@ func IsEVMChain(chainID int64) bool { chainID == 137 // polygon mainnet } -func IsEthereum(chainID int64) bool { - return chainID == 5 || // Goerli - chainID == 1337 || // eth privnet - chainID == 1 // eth mainnet -} - func (chain Chain) IsKlaytnChain() bool { return chain.ChainId == 1001 } diff --git a/common/commands.go b/common/commands.go index d177f499f5..eb51797c3d 100644 --- a/common/commands.go +++ b/common/commands.go @@ -3,5 +3,6 @@ package common // commands for the zetaclient; mostly administrative commands/txs const ( - CmdWhitelistERC20 = "cmd_whitelist_erc20" + CmdWhitelistERC20 = "cmd_whitelist_erc20" + CmdMigrateTssFunds = "cmd_migrate_tss_funds" ) diff --git a/common/default_chains_mainnet.go b/common/default_chains_mainnet.go index e870103232..3b80f2a89e 100644 --- a/common/default_chains_mainnet.go +++ b/common/default_chains_mainnet.go @@ -35,6 +35,10 @@ func BtcChainID() int64 { return BtcMainnetChain().ChainId } +func BtcDustOffset() int64 { + return 0 +} + func PolygonChain() Chain { return Chain{ ChainName: ChainName_polygon_mainnet, diff --git a/common/default_chains_mock_mainnet.go b/common/default_chains_mock_mainnet.go index 0b131f432a..7400f48779 100644 --- a/common/default_chains_mock_mainnet.go +++ b/common/default_chains_mock_mainnet.go @@ -35,6 +35,10 @@ func BtcChainID() int64 { return BtcMainnetChain().ChainId } +func BtcDustOffset() int64 { + return 2000 +} + func PolygonChain() Chain { return Chain{ ChainName: ChainName_polygon_mainnet, diff --git a/common/default_chains_privnet.go b/common/default_chains_privnet.go index e6a0bb80a1..c3cefa0ed4 100644 --- a/common/default_chains_privnet.go +++ b/common/default_chains_privnet.go @@ -28,6 +28,10 @@ func BtcChainID() int64 { return BtcRegtestChain().ChainId } +func BtcDustOffset() int64 { + return 2000 +} + func DefaultChainsList() []*Chain { chains := []Chain{ BtcRegtestChain(), diff --git a/common/default_chains_testnet.go b/common/default_chains_testnet.go index 8220d53ac5..86ed783c0d 100644 --- a/common/default_chains_testnet.go +++ b/common/default_chains_testnet.go @@ -35,6 +35,10 @@ func BtcChainID() int64 { return BtcTestNetChain().ChainId } +func BtcDustOffset() int64 { + return 2000 +} + func MumbaiChain() Chain { return Chain{ ChainName: ChainName_mumbai_testnet, diff --git a/common/headers_test.go b/common/headers_test.go index 96d058cf71..ecef7f6f8a 100644 --- a/common/headers_test.go +++ b/common/headers_test.go @@ -4,7 +4,6 @@ import ( "bytes" "encoding/base64" "fmt" - "log" "testing" "time" @@ -26,7 +25,7 @@ func TestTrueBitcoinHeader(t *testing.T) { // Deserialize the header bytes from base64 headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) require.NoError(t, err) - header := unmarshalHeader(headerBytes) + header := unmarshalHeader(t, headerBytes) // Validate validateTrueBitcoinHeader(t, header, headerBytes) @@ -40,7 +39,7 @@ func TestFakeBitcoinHeader(t *testing.T) { // Deserialize the header bytes from base64 headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) require.NoError(t, err) - header := unmarshalHeader(headerBytes) + header := unmarshalHeader(t, headerBytes) // Validate validateFakeBitcoinHeader(t, header, headerBytes) @@ -60,7 +59,7 @@ func BitcoinHeaderValidationLiveTest(t *testing.T) { // Get the block header header, err := client.GetBlockHeader(blockHash) require.NoError(t, err) - headerBytes := marshalHeader(header) + headerBytes := marshalHeader(t, header) // Validate true header validateTrueBitcoinHeader(t, header, headerBytes) @@ -101,21 +100,17 @@ func copyHeader(header *wire.BlockHeader) *wire.BlockHeader { return copyHeader } -func marshalHeader(header *wire.BlockHeader) []byte { +func marshalHeader(t *testing.T, header *wire.BlockHeader) []byte { var headerBuf bytes.Buffer err := header.Serialize(&headerBuf) - if err != nil { - log.Fatal(err) - } + require.NoError(t, err) return headerBuf.Bytes() } -func unmarshalHeader(headerBytes []byte) *wire.BlockHeader { +func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader { var header wire.BlockHeader err := header.Deserialize(bytes.NewReader(headerBytes)) - if err != nil { - log.Fatal(err) - } + require.NoError(t, err) return &header } @@ -136,52 +131,40 @@ func validateFakeBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerByt // Incorrect header length should fail validation err := common.ValidateBitcoinHeader(headerBytes[:79], blockHash[:], 18332) - if err == nil { - t.Error("Incorrect header length should fail validation") - } + require.Error(t, err) // Incorrect version should fail validation fakeHeader := copyHeader(header) fakeHeader.Version = 0 - fakeBytes := marshalHeader(fakeHeader) + fakeBytes := marshalHeader(t, fakeHeader) fakeHash := fakeHeader.BlockHash() err = common.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) - if err == nil { - t.Error("Incorrect version should fail validation") - } + require.Error(t, err) // Incorrect timestamp should fail validation // Case1: timestamp is before genesis block fakeHeader = copyHeader(header) fakeHeader.Timestamp = chaincfg.TestNet3Params.GenesisBlock.Header.Timestamp.Add(-time.Second) - fakeBytes = marshalHeader(fakeHeader) + fakeBytes = marshalHeader(t, fakeHeader) fakeHash = fakeHeader.BlockHash() err = common.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) - if err == nil { - t.Error("Timestamp before genesis should fail validation") - } + require.Error(t, err) // Case2: timestamp is after 2 hours in the future fakeHeader = copyHeader(header) fakeHeader.Timestamp = header.Timestamp.Add(time.Second * (blockchain.MaxTimeOffsetSeconds + 1)) - fakeBytes = marshalHeader(fakeHeader) + fakeBytes = marshalHeader(t, fakeHeader) err = common.NewBitcoinHeader(fakeBytes).ValidateTimestamp(header.Timestamp) - if err == nil { - t.Error("Timestamp in future should fail validation") - } + require.Error(t, err) // Incorrect block hash should fail validation fakeHeader = copyHeader(header) header.Nonce = 0 - fakeBytes = marshalHeader(header) + fakeBytes = marshalHeader(t, header) err = common.ValidateBitcoinHeader(fakeBytes, blockHash[:], 18332) - if err == nil { - t.Error("Incorrect block hash should fail validation") - } + require.Error(t, err) // PoW not satisfied should fail validation fakeHash = fakeHeader.BlockHash() err = common.ValidateBitcoinHeader(fakeBytes, fakeHash[:], 18332) - if err == nil { - t.Error("PoW not satisfied should fail validation") - } + require.Error(t, err) } diff --git a/common/proof_test.go b/common/proof_test.go index 6e6fd0a588..9f3f958504 100644 --- a/common/proof_test.go +++ b/common/proof_test.go @@ -5,12 +5,10 @@ import ( "os" "testing" - "bytes" "encoding/base64" "encoding/hex" "encoding/json" "fmt" - "log" "github.com/stretchr/testify/require" "github.com/zeta-chain/zetacore/common" @@ -65,7 +63,7 @@ func TestBitcoinMerkleProof(t *testing.T) { // Deserialize the header bytes from base64 headerBytes, err := base64.StdEncoding.DecodeString(b.HeaderBase64) require.NoError(t, err) - header := unmarshalHeader(headerBytes) + header := unmarshalHeader(t, headerBytes) // Deserialize the block bytes from base64 blockBytes, err := base64.StdEncoding.DecodeString(b.BlockBase64) @@ -93,7 +91,7 @@ func BitcoinMerkleProofLiveTest(t *testing.T) { // Get the block header header, err := client.GetBlockHeader(blockHash) require.NoError(t, err) - headerBytes := marshalHeader(header) + headerBytes := marshalHeader(t, header) target := blockchain.CompactToBig(header.Bits) // Get the block with verbose transactions @@ -113,13 +111,9 @@ func validateBitcoinBlock(t *testing.T, header *wire.BlockHeader, headerBytes [] txBodies := [][]byte{} for _, res := range blockVerbose.Tx { txBytes, err := hex.DecodeString(res.Hex) - if err != nil { - log.Fatalf("error decoding transaction hex: %v", err) - } + require.NoError(t, err) tx, err := btcutil.NewTxFromBytes(txBytes) - if err != nil { - log.Fatalf("error deserializing transaction: %v", err) - } + require.NoError(t, err) // Validate Tss SegWit transaction if it's an outTx if res.Txid == outTxid { @@ -128,7 +122,7 @@ func validateBitcoinBlock(t *testing.T, header *wire.BlockHeader, headerBytes [] Nonce: nonce, TxHash: outTxid, } - err = keeper.ValidateBTCOutTxBody(msg, txBytes, tssAddress) + err = keeper.VerifyBTCOutTxBody(msg, txBytes, tssAddress) require.NoError(t, err) } txns = append(txns, tx) @@ -139,26 +133,19 @@ func validateBitcoinBlock(t *testing.T, header *wire.BlockHeader, headerBytes [] mk := bitcoin.NewMerkle(txns) for i := range txns { path, index, err := mk.BuildMerkleProof(i) - if err != nil { - log.Fatalf("Error building merkle proof: %v", err) - } + require.NoError(t, err) // True proof should verify proof := common.NewBitcoinProof(txBodies[i], path, index) txBytes, err := proof.Verify(common.NewBitcoinHeader(headerBytes), 0) - if err != nil { - log.Fatal("Merkle proof verification failed") - } - if !bytes.Equal(txBytes, txBodies[i]) { - log.Fatalf("Transaction body mismatch") - } + require.NoError(t, err) + require.Equal(t, txBytes, txBodies[i]) // Fake proof should not verify fakeIndex := index ^ 0xffffffff // flip all bits fakeProof := common.NewBitcoinProof(txBodies[i], path, fakeIndex) txBytes, err = fakeProof.Verify(common.NewBitcoinHeader(headerBytes), 0) - if err == nil || txBytes != nil { - log.Fatalf("Merkle proof should not verify") - } + require.Error(t, err) + require.Nil(t, txBytes) } } diff --git a/common/utils.go b/common/utils.go index 80f6701736..773c709210 100644 --- a/common/utils.go +++ b/common/utils.go @@ -8,14 +8,10 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ) -const ( - DustUTXOOffset = 2000 -) - // A very special value to mark current nonce in UTXO func NonceMarkAmount(nonce uint64) int64 { // #nosec G701 always in range - return int64(nonce) + DustUTXOOffset // +2000 to avoid being a dust rejection + return int64(nonce) + BtcDustOffset() // +2000 to avoid being a dust rejection } // HashToString convert hash bytes to string diff --git a/contrib/localnet/orchestrator/smoketest/main.go b/contrib/localnet/orchestrator/smoketest/main.go index 9dd12669e0..7d01a5cadf 100644 --- a/contrib/localnet/orchestrator/smoketest/main.go +++ b/contrib/localnet/orchestrator/smoketest/main.go @@ -292,7 +292,7 @@ func LocalSmokeTest(_ *cobra.Command, _ []string) { smokeTest.CheckZRC20ReserveAndSupply() smokeTest.TestBitcoinWithdraw() - //smokeTest.CheckZRC20ReserveAndSupply() + smokeTest.CheckZRC20ReserveAndSupply() smokeTest.TestCrosschainSwap() smokeTest.CheckZRC20ReserveAndSupply() diff --git a/contrib/localnet/orchestrator/start-upgrade.sh b/contrib/localnet/orchestrator/start-upgrade.sh index b787a5b0da..a9e123ad72 100644 --- a/contrib/localnet/orchestrator/start-upgrade.sh +++ b/contrib/localnet/orchestrator/start-upgrade.sh @@ -29,9 +29,9 @@ if [ $SMOKETEST_EXIT_CODE -ne 0 ]; then fi # Restart zetaclients at upgrade height -/work/restart-zetaclientd.sh -u 330 -n 2 +/work/restart-zetaclientd.sh -u 400 -n 2 -smoketest-new "$SMOKETEST_CMD" --deployed --wait-for 335 +smoketest-new "$SMOKETEST_CMD" --deployed --wait-for 405 if [ $SMOKETEST_EXIT_CODE -eq 0 ]; then echo "smoketest passed" diff --git a/contrib/localnet/scripts/genesis-stateful.sh b/contrib/localnet/scripts/genesis-stateful.sh index 5f9f293f1b..ff3a0b4646 100755 --- a/contrib/localnet/scripts/genesis-stateful.sh +++ b/contrib/localnet/scripts/genesis-stateful.sh @@ -174,7 +174,7 @@ 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 320 --title $UpgradeName --description $UpgradeName --keyring-backend test --chain-id $CHAINID --yes --no-validate --fees=200azeta --broadcast-mode block +/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 fi sleep 8 diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 5791f496f4..c53284398a 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -26841,6 +26841,11 @@ paths: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' + parameters: + - name: tss_pub_key + in: query + required: false + type: string tags: - Query /zeta-chain/crosschain/in_tx_hash_to_cctx_data/{inTxHash}: @@ -27928,6 +27933,21 @@ paths: $ref: '#/definitions/googlerpcStatus' tags: - Query + /zeta-chain/zetacore/fungible/gas_stability_pool_balance: + get: + summary: Queries all gas stability pool balances. + operationId: Query_GasStabilityPoolBalanceAll + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/fungibleQueryAllGasStabilityPoolBalanceResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Query /zeta-chain/zetacore/fungible/gas_stability_pool_balance/{chain_id}: get: summary: Queries the balance of a gas stability pool on a given chain. @@ -50320,6 +50340,14 @@ definitions: - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + QueryAllGasStabilityPoolBalanceResponseBalance: + type: object + properties: + chain_id: + type: string + format: int64 + balance: + type: string bitcoinProof: type: object properties: @@ -50585,6 +50613,8 @@ definitions: type: object crosschainMsgGasPriceVoterResponse: type: object + crosschainMsgMigrateTssFundsResponse: + type: object crosschainMsgNonceVoterResponse: type: object crosschainMsgRemoveFromOutTxTrackerResponse: @@ -50987,6 +51017,14 @@ definitions: $ref: '#/definitions/fungibleForeignCoins' pagination: $ref: '#/definitions/v1beta1PageResponse' + fungibleQueryAllGasStabilityPoolBalanceResponse: + type: object + properties: + balances: + type: array + items: + type: object + $ref: '#/definitions/QueryAllGasStabilityPoolBalanceResponseBalance' fungibleQueryGetForeignCoinsResponse: type: object properties: @@ -51002,8 +51040,6 @@ definitions: fungibleQueryGetGasStabilityPoolBalanceResponse: type: object properties: - contract_address: - type: string balance: type: string fungibleQueryGetSystemContractResponse: diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index 4cde7949b7..7ad44e674e 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -247,3 +247,13 @@ message MsgUpdateTssAddress { } ``` +## MsgMigrateTssFunds + +```proto +message MsgMigrateTssFunds { + string creator = 1; + int64 chain_id = 2; + string amount = 3; +} +``` + diff --git a/proto/crosschain/query.proto b/proto/crosschain/query.proto index 64f18e8152..e05265258d 100644 --- a/proto/crosschain/query.proto +++ b/proto/crosschain/query.proto @@ -229,7 +229,9 @@ message QueryAllInTxHashToCctxResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryGetTssAddressRequest {} +message QueryGetTssAddressRequest { + string tss_pub_key = 1; +} message QueryGetTssAddressResponse { string eth = 1; diff --git a/proto/crosschain/tx.proto b/proto/crosschain/tx.proto index bd1cf345fb..b34fa2f47d 100644 --- a/proto/crosschain/tx.proto +++ b/proto/crosschain/tx.proto @@ -18,9 +18,20 @@ service Msg { rpc VoteOnObservedInboundTx(MsgVoteOnObservedInboundTx) returns (MsgVoteOnObservedInboundTxResponse); rpc WhitelistERC20(MsgWhitelistERC20) returns (MsgWhitelistERC20Response); rpc UpdateTssAddress(MsgUpdateTssAddress) returns (MsgUpdateTssAddressResponse); + rpc MigrateTssFunds(MsgMigrateTssFunds) returns (MsgMigrateTssFundsResponse); // rpc ProveOutboundTx(MsgProveOutboundTx) returns (MsgProveOutboundTxResponse); } +message MsgMigrateTssFunds { + string creator = 1; + int64 chain_id = 2; + string amount = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", + (gogoproto.nullable) = false + ]; +} +message MsgMigrateTssFundsResponse {} + message MsgAddToInTxTracker { string creator = 1; int64 chain_id = 2; diff --git a/proto/fungible/query.proto b/proto/fungible/query.proto index 9abb33095c..a54730ba76 100644 --- a/proto/fungible/query.proto +++ b/proto/fungible/query.proto @@ -40,6 +40,11 @@ service Query { rpc GasStabilityPoolBalance(QueryGetGasStabilityPoolBalance) returns (QueryGetGasStabilityPoolBalanceResponse) { option (google.api.http).get = "/zeta-chain/zetacore/fungible/gas_stability_pool_balance/{chain_id}"; } + + // Queries all gas stability pool balances. + rpc GasStabilityPoolBalanceAll(QueryAllGasStabilityPoolBalance) returns (QueryAllGasStabilityPoolBalanceResponse) { + option (google.api.http).get = "/zeta-chain/zetacore/fungible/gas_stability_pool_balance"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -86,6 +91,15 @@ message QueryGetGasStabilityPoolBalance { } message QueryGetGasStabilityPoolBalanceResponse { - string contract_address = 1; string balance = 2; } + +message QueryAllGasStabilityPoolBalance {} + +message QueryAllGasStabilityPoolBalanceResponse { + message Balance { + int64 chain_id = 1; + string balance = 2; + } + repeated Balance balances = 1 [(gogoproto.nullable) = false]; +} diff --git a/rpc/websockets.go b/rpc/websockets.go index 1346aad955..84d334e952 100644 --- a/rpc/websockets.go +++ b/rpc/websockets.go @@ -25,6 +25,7 @@ import ( "net" "net/http" "sync" + "time" "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/common" @@ -47,6 +48,13 @@ import ( const ( messageSizeLimit = 32 * 1024 * 1024 // 32MB + +) + +var ( + readTimeout = 15 * time.Second // Time to read the request + writeTimeout = 15 * time.Second // Time to write the response + idleTimeout = 60 * time.Second // Max time for connections using TCP Keep-Alive ) type WebsocketsServer interface { @@ -111,13 +119,21 @@ func (s *websocketsServer) Start() { ws := mux.NewRouter() ws.Handle("/", s) + // configuring the HTTP server + server := &http.Server{ + Addr: s.wsAddr, + Handler: ws, + ReadTimeout: readTimeout, + WriteTimeout: writeTimeout, + IdleTimeout: idleTimeout, + } + go func() { var err error - /* #nosec G114 -- http functions have no support for timeouts */ if s.certFile == "" || s.keyFile == "" { - err = http.ListenAndServe(s.wsAddr, ws) + err = server.ListenAndServe() } else { - err = http.ListenAndServeTLS(s.wsAddr, s.certFile, s.keyFile, ws) + err = server.ListenAndServeTLS(s.certFile, s.keyFile) } if err != nil { diff --git a/testutil/keeper/keeper.go b/testutil/keeper/keeper.go index 316dc4c598..2868f86941 100644 --- a/testutil/keeper/keeper.go +++ b/testutil/keeper/keeper.go @@ -40,7 +40,7 @@ import ( crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" emissionsmodule "github.com/zeta-chain/zetacore/x/emissions" emissionskeeper "github.com/zeta-chain/zetacore/x/emissions/keeper" - emissionstypes "github.com/zeta-chain/zetacore/x/emissions/types" + types2 "github.com/zeta-chain/zetacore/x/emissions/types" fungiblemodule "github.com/zeta-chain/zetacore/x/fungible" fungiblekeeper "github.com/zeta-chain/zetacore/x/fungible/keeper" fungibletypes "github.com/zeta-chain/zetacore/x/fungible/types" @@ -94,16 +94,16 @@ type ZetaKeepers struct { } var moduleAccountPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - crosschaintypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - fungibletypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - emissionstypes.ModuleName: nil, - emissionstypes.UndistributedObserverRewardsPool: nil, - emissionstypes.UndistributedTssRewardsPool: nil, + authtypes.FeeCollectorName: nil, + distrtypes.ModuleName: nil, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + crosschaintypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + fungibletypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + types2.ModuleName: nil, + types2.UndistributedObserverRewardsPool: nil, + types2.UndistributedTssRewardsPool: nil, } // ModuleAccountAddrs returns all the app's module account addresses. @@ -363,7 +363,7 @@ func (zk ZetaKeepers) InitGenesis(ctx sdk.Context) { crosschainmodule.InitGenesis(ctx, *zk.CrosschainKeeper, *crosschaintypes.DefaultGenesis()) } if zk.EmissionsKeeper != nil { - emissionsmodule.InitGenesis(ctx, *zk.EmissionsKeeper, *emissionstypes.DefaultGenesis()) + emissionsmodule.InitGenesis(ctx, *zk.EmissionsKeeper, *types2.DefaultGenesis()) } if zk.FungibleKeeper != nil { fungiblemodule.InitGenesis(ctx, *zk.FungibleKeeper, *fungibletypes.DefaultGenesis()) diff --git a/testutil/simapp/simapp.go b/testutil/simapp/simapp.go index 698af75a72..cde89abbab 100644 --- a/testutil/simapp/simapp.go +++ b/testutil/simapp/simapp.go @@ -16,7 +16,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtypes "github.com/tendermint/tendermint/types" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types" + types2 "github.com/zeta-chain/zetacore/x/emissions/types" //"github.com/ignite-hq/cli/ignite/pkg/cosmoscmd" abci "github.com/tendermint/tendermint/abci/types" @@ -58,7 +58,7 @@ func setup(withGenesis bool, invCheckPeriod uint) (*app.App, app.GenesisState) { return a, app.GenesisState{} } -func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genDelAccs []authtypes.GenesisAccount, bondAmt sdk.Int, emissionParams emissionsModuleTypes.Params, genDelBalances []banktypes.Balance, genBalances []banktypes.Balance) *app.App { +func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genDelAccs []authtypes.GenesisAccount, bondAmt sdk.Int, emissionParams types2.Params, genDelBalances []banktypes.Balance, genBalances []banktypes.Balance) *app.App { app, genesisState := setup(true, 5) // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genDelAccs) @@ -90,9 +90,9 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genDelAc delegations = append(delegations, stakingtypes.NewDelegation(genDelAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) } - emissionsGenesis := emissionsModuleTypes.DefaultGenesis() + emissionsGenesis := types2.DefaultGenesis() emissionsGenesis.Params = emissionParams - genesisState[emissionsModuleTypes.ModuleName] = app.AppCodec().MustMarshalJSON(emissionsGenesis) + genesisState[types2.ModuleName] = app.AppCodec().MustMarshalJSON(emissionsGenesis) // set validators and delegations params := stakingtypes.DefaultParams() params.BondDenom = config.BaseDenom diff --git a/x/crosschain/client/cli/cli_cctx.go b/x/crosschain/client/cli/cli_cctx.go index 058233bb77..070764ca44 100644 --- a/x/crosschain/client/cli/cli_cctx.go +++ b/x/crosschain/client/cli/cli_cctx.go @@ -49,6 +49,37 @@ func CmdListSend() *cobra.Command { return cmd } +func CmdPendingCctx() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-pending-cctx [chain-id]", + Short: "shows pending CCTX", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + chainID, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + return err + } + params := &types.QueryAllCctxPendingRequest{ + ChainId: chainID, + } + + res, err := queryClient.CctxAllPending(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + func CmdShowSend() *cobra.Command { cmd := &cobra.Command{ Use: "show-cctx [index]", diff --git a/x/crosschain/client/cli/cli_chain_nonce.go b/x/crosschain/client/cli/cli_chain_nonce.go index dd1ddb2b0d..b5d1dec101 100644 --- a/x/crosschain/client/cli/cli_chain_nonce.go +++ b/x/crosschain/client/cli/cli_chain_nonce.go @@ -72,6 +72,32 @@ func CmdShowChainNonces() *cobra.Command { return cmd } +func CmdListPendingNonces() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-pending-nonces", + Short: "shows a chainNonces", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllPendingNoncesRequest{} + + res, err := queryClient.PendingNoncesAll(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // Transaction CLI ///////////////////////// func CmdNonceVoter() *cobra.Command { diff --git a/x/crosschain/client/cli/cli_tss.go b/x/crosschain/client/cli/cli_tss.go index f3bc6f18f7..0dd93a244c 100644 --- a/x/crosschain/client/cli/cli_tss.go +++ b/x/crosschain/client/cli/cli_tss.go @@ -5,6 +5,7 @@ import ( "fmt" "strconv" + "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cast" "github.com/zeta-chain/zetacore/common" @@ -137,3 +138,32 @@ func CmdUpdateTss() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } + +func CmdMigrateTssFunds() *cobra.Command { + cmd := &cobra.Command{ + Use: "migrate-tss-funds [chainID] [amount]", + Short: "Migrate TSS funds to the latest TSS address", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + + argsChainID, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + return err + } + argsAmount := math.NewUintFromString(args[1]) + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgMigrateTssFunds(clientCtx.GetFromAddress().String(), argsChainID, argsAmount) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} diff --git a/x/crosschain/client/cli/query.go b/x/crosschain/client/cli/query.go index e7ced83fe1..21b112a621 100644 --- a/x/crosschain/client/cli/query.go +++ b/x/crosschain/client/cli/query.go @@ -42,6 +42,8 @@ func GetQueryCmd(_ string) *cobra.Command { CmdQueryParams(), CmdGetTssAddress(), CmdListTssHistory(), + CmdListPendingNonces(), + CmdPendingCctx(), CmdListInTxTrackerByChain(), CmdListInTxTrackers(), ) diff --git a/x/crosschain/client/cli/query_get_tss_address.go b/x/crosschain/client/cli/query_get_tss_address.go index 3c95d715cc..785dd05a03 100644 --- a/x/crosschain/client/cli/query_get_tss_address.go +++ b/x/crosschain/client/cli/query_get_tss_address.go @@ -9,19 +9,25 @@ import ( func CmdGetTssAddress() *cobra.Command { cmd := &cobra.Command{ - Use: "get-tss-address", + Use: "get-tss-address [tss-pubkey]", Short: "Query current tss address", - Args: cobra.NoArgs, + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err } + tssPubKey := "" + if len(args) == 1 { + tssPubKey = args[0] + } queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetTssAddressRequest{} + params := &types.QueryGetTssAddressRequest{ + TssPubKey: tssPubKey, + } res, err := queryClient.GetTssAddress(cmd.Context(), params) if err != nil { diff --git a/x/crosschain/client/cli/tx.go b/x/crosschain/client/cli/tx.go index d7891a5fe9..868ff07549 100644 --- a/x/crosschain/client/cli/tx.go +++ b/x/crosschain/client/cli/tx.go @@ -29,6 +29,7 @@ func GetTxCmd() *cobra.Command { CmdCCTXInboundVoter(), CmdRemoveFromWatchList(), CmdUpdateTss(), + CmdMigrateTssFunds(), CmdAddToInTxTracker(), ) diff --git a/x/crosschain/keeper/gas_payment.go b/x/crosschain/keeper/gas_payment.go index 9cd5e0f916..a370c7a672 100644 --- a/x/crosschain/keeper/gas_payment.go +++ b/x/crosschain/keeper/gas_payment.go @@ -223,10 +223,12 @@ func (k Keeper) PayGasInERC20AndUpdateCctx( ) gasObtained := amounts[2] + // FIXME: investigate small mismatches between gasObtained and outTxGasFee + // https://github.com/zeta-chain/node/issues/1303 // check if the final gas received after swap matches the gas fee defined // if not there might be issues with the pool liquidity and it is safer from an accounting perspective to return an error - if gasObtained.Cmp(outTxGasFee.BigInt()) != 0 { - return cosmoserrors.Wrapf(types.ErrInvalidGasAmount, "gas obtained for burn (%s) not equal to gas fee(%s)", gasObtained, outTxGasFee) + if gasObtained.Cmp(outTxGasFee.BigInt()) == -1 { + return cosmoserrors.Wrapf(types.ErrInvalidGasAmount, "gas obtained for burn (%s) is lower than gas fee(%s)", gasObtained, outTxGasFee) } // burn the gas ZRC20 @@ -333,6 +335,9 @@ func (k Keeper) PayGasInZetaAndUpdateCctx( "zetaAmountIn", amounts[0], "zrc20AmountOut", amounts[1], ) + + // FIXME: investigate small mismatches between amounts[1] and outTxGasFee + // https://github.com/zeta-chain/node/issues/1303 err = k.fungibleKeeper.CallZRC20Burn(ctx, types.ModuleAddressEVM, gasZRC20, amounts[1], noEthereumTxEvent) if err != nil { return cosmoserrors.Wrap(err, "PayGasInZetaAndUpdateCctx: unable to CallZRC20Burn") diff --git a/x/crosschain/keeper/grpc_query_get_tss_address.go b/x/crosschain/keeper/grpc_query_get_tss_address.go index e7f5001361..6d21719388 100644 --- a/x/crosschain/keeper/grpc_query_get_tss_address.go +++ b/x/crosschain/keeper/grpc_query_get_tss_address.go @@ -21,16 +21,27 @@ func (k Keeper) GetTssAddress(goCtx context.Context, req *types.QueryGetTssAddre } ctx := sdk.UnwrapSDKContext(goCtx) - - tss, found := k.GetTSS(ctx) - if !found { - return nil, status.Error(codes.NotFound, "not found") + var tssPubKey string + if req.TssPubKey == "" { + tss, found := k.GetTSS(ctx) + if !found { + return nil, status.Error(codes.NotFound, "current tss not set") + } + tssPubKey = tss.TssPubkey + } else { + tssList := k.GetAllTSS(ctx) + for _, t := range tssList { + if t.TssPubkey == req.TssPubKey { + tssPubKey = t.TssPubkey + break + } + } } - ethAddress, err := getTssAddrEVM(tss.TssPubkey) + ethAddress, err := getTssAddrEVM(tssPubKey) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - btcAddress, err := getTssAddrBTC(tss.TssPubkey) + btcAddress, err := getTssAddrBTC(tssPubKey) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go b/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go index f7d781bfd2..3a07546157 100644 --- a/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go +++ b/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go @@ -226,9 +226,13 @@ func (k Keeper) FundGasStabilityPoolFromRemainingFees(ctx sdk.Context, outboundT gasLimit := outboundTxParams.OutboundTxEffectiveGasLimit gasPrice := math.NewUintFromBigInt(outboundTxParams.OutboundTxEffectiveGasPrice.BigInt()) + if gasLimit == gasUsed { + return nil + } + // We skip gas stability pool funding if one of the params is zero if gasLimit > 0 && gasUsed > 0 && !gasPrice.IsZero() { - if gasLimit >= gasUsed { + if gasLimit > gasUsed { remainingGas := gasLimit - gasUsed remainingFees := math.NewUint(remainingGas).Mul(gasPrice).BigInt() diff --git a/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx_test.go b/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx_test.go index 1cb362df6f..b5ad6ab78d 100644 --- a/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx_test.go +++ b/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx_test.go @@ -26,6 +26,13 @@ func TestKeeper_FundGasStabilityPoolFromRemainingFees(t *testing.T) { fundStabilityPoolExpectedRemainingFee *big.Int isError bool }{ + { + name: "no call if gasLimit is equal to gasUsed", + effectiveGasLimit: 42, + gasUsed: 42, + effectiveGasPrice: math.NewInt(42), + expectFundStabilityPoolCall: false, + }, { name: "no call if gasLimit is 0", effectiveGasLimit: 0, diff --git a/x/crosschain/keeper/keeper_out_tx_tracker.go b/x/crosschain/keeper/keeper_out_tx_tracker.go index 55a5d0390e..1be2b0e8a4 100644 --- a/x/crosschain/keeper/keeper_out_tx_tracker.go +++ b/x/crosschain/keeper/keeper_out_tx_tracker.go @@ -114,17 +114,15 @@ func (k Keeper) OutTxTrackerAllByChain(c context.Context, req *types.QueryAllOut var outTxTrackers []types.OutTxTracker ctx := sdk.UnwrapSDKContext(c) - store := ctx.KVStore(k.storeKey) - outTxTrackerStore := prefix.NewStore(store, types.KeyPrefix(types.OutTxTrackerKeyPrefix)) + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.OutTxTrackerKeyPrefix)) + chainStore := prefix.NewStore(store, types.KeyPrefix(fmt.Sprintf("%d-", req.Chain))) - pageRes, err := query.Paginate(outTxTrackerStore, req.Pagination, func(key []byte, value []byte) error { + pageRes, err := query.Paginate(chainStore, req.Pagination, func(key []byte, value []byte) error { var outTxTracker types.OutTxTracker if err := k.cdc.Unmarshal(value, &outTxTracker); err != nil { return err } - if outTxTracker.ChainId == req.Chain { - outTxTrackers = append(outTxTrackers, outTxTracker) - } + outTxTrackers = append(outTxTrackers, outTxTracker) return nil }) diff --git a/x/crosschain/keeper/msg_migrate_tss_funds.go b/x/crosschain/keeper/msg_migrate_tss_funds.go new file mode 100644 index 0000000000..85107860dc --- /dev/null +++ b/x/crosschain/keeper/msg_migrate_tss_funds.go @@ -0,0 +1,140 @@ +package keeper + +import ( + "context" + "fmt" + "sort" + + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/crypto" + tmbytes "github.com/tendermint/tendermint/libs/bytes" + tmtypes "github.com/tendermint/tendermint/types" + "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/x/crosschain/types" + observerTypes "github.com/zeta-chain/zetacore/x/observer/types" +) + +func (k msgServer) MigrateTssFunds(goCtx context.Context, msg *types.MsgMigrateTssFunds) (*types.MsgMigrateTssFundsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + if msg.Creator != k.zetaObserverKeeper.GetParams(ctx).GetAdminPolicyAccount(observerTypes.Policy_Type_group2) { + return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Update can only be executed by the correct policy account") + } + if k.zetaObserverKeeper.IsInboundEnabled(ctx) { + return nil, errorsmod.Wrap(types.ErrUnableToUpdateTss, "cannot migrate funds while inbound is enabled") + } + tss, found := k.GetTSS(ctx) + if !found { + return nil, errorsmod.Wrap(types.ErrUnableToUpdateTss, "cannot find current TSS") + } + pendingNonces, found := k.GetPendingNonces(ctx, tss.TssPubkey, msg.ChainId) + if !found { + return nil, errorsmod.Wrap(types.ErrUnableToUpdateTss, "cannot find pending nonces for chain") + } + if pendingNonces.NonceLow != pendingNonces.NonceHigh { + return nil, errorsmod.Wrap(types.ErrUnableToUpdateTss, "cannot migrate funds when there are pending nonces") + } + err := k.MigrateTSSFundsForChain(ctx, msg.ChainId, msg.Amount, tss) + if err != nil { + return nil, errorsmod.Wrap(types.ErrUnableToUpdateTss, err.Error()) + } + return &types.MsgMigrateTssFundsResponse{}, nil +} + +func (k Keeper) MigrateTSSFundsForChain(ctx sdk.Context, chainID int64, amount sdkmath.Uint, currentTss types.TSS) error { + tssList := k.GetAllTSS(ctx) + if len(tssList) < 2 { + return errorsmod.Wrap(types.ErrCannotMigrateTss, "only one TSS found") + } + // Sort tssList by FinalizedZetaHeight + sort.SliceStable(tssList, func(i, j int) bool { + return tssList[i].FinalizedZetaHeight < tssList[j].FinalizedZetaHeight + }) + // Always migrate to the latest TSS if multiple TSS addresses have been generated + newTss := tssList[len(tssList)-1] + ethAddressOld, err := getTssAddrEVM(currentTss.TssPubkey) + if err != nil { + return err + } + btcAddressOld, err := getTssAddrBTC(currentTss.TssPubkey) + if err != nil { + return err + } + ethAddressNew, err := getTssAddrEVM(newTss.TssPubkey) + if err != nil { + return err + } + btcAddressNew, err := getTssAddrBTC(newTss.TssPubkey) + if err != nil { + return err + } + + medianGasPrice, isFound := k.GetMedianGasPriceInUint(ctx, chainID) + if !isFound { + return types.ErrUnableToGetGasPrice + } + indexString := fmt.Sprintf("%s-%s-%d-%s-%d", currentTss.TssPubkey, newTss.TssPubkey, chainID, amount.String(), ctx.BlockHeight()) + + hash := crypto.Keccak256Hash([]byte(indexString)) + index := hash.Hex() + + cctx := types.CrossChainTx{ + Creator: "", + Index: index, + ZetaFees: sdkmath.Uint{}, + RelayedMessage: fmt.Sprintf("%s:%s", common.CmdMigrateTssFunds, "Funds Migrator Admin Cmd"), + CctxStatus: &types.Status{ + Status: types.CctxStatus_PendingOutbound, + StatusMessage: "", + LastUpdateTimestamp: 0, + }, + InboundTxParams: &types.InboundTxParams{ + Sender: "", + SenderChainId: chainID, + TxOrigin: "", + CoinType: common.CoinType_Cmd, + Asset: "", + Amount: amount, + InboundTxObservedHash: tmbytes.HexBytes(tmtypes.Tx(ctx.TxBytes()).Hash()).String(), + InboundTxObservedExternalHeight: 0, + InboundTxBallotIndex: "", + InboundTxFinalizedZetaHeight: 0, + }, + OutboundTxParams: []*types.OutboundTxParams{{ + Receiver: "", + ReceiverChainId: chainID, + CoinType: common.CoinType_Cmd, + Amount: amount, + OutboundTxTssNonce: 0, + OutboundTxGasLimit: 1_000_000, + OutboundTxGasPrice: medianGasPrice.MulUint64(2).String(), + OutboundTxHash: "", + OutboundTxBallotIndex: "", + OutboundTxObservedExternalHeight: 0, + OutboundTxGasUsed: 0, + OutboundTxEffectiveGasPrice: sdkmath.Int{}, + OutboundTxEffectiveGasLimit: 0, + TssPubkey: currentTss.TssPubkey, + }}} + + if common.IsEVMChain(chainID) { + cctx.InboundTxParams.Sender = ethAddressOld.String() + cctx.GetCurrentOutTxParam().Receiver = ethAddressNew.String() + } + if common.IsBitcoinChain(chainID) { + cctx.InboundTxParams.Sender = btcAddressOld + cctx.GetCurrentOutTxParam().Receiver = btcAddressNew + } + if cctx.GetCurrentOutTxParam().Receiver == "" { + return errorsmod.Wrap(types.ErrCannotMigrateTss, fmt.Sprintf("chain %d is not supported", chainID)) + } + err = k.UpdateNonce(ctx, chainID, &cctx) + if err != nil { + return err + } + k.SetCctxAndNonceToCctxAndInTxHashToCctx(ctx, cctx) + EmitEventInboundFinalized(ctx, &cctx) + return nil +} diff --git a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go index 37c788b3da..c562f2344b 100644 --- a/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go +++ b/x/crosschain/keeper/msg_server_add_to_outtx_tracker.go @@ -20,7 +20,7 @@ import ( // AddToOutTxTracker adds a new record to the outbound transaction tracker. // only the admin policy account and the observer validators are authorized to broadcast this message without proof. -func (k Keeper) AddToOutTxTracker(goCtx context.Context, msg *types.MsgAddToOutTxTracker) (*types.MsgAddToOutTxTrackerResponse, error) { +func (k msgServer) AddToOutTxTracker(goCtx context.Context, msg *types.MsgAddToOutTxTracker) (*types.MsgAddToOutTxTrackerResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) chain := k.zetaObserverKeeper.GetParams(ctx).GetChainFromChainID(msg.ChainId) if chain == nil { diff --git a/x/crosschain/types/errors.go b/x/crosschain/types/errors.go index 6cacdb2328..c9186f9795 100644 --- a/x/crosschain/types/errors.go +++ b/x/crosschain/types/errors.go @@ -38,7 +38,8 @@ var ( ErrInvalidGasAmount = errorsmod.Register(ModuleName, 1137, "invalid gas amount") ErrNoLiquidityPool = errorsmod.Register(ModuleName, 1138, "no liquidity pool") ErrInvalidCoinType = errorsmod.Register(ModuleName, 1139, "invalid coin type") + ErrCannotMigrateTss = errorsmod.Register(ModuleName, 1140, "Cannot migrate TSS funds") - ErrCannotVerifyProof = errorsmod.Register(ModuleName, 1140, "cannot verify proof") - ErrTxBodyVerificationFail = errorsmod.Register(ModuleName, 1141, "transaction body verification fail") + ErrCannotVerifyProof = errorsmod.Register(ModuleName, 1141, "cannot verify proof") + ErrTxBodyVerificationFail = errorsmod.Register(ModuleName, 1142, "transaction body verification fail") ) diff --git a/x/crosschain/types/messages_migrate_tss_funds.go b/x/crosschain/types/messages_migrate_tss_funds.go new file mode 100644 index 0000000000..b667f4192c --- /dev/null +++ b/x/crosschain/types/messages_migrate_tss_funds.go @@ -0,0 +1,54 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/zeta-chain/zetacore/common" +) + +var _ sdk.Msg = &MsgMigrateTssFunds{} + +func NewMsgMigrateTssFunds(creator string, chainID int64, amount sdkmath.Uint) *MsgMigrateTssFunds { + return &MsgMigrateTssFunds{ + Creator: creator, + ChainId: chainID, + Amount: amount, + } +} + +func (msg *MsgMigrateTssFunds) Route() string { + return RouterKey +} + +func (msg *MsgMigrateTssFunds) Type() string { + return "MigrateTssFunds" +} + +func (msg *MsgMigrateTssFunds) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgMigrateTssFunds) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgMigrateTssFunds) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + if common.GetChainFromChainID(msg.ChainId) == nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid chain id (%d)", msg.ChainId) + } + if msg.Amount.IsZero() { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "amount cannot be zero") + } + return nil +} diff --git a/x/crosschain/types/messages_migrate_tss_funds_test.go b/x/crosschain/types/messages_migrate_tss_funds_test.go new file mode 100644 index 0000000000..bde8ebf02d --- /dev/null +++ b/x/crosschain/types/messages_migrate_tss_funds_test.go @@ -0,0 +1,59 @@ +package types_test + +import ( + "testing" + + sdkmath "cosmossdk.io/math" + "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/common" + "github.com/zeta-chain/zetacore/x/crosschain/types" + observerTypes "github.com/zeta-chain/zetacore/x/observer/types" +) + +func TestNewMsgMigrateTssFunds(t *testing.T) { + tests := []struct { + name string + msg types.MsgMigrateTssFunds + error bool + }{ + { + name: "invalid creator", + msg: types.MsgMigrateTssFunds{ + Creator: "invalid_address", + ChainId: common.GoerliChain().ChainId, + Amount: sdkmath.NewUintFromString("100000"), + }, + error: true, + }, + { + name: "invalid chain id", + msg: types.MsgMigrateTssFunds{ + Creator: "zeta15ruj2tc76pnj9xtw64utktee7cc7w6vzaes73z", + ChainId: 999, + Amount: sdkmath.NewUintFromString("100000"), + }, + error: true, + }, + { + name: "valid msg", + msg: types.MsgMigrateTssFunds{ + Creator: "zeta15ruj2tc76pnj9xtw64utktee7cc7w6vzaes73z", + ChainId: common.GoerliChain().ChainId, + Amount: sdkmath.NewUintFromString("100000"), + }, + error: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + observerTypes.SetConfig(false) + err := tt.msg.ValidateBasic() + if tt.error { + require.Error(t, err) + return + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/crosschain/types/query.pb.go b/x/crosschain/types/query.pb.go index 4d3496ad39..868abf1169 100644 --- a/x/crosschain/types/query.pb.go +++ b/x/crosschain/types/query.pb.go @@ -947,6 +947,7 @@ func (m *QueryAllInTxHashToCctxResponse) GetPagination() *query.PageResponse { } type QueryGetTssAddressRequest struct { + TssPubKey string `protobuf:"bytes,1,opt,name=tss_pub_key,json=tssPubKey,proto3" json:"tss_pub_key,omitempty"` } func (m *QueryGetTssAddressRequest) Reset() { *m = QueryGetTssAddressRequest{} } @@ -982,6 +983,13 @@ func (m *QueryGetTssAddressRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetTssAddressRequest proto.InternalMessageInfo +func (m *QueryGetTssAddressRequest) GetTssPubKey() string { + if m != nil { + return m.TssPubKey + } + return "" +} + 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"` @@ -3265,203 +3273,204 @@ func init() { func init() { proto.RegisterFile("crosschain/query.proto", fileDescriptor_65a992045e92a606) } var fileDescriptor_65a992045e92a606 = []byte{ - // 3130 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xdb, 0x6f, 0x1b, 0xc7, - 0xd5, 0xf7, 0x8a, 0xb2, 0x2e, 0x23, 0xc9, 0x92, 0xc7, 0x8a, 0xc3, 0x30, 0xb6, 0xe8, 0xac, 0x63, - 0xcb, 0xf1, 0x85, 0x8c, 0x15, 0x5b, 0x49, 0x6c, 0x27, 0x5f, 0x24, 0x3b, 0x56, 0x8c, 0x28, 0x89, - 0xbe, 0x95, 0xf2, 0x7d, 0xad, 0x8b, 0x96, 0x58, 0x2d, 0xc7, 0xd4, 0x22, 0x24, 0x97, 0xd9, 0x19, - 0x0a, 0x52, 0x0c, 0xb5, 0x40, 0x1e, 0xfa, 0x1c, 0xa0, 0x40, 0xfb, 0xd2, 0xd7, 0x5e, 0x1e, 0xfa, - 0x50, 0xa0, 0x41, 0x53, 0xa0, 0x40, 0x8a, 0xa2, 0xad, 0x9b, 0xc7, 0xa0, 0x05, 0x8a, 0x5e, 0x00, - 0xa2, 0x48, 0xfa, 0xc4, 0xff, 0xa0, 0x40, 0x1f, 0x8a, 0x39, 0x7b, 0x96, 0x3b, 0xcb, 0xdd, 0x15, - 0x57, 0x14, 0x13, 0xb4, 0x2f, 0xe2, 0xcc, 0x99, 0x3d, 0x67, 0x7e, 0xe7, 0xcc, 0x39, 0x33, 0x67, - 0xf6, 0xac, 0xc8, 0x49, 0xcb, 0x75, 0x38, 0xb7, 0xb6, 0x4c, 0xbb, 0x5e, 0x7c, 0xb7, 0xc9, 0xdc, - 0xdd, 0x42, 0xc3, 0x75, 0x84, 0x43, 0x4f, 0xbf, 0xc7, 0x84, 0x09, 0xe4, 0x02, 0xb4, 0x1c, 0x97, - 0x15, 0x82, 0x47, 0x73, 0x17, 0x2d, 0x87, 0xd7, 0x1c, 0x5e, 0xdc, 0x34, 0x39, 0xf3, 0xf8, 0x8a, - 0xdb, 0x57, 0x37, 0x99, 0x30, 0xaf, 0x16, 0x1b, 0x66, 0xc5, 0xae, 0x9b, 0xc2, 0x76, 0xea, 0x9e, - 0xa8, 0xdc, 0x69, 0x65, 0x0a, 0xf8, 0x5b, 0xaa, 0x3b, 0x75, 0x8b, 0x71, 0x1c, 0xce, 0xab, 0xc3, - 0xb2, 0x59, 0xf2, 0x1e, 0x12, 0x3b, 0xf8, 0x40, 0x4e, 0x79, 0xa0, 0x62, 0xf2, 0x52, 0xc3, 0xb5, - 0x2d, 0x86, 0x63, 0x67, 0x95, 0x31, 0xe0, 0x29, 0x6d, 0x99, 0x7c, 0xab, 0x24, 0x9c, 0x92, 0x65, - 0x75, 0x04, 0xcc, 0x45, 0x1e, 0x12, 0xae, 0x69, 0xbd, 0xc3, 0x5c, 0x1c, 0xd7, 0x95, 0xf1, 0xaa, - 0xc9, 0x45, 0x69, 0xb3, 0xea, 0x58, 0xef, 0x94, 0xb6, 0x98, 0x5d, 0xd9, 0x12, 0x31, 0x32, 0x00, - 0x7e, 0xd7, 0x1c, 0xaa, 0x16, 0x4e, 0x53, 0x44, 0x27, 0x79, 0x5c, 0x79, 0xa0, 0x61, 0xba, 0x66, - 0xcd, 0xd7, 0x7f, 0x56, 0x19, 0x10, 0xbc, 0x43, 0xad, 0x38, 0x15, 0x07, 0x9a, 0x45, 0xd9, 0x42, - 0xea, 0xa9, 0x8a, 0xe3, 0x54, 0xaa, 0xac, 0x68, 0x36, 0xec, 0xa2, 0x59, 0xaf, 0x3b, 0x02, 0xec, - 0x8c, 0x3c, 0x7a, 0x96, 0x9c, 0xfc, 0x5f, 0xb9, 0x14, 0x1b, 0x9c, 0xbf, 0x66, 0x73, 0xe1, 0xb8, - 0xbb, 0x06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 0xfa, 0xd9, 0x9c, 0xf6, 0xf7, - 0xcf, 0xe6, 0xb4, 0x0f, 0x3e, 0x9f, 0x3b, 0xf2, 0xe9, 0xe7, 0x73, 0x47, 0xfe, 0xfc, 0xf9, 0xdc, - 0x91, 0xfb, 0x57, 0x2b, 0xb6, 0xd8, 0x6a, 0x6e, 0x16, 0x2c, 0xa7, 0xa6, 0x8a, 0xf1, 0x71, 0x14, - 0x77, 0x42, 0x12, 0x77, 0x1b, 0x8c, 0x6f, 0x8e, 0x40, 0xda, 0xf3, 0xdc, 0xbf, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x22, 0x17, 0xad, 0xf0, 0xf4, 0x35, 0x00, 0x00, + // 3151 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5b, 0xdd, 0x6f, 0x1b, 0xc7, + 0x11, 0xf7, 0x89, 0xfa, 0x5c, 0x4a, 0x96, 0xbc, 0x56, 0x1c, 0x86, 0xb1, 0x45, 0xe7, 0x1c, 0x5b, + 0x8e, 0x3f, 0xc8, 0x58, 0xb1, 0x95, 0xc4, 0x76, 0xd2, 0x48, 0x76, 0xac, 0x18, 0x51, 0x12, 0xf5, + 0xa4, 0xf4, 0xc3, 0x45, 0x4b, 0x9c, 0xc8, 0x35, 0x75, 0x30, 0xc9, 0x63, 0x6e, 0x97, 0x82, 0x14, + 0x43, 0x2d, 0x90, 0x87, 0x3e, 0x07, 0x28, 0xd0, 0xbe, 0xf4, 0xb5, 0x1f, 0x0f, 0x7d, 0x28, 0xd0, + 0xa0, 0x29, 0x50, 0x20, 0x45, 0xd1, 0xd6, 0xcd, 0x63, 0xd0, 0x02, 0x45, 0x3f, 0x00, 0xa2, 0x48, + 0xfa, 0xc4, 0xff, 0xa0, 0x40, 0x1f, 0x8a, 0x9d, 0x9b, 0xe3, 0xed, 0xf1, 0xee, 0xc4, 0x13, 0xc5, + 0x04, 0xed, 0x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 0x66, 0xf2, 0xa9, 0x86, 0xd2, 0x86, 0x23, 0xc0, 0x16, 0x66, 0xb5, 0xa8, 0x70, + 0x4d, 0x2a, 0x47, 0x80, 0x1c, 0xbb, 0xed, 0xb3, 0x76, 0x13, 0xa4, 0xd6, 0x6c, 0x47, 0x38, 0x66, + 0x11, 0x0e, 0xa4, 0x29, 0x5f, 0x6b, 0xa0, 0xc2, 0x6b, 0x7a, 0xbf, 0x29, 0xbd, 0x86, 0x5b, 0xef, + 0x32, 0x0c, 0x0f, 0xf0, 0x1a, 0xd9, 0x37, 0xe0, 0xaf, 0xb7, 0x2d, 0x55, 0x21, 0x05, 0x9e, 0x0e, + 0x6c, 0x4b, 0x90, 0x06, 0xfb, 0x09, 0x71, 0x20, 0x11, 0x99, 0xd9, 0x27, 0x11, 0xb9, 0x48, 0x26, + 0x84, 0x55, 0x63, 0x5c, 0x98, 0xb5, 0x06, 0x46, 0x12, 0xa0, 0xeb, 0x10, 0x0d, 0xbf, 0x49, 0xaf, + 0x92, 0x49, 0x75, 0x55, 0x33, 0x14, 0x42, 0x1e, 0x96, 0x24, 0xb0, 0xda, 0x81, 0x9e, 0x8c, 0x16, + 0x74, 0xca, 0xe3, 0xf0, 0x3c, 0x44, 0x8b, 0x4b, 0x31, 0xf0, 0x97, 0x5e, 0x27, 0x33, 0xf2, 0x66, + 0x52, 0xbc, 0xcf, 0x58, 0xb1, 0xc1, 0x1c, 0x99, 0x9e, 0x65, 0x66, 0x01, 0xcd, 0xb1, 0x76, 0x2b, + 0x37, 0x25, 0xc7, 0xee, 0x30, 0xb6, 0xc6, 0x9c, 0x15, 0x93, 0x1b, 0xc1, 0xae, 0x54, 0xb5, 0x66, + 0xb9, 0xdf, 0x40, 0x64, 0x1e, 0xf3, 0x55, 0xad, 0x59, 0xf0, 0x02, 0xdf, 0xf0, 0x1a, 0x0b, 0x8f, + 0xe6, 0xc9, 0x08, 0xc4, 0x36, 0xfd, 0xbe, 0x46, 0x46, 0xdd, 0x02, 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0xbe, 0xf7, 0x4e, 0xee, 0xf3, 0xc0, 0x2d, 0x34, 0x58, 0x13, 0x4f, 0x86, 0x3a, 0xb2, 0xca, 0x9e, + 0x0c, 0x75, 0x74, 0x09, 0xbe, 0xe7, 0x05, 0xa1, 0x1a, 0x44, 0xf9, 0x63, 0x8d, 0x10, 0xff, 0x7f, + 0x65, 0xe8, 0xb5, 0x24, 0x33, 0x87, 0xfe, 0xeb, 0x26, 0xbb, 0x78, 0x50, 0x36, 0x04, 0xfb, 0x0c, + 0x80, 0x3d, 0x43, 0x9f, 0x8a, 0x01, 0x2b, 0x3a, 0x2c, 0xcb, 0xaf, 0x7f, 0xfc, 0xe9, 0x9c, 0xf6, + 0xc9, 0xa7, 0x73, 0xda, 0x3f, 0x3f, 0x9d, 0xd3, 0xde, 0xff, 0x6c, 0xee, 0xc8, 0x27, 0x9f, 0xcd, + 0x1d, 0xf9, 0xeb, 0x67, 0x73, 0x47, 0xee, 0x5d, 0xa9, 0x58, 0x62, 0xab, 0xb9, 0x99, 0x2f, 0xd9, + 0x35, 0x55, 0x8c, 0x87, 0xa3, 0xb0, 0x13, 0x90, 0xb8, 0xdb, 0x60, 0x7c, 0x73, 0x14, 0xd2, 0x9e, + 0xe7, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x16, 0xbf, 0x39, 0xb6, 0x14, 0x36, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5256,6 +5265,13 @@ func (m *QueryGetTssAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l + if len(m.TssPubKey) > 0 { + i -= len(m.TssPubKey) + copy(dAtA[i:], m.TssPubKey) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TssPubKey))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -7292,6 +7308,10 @@ func (m *QueryGetTssAddressRequest) Size() (n int) { } var l int _ = l + l = len(m.TssPubKey) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -9858,6 +9878,38 @@ func (m *QueryGetTssAddressRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryGetTssAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TssPubKey", 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.TssPubKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/crosschain/types/query.pb.gw.go b/x/crosschain/types/query.pb.gw.go index 78e4bc5ddf..ee6cee4368 100644 --- a/x/crosschain/types/query.pb.gw.go +++ b/x/crosschain/types/query.pb.gw.go @@ -469,10 +469,21 @@ func local_request_Query_InTxHashToCctxAll_0(ctx context.Context, marshaler runt } +var ( + filter_Query_GetTssAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + 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 + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTssAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetTssAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -482,6 +493,13 @@ func local_request_Query_GetTssAddress_0(ctx context.Context, marshaler runtime. var protoReq QueryGetTssAddressRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTssAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetTssAddress(ctx, &protoReq) return msg, metadata, err diff --git a/x/crosschain/types/tx.pb.go b/x/crosschain/types/tx.pb.go index 260bec322a..279eeffffd 100644 --- a/x/crosschain/types/tx.pb.go +++ b/x/crosschain/types/tx.pb.go @@ -31,6 +31,95 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type MsgMigrateTssFunds struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"amount"` +} + +func (m *MsgMigrateTssFunds) Reset() { *m = MsgMigrateTssFunds{} } +func (m *MsgMigrateTssFunds) String() string { return proto.CompactTextString(m) } +func (*MsgMigrateTssFunds) ProtoMessage() {} +func (*MsgMigrateTssFunds) Descriptor() ([]byte, []int) { + return fileDescriptor_81d6d611190b7635, []int{0} +} +func (m *MsgMigrateTssFunds) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMigrateTssFunds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMigrateTssFunds.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 *MsgMigrateTssFunds) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMigrateTssFunds.Merge(m, src) +} +func (m *MsgMigrateTssFunds) XXX_Size() int { + return m.Size() +} +func (m *MsgMigrateTssFunds) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMigrateTssFunds.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMigrateTssFunds proto.InternalMessageInfo + +func (m *MsgMigrateTssFunds) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgMigrateTssFunds) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +type MsgMigrateTssFundsResponse struct { +} + +func (m *MsgMigrateTssFundsResponse) Reset() { *m = MsgMigrateTssFundsResponse{} } +func (m *MsgMigrateTssFundsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgMigrateTssFundsResponse) ProtoMessage() {} +func (*MsgMigrateTssFundsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_81d6d611190b7635, []int{1} +} +func (m *MsgMigrateTssFundsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgMigrateTssFundsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgMigrateTssFundsResponse.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 *MsgMigrateTssFundsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgMigrateTssFundsResponse.Merge(m, src) +} +func (m *MsgMigrateTssFundsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgMigrateTssFundsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgMigrateTssFundsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgMigrateTssFundsResponse proto.InternalMessageInfo + type MsgAddToInTxTracker struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` ChainId int64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -45,7 +134,7 @@ func (m *MsgAddToInTxTracker) Reset() { *m = MsgAddToInTxTracker{} } func (m *MsgAddToInTxTracker) String() string { return proto.CompactTextString(m) } func (*MsgAddToInTxTracker) ProtoMessage() {} func (*MsgAddToInTxTracker) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{0} + return fileDescriptor_81d6d611190b7635, []int{2} } func (m *MsgAddToInTxTracker) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +219,7 @@ func (m *MsgAddToInTxTrackerResponse) Reset() { *m = MsgAddToInTxTracker func (m *MsgAddToInTxTrackerResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddToInTxTrackerResponse) ProtoMessage() {} func (*MsgAddToInTxTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{1} + return fileDescriptor_81d6d611190b7635, []int{3} } func (m *MsgAddToInTxTrackerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -168,7 +257,7 @@ func (m *MsgUpdateTssAddress) Reset() { *m = MsgUpdateTssAddress{} } func (m *MsgUpdateTssAddress) String() string { return proto.CompactTextString(m) } func (*MsgUpdateTssAddress) ProtoMessage() {} func (*MsgUpdateTssAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{2} + return fileDescriptor_81d6d611190b7635, []int{4} } func (m *MsgUpdateTssAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +307,7 @@ func (m *MsgUpdateTssAddressResponse) Reset() { *m = MsgUpdateTssAddress func (m *MsgUpdateTssAddressResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateTssAddressResponse) ProtoMessage() {} func (*MsgUpdateTssAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{3} + return fileDescriptor_81d6d611190b7635, []int{5} } func (m *MsgUpdateTssAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,7 +350,7 @@ func (m *MsgWhitelistERC20) Reset() { *m = MsgWhitelistERC20{} } func (m *MsgWhitelistERC20) String() string { return proto.CompactTextString(m) } func (*MsgWhitelistERC20) ProtoMessage() {} func (*MsgWhitelistERC20) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{4} + return fileDescriptor_81d6d611190b7635, []int{6} } func (m *MsgWhitelistERC20) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -348,7 +437,7 @@ func (m *MsgWhitelistERC20Response) Reset() { *m = MsgWhitelistERC20Resp func (m *MsgWhitelistERC20Response) String() string { return proto.CompactTextString(m) } func (*MsgWhitelistERC20Response) ProtoMessage() {} func (*MsgWhitelistERC20Response) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{5} + return fileDescriptor_81d6d611190b7635, []int{7} } func (m *MsgWhitelistERC20Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -405,7 +494,7 @@ func (m *MsgAddToOutTxTracker) Reset() { *m = MsgAddToOutTxTracker{} } func (m *MsgAddToOutTxTracker) String() string { return proto.CompactTextString(m) } func (*MsgAddToOutTxTracker) ProtoMessage() {} func (*MsgAddToOutTxTracker) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{6} + return fileDescriptor_81d6d611190b7635, []int{8} } func (m *MsgAddToOutTxTracker) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,7 +579,7 @@ func (m *MsgAddToOutTxTrackerResponse) Reset() { *m = MsgAddToOutTxTrack func (m *MsgAddToOutTxTrackerResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddToOutTxTrackerResponse) ProtoMessage() {} func (*MsgAddToOutTxTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{7} + return fileDescriptor_81d6d611190b7635, []int{9} } func (m *MsgAddToOutTxTrackerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -529,7 +618,7 @@ func (m *MsgRemoveFromOutTxTracker) Reset() { *m = MsgRemoveFromOutTxTra func (m *MsgRemoveFromOutTxTracker) String() string { return proto.CompactTextString(m) } func (*MsgRemoveFromOutTxTracker) ProtoMessage() {} func (*MsgRemoveFromOutTxTracker) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{8} + return fileDescriptor_81d6d611190b7635, []int{10} } func (m *MsgRemoveFromOutTxTracker) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -586,7 +675,7 @@ func (m *MsgRemoveFromOutTxTrackerResponse) Reset() { *m = MsgRemoveFrom func (m *MsgRemoveFromOutTxTrackerResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveFromOutTxTrackerResponse) ProtoMessage() {} func (*MsgRemoveFromOutTxTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{9} + return fileDescriptor_81d6d611190b7635, []int{11} } func (m *MsgRemoveFromOutTxTrackerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -626,7 +715,7 @@ func (m *MsgCreateTSSVoter) Reset() { *m = MsgCreateTSSVoter{} } func (m *MsgCreateTSSVoter) String() string { return proto.CompactTextString(m) } func (*MsgCreateTSSVoter) ProtoMessage() {} func (*MsgCreateTSSVoter) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{10} + return fileDescriptor_81d6d611190b7635, []int{12} } func (m *MsgCreateTSSVoter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -690,7 +779,7 @@ func (m *MsgCreateTSSVoterResponse) Reset() { *m = MsgCreateTSSVoterResp func (m *MsgCreateTSSVoterResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateTSSVoterResponse) ProtoMessage() {} func (*MsgCreateTSSVoterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{11} + return fileDescriptor_81d6d611190b7635, []int{13} } func (m *MsgCreateTSSVoterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -731,7 +820,7 @@ func (m *MsgGasPriceVoter) Reset() { *m = MsgGasPriceVoter{} } func (m *MsgGasPriceVoter) String() string { return proto.CompactTextString(m) } func (*MsgGasPriceVoter) ProtoMessage() {} func (*MsgGasPriceVoter) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{12} + return fileDescriptor_81d6d611190b7635, []int{14} } func (m *MsgGasPriceVoter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -802,7 +891,7 @@ func (m *MsgGasPriceVoterResponse) Reset() { *m = MsgGasPriceVoterRespon func (m *MsgGasPriceVoterResponse) String() string { return proto.CompactTextString(m) } func (*MsgGasPriceVoterResponse) ProtoMessage() {} func (*MsgGasPriceVoterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{13} + return fileDescriptor_81d6d611190b7635, []int{15} } func (m *MsgGasPriceVoterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -841,7 +930,7 @@ func (m *MsgNonceVoter) Reset() { *m = MsgNonceVoter{} } func (m *MsgNonceVoter) String() string { return proto.CompactTextString(m) } func (*MsgNonceVoter) ProtoMessage() {} func (*MsgNonceVoter) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{14} + return fileDescriptor_81d6d611190b7635, []int{16} } func (m *MsgNonceVoter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -898,7 +987,7 @@ func (m *MsgNonceVoterResponse) Reset() { *m = MsgNonceVoterResponse{} } func (m *MsgNonceVoterResponse) String() string { return proto.CompactTextString(m) } func (*MsgNonceVoterResponse) ProtoMessage() {} func (*MsgNonceVoterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{15} + return fileDescriptor_81d6d611190b7635, []int{17} } func (m *MsgNonceVoterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -946,7 +1035,7 @@ func (m *MsgVoteOnObservedOutboundTx) Reset() { *m = MsgVoteOnObservedOu func (m *MsgVoteOnObservedOutboundTx) String() string { return proto.CompactTextString(m) } func (*MsgVoteOnObservedOutboundTx) ProtoMessage() {} func (*MsgVoteOnObservedOutboundTx) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{16} + return fileDescriptor_81d6d611190b7635, []int{18} } func (m *MsgVoteOnObservedOutboundTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1052,7 +1141,7 @@ func (m *MsgVoteOnObservedOutboundTxResponse) Reset() { *m = MsgVoteOnOb func (m *MsgVoteOnObservedOutboundTxResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteOnObservedOutboundTxResponse) ProtoMessage() {} func (*MsgVoteOnObservedOutboundTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{17} + return fileDescriptor_81d6d611190b7635, []int{19} } func (m *MsgVoteOnObservedOutboundTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1103,7 +1192,7 @@ func (m *MsgVoteOnObservedInboundTx) Reset() { *m = MsgVoteOnObservedInb func (m *MsgVoteOnObservedInboundTx) String() string { return proto.CompactTextString(m) } func (*MsgVoteOnObservedInboundTx) ProtoMessage() {} func (*MsgVoteOnObservedInboundTx) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{18} + return fileDescriptor_81d6d611190b7635, []int{20} } func (m *MsgVoteOnObservedInboundTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1223,7 +1312,7 @@ func (m *MsgVoteOnObservedInboundTxResponse) Reset() { *m = MsgVoteOnObs func (m *MsgVoteOnObservedInboundTxResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteOnObservedInboundTxResponse) ProtoMessage() {} func (*MsgVoteOnObservedInboundTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{19} + return fileDescriptor_81d6d611190b7635, []int{21} } func (m *MsgVoteOnObservedInboundTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1262,7 +1351,7 @@ func (m *MsgSetNodeKeys) Reset() { *m = MsgSetNodeKeys{} } func (m *MsgSetNodeKeys) String() string { return proto.CompactTextString(m) } func (*MsgSetNodeKeys) ProtoMessage() {} func (*MsgSetNodeKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{20} + return fileDescriptor_81d6d611190b7635, []int{22} } func (m *MsgSetNodeKeys) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1319,7 +1408,7 @@ func (m *MsgSetNodeKeysResponse) Reset() { *m = MsgSetNodeKeysResponse{} func (m *MsgSetNodeKeysResponse) String() string { return proto.CompactTextString(m) } func (*MsgSetNodeKeysResponse) ProtoMessage() {} func (*MsgSetNodeKeysResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_81d6d611190b7635, []int{21} + return fileDescriptor_81d6d611190b7635, []int{23} } func (m *MsgSetNodeKeysResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1349,6 +1438,8 @@ func (m *MsgSetNodeKeysResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetNodeKeysResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*MsgMigrateTssFunds)(nil), "zetachain.zetacore.crosschain.MsgMigrateTssFunds") + proto.RegisterType((*MsgMigrateTssFundsResponse)(nil), "zetachain.zetacore.crosschain.MsgMigrateTssFundsResponse") proto.RegisterType((*MsgAddToInTxTracker)(nil), "zetachain.zetacore.crosschain.MsgAddToInTxTracker") proto.RegisterType((*MsgAddToInTxTrackerResponse)(nil), "zetachain.zetacore.crosschain.MsgAddToInTxTrackerResponse") proto.RegisterType((*MsgUpdateTssAddress)(nil), "zetachain.zetacore.crosschain.MsgUpdateTssAddress") @@ -1376,97 +1467,100 @@ func init() { func init() { proto.RegisterFile("crosschain/tx.proto", fileDescriptor_81d6d611190b7635) } var fileDescriptor_81d6d611190b7635 = []byte{ - // 1432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x4f, 0x1b, 0x47, - 0x14, 0x67, 0x0b, 0x18, 0xfb, 0x81, 0x09, 0x2c, 0x24, 0x6c, 0x96, 0x60, 0xc8, 0xd2, 0xa4, 0xa8, - 0x0a, 0x76, 0xea, 0xb4, 0x6a, 0x9a, 0xf6, 0xd0, 0x80, 0x52, 0x42, 0x53, 0x20, 0x5a, 0x9c, 0x56, - 0xca, 0x65, 0xb5, 0xde, 0x1d, 0xd6, 0x2b, 0xbc, 0x3b, 0xd6, 0xce, 0x18, 0xd9, 0xa8, 0xa7, 0x4a, - 0x3d, 0xf4, 0xd6, 0x43, 0xa5, 0x56, 0xfd, 0x02, 0xfd, 0x2a, 0x39, 0x55, 0x51, 0x4f, 0x4d, 0x0f, - 0x51, 0x9b, 0x7c, 0x82, 0xf6, 0x13, 0x54, 0xf3, 0x67, 0x17, 0xaf, 0xc1, 0x7f, 0x20, 0xca, 0xc9, - 0xf3, 0xde, 0xce, 0xfb, 0xff, 0x7b, 0x33, 0x6f, 0x0c, 0x73, 0x4e, 0x84, 0x09, 0x71, 0x6a, 0xb6, - 0x1f, 0x96, 0x68, 0xab, 0xd8, 0x88, 0x30, 0xc5, 0xea, 0xd2, 0x31, 0xa2, 0x36, 0xe7, 0x15, 0xf9, - 0x0a, 0x47, 0xa8, 0x78, 0xb2, 0x4f, 0x9f, 0x73, 0x70, 0x10, 0xe0, 0xb0, 0x24, 0x7e, 0x84, 0x8c, - 0x3e, 0xef, 0x61, 0x0f, 0xf3, 0x65, 0x89, 0xad, 0x04, 0xd7, 0xf8, 0x57, 0x81, 0xb9, 0x1d, 0xe2, - 0xdd, 0x77, 0xdd, 0x0a, 0xde, 0x0e, 0x2b, 0xad, 0x4a, 0x64, 0x3b, 0x87, 0x28, 0x52, 0x35, 0x98, - 0x70, 0x22, 0x64, 0x53, 0x1c, 0x69, 0xca, 0x8a, 0xb2, 0x96, 0x33, 0x63, 0x52, 0xbd, 0x0a, 0x59, - 0x6e, 0xc5, 0xf2, 0x5d, 0xed, 0x9d, 0x15, 0x65, 0x6d, 0xd4, 0x9c, 0xe0, 0xf4, 0xb6, 0xab, 0x2e, - 0xc0, 0x04, 0x6d, 0x59, 0x35, 0x9b, 0xd4, 0xb4, 0x51, 0x2e, 0x94, 0xa1, 0xad, 0x87, 0x36, 0xa9, - 0xa9, 0xeb, 0x90, 0x73, 0xb0, 0x1f, 0x5a, 0xb4, 0xdd, 0x40, 0xda, 0xd8, 0x8a, 0xb2, 0x36, 0x5d, - 0x9e, 0x29, 0x4a, 0xef, 0x36, 0xb1, 0x1f, 0x56, 0xda, 0x0d, 0x64, 0x66, 0x1d, 0xb9, 0x52, 0x57, - 0x61, 0xbc, 0x11, 0x61, 0x7c, 0xa0, 0x8d, 0xaf, 0x28, 0x6b, 0x93, 0xe5, 0x7c, 0xbc, 0xf5, 0x31, - 0x63, 0x9a, 0xe2, 0x9b, 0xba, 0x04, 0x50, 0xad, 0x63, 0xe7, 0x50, 0xd8, 0xcb, 0x70, 0x7b, 0x39, - 0xce, 0xe1, 0x26, 0xaf, 0x42, 0x96, 0xb6, 0x2c, 0x3f, 0x74, 0x51, 0x4b, 0x9b, 0x10, 0x6e, 0xd2, - 0xd6, 0x36, 0x23, 0x8d, 0x25, 0x58, 0x3c, 0x23, 0x64, 0x13, 0x91, 0x06, 0x0e, 0x09, 0x32, 0x76, - 0x79, 0x46, 0x9e, 0x34, 0x5c, 0x9b, 0xa2, 0x0a, 0x21, 0xf7, 0x5d, 0x37, 0x42, 0x84, 0xf4, 0xc9, - 0xc8, 0x12, 0x00, 0x25, 0xc4, 0x6a, 0x34, 0xab, 0x87, 0xa8, 0xcd, 0x73, 0x92, 0x33, 0x73, 0x94, - 0x90, 0xc7, 0x9c, 0x21, 0xcd, 0x75, 0xeb, 0x4b, 0xcc, 0xfd, 0xa1, 0xc0, 0xec, 0x0e, 0xf1, 0xbe, - 0xa9, 0xf9, 0x14, 0xd5, 0x7d, 0x42, 0x1f, 0x98, 0x9b, 0xe5, 0xdb, 0x7d, 0xac, 0xad, 0x42, 0x1e, - 0x45, 0x4e, 0xf9, 0xb6, 0x65, 0x0b, 0x45, 0xd2, 0xe0, 0x14, 0x67, 0xc6, 0xce, 0x76, 0x16, 0x69, - 0x34, 0x5d, 0x24, 0x15, 0xc6, 0x42, 0x3b, 0x10, 0x65, 0xc8, 0x99, 0x7c, 0xad, 0x5e, 0x81, 0x0c, - 0x69, 0x07, 0x55, 0x5c, 0xe7, 0x19, 0xcf, 0x99, 0x92, 0x52, 0x75, 0xc8, 0xba, 0xc8, 0xf1, 0x03, - 0xbb, 0x4e, 0x78, 0x86, 0xf3, 0x66, 0x42, 0xab, 0x8b, 0x90, 0xf3, 0x6c, 0x62, 0xd5, 0xfd, 0xc0, - 0xa7, 0x32, 0xc3, 0x59, 0xcf, 0x26, 0x5f, 0x31, 0xda, 0xb0, 0xe0, 0xea, 0xa9, 0x98, 0xe2, 0x88, - 0x59, 0x04, 0xc7, 0xa9, 0x08, 0x44, 0x84, 0x53, 0xc7, 0x9d, 0x11, 0x2c, 0x01, 0x38, 0x4e, 0x52, - 0x41, 0x99, 0x54, 0xc6, 0x11, 0x35, 0x7c, 0xa1, 0xc0, 0x7c, 0x5c, 0xc4, 0xbd, 0x26, 0x7d, 0x43, - 0xe0, 0xce, 0xc3, 0x78, 0x88, 0x43, 0x07, 0xf1, 0x5c, 0x8d, 0x99, 0x82, 0xe8, 0x84, 0xf3, 0x58, - 0x0a, 0xce, 0x6f, 0x19, 0x9f, 0x05, 0xb8, 0x76, 0x56, 0x68, 0x09, 0x62, 0x0e, 0x78, 0x72, 0x4d, - 0x14, 0xe0, 0x23, 0xf4, 0x45, 0x84, 0x83, 0xb7, 0x14, 0xbf, 0xb1, 0x0a, 0xd7, 0x7b, 0xda, 0x49, - 0x9c, 0xf9, 0x4d, 0xc0, 0x77, 0x93, 0x19, 0x41, 0x95, 0xfd, 0xfd, 0xaf, 0x31, 0xed, 0xeb, 0x45, - 0xff, 0x66, 0x51, 0xdf, 0x87, 0x99, 0x43, 0xd4, 0xde, 0x42, 0xe1, 0x53, 0x44, 0xed, 0x87, 0xc8, - 0xf7, 0x6a, 0x54, 0x02, 0xf8, 0x14, 0x5f, 0x5d, 0x87, 0x0c, 0xa1, 0x36, 0x6d, 0x12, 0x79, 0xa4, - 0x5c, 0x8e, 0xeb, 0x60, 0x22, 0x07, 0xf9, 0x47, 0x68, 0x9f, 0x7f, 0x34, 0xe5, 0x26, 0x63, 0x91, - 0xa7, 0x2d, 0xed, 0x68, 0x12, 0xc6, 0x2f, 0x0a, 0xcc, 0xec, 0x10, 0x6f, 0xcb, 0x26, 0x8f, 0x23, - 0xdf, 0x41, 0x83, 0xa2, 0xe8, 0x9f, 0xcb, 0x06, 0x53, 0x11, 0xe7, 0x92, 0x13, 0xea, 0x75, 0x98, - 0x12, 0x68, 0x08, 0x9b, 0x41, 0x15, 0x45, 0xdc, 0xe3, 0x31, 0x73, 0x92, 0xf3, 0x76, 0x39, 0x8b, - 0x37, 0x61, 0xb3, 0xd1, 0xa8, 0xb7, 0x93, 0x26, 0xe4, 0x94, 0xa1, 0x83, 0xd6, 0xed, 0x59, 0xe2, - 0xf6, 0x53, 0xc8, 0xef, 0x10, 0x6f, 0x97, 0x95, 0xeb, 0xcd, 0x5c, 0x3e, 0xa3, 0xfc, 0x0b, 0x70, - 0x39, 0xa5, 0x3b, 0x31, 0xfa, 0x62, 0x9c, 0x9f, 0x68, 0x8c, 0xb9, 0x17, 0xee, 0x55, 0x09, 0x8a, - 0x8e, 0x90, 0xbb, 0xd7, 0xa4, 0x55, 0xdc, 0x0c, 0xdd, 0x4a, 0xab, 0x8f, 0x0f, 0x8b,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x6c, 0x45, 0xb7, 0xa3, 0x59, 0x33, 0x43, 0x34, 0xab, 0xba, 0x0c, - 0x93, 0x22, 0x44, 0x8e, 0x51, 0x79, 0x42, 0x02, 0x67, 0x6d, 0x32, 0x8e, 0x7a, 0x13, 0x2e, 0x89, - 0x0d, 0xec, 0x34, 0x11, 0xe8, 0xcd, 0xf2, 0xc8, 0xf3, 0x9c, 0x5d, 0x21, 0x84, 0x23, 0x37, 0x3d, - 0x7a, 0xe4, 0x06, 0x8d, 0x1e, 0xc6, 0x0d, 0x58, 0xed, 0x03, 0xed, 0xa4, 0x05, 0xfe, 0x19, 0x05, - 0xfd, 0xd4, 0xbe, 0xed, 0x70, 0x70, 0x07, 0xb0, 0x26, 0x47, 0xa1, 0x8b, 0x22, 0x09, 0x7f, 0x49, - 0xb1, 0x70, 0xc4, 0xca, 0xea, 0xba, 0xb7, 0xf3, 0x82, 0xbd, 0x29, 0x5b, 0x55, 0x87, 0xac, 0x4c, - 0x71, 0x24, 0x2f, 0xa5, 0x84, 0x56, 0x6f, 0xc0, 0x74, 0xbc, 0x96, 0x69, 0x1b, 0x17, 0x2a, 0x62, - 0xae, 0xc8, 0xdc, 0x16, 0x64, 0xec, 0x00, 0x37, 0x43, 0x2a, 0x2e, 0xa5, 0x8d, 0xd2, 0x39, 0x4b, - 0x6e, 0x4a, 0x71, 0x16, 0x65, 0x80, 0x08, 0xb1, 0x3d, 0x91, 0xfa, 0x9c, 0x19, 0x93, 0xea, 0x35, - 0x00, 0x96, 0x72, 0xd9, 0xc1, 0x39, 0xe1, 0xa7, 0x1f, 0xca, 0xc6, 0xbd, 0x09, 0x97, 0xfc, 0xd0, - 0x92, 0x97, 0xa3, 0xe8, 0x56, 0xd1, 0x72, 0x79, 0x3f, 0xec, 0x6c, 0xd1, 0xd4, 0x84, 0x31, 0xc9, - 0x77, 0x24, 0x13, 0x46, 0xba, 0xae, 0x53, 0x03, 0x47, 0xca, 0x45, 0xc8, 0xd1, 0x96, 0x85, 0x23,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0xa0, 0xd2, 0x60, 0x55, 0x29, 0x01, 0xfd, 0xe3, 0x73, - 0x0a, 0x24, 0xa6, 0x1b, 0x00, 0x1d, 0x93, 0xcc, 0xad, 0xc1, 0x6a, 0x4e, 0x76, 0xeb, 0x1f, 0x9e, - 0x67, 0x77, 0x62, 0xf1, 0x57, 0x05, 0xb4, 0x9e, 0x63, 0xcc, 0x10, 0xd0, 0xea, 0x25, 0xab, 0x6f, - 0x5c, 0x5c, 0x36, 0x71, 0xee, 0x67, 0x05, 0x16, 0x7a, 0x5d, 0x30, 0x9f, 0x9c, 0x57, 0x7f, 0x22, - 0xaa, 0xdf, 0xbf, 0xb0, 0x68, 0x27, 0x42, 0xbb, 0x9e, 0xab, 0x43, 0x20, 0x34, 0x2d, 0x31, 0x0c, - 0x42, 0x7b, 0x3c, 0x1f, 0xd9, 0xd9, 0x71, 0xea, 0x75, 0x3e, 0xc4, 0xd9, 0xd1, 0x2d, 0x33, 0xcc, - 0xd9, 0xd1, 0xeb, 0xd5, 0xbe, 0xf1, 0xe8, 0xd9, 0xab, 0x82, 0xf2, 0xfc, 0x55, 0x41, 0xf9, 0xfb, - 0x55, 0x41, 0xf9, 0xf1, 0x75, 0x61, 0xe4, 0xf9, 0xeb, 0xc2, 0xc8, 0x9f, 0xaf, 0x0b, 0x23, 0x4f, - 0x3f, 0xe8, 0xb8, 0x46, 0x99, 0xd6, 0x75, 0xf1, 0xdf, 0x4d, 0x6c, 0xa0, 0xd4, 0x2a, 0x75, 0xfe, - 0xa3, 0xc3, 0x6e, 0xd5, 0x6a, 0x86, 0xff, 0x17, 0x73, 0xe7, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xd1, 0x7f, 0xbc, 0x44, 0xec, 0x11, 0x00, 0x00, + // 1487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdd, 0x4e, 0x1b, 0xc7, + 0x17, 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x2f, 0x00, 0x00, 0xff, 0xff, 0x49, 0x4b, 0x22, 0xc9, 0x20, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1491,6 +1585,7 @@ type MsgClient interface { VoteOnObservedInboundTx(ctx context.Context, in *MsgVoteOnObservedInboundTx, opts ...grpc.CallOption) (*MsgVoteOnObservedInboundTxResponse, error) WhitelistERC20(ctx context.Context, in *MsgWhitelistERC20, opts ...grpc.CallOption) (*MsgWhitelistERC20Response, error) UpdateTssAddress(ctx context.Context, in *MsgUpdateTssAddress, opts ...grpc.CallOption) (*MsgUpdateTssAddressResponse, error) + MigrateTssFunds(ctx context.Context, in *MsgMigrateTssFunds, opts ...grpc.CallOption) (*MsgMigrateTssFundsResponse, error) } type msgClient struct { @@ -1591,6 +1686,15 @@ func (c *msgClient) UpdateTssAddress(ctx context.Context, in *MsgUpdateTssAddres return out, nil } +func (c *msgClient) MigrateTssFunds(ctx context.Context, in *MsgMigrateTssFunds, opts ...grpc.CallOption) (*MsgMigrateTssFundsResponse, error) { + out := new(MsgMigrateTssFundsResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.crosschain.Msg/MigrateTssFunds", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { AddToOutTxTracker(context.Context, *MsgAddToOutTxTracker) (*MsgAddToOutTxTrackerResponse, error) @@ -1603,6 +1707,7 @@ type MsgServer interface { VoteOnObservedInboundTx(context.Context, *MsgVoteOnObservedInboundTx) (*MsgVoteOnObservedInboundTxResponse, error) WhitelistERC20(context.Context, *MsgWhitelistERC20) (*MsgWhitelistERC20Response, error) UpdateTssAddress(context.Context, *MsgUpdateTssAddress) (*MsgUpdateTssAddressResponse, error) + MigrateTssFunds(context.Context, *MsgMigrateTssFunds) (*MsgMigrateTssFundsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1639,6 +1744,9 @@ func (*UnimplementedMsgServer) WhitelistERC20(ctx context.Context, req *MsgWhite func (*UnimplementedMsgServer) UpdateTssAddress(ctx context.Context, req *MsgUpdateTssAddress) (*MsgUpdateTssAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTssAddress not implemented") } +func (*UnimplementedMsgServer) MigrateTssFunds(ctx context.Context, req *MsgMigrateTssFunds) (*MsgMigrateTssFundsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MigrateTssFunds not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1824,6 +1932,24 @@ func _Msg_UpdateTssAddress_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Msg_MigrateTssFunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgMigrateTssFunds) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).MigrateTssFunds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.crosschain.Msg/MigrateTssFunds", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).MigrateTssFunds(ctx, req.(*MsgMigrateTssFunds)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "zetachain.zetacore.crosschain.Msg", HandlerType: (*MsgServer)(nil), @@ -1868,11 +1994,83 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateTssAddress", Handler: _Msg_UpdateTssAddress_Handler, }, + { + MethodName: "MigrateTssFunds", + Handler: _Msg_MigrateTssFunds_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "crosschain/tx.proto", } +func (m *MsgMigrateTssFunds) 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 *MsgMigrateTssFunds) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMigrateTssFunds) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.ChainId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgMigrateTssFundsResponse) 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 *MsgMigrateTssFundsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgMigrateTssFundsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgAddToInTxTracker) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2830,6 +3028,33 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *MsgMigrateTssFunds) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ChainId != 0 { + n += 1 + sovTx(uint64(m.ChainId)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgMigrateTssFundsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgAddToInTxTracker) Size() (n int) { if m == nil { return 0 @@ -3270,6 +3495,191 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *MsgMigrateTssFunds) 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 ErrIntOverflowTx + } + 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: MsgMigrateTssFunds: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMigrateTssFunds: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgMigrateTssFundsResponse) 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 ErrIntOverflowTx + } + 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: MsgMigrateTssFundsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgMigrateTssFundsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgAddToInTxTracker) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/emissions/client/cli/query.go b/x/emissions/client/cli/query.go index b4ae1a4e03..bd2ed2b0bb 100644 --- a/x/emissions/client/cli/query.go +++ b/x/emissions/client/cli/query.go @@ -5,12 +5,11 @@ import ( // "strings" "github.com/spf13/cobra" + "github.com/zeta-chain/zetacore/x/emissions/types" "github.com/cosmos/cosmos-sdk/client" // "github.com/cosmos/cosmos-sdk/client/flags" // sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/zeta-chain/zetacore/x/emissions/types" ) // GetQueryCmd returns the cli query commands for this module diff --git a/x/emissions/client/cli/tx.go b/x/emissions/client/cli/tx.go index 53f12c7cc0..8e1fe8632e 100644 --- a/x/emissions/client/cli/tx.go +++ b/x/emissions/client/cli/tx.go @@ -4,10 +4,9 @@ import ( "fmt" "github.com/spf13/cobra" + "github.com/zeta-chain/zetacore/x/emissions/types" "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/zeta-chain/zetacore/x/emissions/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/emissions/client/tests/observer_rewards_test.go b/x/emissions/client/tests/observer_rewards_test.go index c3113deb87..853e3a3ad8 100644 --- a/x/emissions/client/tests/observer_rewards_test.go +++ b/x/emissions/client/tests/observer_rewards_test.go @@ -9,19 +9,19 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/zeta-chain/zetacore/cmd/zetacored/config" - emmisonscli "github.com/zeta-chain/zetacore/x/emissions/client/cli" - emmisonstypes "github.com/zeta-chain/zetacore/x/emissions/types" - observerCli "github.com/zeta-chain/zetacore/x/observer/client/cli" - observerTypes "github.com/zeta-chain/zetacore/x/observer/types" + emissionscli "github.com/zeta-chain/zetacore/x/emissions/client/cli" + emissionstypes "github.com/zeta-chain/zetacore/x/emissions/types" + observercli "github.com/zeta-chain/zetacore/x/observer/client/cli" + observertypes "github.com/zeta-chain/zetacore/x/observer/types" ) func (s *CliTestSuite) TestObserverRewards() { emissionPool := "800000000000000000000azeta" val := s.network.Validators[0] - out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, emmisonscli.CmdListPoolAddresses(), []string{"--output", "json"}) + out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, emissionscli.CmdListPoolAddresses(), []string{"--output", "json"}) s.Require().NoError(err) - resPools := emmisonstypes.QueryListPoolAddressesResponse{} + resPools := emissionstypes.QueryListPoolAddressesResponse{} s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &resPools)) txArgs := []string{ @@ -38,22 +38,22 @@ func (s *CliTestSuite) TestObserverRewards() { s.Require().NoError(s.network.WaitForNextBlock()) // Collect parameter values and build assertion map for the randomised ballot set created - emissionFactors := emmisonstypes.QueryGetEmissionsFactorsResponse{} - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emmisonscli.CmdGetEmmisonsFactors(), []string{"--output", "json"}) + emissionFactors := emissionstypes.QueryGetEmissionsFactorsResponse{} + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emissionscli.CmdGetEmmisonsFactors(), []string{"--output", "json"}) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &emissionFactors)) - emissionParams := emmisonstypes.QueryParamsResponse{} - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emmisonscli.CmdQueryParams(), []string{"--output", "json"}) + emissionParams := emissionstypes.QueryParamsResponse{} + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emissionscli.CmdQueryParams(), []string{"--output", "json"}) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &emissionParams)) - observerParams := observerTypes.QueryParamsResponse{} - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, observerCli.CmdQueryParams(), []string{"--output", "json"}) + observerParams := observertypes.QueryParamsResponse{} + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, observercli.CmdQueryParams(), []string{"--output", "json"}) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &observerParams)) _, err = s.network.WaitForHeight(s.ballots[0].BallotCreationHeight + observerParams.Params.BallotMaturityBlocks) s.Require().NoError(err) - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emmisonscli.CmdGetEmmisonsFactors(), []string{"--output", "json"}) - resFactorsNewBlocks := emmisonstypes.QueryGetEmissionsFactorsResponse{} + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emissionscli.CmdGetEmmisonsFactors(), []string{"--output", "json"}) + resFactorsNewBlocks := emissionstypes.QueryGetEmissionsFactorsResponse{} s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &resFactorsNewBlocks)) // Duration factor is calculated in the same block,so we need to query based from the committed state at which the distribution is done @@ -62,9 +62,9 @@ func (s *CliTestSuite) TestObserverRewards() { asertValues := CalculateObserverRewards(s.ballots, emissionParams.Params.ObserverEmissionPercentage, emissionFactors.ReservesFactor, emissionFactors.BondFactor, emissionFactors.DurationFactor) // Assert withdrawable rewards for each validator - resAvailable := emmisonstypes.QueryShowAvailableEmissionsResponse{} + resAvailable := emissionstypes.QueryShowAvailableEmissionsResponse{} for i := 0; i < len(s.network.Validators); i++ { - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emmisonscli.CmdShowAvailableEmissions(), []string{s.network.Validators[i].Address.String(), "--output", "json"}) + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, emissionscli.CmdShowAvailableEmissions(), []string{s.network.Validators[i].Address.String(), "--output", "json"}) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &resAvailable)) s.Require().Equal(sdk.NewCoin(config.BaseDenom, asertValues[s.network.Validators[i].Address.String()]).String(), resAvailable.Amount, "Validator %s has incorrect withdrawable rewards", s.network.Validators[i].Address.String()) @@ -72,7 +72,7 @@ func (s *CliTestSuite) TestObserverRewards() { } -func CalculateObserverRewards(ballots []*observerTypes.Ballot, observerEmissionPercentage, reservesFactor, bondFactor, durationFactor string) map[string]sdkmath.Int { +func CalculateObserverRewards(ballots []*observertypes.Ballot, observerEmissionPercentage, reservesFactor, bondFactor, durationFactor string) map[string]sdkmath.Int { calculatedDistributer := map[string]sdkmath.Int{} blockRewards := sdk.MustNewDecFromStr(reservesFactor).Mul(sdk.MustNewDecFromStr(bondFactor)).Mul(sdk.MustNewDecFromStr(durationFactor)) observerRewards := sdk.MustNewDecFromStr(observerEmissionPercentage).Mul(blockRewards).TruncateInt() diff --git a/x/emissions/client/tests/suite.go b/x/emissions/client/tests/suite.go index b9e950289d..b59adf9483 100644 --- a/x/emissions/client/tests/suite.go +++ b/x/emissions/client/tests/suite.go @@ -81,12 +81,13 @@ func RandomBallotGenerator(numberOfBallots int, voterList []string) []*observerT // #nosec G404 randomness is not a security issue here for i := 0; i < numberOfBallots; i++ { ballots[i] = &observerTypes.Ballot{ - Index: "", - BallotIdentifier: "TestBallot" + strconv.Itoa(i), - VoterList: voterList, - Votes: CreateRandomVoteList(len(voterList)), - ObservationType: observerTypes.ObservationType_InBoundTx, - BallotThreshold: sdk.MustNewDecFromStr("0.66"), + Index: "", + BallotIdentifier: "TestBallot" + strconv.Itoa(i), + VoterList: voterList, + Votes: CreateRandomVoteList(len(voterList)), + ObservationType: observerTypes.ObservationType_InBoundTx, + BallotThreshold: sdk.MustNewDecFromStr("0.66"), + // #nosec G404 randomness used for testing BallotStatus: ballotStatus[rand.Intn(max-min)+min], BallotCreationHeight: 0, } diff --git a/x/emissions/keeper/grpc_query_show_available_emissions.go b/x/emissions/keeper/grpc_query_show_available_emissions.go index c56a6f4d45..4f33bf5f07 100644 --- a/x/emissions/keeper/grpc_query_show_available_emissions.go +++ b/x/emissions/keeper/grpc_query_show_available_emissions.go @@ -4,9 +4,9 @@ import ( "context" "github.com/zeta-chain/zetacore/cmd/zetacored/config" + "github.com/zeta-chain/zetacore/x/emissions/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/zeta-chain/zetacore/x/emissions/types" ) func (k Keeper) ShowAvailableEmissions(goCtx context.Context, req *types.QueryShowAvailableEmissionsRequest) (*types.QueryShowAvailableEmissionsResponse, error) { diff --git a/x/emissions/keeper/keeper.go b/x/emissions/keeper/keeper.go index 96d825de3b..3655c42016 100644 --- a/x/emissions/keeper/keeper.go +++ b/x/emissions/keeper/keeper.go @@ -5,11 +5,11 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/tendermint/tendermint/libs/log" + "github.com/zeta-chain/zetacore/x/emissions/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/zeta-chain/zetacore/x/emissions/types" ) type ( diff --git a/x/emissions/module.go b/x/emissions/module.go index 02c7e9437d..a40c9743e9 100644 --- a/x/emissions/module.go +++ b/x/emissions/module.go @@ -8,6 +8,9 @@ import ( "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + "github.com/zeta-chain/zetacore/x/emissions/client/cli" + emissionskeeper "github.com/zeta-chain/zetacore/x/emissions/keeper" + "github.com/zeta-chain/zetacore/x/emissions/types" abci "github.com/tendermint/tendermint/abci/types" @@ -16,9 +19,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/zeta-chain/zetacore/x/emissions/client/cli" - "github.com/zeta-chain/zetacore/x/emissions/keeper" - "github.com/zeta-chain/zetacore/x/emissions/types" ) var ( @@ -101,13 +101,13 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { type AppModule struct { AppModuleBasic - keeper keeper.Keeper + keeper emissionskeeper.Keeper accountKeeper types.AccountKeeper } func NewAppModule( cdc codec.Codec, - keeper keeper.Keeper, + keeper emissionskeeper.Keeper, accountKeeper types.AccountKeeper, ) AppModule { return AppModule{ @@ -138,7 +138,7 @@ func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { // RegisterServices registers a GRPC query service to respond to the // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterMsgServer(cfg.MsgServer(), emissionskeeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) } diff --git a/x/fungible/client/cli/query.go b/x/fungible/client/cli/query.go index 74b4a55adb..f0498d44b8 100644 --- a/x/fungible/client/cli/query.go +++ b/x/fungible/client/cli/query.go @@ -2,14 +2,9 @@ package cli import ( "fmt" - // "strings" - - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - // sdk "github.com/cosmos/cosmos-sdk/types" - + "github.com/spf13/cobra" "github.com/zeta-chain/zetacore/x/fungible/types" ) @@ -30,6 +25,7 @@ func GetQueryCmd(_ string) *cobra.Command { CmdShowForeignCoins(), CmdGasStabilityPoolAddress(), CmdGasStabilityPoolBalance(), + CmdGasStabilityPoolBalances(), CmdSystemContract(), ) diff --git a/x/fungible/client/cli/query_gas_stability_pool.go b/x/fungible/client/cli/query_gas_stability_pool.go index 4aa9e24a18..46e2fa3ae8 100644 --- a/x/fungible/client/cli/query_gas_stability_pool.go +++ b/x/fungible/client/cli/query_gas_stability_pool.go @@ -68,3 +68,28 @@ func CmdGasStabilityPoolBalance() *cobra.Command { return cmd } + +func CmdGasStabilityPoolBalances() *cobra.Command { + cmd := &cobra.Command{ + Use: "gas-stability-pool-balances", + Short: "query all gas stability pool balances", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.GasStabilityPoolBalanceAll(context.Background(), &types.QueryAllGasStabilityPoolBalance{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/fungible/keeper/begin_blocker_deploy_system_contracts_mock_mainnet.go b/x/fungible/keeper/begin_blocker_deploy_system_contracts_mock_mainnet.go index 44a45dacc9..d5e3021e25 100644 --- a/x/fungible/keeper/begin_blocker_deploy_system_contracts_mock_mainnet.go +++ b/x/fungible/keeper/begin_blocker_deploy_system_contracts_mock_mainnet.go @@ -5,9 +5,91 @@ package keeper import ( "context" + "fmt" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/zeta-chain/zetacore/common" ) -func (k Keeper) BlockOneDeploySystemContracts(_ context.Context) error { +func (k Keeper) BlockOneDeploySystemContracts(goCtx context.Context) error { + ctx := sdk.UnwrapSDKContext(goCtx) + + // setup uniswap v2 factory + uniswapV2Factory, err := k.DeployUniswapV2Factory(ctx) + if err != nil { + return sdkerrors.Wrapf(err, "failed to DeployUniswapV2Factory") + } + ctx.EventManager().EmitEvent( + sdk.NewEvent(sdk.EventTypeMessage, + sdk.NewAttribute("UniswapV2Factory", uniswapV2Factory.String()), + ), + ) + + // setup WZETA contract + wzeta, err := k.DeployWZETA(ctx) + if err != nil { + return sdkerrors.Wrapf(err, "failed to DeployWZetaContract") + } + ctx.EventManager().EmitEvent( + sdk.NewEvent(sdk.EventTypeMessage, + sdk.NewAttribute("DeployWZetaContract", wzeta.String()), + ), + ) + + router, err := k.DeployUniswapV2Router02(ctx, uniswapV2Factory, wzeta) + if err != nil { + return sdkerrors.Wrapf(err, "failed to DeployUniswapV2Router02") + } + ctx.EventManager().EmitEvent( + sdk.NewEvent(sdk.EventTypeMessage, + sdk.NewAttribute("DeployUniswapV2Router02", router.String()), + ), + ) + + connector, err := k.DeployConnectorZEVM(ctx, wzeta) + if err != nil { + return sdkerrors.Wrapf(err, "failed to DeployConnectorZEVM") + } + ctx.EventManager().EmitEvent( + sdk.NewEvent(sdk.EventTypeMessage, + sdk.NewAttribute("DeployConnectorZEVM", connector.String()), + ), + ) + ctx.Logger().Info("Deployed Connector ZEVM at " + connector.String()) + + SystemContractAddress, err := k.DeploySystemContract(ctx, wzeta, uniswapV2Factory, router) + if err != nil { + return sdkerrors.Wrapf(err, "failed to SystemContractAddress") + } + ctx.EventManager().EmitEvent( + sdk.NewEvent(sdk.EventTypeMessage, + sdk.NewAttribute("SystemContractAddress", SystemContractAddress.String()), + ), + ) + + // set the system contract + system, _ := k.GetSystemContract(ctx) + system.SystemContract = SystemContractAddress.String() + k.SetSystemContract(ctx, system) + //err = k.SetGasPrice(ctx, big.NewInt(1337), big.NewInt(1)) + if err != nil { + return err + } + _, err = k.SetupChainGasCoinAndPool(ctx, common.EthChain().ChainId, "ETH", "ETH", 18, nil) + if err != nil { + return errorsmod.Wrapf(err, fmt.Sprintf("failed to setupChainGasCoinAndPool for %s", common.EthChain().ChainName)) + } + + _, err = k.SetupChainGasCoinAndPool(ctx, common.BscMainnetChain().ChainId, "BNB", "BNB", 18, nil) + if err != nil { + return errorsmod.Wrapf(err, fmt.Sprintf("failed to setupChainGasCoinAndPool for %s", common.BscMainnetChain().ChainName)) + } + _, err = k.SetupChainGasCoinAndPool(ctx, common.BtcMainnetChain().ChainId, "BTC", "BTC", 8, nil) + if err != nil { + return errorsmod.Wrapf(err, fmt.Sprintf("failed to setupChainGasCoinAndPool for %s", common.BtcMainnetChain().ChainName)) + } return nil } func (k Keeper) TestUpdateSystemContractAddress(_ context.Context) error { diff --git a/x/fungible/keeper/grpc_gas_stability_pool.go b/x/fungible/keeper/grpc_gas_stability_pool.go index 449a336594..023ef82836 100644 --- a/x/fungible/keeper/grpc_gas_stability_pool.go +++ b/x/fungible/keeper/grpc_gas_stability_pool.go @@ -42,3 +42,40 @@ func (k Keeper) GasStabilityPoolBalance( return &types.QueryGetGasStabilityPoolBalanceResponse{Balance: balance.String()}, nil } + +func (k Keeper) GasStabilityPoolBalanceAll( + c context.Context, + req *types.QueryAllGasStabilityPoolBalance, +) (*types.QueryAllGasStabilityPoolBalanceResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + // iterate supported chains + chains := k.observerKeeper.GetParams(ctx).GetSupportedChains() + balances := make([]types.QueryAllGasStabilityPoolBalanceResponse_Balance, 0, len(chains)) + for _, chain := range chains { + if chain == nil { + return nil, status.Error(codes.Internal, "invalid chain") + } + chainID := chain.ChainId + + balance, err := k.GetGasStabilityPoolBalance(ctx, chainID) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + if balance == nil { + return nil, status.Error(codes.NotFound, "no balance for the gas stability pool") + } + + balances = append(balances, types.QueryAllGasStabilityPoolBalanceResponse_Balance{ + ChainId: chainID, + Balance: balance.String(), + }) + } + + return &types.QueryAllGasStabilityPoolBalanceResponse{ + Balances: balances, + }, nil +} diff --git a/x/fungible/types/query.pb.go b/x/fungible/types/query.pb.go index f40c319e4e..0b2b3c1bc5 100644 --- a/x/fungible/types/query.pb.go +++ b/x/fungible/types/query.pb.go @@ -513,8 +513,7 @@ func (m *QueryGetGasStabilityPoolBalance) GetChainId() int64 { } type QueryGetGasStabilityPoolBalanceResponse struct { - ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` + Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` } func (m *QueryGetGasStabilityPoolBalanceResponse) Reset() { @@ -552,14 +551,145 @@ func (m *QueryGetGasStabilityPoolBalanceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetGasStabilityPoolBalanceResponse proto.InternalMessageInfo -func (m *QueryGetGasStabilityPoolBalanceResponse) GetContractAddress() string { +func (m *QueryGetGasStabilityPoolBalanceResponse) GetBalance() string { if m != nil { - return m.ContractAddress + return m.Balance } return "" } -func (m *QueryGetGasStabilityPoolBalanceResponse) GetBalance() string { +type QueryAllGasStabilityPoolBalance struct { +} + +func (m *QueryAllGasStabilityPoolBalance) Reset() { *m = QueryAllGasStabilityPoolBalance{} } +func (m *QueryAllGasStabilityPoolBalance) String() string { return proto.CompactTextString(m) } +func (*QueryAllGasStabilityPoolBalance) ProtoMessage() {} +func (*QueryAllGasStabilityPoolBalance) Descriptor() ([]byte, []int) { + return fileDescriptor_d671b6e9298b37cd, []int{12} +} +func (m *QueryAllGasStabilityPoolBalance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllGasStabilityPoolBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllGasStabilityPoolBalance.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 *QueryAllGasStabilityPoolBalance) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllGasStabilityPoolBalance.Merge(m, src) +} +func (m *QueryAllGasStabilityPoolBalance) XXX_Size() int { + return m.Size() +} +func (m *QueryAllGasStabilityPoolBalance) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllGasStabilityPoolBalance.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllGasStabilityPoolBalance proto.InternalMessageInfo + +type QueryAllGasStabilityPoolBalanceResponse struct { + Balances []QueryAllGasStabilityPoolBalanceResponse_Balance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances"` +} + +func (m *QueryAllGasStabilityPoolBalanceResponse) Reset() { + *m = QueryAllGasStabilityPoolBalanceResponse{} +} +func (m *QueryAllGasStabilityPoolBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllGasStabilityPoolBalanceResponse) ProtoMessage() {} +func (*QueryAllGasStabilityPoolBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d671b6e9298b37cd, []int{13} +} +func (m *QueryAllGasStabilityPoolBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllGasStabilityPoolBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse.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 *QueryAllGasStabilityPoolBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse.Merge(m, src) +} +func (m *QueryAllGasStabilityPoolBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllGasStabilityPoolBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse proto.InternalMessageInfo + +func (m *QueryAllGasStabilityPoolBalanceResponse) GetBalances() []QueryAllGasStabilityPoolBalanceResponse_Balance { + if m != nil { + return m.Balances + } + return nil +} + +type QueryAllGasStabilityPoolBalanceResponse_Balance struct { + ChainId int64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) Reset() { + *m = QueryAllGasStabilityPoolBalanceResponse_Balance{} +} +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) String() string { + return proto.CompactTextString(m) +} +func (*QueryAllGasStabilityPoolBalanceResponse_Balance) ProtoMessage() {} +func (*QueryAllGasStabilityPoolBalanceResponse_Balance) Descriptor() ([]byte, []int) { + return fileDescriptor_d671b6e9298b37cd, []int{13, 0} +} +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse_Balance.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 *QueryAllGasStabilityPoolBalanceResponse_Balance) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse_Balance.Merge(m, src) +} +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) XXX_Size() int { + return m.Size() +} +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse_Balance.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllGasStabilityPoolBalanceResponse_Balance proto.InternalMessageInfo + +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) GetChainId() int64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) GetBalance() string { if m != nil { return m.Balance } @@ -579,62 +709,68 @@ func init() { proto.RegisterType((*QueryGetGasStabilityPoolAddressResponse)(nil), "zetachain.zetacore.fungible.QueryGetGasStabilityPoolAddressResponse") proto.RegisterType((*QueryGetGasStabilityPoolBalance)(nil), "zetachain.zetacore.fungible.QueryGetGasStabilityPoolBalance") proto.RegisterType((*QueryGetGasStabilityPoolBalanceResponse)(nil), "zetachain.zetacore.fungible.QueryGetGasStabilityPoolBalanceResponse") + proto.RegisterType((*QueryAllGasStabilityPoolBalance)(nil), "zetachain.zetacore.fungible.QueryAllGasStabilityPoolBalance") + proto.RegisterType((*QueryAllGasStabilityPoolBalanceResponse)(nil), "zetachain.zetacore.fungible.QueryAllGasStabilityPoolBalanceResponse") + proto.RegisterType((*QueryAllGasStabilityPoolBalanceResponse_Balance)(nil), "zetachain.zetacore.fungible.QueryAllGasStabilityPoolBalanceResponse.Balance") } func init() { proto.RegisterFile("fungible/query.proto", fileDescriptor_d671b6e9298b37cd) } var fileDescriptor_d671b6e9298b37cd = []byte{ - // 785 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x4f, 0x13, 0x41, - 0x1c, 0xed, 0x82, 0x80, 0x0c, 0x08, 0x66, 0xac, 0x11, 0x0b, 0x6e, 0x75, 0x55, 0x10, 0x91, 0x1d, - 0xa1, 0x21, 0x41, 0xe0, 0x60, 0x41, 0x21, 0xc4, 0x0b, 0x96, 0x8b, 0x7a, 0x69, 0xa6, 0xed, 0xb0, - 0x6c, 0xb2, 0xdd, 0x29, 0x9d, 0x29, 0xa1, 0x12, 0x2e, 0x7e, 0x02, 0x13, 0x4f, 0x7e, 0x11, 0x2f, - 0x7a, 0xf0, 0xc8, 0x91, 0xc4, 0x8b, 0x27, 0x35, 0xe0, 0xc9, 0x4f, 0x61, 0x3a, 0x7f, 0x4a, 0x5b, - 0x76, 0x97, 0x52, 0x6e, 0xbb, 0x33, 0xbf, 0xf7, 0x7b, 0xef, 0xcd, 0xfc, 0xf6, 0xb5, 0x20, 0xbe, - 0x55, 0xf1, 0x1d, 0x37, 0xe7, 0x11, 0xb4, 0x53, 0x21, 0xe5, 0xaa, 0x5d, 0x2a, 0x53, 0x4e, 0xe1, - 0xe8, 0x7b, 0xc2, 0x71, 0x7e, 0x1b, 0xbb, 0xbe, 0x2d, 0x9e, 0x68, 0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x57, 0xea, 0x26, 0x23, 0xd5, 0x35, 0x36, 0x52, 0x1a, 0x9b, 0x9a, 0x58, 0x44, 0x29, 0x4d, - 0x7b, 0x5e, 0x90, 0xd2, 0x55, 0x00, 0x4e, 0x6f, 0x55, 0x31, 0x8e, 0xdb, 0x72, 0x04, 0xec, 0xda, - 0x08, 0xd8, 0x72, 0x70, 0xd4, 0x08, 0xd8, 0x1b, 0xd8, 0x21, 0x0a, 0x9b, 0x69, 0x40, 0x5a, 0xdf, - 0x0c, 0x65, 0xee, 0x0c, 0x4f, 0xa8, 0xb9, 0xee, 0x4b, 0x9b, 0x83, 0x6b, 0x4d, 0xea, 0xbb, 0x84, - 0xfa, 0x89, 0x73, 0xd5, 0x4b, 0x45, 0x4d, 0xf2, 0x93, 0xe0, 0x8e, 0xbe, 0x9a, 0x4d, 0x31, 0x94, - 0x2b, 0x6a, 0x26, 0xf5, 0x28, 0xed, 0x03, 0x33, 0xac, 0x40, 0x19, 0x7c, 0x0b, 0x86, 0x9a, 0x77, - 0xd4, 0x69, 0x4e, 0x45, 0x5a, 0x6c, 0x86, 0x28, 0x93, 0x2d, 0x8d, 0xac, 0x7b, 0x20, 0xa9, 0xc9, - 0xd7, 0x30, 0xdb, 0xe4, 0x38, 0xe7, 0x7a, 0x2e, 0xaf, 0x6e, 0x50, 0xea, 0xa5, 0x0b, 0x85, 0x32, - 0x61, 0xcc, 0xda, 0x01, 0x13, 0xe7, 0x94, 0xd4, 0x85, 0x3e, 0x04, 0x43, 0xf2, 0x84, 0xb2, 0x58, - 0xee, 0xa8, 0x29, 0xbd, 0x26, 0x57, 0x55, 0x39, 0x4c, 0x82, 0x01, 0xb2, 0x5b, 0xac, 0xd7, 0x74, - 0x89, 0x1a, 0x40, 0x76, 0x8b, 0x9a, 0x72, 0x29, 0x5c, 0xd5, 0x32, 0xf6, 0xb0, 0x9f, 0x27, 0xf0, - 0x36, 0xb8, 0x2a, 0x8c, 0x67, 0xdd, 0x82, 0x20, 0xe9, 0x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 0x6d, 0x3d, 0x17, 0xb6, 0x16, 0xe0, 0x7c, 0xb4, 0x2d, 0x07, 0xb3, 0x2c, 0xd3, 0x7d, 0xb2, - 0x25, 0x4a, 0x3d, 0xfd, 0xf1, 0xc3, 0x7f, 0x01, 0x0e, 0x75, 0xe4, 0x74, 0xe6, 0x50, 0xa1, 0x3b, - 0x74, 0xd8, 0x12, 0x58, 0xd6, 0x2b, 0xe1, 0xf0, 0x25, 0x5c, 0xb9, 0xb0, 0x43, 0x95, 0x56, 0x68, - 0x5f, 0xc7, 0xe6, 0xc1, 0xf2, 0xfa, 0xe1, 0xb1, 0x69, 0x1c, 0x1d, 0x9b, 0xc6, 0x9f, 0x63, 0xd3, - 0xf8, 0x78, 0x62, 0xc6, 0x8e, 0x4e, 0xcc, 0xd8, 0xcf, 0x13, 0x33, 0xf6, 0x0e, 0x39, 0x2e, 0xdf, - 0xae, 0xe4, 0xec, 0x3c, 0x2d, 0x06, 0x12, 0xed, 0x9d, 0x52, 0xf1, 0x6a, 0x89, 0xb0, 0x5c, 0xaf, - 0xf8, 0xb3, 0x94, 0xfa, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x77, 0x16, 0x8c, 0x16, 0x0a, 0x00, - 0x00, + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x4f, 0x13, 0x4d, + 0x18, 0xee, 0xc2, 0xc7, 0x8f, 0x6f, 0xe0, 0xe3, 0x4b, 0xe6, 0xeb, 0x17, 0x71, 0xc1, 0xad, 0xae, + 0x0a, 0x2a, 0xb2, 0x23, 0x34, 0x24, 0x08, 0xc4, 0x58, 0xaa, 0x10, 0xa2, 0x07, 0x2c, 0x17, 0xf5, + 0xd2, 0x4c, 0xdb, 0x61, 0xd9, 0x64, 0xbb, 0x53, 0x3a, 0x5b, 0x42, 0x25, 0x5c, 0xfc, 0x0b, 0x4c, + 0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1, 0x61, 0x4f, 0xd0, 0xa4, 0x72, 0x55, 0xb9, 0x35, + 0xb6, 0x78, 0xdd, 0x68, 0x73, 0x1e, 0x86, 0x07, 0x5e, 0xff, 0xeb, 0xe4, 0x5b, 0x22, 0x96, 0x01, + 0xa0, 0x9e, 0x44, 0x53, 0xb2, 0xf3, 0x26, 0x73, 0x37, 0x3c, 0xe7, 0xe9, 0xba, 0x71, 0x20, 0xc6, + 0x71, 0x34, 0x64, 0x39, 0x05, 0x76, 0x28, 0x09, 0xfe, 0xce, 0x78, 0x2f, 0xba, 0x40, 0xd3, 0xad, + 0x41, 0xa0, 0x6b, 0x07, 0x8d, 0xef, 0x36, 0xac, 0x83, 0xba, 0xdb, 0x6d, 0xd5, 0x35, 0x36, 0x02, + 0x8d, 0xa1, 0x26, 0x3a, 0x03, 0xa5, 0x29, 0xdb, 0x6e, 0xa5, 0x74, 0x03, 0xa1, 0xf3, 0x5b, 0x05, + 0xc6, 0x19, 0xc3, 0x1b, 0x01, 0xa3, 0x3e, 0x02, 0x86, 0x37, 0x38, 0x30, 0x02, 0xc6, 0x36, 0x35, + 0x19, 0x60, 0x33, 0x0d, 0x48, 0xfd, 0xa3, 0x02, 0xe6, 0xfe, 0xe0, 0x89, 0x34, 0x37, 0xd8, 0xb7, + 0x39, 0xbc, 0x19, 0x52, 0x3f, 0x20, 0xd5, 0xcf, 0x76, 0x54, 0xef, 0x29, 0x0a, 0xc9, 0x4f, 0xa0, + 0x2b, 0xfe, 0xd5, 0xec, 0xc8, 0xa1, 0x4c, 0xc3, 0x4c, 0xfa, 0xa3, 0x74, 0x84, 0xb4, 0xa8, 0x02, + 0x30, 0xf8, 0x02, 0x4d, 0x84, 0x77, 0xe0, 0x34, 0xe7, 0xda, 0x5a, 0x0c, 0x43, 0xc0, 0x64, 0x53, + 0x23, 0xfd, 0x1a, 0x4a, 0xf8, 0xe4, 0x9b, 0x54, 0xec, 0xb8, 0x34, 0x67, 0xd9, 0x96, 0x5b, 0xdd, + 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d8, 0x3a, 0x57, 0xd5, 0xfb, 0x3d, 0x20, 0x41, 0xf3, 0xaa, 0xd4, + 0xbc, 0x84, 0x93, 0xed, 0x35, 0x87, 0xfe, 0xc7, 0xc8, 0x91, 0x0c, 0xee, 0x63, 0xfc, 0x41, 0x41, + 0xff, 0x36, 0x76, 0x4d, 0xd9, 0x76, 0x37, 0x2e, 0x5a, 0x67, 0x6e, 0x37, 0x2e, 0x22, 0x52, 0x54, + 0x4f, 0x4a, 0x17, 0xf3, 0x78, 0xee, 0x02, 0x2e, 0xea, 0x17, 0xd0, 0x94, 0x28, 0x78, 0xa5, 0xab, + 0x83, 0x6c, 0x19, 0x85, 0xea, 0x6a, 0x4f, 0x58, 0x30, 0xb0, 0x24, 0x0d, 0x10, 0x3c, 0xdf, 0xde, + 0x40, 0xd3, 0x97, 0x01, 0xfe, 0xae, 0xa0, 0x4b, 0x11, 0xb9, 0x86, 0xd7, 0xba, 0xd2, 0x13, 0x81, + 0x56, 0x1f, 0xf5, 0x83, 0x0e, 0x6c, 0x3d, 0x94, 0xb6, 0x56, 0xf0, 0x72, 0x7b, 0x5b, 0x26, 0x15, + 0x59, 0xe1, 0xf7, 0xc9, 0x96, 0x38, 0xb7, 0xfd, 0x7c, 0xc5, 0xbf, 0x5a, 0x38, 0xf4, 0xc3, 0xa1, + 0x37, 0x87, 0x80, 0xee, 0xd1, 0x61, 0x53, 0x86, 0xe9, 0x4f, 0xa4, 0xc3, 0xc7, 0x38, 0x7d, 0x61, + 0x87, 0x90, 0x56, 0xe4, 0xc8, 0x0f, 0xb8, 0x63, 0x5c, 0x53, 0x90, 0x1a, 0x41, 0x58, 0xff, 0x69, + 0xad, 0xf5, 0x93, 0xba, 0xdd, 0xf8, 0xed, 0x9c, 0xd9, 0x7d, 0xdc, 0x28, 0xf8, 0x5d, 0xdf, 0x3a, + 0xa9, 0x69, 0xca, 0x69, 0x4d, 0x53, 0x7e, 0xd4, 0x34, 0xe5, 0xcd, 0x99, 0x16, 0x3b, 0x3d, 0xd3, + 0x62, 0x5f, 0xce, 0xb4, 0xd8, 0x4b, 0x62, 0x5a, 0xee, 0x5e, 0x25, 0x67, 0xe4, 0x79, 0xb1, 0x65, + 0xf7, 0xc3, 0xf3, 0xfe, 0x6e, 0xb5, 0xc4, 0x44, 0x6e, 0x58, 0x7e, 0xe5, 0x26, 0x7f, 0x07, 0x00, + 0x00, 0xff, 0xff, 0x70, 0xd2, 0xfa, 0xa6, 0xcf, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -661,6 +797,8 @@ type QueryClient interface { GasStabilityPoolAddress(ctx context.Context, in *QueryGetGasStabilityPoolAddress, opts ...grpc.CallOption) (*QueryGetGasStabilityPoolAddressResponse, error) // Queries the balance of a gas stability pool on a given chain. GasStabilityPoolBalance(ctx context.Context, in *QueryGetGasStabilityPoolBalance, opts ...grpc.CallOption) (*QueryGetGasStabilityPoolBalanceResponse, error) + // Queries all gas stability pool balances. + GasStabilityPoolBalanceAll(ctx context.Context, in *QueryAllGasStabilityPoolBalance, opts ...grpc.CallOption) (*QueryAllGasStabilityPoolBalanceResponse, error) } type queryClient struct { @@ -725,6 +863,15 @@ func (c *queryClient) GasStabilityPoolBalance(ctx context.Context, in *QueryGetG return out, nil } +func (c *queryClient) GasStabilityPoolBalanceAll(ctx context.Context, in *QueryAllGasStabilityPoolBalance, opts ...grpc.CallOption) (*QueryAllGasStabilityPoolBalanceResponse, error) { + out := new(QueryAllGasStabilityPoolBalanceResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.fungible.Query/GasStabilityPoolBalanceAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -739,6 +886,8 @@ type QueryServer interface { GasStabilityPoolAddress(context.Context, *QueryGetGasStabilityPoolAddress) (*QueryGetGasStabilityPoolAddressResponse, error) // Queries the balance of a gas stability pool on a given chain. GasStabilityPoolBalance(context.Context, *QueryGetGasStabilityPoolBalance) (*QueryGetGasStabilityPoolBalanceResponse, error) + // Queries all gas stability pool balances. + GasStabilityPoolBalanceAll(context.Context, *QueryAllGasStabilityPoolBalance) (*QueryAllGasStabilityPoolBalanceResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -763,6 +912,9 @@ func (*UnimplementedQueryServer) GasStabilityPoolAddress(ctx context.Context, re func (*UnimplementedQueryServer) GasStabilityPoolBalance(ctx context.Context, req *QueryGetGasStabilityPoolBalance) (*QueryGetGasStabilityPoolBalanceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GasStabilityPoolBalance not implemented") } +func (*UnimplementedQueryServer) GasStabilityPoolBalanceAll(ctx context.Context, req *QueryAllGasStabilityPoolBalance) (*QueryAllGasStabilityPoolBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GasStabilityPoolBalanceAll not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -876,6 +1028,24 @@ func _Query_GasStabilityPoolBalance_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _Query_GasStabilityPoolBalanceAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllGasStabilityPoolBalance) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GasStabilityPoolBalanceAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.fungible.Query/GasStabilityPoolBalanceAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GasStabilityPoolBalanceAll(ctx, req.(*QueryAllGasStabilityPoolBalance)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "zetachain.zetacore.fungible.Query", HandlerType: (*QueryServer)(nil), @@ -904,6 +1074,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GasStabilityPoolBalance", Handler: _Query_GasStabilityPoolBalance_Handler, }, + { + MethodName: "GasStabilityPoolBalanceAll", + Handler: _Query_GasStabilityPoolBalanceAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "fungible/query.proto", @@ -1283,12 +1457,100 @@ func (m *QueryGetGasStabilityPoolBalanceResponse) MarshalToSizedBuffer(dAtA []by i-- dAtA[i] = 0x12 } - if len(m.ContractAddress) > 0 { - i -= len(m.ContractAddress) - copy(dAtA[i:], m.ContractAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractAddress))) + return len(dAtA) - i, nil +} + +func (m *QueryAllGasStabilityPoolBalance) 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 *QueryAllGasStabilityPoolBalance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllGasStabilityPoolBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAllGasStabilityPoolBalanceResponse) 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 *QueryAllGasStabilityPoolBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllGasStabilityPoolBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) 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 *QueryAllGasStabilityPoolBalanceResponse_Balance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balance) > 0 { + i -= len(m.Balance) + copy(dAtA[i:], m.Balance) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Balance))) + i-- + dAtA[i] = 0x12 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -1444,10 +1706,46 @@ func (m *QueryGetGasStabilityPoolBalanceResponse) Size() (n int) { } var l int _ = l - l = len(m.ContractAddress) + l = len(m.Balance) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } + return n +} + +func (m *QueryAllGasStabilityPoolBalance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAllGasStabilityPoolBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryAllGasStabilityPoolBalanceResponse_Balance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } l = len(m.Balance) if l > 0 { n += 1 + l + sovQuery(uint64(l)) @@ -2360,9 +2658,9 @@ func (m *QueryGetGasStabilityPoolBalanceResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryGetGasStabilityPoolBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2390,8 +2688,211 @@ func (m *QueryGetGasStabilityPoolBalanceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContractAddress = string(dAtA[iNdEx:postIndex]) + m.Balance = 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 *QueryAllGasStabilityPoolBalance) 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: QueryAllGasStabilityPoolBalance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllGasStabilityPoolBalance: 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 *QueryAllGasStabilityPoolBalanceResponse) 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: QueryAllGasStabilityPoolBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllGasStabilityPoolBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, QueryAllGasStabilityPoolBalanceResponse_Balance{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *QueryAllGasStabilityPoolBalanceResponse_Balance) 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: Balance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) diff --git a/x/fungible/types/query.pb.gw.go b/x/fungible/types/query.pb.gw.go index 5e3c9f3e9a..509f8a452a 100644 --- a/x/fungible/types/query.pb.gw.go +++ b/x/fungible/types/query.pb.gw.go @@ -231,6 +231,24 @@ func local_request_Query_GasStabilityPoolBalance_0(ctx context.Context, marshale } +func request_Query_GasStabilityPoolBalanceAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllGasStabilityPoolBalance + var metadata runtime.ServerMetadata + + msg, err := client.GasStabilityPoolBalanceAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GasStabilityPoolBalanceAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllGasStabilityPoolBalance + var metadata runtime.ServerMetadata + + msg, err := server.GasStabilityPoolBalanceAll(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -375,6 +393,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GasStabilityPoolBalanceAll_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_GasStabilityPoolBalanceAll_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_GasStabilityPoolBalanceAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -536,6 +577,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GasStabilityPoolBalanceAll_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_GasStabilityPoolBalanceAll_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_GasStabilityPoolBalanceAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -551,6 +612,8 @@ var ( pattern_Query_GasStabilityPoolAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"zeta-chain", "zetacore", "fungible", "gas_stability_pool_address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GasStabilityPoolBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"zeta-chain", "zetacore", "fungible", "gas_stability_pool_balance", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GasStabilityPoolBalanceAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"zeta-chain", "zetacore", "fungible", "gas_stability_pool_balance"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -565,4 +628,6 @@ var ( forward_Query_GasStabilityPoolAddress_0 = runtime.ForwardResponseMessage forward_Query_GasStabilityPoolBalance_0 = runtime.ForwardResponseMessage + + forward_Query_GasStabilityPoolBalanceAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/observer/module_simulation.go b/x/observer/module_simulation.go index 806a28c1db..08b52bcc08 100644 --- a/x/observer/module_simulation.go +++ b/x/observer/module_simulation.go @@ -11,6 +11,7 @@ import ( /* #nosec */ const ( + // #nosec G101 not a hardcoded credential opWeightMsgUpdateClientParams = "op_weight_msg_update_client_params" defaultWeightMsgUpdateClientParams int = 100 ) diff --git a/x/observer/types/messages_add_block_header.go b/x/observer/types/messages_add_block_header.go index 453a2f1b10..cfa2867128 100644 --- a/x/observer/types/messages_add_block_header.go +++ b/x/observer/types/messages_add_block_header.go @@ -52,7 +52,7 @@ func (msg *MsgAddBlockHeader) ValidateBasic() error { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidAddress, err.Error()) } - if common.IsEthereum(msg.ChainId) || common.IsBitcoinChain(msg.ChainId) { + if common.IsEthereumChain(msg.ChainId) || common.IsBitcoinChain(msg.ChainId) { if len(msg.BlockHash) != 32 { return cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid block hash length (%d)", len(msg.BlockHash)) } diff --git a/zetaclient/bitcoin_client.go b/zetaclient/bitcoin_client.go index 43fde5b523..4fc07e89bd 100644 --- a/zetaclient/bitcoin_client.go +++ b/zetaclient/bitcoin_client.go @@ -397,6 +397,13 @@ func (ob *BitcoinChainClient) IsSendOutTxProcessed(sendHash string, nonce uint64 return false, false, err } + // Get original cctx parameters + params, err = ob.GetPendingCctxParams(nonce) + if err != nil { + ob.logger.ObserveOutTx.Info().Msgf("IsSendOutTxProcessed: can't find pending cctx for nonce %d", nonce) + return false, false, err + } + if !included { if !broadcasted { return false, false, nil @@ -479,13 +486,13 @@ func (ob *BitcoinChainClient) WatchGasPrice() { } func (ob *BitcoinChainClient) PostGasPrice() error { - if ob.chain.ChainId == 18444 { //bitcoin regtest + if ob.chain.ChainId == 18444 { //bitcoin regtest; hardcode here since this RPC is not available on regtest bn, err := ob.rpcClient.GetBlockCount() if err != nil { return err } // #nosec G701 always in range - zetaHash, err := ob.zetaClient.PostGasPrice(ob.chain, 1000, "100", uint64(bn)) + zetaHash, err := ob.zetaClient.PostGasPrice(ob.chain, 1, "100", uint64(bn)) if err != nil { ob.logger.WatchGasPrice.Err(err).Msg("PostGasPrice:") return err @@ -519,8 +526,6 @@ func (ob *BitcoinChainClient) PostGasPrice() error { return err } _ = zetaHash - //ob.logger.WatchGasPrice.Debug().Msgf("PostGasPrice zeta tx: %s", zetaHash) - _ = feeResult return nil } @@ -1050,7 +1055,7 @@ func (ob *BitcoinChainClient) getRawTxResult(hash *chainhash.Hash, res *btcjson. // - All inputs are from TSS address func (ob *BitcoinChainClient) checkTSSVin(vins []btcjson.Vin, nonce uint64) error { // vins: [nonce-mark, UTXO1, UTXO2, ...] - if len(vins) <= 1 { + if nonce > 0 && len(vins) <= 1 { return fmt.Errorf("checkTSSVin: len(vins) <= 1") } pubKeyTss := hex.EncodeToString(ob.Tss.PubKeyCompressedBytes()) diff --git a/zetaclient/btc_signer.go b/zetaclient/btc_signer.go index f8ba3d0e6f..f426fee681 100644 --- a/zetaclient/btc_signer.go +++ b/zetaclient/btc_signer.go @@ -68,7 +68,9 @@ func NewBTCSigner(cfg config.BTCConfig, tssSigner TSSSigner, logger zerolog.Logg // SignWithdrawTx receives utxos sorted by value, amount in BTC, feeRate in BTC per Kb func (signer *BTCSigner) SignWithdrawTx(to *btcutil.AddressWitnessPubKeyHash, amount float64, gasPrice *big.Int, sizeLimit uint64, btcClient *BitcoinChainClient, height uint64, nonce uint64, chain *common.Chain) (*wire.MsgTx, error) { + estimateFee := float64(gasPrice.Uint64()) * outTxBytesMax / 1e8 + nonceMark := common.NonceMarkAmount(nonce) // refresh unspent UTXOs and continue with keysign regardless of error @@ -118,7 +120,6 @@ func (signer *BTCSigner) SignWithdrawTx(to *btcutil.AddressWitnessPubKeyHash, am // fee calculation // #nosec G701 always in range (checked above) fees := new(big.Int).Mul(big.NewInt(int64(txSize)), gasPrice) - fees.Div(fees, big.NewInt(bytesPerKB)) signer.logger.Info().Msgf("bitcoin outTx nonce %d gasPrice %s size %d fees %s", nonce, gasPrice.String(), txSize, fees.String()) // calculate remaining btc to TSS self @@ -237,7 +238,7 @@ func (signer *BTCSigner) TryProcessOutTx(send *types.CrossChainTx, outTxMan *Out Logger() params := send.GetCurrentOutTxParam() - if params.CoinType != common.CoinType_Gas { + if params.CoinType == common.CoinType_Zeta || params.CoinType == common.CoinType_ERC20 { logger.Error().Msgf("BTC TryProcessOutTx: can only send BTC to a BTC network") return } diff --git a/zetaclient/evm_signer.go b/zetaclient/evm_signer.go index a8c8c19292..96c6dc728e 100644 --- a/zetaclient/evm_signer.go +++ b/zetaclient/evm_signer.go @@ -217,7 +217,7 @@ func (signer *EVMSigner) SignWithdrawTx(to ethcommon.Address, amount *big.Int, n return signedTX, nil } -func (signer *EVMSigner) SignCommandTx(cmd string, params string, to ethcommon.Address, nonce uint64, gasLimit uint64, gasPrice *big.Int, height uint64) (*ethtypes.Transaction, error) { +func (signer *EVMSigner) SignCommandTx(cmd string, params string, to ethcommon.Address, outboundParams *types.OutboundTxParams, gasLimit uint64, gasPrice *big.Int, height uint64) (*ethtypes.Transaction, error) { if cmd == common.CmdWhitelistERC20 { erc20 := ethcommon.HexToAddress(params) if erc20 == (ethcommon.Address{}) { @@ -231,12 +231,32 @@ func (signer *EVMSigner) SignCommandTx(cmd string, params string, to ethcommon.A if err != nil { return nil, err } - tx, _, _, err := signer.Sign(data, to, gasLimit, gasPrice, nonce, height) + tx, _, _, err := signer.Sign(data, to, gasLimit, gasPrice, outboundParams.OutboundTxTssNonce, height) if err != nil { return nil, fmt.Errorf("sign error: %w", err) } return tx, nil } + if cmd == common.CmdMigrateTssFunds { + tx := ethtypes.NewTransaction(outboundParams.OutboundTxTssNonce, to, outboundParams.Amount.BigInt(), 21000, gasPrice, nil) + hashBytes := signer.ethSigner.Hash(tx).Bytes() + sig, err := signer.tssSigner.Sign(hashBytes, height, outboundParams.OutboundTxTssNonce, signer.chain, "") + if err != nil { + return nil, err + } + pubk, err := crypto.SigToPub(hashBytes, sig[:]) + if err != nil { + signer.logger.Error().Err(err).Msgf("SigToPub error") + } + addr := crypto.PubkeyToAddress(*pubk) + signer.logger.Info().Msgf("Sign: Ecrecovery of signature: %s", addr.Hex()) + signedTX, err := tx.WithSignature(signer.ethSigner, sig[:]) + if err != nil { + return nil, err + } + + return signedTX, nil + } return nil, fmt.Errorf("SignCommandTx: unknown command %s", cmd) } @@ -291,9 +311,12 @@ func (signer *EVMSigner) TryProcessOutTx(send *types.CrossChainTx, outTxMan *Out return } - message, err := base64.StdEncoding.DecodeString(send.RelayedMessage) - if err != nil { - logger.Err(err).Msgf("decode CCTX.Message %s error", send.RelayedMessage) + var message []byte + if send.GetCurrentOutTxParam().CoinType != common.CoinType_Cmd { + message, err = base64.StdEncoding.DecodeString(send.RelayedMessage) + if err != nil { + logger.Err(err).Msgf("decode CCTX.Message %s error", send.RelayedMessage) + } } gasLimit := send.GetCurrentOutTxParam().OutboundTxGasLimit @@ -373,7 +396,7 @@ func (signer *EVMSigner) TryProcessOutTx(send *types.CrossChainTx, outTxMan *Out logger.Error().Msgf("invalid message %s", msg) return } - tx, err = signer.SignCommandTx(msg[0], msg[1], to, send.GetCurrentOutTxParam().OutboundTxTssNonce, gasLimit, gasprice, height) + tx, err = signer.SignCommandTx(msg[0], msg[1], to, send.GetCurrentOutTxParam(), gasLimit, gasprice, height) } else if send.InboundTxParams.SenderChainId == common.ZetaChain().ChainId && send.CctxStatus.Status == types.CctxStatus_PendingOutbound && flags.IsOutboundEnabled { if send.GetCurrentOutTxParam().CoinType == common.CoinType_Gas { logger.Info().Msgf("SignWithdrawTx: %d => %s, nonce %d, gasprice %d", send.InboundTxParams.SenderChainId, toChain, send.GetCurrentOutTxParam().OutboundTxTssNonce, gasprice)