Browse Source

update commit timeout name

pull/8177/head
William Banfield 2 years ago
parent
commit
3c77398347
No known key found for this signature in database GPG Key ID: EFAD3442BF29E3AC
6 changed files with 11 additions and 11 deletions
  1. +1
    -1
      config/toml.go
  2. +1
    -1
      docs/architecture/adr-074-timeout-params.md
  3. +1
    -1
      spec/core/data_structures.md
  4. +1
    -1
      types/genesis_test.go
  5. +5
    -5
      types/params.go
  6. +2
    -2
      types/params_test.go

+ 1
- 1
config/toml.go View File

@ -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",


+ 1
- 1
docs/architecture/adr-074-timeout-params.md View File

@ -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;
}
```


+ 1
- 1
spec/core/data_structures.md View File

@ -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


+ 1
- 1
types/genesis_test.go View File

@ -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"},


+ 5
- 5
types/params.go View File

@ -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: &params.Timeout.Vote,
VoteDelta: &params.Timeout.VoteDelta,
Commit: &params.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
}

+ 2
- 2
types/params_test.go View File

@ -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{


Loading…
Cancel
Save