From 3c773983477f6a88c2c82be57856c7787bf020f5 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Tue, 22 Mar 2022 09:29:17 -0400 Subject: [PATCH] update commit timeout name --- config/toml.go | 2 +- docs/architecture/adr-074-timeout-params.md | 2 +- spec/core/data_structures.md | 2 +- types/genesis_test.go | 2 +- types/params.go | 10 +++++----- types/params_test.go | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/toml.go b/config/toml.go index f457e3e5e..08106efef 100644 --- a/config/toml.go +++ b/config/toml.go @@ -608,7 +608,7 @@ var testGenesisFmt = `{ "vote": "30000000000", "vote_delta": "50000000", "commit": "10000000000", - "enable_commit_timeout_bypass": false + "bypass_commit_timeout": false }, "evidence": { "max_age_num_blocks": "100000", diff --git a/docs/architecture/adr-074-timeout-params.md b/docs/architecture/adr-074-timeout-params.md index 0e2e9eedb..22fd784bd 100644 --- a/docs/architecture/adr-074-timeout-params.md +++ b/docs/architecture/adr-074-timeout-params.md @@ -149,7 +149,7 @@ message TimeoutParams { google.protobuf.Duration vote = 3; google.protobuf.Duration vote_delta = 4; google.protobuf.Duration commit = 5; - bool enable_commit_timeout_bypass = 6; + bool bypass_commit_timeout = 6; } ``` diff --git a/spec/core/data_structures.md b/spec/core/data_structures.md index 0aca40519..dde3ec354 100644 --- a/spec/core/data_structures.md +++ b/spec/core/data_structures.md @@ -466,7 +466,7 @@ func SumTruncated(bz []byte) []byte { | vote | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)| Parameter that, along with vote_delta, configures the timeout for the prevote and precommit step of the consensus algorithm. | 3 | | vote_delta | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)| Parameter that, along with vote, configures the timeout for the prevote and precommit step of the consensus algorithm. | 4 | | commit | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration) | Parameter that configures how long Tendermint will wait after receiving a quorum of precommits before beginning consensus for the next height.| 5 | -| enable_commit_timeout_bypass | bool | Parameter that, if enabled, configures the node to proceed immediately to the next height once the node has received all precommits for a block, forgoing the commit timeout. | 6 | +| bypass_commit_timeout | bool | Parameter that, if enabled, configures the node to proceed immediately to the next height once the node has received all precommits for a block, forgoing the commit timeout. | 6 | ## Proof diff --git a/types/genesis_test.go b/types/genesis_test.go index 17cab3fde..722358111 100644 --- a/types/genesis_test.go +++ b/types/genesis_test.go @@ -78,7 +78,7 @@ func TestBasicGenesisDoc(t *testing.T) { "vote": "30000000000", "vote_delta": "50000000", "commit": "10000000000", - "enable_commit_timeout_bypass": false + "bypass_commit_timeout": false }, "validator": {"pub_key_types":["ed25519"]}, "block": {"max_bytes": "100"}, diff --git a/types/params.go b/types/params.go index 037aa7b59..398d5c5b7 100644 --- a/types/params.go +++ b/types/params.go @@ -93,7 +93,7 @@ type TimeoutParams struct { Vote time.Duration `json:"vote,string"` VoteDelta time.Duration `json:"vote_delta,string"` Commit time.Duration `json:"commit,string"` - EnableCommitTimeoutBypass bool `json:"enable_commit_timeout_bypass"` + BypassCommitTimeout bool `json:"bypass_commit_timeout"` } // DefaultConsensusParams returns a default ConsensusParams. @@ -157,7 +157,7 @@ func DefaultTimeoutParams() TimeoutParams { Vote: 1000 * time.Millisecond, VoteDelta: 500 * time.Millisecond, Commit: 1000 * time.Millisecond, - EnableCommitTimeoutBypass: false, + BypassCommitTimeout: false, } } @@ -346,7 +346,7 @@ func (params ConsensusParams) UpdateConsensusParams(params2 *tmproto.ConsensusPa if params2.Timeout.Commit != nil { res.Timeout.Commit = *params2.Timeout.GetCommit() } - res.Timeout.EnableCommitTimeoutBypass = params2.Timeout.GetEnableCommitTimeoutBypass() + res.Timeout.BypassCommitTimeout = params2.Timeout.GetBypassCommitTimeout() } return res } @@ -378,7 +378,7 @@ func (params *ConsensusParams) ToProto() tmproto.ConsensusParams { Vote: ¶ms.Timeout.Vote, VoteDelta: ¶ms.Timeout.VoteDelta, Commit: ¶ms.Timeout.Commit, - EnableCommitTimeoutBypass: params.Timeout.EnableCommitTimeoutBypass, + BypassCommitTimeout: params.Timeout.BypassCommitTimeout, }, } } @@ -425,7 +425,7 @@ func ConsensusParamsFromProto(pbParams tmproto.ConsensusParams) ConsensusParams if pbParams.Timeout.Commit != nil { c.Timeout.Commit = *pbParams.Timeout.GetCommit() } - c.Timeout.EnableCommitTimeoutBypass = pbParams.Timeout.EnableCommitTimeoutBypass + c.Timeout.BypassCommitTimeout = pbParams.Timeout.BypassCommitTimeout } return c } diff --git a/types/params_test.go b/types/params_test.go index d24108166..27ec560ee 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -210,7 +210,7 @@ func makeParams(args makeParamsArgs) ConsensusParams { Vote: args.vote, VoteDelta: args.voteDelta, Commit: args.commit, - EnableCommitTimeoutBypass: args.enableCommitTimeoutBypass, + BypassCommitTimeout: args.enableCommitTimeoutBypass, }, } } @@ -282,7 +282,7 @@ func TestConsensusParamsUpdate(t *testing.T) { Vote: durationPtr(5 * time.Second), VoteDelta: durationPtr(400 * time.Millisecond), Commit: durationPtr(time.Minute), - EnableCommitTimeoutBypass: true, + BypassCommitTimeout: true, }, }, updatedParams: makeParams(makeParamsArgs{