state: proto migration (#4951)

This commit is contained in:
Marko
2020-06-05 10:47:16 +02:00
committed by GitHub
parent ee91312d34
commit b9af87c4ea
45 changed files with 5222 additions and 1471 deletions
+2 -30
View File
@@ -28,40 +28,12 @@ const (
ABCIVersion = ABCISemVer
)
// Protocol is used for implementation agnostic versioning.
type Protocol uint64
// Uint64 returns the Protocol version as a uint64,
// eg. for compatibility with ABCI types.
func (p Protocol) Uint64() uint64 {
return uint64(p)
}
var (
// P2PProtocol versions all p2p behaviour and msgs.
// This includes proposer selection.
P2PProtocol Protocol = 7
P2PProtocol uint64 = 7
// BlockProtocol versions all block data structures and processing.
// This includes validity of blocks and state updates.
BlockProtocol Protocol = 10
BlockProtocol uint64 = 10
)
//------------------------------------------------------------------------
// Version types
// App includes the protocol and software version for the application.
// This information is included in ResponseInfo. The App.Protocol can be
// updated in ResponseEndBlock.
type App struct {
Protocol Protocol `json:"protocol"`
Software string `json:"software"`
}
// Consensus captures the consensus rules for processing a block in the blockchain,
// including all blockchain data structures and the rules of the application's
// state transition machine.
type Consensus struct {
Block Protocol `json:"block"`
App Protocol `json:"app"`
}