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.

65 lines
2.2 KiB

  1. syntax = "proto3";
  2. package tendermint.proto.types;
  3. option go_package = "github.com/tendermint/tendermint/proto/types";
  4. import "third_party/proto/gogoproto/gogo.proto";
  5. import "google/protobuf/duration.proto";
  6. option (gogoproto.equal_all) = true;
  7. // ConsensusParams contains consensus critical parameters that determine the
  8. // validity of blocks.
  9. message ConsensusParams {
  10. BlockParams block = 1 [(gogoproto.nullable) = false];
  11. EvidenceParams evidence = 2 [(gogoproto.nullable) = false];
  12. ValidatorParams validator = 3 [(gogoproto.nullable) = false];
  13. }
  14. // BlockParams contains limits on the block size.
  15. message BlockParams {
  16. // Note: must be greater than 0
  17. int64 max_bytes = 1;
  18. // Note: must be greater or equal to -1
  19. int64 max_gas = 2;
  20. // Minimum time increment between consecutive blocks (in milliseconds)
  21. // Not exposed to the application.
  22. int64 time_iota_ms = 3;
  23. }
  24. // EvidenceParams determine how we handle evidence of malfeasance.
  25. message EvidenceParams {
  26. // Max age of evidence, in blocks.
  27. //
  28. // The basic formula for calculating this is: MaxAgeDuration / {average block
  29. // time}.
  30. int64 max_age_num_blocks = 1;
  31. // Max age of evidence, in time.
  32. //
  33. // It should correspond with an app's "unbonding period" or other similar
  34. // mechanism for handling [Nothing-At-Stake
  35. // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
  36. google.protobuf.Duration max_age_duration = 2
  37. [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
  38. // This sets the maximum number of evidence that can be committed in a single block.
  39. // and should fall comfortably under the max block bytes when we consider the size of
  40. // each evidence (See MaxEvidenceBytes). The maximum number is MaxEvidencePerBlock.
  41. // Default is 50
  42. uint32 max_num = 3;
  43. }
  44. // ValidatorParams restrict the public key types validators can use.
  45. // NOTE: uses ABCI pubkey naming, not Amino names.
  46. message ValidatorParams {
  47. repeated string pub_key_types = 1;
  48. }
  49. // HashedParams is a subset of ConsensusParams.
  50. // It is amino encoded and hashed into
  51. // the Header.ConsensusHash.
  52. message HashedParams {
  53. int64 block_max_bytes = 1;
  54. int64 block_max_gas = 2;
  55. }