Skip to content

Commit

Permalink
update cometbft config
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Jul 9, 2024
1 parent b9484ca commit 6d58e46
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions cmd/minitiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,29 @@ func initTendermintConfig() *tmcfg.Config {
cfg.RPC.ListenAddress = "tcp://0.0.0.0:26657"
cfg.RPC.CORSAllowedOrigins = []string{"*"}

// block time to 0.5s
cfg.Consensus.TimeoutPropose = 300 * time.Millisecond
// performance turning configs
cfg.P2P.SendRate = 20480000
cfg.P2P.RecvRate = 20480000
cfg.P2P.MaxPacketMsgPayloadSize = 1000000 // 1MB
cfg.P2P.FlushThrottleTimeout = 10 * time.Millisecond
cfg.Consensus.PeerGossipSleepDuration = 30 * time.Millisecond

// mempool configs
cfg.Mempool.Size = 1000
cfg.Mempool.MaxTxsBytes = 10737418240
cfg.Mempool.MaxTxBytes = 2048576

// propose timeout to 1s
cfg.Consensus.TimeoutPropose = 1 * time.Second

Check warning on line 91 in cmd/minitiad/config.go

View check run for this annotation

Codecov / codecov/patch

cmd/minitiad/config.go#L78-L91

Added lines #L78 - L91 were not covered by tests
cfg.Consensus.TimeoutProposeDelta = 500 * time.Millisecond
cfg.Consensus.TimeoutPrevote = 1000 * time.Millisecond
cfg.Consensus.TimeoutPrevoteDelta = 500 * time.Millisecond
cfg.Consensus.TimeoutPrecommit = 1000 * time.Millisecond
cfg.Consensus.TimeoutPrecommitDelta = 500 * time.Millisecond

// do not wait straggler for prevote and precommit on l2
cfg.Consensus.TimeoutPrevote = 0 * time.Millisecond
cfg.Consensus.TimeoutPrevoteDelta = 0 * time.Millisecond
cfg.Consensus.TimeoutPrecommit = 0 * time.Millisecond
cfg.Consensus.TimeoutPrecommitDelta = 0 * time.Millisecond

// commit time to 0.5s

Check warning on line 100 in cmd/minitiad/config.go

View check run for this annotation

Codecov / codecov/patch

cmd/minitiad/config.go#L93-L100

Added lines #L93 - L100 were not covered by tests
cfg.Consensus.TimeoutCommit = 500 * time.Millisecond

return cfg
Expand Down

0 comments on commit 6d58e46

Please sign in to comment.