github.com/vipernet-xyz/tm@v0.34.24/proto/tendermint/types/params.proto (about)

     1  syntax = "proto3";
     2  package tendermint.types;
     3  
     4  option go_package = "github.com/vipernet-xyz/tm/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    // Max block size, in bytes.
    23    // Note: must be greater than 0
    24    int64 max_bytes = 1;
    25    // Max gas per block.
    26    // Note: must be greater or equal to -1
    27    int64 max_gas = 2;
    28    // Minimum time increment between consecutive blocks (in milliseconds) If the
    29    // block header timestamp is ahead of the system clock, decrease this value.
    30    //
    31    // Not exposed to the application.
    32    int64 time_iota_ms = 3;
    33  }
    34  
    35  // EvidenceParams determine how we handle evidence of malfeasance.
    36  message EvidenceParams {
    37    // Max age of evidence, in blocks.
    38    //
    39    // The basic formula for calculating this is: MaxAgeDuration / {average block
    40    // time}.
    41    int64 max_age_num_blocks = 1;
    42  
    43    // Max age of evidence, in time.
    44    //
    45    // It should correspond with an app's "unbonding period" or other similar
    46    // mechanism for handling [Nothing-At-Stake
    47    // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
    48    google.protobuf.Duration max_age_duration = 2
    49        [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
    50  
    51    // This sets the maximum size of total evidence in bytes that can be committed in a single block.
    52    // and should fall comfortably under the max block bytes.
    53    // Default is 1048576 or 1MB
    54    int64 max_bytes = 3;
    55  }
    56  
    57  // ValidatorParams restrict the public key types validators can use.
    58  // NOTE: uses ABCI pubkey naming, not Amino names.
    59  message ValidatorParams {
    60    option (gogoproto.populate) = true;
    61    option (gogoproto.equal)    = true;
    62  
    63    repeated string pub_key_types = 1;
    64  }
    65  
    66  // VersionParams contains the ABCI application version.
    67  message VersionParams {
    68    option (gogoproto.populate) = true;
    69    option (gogoproto.equal)    = true;
    70  
    71    uint64 app_version = 1;
    72  }
    73  
    74  // HashedParams is a subset of ConsensusParams.
    75  //
    76  // It is hashed into the Header.ConsensusHash.
    77  message HashedParams {
    78    int64 block_max_bytes = 1;
    79    int64 block_max_gas   = 2;
    80  }