Skip to content

Commit

Permalink
proto: merge the proposer-based timestamps parameters (tendermint#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
williambanfield authored and evan-forbes committed Feb 10, 2022
1 parent 7887d22 commit 20c1765
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 32 deletions.
16 changes: 16 additions & 0 deletions proto/tendermint/types/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ message ConsensusParams {
EvidenceParams evidence = 2;
ValidatorParams validator = 3;
VersionParams version = 4;
SynchronyParams synchrony = 5;
}

// BlockParams contains limits on the block size.
Expand Down Expand Up @@ -67,3 +68,18 @@ message HashedParams {
int64 block_max_bytes = 1;
int64 block_max_gas = 2;
}

// SynchronyParams configure the bounds under which a proposed block's timestamp is considered valid.
// These parameters are part of the proposer-based timestamps algorithm. For more information,
// see the specification of proposer-based timestamps:
// https://github.com/tendermint/spec/tree/master/spec/consensus/proposer-based-timestamp
message SynchronyParams {
// message_delay bounds how long a proposal message may take to reach all validators on a newtork
// and still be considered valid.
google.protobuf.Duration message_delay = 1
[(gogoproto.stdduration) = true];
// precision bounds how skewed a proposer's clock may be from any validator
// on the network while still producing valid proposals.
google.protobuf.Duration precision = 2
[(gogoproto.stdduration) = true];
}
1 change: 1 addition & 0 deletions spec/abci/abci.md
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ Most of the data structures used in ABCI are shared [common data structures](../
| evidence | [EvidenceParams](../core/data_structures.md#evidenceparams) | Parameters limiting the validity of evidence of byzantine behaviour. | 2 |
| validator | [ValidatorParams](../core/data_structures.md#validatorparams) | Parameters limiting the types of public keys validators can use. | 3 |
| version | [VersionsParams](../core/data_structures.md#versionparams) | The ABCI application version. | 4 |
| synchrony | [SynchronyParams](../core/data_structures.md#synchronyparams) | Parameters that determine the bounds under which a proposed block's timestamp is considered valid. | 4 |

### ProofOps

Expand Down
72 changes: 40 additions & 32 deletions spec/core/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,39 @@ Here we describe the data structures in the Tendermint blockchain and the rules
The Tendermint blockchains consists of a short list of data types:

- [Data Structures](#data-structures)
- [Block](#block)
- [Execution](#execution)
- [Header](#header)
- [Version](#version)
- [BlockID](#blockid)
- [PartSetHeader](#partsetheader)
- [Part](#part)
- [Time](#time)
- [Data](#data)
- [Commit](#commit)
- [CommitSig](#commitsig)
- [BlockIDFlag](#blockidflag)
- [Vote](#vote)
- [CanonicalVote](#canonicalvote)
- [Proposal](#proposal)
- [SignedMsgType](#signedmsgtype)
- [Signature](#signature)
- [EvidenceList](#evidencelist)
- [Evidence](#evidence)
- [DuplicateVoteEvidence](#duplicatevoteevidence)
- [LightClientAttackEvidence](#lightclientattackevidence)
- [LightBlock](#lightblock)
- [SignedHeader](#signedheader)
- [ValidatorSet](#validatorset)
- [Validator](#validator)
- [Address](#address)
- [ConsensusParams](#consensusparams)
- [BlockParams](#blockparams)
- [EvidenceParams](#evidenceparams)
- [ValidatorParams](#validatorparams)
- [VersionParams](#versionparams)
- [Proof](#proof)
- [Block](#block)
- [Execution](#execution)
- [Header](#header)
- [Version](#version)
- [BlockID](#blockid)
- [PartSetHeader](#partsetheader)
- [Part](#part)
- [Time](#time)
- [Data](#data)
- [Commit](#commit)
- [CommitSig](#commitsig)
- [BlockIDFlag](#blockidflag)
- [Vote](#vote)
- [CanonicalVote](#canonicalvote)
- [Proposal](#proposal)
- [SignedMsgType](#signedmsgtype)
- [Signature](#signature)
- [EvidenceList](#evidencelist)
- [Evidence](#evidence)
- [DuplicateVoteEvidence](#duplicatevoteevidence)
- [LightClientAttackEvidence](#lightclientattackevidence)
- [LightBlock](#lightblock)
- [SignedHeader](#signedheader)
- [ValidatorSet](#validatorset)
- [Validator](#validator)
- [Address](#address)
- [ConsensusParams](#consensusparams)
- [BlockParams](#blockparams)
- [EvidenceParams](#evidenceparams)
- [ValidatorParams](#validatorparams)
- [VersionParams](#versionparams)
- [SynchronyParams](#synchronyparams)
- [Proof](#proof)


## Block
Expand Down Expand Up @@ -446,6 +447,13 @@ func SumTruncated(bz []byte) []byte {
|-------------|--------|-------------------------------|--------------|
| app_version | uint64 | The ABCI application version. | 1 |

### SynchronyParams

| Name | Type | Description | Field Number |
|---------------|--------|-------------------------------|--------------|
| message_delay | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration) | Bound for how long a proposal message may take to reach all validators on a newtork and still be considered valid. | 1 |
| precision | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration) | Bound for how skewed a proposer's clock may be from any validator on the network while still producing valid proposals. | 2 |

## Proof

| Name | Type | Description | Field Number |
Expand Down

0 comments on commit 20c1765

Please sign in to comment.