You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

129 lines
5.4 KiB

syntax = "proto3";
package tendermint.types;
option go_package = "github.com/tendermint/tendermint/proto/tendermint/types";
import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
option (gogoproto.equal_all) = true;
// ConsensusParams contains consensus critical parameters that determine the
// validity of blocks.
message ConsensusParams {
BlockParams block = 1;
EvidenceParams evidence = 2;
ValidatorParams validator = 3;
VersionParams version = 4;
SynchronyParams synchrony = 5;
TimeoutParams timeout = 6;
}
// BlockParams contains limits on the block size.
message BlockParams {
// Max block size, in bytes.
// Note: must be greater than 0
int64 max_bytes = 1;
// Max gas per block.
// Note: must be greater or equal to -1
int64 max_gas = 2;
}
// EvidenceParams determine how we handle evidence of malfeasance.
message EvidenceParams {
// Max age of evidence, in blocks.
//
// The basic formula for calculating this is: MaxAgeDuration / {average block
// time}.
int64 max_age_num_blocks = 1;
// Max age of evidence, in time.
//
// It should correspond with an app's "unbonding period" or other similar
// mechanism for handling [Nothing-At-Stake
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
google.protobuf.Duration max_age_duration = 2
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
// This sets the maximum size of total evidence in bytes that can be committed
// in a single block. and should fall comfortably under the max block bytes.
// Default is 1048576 or 1MB
int64 max_bytes = 3;
}
// ValidatorParams restrict the public key types validators can use.
// NOTE: uses ABCI pubkey naming, not Amino names.
message ValidatorParams {
repeated string pub_key_types = 1;
}
// VersionParams contains the ABCI application version.
message VersionParams {
uint64 app_version = 1;
}
// HashedParams is a subset of ConsensusParams.
//
// It is hashed into the Header.ConsensusHash.
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/tendermint/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];
}
// TimeoutParams configure the timeouts for the steps of the Tendermint consensus algorithm.
message TimeoutParams {
// These fields configure the timeouts for the propose step of the Tendermint
// consensus algorithm: propose is the initial timeout and propose_delta
// determines how much the timeout grows in subsequent rounds.
// For the first round, this propose timeout is used and for every subsequent
// round, the timeout grows by propose_delta.
//
// For example:
// With propose = 10ms, propose_delta = 5ms, the first round's propose phase
// timeout would be 10ms, the second round's would be 15ms, the third 20ms and so on.
//
// If a node waiting for a proposal message does not receive one matching its
// current height and round before this timeout, the node will issue a
// nil prevote for the round and advance to the next step.
google.protobuf.Duration propose = 1 [(gogoproto.stdduration) = true];
google.protobuf.Duration propose_delta = 2 [(gogoproto.stdduration) = true];
// vote along with vote_delta configure the timeout for both of the prevote and
// precommit steps of the Tendermint consensus algorithm.
//
// These parameters influence the vote step timeouts in the the same way that
// the propose and propose_delta parameters do to the proposal step.
//
// The vote timeout does not begin until a quorum of votes has been received. Once
// a quorum of votes has been seen and this timeout elapses, Tendermint will
// procced to the next step of the consensus algorithm. If Tendermint receives
// all of the remaining votes before the end of the timeout, it will proceed
// to the next step immediately.
google.protobuf.Duration vote = 3 [(gogoproto.stdduration) = true];
google.protobuf.Duration vote_delta = 4 [(gogoproto.stdduration) = true];
// commit configures how long Tendermint will wait after receiving a quorum of
// precommits before beginning consensus for the next height. This can be
// used to allow slow precommits to arrive for inclusion in the next height before progressing.
google.protobuf.Duration commit = 5 [(gogoproto.stdduration) = true];
// bypass_commit_timeout configures the node to proceed immediately to
// the next height once the node has received all precommits for a block, forgoing
// the remaining commit timeout.
// Setting bypass_commit_timeout false (the default) causes Tendermint to wait
// for the full commit timeout.
bool bypass_commit_timeout = 6;
}