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.

73 lines
2.9 KiB

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