diff --git a/cmd/zetae2e/local/local.go b/cmd/zetae2e/local/local.go index a5c87940aa..4b485c1763 100644 --- a/cmd/zetae2e/local/local.go +++ b/cmd/zetae2e/local/local.go @@ -289,7 +289,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) { e2etests.TestUpdateBytecodeZRC20Name, e2etests.TestUpdateBytecodeConnectorName, e2etests.TestDepositEtherLiquidityCapName, - e2etests.TestAdminTransactionsName, + e2etests.TestCriticalAdminTransactionsName, // TestMigrateChainSupportName tests EVM chain migration. Currently this test doesn't work with Anvil because pre-EIP1559 txs are not supported // See issue below for details diff --git a/docs/cli/zetacored/zetacored_query_crosschain.md b/docs/cli/zetacored/zetacored_query_crosschain.md index c0a67fb8d0..a954c3d383 100644 --- a/docs/cli/zetacored/zetacored_query_crosschain.md +++ b/docs/cli/zetacored/zetacored_query_crosschain.md @@ -40,7 +40,7 @@ zetacored query crosschain [flags] * [zetacored query crosschain show-cctx](zetacored_query_crosschain_show-cctx.md) - shows a CCTX * [zetacored query crosschain show-gas-price](zetacored_query_crosschain_show-gas-price.md) - shows a gasPrice * [zetacored query crosschain show-inbound-hash-to-cctx](zetacored_query_crosschain_show-inbound-hash-to-cctx.md) - shows a inboundHashToCctx -* [zetacored query crosschain show-inbound-tracker](zetacored_query_crosschain_show-inbound-tracker.md) - shows an inbound tracker by chainId and txHash +* [zetacored query crosschain show-inbound-tracker](zetacored_query_crosschain_show-inbound-tracker.md) - shows an inbound tracker by chainID and txHash * [zetacored query crosschain show-outbound-tracker](zetacored_query_crosschain_show-outbound-tracker.md) - shows an outbound tracker * [zetacored query crosschain show-rate-limiter-flags](zetacored_query_crosschain_show-rate-limiter-flags.md) - shows the rate limiter flags diff --git a/docs/cli/zetacored/zetacored_query_crosschain_show-inbound-tracker.md b/docs/cli/zetacored/zetacored_query_crosschain_show-inbound-tracker.md index 9bbd7ea30d..ea9b8e8049 100644 --- a/docs/cli/zetacored/zetacored_query_crosschain_show-inbound-tracker.md +++ b/docs/cli/zetacored/zetacored_query_crosschain_show-inbound-tracker.md @@ -1,9 +1,9 @@ # query crosschain show-inbound-tracker -shows an inbound tracker by chainId and txHash +shows an inbound tracker by chainID and txHash ``` -zetacored query crosschain show-inbound-tracker [chainId] [txHash] [flags] +zetacored query crosschain show-inbound-tracker [chainID] [txHash] [flags] ``` ### Options diff --git a/e2e/e2etests/e2etests.go b/e2e/e2etests/e2etests.go index 3859d09e5b..88957ce556 100644 --- a/e2e/e2etests/e2etests.go +++ b/e2e/e2etests/e2etests.go @@ -94,13 +94,13 @@ const ( Admin tests Test admin functionalities */ - TestDepositEtherLiquidityCapName = "deposit_eth_liquidity_cap" - TestMigrateChainSupportName = "migrate_chain_support" - TestPauseZRC20Name = "pause_zrc20" - TestUpdateBytecodeZRC20Name = "update_bytecode_zrc20" - TestUpdateBytecodeConnectorName = "update_bytecode_connector" - TestRateLimiterName = "rate_limiter" - TestAdminTransactionsName = "admin_transactions" + TestDepositEtherLiquidityCapName = "deposit_eth_liquidity_cap" + TestMigrateChainSupportName = "migrate_chain_support" + TestPauseZRC20Name = "pause_zrc20" + TestUpdateBytecodeZRC20Name = "update_bytecode_zrc20" + TestUpdateBytecodeConnectorName = "update_bytecode_connector" + TestRateLimiterName = "rate_limiter" + TestCriticalAdminTransactionsName = "critical_admin_transactions" TestMigrateTSSName = "migrate_TSS" @@ -535,7 +535,7 @@ var AllE2ETests = []runner.E2ETest{ TestRateLimiter, ), runner.NewE2ETest( - TestAdminTransactionsName, + TestCriticalAdminTransactionsName, "test critical admin transactions", []runner.ArgDefinition{}, TestAdminTransactions, diff --git a/e2e/e2etests/helpers.go b/e2e/e2etests/helpers.go index c8faf0b206..1e44faf19a 100644 --- a/e2e/e2etests/helpers.go +++ b/e2e/e2etests/helpers.go @@ -4,14 +4,13 @@ import ( "fmt" "math/big" "strconv" - "time" "github.com/btcsuite/btcd/btcjson" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcutil" - "github.com/cenkalti/backoff/v4" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" "github.com/zeta-chain/zetacore/pkg/chains" @@ -19,7 +18,7 @@ import ( crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" ) -func WaitNBlocks(r *runner.E2ERunner, n int64) { +func WaitForBlocks(r *runner.E2ERunner, n int64) { height, err := r.CctxClient.LastZetaHeight(r.Ctx, &crosschaintypes.QueryLastZetaHeightRequest{}) if err != nil { return @@ -28,7 +27,7 @@ func WaitNBlocks(r *runner.E2ERunner, n int64) { return retry.Retry(waitForBlock(r, height.Height+n)) } - bo := backoff.WithMaxRetries(backoff.NewConstantBackOff(5*time.Second), 10) + bo := retry.DefaultBackoff() err = retry.DoWithBackoff(call, bo) require.NoError(r, err, "failed to wait for %d blocks", n) } diff --git a/e2e/e2etests/test_admin_transactions.go b/e2e/e2etests/test_admin_transactions.go index 5c4fb7727e..e1d966eaa8 100644 --- a/e2e/e2etests/test_admin_transactions.go +++ b/e2e/e2etests/test_admin_transactions.go @@ -2,6 +2,7 @@ package e2etests import ( "github.com/stretchr/testify/require" + "github.com/zeta-chain/zetacore/e2e/runner" "github.com/zeta-chain/zetacore/e2e/utils" "github.com/zeta-chain/zetacore/pkg/chains" @@ -36,7 +37,7 @@ func TestUpdateGasPriceIncreaseFlags(r *runner.E2ERunner) { _, err = r.ZetaTxServer.BroadcastTx(utils.OperationalPolicyName, msgGasPriceFlags) require.NoError(r, err) - WaitNBlocks(r, 1) + WaitForBlocks(r, 1) flags, err := r.ObserverClient.CrosschainFlags(r.Ctx, &observertypes.QueryGetCrosschainFlagsRequest{}) require.NoError(r, err) @@ -66,7 +67,7 @@ func TestAddToInboundTracker(r *runner.E2ERunner) { _, err = r.ZetaTxServer.BroadcastTx(utils.EmergencyPolicyName, msgBtc) require.NoError(r, err) - WaitNBlocks(r, 1) + WaitForBlocks(r, 1) tracker, err := r.CctxClient.InboundTracker(r.Ctx, &crosschaintypes.QueryInboundTrackerRequest{ ChainId: msgEth.ChainId, diff --git a/x/crosschain/client/cli/query_inbound_tracker.go b/x/crosschain/client/cli/query_inbound_tracker.go index 12048a8e0f..2c97e8d534 100644 --- a/x/crosschain/client/cli/query_inbound_tracker.go +++ b/x/crosschain/client/cli/query_inbound_tracker.go @@ -13,8 +13,8 @@ import ( func CmdShowInboundTracker() *cobra.Command { cmd := &cobra.Command{ - Use: "show-inbound-tracker [chainId] [txHash]", - Short: "shows an inbound tracker by chainId and txHash", + Use: "show-inbound-tracker [chainID] [txHash]", + Short: "shows an inbound tracker by chainID and txHash", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx := client.GetClientContextFromCmd(cmd)