diff --git a/Makefile b/Makefile index c2e66807..de9673e6 100644 --- a/Makefile +++ b/Makefile @@ -217,8 +217,6 @@ endif docker-build-debug: @docker build -t cosmos/atomoned-e2e -f e2e.Dockerfile . -docker-build-all: docker-build-debug docker-build-hermes - ############################################################################### ### Linting ### ############################################################################### @@ -275,7 +273,7 @@ test-docker-push: test-docker @docker push ${TEST_DOCKER_REPO}:latest .PHONY: all build-linux install format lint go-mod-cache draw-deps clean build \ - docker-build-debug docker-build-hermes docker-build-all + docker-build-debug ############################################################################### diff --git a/tests/e2e/e2e_setup_test.go b/tests/e2e/e2e_setup_test.go index 9f76f052..f36d84b3 100644 --- a/tests/e2e/e2e_setup_test.go +++ b/tests/e2e/e2e_setup_test.go @@ -43,37 +43,27 @@ import ( ) const ( - atomonedBinary = "atomoned" - txCommand = "tx" - queryCommand = "query" - keysCommand = "keys" - atomoneHomePath = "/home/nonroot/.atomone" - photonDenom = "photon" - uatomDenom = "uatom" - stakeDenom = "stake" - initBalanceStr = "110000000000stake,100000000000000000photon,100000000000000000uatom" - minGasPrice = "0.00001" - // the test globalfee in genesis is the same as minGasPrice - // global fee lower/higher than min_gas_price - initialGlobalFeeAmt = "0.00001" - lowGlobalFeesAmt = "0.000001" - highGlobalFeeAmt = "0.0001" - maxTotalBypassMinFeeMsgGasUsage = "1" - gas = 200000 - govProposalBlockBuffer = 35 - relayerAccountIndexHermes = 0 - numberOfEvidences = 10 - slashingShares int64 = 10000 - - proposalGlobalFeeFilename = "proposal_globalfee.json" + atomonedBinary = "atomoned" + txCommand = "tx" + queryCommand = "query" + keysCommand = "keys" + atomoneHomePath = "/home/nonroot/.atomone" + photonDenom = "photon" + uatomDenom = "uatom" + stakeDenom = "stake" + initBalanceStr = "110000000000stake,100000000000000000photon,100000000000000000uatom" + minGasPrice = "0.00001" + gas = 200000 + govProposalBlockBuffer = 35 + relayerAccountIndexHermes = 0 + numberOfEvidences = 10 + slashingShares int64 = 10000 + proposalBypassMsgFilename = "proposal_bypass_msg.json" proposalMaxTotalBypassFilename = "proposal_max_total_bypass.json" proposalCommunitySpendFilename = "proposal_community_spend.json" proposalLSMParamUpdateFilename = "proposal_lsm_param_update.json" - // proposalAddConsumerChainFilename = "proposal_add_consumer.json" - // proposalRemoveConsumerChainFilename = "proposal_remove_consumer.json" - // hermesBinary = "hermes" // hermesConfigWithGasPrices = "/root/.hermes/config.toml" // hermesConfigNoGasPrices = "/root/.hermes/config-zero.toml" @@ -207,7 +197,7 @@ func (s *IntegrationTestSuite) initNodes(c *chain) { } s.Require().NoError( - modifyGenesis(val0ConfigDir, "", initBalanceStr, addrAll, initialGlobalFeeAmt+uatomDenom, uatomDenom), + modifyGenesis(val0ConfigDir, "", initBalanceStr, addrAll, uatomDenom), ) // copy the genesis file to the remaining validators for _, val := range c.validators[1:] { @@ -590,100 +580,6 @@ func noRestart(config *docker.HostConfig) { } } -func (s *IntegrationTestSuite) writeGovParamChangeProposalGlobalFees(c *chain, coins sdk.DecCoins) { - type ParamInfo struct { - Subspace string `json:"subspace"` - Key string `json:"key"` - Value sdk.DecCoins `json:"value"` - } - - type ParamChangeMessage struct { - Title string `json:"title"` - Description string `json:"description"` - Changes []ParamInfo `json:"changes"` - Deposit string `json:"deposit"` - } - - paramChangeProposalBody, err := json.MarshalIndent(ParamChangeMessage{ - Title: "global fee test", - Description: "global fee change", - Changes: []ParamInfo{ - { - Subspace: "globalfee", - Key: "MinimumGasPricesParam", - Value: coins, - }, - }, - Deposit: "1000uatom", - }, "", " ") - s.Require().NoError(err) - - err = writeFile(filepath.Join(c.validators[0].configDir(), "config", proposalGlobalFeeFilename), paramChangeProposalBody) - s.Require().NoError(err) -} - -func (s *IntegrationTestSuite) writeGovParamChangeProposalBypassMsgs(c *chain, msgs []string) { - type ParamInfo struct { - Subspace string `json:"subspace"` - Key string `json:"key"` - Value []string `json:"value"` - } - - type ParamChangeMessage struct { - Title string `json:"title"` - Description string `json:"description"` - Changes []ParamInfo `json:"changes"` - Deposit string `json:"deposit"` - } - paramChangeProposalBody, err := json.MarshalIndent(ParamChangeMessage{ - Title: "ChangeProposalBypassMsgs", - Description: "global fee change", - Changes: []ParamInfo{ - { - Subspace: "globalfee", - Key: "BypassMinFeeMsgTypes", - Value: msgs, - }, - }, - Deposit: "1000uatom", - }, "", " ") - s.Require().NoError(err) - - err = writeFile(filepath.Join(c.validators[0].configDir(), "config", proposalBypassMsgFilename), paramChangeProposalBody) - s.Require().NoError(err) -} - -func (s *IntegrationTestSuite) writeGovParamChangeProposalMaxTotalBypass(c *chain, gas uint64) { - type ParamInfo struct { - Subspace string `json:"subspace"` - Key string `json:"key"` - Value string `json:"value"` - } - - type ParamChangeMessage struct { - Title string `json:"title"` - Description string `json:"description"` - Changes []ParamInfo `json:"changes"` - Deposit string `json:"deposit"` - } - paramChangeProposalBody, err := json.MarshalIndent(ParamChangeMessage{ - Title: "ChangeProposalMaxTotalBypass", - Description: "global fee change", - Changes: []ParamInfo{ - { - Subspace: "globalfee", - Key: "MaxTotalBypassMinFeeMsgGasUsage", - Value: strconv.FormatInt(int64(gas), 10), - }, - }, - Deposit: "1000uatom", - }, "", " ") - s.Require().NoError(err) - - err = writeFile(filepath.Join(c.validators[0].configDir(), "config", proposalMaxTotalBypassFilename), paramChangeProposalBody) - s.Require().NoError(err) -} - func (s *IntegrationTestSuite) writeGovCommunitySpendProposal(c *chain, amount sdk.Coin, recipient string) { template := ` { diff --git a/tests/e2e/genesis.go b/tests/e2e/genesis.go index 1e1793b2..46b29170 100644 --- a/tests/e2e/genesis.go +++ b/tests/e2e/genesis.go @@ -45,7 +45,7 @@ func getGenDoc(path string) (*tmtypes.GenesisDoc, error) { return doc, nil } -func modifyGenesis(path, moniker, amountStr string, addrAll []sdk.AccAddress, globfees string, denom string) error { +func modifyGenesis(path, moniker, amountStr string, addrAll []sdk.AccAddress, denom string) error { serverCtx := server.NewDefaultContext() config := serverCtx.Config config.SetRoot(path)