Skip to content

Commit

Permalink
Merge branch 'main' into cal/integrate-square-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters authored Aug 7, 2024
2 parents ff2f864 + 6b01740 commit e837547
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/e2e/benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ func (b *BenchmarkTest) SetupNodes() error {
testnet.WithTimeoutCommit(b.manifest.TimeoutCommit),
testnet.WithPrometheus(b.manifest.Prometheus),
testnet.WithLocalTracing(b.manifest.LocalTracingType),
testnet.WithTxIndexer("kv"),
testnet.WithMempoolMaxTxsBytes(1*testnet.GiB),
testnet.WithMempoolMaxTxBytes(8*testnet.MiB),
))

if b.manifest.PushTrace {
log.Println("reading trace push config")
if pushConfig, err := trace.GetPushConfigFromEnv(); err == nil {
Expand Down
22 changes: 20 additions & 2 deletions test/e2e/testnet/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
func MakeConfig(node *Node, opts ...Option) (*config.Config, error) {
cfg := app.DefaultConsensusConfig()
cfg.TxIndex.Indexer = "kv"
cfg.Mempool.MaxTxsBytes = 1 * GiB
cfg.Mempool.MaxTxBytes = 8 * MiB
cfg.Consensus.TimeoutPropose = config.DefaultConsensusConfig().TimeoutPropose
cfg.Consensus.TimeoutCommit = config.DefaultConsensusConfig().TimeoutCommit
cfg.Moniker = node.Name
cfg.RPC.ListenAddress = "tcp://0.0.0.0:26657"
cfg.P2P.ExternalAddress = fmt.Sprintf("tcp://%v", node.AddressP2P(false))
Expand Down Expand Up @@ -77,6 +77,24 @@ func WithLocalTracing(localTracingType string) Option {
}
}

func WithTxIndexer(indexer string) Option {
return func(cfg *config.Config) {
cfg.TxIndex.Indexer = indexer
}
}

func WithMempoolMaxTxsBytes(maxTxsBytes int64) Option {
return func(cfg *config.Config) {
cfg.Mempool.MaxTxsBytes = maxTxsBytes
}
}

func WithMempoolMaxTxBytes(maxTxBytes int) Option {
return func(cfg *config.Config) {
cfg.Mempool.MaxTxBytes = maxTxBytes
}
}

func WriteAddressBook(peers []string, file string) error {
book := pex.NewAddrBook(file, false)
for _, peer := range peers {
Expand Down

0 comments on commit e837547

Please sign in to comment.