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.

66 lines
1.8 KiB

6 years ago
6 years ago
5 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.32.4"
  20. // ABCISemVer is the semantic version of the ABCI library
  21. ABCISemVer = "0.16.1"
  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. // This includes proposer selection.
  34. P2PProtocol Protocol = 7
  35. // BlockProtocol versions all block data structures and processing.
  36. // This includes validity of blocks and state updates.
  37. BlockProtocol Protocol = 10
  38. )
  39. //------------------------------------------------------------------------
  40. // Version types
  41. // App includes the protocol and software version for the application.
  42. // This information is included in ResponseInfo. The App.Protocol can be
  43. // updated in ResponseEndBlock.
  44. type App struct {
  45. Protocol Protocol `json:"protocol"`
  46. Software string `json:"software"`
  47. }
  48. // Consensus captures the consensus rules for processing a block in the blockchain,
  49. // including all blockchain data structures and the rules of the application's
  50. // state transition machine.
  51. type Consensus struct {
  52. Block Protocol `json:"block"`
  53. App Protocol `json:"app"`
  54. }