Skip to content

Commit

Permalink
Merge pull request #17 from initia-labs/feat/change-initial-blocktime
Browse files Browse the repository at this point in the history
feat? change block time to 3s
  • Loading branch information
beer-1 authored Nov 21, 2023
2 parents fe95a10 + cbe6c09 commit c06ada3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmd/initiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ func initAppConfig() (string, interface{}) {
func initTendermintConfig() *tmcfg.Config {
cfg := tmcfg.DefaultConfig()

// these values put a higher strain on node memory
// cfg.P2P.MaxNumInboundPeers = 100
// cfg.P2P.MaxNumOutboundPeers = 40
// block time from 5s to 3s
cfg.Consensus.TimeoutPropose = cfg.Consensus.TimeoutPropose * 3 / 5
cfg.Consensus.TimeoutProposeDelta = cfg.Consensus.TimeoutProposeDelta * 3 / 5
cfg.Consensus.TimeoutPrevote = cfg.Consensus.TimeoutPrevote * 3 / 5
cfg.Consensus.TimeoutPrevoteDelta = cfg.Consensus.TimeoutPrevoteDelta * 3 / 5
cfg.Consensus.TimeoutPrecommit = cfg.Consensus.TimeoutPrecommit * 3 / 5
cfg.Consensus.TimeoutPrecommitDelta = cfg.Consensus.TimeoutPrecommitDelta * 3 / 5
cfg.Consensus.TimeoutCommit = cfg.Consensus.TimeoutCommit * 3 / 5

return cfg
}

0 comments on commit c06ada3

Please sign in to comment.