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.

53 lines
1.7 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. // ConsensusParams contains consensus critical parameters that determine the
  7. // validity of blocks.
  8. message ConsensusParams {
  9. BlockParams block = 1 [(gogoproto.nullable) = false];
  10. EvidenceParams evidence = 2 [(gogoproto.nullable) = false];
  11. ValidatorParams validator = 3 [(gogoproto.nullable) = false];
  12. }
  13. // BlockParams contains limits on the block size.
  14. message BlockParams {
  15. // Note: must be greater than 0
  16. int64 max_bytes = 1;
  17. // Note: must be greater or equal to -1
  18. int64 max_gas = 2;
  19. // Minimum time increment between consecutive blocks (in milliseconds)
  20. // Not exposed to the application.
  21. int64 time_iota_ms = 3;
  22. }
  23. // EvidenceParams determine how we handle evidence of malfeasance.
  24. message EvidenceParams {
  25. option (gogoproto.populate) = true;
  26. option (gogoproto.equal) = true;
  27. // Note: must be greater than 0
  28. int64 max_age_num_blocks = 1;
  29. google.protobuf.Duration max_age_duration = 2
  30. [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
  31. }
  32. // ValidatorParams restrict the public key types validators can use.
  33. // NOTE: uses ABCI pubkey naming, not Amino names.
  34. message ValidatorParams {
  35. option (gogoproto.populate) = true;
  36. option (gogoproto.equal) = true;
  37. repeated string pub_key_types = 1;
  38. }
  39. // HashedParams is a subset of ConsensusParams.
  40. // It is amino encoded and hashed into
  41. // the Header.ConsensusHash.
  42. message HashedParams {
  43. int64 block_max_bytes = 1;
  44. int64 block_max_gas = 2;
  45. }