From 9e2c8e1df41b9fabff99e3633c735b0c487a5cb4 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Fri, 28 Feb 2025 11:48:28 -0500 Subject: [PATCH 1/5] test(e2e): add a runner for gov proposals in the e2e test (#3591) * add operator keys into ZetaTxServer * add operator keys into ZetaTxServer * add runer to create and vote on proposals at the start and end of e2e test * add changelog * add testing guide * add testing guide * add testing guide * update to using pointers for ZetaTxServer functions * remove unnecessary ssh server setup * skip gov tests if skipRegular is enabled * move StartOfE2E proposals after setup * add nosec --- changelog.md | 1 + cmd/zetae2e/local/local.go | 8 + .../orchestrator/Dockerfile.fastbuild | 2 + .../proposals_e2e_end/max_gas.json | 26 +++ .../proposals_e2e_start/emissions_params.json | 20 ++ .../localnet/orchestrator/start-zetae2e.sh | 14 ++ contrib/localnet/scripts/start-zetacored.sh | 4 +- e2e/TESTING_GUIDE.md | 6 + e2e/runner/gov_proposals.go | 193 ++++++++++++++++++ e2e/txserver/authority.go | 2 +- e2e/txserver/zeta_tx_server.go | 101 ++++++--- 11 files changed, 341 insertions(+), 36 deletions(-) create mode 100644 contrib/localnet/orchestrator/proposals_e2e_end/max_gas.json create mode 100644 contrib/localnet/orchestrator/proposals_e2e_start/emissions_params.json create mode 100644 e2e/runner/gov_proposals.go diff --git a/changelog.md b/changelog.md index 8144ac7cb0..f9c3c717b8 100644 --- a/changelog.md +++ b/changelog.md @@ -45,6 +45,7 @@ * [3503](https://github.com/zeta-chain/node/pull/3503) - add check in e2e test to ensure deletion of stale ballots * [3536](https://github.com/zeta-chain/node/pull/3536) - add e2e test for upgrading solana gateway program * [3560](https://github.com/zeta-chain/node/pull/3560) - initialize Sui E2E deposit tests +* [3591](https://github.com/zeta-chain/node/pull/3591) - add a runner for gov proposals in the e2e test. ## v28.0.0 diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index 7f71b7075c..d915b7ce3f 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -291,6 +291,11 @@ func localE2ETest(cmd *cobra.Command, _ []string) { // always mint ERC20 before every test execution deployerRunner.MintERC20OnEVM(1e10) + // Run the proposals under the start sequence(proposals_e2e_start folder) + if !skipRegular { + noError(deployerRunner.CreateGovProposals(runner.StartOfE2E)) + } + // run tests var eg errgroup.Group @@ -501,6 +506,9 @@ func localE2ETest(cmd *cobra.Command, _ []string) { logger.Print("❌ e2e tests failed after %s", time.Since(testStartTime).String()) os.Exit(1) } + if !skipRegular { + noError(deployerRunner.CreateGovProposals(runner.EndOfE2E)) + } logger.Print("✅ e2e tests completed in %s", time.Since(testStartTime).String()) diff --git a/contrib/localnet/orchestrator/Dockerfile.fastbuild b/contrib/localnet/orchestrator/Dockerfile.fastbuild index 308e59a146..b6539e94a9 100644 --- a/contrib/localnet/orchestrator/Dockerfile.fastbuild +++ b/contrib/localnet/orchestrator/Dockerfile.fastbuild @@ -8,6 +8,8 @@ COPY --from=geth /usr/local/bin/geth /usr/local/bin/ COPY --from=solana /usr/bin/solana /usr/local/bin/ COPY contrib/localnet/orchestrator/start-zetae2e.sh /work/ +COPY contrib/localnet/orchestrator/proposals_e2e_start/ /work/proposals_e2e_start/ +COPY contrib/localnet/orchestrator/proposals_e2e_end/ /work/proposals_e2e_end/ COPY contrib/localnet/scripts/wait-for-ton.sh /work/ COPY cmd/zetae2e/config/localnet.yml /work/config.yml RUN chmod +x /work/*.sh diff --git a/contrib/localnet/orchestrator/proposals_e2e_end/max_gas.json b/contrib/localnet/orchestrator/proposals_e2e_end/max_gas.json new file mode 100644 index 0000000000..4b4ac8d8b8 --- /dev/null +++ b/contrib/localnet/orchestrator/proposals_e2e_end/max_gas.json @@ -0,0 +1,26 @@ +{ + "messages": [ + { + "@type": "/cosmos.consensus.v1.MsgUpdateParams", + "authority": "zeta10d07y265gmmuvt4z0w9aw880jnsr700jvxasvr", + "block": { + "max_bytes": "22020096", + "max_gas": "150000000" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800s", + "max_bytes": "1048576" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + } + } + ], + "metadata": "", + "deposit": "1000000000000000000azeta", + "title": "Update Max Gas Limit to 150M", + "summary": "Update Max Gas Limit to 150M ZetaChain Athens Testnet." +} \ No newline at end of file diff --git a/contrib/localnet/orchestrator/proposals_e2e_start/emissions_params.json b/contrib/localnet/orchestrator/proposals_e2e_start/emissions_params.json new file mode 100644 index 0000000000..3bc4f2a114 --- /dev/null +++ b/contrib/localnet/orchestrator/proposals_e2e_start/emissions_params.json @@ -0,0 +1,20 @@ +{ + "messages": [ + { + "@type": "/zetachain.zetacore.emissions.MsgUpdateParams", + "params": { + "validatorEmissionPercentage": "0.50", + "observerEmissionPercentage": "0.25", + "tssSignerEmissionPercentage": "0.25", + "observerSlashAmount": "100000000000000000", + "ballotMaturityBlocks": 101, + "blockRewardAmount": "9620949074074074074.074070733466756687" + }, + "authority": "zeta10d07y265gmmuvt4z0w9aw880jnsr700jvxasvr" + } + ], + "metadata": "test proposal", + "deposit": "100000000azeta", + "title": "emissions param change", + "summary": "emissions param change" +} \ No newline at end of file diff --git a/contrib/localnet/orchestrator/start-zetae2e.sh b/contrib/localnet/orchestrator/start-zetae2e.sh index 989a9fb134..aa78cee7cd 100644 --- a/contrib/localnet/orchestrator/start-zetae2e.sh +++ b/contrib/localnet/orchestrator/start-zetae2e.sh @@ -145,6 +145,20 @@ fund_eth_from_config '.additional_accounts.user_erc20_revert.evm_address' 10000 # unlock emissions withdraw tests accounts fund_eth_from_config '.additional_accounts.user_emissions_withdraw.evm_address' 10000 "emissions withdraw tester" +mkdir -p /root/.zetacored/keyring-test/ +for i in 0 1; do + ssh root@zetacore$i "test -d /root/.zetacored/keyring-test/" && \ + (echo "Source directory found in zetacore$i, copying operator keys" && \ + mkdir -p /root/zetacore$i/ && \ + + scp -r root@zetacore$i:/root/.zetacored/keyring-test/ /root/zetacore$i/keyring-test/ && \ + echo "Files copied successfully from zetacore$i") || \ + echo "Error: keyring-test directory not found in zetacore$i container" + + zetacored keys rename operator operator$i --home=/root/zetacore$i/ --keyring-backend=test --yes + cp -r /root/zetacore$i/keyring-test/* /root/.zetacored/keyring-test/ +done + # unlock local solana relayer accounts if host solana > /dev/null; then solana_url=$(config_str '.rpcs.solana') diff --git a/contrib/localnet/scripts/start-zetacored.sh b/contrib/localnet/scripts/start-zetacored.sh index 4444238f64..043ebec06e 100755 --- a/contrib/localnet/scripts/start-zetacored.sh +++ b/contrib/localnet/scripts/start-zetacored.sh @@ -189,10 +189,10 @@ then # Update governance and other chain parameters for localnet jq ' - .app_state.gov.params.voting_period="100s" | + .app_state.gov.params.voting_period="30s" | .app_state.gov.params.quorum="0.1" | .app_state.gov.params.threshold="0.1" | - .app_state.gov.params.expedited_voting_period = "50s" | + .app_state.gov.params.expedited_voting_period = "10s" | .app_state.gov.deposit_params.min_deposit[0].denom = "azeta" | .app_state.gov.params.min_deposit[0].denom = "azeta" | .app_state.staking.params.bond_denom = "azeta" | diff --git a/e2e/TESTING_GUIDE.md b/e2e/TESTING_GUIDE.md index 58555bae44..00226212af 100644 --- a/e2e/TESTING_GUIDE.md +++ b/e2e/TESTING_GUIDE.md @@ -90,3 +90,9 @@ Arbitrary calls feature is an experimental and niche use case for now, these tes ``` eth_withdraw_and_arbitrary_call:1000 erc20_withdraw_and_arbitrary_call:1000 ``` + +## Gov proposal + +Any governace proposals can be executed in the E2E tests. There are two options for the sequence of the proposal execution. +1. Start of E2E tests: The proposal json needs to be placed in the `contrib/localnet/orchestrator/proposal_e2e_start` directory.All proposals in this directory will be executed before running the e2e tests +2. End of E2E tests: The proposal json needs to be placed in the `contrib/localnet/orchestrator/proposal_e2e_end` directory.All proposals in this directory will be executed after running the e2e tests diff --git a/e2e/runner/gov_proposals.go b/e2e/runner/gov_proposals.go new file mode 100644 index 0000000000..e1b59698da --- /dev/null +++ b/e2e/runner/gov_proposals.go @@ -0,0 +1,193 @@ +package runner + +import ( + "encoding/json" + "fmt" + "os" + "path/filepath" + "strconv" + "strings" + + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + + "github.com/zeta-chain/node/e2e/txserver" +) + +// ExecuteProposalSequence defines the sequence of proposals execution during the e2e tests +// StartOfE2E : this sequence is executed at the beginning of the e2e tests +// EndOfE2E : this sequence is executed at the end of the e2e tests +type ExecuteProposalSequence string + +const ( + StartOfE2E ExecuteProposalSequence = "start" + EndOfE2E ExecuteProposalSequence = "end" +) + +// CreateGovProposals creates and votes on proposals from the given directory +// The directory should contain JSON files with the correct proposal format +// The directories currently used are: +// - /contrib/orchestrator/proposals_e2e_start +// - /contrib/orchestrator/proposals_e2e_end +func (r *E2ERunner) CreateGovProposals(sequence ExecuteProposalSequence) error { + validatorsKeyring := r.ZetaTxServer.GetValidatorsKeyring() + + // List keys to verify that the keyring is working + validatorKeys, err := validatorsKeyring.List() + if err != nil { + return fmt.Errorf("failed to list validator keys: %w", err) + } + if len(validatorKeys) == 0 { + return fmt.Errorf("no validator keys found") + } + zetaTxServer := r.ZetaTxServer + validatorsTxServer := zetaTxServer.UpdateKeyring(validatorsKeyring) + + // Use the first validator as the depositor for all proposals + depositor := validatorKeys[0] + fromAddress, err := depositor.GetAddress() + if err != nil { + return fmt.Errorf("failed to get address for depositor: %w", err) + } + + // Read the proposals directory + proposalsDir := filepath.Join(fmt.Sprintf("/work/proposals_e2e_%s/", sequence)) + files, err := os.ReadDir(proposalsDir) + if err != nil { + return fmt.Errorf("failed to read proposals directory: %w", err) + } + // Process each file + for _, file := range files { + // Skip non-JSON files + if !strings.HasSuffix(file.Name(), ".json") || file.IsDir() { + continue + } + + proposalPath := filepath.Join(proposalsDir, file.Name()) + + // Parse the proposal file + // Returning an error here as all proposals added to the directory should be valid + parsedProposal, msgs, deposit, err := parseSubmitProposal(r.ZetaTxServer.GetCodec(), proposalPath) + if err != nil { + return fmt.Errorf("failed to parse proposal file %s: %w", file.Name(), err) + } + r.Logger.Print("executing proposal: file name: %s title: %s", file.Name(), parsedProposal.Title) + + // Create the proposal message + msg, err := govv1.NewMsgSubmitProposal( + msgs, + deposit, + fromAddress.String(), + parsedProposal.Metadata, + parsedProposal.Title, + parsedProposal.Summary, + parsedProposal.Expedited, + ) + if err != nil { + return fmt.Errorf("failed to create proposal message %s: %w", file.Name(), err) + } + + // Broadcast the transaction + res, err := validatorsTxServer.BroadcastTx(depositor.Name, msg) + if err != nil { + return fmt.Errorf("failed to broadcast transaction for proposal %s: %w", file.Name(), err) + } + + // Extract the proposal ID + proposalID := uint64(0) + for _, event := range res.Events { + if event.Type == types.EventTypeSubmitProposal { + for _, attr := range event.Attributes { + if attr.Key == types.AttributeKeyProposalID { + id, err := strconv.ParseUint(attr.Value, 10, 64) + if err != nil { + return err + } + proposalID = id + break + } + } + } + } + + // First proposal ID is always 1 + if proposalID == 0 { + return fmt.Errorf("failed to extract proposal ID from transaction for proposal %s", file.Name()) + } + + // Vote on the proposal + err = voteGovProposals(proposalID, validatorsTxServer, validatorKeys) + if err != nil { + return fmt.Errorf("failed to vote on proposal %d: %w", proposalID, err) + } + } + return nil +} + +// Vote yes on the proposal from both the validators +func voteGovProposals( + proposalID uint64, + validatorsTxServer txserver.ZetaTxServer, + validatorKeys []*keyring.Record, +) error { + for _, key := range validatorKeys { + address, err := key.GetAddress() + if err != nil { + return fmt.Errorf("failed to get address for key %s: %w", key.Name, err) + } + // Create the message + msg := govv1.NewMsgVote(address, proposalID, govv1.VoteOption_VOTE_OPTION_YES, "vote") + + _, err = validatorsTxServer.BroadcastTx(key.Name, msg) + if err != nil { + return fmt.Errorf("failed to broadcast transaction for vote on proposal %d: %w", proposalID, err) + } + } + return nil +} + +type proposal struct { + // Msgs defines an array of sdk.Msgs proto-JSON-encoded as Anys. + Messages []json.RawMessage `json:"messages,omitempty"` + Metadata string `json:"metadata"` + Deposit string `json:"deposit"` + Title string `json:"title"` + Summary string `json:"summary"` + Expedited bool `json:"expedited"` +} + +// parseSubmitProposal reads and parses the proposal. +func parseSubmitProposal(cdc codec.Codec, path string) (proposal, []sdk.Msg, sdk.Coins, error) { + var proposal proposal + + contents, err := os.ReadFile(path) // #nosec G304 - used for testing only + if err != nil { + return proposal, nil, nil, err + } + + err = json.Unmarshal(contents, &proposal) + if err != nil { + return proposal, nil, nil, err + } + + msgs := make([]sdk.Msg, len(proposal.Messages)) + for i, anyJSON := range proposal.Messages { + var msg sdk.Msg + err := cdc.UnmarshalInterfaceJSON(anyJSON, &msg) + if err != nil { + return proposal, nil, nil, err + } + + msgs[i] = msg + } + + deposit, err := sdk.ParseCoinsNormalized(proposal.Deposit) + if err != nil { + return proposal, nil, nil, err + } + + return proposal, msgs, deposit, nil +} diff --git a/e2e/txserver/authority.go b/e2e/txserver/authority.go index 43f00543a8..346ed8a4c5 100644 --- a/e2e/txserver/authority.go +++ b/e2e/txserver/authority.go @@ -9,7 +9,7 @@ import ( ) // AddAuthorization adds a new authorization in the authority module for admin message -func (zts ZetaTxServer) AddAuthorization(msgURL string) error { +func (zts *ZetaTxServer) AddAuthorization(msgURL string) error { // retrieve account accAdmin, err := zts.clientCtx.Keyring.Key(e2eutils.AdminPolicyName) if err != nil { diff --git a/e2e/txserver/zeta_tx_server.go b/e2e/txserver/zeta_tx_server.go index f7b7093d7c..dbb7e3bcbd 100644 --- a/e2e/txserver/zeta_tx_server.go +++ b/e2e/txserver/zeta_tx_server.go @@ -77,14 +77,15 @@ const EmissionsPoolAddress = "zeta1w43fn2ze2wyhu5hfmegr6vp52c3dgn0srdgymy" // ZetaTxServer is a ZetaChain tx server for E2E test type ZetaTxServer struct { - ctx context.Context - clientCtx client.Context - txFactory tx.Factory - name []string - mnemonic []string - address []string - blockTimeout time.Duration - authorityClient authoritytypes.QueryClient + ctx context.Context + clientCtx client.Context + txFactory tx.Factory + name []string + mnemonic []string + address []string + blockTimeout time.Duration + authorityClient authoritytypes.QueryClient + validatorsKeyring keyring.Keyring } // NewZetaTxServer returns a new TxServer with provided account @@ -134,31 +135,60 @@ func NewZetaTxServer(rpcAddr string, names []string, privateKeys []string, chain addresses = append(addresses, accAddr.String()) } + // initialize validators keyring. The validator keys have been copied to this location in the docker image. + // Refer contrib/localnet/orchestrator/Dockerfile.fastbuild for more details + validatorsKeyring, err := keyring.New( + "validatorKeys", + keyring.BackendTest, + "/root/.zetacored/", + nil, + cdc, + hd.EthSecp256k1Option(), + ) + if err != nil { + return nil, fmt.Errorf("failed to create validator keyring: %w", err) + } + clientCtx := newContext(rpc, cdc, reg, kr, chainID) txf := newFactory(clientCtx) return &ZetaTxServer{ - ctx: ctx, - clientCtx: clientCtx, - txFactory: txf, - name: names, - address: addresses, - blockTimeout: 2 * time.Minute, + ctx: ctx, + clientCtx: clientCtx, + txFactory: txf, + name: names, + address: addresses, + blockTimeout: 2 * time.Minute, + validatorsKeyring: validatorsKeyring, }, nil } +// UpdateKeyring updates the keyring being used by the ZetaTxServer +// This returns a copy of the ZetaTxServer with the updated keyring +func (zts *ZetaTxServer) UpdateKeyring(kr keyring.Keyring) ZetaTxServer { + ztsUpdated := *zts + ztsUpdated.clientCtx = ztsUpdated.clientCtx.WithKeyring(kr) + ztsUpdated.txFactory = newFactory(ztsUpdated.clientCtx) + return ztsUpdated +} + // GetAccountName returns the account name from the given index -// returns empty string if index is out of bound, error should be handled by caller -func (zts ZetaTxServer) GetAccountName(index int) string { +// returns empty string if index is out of bound, caller should handle error +func (zts *ZetaTxServer) GetAccountName(index int) string { if index >= len(zts.name) { return "" } return zts.name[index] } +// GetCodec returns the codec for the ZetaTxServer +func (zts *ZetaTxServer) GetCodec() codec.Codec { + return zts.clientCtx.Codec +} + // GetAccountAddress returns the account address from the given index // returns empty string if index is out of bound, error should be handled by caller -func (zts ZetaTxServer) GetAccountAddress(index int) string { +func (zts *ZetaTxServer) GetAccountAddress(index int) string { if index >= len(zts.address) { return "" } @@ -166,7 +196,7 @@ func (zts ZetaTxServer) GetAccountAddress(index int) string { } // GetAccountAddressFromName returns the account address from the given name -func (zts ZetaTxServer) GetAccountAddressFromName(name string) (string, error) { +func (zts *ZetaTxServer) GetAccountAddressFromName(name string) (string, error) { acc, err := zts.clientCtx.Keyring.Key(name) if err != nil { return "", err @@ -180,7 +210,7 @@ func (zts ZetaTxServer) GetAccountAddressFromName(name string) (string, error) { // MustGetAccountAddressFromName returns the account address from the given name.It panics on error // and should be used in tests only -func (zts ZetaTxServer) MustGetAccountAddressFromName(name string) string { +func (zts *ZetaTxServer) MustGetAccountAddressFromName(name string) string { acc, err := zts.clientCtx.Keyring.Key(name) if err != nil { panic(err) @@ -192,14 +222,19 @@ func (zts ZetaTxServer) MustGetAccountAddressFromName(name string) string { return addr.String() } +// GetValidatorsKeyring returns the validators keyring +func (zts *ZetaTxServer) GetValidatorsKeyring() keyring.Keyring { + return zts.validatorsKeyring +} + // GetAllAccountAddress returns all account addresses -func (zts ZetaTxServer) GetAllAccountAddress() []string { +func (zts *ZetaTxServer) GetAllAccountAddress() []string { return zts.address } // GetAccountMnemonic returns the account name from the given index // returns empty string if index is out of bound, error should be handled by caller -func (zts ZetaTxServer) GetAccountMnemonic(index int) string { +func (zts *ZetaTxServer) GetAccountMnemonic(index int) string { if index >= len(zts.mnemonic) { return "" } @@ -208,7 +243,7 @@ func (zts ZetaTxServer) GetAccountMnemonic(index int) string { // BroadcastTx broadcasts a tx to ZetaChain with the provided msg from the account // and waiting for blockTime for tx to be included in the block -func (zts ZetaTxServer) BroadcastTx(account string, msgs ...sdktypes.Msg) (*sdktypes.TxResponse, error) { +func (zts *ZetaTxServer) BroadcastTx(account string, msgs ...sdktypes.Msg) (*sdktypes.TxResponse, error) { // Find number and sequence and set it acc, err := zts.clientCtx.Keyring.Key(account) if err != nil { @@ -244,7 +279,7 @@ func (zts ZetaTxServer) BroadcastTx(account string, msgs ...sdktypes.Msg) (*sdkt return broadcastWithBlockTimeout(zts, txBytes) } -func broadcastWithBlockTimeout(zts ZetaTxServer, txBytes []byte) (*sdktypes.TxResponse, error) { +func broadcastWithBlockTimeout(zts *ZetaTxServer, txBytes []byte) (*sdktypes.TxResponse, error) { res, err := zts.clientCtx.BroadcastTx(txBytes) if err != nil { if res == nil { @@ -309,7 +344,7 @@ type intoAny interface { // It takes into account that the required policy get updated in v28 operational -> admin // TODO: remove retry after v28 upgrade // https://github.com/zeta-chain/node/issues/3545 -func (zts ZetaTxServer) UpdateChainParams(chainParams *observertypes.ChainParams) error { +func (zts *ZetaTxServer) UpdateChainParams(chainParams *observertypes.ChainParams) error { if _, err := zts.BroadcastTx(utils.AdminPolicyName, observertypes.NewMsgUpdateChainParams( zts.MustGetAccountAddressFromName(utils.AdminPolicyName), chainParams, @@ -324,7 +359,7 @@ func (zts ZetaTxServer) UpdateChainParams(chainParams *observertypes.ChainParams } // EnableHeaderVerification enables the header verification for the given chain IDs -func (zts ZetaTxServer) EnableHeaderVerification(account string, chainIDList []int64) error { +func (zts *ZetaTxServer) EnableHeaderVerification(account string, chainIDList []int64) error { // retrieve account acc, err := zts.clientCtx.Keyring.Key(account) if err != nil { @@ -343,7 +378,7 @@ func (zts ZetaTxServer) EnableHeaderVerification(account string, chainIDList []i } // UpdateGatewayAddress updates the gateway address -func (zts ZetaTxServer) UpdateGatewayAddress(account, gatewayAddr string) error { +func (zts *ZetaTxServer) UpdateGatewayAddress(account, gatewayAddr string) error { // retrieve account acc, err := zts.clientCtx.Keyring.Key(account) if err != nil { @@ -364,7 +399,7 @@ func (zts ZetaTxServer) UpdateGatewayAddress(account, gatewayAddr string) error // DeploySystemContracts deploys the system contracts // returns the addresses of uniswap factory, router -func (zts ZetaTxServer) DeploySystemContracts( +func (zts *ZetaTxServer) DeploySystemContracts( accountOperational, accountAdmin string, ) (SystemContractAddresses, error) { // retrieve account @@ -415,7 +450,7 @@ func (zts ZetaTxServer) DeploySystemContracts( // DeployZRC20s deploys the ZRC20 contracts // returns the addresses of erc20 and spl zrc20 -func (zts ZetaTxServer) DeployZRC20s( +func (zts *ZetaTxServer) DeployZRC20s( zrc20Deployment ZRC20Deployment, skipChain func(chainID int64) bool, ) (*ZRC20Addresses, error) { @@ -581,7 +616,7 @@ func (zts ZetaTxServer) DeployZRC20s( } // FundEmissionsPool funds the emissions pool with the given amount -func (zts ZetaTxServer) FundEmissionsPool(account string, amount *big.Int) error { +func (zts *ZetaTxServer) FundEmissionsPool(account string, amount *big.Int) error { // retrieve account acc, err := zts.clientCtx.Keyring.Key(account) if err != nil { @@ -610,7 +645,7 @@ func (zts ZetaTxServer) FundEmissionsPool(account string, amount *big.Int) error return err } -func (zts ZetaTxServer) WithdrawAllEmissions(withdrawAmount sdkmath.Int, account, observer string) error { +func (zts *ZetaTxServer) WithdrawAllEmissions(withdrawAmount sdkmath.Int, account, observer string) error { // retrieve account acc, err := zts.clientCtx.Keyring.Key(account) if err != nil { @@ -633,7 +668,7 @@ func (zts ZetaTxServer) WithdrawAllEmissions(withdrawAmount sdkmath.Int, account } // UpdateKeygen sets a new keygen height . The new height is the current height + 30 -func (zts ZetaTxServer) UpdateKeygen(height int64) error { +func (zts *ZetaTxServer) UpdateKeygen(height int64) error { keygenHeight := height + 30 _, err := zts.BroadcastTx(zts.GetAccountName(0), observertypes.NewMsgUpdateKeygen( zts.GetAccountAddress(0), @@ -648,7 +683,7 @@ func (zts *ZetaTxServer) SetAuthorityClient(authorityClient authoritytypes.Query } // InitializeLiquidityCaps initializes the liquidity cap for the given coin with a large value -func (zts ZetaTxServer) InitializeLiquidityCaps(zrc20s ...string) error { +func (zts *ZetaTxServer) InitializeLiquidityCaps(zrc20s ...string) error { liquidityCap := sdkmath.NewUint(1e18).MulUint64(1e12) msgs := make([]sdktypes.Msg, len(zrc20s)) @@ -665,7 +700,7 @@ func (zts ZetaTxServer) InitializeLiquidityCaps(zrc20s ...string) error { // fetchMessagePermissions fetches the message permissions for a given message // return a bool preV19 to indicate the node is preV19 and the query doesn't exist -func (zts ZetaTxServer) fetchMessagePermissions(msg sdktypes.Msg) (authoritytypes.PolicyType, bool, error) { +func (zts *ZetaTxServer) fetchMessagePermissions(msg sdktypes.Msg) (authoritytypes.PolicyType, bool, error) { msgURL := sdktypes.MsgTypeURL(msg) res, err := zts.authorityClient.Authorization(zts.ctx, &authoritytypes.QueryAuthorizationRequest{ From 72edb15addd1add929bae070583f98e0afda0e8d Mon Sep 17 00:00:00 2001 From: skosito Date: Fri, 28 Feb 2025 17:48:06 +0000 Subject: [PATCH 2/5] cleanup unused ibc ante handler (#3608) --- app/ante/handler_options.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index 8a7db00ae2..96ce304ab1 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -27,8 +27,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" ethante "github.com/zeta-chain/ethermint/app/ante" ethermint "github.com/zeta-chain/ethermint/types" evmtypes "github.com/zeta-chain/ethermint/x/evm/types" @@ -37,9 +35,10 @@ import ( ) type HandlerOptions struct { - AccountKeeper evmtypes.AccountKeeper - BankKeeper evmtypes.BankKeeper - IBCKeeper *ibckeeper.Keeper + AccountKeeper evmtypes.AccountKeeper + BankKeeper evmtypes.BankKeeper + // TODO: enable back IBC + // IBCKeeper *ibckeeper.Keeper FeeMarketKeeper FeeMarketKeeper EvmKeeper EVMKeeper FeegrantKeeper ante.FeegrantKeeper @@ -76,7 +75,9 @@ func NewLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { // Note: signature verification uses EIP instead of the cosmos signature validator ethante.NewLegacyEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), ante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewRedundantRelayDecorator(options.IBCKeeper), + // TODO: enable back IBC + // check if this ante handler is needed in non legacy cosmos ante handlers + // ibcante.NewRedundantRelayDecorator(options.IBCKeeper), ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), ) } From 0c5bccb1a67447476993fe55b7285e624f2314fd Mon Sep 17 00:00:00 2001 From: huochexizhan Date: Fri, 28 Feb 2025 19:05:36 +0100 Subject: [PATCH 3/5] chore: fix some function names in comment (#3610) Signed-off-by: huochexizhan --- testutil/sample/crypto.go | 2 +- testutil/sample/sample.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testutil/sample/crypto.go b/testutil/sample/crypto.go index 2ff635678f..b631520c4e 100644 --- a/testutil/sample/crypto.go +++ b/testutil/sample/crypto.go @@ -103,7 +103,7 @@ func BTCAddressP2WPKH(t *testing.T, r *rand.Rand, net *chaincfg.Params) *btcutil return addr } -// BtcAddressP2WPKH returns a pkscript for a sample btc P2WPKH address +// BTCAddressP2WPKHScript returns a pkscript for a sample btc P2WPKH address func BTCAddressP2WPKHScript(t *testing.T, r *rand.Rand, net *chaincfg.Params) []byte { addr := BTCAddressP2WPKH(t, r, net) script, err := txscript.PayToAddrScript(addr) diff --git a/testutil/sample/sample.go b/testutil/sample/sample.go index 99dd62844c..f2cd97278f 100644 --- a/testutil/sample/sample.go +++ b/testutil/sample/sample.go @@ -96,7 +96,7 @@ func Uint64InRange(low, high uint64) uint64 { return r.Uint64()%(high-low) + low } -// Uint64InRange returns a sample uint64 in the given ranges +// Uint64InRangeFromRand returns a sample uint64 in the given ranges func Uint64InRangeFromRand(r *rand.Rand, low, high uint64) uint64 { if low == high { return low // avoid division by zero From bc7906b168d44ab32718633edbaee948da4be8b5 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Fri, 28 Feb 2025 10:19:51 -0800 Subject: [PATCH 4/5] fix(ci): only run sec checks once on PRs (#3607) --- .github/workflows/zetachain-sec-checks.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zetachain-sec-checks.yml b/.github/workflows/zetachain-sec-checks.yml index 47aba1fe2e..bc749b9a42 100644 --- a/.github/workflows/zetachain-sec-checks.yml +++ b/.github/workflows/zetachain-sec-checks.yml @@ -1,6 +1,11 @@ name: "CodeQL - ZetaChain Custom checks " -on: [push, pull_request] +on: + push: + branches: + - develop + - release/* + pull_request: jobs: analyze: From 1eff305bb29fc458b50f1602af8b7e728545e579 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Fri, 28 Feb 2025 11:05:28 -0800 Subject: [PATCH 5/5] feat: add disable_tss_block_scan parameter (#3578) * feat: add skip_block_scan parameter update operational chain params * s/skip_block_scan/disable_block_scan/g * fix comment * update * s/disable_block_scan/disable_tss_block_scan/g * actually ensure block scan isn't enabled on localnet fix legacy and admin tests again ensure tests don't spin if context is cancelled by checking context in wait loops * panic so that test halts immediatly * check other values untouched * changelog --- changelog.md | 1 + cmd/zetae2e/local/admin.go | 4 +- cmd/zetae2e/local/bitcoin.go | 4 +- cmd/zetae2e/local/local.go | 2 +- cmd/zetae2e/local/performance.go | 2 +- cmd/zetae2e/stress.go | 4 +- docs/openapi/openapi.swagger.yaml | 5 + docs/spec/observer/messages.md | 1 + .../test_eth_deposit_liquidity_cap.go | 22 +- e2e/e2etests/test_migrate_chain_support.go | 4 +- e2e/e2etests/test_pause_zrc20.go | 8 +- e2e/e2etests/test_stress_eth_deposit.go | 5 +- e2e/runner/evm.go | 21 ++ e2e/runner/legacy_setup_evm.go | 5 +- e2e/runner/run.go | 4 +- e2e/runner/runner.go | 7 +- e2e/utils/zetacore.go | 3 + .../zetachain/zetacore/observer/params.proto | 4 + proto/zetachain/zetacore/observer/tx.proto | 1 + .../zetacore/observer/params_pb.d.ts | 8 + .../zetachain/zetacore/observer/tx_pb.d.ts | 5 + x/observer/keeper/migrator.go | 6 + ..._server_update_operational_chain_params.go | 1 + ...er_update_operational_chain_params_test.go | 5 +- x/observer/migrations/v11/migrate.go | 61 +++++ x/observer/migrations/v11/migrate_test.go | 67 +++++ x/observer/module.go | 3 + x/observer/types/chain_params.go | 1 + x/observer/types/params.pb.go | 133 ++++++---- x/observer/types/tx.pb.go | 235 +++++++++++------- zetaclient/chains/evm/observer/inbound.go | 25 +- 31 files changed, 480 insertions(+), 177 deletions(-) create mode 100644 x/observer/migrations/v11/migrate.go create mode 100644 x/observer/migrations/v11/migrate_test.go diff --git a/changelog.md b/changelog.md index f9c3c717b8..6d73cd54bb 100644 --- a/changelog.md +++ b/changelog.md @@ -25,6 +25,7 @@ * [3548](https://github.com/zeta-chain/node/pull/3548) - ensure cctx list is sorted by creation time * [3562](https://github.com/zeta-chain/node/pull/3562) - add Sui withdrawals * [3600](https://github.com/zeta-chain/node/pull/3600) - add dedicated zetaclient restricted addresses config. This file will be automatically reloaded when it changes without needing to restart zetaclient. +* [3578](https://github.com/zeta-chain/node/pull/3578) - Add disable_tss_block_scan parameter. This parameter will be used to disable expensive block scanning actions on non-ethereum EVM Chains. ### Refactor diff --git a/cmd/zetae2e/local/admin.go b/cmd/zetae2e/local/admin.go index 2697273346..34dc390e06 100644 --- a/cmd/zetae2e/local/admin.go +++ b/cmd/zetae2e/local/admin.go @@ -45,8 +45,8 @@ func adminTestRoutine( // depositing the necessary tokens on ZetaChain txZetaDeposit := adminRunner.LegacyDepositZeta() - txEtherDeposit := adminRunner.LegacyDepositEther() - txERC20Deposit := adminRunner.LegacyDepositERC20() + txEtherDeposit := adminRunner.DepositEtherDeployer() + txERC20Deposit := adminRunner.DepositERC20Deployer() adminRunner.WaitForMinedCCTX(txZetaDeposit) adminRunner.WaitForMinedCCTX(txEtherDeposit) adminRunner.WaitForMinedCCTX(txERC20Deposit) diff --git a/cmd/zetae2e/local/bitcoin.go b/cmd/zetae2e/local/bitcoin.go index c77a34267e..0a403afc5c 100644 --- a/cmd/zetae2e/local/bitcoin.go +++ b/cmd/zetae2e/local/bitcoin.go @@ -158,8 +158,8 @@ func initBitcoinRunner( runner.WaitForTxReceiptOnEVM(txERC20Send) // deposit ETH and ERC20 tokens on ZetaChain - txEtherDeposit := runner.LegacyDepositEther() - txERC20Deposit := runner.LegacyDepositERC20() + txEtherDeposit := runner.DepositEtherDeployer() + txERC20Deposit := runner.DepositERC20Deployer() runner.WaitForMinedCCTX(txEtherDeposit) runner.WaitForMinedCCTX(txERC20Deposit) diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index d915b7ce3f..2c8558a3f3 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -230,7 +230,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) { startTime := time.Now() //setup protocol contracts v1 as they are still supported for now - deployerRunner.LegacySetupEVM(contractsDeployed) + deployerRunner.LegacySetupEVM(contractsDeployed, testLegacy) // setup protocol contracts on the connected EVM chain deployerRunner.SetupEVM() diff --git a/cmd/zetae2e/local/performance.go b/cmd/zetae2e/local/performance.go index 312dc91665..eb8a1cc0cb 100644 --- a/cmd/zetae2e/local/performance.go +++ b/cmd/zetae2e/local/performance.go @@ -89,7 +89,7 @@ func ethereumWithdrawPerformanceRoutine( startTime := time.Now() // depositing the necessary tokens on ZetaChain - txEtherDeposit := r.LegacyDepositEther() + txEtherDeposit := r.DepositEtherDeployer() r.WaitForMinedCCTX(txEtherDeposit) tests, err := r.GetE2ETestsToRunByName( diff --git a/cmd/zetae2e/stress.go b/cmd/zetae2e/stress.go index 09ee1553e4..9c941663ed 100644 --- a/cmd/zetae2e/stress.go +++ b/cmd/zetae2e/stress.go @@ -129,7 +129,7 @@ func StressTest(cmd *cobra.Command, _ []string) { // setup TSS addresses noError(e2eTest.SetTSSAddresses()) - e2eTest.LegacySetupEVM(stressTestArgs.contractsDeployed) + e2eTest.LegacySetupEVM(stressTestArgs.contractsDeployed, false) // If stress test is running on local docker environment switch stressTestArgs.network { @@ -142,7 +142,7 @@ func StressTest(cmd *cobra.Command, _ []string) { }) // deposit on ZetaChain - e2eTest.LegacyDepositEther() + e2eTest.DepositEtherDeployer() e2eTest.LegacyDepositZeta() case "TESTNET": ethZRC20Addr := must(e2eTest.SystemContract.GasCoinZRC20ByChainId(&bind.CallOpts{}, big.NewInt(5))) diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index dd56e3b4e7..d0a5e1ebb1 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -58469,6 +58469,11 @@ definitions: confirmationParams: $ref: '#/definitions/zetachain.zetacore.observer.ConfirmationParams' title: Advanced confirmation parameters for chain to support fast observation + disableTssBlockScan: + type: boolean + description: |- + Skip actions that require scanning the contents of each block. + The main thing this disables is transfers directly to the TSS address. zetachain.zetacore.observer.ChainParamsList: type: object properties: diff --git a/docs/spec/observer/messages.md b/docs/spec/observer/messages.md index 88f582559d..5943a42899 100644 --- a/docs/spec/observer/messages.md +++ b/docs/spec/observer/messages.md @@ -201,6 +201,7 @@ message MsgUpdateOperationalChainParams { int64 outbound_schedule_interval = 7; int64 outbound_schedule_lookahead = 8; ConfirmationParams confirmation_params = 9; + bool disable_tss_block_scan = 10; } ``` diff --git a/e2e/e2etests/test_eth_deposit_liquidity_cap.go b/e2e/e2etests/test_eth_deposit_liquidity_cap.go index 169af6ac97..3906adb2e0 100644 --- a/e2e/e2etests/test_eth_deposit_liquidity_cap.go +++ b/e2e/e2etests/test_eth_deposit_liquidity_cap.go @@ -6,6 +6,7 @@ import ( "cosmossdk.io/math" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "github.com/zeta-chain/node/e2e/runner" "github.com/zeta-chain/node/e2e/utils" @@ -35,8 +36,11 @@ func TestDepositEtherLiquidityCap(r *runner.E2ERunner, args []string) { r.Logger.Info("set liquidity cap tx hash: %s", res.TxHash) r.Logger.Info("Depositing more than liquidity cap should make cctx reverted") - signedTx, err := r.LegacySendEther(r.TSSAddress, amountMoreThanCap, nil) - require.NoError(r, err) + signedTx := r.ETHDeposit( + r.EVMAddress(), + amountMoreThanCap, + gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)}, + ) receipt := utils.MustWaitForTxReceipt(r.Ctx, r.EVMClient, signedTx, r.Logger, r.ReceiptTimeout) utils.RequireTxSuccessful(r, receipt) @@ -50,8 +54,11 @@ func TestDepositEtherLiquidityCap(r *runner.E2ERunner, args []string) { initialBal, err := r.ETHZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress()) require.NoError(r, err) - signedTx, err = r.LegacySendEther(r.TSSAddress, amountLessThanCap, nil) - require.NoError(r, err) + signedTx = r.ETHDeposit( + r.EVMAddress(), + amountLessThanCap, + gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)}, + ) receipt = utils.MustWaitForTxReceipt(r.Ctx, r.EVMClient, signedTx, r.Logger, r.ReceiptTimeout) utils.RequireTxSuccessful(r, receipt) @@ -82,8 +89,11 @@ func TestDepositEtherLiquidityCap(r *runner.E2ERunner, args []string) { initialBal, err = r.ETHZRC20.BalanceOf(&bind.CallOpts{}, r.EVMAddress()) require.NoError(r, err) - signedTx, err = r.LegacySendEther(r.TSSAddress, amountMoreThanCap, nil) - require.NoError(r, err) + signedTx = r.ETHDeposit( + r.EVMAddress(), + amountMoreThanCap, + gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)}, + ) receipt = utils.MustWaitForTxReceipt(r.Ctx, r.EVMClient, signedTx, r.Logger, r.ReceiptTimeout) utils.RequireTxSuccessful(r, receipt) diff --git a/e2e/e2etests/test_migrate_chain_support.go b/e2e/e2etests/test_migrate_chain_support.go index f86486e404..583ec98610 100644 --- a/e2e/e2etests/test_migrate_chain_support.go +++ b/e2e/e2etests/test_migrate_chain_support.go @@ -49,7 +49,7 @@ func TestMigrateChainSupport(r *runner.E2ERunner, _ []string) { newRunner, err := configureEVM2(r) require.NoError(r, err) - newRunner.LegacySetupEVM(false) + newRunner.LegacySetupEVM(false, false) // mint some ERC20 newRunner.MintERC20OnEVM(10000) @@ -182,7 +182,7 @@ func TestMigrateChainSupport(r *runner.E2ERunner, _ []string) { newRunner.ERC20ZRC20 = erc20ZRC20 // deposit ERC20 on ZetaChain - txERC20Deposit := newRunner.LegacyDepositERC20() + txERC20Deposit := newRunner.DepositERC20Deployer() newRunner.WaitForMinedCCTX(txERC20Deposit) // stop mining diff --git a/e2e/e2etests/test_pause_zrc20.go b/e2e/e2etests/test_pause_zrc20.go index ed76341186..a555c4e229 100644 --- a/e2e/e2etests/test_pause_zrc20.go +++ b/e2e/e2etests/test_pause_zrc20.go @@ -92,13 +92,9 @@ func TestPauseZRC20(r *runner.E2ERunner, _ []string) { utils.RequireTxSuccessful(r, receipt) // Check deposit revert when paused - signedTx, err := r.LegacySendEther(r.TSSAddress, big.NewInt(1e17), nil) - require.NoError(r, err) - - receipt = utils.MustWaitForTxReceipt(r.Ctx, r.EVMClient, signedTx, r.Logger, r.ReceiptTimeout) - utils.RequireTxSuccessful(r, receipt) + depositHash := r.DepositEtherDeployer() - cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, signedTx.Hash().Hex(), r.CctxClient, r.Logger, r.CctxTimeout) + cctx := utils.WaitCctxMinedByInboundHash(r.Ctx, depositHash.Hex(), r.CctxClient, r.Logger, r.CctxTimeout) utils.RequireCCTXStatus(r, cctx, types.CctxStatus_Reverted) r.Logger.Info("CCTX has been reverted") diff --git a/e2e/e2etests/test_stress_eth_deposit.go b/e2e/e2etests/test_stress_eth_deposit.go index 5e1425e004..411f91a2a7 100644 --- a/e2e/e2etests/test_stress_eth_deposit.go +++ b/e2e/e2etests/test_stress_eth_deposit.go @@ -2,10 +2,12 @@ package e2etests import ( "fmt" + "math/big" "time" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/zeta-chain/protocol-contracts/pkg/gatewayevm.sol" "golang.org/x/sync/errgroup" "github.com/zeta-chain/node/e2e/runner" @@ -29,7 +31,8 @@ func TestStressEtherDeposit(r *runner.E2ERunner, args []string) { // send the deposits for i := 0; i < numDeposits; i++ { i := i - hash := r.LegacyDepositEtherWithAmount(depositAmount) + tx := r.ETHDeposit(r.EVMAddress(), depositAmount, gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)}) + hash := tx.Hash() r.Logger.Print("index %d: starting deposit, tx hash: %s", i, hash.Hex()) eg.Go(func() error { return monitorEtherDeposit(r, hash, i, time.Now()) }) diff --git a/e2e/runner/evm.go b/e2e/runner/evm.go index 0bfa62a955..f27c4d881d 100644 --- a/e2e/runner/evm.go +++ b/e2e/runner/evm.go @@ -23,6 +23,9 @@ func (r *E2ERunner) ETHDeposit( amount *big.Int, revertOptions gatewayevm.RevertOptions, ) *ethtypes.Transaction { + r.Lock() + defer r.Unlock() + // set the value of the transaction previousValue := r.EVMAuth.Value defer func() { @@ -38,6 +41,24 @@ func (r *E2ERunner) ETHDeposit( return tx } +// DepositEtherDeployer sends Ethers into ZEVM using V2 protocol contracts +func (r *E2ERunner) DepositEtherDeployer() ethcommon.Hash { + amount := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(100)) // 100 eth + tx := r.ETHDeposit(r.EVMAddress(), amount, gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)}) + return tx.Hash() +} + +// DepositERC20Deployer sends ERC20 into ZEVM using v2 protocol contracts +func (r *E2ERunner) DepositERC20Deployer() ethcommon.Hash { + r.Logger.Print("⏳ depositing ERC20 into ZEVM") + + r.ApproveERC20OnEVM(r.GatewayEVMAddr) + + oneHundred := big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(100)) + tx := r.ERC20Deposit(r.EVMAddress(), oneHundred, gatewayevm.RevertOptions{OnRevertGasLimit: big.NewInt(0)}) + return tx.Hash() +} + // ETHDepositAndCall calls DepositAndCall of Gateway with gas token on EVM func (r *E2ERunner) ETHDepositAndCall( receiver ethcommon.Address, diff --git a/e2e/runner/legacy_setup_evm.go b/e2e/runner/legacy_setup_evm.go index 4c1b3c9747..5568f64a7d 100644 --- a/e2e/runner/legacy_setup_evm.go +++ b/e2e/runner/legacy_setup_evm.go @@ -39,7 +39,7 @@ func (r *E2ERunner) LegacySetEVMContractsFromConfig() { } // LegacySetupEVM setup legacy contracts on EVM for e2e test -func (r *E2ERunner) LegacySetupEVM(contractsDeployed bool) { +func (r *E2ERunner) LegacySetupEVM(contractsDeployed bool, legacyTestRunning bool) { r.Logger.Print("⚙️ setting up EVM network legacy contracts") startTime := time.Now() defer func() { @@ -137,6 +137,9 @@ func (r *E2ERunner) LegacySetupEVM(contractsDeployed bool) { chainParams := currentChainParamsRes.ChainParams chainParams.ConnectorContractAddress = r.ConnectorEthAddr.Hex() chainParams.ZetaTokenContractAddress = r.ZetaEthAddr.Hex() + if legacyTestRunning { + chainParams.DisableTssBlockScan = false + } err = r.ZetaTxServer.UpdateChainParams(chainParams) require.NoError(r, err, "failed to update chain params") diff --git a/e2e/runner/run.go b/e2e/runner/run.go index 318e5734c0..2f627ce953 100644 --- a/e2e/runner/run.go +++ b/e2e/runner/run.go @@ -50,12 +50,12 @@ func (r *E2ERunner) RunE2ETest(e2eTest E2ETest, checkAccounting bool) error { }() select { + case <-r.Ctx.Done(): + return fmt.Errorf("context cancelled in %s after %s", e2eTest.Name, time.Since(startTime)) case err := <-errChan: if err != nil { return fmt.Errorf("%s failed (duration %s): %w", e2eTest.Name, time.Since(startTime), err) } - case <-r.Ctx.Done(): - return fmt.Errorf("context cancelled in %s after %s", e2eTest.Name, time.Since(startTime)) } // check zrc20 balance vs. supply diff --git a/e2e/runner/runner.go b/e2e/runner/runner.go index b114795059..5d80c85530 100644 --- a/e2e/runner/runner.go +++ b/e2e/runner/runner.go @@ -455,7 +455,12 @@ func (r *E2ERunner) Errorf(format string, args ...any) { // FailNow implemented to mimic the behavior of testing.T.FailNow func (r *E2ERunner) FailNow() { r.Logger.Error("Test failed") - r.CtxCancel(fmt.Errorf("FailNow on %s", r.Name)) + err := fmt.Errorf("FailNow on %s", r.Name) + r.CtxCancel(err) + // this panic ensures that the test routine exits fast. + // it should be caught and handled gracefully so long + // as the test is being executed by RunE2ETest(). + panic(err) } func (r *E2ERunner) requireTxSuccessful(receipt *ethtypes.Receipt, msgAndArgs ...any) { diff --git a/e2e/utils/zetacore.go b/e2e/utils/zetacore.go index 3446141fa8..3b1b483999 100644 --- a/e2e/utils/zetacore.go +++ b/e2e/utils/zetacore.go @@ -83,6 +83,8 @@ func WaitCctxsMinedByInboundHash( timedOut := time.Since(startTime) > timeout require.False(t, timedOut, "waiting cctx timeout, cctx not mined, inbound hash: %s", inboundHash) + require.NoError(t, ctx.Err()) + time.Sleep(500 * time.Millisecond) // We use InTxHashToCctxData instead of InboundTrackerAllByChain to able to run these tests with the previous version @@ -154,6 +156,7 @@ func WaitCCTXMinedByIndex( for i := 0; ; i++ { require.False(t, time.Since(startTime) > timeout, "waiting cctx timeout, cctx not mined, cctx: %s", cctxIndex) + require.NoError(t, ctx.Err()) if i > 0 { time.Sleep(500 * time.Millisecond) diff --git a/proto/zetachain/zetacore/observer/params.proto b/proto/zetachain/zetacore/observer/params.proto index 0db7a1253b..035fdc8161 100644 --- a/proto/zetachain/zetacore/observer/params.proto +++ b/proto/zetachain/zetacore/observer/params.proto @@ -34,6 +34,10 @@ message ChainParams { // Advanced confirmation parameters for chain to support fast observation ConfirmationParams confirmation_params = 18; + + // Skip actions that require scanning the contents of each block. + // The main thing this disables is transfers directly to the TSS address. + bool disable_tss_block_scan = 19; } // Deprecated(v17) diff --git a/proto/zetachain/zetacore/observer/tx.proto b/proto/zetachain/zetacore/observer/tx.proto index e645404662..e15ad2f4da 100644 --- a/proto/zetachain/zetacore/observer/tx.proto +++ b/proto/zetachain/zetacore/observer/tx.proto @@ -85,6 +85,7 @@ message MsgUpdateOperationalChainParams { int64 outbound_schedule_interval = 7; int64 outbound_schedule_lookahead = 8; ConfirmationParams confirmation_params = 9 [ (gogoproto.nullable) = false ]; + bool disable_tss_block_scan = 10; } message MsgUpdateOperationalChainParamsResponse {} diff --git a/typescript/zetachain/zetacore/observer/params_pb.d.ts b/typescript/zetachain/zetacore/observer/params_pb.d.ts index 3309a91a5f..769f5c98fe 100644 --- a/typescript/zetachain/zetacore/observer/params_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/params_pb.d.ts @@ -120,6 +120,14 @@ export declare class ChainParams extends Message { */ confirmationParams?: ConfirmationParams; + /** + * Skip actions that require scanning the contents of each block. + * The main thing this disables is transfers directly to the TSS address. + * + * @generated from field: bool disable_tss_block_scan = 19; + */ + disableTssBlockScan: boolean; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/typescript/zetachain/zetacore/observer/tx_pb.d.ts b/typescript/zetachain/zetacore/observer/tx_pb.d.ts index a0d7303b5d..82cd537c43 100644 --- a/typescript/zetachain/zetacore/observer/tx_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/tx_pb.d.ts @@ -242,6 +242,11 @@ export declare class MsgUpdateOperationalChainParams extends Message); static readonly runtime: typeof proto3; diff --git a/x/observer/keeper/migrator.go b/x/observer/keeper/migrator.go index 93372f6f3e..3a44c73713 100644 --- a/x/observer/keeper/migrator.go +++ b/x/observer/keeper/migrator.go @@ -4,6 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" v10 "github.com/zeta-chain/node/x/observer/migrations/v10" + v11 "github.com/zeta-chain/node/x/observer/migrations/v11" v8 "github.com/zeta-chain/node/x/observer/migrations/v8" v9 "github.com/zeta-chain/node/x/observer/migrations/v9" ) @@ -61,3 +62,8 @@ func (m Migrator) Migrate8to9(ctx sdk.Context) error { func (m Migrator) Migrate9to10(ctx sdk.Context) error { return v10.MigrateStore(ctx, m.observerKeeper) } + +// Migrate10to11 migrates the store from consensus version 10 to 11 +func (m Migrator) Migrate10to11(ctx sdk.Context) error { + return v11.MigrateStore(ctx, m.observerKeeper) +} diff --git a/x/observer/keeper/msg_server_update_operational_chain_params.go b/x/observer/keeper/msg_server_update_operational_chain_params.go index c5fbcfe0f2..3ad0d4022d 100644 --- a/x/observer/keeper/msg_server_update_operational_chain_params.go +++ b/x/observer/keeper/msg_server_update_operational_chain_params.go @@ -41,6 +41,7 @@ func (k msgServer) UpdateOperationalChainParams( chainParamsList.ChainParams[i].OutboundScheduleInterval = msg.OutboundScheduleInterval chainParamsList.ChainParams[i].OutboundScheduleLookahead = msg.OutboundScheduleLookahead chainParamsList.ChainParams[i].ConfirmationParams = &msg.ConfirmationParams + chainParamsList.ChainParams[i].DisableTssBlockScan = msg.DisableTssBlockScan k.SetChainParamsList(ctx, chainParamsList) return &types.MsgUpdateOperationalChainParamsResponse{}, nil diff --git a/x/observer/keeper/msg_server_update_operational_chain_params_test.go b/x/observer/keeper/msg_server_update_operational_chain_params_test.go index b0467aae91..5d7c11d2a4 100644 --- a/x/observer/keeper/msg_server_update_operational_chain_params_test.go +++ b/x/observer/keeper/msg_server_update_operational_chain_params_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" keepertest "github.com/zeta-chain/node/testutil/keeper" @@ -8,7 +10,6 @@ import ( authoritytypes "github.com/zeta-chain/node/x/authority/types" "github.com/zeta-chain/node/x/observer/keeper" "github.com/zeta-chain/node/x/observer/types" - "testing" ) func TestMsgServer_UpdateOperationalChainParams(t *testing.T) { @@ -144,6 +145,7 @@ func TestMsgServer_UpdateOperationalChainParams(t *testing.T) { SafeInboundCount: 1008, SafeOutboundCount: 1009, }, + DisableTssBlockScan: true, } keepertest.MockCheckAuthorization(&authorityMock.Mock, &msg, nil) @@ -161,6 +163,7 @@ func TestMsgServer_UpdateOperationalChainParams(t *testing.T) { require.NotEqualValues(t, originalChainParams.OutboundScheduleInterval, msg.OutboundScheduleInterval) require.NotEqualValues(t, originalChainParams.OutboundScheduleLookahead, msg.OutboundScheduleLookahead) require.NotEqualValues(t, *originalChainParams.ConfirmationParams, msg.ConfirmationParams) + require.NotEqualValues(t, originalChainParams.DisableTssBlockScan, msg.DisableTssBlockScan) k.SetChainParamsList(ctx, types.ChainParamsList{ ChainParams: []*types.ChainParams{ diff --git a/x/observer/migrations/v11/migrate.go b/x/observer/migrations/v11/migrate.go new file mode 100644 index 0000000000..9928b8a1c8 --- /dev/null +++ b/x/observer/migrations/v11/migrate.go @@ -0,0 +1,61 @@ +package v11 + +import ( + "slices" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/zeta-chain/node/pkg/chains" + "github.com/zeta-chain/node/x/observer/types" +) + +type observerKeeper interface { + GetChainParamsList(ctx sdk.Context) (val types.ChainParamsList, found bool) + SetChainParamsList(ctx sdk.Context, chainParams types.ChainParamsList) +} + +var disableTssBlockScanChainIDs = []int64{ + // localnet + chains.GoerliLocalnet.ChainId, + + // testnets + chains.AvalancheTestnet.ChainId, + chains.ArbitrumSepolia.ChainId, + chains.BscTestnet.ChainId, + chains.BaseSepolia.ChainId, + chains.Amoy.ChainId, + + // mainnets + // the other mainnets will be deprecated later + chains.AvalancheMainnet.ChainId, + chains.ArbitrumMainnet.ChainId, +} + +// MigrateStore migrates the x/observer module state from the consensus version 10 to version 11. +// The migration sets the skip_block_scan parameter correctly based on the chain ID +func MigrateStore(ctx sdk.Context, observerKeeper observerKeeper) error { + allChainParams, found := observerKeeper.GetChainParamsList(ctx) + if !found { + return errorsmod.Wrap(types.ErrChainParamsNotFound, "failed to get chain params") + } + + for _, chainParams := range allChainParams.ChainParams { + if chainParams == nil { + continue + } + if slices.Contains(disableTssBlockScanChainIDs, chainParams.ChainId) { + chainParams.DisableTssBlockScan = true + } + } + + // validate the updated chain params list + if err := allChainParams.Validate(); err != nil { + return errorsmod.Wrap(types.ErrInvalidChainParams, err.Error()) + } + + // set the updated chain params list + observerKeeper.SetChainParamsList(ctx, allChainParams) + + return nil +} diff --git a/x/observer/migrations/v11/migrate_test.go b/x/observer/migrations/v11/migrate_test.go new file mode 100644 index 0000000000..d9870a5cd3 --- /dev/null +++ b/x/observer/migrations/v11/migrate_test.go @@ -0,0 +1,67 @@ +package v11_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + "github.com/zeta-chain/node/pkg/chains" + keepertest "github.com/zeta-chain/node/testutil/keeper" + "github.com/zeta-chain/node/testutil/sample" + v11 "github.com/zeta-chain/node/x/observer/migrations/v11" + "github.com/zeta-chain/node/x/observer/types" +) + +// getTestChainParams returns a list of chain params for testing +func getTestChainParams() types.ChainParamsList { + return types.ChainParamsList{ + ChainParams: []*types.ChainParams{ + sample.ChainParams(chains.Ethereum.ChainId), + sample.ChainParams(chains.BscMainnet.ChainId), + sample.ChainParams(chains.Amoy.ChainId), + sample.ChainParams(chains.ArbitrumMainnet.ChainId), + }, + } +} + +func TestMigrateStore(t *testing.T) { + t.Run("can migrate chain params", func(t *testing.T) { + k, ctx, _, _ := keepertest.ObserverKeeper(t) + + // set chain params + testChainParams := getTestChainParams() + k.SetChainParamsList(ctx, testChainParams) + + // ensure the chain params are set correctly + oldChainParams, found := k.GetChainParamsList(ctx) + require.True(t, found) + require.Equal(t, testChainParams, oldChainParams) + + // migrate the store + err := v11.MigrateStore(ctx, *k) + require.NoError(t, err) + + // ensure we still have same number of chain params after migration + newChainParams, found := k.GetChainParamsList(ctx) + require.True(t, found) + require.Len(t, newChainParams.ChainParams, len(oldChainParams.ChainParams)) + + for i, params := range newChainParams.ChainParams { + // verify that old values are untouched + oldParams := oldChainParams.ChainParams[i] + require.Equal(t, oldParams.IsSupported, params.IsSupported) + require.Equal(t, oldParams.GatewayAddress, params.GatewayAddress) + + // verify that chains that should have DisableTssBlockScan set to true + if params.ChainId == chains.Amoy.ChainId || params.ChainId == chains.ArbitrumMainnet.ChainId { + require.True( + t, + params.DisableTssBlockScan, + "DisableTssBlockScan should be true for chain %d", + params.ChainId, + ) + } else { + require.False(t, params.DisableTssBlockScan, "DisableTssBlockScan should be false for chain %d", params.ChainId) + } + } + }) +} diff --git a/x/observer/module.go b/x/observer/module.go index ab49afd97f..c4c69d0e9a 100644 --- a/x/observer/module.go +++ b/x/observer/module.go @@ -155,6 +155,9 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err := cfg.RegisterMigration(types.ModuleName, 9, m.Migrate9to10); err != nil { panic(err) } + if err := cfg.RegisterMigration(types.ModuleName, 10, m.Migrate10to11); err != nil { + panic(err) + } } // RegisterInvariants registers the observer module's invariants. diff --git a/x/observer/types/chain_params.go b/x/observer/types/chain_params.go index 8bfb5c355c..296f3f8df5 100644 --- a/x/observer/types/chain_params.go +++ b/x/observer/types/chain_params.go @@ -421,6 +421,7 @@ func GetDefaultGoerliLocalnetChainParams() *ChainParams { SafeOutboundCount: 1, FastOutboundCount: 1, }, + DisableTssBlockScan: true, } } func GetDefaultZetaPrivnetChainParams() *ChainParams { diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index 03c02b0b73..f3efb98a45 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -87,6 +87,9 @@ type ChainParams struct { GatewayAddress string `protobuf:"bytes,17,opt,name=gateway_address,json=gatewayAddress,proto3" json:"gateway_address,omitempty"` // Advanced confirmation parameters for chain to support fast observation ConfirmationParams *ConfirmationParams `protobuf:"bytes,18,opt,name=confirmation_params,json=confirmationParams,proto3" json:"confirmation_params,omitempty"` + // Skip actions that require scanning the contents of each block. + // The main thing this disables is transfers directly to the TSS address. + DisableTssBlockScan bool `protobuf:"varint,19,opt,name=disable_tss_block_scan,json=disableTssBlockScan,proto3" json:"disable_tss_block_scan,omitempty"` } func (m *ChainParams) Reset() { *m = ChainParams{} } @@ -221,6 +224,13 @@ func (m *ChainParams) GetConfirmationParams() *ConfirmationParams { return nil } +func (m *ChainParams) GetDisableTssBlockScan() bool { + if m != nil { + return m.DisableTssBlockScan + } + return false +} + // Deprecated(v17) type Params struct { // Deprecated(v17):Moved into the emissions module @@ -278,49 +288,51 @@ func init() { } var fileDescriptor_e7fa4666eddf88e5 = []byte{ - // 671 bytes of a gzipped FileDescriptorProto - 0x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, 0xce, 0xb5, 0xcc, 0xb6, 0x61, 0xd7, 0xd6, 0xdd, 0x9b, - 0x1b, 0x72, 0xcc, 0xa7, 0xfb, 0xf2, 0x42, 0x77, 0xe9, 0xf6, 0xdc, 0x40, 0x53, 0xba, 0x31, 0x9f, - 0xa3, 0xdb, 0xfa, 0x90, 0x13, 0x2c, 0x33, 0xce, 0xe4, 0xd0, 0xef, 0xc5, 0x40, 0xfa, 0x42, 0x35, - 0x4a, 0xd5, 0x5b, 0x2a, 0xd4, 0x77, 0x5a, 0xec, 0x28, 0xad, 0xf3, 0xe6, 0xe8, 0xb4, 0x65, 0x1c, - 0x9f, 0xb6, 0x8c, 0x3f, 0xa7, 0x2d, 0xe3, 0xc7, 0x59, 0xab, 0x72, 0x7c, 0xd6, 0xaa, 0xfc, 0x3a, - 0x6b, 0x55, 0x3e, 0x3d, 0x0a, 0x99, 0x8c, 0xb2, 0x9e, 0x43, 0x20, 0x51, 0x03, 0xe9, 0x71, 0x31, - 0x9b, 0x52, 0x08, 0xa8, 0x7b, 0x78, 0x3e, 0x99, 0xe4, 0x70, 0x40, 0x45, 0x6f, 0x4a, 0x0d, 0xa3, - 0x67, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x5c, 0x2b, 0x18, 0x7c, 0x22, 0x05, 0x00, 0x00, + // 700 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x4f, 0xdb, 0x3a, + 0x18, 0xc6, 0x1b, 0xca, 0xe1, 0x8f, 0x0b, 0x2d, 0x04, 0x0e, 0x27, 0x50, 0xa9, 0xf4, 0x30, 0x4d, + 0x8b, 0x36, 0x2d, 0xdd, 0x60, 0xbb, 0xdb, 0x90, 0xd6, 0xb2, 0x0b, 0x34, 0xb6, 0xa1, 0xd0, 0xdd, + 0x6c, 0xd2, 0x3c, 0xd7, 0xf1, 0x12, 0xab, 0x89, 0x5d,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xca, 0xd8, 0x9f, 0x81, + 0x15, 0x33, 0x99, 0x04, 0xa9, 0x54, 0x50, 0x35, 0xcc, 0x23, 0xa4, 0xde, 0xae, 0xb2, 0xbf, 0x9c, + 0xab, 0x6f, 0x8d, 0xa8, 0x23, 0x64, 0xfb, 0xf5, 0xc9, 0x79, 0xc3, 0x3a, 0x3d, 0x6f, 0x58, 0xbf, + 0xcf, 0x1b, 0xd6, 0xf7, 0x8b, 0x46, 0xe9, 0xf4, 0xa2, 0x51, 0xfa, 0x79, 0xd1, 0x28, 0x7d, 0x7c, + 0x14, 0x52, 0x15, 0xa5, 0x3d, 0x0f, 0xf3, 0x44, 0xdf, 0x62, 0x8f, 0xf3, 0x0b, 0x8d, 0xf1, 0x80, + 0xb4, 0x8e, 0x2f, 0xaf, 0x33, 0x35, 0x1c, 0x10, 0xd9, 0x9b, 0xd2, 0x37, 0xd8, 0xd6, 0x9f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x1e, 0x2b, 0x94, 0xd2, 0x57, 0x05, 0x00, 0x00, } func (m *ChainParamsList) Marshal() (dAtA []byte, err error) { @@ -380,6 +392,18 @@ func (m *ChainParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.DisableTssBlockScan { + i-- + if m.DisableTssBlockScan { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x98 + } if m.ConfirmationParams != nil { { size, err := m.ConfirmationParams.MarshalToSizedBuffer(dAtA[:i]) @@ -610,6 +634,9 @@ func (m *ChainParams) Size() (n int) { l = m.ConfirmationParams.Size() n += 2 + l + sovParams(uint64(l)) } + if m.DisableTssBlockScan { + n += 3 + } return n } @@ -1148,6 +1175,26 @@ func (m *ChainParams) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableTssBlockScan", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableTssBlockScan = bool(v != 0) default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/observer/types/tx.pb.go b/x/observer/types/tx.pb.go index 547cf1b0a1..d105d81e71 100644 --- a/x/observer/types/tx.pb.go +++ b/x/observer/types/tx.pb.go @@ -361,6 +361,7 @@ type MsgUpdateOperationalChainParams struct { OutboundScheduleInterval int64 `protobuf:"varint,7,opt,name=outbound_schedule_interval,json=outboundScheduleInterval,proto3" json:"outbound_schedule_interval,omitempty"` OutboundScheduleLookahead int64 `protobuf:"varint,8,opt,name=outbound_schedule_lookahead,json=outboundScheduleLookahead,proto3" json:"outbound_schedule_lookahead,omitempty"` ConfirmationParams ConfirmationParams `protobuf:"bytes,9,opt,name=confirmation_params,json=confirmationParams,proto3" json:"confirmation_params"` + DisableTssBlockScan bool `protobuf:"varint,10,opt,name=disable_tss_block_scan,json=disableTssBlockScan,proto3" json:"disable_tss_block_scan,omitempty"` } func (m *MsgUpdateOperationalChainParams) Reset() { *m = MsgUpdateOperationalChainParams{} } @@ -459,6 +460,13 @@ func (m *MsgUpdateOperationalChainParams) GetConfirmationParams() ConfirmationPa return ConfirmationParams{} } +func (m *MsgUpdateOperationalChainParams) GetDisableTssBlockScan() bool { + if m != nil { + return m.DisableTssBlockScan + } + return false +} + type MsgUpdateOperationalChainParamsResponse struct { } @@ -1603,110 +1611,112 @@ func init() { } var fileDescriptor_eda6e3b1d16a4021 = []byte{ - // 1634 bytes of a gzipped FileDescriptorProto + // 1665 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0xdb, 0x46, 0x16, 0x37, 0xd7, 0xdf, 0xcf, 0x96, 0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xe2, 0xe2, 0x02, 0x29, 0x53, 0xec, 0xee, 0x61, 0xb7, 0xe0, 0x1d, 0x2c, 0xd5, 0x5c, 0xe2, 0x11, 0x79, 0x46, - 0xa0, 0x96, 0x42, 0xd4, 0x52, 0x88, 0x52, 0x26, 0x4c, 0x62, 0x12, 0x86, 0x2b, 0xf8, 0xdf, 0x02, + 0xa0, 0x96, 0x42, 0xd4, 0x52, 0x88, 0x52, 0x26, 0x4c, 0x62, 0x12, 0x86, 0x2b, 0xf8, 0xff, 0x02, 0x8a, 0x32, 0x9f, 0xa4, 0xb8, 0x6c, 0xa3, 0x2a, 0xe6, 0xc0, 0x62, 0x12, 0x50, 0x77, 0x09, 0xa5, - 0xec, 0x50, 0xdb, 0xb1, 0x91, 0x49, 0x39, 0x67, 0x31, 0x89, 0x13, 0x7e, 0xe1, 0xd8, 0x7c, 0x12, + 0x6c, 0x51, 0xdb, 0xb1, 0x91, 0x49, 0x39, 0x67, 0x31, 0x89, 0x13, 0xfe, 0xe1, 0xd8, 0x7c, 0x12, 0xb6, 0x86, 0x5c, 0x54, 0x0d, 0xb5, 0x5e, 0x4d, 0x44, 0x62, 0xc7, 0xb0, 0x1c, 0x53, 0x73, 0x88, - 0xa3, 0xe3, 0x90, 0x71, 0x31, 0x31, 0x7b, 0x34, 0x84, 0x5d, 0x49, 0x74, 0xb7, 0x86, 0x5d, 0xe4, - 0x59, 0xc4, 0x41, 0x36, 0x87, 0xff, 0x25, 0x31, 0x23, 0xc4, 0xd9, 0xb1, 0xdc, 0x2a, 0x63, 0x68, - 0x4d, 0xee, 0xb7, 0x4b, 0x4a, 0x6d, 0xd7, 0x2c, 0x30, 0x11, 0xe5, 0x1f, 0x1d, 0xb0, 0x35, 0x97, - 0x90, 0x1d, 0xca, 0x3f, 0x38, 0x76, 0x4a, 0x27, 0xb4, 0x4a, 0x68, 0xa1, 0x4a, 0xcd, 0xc2, 0xde, - 0xb2, 0xff, 0x11, 0x1c, 0xcc, 0xfe, 0x22, 0x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60, 0x69, 0xcb, 0xb1, 0x0f, 0x63, 0x41, + 0x67, 0x61, 0xb2, 0x39, 0x26, 0x11, 0xee, 0x97, 0x12, 0x8c, 0x8a, 0xb2, 0x86, 0xaa, 0xf8, 0x64, + 0x6f, 0xea, 0x9a, 0x5f, 0xa9, 0x51, 0xd5, 0xcf, 0xfb, 0x1d, 0xc2, 0xa2, 0x19, 0x29, 0xce, 0x26, + 0x26, 0x1f, 0x33, 0xc6, 0xf3, 0x6d, 0x98, 0x71, 0x37, 0x9c, 0x1d, 0x12, 0x73, 0x7b, 0x92, 0xa5, + 0x81, 0xf0, 0x4d, 0x38, 0xbd, 0x05, 0x19, 0x91, 0x49, 0xff, 0xc5, 0x87, 0x26, 0x76, 0x12, 0xdc, + 0x9e, 0x80, 0x7e, 0x96, 0xad, 0xdc, 0xe7, 0xe0, 0x21, 0x66, 0x68, 0x1a, 0xa6, 0x62, 0x0a, 0x85, + 0xad, 0x6f, 0x25, 0x38, 0xc5, 0x12, 0x86, 0x62, 0x8f, 0xe5, 0xcb, 0x03, 0x36, 0x03, 0x9d, 0x6c, + 0x9f, 0xe6, 0x20, 0x13, 0x2c, 0xb1, 0x41, 0x4a, 0xb3, 0xc9, 0x3e, 0xdb, 0xac, 0x5e, 0x35, 0xa5, + 0x0b, 0xd5, 0xf7, 0xc9, 0xbe, 0x5f, 0xf9, 0xa2, 0xb8, 0x8a, 0x65, 0x56, 0x78, 0x93, 0x4b, 0x37, + 0x80, 0xeb, 0x96, 0x59, 0x89, 0xc5, 0x71, 0x16, 0x66, 0xda, 0xf8, 0x2a, 0x62, 0xf9, 0x5e, 0x02, + 0xe0, 0x1b, 0xba, 0x5d, 0x2a, 0x25, 0x84, 0x70, 0x16, 0xc0, 0x7f, 0xcb, 0x79, 0x76, 0x06, 0x19, + 0x3d, 0xec, 0x51, 0xca, 0xf3, 0xf1, 0x32, 0xc8, 0xbb, 0x6c, 0x97, 0x34, 0xff, 0x60, 0x35, 0xde, + 0x85, 0x83, 0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c, 0x4a, 0xbd, 0xbc, 0xa4, 0x93, 0x2a, 0xfb, 0xf8, 0x7a, 0x25, + 0xf8, 0x0e, 0xeb, 0x5f, 0x6d, 0x0b, 0x07, 0x91, 0xcf, 0xc7, 0x87, 0x35, 0x4c, 0xcb, 0x03, 0xec, + 0x53, 0xeb, 0xb5, 0xdf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x72, 0xf6, 0x0f, 0xa8, 0x17, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2550,6 +2560,16 @@ func (m *MsgUpdateOperationalChainParams) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l + if m.DisableTssBlockScan { + i-- + if m.DisableTssBlockScan { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } { size, err := m.ConfirmationParams.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3530,6 +3550,9 @@ func (m *MsgUpdateOperationalChainParams) Size() (n int) { } l = m.ConfirmationParams.Size() n += 1 + l + sovTx(uint64(l)) + if m.DisableTssBlockScan { + n += 2 + } return n } @@ -4746,6 +4769,26 @@ func (m *MsgUpdateOperationalChainParams) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DisableTssBlockScan", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DisableTssBlockScan = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/zetaclient/chains/evm/observer/inbound.go b/zetaclient/chains/evm/observer/inbound.go index db4e3c475b..3eb67ffd5c 100644 --- a/zetaclient/chains/evm/observer/inbound.go +++ b/zetaclient/chains/evm/observer/inbound.go @@ -140,24 +140,29 @@ func (ob *Observer) observeInboundInBlockRange(ctx context.Context, startBlock, Str(logs.FieldMethod, "observeInboundInBlockRange"). Uint64("start_block", startBlock).Uint64("to_block", toBlock).Logger() - // task 3: query the incoming tx to TSS address (read at most 100 blocks in one go) - lastScannedTssRecvd, err := ob.observeTSSReceive(ctx, startBlock, toBlock) - if err != nil { - logger.Error().Err(err).Msg("error observing TSS received gas asset") - } - - // task 4: filter the outbounds from TSS address to supplement outbound trackers - // TODO: make this a separate go routine in outbound.go after switching to smart contract V2 - ob.filterTSSOutbound(ctx, startBlock, toBlock) - var ( + lastScannedTssRecvd = toBlock lastScannedZetaSent = startBlock - 1 lastScannedDeposited = startBlock - 1 lastScannedGatewayDeposit = startBlock - 1 lastScannedGatewayCall = startBlock - 1 lastScannedGatewayDepositAndCall = startBlock - 1 + err error ) + // we now only take these actions on specific configurable chains + if !ob.ChainParams().DisableTssBlockScan { + // query the incoming tx to TSS address (read at most 100 blocks in one go) + lastScannedTssRecvd, err = ob.observeTSSReceive(ctx, startBlock, toBlock) + if err != nil { + logger.Error().Err(err).Msg("error observing TSS received gas asset") + } + + // filter the outbounds from TSS address to supplement outbound trackers + // TODO: make this a separate go routine in outbound.go after switching to smart contract V2 + ob.filterTSSOutbound(ctx, startBlock, toBlock) + } + logs, err := ob.fetchLogs(ctx, startBlock, toBlock) if err != nil { ob.Logger().Inbound.Error().Err(err).Msg("get gateway logs")