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.

74 lines
3.0 KiB

  1. syntax = "proto3";
  2. package tendermint.proto.state;
  3. option go_package = "github.com/tendermint/tendermint/proto/state";
  4. import "third_party/proto/gogoproto/gogo.proto";
  5. import "abci/types/types.proto";
  6. import "proto/types/types.proto";
  7. import "proto/types/validator.proto";
  8. import "proto/types/params.proto";
  9. import "proto/version/version.proto";
  10. import "google/protobuf/timestamp.proto";
  11. // ABCIResponses retains the responses
  12. // of the various ABCI calls during block processing.
  13. // It is persisted to disk for each height before calling Commit.
  14. message ABCIResponses {
  15. repeated tendermint.abci.types.ResponseDeliverTx deliver_txs = 1;
  16. tendermint.abci.types.ResponseEndBlock end_block = 2;
  17. tendermint.abci.types.ResponseBeginBlock begin_block = 3;
  18. }
  19. // ValidatorsInfo represents the latest validator set, or the last height it changed
  20. message ValidatorsInfo {
  21. tendermint.proto.types.ValidatorSet validator_set = 1;
  22. int64 last_height_changed = 2;
  23. }
  24. // ConsensusParamsInfo represents the latest consensus params, or the last height it changed
  25. message ConsensusParamsInfo {
  26. tendermint.proto.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false];
  27. int64 last_height_changed = 2;
  28. }
  29. message Version {
  30. tendermint.proto.version.Consensus consensus = 1 [(gogoproto.nullable) = false];
  31. string software = 2;
  32. }
  33. message State {
  34. Version version = 1 [(gogoproto.nullable) = false];
  35. // immutable
  36. string chain_Id = 2 [(gogoproto.customname) = "ChainID"];
  37. // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
  38. int64 last_block_height = 3;
  39. tendermint.proto.types.BlockID last_block_id = 4
  40. [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"];
  41. google.protobuf.Timestamp last_block_time = 5
  42. [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  43. // LastValidators is used to validate block.LastCommit.
  44. // Validators are persisted to the database separately every time they change,
  45. // so we can query for historical validator sets.
  46. // Note that if s.LastBlockHeight causes a valset change,
  47. // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1
  48. // Extra +1 due to nextValSet delay.
  49. tendermint.proto.types.ValidatorSet next_validators = 6;
  50. tendermint.proto.types.ValidatorSet validators = 7;
  51. tendermint.proto.types.ValidatorSet last_validators = 8;
  52. int64 last_height_validators_changed = 9;
  53. // Consensus parameters used for validating blocks.
  54. // Changes returned by EndBlock and updated after Commit.
  55. tendermint.proto.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false];
  56. int64 last_height_consensus_params_changed = 11;
  57. // Merkle root of the results from executing prev block
  58. bytes LastResultsHash = 12;
  59. // the latest AppHash we've received from calling abci.Commit()
  60. bytes AppHash = 13;
  61. }