github.com/adoriasoft/tendermint@v0.34.0-dev1.0.20200722151356-96d84601a75a/proto/tendermint/types/params.proto (about) 1 syntax = "proto3"; 2 package tendermint.types; 3 4 option go_package = "github.com/adoriasoft/tendermint/proto/tendermint/types"; 5 6 import "gogoproto/gogo.proto"; 7 import "google/protobuf/duration.proto"; 8 9 option (gogoproto.equal_all) = true; 10 11 // ConsensusParams contains consensus critical parameters that determine the 12 // validity of blocks. 13 message ConsensusParams { 14 BlockParams block = 1 [(gogoproto.nullable) = false]; 15 EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; 16 ValidatorParams validator = 3 [(gogoproto.nullable) = false]; 17 VersionParams version = 4 [(gogoproto.nullable) = false]; 18 } 19 20 // BlockParams contains limits on the block size. 21 message BlockParams { 22 // Note: must be greater than 0 23 int64 max_bytes = 1; 24 // Note: must be greater or equal to -1 25 int64 max_gas = 2; 26 // Minimum time increment between consecutive blocks (in milliseconds) 27 // Not exposed to the application. 28 int64 time_iota_ms = 3; 29 } 30 31 // EvidenceParams determine how we handle evidence of malfeasance. 32 message EvidenceParams { 33 // Max age of evidence, in blocks. 34 // 35 // The basic formula for calculating this is: MaxAgeDuration / {average block 36 // time}. 37 int64 max_age_num_blocks = 1; 38 39 // Max age of evidence, in time. 40 // 41 // It should correspond with an app's "unbonding period" or other similar 42 // mechanism for handling [Nothing-At-Stake 43 // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 44 google.protobuf.Duration max_age_duration = 2 45 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; 46 47 // This sets the maximum number of evidence that can be committed in a single block. 48 // and should fall comfortably under the max block bytes when we consider the size of 49 // each evidence (See MaxEvidenceBytes). The maximum number is MaxEvidencePerBlock. 50 // Default is 50 51 uint32 max_num = 3; 52 53 // Proof trial period dictates the time given for nodes accused of amnesia evidence, incorrectly 54 // voting twice in two different rounds to respond with their respective proofs. 55 // Default is half the max age in blocks: 50,000 56 int64 proof_trial_period = 4; 57 } 58 59 // ValidatorParams restrict the public key types validators can use. 60 // NOTE: uses ABCI pubkey naming, not Amino names. 61 message ValidatorParams { 62 option (gogoproto.populate) = true; 63 option (gogoproto.equal) = true; 64 65 repeated string pub_key_types = 1; 66 } 67 68 // VersionParams contains the ABCI application version. 69 message VersionParams { 70 option (gogoproto.populate) = true; 71 option (gogoproto.equal) = true; 72 73 uint64 app_version = 1; 74 } 75 76 // HashedParams is a subset of ConsensusParams. 77 // It is amino encoded and hashed into 78 // the Header.ConsensusHash. 79 message HashedParams { 80 int64 block_max_bytes = 1; 81 int64 block_max_gas = 2; 82 }