diff --git a/test/util/testnode/comet_node_test.go b/test/util/testnode/comet_node_test.go index a011992f79..63222ca66e 100644 --- a/test/util/testnode/comet_node_test.go +++ b/test/util/testnode/comet_node_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" + tmconfig "github.com/tendermint/tendermint/config" tmrand "github.com/tendermint/tendermint/libs/rand" coretypes "github.com/tendermint/tendermint/rpc/core/types" ) @@ -34,6 +35,23 @@ type IntegrationTestSuite struct { cctx Context } +func customTendermintConfig() *tmconfig.Config { + tmCfg := DefaultTendermintConfig() + // Override the mempool's MaxTxBytes to allow the testnode to accept a + // transaction that fills the entire square. Any blob transaction larger + // than the square size will still fail no matter what. + maxTxBytes := appconsts.DefaultUpperBoundMaxBytes + tmCfg.Mempool.MaxTxBytes = maxTxBytes + + // Override the MaxBodyBytes to allow the testnode to accept very large + // transactions and respond to queries with large responses (200 MiB was + // chosen only as an arbitrary large number). + tmCfg.RPC.MaxBodyBytes = 200 * mebibyte + + tmCfg.RPC.TimeoutBroadcastTxCommit = time.Minute + return tmCfg +} + func (s *IntegrationTestSuite) SetupSuite() { t := s.T() s.accounts = RandomAccounts(10) @@ -44,7 +62,8 @@ func (s *IntegrationTestSuite) SetupSuite() { cfg := DefaultConfig(). WithFundedAccounts(s.accounts...). - WithModifiers(genesis.SetBlobParams(ecfg.Codec, blobGenState.Params)) + WithModifiers(genesis.SetBlobParams(ecfg.Codec, blobGenState.Params)). + WithTendermintConfig(customTendermintConfig()) cctx, _, _ := NewNetwork(t, cfg) s.cctx = cctx diff --git a/test/util/testnode/config.go b/test/util/testnode/config.go index 76508f91d4..4c2f5346ae 100644 --- a/test/util/testnode/config.go +++ b/test/util/testnode/config.go @@ -150,20 +150,7 @@ func DefaultTendermintConfig() *tmconfig.Config { // node produces blocks. tmCfg.Consensus.TimeoutCommit = 1 * time.Millisecond - // Override the mempool's MaxTxBytes to allow the testnode to accept a - // transaction that fills the entire square. Any blob transaction larger - // than the square size will still fail no matter what. - maxTxBytes := appconsts.DefaultUpperBoundMaxBytes - tmCfg.Mempool.MaxTxBytes = maxTxBytes - - // Override the MaxBodyBytes to allow the testnode to accept very large - // transactions and respond to queries with large responses (200 MiB was - // chosen only as an arbitrary large number). - tmCfg.RPC.MaxBodyBytes = 200 * mebibyte - - tmCfg.RPC.TimeoutBroadcastTxCommit = time.Minute - - // set all the ports to random open ones + // Set all the ports to random open ones. tmCfg.RPC.ListenAddress = fmt.Sprintf("tcp://127.0.0.1:%d", mustGetFreePort()) tmCfg.P2P.ListenAddress = fmt.Sprintf("tcp://127.0.0.1:%d", mustGetFreePort()) tmCfg.RPC.GRPCListenAddress = fmt.Sprintf("tcp://127.0.0.1:%d", mustGetFreePort())