Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat? change block time to 3s #17

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions cmd/initiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,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
}
Loading