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.

62 lines
1.6 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. package version
  2. var (
  3. // GitCommit is the current HEAD set using ldflags.
  4. GitCommit string
  5. // Version is the built softwares version.
  6. Version string = TMCoreSemVer
  7. )
  8. func init() {
  9. if GitCommit != "" {
  10. Version += "-" + GitCommit
  11. }
  12. }
  13. const (
  14. // TMCoreSemVer is the current version of Tendermint Core.
  15. // It's the Semantic Version of the software.
  16. // Must be a string because scripts like dist.sh read this file.
  17. TMCoreSemVer = "0.27.3"
  18. // ABCISemVer is the semantic version of the ABCI library
  19. ABCISemVer = "0.15.0"
  20. ABCIVersion = ABCISemVer
  21. )
  22. // Protocol is used for implementation agnostic versioning.
  23. type Protocol uint64
  24. // Uint64 returns the Protocol version as a uint64,
  25. // eg. for compatibility with ABCI types.
  26. func (p Protocol) Uint64() uint64 {
  27. return uint64(p)
  28. }
  29. var (
  30. // P2PProtocol versions all p2p behaviour and msgs.
  31. P2PProtocol Protocol = 5
  32. // BlockProtocol versions all block data structures and processing.
  33. BlockProtocol Protocol = 8
  34. )
  35. //------------------------------------------------------------------------
  36. // Version types
  37. // App includes the protocol and software version for the application.
  38. // This information is included in ResponseInfo. The App.Protocol can be
  39. // updated in ResponseEndBlock.
  40. type App struct {
  41. Protocol Protocol `json:"protocol"`
  42. Software string `json:"software"`
  43. }
  44. // Consensus captures the consensus rules for processing a block in the blockchain,
  45. // including all blockchain data structures and the rules of the application's
  46. // state transition machine.
  47. type Consensus struct {
  48. Block Protocol `json:"block"`
  49. App Protocol `json:"app"`
  50. }