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.

64 lines
1.7 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. // XXX: Don't change the name of this variable or you will break
  18. // automation :)
  19. TMCoreSemVer = "0.29.2"
  20. // ABCISemVer is the semantic version of the ABCI library
  21. ABCISemVer = "0.15.0"
  22. ABCIVersion = ABCISemVer
  23. )
  24. // Protocol is used for implementation agnostic versioning.
  25. type Protocol uint64
  26. // Uint64 returns the Protocol version as a uint64,
  27. // eg. for compatibility with ABCI types.
  28. func (p Protocol) Uint64() uint64 {
  29. return uint64(p)
  30. }
  31. var (
  32. // P2PProtocol versions all p2p behaviour and msgs.
  33. P2PProtocol Protocol = 6
  34. // BlockProtocol versions all block data structures and processing.
  35. BlockProtocol Protocol = 9
  36. )
  37. //------------------------------------------------------------------------
  38. // Version types
  39. // App includes the protocol and software version for the application.
  40. // This information is included in ResponseInfo. The App.Protocol can be
  41. // updated in ResponseEndBlock.
  42. type App struct {
  43. Protocol Protocol `json:"protocol"`
  44. Software string `json:"software"`
  45. }
  46. // Consensus captures the consensus rules for processing a block in the blockchain,
  47. // including all blockchain data structures and the rules of the application's
  48. // state transition machine.
  49. type Consensus struct {
  50. Block Protocol `json:"block"`
  51. App Protocol `json:"app"`
  52. }