github.com/franono/tendermint@v0.32.2-0.20200527150959-749313264ce9/version/version.go (about)

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