From c9b775d2f085e12ac05c8deef56cbd5cf4caa48f Mon Sep 17 00:00:00 2001 From: William Banfield Date: Tue, 28 Sep 2021 16:10:46 -0400 Subject: [PATCH] wip --- proto/tendermint/types/params.proto | 4 ++++ types/params.go | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index cc926b64e..0763de0a4 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -15,6 +15,7 @@ message ConsensusParams { EvidenceParams evidence = 2; ValidatorParams validator = 3; VersionParams version = 4; + TimestampParams Params = 5; } // BlockParams contains limits on the block size. @@ -60,6 +61,9 @@ message VersionParams { uint64 app_version = 1; } +message TimestampParams { +} + // HashedParams is a subset of ConsensusParams. // // It is hashed into the Header.ConsensusHash. diff --git a/types/params.go b/types/params.go index 32d0f71c8..eb79610bd 100644 --- a/types/params.go +++ b/types/params.go @@ -41,6 +41,7 @@ type ConsensusParams struct { Evidence EvidenceParams `json:"evidence"` Validator ValidatorParams `json:"validator"` Version VersionParams `json:"version"` + Timestamp TimestampParams `json:"timestamp"` } // HashedParams is a subset of ConsensusParams. @@ -65,6 +66,14 @@ type EvidenceParams struct { MaxBytes int64 `json:"max_bytes"` } +// TimestampParams define the acceptable amount of clock skew among different +// validators on a network. +type TimestampParams struct { + Accuracy int64 `json:"accuracy"` + Precision time.Duration `json:"precision"` + MessageDelay int64 `json:"message_delay"` +} + // ValidatorParams restrict the public key types validators can use. // NOTE: uses ABCI pubkey naming, not Amino names. type ValidatorParams struct {