mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-18 14:55:02 +00:00
these proto files are meant to help unblock ibc in their quest of migrating the ibc module to proto.
This commit is contained in:
81
crypto/encoding/codec.go
Normal file
81
crypto/encoding/codec.go
Normal file
@@ -0,0 +1,81 @@
|
||||
package encoding
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
"github.com/tendermint/tendermint/crypto/ed25519"
|
||||
pc "github.com/tendermint/tendermint/proto/crypto/keys"
|
||||
)
|
||||
|
||||
// PubKeyToProto takes crypto.PubKey and transforms it to a protobuf Pubkey
|
||||
func PubKeyToProto(k crypto.PubKey) (pc.PublicKey, error) {
|
||||
if k == nil {
|
||||
return pc.PublicKey{}, errors.New("nil PublicKey")
|
||||
}
|
||||
var kp pc.PublicKey
|
||||
switch k := k.(type) {
|
||||
case ed25519.PubKeyEd25519:
|
||||
kp = pc.PublicKey{
|
||||
Sum: &pc.PublicKey_Ed25519{
|
||||
Ed25519: k[:],
|
||||
},
|
||||
}
|
||||
default:
|
||||
return kp, fmt.Errorf("toproto: key type %v is not supported", k)
|
||||
}
|
||||
return kp, nil
|
||||
}
|
||||
|
||||
// PubKeyFromProto takes a protobuf Pubkey and transforms it to a crypto.Pubkey
|
||||
func PubKeyFromProto(k *pc.PublicKey) (crypto.PubKey, error) {
|
||||
if k == nil {
|
||||
return nil, errors.New("nil PublicKey")
|
||||
}
|
||||
switch k := k.Sum.(type) {
|
||||
case *pc.PublicKey_Ed25519:
|
||||
if len(k.Ed25519) != ed25519.PubKeyEd25519Size {
|
||||
return nil, fmt.Errorf("invalid size for PubKeyEd25519. Got %d, expected %d",
|
||||
len(k.Ed25519), ed25519.PubKeyEd25519Size)
|
||||
}
|
||||
var pk ed25519.PubKeyEd25519
|
||||
copy(pk[:], k.Ed25519)
|
||||
return pk, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("fromproto: key type %v is not supported", k)
|
||||
}
|
||||
}
|
||||
|
||||
// PrivKeyToProto takes crypto.PrivKey and transforms it to a protobuf PrivKey
|
||||
func PrivKeyToProto(k crypto.PrivKey) (pc.PrivateKey, error) {
|
||||
var kp pc.PrivateKey
|
||||
switch k := k.(type) {
|
||||
case ed25519.PrivKeyEd25519:
|
||||
kp = pc.PrivateKey{
|
||||
Sum: &pc.PrivateKey_Ed25519{
|
||||
Ed25519: k[:],
|
||||
},
|
||||
}
|
||||
default:
|
||||
return kp, errors.New("toproto: key type is not supported")
|
||||
}
|
||||
return kp, nil
|
||||
}
|
||||
|
||||
// PrivKeyFromProto takes a protobuf PrivateKey and transforms it to a crypto.PrivKey
|
||||
func PrivKeyFromProto(k pc.PrivateKey) (crypto.PrivKey, error) {
|
||||
switch k := k.Sum.(type) {
|
||||
case *pc.PrivateKey_Ed25519:
|
||||
|
||||
if len(k.Ed25519) != ed25519.PubKeyEd25519Size {
|
||||
return nil, fmt.Errorf("invalid size for PubKeyEd25519. Got %d, expected %d",
|
||||
len(k.Ed25519), ed25519.PubKeyEd25519Size)
|
||||
}
|
||||
var pk ed25519.PrivKeyEd25519
|
||||
copy(pk[:], k.Ed25519)
|
||||
return pk, nil
|
||||
default:
|
||||
return nil, errors.New("fromproto: key type not supported")
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
tmprotobits "github.com/tendermint/tendermint/proto/libs/bits"
|
||||
)
|
||||
|
||||
// BitArray is a thread-safe implementation of a bit array.
|
||||
@@ -418,3 +419,28 @@ func (bA *BitArray) UnmarshalJSON(bz []byte) error {
|
||||
*bA = *bA2 //nolint:govet
|
||||
return nil
|
||||
}
|
||||
|
||||
// ToProto converts BitArray to protobuf
|
||||
func (bA *BitArray) ToProto() *tmprotobits.BitArray {
|
||||
if bA == nil || len(bA.Elems) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &tmprotobits.BitArray{
|
||||
Bits: int64(bA.Bits),
|
||||
Elems: bA.Elems,
|
||||
}
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf BitArray to the given pointer.
|
||||
func (bA *BitArray) FromProto(protoBitArray *tmprotobits.BitArray) {
|
||||
if protoBitArray == nil {
|
||||
bA = nil
|
||||
return
|
||||
}
|
||||
|
||||
bA.Bits = int(protoBitArray.Bits)
|
||||
if len(protoBitArray.Elems) > 0 {
|
||||
bA.Elems = protoBitArray.Elems
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,3 +265,26 @@ func TestJSONMarshalUnmarshal(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestBitArrayProtoBuf(t *testing.T) {
|
||||
testCases := []struct {
|
||||
msg string
|
||||
bA1 *BitArray
|
||||
expPass bool
|
||||
}{
|
||||
{"success empty", &BitArray{}, true},
|
||||
{"success", NewBitArray(1), true},
|
||||
{"success", NewBitArray(2), true},
|
||||
{"negative", NewBitArray(-1), false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoBA := tc.bA1.ToProto()
|
||||
ba := new(BitArray)
|
||||
ba.FromProto(protoBA)
|
||||
if tc.expPass {
|
||||
require.Equal(t, tc.bA1, ba, tc.msg)
|
||||
} else {
|
||||
require.NotEqual(t, tc.bA1, ba, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
389
proto/blockchain/msgs.pb.go
Normal file
389
proto/blockchain/msgs.pb.go
Normal file
@@ -0,0 +1,389 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/blockchain/msgs.proto
|
||||
|
||||
package blockchain
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
types "github.com/tendermint/tendermint/proto/types"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// BlockRequest requests a block for a specific height
|
||||
type BlockRequest struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockRequest) Reset() { *m = BlockRequest{} }
|
||||
func (m *BlockRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockRequest) ProtoMessage() {}
|
||||
func (*BlockRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ecf660069f8bb334, []int{0}
|
||||
}
|
||||
func (m *BlockRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockRequest.Merge(m, src)
|
||||
}
|
||||
func (m *BlockRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockRequest.Size(m)
|
||||
}
|
||||
func (m *BlockRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockRequest) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// NoBlockResponse informs the node that the peer does not have block at the requested height
|
||||
type NoBlockResponse struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NoBlockResponse) Reset() { *m = NoBlockResponse{} }
|
||||
func (m *NoBlockResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*NoBlockResponse) ProtoMessage() {}
|
||||
func (*NoBlockResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ecf660069f8bb334, []int{1}
|
||||
}
|
||||
func (m *NoBlockResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NoBlockResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NoBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NoBlockResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NoBlockResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NoBlockResponse.Merge(m, src)
|
||||
}
|
||||
func (m *NoBlockResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_NoBlockResponse.Size(m)
|
||||
}
|
||||
func (m *NoBlockResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NoBlockResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NoBlockResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *NoBlockResponse) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// BlockResponse returns block to the requested
|
||||
type BlockResponse struct {
|
||||
Block types.Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockResponse) Reset() { *m = BlockResponse{} }
|
||||
func (m *BlockResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockResponse) ProtoMessage() {}
|
||||
func (*BlockResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ecf660069f8bb334, []int{2}
|
||||
}
|
||||
func (m *BlockResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockResponse.Merge(m, src)
|
||||
}
|
||||
func (m *BlockResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockResponse.Size(m)
|
||||
}
|
||||
func (m *BlockResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockResponse) GetBlock() types.Block {
|
||||
if m != nil {
|
||||
return m.Block
|
||||
}
|
||||
return types.Block{}
|
||||
}
|
||||
|
||||
// StatusRequest requests the status of a node (Height & Base)
|
||||
type StatusRequest struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Base int64 `protobuf:"varint,2,opt,name=base,proto3" json:"base,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *StatusRequest) Reset() { *m = StatusRequest{} }
|
||||
func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatusRequest) ProtoMessage() {}
|
||||
func (*StatusRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ecf660069f8bb334, []int{3}
|
||||
}
|
||||
func (m *StatusRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StatusRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *StatusRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_StatusRequest.Merge(m, src)
|
||||
}
|
||||
func (m *StatusRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_StatusRequest.Size(m)
|
||||
}
|
||||
func (m *StatusRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_StatusRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_StatusRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *StatusRequest) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StatusRequest) GetBase() int64 {
|
||||
if m != nil {
|
||||
return m.Base
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// StatusResponse is a peer response to infrom their status
|
||||
type StatusResponse struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Base int64 `protobuf:"varint,2,opt,name=base,proto3" json:"base,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *StatusResponse) Reset() { *m = StatusResponse{} }
|
||||
func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatusResponse) ProtoMessage() {}
|
||||
func (*StatusResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ecf660069f8bb334, []int{4}
|
||||
}
|
||||
func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StatusResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *StatusResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_StatusResponse.Merge(m, src)
|
||||
}
|
||||
func (m *StatusResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_StatusResponse.Size(m)
|
||||
}
|
||||
func (m *StatusResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_StatusResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_StatusResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *StatusResponse) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StatusResponse) GetBase() int64 {
|
||||
if m != nil {
|
||||
return m.Base
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *Message_BlockRequest
|
||||
// *Message_NoBlockResponse
|
||||
// *Message_BlockResponse
|
||||
// *Message_StatusRequest
|
||||
// *Message_StatusResponse
|
||||
Sum isMessage_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Message) Reset() { *m = Message{} }
|
||||
func (m *Message) String() string { return proto.CompactTextString(m) }
|
||||
func (*Message) ProtoMessage() {}
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ecf660069f8bb334, []int{5}
|
||||
}
|
||||
func (m *Message) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Message.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Message) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Message.Merge(m, src)
|
||||
}
|
||||
func (m *Message) XXX_Size() int {
|
||||
return xxx_messageInfo_Message.Size(m)
|
||||
}
|
||||
func (m *Message) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Message.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Message proto.InternalMessageInfo
|
||||
|
||||
type isMessage_Sum interface {
|
||||
isMessage_Sum()
|
||||
}
|
||||
|
||||
type Message_BlockRequest struct {
|
||||
BlockRequest *BlockRequest `protobuf:"bytes,1,opt,name=block_request,json=blockRequest,proto3,oneof" json:"block_request,omitempty"`
|
||||
}
|
||||
type Message_NoBlockResponse struct {
|
||||
NoBlockResponse *NoBlockResponse `protobuf:"bytes,2,opt,name=no_block_response,json=noBlockResponse,proto3,oneof" json:"no_block_response,omitempty"`
|
||||
}
|
||||
type Message_BlockResponse struct {
|
||||
BlockResponse *BlockResponse `protobuf:"bytes,3,opt,name=block_response,json=blockResponse,proto3,oneof" json:"block_response,omitempty"`
|
||||
}
|
||||
type Message_StatusRequest struct {
|
||||
StatusRequest *StatusRequest `protobuf:"bytes,4,opt,name=status_request,json=statusRequest,proto3,oneof" json:"status_request,omitempty"`
|
||||
}
|
||||
type Message_StatusResponse struct {
|
||||
StatusResponse *StatusResponse `protobuf:"bytes,5,opt,name=status_response,json=statusResponse,proto3,oneof" json:"status_response,omitempty"`
|
||||
}
|
||||
|
||||
func (*Message_BlockRequest) isMessage_Sum() {}
|
||||
func (*Message_NoBlockResponse) isMessage_Sum() {}
|
||||
func (*Message_BlockResponse) isMessage_Sum() {}
|
||||
func (*Message_StatusRequest) isMessage_Sum() {}
|
||||
func (*Message_StatusResponse) isMessage_Sum() {}
|
||||
|
||||
func (m *Message) GetSum() isMessage_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetBlockRequest() *BlockRequest {
|
||||
if x, ok := m.GetSum().(*Message_BlockRequest); ok {
|
||||
return x.BlockRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetNoBlockResponse() *NoBlockResponse {
|
||||
if x, ok := m.GetSum().(*Message_NoBlockResponse); ok {
|
||||
return x.NoBlockResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetBlockResponse() *BlockResponse {
|
||||
if x, ok := m.GetSum().(*Message_BlockResponse); ok {
|
||||
return x.BlockResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetStatusRequest() *StatusRequest {
|
||||
if x, ok := m.GetSum().(*Message_StatusRequest); ok {
|
||||
return x.StatusRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetStatusResponse() *StatusResponse {
|
||||
if x, ok := m.GetSum().(*Message_StatusResponse); ok {
|
||||
return x.StatusResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Message) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*Message_BlockRequest)(nil),
|
||||
(*Message_NoBlockResponse)(nil),
|
||||
(*Message_BlockResponse)(nil),
|
||||
(*Message_StatusRequest)(nil),
|
||||
(*Message_StatusResponse)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*BlockRequest)(nil), "tendermint.proto.blockchain.BlockRequest")
|
||||
proto.RegisterType((*NoBlockResponse)(nil), "tendermint.proto.blockchain.NoBlockResponse")
|
||||
proto.RegisterType((*BlockResponse)(nil), "tendermint.proto.blockchain.BlockResponse")
|
||||
proto.RegisterType((*StatusRequest)(nil), "tendermint.proto.blockchain.StatusRequest")
|
||||
proto.RegisterType((*StatusResponse)(nil), "tendermint.proto.blockchain.StatusResponse")
|
||||
proto.RegisterType((*Message)(nil), "tendermint.proto.blockchain.Message")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/blockchain/msgs.proto", fileDescriptor_ecf660069f8bb334) }
|
||||
|
||||
var fileDescriptor_ecf660069f8bb334 = []byte{
|
||||
// 369 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x4e, 0xc2, 0x40,
|
||||
0x10, 0x86, 0xc1, 0x02, 0x26, 0x03, 0x85, 0xd8, 0x83, 0x12, 0x88, 0xd1, 0xf4, 0x40, 0x44, 0xcd,
|
||||
0x36, 0xc2, 0xc9, 0xe8, 0xa9, 0x27, 0x62, 0xa2, 0x31, 0x25, 0xf1, 0xc0, 0x85, 0xb4, 0xb0, 0x69,
|
||||
0x1b, 0x6d, 0xb7, 0x76, 0xb6, 0x07, 0xde, 0xce, 0xa3, 0x4f, 0xe1, 0xb3, 0x18, 0x76, 0x4b, 0xa1,
|
||||
0x55, 0xb1, 0xb7, 0xdd, 0xbf, 0x33, 0xdf, 0xfc, 0x3b, 0x7f, 0x0a, 0xfd, 0x28, 0x66, 0x9c, 0x19,
|
||||
0xce, 0x1b, 0x5b, 0xbc, 0x2e, 0x3c, 0xdb, 0x0f, 0x8d, 0x00, 0x5d, 0x24, 0x42, 0xd5, 0xfa, 0x9c,
|
||||
0x86, 0x4b, 0x1a, 0x07, 0x7e, 0xc8, 0xa5, 0x42, 0xb6, 0x75, 0xbd, 0x01, 0xf7, 0xfc, 0x78, 0x39,
|
||||
0x8f, 0xec, 0x98, 0xaf, 0x0c, 0x49, 0x71, 0x99, 0xcb, 0xb6, 0x27, 0xd9, 0xd2, 0x3b, 0x91, 0x0a,
|
||||
0x5f, 0x45, 0x14, 0xe5, 0x1c, 0xf9, 0x41, 0x1f, 0x40, 0xcb, 0x5c, 0x5f, 0x2d, 0xfa, 0x9e, 0x50,
|
||||
0xe4, 0xda, 0x31, 0x34, 0x3c, 0xea, 0xbb, 0x1e, 0xef, 0x56, 0xcf, 0xab, 0x17, 0x8a, 0x95, 0xde,
|
||||
0xf4, 0x21, 0x74, 0x9e, 0x58, 0x5a, 0x89, 0x11, 0x0b, 0x91, 0xfe, 0x59, 0xfa, 0x00, 0x6a, 0xbe,
|
||||
0xf0, 0x16, 0xea, 0x62, 0xa4, 0xa8, 0x6b, 0x8e, 0x4e, 0xc9, 0x8f, 0x17, 0x09, 0x5f, 0x44, 0x74,
|
||||
0x99, 0xb5, 0xcf, 0xaf, 0xb3, 0x8a, 0x25, 0x3b, 0xf4, 0x3b, 0x50, 0xa7, 0xdc, 0xe6, 0x09, 0xfe,
|
||||
0xe3, 0x4f, 0xd3, 0xa0, 0xe6, 0xd8, 0x48, 0xbb, 0x07, 0x42, 0x15, 0x67, 0xfd, 0x1e, 0xda, 0x9b,
|
||||
0xe6, 0xfd, 0x96, 0x7f, 0xed, 0xfe, 0x50, 0xe0, 0xf0, 0x91, 0x22, 0xda, 0x2e, 0xd5, 0x9e, 0x41,
|
||||
0x15, 0x7e, 0xe6, 0xb1, 0xb4, 0x91, 0xbe, 0x64, 0x48, 0xf6, 0x64, 0x43, 0x76, 0xf7, 0x3a, 0xa9,
|
||||
0x58, 0x2d, 0x67, 0x77, 0xcf, 0x33, 0x38, 0x0a, 0xd9, 0x7c, 0x03, 0x95, 0xf6, 0xc4, 0xf8, 0xe6,
|
||||
0xe8, 0x7a, 0x2f, 0xb5, 0x90, 0xc2, 0xa4, 0x62, 0x75, 0xc2, 0x42, 0x30, 0x53, 0x68, 0x17, 0xc0,
|
||||
0x8a, 0x00, 0x5f, 0x96, 0xb1, 0x9b, 0x61, 0x55, 0xa7, 0x08, 0x45, 0xb1, 0xcc, 0x6c, 0x07, 0xb5,
|
||||
0x12, 0xd0, 0x5c, 0x78, 0x6b, 0x28, 0xe6, 0xd2, 0x7c, 0x81, 0x4e, 0x06, 0x4d, 0xad, 0xd6, 0x05,
|
||||
0xf5, 0xaa, 0x14, 0x35, 0xf3, 0xda, 0xc6, 0x9c, 0x62, 0xd6, 0x41, 0xc1, 0x24, 0x30, 0xc7, 0xb3,
|
||||
0x1b, 0xd7, 0xe7, 0x5e, 0xe2, 0x90, 0x05, 0x0b, 0x8c, 0x2d, 0x71, 0xf7, 0x58, 0xfc, 0xf5, 0x9c,
|
||||
0x86, 0x50, 0xc6, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xb9, 0x72, 0x28, 0x95, 0x03, 0x00,
|
||||
0x00,
|
||||
}
|
||||
44
proto/blockchain/msgs.proto
Normal file
44
proto/blockchain/msgs.proto
Normal file
@@ -0,0 +1,44 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.blockchain;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/blockchain";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/types/block.proto";
|
||||
|
||||
// BlockRequest requests a block for a specific height
|
||||
message BlockRequest {
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
// NoBlockResponse informs the node that the peer does not have block at the requested height
|
||||
message NoBlockResponse {
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
// BlockResponse returns block to the requested
|
||||
message BlockResponse {
|
||||
tendermint.proto.types.Block block = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// StatusRequest requests the status of a node (Height & Base)
|
||||
message StatusRequest {
|
||||
int64 height = 1;
|
||||
int64 base = 2;
|
||||
}
|
||||
|
||||
// StatusResponse is a peer response to infrom their status
|
||||
message StatusResponse {
|
||||
int64 height = 1;
|
||||
int64 base = 2;
|
||||
}
|
||||
|
||||
message Message {
|
||||
oneof sum {
|
||||
BlockRequest block_request = 1;
|
||||
NoBlockResponse no_block_response = 2;
|
||||
BlockResponse block_response = 3;
|
||||
StatusRequest status_request = 4;
|
||||
StatusResponse status_response = 5;
|
||||
}
|
||||
}
|
||||
794
proto/consensus/msgs.pb.go
Normal file
794
proto/consensus/msgs.pb.go
Normal file
@@ -0,0 +1,794 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/consensus/msgs.proto
|
||||
|
||||
package consensus
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
bits "github.com/tendermint/tendermint/proto/libs/bits"
|
||||
types "github.com/tendermint/tendermint/proto/types"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// NewRoundStepMessage is sent for every step taken in the ConsensusState.
|
||||
// For every height/round/step transition
|
||||
type NewRoundStep struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Step uint32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"`
|
||||
SecondsSinceStartTime int64 `protobuf:"varint,4,opt,name=seconds_since_start_time,json=secondsSinceStartTime,proto3" json:"seconds_since_start_time,omitempty"`
|
||||
LastCommitRound int32 `protobuf:"varint,5,opt,name=last_commit_round,json=lastCommitRound,proto3" json:"last_commit_round,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NewRoundStep) Reset() { *m = NewRoundStep{} }
|
||||
func (m *NewRoundStep) String() string { return proto.CompactTextString(m) }
|
||||
func (*NewRoundStep) ProtoMessage() {}
|
||||
func (*NewRoundStep) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{0}
|
||||
}
|
||||
func (m *NewRoundStep) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NewRoundStep.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NewRoundStep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NewRoundStep.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NewRoundStep) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NewRoundStep.Merge(m, src)
|
||||
}
|
||||
func (m *NewRoundStep) XXX_Size() int {
|
||||
return xxx_messageInfo_NewRoundStep.Size(m)
|
||||
}
|
||||
func (m *NewRoundStep) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NewRoundStep.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NewRoundStep proto.InternalMessageInfo
|
||||
|
||||
func (m *NewRoundStep) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NewRoundStep) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NewRoundStep) GetStep() uint32 {
|
||||
if m != nil {
|
||||
return m.Step
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NewRoundStep) GetSecondsSinceStartTime() int64 {
|
||||
if m != nil {
|
||||
return m.SecondsSinceStartTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NewRoundStep) GetLastCommitRound() int32 {
|
||||
if m != nil {
|
||||
return m.LastCommitRound
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// NewValidBlockMessage is sent when a validator observes a valid block B in some round r,
|
||||
//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r.
|
||||
// In case the block is also committed, then IsCommit flag is set to true.
|
||||
type NewValidBlock struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
BlockPartsHeader types.PartSetHeader `protobuf:"bytes,3,opt,name=block_parts_header,json=blockPartsHeader,proto3" json:"block_parts_header"`
|
||||
BlockParts *bits.BitArray `protobuf:"bytes,4,opt,name=block_parts,json=blockParts,proto3" json:"block_parts,omitempty"`
|
||||
IsCommit bool `protobuf:"varint,5,opt,name=is_commit,json=isCommit,proto3" json:"is_commit,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NewValidBlock) Reset() { *m = NewValidBlock{} }
|
||||
func (m *NewValidBlock) String() string { return proto.CompactTextString(m) }
|
||||
func (*NewValidBlock) ProtoMessage() {}
|
||||
func (*NewValidBlock) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{1}
|
||||
}
|
||||
func (m *NewValidBlock) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NewValidBlock.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NewValidBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NewValidBlock.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NewValidBlock) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NewValidBlock.Merge(m, src)
|
||||
}
|
||||
func (m *NewValidBlock) XXX_Size() int {
|
||||
return xxx_messageInfo_NewValidBlock.Size(m)
|
||||
}
|
||||
func (m *NewValidBlock) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NewValidBlock.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NewValidBlock proto.InternalMessageInfo
|
||||
|
||||
func (m *NewValidBlock) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NewValidBlock) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NewValidBlock) GetBlockPartsHeader() types.PartSetHeader {
|
||||
if m != nil {
|
||||
return m.BlockPartsHeader
|
||||
}
|
||||
return types.PartSetHeader{}
|
||||
}
|
||||
|
||||
func (m *NewValidBlock) GetBlockParts() *bits.BitArray {
|
||||
if m != nil {
|
||||
return m.BlockParts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NewValidBlock) GetIsCommit() bool {
|
||||
if m != nil {
|
||||
return m.IsCommit
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// ProposalMessage is sent when a new block is proposed.
|
||||
type Proposal struct {
|
||||
Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Proposal) Reset() { *m = Proposal{} }
|
||||
func (m *Proposal) String() string { return proto.CompactTextString(m) }
|
||||
func (*Proposal) ProtoMessage() {}
|
||||
func (*Proposal) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{2}
|
||||
}
|
||||
func (m *Proposal) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Proposal.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Proposal) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Proposal.Merge(m, src)
|
||||
}
|
||||
func (m *Proposal) XXX_Size() int {
|
||||
return xxx_messageInfo_Proposal.Size(m)
|
||||
}
|
||||
func (m *Proposal) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Proposal.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Proposal proto.InternalMessageInfo
|
||||
|
||||
func (m *Proposal) GetProposal() types.Proposal {
|
||||
if m != nil {
|
||||
return m.Proposal
|
||||
}
|
||||
return types.Proposal{}
|
||||
}
|
||||
|
||||
// ProposalPOLMessage is sent when a previous proposal is re-proposed.
|
||||
type ProposalPOL struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
ProposalPolRound int32 `protobuf:"varint,2,opt,name=proposal_pol_round,json=proposalPolRound,proto3" json:"proposal_pol_round,omitempty"`
|
||||
ProposalPol bits.BitArray `protobuf:"bytes,3,opt,name=proposal_pol,json=proposalPol,proto3" json:"proposal_pol"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ProposalPOL) Reset() { *m = ProposalPOL{} }
|
||||
func (m *ProposalPOL) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProposalPOL) ProtoMessage() {}
|
||||
func (*ProposalPOL) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{3}
|
||||
}
|
||||
func (m *ProposalPOL) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ProposalPOL.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ProposalPOL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ProposalPOL.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ProposalPOL) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ProposalPOL.Merge(m, src)
|
||||
}
|
||||
func (m *ProposalPOL) XXX_Size() int {
|
||||
return xxx_messageInfo_ProposalPOL.Size(m)
|
||||
}
|
||||
func (m *ProposalPOL) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ProposalPOL.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ProposalPOL proto.InternalMessageInfo
|
||||
|
||||
func (m *ProposalPOL) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ProposalPOL) GetProposalPolRound() int32 {
|
||||
if m != nil {
|
||||
return m.ProposalPolRound
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ProposalPOL) GetProposalPol() bits.BitArray {
|
||||
if m != nil {
|
||||
return m.ProposalPol
|
||||
}
|
||||
return bits.BitArray{}
|
||||
}
|
||||
|
||||
// BlockPartMessage is sent when gossipping a piece of the proposed block.
|
||||
type BlockPart struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Part types.Part `protobuf:"bytes,3,opt,name=part,proto3" json:"part"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockPart) Reset() { *m = BlockPart{} }
|
||||
func (m *BlockPart) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockPart) ProtoMessage() {}
|
||||
func (*BlockPart) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{4}
|
||||
}
|
||||
func (m *BlockPart) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockPart.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockPart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockPart.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockPart) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockPart.Merge(m, src)
|
||||
}
|
||||
func (m *BlockPart) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockPart.Size(m)
|
||||
}
|
||||
func (m *BlockPart) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockPart.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockPart proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockPart) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BlockPart) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BlockPart) GetPart() types.Part {
|
||||
if m != nil {
|
||||
return m.Part
|
||||
}
|
||||
return types.Part{}
|
||||
}
|
||||
|
||||
// VoteMessage is sent when voting for a proposal (or lack thereof).
|
||||
type Vote struct {
|
||||
Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Vote) Reset() { *m = Vote{} }
|
||||
func (m *Vote) String() string { return proto.CompactTextString(m) }
|
||||
func (*Vote) ProtoMessage() {}
|
||||
func (*Vote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{5}
|
||||
}
|
||||
func (m *Vote) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Vote.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Vote) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Vote.Merge(m, src)
|
||||
}
|
||||
func (m *Vote) XXX_Size() int {
|
||||
return xxx_messageInfo_Vote.Size(m)
|
||||
}
|
||||
func (m *Vote) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Vote.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Vote proto.InternalMessageInfo
|
||||
|
||||
func (m *Vote) GetVote() *types.Vote {
|
||||
if m != nil {
|
||||
return m.Vote
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// HasVoteMessage is sent to indicate that a particular vote has been received.
|
||||
type HasVote struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
|
||||
Index uint32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *HasVote) Reset() { *m = HasVote{} }
|
||||
func (m *HasVote) String() string { return proto.CompactTextString(m) }
|
||||
func (*HasVote) ProtoMessage() {}
|
||||
func (*HasVote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{6}
|
||||
}
|
||||
func (m *HasVote) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_HasVote.Unmarshal(m, b)
|
||||
}
|
||||
func (m *HasVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_HasVote.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *HasVote) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_HasVote.Merge(m, src)
|
||||
}
|
||||
func (m *HasVote) XXX_Size() int {
|
||||
return xxx_messageInfo_HasVote.Size(m)
|
||||
}
|
||||
func (m *HasVote) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_HasVote.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_HasVote proto.InternalMessageInfo
|
||||
|
||||
func (m *HasVote) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *HasVote) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *HasVote) GetType() types.SignedMsgType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return types.SIGNED_MSG_TYPE_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *HasVote) GetIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// VoteSetMaj23Message is sent to indicate that a given BlockID has seen +2/3 votes.
|
||||
type VoteSetMaj23 struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
|
||||
BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VoteSetMaj23) Reset() { *m = VoteSetMaj23{} }
|
||||
func (m *VoteSetMaj23) String() string { return proto.CompactTextString(m) }
|
||||
func (*VoteSetMaj23) ProtoMessage() {}
|
||||
func (*VoteSetMaj23) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{7}
|
||||
}
|
||||
func (m *VoteSetMaj23) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VoteSetMaj23.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VoteSetMaj23) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VoteSetMaj23.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VoteSetMaj23) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VoteSetMaj23.Merge(m, src)
|
||||
}
|
||||
func (m *VoteSetMaj23) XXX_Size() int {
|
||||
return xxx_messageInfo_VoteSetMaj23.Size(m)
|
||||
}
|
||||
func (m *VoteSetMaj23) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VoteSetMaj23.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VoteSetMaj23 proto.InternalMessageInfo
|
||||
|
||||
func (m *VoteSetMaj23) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VoteSetMaj23) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VoteSetMaj23) GetType() types.SignedMsgType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return types.SIGNED_MSG_TYPE_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *VoteSetMaj23) GetBlockID() types.BlockID {
|
||||
if m != nil {
|
||||
return m.BlockID
|
||||
}
|
||||
return types.BlockID{}
|
||||
}
|
||||
|
||||
// VoteSetBitsMessage is sent to communicate the bit-array of votes seen for the BlockID.
|
||||
type VoteSetBits struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Type types.SignedMsgType `protobuf:"varint,3,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
|
||||
BlockID types.BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
|
||||
Votes bits.BitArray `protobuf:"bytes,5,opt,name=votes,proto3" json:"votes"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VoteSetBits) Reset() { *m = VoteSetBits{} }
|
||||
func (m *VoteSetBits) String() string { return proto.CompactTextString(m) }
|
||||
func (*VoteSetBits) ProtoMessage() {}
|
||||
func (*VoteSetBits) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{8}
|
||||
}
|
||||
func (m *VoteSetBits) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VoteSetBits.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VoteSetBits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VoteSetBits.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VoteSetBits) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VoteSetBits.Merge(m, src)
|
||||
}
|
||||
func (m *VoteSetBits) XXX_Size() int {
|
||||
return xxx_messageInfo_VoteSetBits.Size(m)
|
||||
}
|
||||
func (m *VoteSetBits) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VoteSetBits.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VoteSetBits proto.InternalMessageInfo
|
||||
|
||||
func (m *VoteSetBits) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VoteSetBits) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VoteSetBits) GetType() types.SignedMsgType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return types.SIGNED_MSG_TYPE_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *VoteSetBits) GetBlockID() types.BlockID {
|
||||
if m != nil {
|
||||
return m.BlockID
|
||||
}
|
||||
return types.BlockID{}
|
||||
}
|
||||
|
||||
func (m *VoteSetBits) GetVotes() bits.BitArray {
|
||||
if m != nil {
|
||||
return m.Votes
|
||||
}
|
||||
return bits.BitArray{}
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *Message_NewRoundStep
|
||||
// *Message_NewValidBlock
|
||||
// *Message_Proposal
|
||||
// *Message_ProposalPol
|
||||
// *Message_BlockPart
|
||||
// *Message_Vote
|
||||
// *Message_HasVote
|
||||
// *Message_VoteSetMaj23
|
||||
// *Message_VoteSetBits
|
||||
Sum isMessage_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Message) Reset() { *m = Message{} }
|
||||
func (m *Message) String() string { return proto.CompactTextString(m) }
|
||||
func (*Message) ProtoMessage() {}
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9de64017f8b3fc88, []int{9}
|
||||
}
|
||||
func (m *Message) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Message.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Message) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Message.Merge(m, src)
|
||||
}
|
||||
func (m *Message) XXX_Size() int {
|
||||
return xxx_messageInfo_Message.Size(m)
|
||||
}
|
||||
func (m *Message) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Message.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Message proto.InternalMessageInfo
|
||||
|
||||
type isMessage_Sum interface {
|
||||
isMessage_Sum()
|
||||
}
|
||||
|
||||
type Message_NewRoundStep struct {
|
||||
NewRoundStep *NewRoundStep `protobuf:"bytes,1,opt,name=new_round_step,json=newRoundStep,proto3,oneof" json:"new_round_step,omitempty"`
|
||||
}
|
||||
type Message_NewValidBlock struct {
|
||||
NewValidBlock *NewValidBlock `protobuf:"bytes,2,opt,name=new_valid_block,json=newValidBlock,proto3,oneof" json:"new_valid_block,omitempty"`
|
||||
}
|
||||
type Message_Proposal struct {
|
||||
Proposal *Proposal `protobuf:"bytes,3,opt,name=proposal,proto3,oneof" json:"proposal,omitempty"`
|
||||
}
|
||||
type Message_ProposalPol struct {
|
||||
ProposalPol *ProposalPOL `protobuf:"bytes,4,opt,name=proposal_pol,json=proposalPol,proto3,oneof" json:"proposal_pol,omitempty"`
|
||||
}
|
||||
type Message_BlockPart struct {
|
||||
BlockPart *BlockPart `protobuf:"bytes,5,opt,name=block_part,json=blockPart,proto3,oneof" json:"block_part,omitempty"`
|
||||
}
|
||||
type Message_Vote struct {
|
||||
Vote *Vote `protobuf:"bytes,6,opt,name=vote,proto3,oneof" json:"vote,omitempty"`
|
||||
}
|
||||
type Message_HasVote struct {
|
||||
HasVote *HasVote `protobuf:"bytes,7,opt,name=has_vote,json=hasVote,proto3,oneof" json:"has_vote,omitempty"`
|
||||
}
|
||||
type Message_VoteSetMaj23 struct {
|
||||
VoteSetMaj23 *VoteSetMaj23 `protobuf:"bytes,8,opt,name=vote_set_maj23,json=voteSetMaj23,proto3,oneof" json:"vote_set_maj23,omitempty"`
|
||||
}
|
||||
type Message_VoteSetBits struct {
|
||||
VoteSetBits *VoteSetBits `protobuf:"bytes,9,opt,name=vote_set_bits,json=voteSetBits,proto3,oneof" json:"vote_set_bits,omitempty"`
|
||||
}
|
||||
|
||||
func (*Message_NewRoundStep) isMessage_Sum() {}
|
||||
func (*Message_NewValidBlock) isMessage_Sum() {}
|
||||
func (*Message_Proposal) isMessage_Sum() {}
|
||||
func (*Message_ProposalPol) isMessage_Sum() {}
|
||||
func (*Message_BlockPart) isMessage_Sum() {}
|
||||
func (*Message_Vote) isMessage_Sum() {}
|
||||
func (*Message_HasVote) isMessage_Sum() {}
|
||||
func (*Message_VoteSetMaj23) isMessage_Sum() {}
|
||||
func (*Message_VoteSetBits) isMessage_Sum() {}
|
||||
|
||||
func (m *Message) GetSum() isMessage_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetNewRoundStep() *NewRoundStep {
|
||||
if x, ok := m.GetSum().(*Message_NewRoundStep); ok {
|
||||
return x.NewRoundStep
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetNewValidBlock() *NewValidBlock {
|
||||
if x, ok := m.GetSum().(*Message_NewValidBlock); ok {
|
||||
return x.NewValidBlock
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetProposal() *Proposal {
|
||||
if x, ok := m.GetSum().(*Message_Proposal); ok {
|
||||
return x.Proposal
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetProposalPol() *ProposalPOL {
|
||||
if x, ok := m.GetSum().(*Message_ProposalPol); ok {
|
||||
return x.ProposalPol
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetBlockPart() *BlockPart {
|
||||
if x, ok := m.GetSum().(*Message_BlockPart); ok {
|
||||
return x.BlockPart
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetVote() *Vote {
|
||||
if x, ok := m.GetSum().(*Message_Vote); ok {
|
||||
return x.Vote
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetHasVote() *HasVote {
|
||||
if x, ok := m.GetSum().(*Message_HasVote); ok {
|
||||
return x.HasVote
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetVoteSetMaj23() *VoteSetMaj23 {
|
||||
if x, ok := m.GetSum().(*Message_VoteSetMaj23); ok {
|
||||
return x.VoteSetMaj23
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetVoteSetBits() *VoteSetBits {
|
||||
if x, ok := m.GetSum().(*Message_VoteSetBits); ok {
|
||||
return x.VoteSetBits
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Message) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*Message_NewRoundStep)(nil),
|
||||
(*Message_NewValidBlock)(nil),
|
||||
(*Message_Proposal)(nil),
|
||||
(*Message_ProposalPol)(nil),
|
||||
(*Message_BlockPart)(nil),
|
||||
(*Message_Vote)(nil),
|
||||
(*Message_HasVote)(nil),
|
||||
(*Message_VoteSetMaj23)(nil),
|
||||
(*Message_VoteSetBits)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*NewRoundStep)(nil), "tendermint.proto.consensus.NewRoundStep")
|
||||
proto.RegisterType((*NewValidBlock)(nil), "tendermint.proto.consensus.NewValidBlock")
|
||||
proto.RegisterType((*Proposal)(nil), "tendermint.proto.consensus.Proposal")
|
||||
proto.RegisterType((*ProposalPOL)(nil), "tendermint.proto.consensus.ProposalPOL")
|
||||
proto.RegisterType((*BlockPart)(nil), "tendermint.proto.consensus.BlockPart")
|
||||
proto.RegisterType((*Vote)(nil), "tendermint.proto.consensus.Vote")
|
||||
proto.RegisterType((*HasVote)(nil), "tendermint.proto.consensus.HasVote")
|
||||
proto.RegisterType((*VoteSetMaj23)(nil), "tendermint.proto.consensus.VoteSetMaj23")
|
||||
proto.RegisterType((*VoteSetBits)(nil), "tendermint.proto.consensus.VoteSetBits")
|
||||
proto.RegisterType((*Message)(nil), "tendermint.proto.consensus.Message")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/consensus/msgs.proto", fileDescriptor_9de64017f8b3fc88) }
|
||||
|
||||
var fileDescriptor_9de64017f8b3fc88 = []byte{
|
||||
// 833 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6e, 0xeb, 0x44,
|
||||
0x14, 0x8e, 0x6f, 0x93, 0x26, 0x39, 0x4e, 0xda, 0xcb, 0x88, 0x9f, 0x28, 0x17, 0xa9, 0x91, 0xe1,
|
||||
0x42, 0x40, 0xc8, 0xb9, 0x4a, 0x25, 0x7e, 0x76, 0xc5, 0xfc, 0xc8, 0x15, 0x4d, 0x1b, 0x39, 0x55,
|
||||
0x25, 0xd8, 0x58, 0x4e, 0x3c, 0x72, 0x06, 0x62, 0x8f, 0xf1, 0x4c, 0x52, 0xf2, 0x00, 0x48, 0x3c,
|
||||
0x07, 0x6b, 0xb6, 0xbc, 0x01, 0x0b, 0x9e, 0xa2, 0x0b, 0x9e, 0x83, 0x05, 0x9a, 0x9f, 0xc4, 0x6e,
|
||||
0x2b, 0xb7, 0xcd, 0x06, 0xe9, 0x6e, 0xaa, 0x99, 0x39, 0xe7, 0xfb, 0x7c, 0xe6, 0x3b, 0x73, 0xbe,
|
||||
0x06, 0xba, 0x69, 0x46, 0x39, 0x1d, 0xcc, 0x68, 0xc2, 0x70, 0xc2, 0x96, 0x6c, 0x10, 0xb3, 0x88,
|
||||
0xd9, 0xf2, 0x10, 0x75, 0x39, 0x4e, 0x42, 0x9c, 0xc5, 0x24, 0xe1, 0xea, 0xc4, 0xde, 0xa6, 0x75,
|
||||
0x3f, 0xe0, 0x73, 0x92, 0x85, 0x7e, 0x1a, 0x64, 0x7c, 0x3d, 0x50, 0x1c, 0x11, 0x8d, 0x68, 0xbe,
|
||||
0x52, 0x88, 0xee, 0x3b, 0xea, 0x84, 0xaf, 0x53, 0xcc, 0xd4, 0x5f, 0x1d, 0x78, 0xa1, 0x02, 0x0b,
|
||||
0x32, 0x65, 0x83, 0x29, 0xe1, 0xb7, 0x82, 0xd6, 0x9f, 0x06, 0xb4, 0xce, 0xf1, 0xb5, 0x47, 0x97,
|
||||
0x49, 0x38, 0xe1, 0x38, 0x45, 0x6f, 0xc3, 0xfe, 0x1c, 0x93, 0x68, 0xce, 0x3b, 0x46, 0xcf, 0xe8,
|
||||
0xef, 0x79, 0x7a, 0x87, 0xde, 0x84, 0x5a, 0x26, 0x92, 0x3a, 0xcf, 0x7a, 0x46, 0xbf, 0xe6, 0xa9,
|
||||
0x0d, 0x42, 0x50, 0x65, 0x1c, 0xa7, 0x9d, 0xbd, 0x9e, 0xd1, 0x6f, 0x7b, 0x72, 0x8d, 0x3e, 0x83,
|
||||
0x0e, 0xc3, 0x33, 0x9a, 0x84, 0xcc, 0x67, 0x24, 0x99, 0x61, 0x9f, 0xf1, 0x20, 0xe3, 0x3e, 0x27,
|
||||
0x31, 0xee, 0x54, 0x25, 0xe7, 0x5b, 0x3a, 0x3e, 0x11, 0xe1, 0x89, 0x88, 0x5e, 0x92, 0x18, 0xa3,
|
||||
0x8f, 0xe1, 0x8d, 0x45, 0xc0, 0xb8, 0x3f, 0xa3, 0x71, 0x4c, 0xb8, 0xaf, 0x3e, 0x57, 0x93, 0x9f,
|
||||
0x3b, 0x14, 0x81, 0xaf, 0xe4, 0xb9, 0x2c, 0xd5, 0xfa, 0xd7, 0x80, 0xf6, 0x39, 0xbe, 0xbe, 0x0a,
|
||||
0x16, 0x24, 0x74, 0x16, 0x74, 0xf6, 0xd3, 0x8e, 0x85, 0x7f, 0x0f, 0x68, 0x2a, 0x60, 0x52, 0x57,
|
||||
0xe6, 0xcf, 0x71, 0x10, 0xe2, 0x4c, 0x5e, 0xc3, 0x1c, 0xbe, 0xb4, 0xef, 0xb5, 0x43, 0x49, 0x36,
|
||||
0x0e, 0x32, 0x3e, 0xc1, 0xdc, 0x95, 0xc9, 0x4e, 0xf5, 0xef, 0x9b, 0xa3, 0x8a, 0xf7, 0x5c, 0xd2,
|
||||
0x88, 0x08, 0x53, 0xe7, 0xe8, 0x1b, 0x30, 0x0b, 0xd4, 0xf2, 0xca, 0xe6, 0xf0, 0xfd, 0xfb, 0x9c,
|
||||
0xa2, 0x21, 0xb6, 0x68, 0x88, 0xed, 0x10, 0xfe, 0x65, 0x96, 0x05, 0x6b, 0x0f, 0x72, 0x32, 0xf4,
|
||||
0x02, 0x9a, 0x84, 0x69, 0x2d, 0xa4, 0x0a, 0x0d, 0xaf, 0x41, 0x98, 0xd2, 0xc0, 0x3a, 0x87, 0xc6,
|
||||
0x38, 0xa3, 0x29, 0x65, 0xc1, 0x02, 0x39, 0xd0, 0x48, 0xf5, 0x5a, 0x5e, 0xdd, 0x1c, 0xf6, 0x4a,
|
||||
0x2f, 0xa0, 0xf3, 0x74, 0xed, 0x5b, 0x9c, 0xf5, 0xbb, 0x01, 0xe6, 0x26, 0x38, 0xbe, 0x38, 0x2b,
|
||||
0x15, 0xf3, 0x13, 0x40, 0x1b, 0x8c, 0x9f, 0xd2, 0x85, 0x5f, 0x54, 0xf6, 0xf9, 0x26, 0x32, 0xa6,
|
||||
0x0b, 0xd9, 0x24, 0x34, 0x82, 0x56, 0x31, 0x5b, 0xcb, 0xfb, 0x24, 0x29, 0x74, 0x85, 0x66, 0x81,
|
||||
0xd3, 0xfa, 0x19, 0x9a, 0xce, 0x46, 0x9f, 0x1d, 0xdb, 0xfd, 0x29, 0x54, 0x45, 0x37, 0x74, 0x05,
|
||||
0xef, 0x3e, 0xd4, 0x60, 0xfd, 0x65, 0x99, 0x6f, 0x7d, 0x0e, 0xd5, 0x2b, 0xca, 0x31, 0x7a, 0x05,
|
||||
0xd5, 0x15, 0xe5, 0x58, 0xeb, 0x5b, 0x8a, 0x17, 0xb9, 0x9e, 0xcc, 0xb4, 0x7e, 0x33, 0xa0, 0xee,
|
||||
0x06, 0x4c, 0xa2, 0x77, 0xab, 0xf5, 0x0b, 0xa8, 0x0a, 0x36, 0x59, 0xeb, 0x41, 0xf9, 0x63, 0x9c,
|
||||
0x90, 0x28, 0xc1, 0xe1, 0x88, 0x45, 0x97, 0xeb, 0x14, 0x7b, 0x12, 0x22, 0x08, 0x49, 0x12, 0xe2,
|
||||
0x5f, 0xe4, 0xa3, 0x6b, 0x7b, 0x6a, 0x63, 0xfd, 0x65, 0x40, 0x4b, 0xd4, 0x31, 0xc1, 0x7c, 0x14,
|
||||
0xfc, 0x38, 0x3c, 0xfe, 0xff, 0xea, 0xf9, 0x0e, 0x1a, 0x6a, 0x14, 0x48, 0xa8, 0xe7, 0xe0, 0xa8,
|
||||
0x0c, 0x2e, 0x3b, 0x7b, 0xfa, 0xb5, 0x73, 0x28, 0xd4, 0xff, 0xe7, 0xe6, 0xa8, 0xae, 0x0f, 0xbc,
|
||||
0xba, 0x64, 0x38, 0x0d, 0xad, 0x5f, 0x9f, 0x81, 0xa9, 0xaf, 0xe1, 0x10, 0xce, 0x5e, 0xcf, 0x5b,
|
||||
0xa0, 0x13, 0xa8, 0x89, 0xf7, 0xc1, 0xe4, 0x48, 0xef, 0x36, 0x0c, 0x0a, 0x68, 0xfd, 0x51, 0x83,
|
||||
0xfa, 0x08, 0x33, 0x16, 0x44, 0x18, 0x8d, 0xe1, 0x20, 0xc1, 0xd7, 0x6a, 0x0c, 0x7d, 0xe9, 0xc4,
|
||||
0xea, 0x85, 0xf6, 0xed, 0xf2, 0xff, 0x28, 0x76, 0xd1, 0xef, 0xdd, 0x8a, 0xd7, 0x4a, 0x8a, 0xfe,
|
||||
0x3f, 0x81, 0x43, 0xc1, 0xb8, 0x12, 0xc6, 0xea, 0xcb, 0xa2, 0xa5, 0x8e, 0xe6, 0xf0, 0xa3, 0x47,
|
||||
0x28, 0x73, 0x2b, 0x76, 0x2b, 0x5e, 0x3b, 0xb9, 0xe5, 0xcd, 0x45, 0x8b, 0x2a, 0x35, 0x81, 0x9c,
|
||||
0x6d, 0xe3, 0x44, 0x6e, 0xc1, 0xa2, 0xd0, 0xd9, 0x1d, 0x33, 0x51, 0x9d, 0xf8, 0xf0, 0x29, 0x3c,
|
||||
0xe3, 0x8b, 0x33, 0xf7, 0xb6, 0x97, 0xa0, 0x6f, 0x01, 0x72, 0x93, 0xd6, 0xbd, 0x78, 0xf9, 0x10,
|
||||
0xd7, 0xd6, 0x79, 0xdc, 0x8a, 0xd7, 0xdc, 0xda, 0xb4, 0x30, 0x16, 0x69, 0x0c, 0xfb, 0x65, 0xc6,
|
||||
0x9b, 0x33, 0x88, 0xb7, 0xeb, 0x56, 0x94, 0x3d, 0xa0, 0x13, 0x68, 0xcc, 0x03, 0xe6, 0x4b, 0x6c,
|
||||
0x5d, 0x62, 0xdf, 0x7b, 0x08, 0xab, 0x9d, 0xc4, 0xad, 0x78, 0xf5, 0xb9, 0x36, 0x95, 0x31, 0x1c,
|
||||
0x08, 0xb4, 0xcf, 0x30, 0xf7, 0x63, 0x31, 0xd6, 0x9d, 0xc6, 0xe3, 0xad, 0x2f, 0xda, 0x80, 0x68,
|
||||
0xfd, 0xaa, 0x68, 0x0b, 0x23, 0x68, 0x6f, 0x19, 0xc5, 0xfb, 0xeb, 0x34, 0x1f, 0x97, 0xb8, 0x30,
|
||||
0x90, 0x42, 0xe2, 0x55, 0xbe, 0x75, 0x6a, 0xb0, 0xc7, 0x96, 0xb1, 0x33, 0xfc, 0xe1, 0x55, 0x44,
|
||||
0xf8, 0x7c, 0x39, 0xb5, 0x67, 0x34, 0x1e, 0xe4, 0x54, 0xc5, 0xe5, 0x9d, 0x9f, 0x46, 0xd3, 0x7d,
|
||||
0x79, 0x70, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xae, 0x4b, 0x4c, 0x2a, 0x34, 0x09, 0x00,
|
||||
0x00,
|
||||
}
|
||||
92
proto/consensus/msgs.proto
Normal file
92
proto/consensus/msgs.proto
Normal file
@@ -0,0 +1,92 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.consensus;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/consensus";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/types/types.proto";
|
||||
import "proto/libs/bits/types.proto";
|
||||
|
||||
// NewRoundStepMessage is sent for every step taken in the ConsensusState.
|
||||
// For every height/round/step transition
|
||||
message NewRoundStep {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
uint32 step = 3;
|
||||
int64 seconds_since_start_time = 4;
|
||||
int32 last_commit_round = 5;
|
||||
}
|
||||
|
||||
// NewValidBlockMessage is sent when a validator observes a valid block B in some round r,
|
||||
//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r.
|
||||
// In case the block is also committed, then IsCommit flag is set to true.
|
||||
message NewValidBlock {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
tendermint.proto.types.PartSetHeader block_parts_header = 3 [(gogoproto.nullable) = false];
|
||||
tendermint.proto.libs.bits.BitArray block_parts = 4;
|
||||
bool is_commit = 5;
|
||||
}
|
||||
|
||||
// ProposalMessage is sent when a new block is proposed.
|
||||
message Proposal {
|
||||
tendermint.proto.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ProposalPOLMessage is sent when a previous proposal is re-proposed.
|
||||
message ProposalPOL {
|
||||
int64 height = 1;
|
||||
int32 proposal_pol_round = 2;
|
||||
tendermint.proto.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// BlockPartMessage is sent when gossipping a piece of the proposed block.
|
||||
message BlockPart {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
tendermint.proto.types.Part part = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// VoteMessage is sent when voting for a proposal (or lack thereof).
|
||||
message Vote {
|
||||
tendermint.proto.types.Vote vote = 1;
|
||||
}
|
||||
|
||||
// HasVoteMessage is sent to indicate that a particular vote has been received.
|
||||
message HasVote {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
tendermint.proto.types.SignedMsgType type = 3;
|
||||
uint32 index = 4;
|
||||
}
|
||||
|
||||
// VoteSetMaj23Message is sent to indicate that a given BlockID has seen +2/3 votes.
|
||||
message VoteSetMaj23 {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
tendermint.proto.types.SignedMsgType type = 3;
|
||||
tendermint.proto.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// VoteSetBitsMessage is sent to communicate the bit-array of votes seen for the BlockID.
|
||||
message VoteSetBits {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
tendermint.proto.types.SignedMsgType type = 3;
|
||||
tendermint.proto.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
|
||||
tendermint.proto.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message Message {
|
||||
oneof sum {
|
||||
NewRoundStep new_round_step = 1;
|
||||
NewValidBlock new_valid_block = 2;
|
||||
Proposal proposal = 3;
|
||||
ProposalPOL proposal_pol = 4;
|
||||
BlockPart block_part = 5;
|
||||
Vote vote = 6;
|
||||
HasVote has_vote = 7;
|
||||
VoteSetMaj23 vote_set_maj23 = 8;
|
||||
VoteSetBits vote_set_bits = 9;
|
||||
}
|
||||
}
|
||||
374
proto/consensus/walmsgs.pb.go
Normal file
374
proto/consensus/walmsgs.pb.go
Normal file
@@ -0,0 +1,374 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/consensus/walmsgs.proto
|
||||
|
||||
package consensus
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/golang/protobuf/ptypes/duration"
|
||||
_ "github.com/golang/protobuf/ptypes/timestamp"
|
||||
types "github.com/tendermint/tendermint/proto/types"
|
||||
math "math"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// MsgInfo are msgs from the reactor which may update the state
|
||||
type MsgInfo struct {
|
||||
Msg Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
|
||||
PeerID string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MsgInfo) Reset() { *m = MsgInfo{} }
|
||||
func (m *MsgInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInfo) ProtoMessage() {}
|
||||
func (*MsgInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_60ad80fa14e37285, []int{0}
|
||||
}
|
||||
func (m *MsgInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MsgInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MsgInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MsgInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInfo.Merge(m, src)
|
||||
}
|
||||
func (m *MsgInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_MsgInfo.Size(m)
|
||||
}
|
||||
func (m *MsgInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgInfo) GetMsg() Message {
|
||||
if m != nil {
|
||||
return m.Msg
|
||||
}
|
||||
return Message{}
|
||||
}
|
||||
|
||||
func (m *MsgInfo) GetPeerID() string {
|
||||
if m != nil {
|
||||
return m.PeerID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// TimeoutInfo internally generated messages which may update the state
|
||||
type TimeoutInfo struct {
|
||||
Duration time.Duration `protobuf:"bytes,1,opt,name=duration,proto3,stdduration" json:"duration"`
|
||||
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Step uint32 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TimeoutInfo) Reset() { *m = TimeoutInfo{} }
|
||||
func (m *TimeoutInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*TimeoutInfo) ProtoMessage() {}
|
||||
func (*TimeoutInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_60ad80fa14e37285, []int{1}
|
||||
}
|
||||
func (m *TimeoutInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TimeoutInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *TimeoutInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_TimeoutInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *TimeoutInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TimeoutInfo.Merge(m, src)
|
||||
}
|
||||
func (m *TimeoutInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_TimeoutInfo.Size(m)
|
||||
}
|
||||
func (m *TimeoutInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TimeoutInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TimeoutInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *TimeoutInfo) GetDuration() time.Duration {
|
||||
if m != nil {
|
||||
return m.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TimeoutInfo) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TimeoutInfo) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *TimeoutInfo) GetStep() uint32 {
|
||||
if m != nil {
|
||||
return m.Step
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// EndHeightMessage marks the end of the given height inside WAL.
|
||||
// @internal used by scripts/wal2json util.
|
||||
type EndHeight struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *EndHeight) Reset() { *m = EndHeight{} }
|
||||
func (m *EndHeight) String() string { return proto.CompactTextString(m) }
|
||||
func (*EndHeight) ProtoMessage() {}
|
||||
func (*EndHeight) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_60ad80fa14e37285, []int{2}
|
||||
}
|
||||
func (m *EndHeight) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EndHeight.Unmarshal(m, b)
|
||||
}
|
||||
func (m *EndHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_EndHeight.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *EndHeight) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_EndHeight.Merge(m, src)
|
||||
}
|
||||
func (m *EndHeight) XXX_Size() int {
|
||||
return xxx_messageInfo_EndHeight.Size(m)
|
||||
}
|
||||
func (m *EndHeight) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_EndHeight.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_EndHeight proto.InternalMessageInfo
|
||||
|
||||
func (m *EndHeight) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type WALMessage struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *WALMessage_EventDataRoundState
|
||||
// *WALMessage_MsgInfo
|
||||
// *WALMessage_TimeoutInfo
|
||||
// *WALMessage_EndHeight
|
||||
Sum isWALMessage_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *WALMessage) Reset() { *m = WALMessage{} }
|
||||
func (m *WALMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*WALMessage) ProtoMessage() {}
|
||||
func (*WALMessage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_60ad80fa14e37285, []int{3}
|
||||
}
|
||||
func (m *WALMessage) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_WALMessage.Unmarshal(m, b)
|
||||
}
|
||||
func (m *WALMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_WALMessage.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *WALMessage) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_WALMessage.Merge(m, src)
|
||||
}
|
||||
func (m *WALMessage) XXX_Size() int {
|
||||
return xxx_messageInfo_WALMessage.Size(m)
|
||||
}
|
||||
func (m *WALMessage) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_WALMessage.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_WALMessage proto.InternalMessageInfo
|
||||
|
||||
type isWALMessage_Sum interface {
|
||||
isWALMessage_Sum()
|
||||
}
|
||||
|
||||
type WALMessage_EventDataRoundState struct {
|
||||
EventDataRoundState *types.EventDataRoundState `protobuf:"bytes,1,opt,name=event_data_round_state,json=eventDataRoundState,proto3,oneof" json:"event_data_round_state,omitempty"`
|
||||
}
|
||||
type WALMessage_MsgInfo struct {
|
||||
MsgInfo *MsgInfo `protobuf:"bytes,2,opt,name=msg_info,json=msgInfo,proto3,oneof" json:"msg_info,omitempty"`
|
||||
}
|
||||
type WALMessage_TimeoutInfo struct {
|
||||
TimeoutInfo *TimeoutInfo `protobuf:"bytes,3,opt,name=timeout_info,json=timeoutInfo,proto3,oneof" json:"timeout_info,omitempty"`
|
||||
}
|
||||
type WALMessage_EndHeight struct {
|
||||
EndHeight *EndHeight `protobuf:"bytes,4,opt,name=end_height,json=endHeight,proto3,oneof" json:"end_height,omitempty"`
|
||||
}
|
||||
|
||||
func (*WALMessage_EventDataRoundState) isWALMessage_Sum() {}
|
||||
func (*WALMessage_MsgInfo) isWALMessage_Sum() {}
|
||||
func (*WALMessage_TimeoutInfo) isWALMessage_Sum() {}
|
||||
func (*WALMessage_EndHeight) isWALMessage_Sum() {}
|
||||
|
||||
func (m *WALMessage) GetSum() isWALMessage_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *WALMessage) GetEventDataRoundState() *types.EventDataRoundState {
|
||||
if x, ok := m.GetSum().(*WALMessage_EventDataRoundState); ok {
|
||||
return x.EventDataRoundState
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *WALMessage) GetMsgInfo() *MsgInfo {
|
||||
if x, ok := m.GetSum().(*WALMessage_MsgInfo); ok {
|
||||
return x.MsgInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *WALMessage) GetTimeoutInfo() *TimeoutInfo {
|
||||
if x, ok := m.GetSum().(*WALMessage_TimeoutInfo); ok {
|
||||
return x.TimeoutInfo
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *WALMessage) GetEndHeight() *EndHeight {
|
||||
if x, ok := m.GetSum().(*WALMessage_EndHeight); ok {
|
||||
return x.EndHeight
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*WALMessage) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*WALMessage_EventDataRoundState)(nil),
|
||||
(*WALMessage_MsgInfo)(nil),
|
||||
(*WALMessage_TimeoutInfo)(nil),
|
||||
(*WALMessage_EndHeight)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
// TimedWALMessage wraps WALMessage and adds Time for debugging purposes.
|
||||
type TimedWALMessage struct {
|
||||
Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"`
|
||||
Msg *WALMessage `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TimedWALMessage) Reset() { *m = TimedWALMessage{} }
|
||||
func (m *TimedWALMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*TimedWALMessage) ProtoMessage() {}
|
||||
func (*TimedWALMessage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_60ad80fa14e37285, []int{4}
|
||||
}
|
||||
func (m *TimedWALMessage) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TimedWALMessage.Unmarshal(m, b)
|
||||
}
|
||||
func (m *TimedWALMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_TimedWALMessage.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *TimedWALMessage) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TimedWALMessage.Merge(m, src)
|
||||
}
|
||||
func (m *TimedWALMessage) XXX_Size() int {
|
||||
return xxx_messageInfo_TimedWALMessage.Size(m)
|
||||
}
|
||||
func (m *TimedWALMessage) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TimedWALMessage.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TimedWALMessage proto.InternalMessageInfo
|
||||
|
||||
func (m *TimedWALMessage) GetTime() time.Time {
|
||||
if m != nil {
|
||||
return m.Time
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *TimedWALMessage) GetMsg() *WALMessage {
|
||||
if m != nil {
|
||||
return m.Msg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgInfo)(nil), "tendermint.proto.consensus.MsgInfo")
|
||||
proto.RegisterType((*TimeoutInfo)(nil), "tendermint.proto.consensus.TimeoutInfo")
|
||||
proto.RegisterType((*EndHeight)(nil), "tendermint.proto.consensus.EndHeight")
|
||||
proto.RegisterType((*WALMessage)(nil), "tendermint.proto.consensus.WALMessage")
|
||||
proto.RegisterType((*TimedWALMessage)(nil), "tendermint.proto.consensus.TimedWALMessage")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/consensus/walmsgs.proto", fileDescriptor_60ad80fa14e37285) }
|
||||
|
||||
var fileDescriptor_60ad80fa14e37285 = []byte{
|
||||
// 528 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xcd, 0x8a, 0x13, 0x41,
|
||||
0x10, 0xce, 0x6c, 0xb2, 0xf9, 0xa9, 0x28, 0xc2, 0x28, 0x4b, 0x1c, 0xd0, 0x84, 0x04, 0xd7, 0x80,
|
||||
0x30, 0x23, 0xeb, 0x65, 0xc1, 0x83, 0x1a, 0xb2, 0x92, 0xc0, 0x2e, 0x48, 0xbb, 0x20, 0x78, 0x19,
|
||||
0x26, 0x3b, 0x95, 0xce, 0xe0, 0x76, 0xf7, 0x30, 0x5d, 0xa3, 0xec, 0x03, 0x78, 0xdf, 0xa3, 0x8f,
|
||||
0xe4, 0xcd, 0x37, 0x58, 0xc1, 0x27, 0x91, 0xe9, 0x9e, 0xfc, 0x90, 0x60, 0xbc, 0x75, 0x57, 0xf5,
|
||||
0xf7, 0x7d, 0x55, 0xf5, 0x55, 0xc3, 0x93, 0x34, 0x53, 0xa4, 0x82, 0x2b, 0x25, 0x35, 0x4a, 0x9d,
|
||||
0xeb, 0xe0, 0x5b, 0x74, 0x2d, 0x34, 0xd7, 0xbe, 0x89, 0xbb, 0x1e, 0xa1, 0x8c, 0x31, 0x13, 0x89,
|
||||
0x24, 0x1b, 0xf1, 0x57, 0x2f, 0xbd, 0x63, 0x5a, 0x24, 0x59, 0x1c, 0xa6, 0x51, 0x46, 0x37, 0x81,
|
||||
0xa5, 0xe1, 0x8a, 0xab, 0xf5, 0xc9, 0x22, 0x3c, 0x6f, 0x5b, 0x62, 0xcd, 0xef, 0x75, 0x6c, 0x8e,
|
||||
0x6e, 0x52, 0xd4, 0x01, 0x7e, 0x45, 0x49, 0xcb, 0xcc, 0x53, 0xae, 0x14, 0xbf, 0x46, 0x4b, 0x3c,
|
||||
0xcb, 0xe7, 0x41, 0x9c, 0x67, 0x11, 0x25, 0x4a, 0x96, 0xf9, 0xee, 0x76, 0x9e, 0x12, 0x81, 0x9a,
|
||||
0x22, 0x91, 0xda, 0x07, 0xfd, 0x2f, 0xd0, 0xb8, 0xd0, 0x7c, 0x2a, 0xe7, 0xca, 0x7d, 0x0d, 0x55,
|
||||
0xa1, 0x79, 0xc7, 0xe9, 0x39, 0xc3, 0xf6, 0xc9, 0xc0, 0xff, 0x77, 0x4f, 0xfe, 0x05, 0x6a, 0x1d,
|
||||
0x71, 0x1c, 0xd5, 0x7e, 0xde, 0x75, 0x2b, 0xac, 0x40, 0xb9, 0x03, 0x68, 0xa4, 0x88, 0x59, 0x98,
|
||||
0xc4, 0x9d, 0x83, 0x9e, 0x33, 0x6c, 0x8d, 0xe0, 0xcf, 0x5d, 0xb7, 0xfe, 0x01, 0x31, 0x9b, 0x8e,
|
||||
0x59, 0xbd, 0x48, 0x4d, 0xe3, 0xfe, 0xad, 0x03, 0xed, 0xcb, 0x44, 0xa0, 0xca, 0xc9, 0x28, 0xbe,
|
||||
0x81, 0xe6, 0xb2, 0xde, 0x52, 0xf6, 0xb1, 0x6f, 0x0b, 0xf6, 0x97, 0x05, 0xfb, 0xe3, 0xf2, 0xc1,
|
||||
0xa8, 0x59, 0x88, 0xfd, 0xf8, 0xdd, 0x75, 0xd8, 0x0a, 0xe4, 0x1e, 0x41, 0x7d, 0x81, 0x09, 0x5f,
|
||||
0x90, 0x11, 0xad, 0xb2, 0xf2, 0xe6, 0x3e, 0x82, 0xc3, 0x4c, 0xe5, 0x32, 0xee, 0x54, 0x7b, 0xce,
|
||||
0xf0, 0x90, 0xd9, 0x8b, 0xeb, 0x42, 0x4d, 0x13, 0xa6, 0x9d, 0x5a, 0xcf, 0x19, 0xde, 0x67, 0xe6,
|
||||
0xdc, 0x1f, 0x40, 0xeb, 0x4c, 0xc6, 0x13, 0x0b, 0x5b, 0xd3, 0x39, 0x9b, 0x74, 0xfd, 0x5f, 0x07,
|
||||
0x00, 0x9f, 0xde, 0x9d, 0x97, 0x6d, 0xbb, 0x33, 0x38, 0x32, 0x26, 0x84, 0x71, 0x44, 0x51, 0x68,
|
||||
0xb8, 0x43, 0x4d, 0x11, 0x61, 0xd9, 0xc4, 0x8b, 0xdd, 0xd9, 0x19, 0xeb, 0xfc, 0xb3, 0x02, 0x35,
|
||||
0x8e, 0x28, 0x62, 0x05, 0xe6, 0x63, 0x01, 0x99, 0x54, 0xd8, 0x43, 0xdc, 0x0d, 0xbb, 0x6f, 0xa1,
|
||||
0x29, 0x34, 0x0f, 0x13, 0x39, 0x57, 0xa6, 0xb7, 0xff, 0x39, 0x62, 0x3d, 0x9c, 0x54, 0x58, 0x43,
|
||||
0x94, 0x76, 0x9e, 0xc3, 0x3d, 0xb2, 0xb3, 0xb6, 0x2c, 0x55, 0xc3, 0xf2, 0x7c, 0x1f, 0xcb, 0x86,
|
||||
0x37, 0x93, 0x0a, 0x6b, 0xd3, 0x86, 0x55, 0xef, 0x01, 0x50, 0xc6, 0x61, 0x39, 0x9e, 0x9a, 0xe1,
|
||||
0x7a, 0xb6, 0x8f, 0x6b, 0x35, 0xd5, 0x49, 0x85, 0xb5, 0x70, 0x79, 0x19, 0x1d, 0x42, 0x55, 0xe7,
|
||||
0xa2, 0xff, 0xdd, 0x81, 0x07, 0x85, 0x5a, 0xbc, 0x31, 0xd6, 0x53, 0xa8, 0x15, 0x8a, 0xe5, 0x10,
|
||||
0xbd, 0x9d, 0x4d, 0xb8, 0x5c, 0xae, 0xae, 0x5d, 0x85, 0xdb, 0x62, 0x15, 0x0c, 0xc2, 0x3d, 0xb5,
|
||||
0x9b, 0x6b, 0xe7, 0x74, 0xbc, 0xaf, 0xaa, 0xb5, 0x9c, 0x59, 0xdb, 0xd1, 0xc9, 0xe7, 0x97, 0x3c,
|
||||
0xa1, 0x45, 0x3e, 0xf3, 0xaf, 0x94, 0x08, 0xd6, 0xc0, 0xcd, 0xe3, 0xd6, 0xc7, 0x9c, 0xd5, 0x4d,
|
||||
0xe0, 0xd5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x7e, 0x02, 0x98, 0x15, 0x04, 0x00, 0x00,
|
||||
}
|
||||
46
proto/consensus/walmsgs.proto
Normal file
46
proto/consensus/walmsgs.proto
Normal file
@@ -0,0 +1,46 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.consensus;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/consensus";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/consensus/msgs.proto";
|
||||
import "proto/types/events.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// MsgInfo are msgs from the reactor which may update the state
|
||||
message MsgInfo {
|
||||
Message msg = 1 [(gogoproto.nullable) = false];
|
||||
string peer_id = 2 [(gogoproto.customname) = "PeerID"];
|
||||
}
|
||||
|
||||
// TimeoutInfo internally generated messages which may update the state
|
||||
message TimeoutInfo {
|
||||
google.protobuf.Duration duration = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
|
||||
int64 height = 2;
|
||||
int32 round = 3;
|
||||
uint32 step = 4;
|
||||
}
|
||||
|
||||
// EndHeightMessage marks the end of the given height inside WAL.
|
||||
// @internal used by scripts/wal2json util.
|
||||
message EndHeight {
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
message WALMessage {
|
||||
oneof sum {
|
||||
tendermint.proto.types.EventDataRoundState event_data_round_state = 1;
|
||||
MsgInfo msg_info = 2;
|
||||
TimeoutInfo timeout_info = 3;
|
||||
EndHeight end_height = 4;
|
||||
}
|
||||
}
|
||||
|
||||
// TimedWALMessage wraps WALMessage and adds Time for debugging purposes.
|
||||
message TimedWALMessage {
|
||||
google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
WALMessage msg = 2;
|
||||
}
|
||||
328
proto/crypto/keys/types.pb.go
Normal file
328
proto/crypto/keys/types.pb.go
Normal file
@@ -0,0 +1,328 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/crypto/keys/types.proto
|
||||
|
||||
package keys
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// PublicKey defines the keys available for use with Tendermint Validators
|
||||
type PublicKey struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *PublicKey_Ed25519
|
||||
Sum isPublicKey_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PublicKey) Reset() { *m = PublicKey{} }
|
||||
func (m *PublicKey) String() string { return proto.CompactTextString(m) }
|
||||
func (*PublicKey) ProtoMessage() {}
|
||||
func (*PublicKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_943d79b57ec0188f, []int{0}
|
||||
}
|
||||
func (m *PublicKey) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PublicKey.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PublicKey) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PublicKey.Merge(m, src)
|
||||
}
|
||||
func (m *PublicKey) XXX_Size() int {
|
||||
return xxx_messageInfo_PublicKey.Size(m)
|
||||
}
|
||||
func (m *PublicKey) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PublicKey.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PublicKey proto.InternalMessageInfo
|
||||
|
||||
type isPublicKey_Sum interface {
|
||||
isPublicKey_Sum()
|
||||
Equal(interface{}) bool
|
||||
Compare(interface{}) int
|
||||
}
|
||||
|
||||
type PublicKey_Ed25519 struct {
|
||||
Ed25519 []byte `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"`
|
||||
}
|
||||
|
||||
func (*PublicKey_Ed25519) isPublicKey_Sum() {}
|
||||
|
||||
func (m *PublicKey) GetSum() isPublicKey_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PublicKey) GetEd25519() []byte {
|
||||
if x, ok := m.GetSum().(*PublicKey_Ed25519); ok {
|
||||
return x.Ed25519
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*PublicKey) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*PublicKey_Ed25519)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
// PrivateKey defines the keys available for use with Tendermint Validators
|
||||
// WARNING PrivateKey is used for internal purposes only
|
||||
type PrivateKey struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *PrivateKey_Ed25519
|
||||
Sum isPrivateKey_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PrivateKey) Reset() { *m = PrivateKey{} }
|
||||
func (m *PrivateKey) String() string { return proto.CompactTextString(m) }
|
||||
func (*PrivateKey) ProtoMessage() {}
|
||||
func (*PrivateKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_943d79b57ec0188f, []int{1}
|
||||
}
|
||||
func (m *PrivateKey) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PrivateKey.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PrivateKey.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PrivateKey) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PrivateKey.Merge(m, src)
|
||||
}
|
||||
func (m *PrivateKey) XXX_Size() int {
|
||||
return xxx_messageInfo_PrivateKey.Size(m)
|
||||
}
|
||||
func (m *PrivateKey) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PrivateKey.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PrivateKey proto.InternalMessageInfo
|
||||
|
||||
type isPrivateKey_Sum interface {
|
||||
isPrivateKey_Sum()
|
||||
}
|
||||
|
||||
type PrivateKey_Ed25519 struct {
|
||||
Ed25519 []byte `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"`
|
||||
}
|
||||
|
||||
func (*PrivateKey_Ed25519) isPrivateKey_Sum() {}
|
||||
|
||||
func (m *PrivateKey) GetSum() isPrivateKey_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PrivateKey) GetEd25519() []byte {
|
||||
if x, ok := m.GetSum().(*PrivateKey_Ed25519); ok {
|
||||
return x.Ed25519
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*PrivateKey) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*PrivateKey_Ed25519)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PublicKey)(nil), "tendermint.proto.crypto.keys.PublicKey")
|
||||
proto.RegisterType((*PrivateKey)(nil), "tendermint.proto.crypto.keys.PrivateKey")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/crypto/keys/types.proto", fileDescriptor_943d79b57ec0188f) }
|
||||
|
||||
var fileDescriptor_943d79b57ec0188f = []byte{
|
||||
// 190 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2f, 0xa9,
|
||||
0x2c, 0x48, 0x2d, 0xd6, 0x03, 0x8b, 0x0b, 0xc9, 0x94, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66,
|
||||
0xe6, 0x95, 0x40, 0x44, 0xf4, 0x20, 0x2a, 0xf5, 0x40, 0x2a, 0xa5, 0xd4, 0x4a, 0x32, 0x32, 0x8b,
|
||||
0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0x21, 0x06, 0xa5, 0xe7, 0xa7, 0xe7, 0x23, 0x58,
|
||||
0x10, 0x3d, 0x4a, 0x16, 0x5c, 0x9c, 0x01, 0xa5, 0x49, 0x39, 0x99, 0xc9, 0xde, 0xa9, 0x95, 0x42,
|
||||
0x52, 0x5c, 0xec, 0xa9, 0x29, 0x46, 0xa6, 0xa6, 0x86, 0x96, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c,
|
||||
0x1e, 0x0c, 0x41, 0x30, 0x01, 0x2b, 0x8e, 0x17, 0x0b, 0xe4, 0x19, 0x5f, 0x2c, 0x94, 0x67, 0x74,
|
||||
0x62, 0xe5, 0x62, 0x2e, 0x2e, 0xcd, 0x55, 0xd2, 0xe7, 0xe2, 0x0a, 0x28, 0xca, 0x2c, 0x4b, 0x2c,
|
||||
0x49, 0x25, 0xa0, 0x15, 0xaa, 0xc1, 0xc9, 0x24, 0xca, 0x28, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49,
|
||||
0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe1, 0x7a, 0x64, 0x26, 0x86, 0x97, 0x93, 0xd8, 0xc0, 0x42, 0xc6,
|
||||
0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xcf, 0x02, 0x32, 0x0e, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *PublicKey) Compare(that interface{}) int {
|
||||
if that == nil {
|
||||
if this == nil {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
that1, ok := that.(*PublicKey)
|
||||
if !ok {
|
||||
that2, ok := that.(PublicKey)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
} else if this == nil {
|
||||
return -1
|
||||
}
|
||||
if that1.Sum == nil {
|
||||
if this.Sum != nil {
|
||||
return 1
|
||||
}
|
||||
} else if this.Sum == nil {
|
||||
return -1
|
||||
} else {
|
||||
thisType := -1
|
||||
switch this.Sum.(type) {
|
||||
case *PublicKey_Ed25519:
|
||||
thisType = 0
|
||||
default:
|
||||
panic(fmt.Sprintf("compare: unexpected type %T in oneof", this.Sum))
|
||||
}
|
||||
that1Type := -1
|
||||
switch that1.Sum.(type) {
|
||||
case *PublicKey_Ed25519:
|
||||
that1Type = 0
|
||||
default:
|
||||
panic(fmt.Sprintf("compare: unexpected type %T in oneof", that1.Sum))
|
||||
}
|
||||
if thisType == that1Type {
|
||||
if c := this.Sum.Compare(that1.Sum); c != 0 {
|
||||
return c
|
||||
}
|
||||
} else if thisType < that1Type {
|
||||
return -1
|
||||
} else if thisType > that1Type {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
|
||||
return c
|
||||
}
|
||||
return 0
|
||||
}
|
||||
func (this *PublicKey_Ed25519) Compare(that interface{}) int {
|
||||
if that == nil {
|
||||
if this == nil {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
that1, ok := that.(*PublicKey_Ed25519)
|
||||
if !ok {
|
||||
that2, ok := that.(PublicKey_Ed25519)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
if this == nil {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
} else if this == nil {
|
||||
return -1
|
||||
}
|
||||
if c := bytes.Compare(this.Ed25519, that1.Ed25519); c != 0 {
|
||||
return c
|
||||
}
|
||||
return 0
|
||||
}
|
||||
func (this *PublicKey) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*PublicKey)
|
||||
if !ok {
|
||||
that2, ok := that.(PublicKey)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if that1.Sum == nil {
|
||||
if this.Sum != nil {
|
||||
return false
|
||||
}
|
||||
} else if this.Sum == nil {
|
||||
return false
|
||||
} else if !this.Sum.Equal(that1.Sum) {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *PublicKey_Ed25519) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*PublicKey_Ed25519)
|
||||
if !ok {
|
||||
that2, ok := that.(PublicKey_Ed25519)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.Ed25519, that1.Ed25519) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
24
proto/crypto/keys/types.proto
Normal file
24
proto/crypto/keys/types.proto
Normal file
@@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.crypto.keys;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/crypto/keys";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
|
||||
// PublicKey defines the keys available for use with Tendermint Validators
|
||||
message PublicKey {
|
||||
option (gogoproto.compare) = true;
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
oneof sum {
|
||||
bytes ed25519 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// PrivateKey defines the keys available for use with Tendermint Validators
|
||||
// WARNING PrivateKey is used for internal purposes only
|
||||
message PrivateKey {
|
||||
oneof sum {
|
||||
bytes ed25519 = 1;
|
||||
}
|
||||
}
|
||||
105
proto/crypto/merkle/types.pb.go
Normal file
105
proto/crypto/merkle/types.pb.go
Normal file
@@ -0,0 +1,105 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/crypto/merkle/types.proto
|
||||
|
||||
package merkle
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type SimpleProof struct {
|
||||
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
|
||||
LeafHash []byte `protobuf:"bytes,3,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"`
|
||||
Aunts [][]byte `protobuf:"bytes,4,rep,name=aunts,proto3" json:"aunts,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SimpleProof) Reset() { *m = SimpleProof{} }
|
||||
func (m *SimpleProof) String() string { return proto.CompactTextString(m) }
|
||||
func (*SimpleProof) ProtoMessage() {}
|
||||
func (*SimpleProof) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_57e39eefdaf7ae96, []int{0}
|
||||
}
|
||||
func (m *SimpleProof) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SimpleProof.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SimpleProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SimpleProof.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SimpleProof) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SimpleProof.Merge(m, src)
|
||||
}
|
||||
func (m *SimpleProof) XXX_Size() int {
|
||||
return xxx_messageInfo_SimpleProof.Size(m)
|
||||
}
|
||||
func (m *SimpleProof) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SimpleProof.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SimpleProof proto.InternalMessageInfo
|
||||
|
||||
func (m *SimpleProof) GetTotal() int64 {
|
||||
if m != nil {
|
||||
return m.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SimpleProof) GetIndex() int64 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SimpleProof) GetLeafHash() []byte {
|
||||
if m != nil {
|
||||
return m.LeafHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SimpleProof) GetAunts() [][]byte {
|
||||
if m != nil {
|
||||
return m.Aunts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*SimpleProof)(nil), "tendermint.proto.crypto.merkle.SimpleProof")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/crypto/merkle/types.proto", fileDescriptor_57e39eefdaf7ae96) }
|
||||
|
||||
var fileDescriptor_57e39eefdaf7ae96 = []byte{
|
||||
// 188 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0xcf, 0x4d, 0x2d, 0xca, 0xce, 0x49, 0xd5,
|
||||
0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x03, 0xcb, 0x08, 0xc9, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16,
|
||||
0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4, 0x20, 0x6a, 0xf5, 0x20, 0x6a, 0x95, 0x72, 0xb8, 0xb8,
|
||||
0x83, 0x33, 0x73, 0x0b, 0x72, 0x52, 0x03, 0x8a, 0xf2, 0xf3, 0xd3, 0x84, 0x44, 0xb8, 0x58, 0x4b,
|
||||
0xf2, 0x4b, 0x12, 0x73, 0x24, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x20, 0x1c, 0x90, 0x68, 0x66,
|
||||
0x5e, 0x4a, 0x6a, 0x85, 0x04, 0x13, 0x44, 0x14, 0xcc, 0x11, 0x92, 0xe6, 0xe2, 0xcc, 0x49, 0x4d,
|
||||
0x4c, 0x8b, 0xcf, 0x48, 0x2c, 0xce, 0x90, 0x60, 0x56, 0x60, 0xd4, 0xe0, 0x09, 0xe2, 0x00, 0x09,
|
||||
0x78, 0x24, 0x16, 0x67, 0x80, 0xb4, 0x24, 0x96, 0xe6, 0x95, 0x14, 0x4b, 0xb0, 0x28, 0x30, 0x6b,
|
||||
0xf0, 0x04, 0x41, 0x38, 0x4e, 0x66, 0x51, 0x26, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9,
|
||||
0xf9, 0xb9, 0xfa, 0x08, 0xa7, 0x21, 0x33, 0xb1, 0xf8, 0x28, 0x89, 0x0d, 0x2c, 0x68, 0x0c, 0x08,
|
||||
0x00, 0x00, 0xff, 0xff, 0x4f, 0x08, 0x9a, 0xf1, 0xef, 0x00, 0x00, 0x00,
|
||||
}
|
||||
11
proto/crypto/merkle/types.proto
Normal file
11
proto/crypto/merkle/types.proto
Normal file
@@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.crypto.merkle;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/crypto/merkle";
|
||||
|
||||
message SimpleProof {
|
||||
int64 total = 1;
|
||||
int64 index = 2;
|
||||
bytes leaf_hash = 3;
|
||||
repeated bytes aunts = 4;
|
||||
}
|
||||
86
proto/libs/bits/types.pb.go
Normal file
86
proto/libs/bits/types.pb.go
Normal file
@@ -0,0 +1,86 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/libs/bits/types.proto
|
||||
|
||||
package bits
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type BitArray struct {
|
||||
Bits int64 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
|
||||
Elems []uint64 `protobuf:"varint,2,rep,packed,name=elems,proto3" json:"elems,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BitArray) Reset() { *m = BitArray{} }
|
||||
func (m *BitArray) String() string { return proto.CompactTextString(m) }
|
||||
func (*BitArray) ProtoMessage() {}
|
||||
func (*BitArray) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3f1fbe70d7999e09, []int{0}
|
||||
}
|
||||
func (m *BitArray) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BitArray.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BitArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BitArray.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BitArray) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BitArray.Merge(m, src)
|
||||
}
|
||||
func (m *BitArray) XXX_Size() int {
|
||||
return xxx_messageInfo_BitArray.Size(m)
|
||||
}
|
||||
func (m *BitArray) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BitArray.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BitArray proto.InternalMessageInfo
|
||||
|
||||
func (m *BitArray) GetBits() int64 {
|
||||
if m != nil {
|
||||
return m.Bits
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BitArray) GetElems() []uint64 {
|
||||
if m != nil {
|
||||
return m.Elems
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*BitArray)(nil), "tendermint.proto.libs.bits.BitArray")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/libs/bits/types.proto", fileDescriptor_3f1fbe70d7999e09) }
|
||||
|
||||
var fileDescriptor_3f1fbe70d7999e09 = []byte{
|
||||
// 140 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0xcf, 0xc9, 0x4c, 0x2a, 0xd6, 0x4f, 0xca, 0x2c, 0x29, 0xd6, 0x2f, 0xa9, 0x2c, 0x48,
|
||||
0x2d, 0xd6, 0x03, 0x8b, 0x0a, 0x49, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95,
|
||||
0x40, 0x44, 0xf4, 0x40, 0xea, 0xf4, 0x40, 0xea, 0x94, 0x4c, 0xb8, 0x38, 0x9c, 0x32, 0x4b, 0x1c,
|
||||
0x8b, 0x8a, 0x12, 0x2b, 0x85, 0x84, 0xb8, 0x58, 0x40, 0x62, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc,
|
||||
0x41, 0x60, 0xb6, 0x90, 0x08, 0x17, 0x6b, 0x6a, 0x4e, 0x6a, 0x6e, 0xb1, 0x04, 0x93, 0x02, 0xb3,
|
||||
0x06, 0x4b, 0x10, 0x84, 0xe3, 0x64, 0x14, 0x65, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97,
|
||||
0x9c, 0x9f, 0xab, 0x8f, 0x30, 0x1e, 0x99, 0x89, 0xe6, 0xa2, 0x24, 0x36, 0xb0, 0x80, 0x31, 0x20,
|
||||
0x00, 0x00, 0xff, 0xff, 0x49, 0xc4, 0x52, 0x81, 0xab, 0x00, 0x00, 0x00,
|
||||
}
|
||||
9
proto/libs/bits/types.proto
Normal file
9
proto/libs/bits/types.proto
Normal file
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.libs.bits;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/libs/bits";
|
||||
|
||||
message BitArray {
|
||||
int64 bits = 1;
|
||||
repeated uint64 elems = 2;
|
||||
}
|
||||
258
proto/p2p/conn_msgs.pb.go
Normal file
258
proto/p2p/conn_msgs.pb.go
Normal file
@@ -0,0 +1,258 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/p2p/conn_msgs.proto
|
||||
|
||||
package p2p
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type PacketPing struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PacketPing) Reset() { *m = PacketPing{} }
|
||||
func (m *PacketPing) String() string { return proto.CompactTextString(m) }
|
||||
func (*PacketPing) ProtoMessage() {}
|
||||
func (*PacketPing) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8c680f0b24d73fe7, []int{0}
|
||||
}
|
||||
func (m *PacketPing) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PacketPing.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PacketPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PacketPing.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PacketPing) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PacketPing.Merge(m, src)
|
||||
}
|
||||
func (m *PacketPing) XXX_Size() int {
|
||||
return xxx_messageInfo_PacketPing.Size(m)
|
||||
}
|
||||
func (m *PacketPing) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PacketPing.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PacketPing proto.InternalMessageInfo
|
||||
|
||||
type PacketPong struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PacketPong) Reset() { *m = PacketPong{} }
|
||||
func (m *PacketPong) String() string { return proto.CompactTextString(m) }
|
||||
func (*PacketPong) ProtoMessage() {}
|
||||
func (*PacketPong) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8c680f0b24d73fe7, []int{1}
|
||||
}
|
||||
func (m *PacketPong) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PacketPong.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PacketPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PacketPong.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PacketPong) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PacketPong.Merge(m, src)
|
||||
}
|
||||
func (m *PacketPong) XXX_Size() int {
|
||||
return xxx_messageInfo_PacketPong.Size(m)
|
||||
}
|
||||
func (m *PacketPong) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PacketPong.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PacketPong proto.InternalMessageInfo
|
||||
|
||||
type PacketMsg struct {
|
||||
ChannelID int32 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
|
||||
EOF int32 `protobuf:"varint,2,opt,name=eof,proto3" json:"eof,omitempty"`
|
||||
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PacketMsg) Reset() { *m = PacketMsg{} }
|
||||
func (m *PacketMsg) String() string { return proto.CompactTextString(m) }
|
||||
func (*PacketMsg) ProtoMessage() {}
|
||||
func (*PacketMsg) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8c680f0b24d73fe7, []int{2}
|
||||
}
|
||||
func (m *PacketMsg) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PacketMsg.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PacketMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PacketMsg.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PacketMsg) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PacketMsg.Merge(m, src)
|
||||
}
|
||||
func (m *PacketMsg) XXX_Size() int {
|
||||
return xxx_messageInfo_PacketMsg.Size(m)
|
||||
}
|
||||
func (m *PacketMsg) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PacketMsg.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PacketMsg proto.InternalMessageInfo
|
||||
|
||||
func (m *PacketMsg) GetChannelID() int32 {
|
||||
if m != nil {
|
||||
return m.ChannelID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PacketMsg) GetEOF() int32 {
|
||||
if m != nil {
|
||||
return m.EOF
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PacketMsg) GetData() []byte {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Packet struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *Packet_PacketPing
|
||||
// *Packet_PacketPong
|
||||
// *Packet_PacketMsg
|
||||
Sum isPacket_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Packet) Reset() { *m = Packet{} }
|
||||
func (m *Packet) String() string { return proto.CompactTextString(m) }
|
||||
func (*Packet) ProtoMessage() {}
|
||||
func (*Packet) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8c680f0b24d73fe7, []int{3}
|
||||
}
|
||||
func (m *Packet) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Packet.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Packet) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Packet.Merge(m, src)
|
||||
}
|
||||
func (m *Packet) XXX_Size() int {
|
||||
return xxx_messageInfo_Packet.Size(m)
|
||||
}
|
||||
func (m *Packet) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Packet.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Packet proto.InternalMessageInfo
|
||||
|
||||
type isPacket_Sum interface {
|
||||
isPacket_Sum()
|
||||
}
|
||||
|
||||
type Packet_PacketPing struct {
|
||||
PacketPing *PacketPing `protobuf:"bytes,1,opt,name=packet_ping,json=packetPing,proto3,oneof" json:"packet_ping,omitempty"`
|
||||
}
|
||||
type Packet_PacketPong struct {
|
||||
PacketPong *PacketPong `protobuf:"bytes,2,opt,name=packet_pong,json=packetPong,proto3,oneof" json:"packet_pong,omitempty"`
|
||||
}
|
||||
type Packet_PacketMsg struct {
|
||||
PacketMsg *PacketMsg `protobuf:"bytes,3,opt,name=packet_msg,json=packetMsg,proto3,oneof" json:"packet_msg,omitempty"`
|
||||
}
|
||||
|
||||
func (*Packet_PacketPing) isPacket_Sum() {}
|
||||
func (*Packet_PacketPong) isPacket_Sum() {}
|
||||
func (*Packet_PacketMsg) isPacket_Sum() {}
|
||||
|
||||
func (m *Packet) GetSum() isPacket_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Packet) GetPacketPing() *PacketPing {
|
||||
if x, ok := m.GetSum().(*Packet_PacketPing); ok {
|
||||
return x.PacketPing
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Packet) GetPacketPong() *PacketPong {
|
||||
if x, ok := m.GetSum().(*Packet_PacketPong); ok {
|
||||
return x.PacketPong
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Packet) GetPacketMsg() *PacketMsg {
|
||||
if x, ok := m.GetSum().(*Packet_PacketMsg); ok {
|
||||
return x.PacketMsg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Packet) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*Packet_PacketPing)(nil),
|
||||
(*Packet_PacketPong)(nil),
|
||||
(*Packet_PacketMsg)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PacketPing)(nil), "tendermint.proto.p2p.PacketPing")
|
||||
proto.RegisterType((*PacketPong)(nil), "tendermint.proto.p2p.PacketPong")
|
||||
proto.RegisterType((*PacketMsg)(nil), "tendermint.proto.p2p.PacketMsg")
|
||||
proto.RegisterType((*Packet)(nil), "tendermint.proto.p2p.Packet")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/p2p/conn_msgs.proto", fileDescriptor_8c680f0b24d73fe7) }
|
||||
|
||||
var fileDescriptor_8c680f0b24d73fe7 = []byte{
|
||||
// 295 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x4f, 0x83, 0x30,
|
||||
0x14, 0xc6, 0x45, 0xdc, 0x0c, 0x8f, 0x79, 0x69, 0x3c, 0x30, 0x2f, 0x10, 0x0e, 0x66, 0x31, 0x0b,
|
||||
0x24, 0xf8, 0x0f, 0x18, 0xa6, 0xc6, 0x1d, 0x16, 0x17, 0x8e, 0x5e, 0x08, 0x03, 0x2c, 0x8d, 0xd2,
|
||||
0xd7, 0x40, 0x77, 0xf0, 0x6f, 0x35, 0xd9, 0x61, 0x7f, 0x89, 0xa1, 0x9d, 0x03, 0x13, 0xa3, 0xb7,
|
||||
0xef, 0xfb, 0xf2, 0xfa, 0x7b, 0x5f, 0x5b, 0x98, 0x8a, 0x06, 0x25, 0x86, 0x22, 0x12, 0x61, 0x8e,
|
||||
0x9c, 0xa7, 0x75, 0x4b, 0xdb, 0x40, 0x65, 0xe4, 0x52, 0x96, 0xbc, 0x28, 0x9b, 0x9a, 0x71, 0xa9,
|
||||
0x93, 0x40, 0x44, 0xe2, 0xea, 0x5a, 0x56, 0xac, 0x29, 0x52, 0x91, 0x35, 0xf2, 0x23, 0xd4, 0x87,
|
||||
0x29, 0x52, 0xec, 0x95, 0x9e, 0xf5, 0x27, 0x00, 0xeb, 0x2c, 0x7f, 0x2b, 0xe5, 0x9a, 0x71, 0x3a,
|
||||
0x70, 0xc8, 0xa9, 0x5f, 0x81, 0xa5, 0xdd, 0xaa, 0xa5, 0x64, 0x0e, 0x90, 0x57, 0x19, 0xe7, 0xe5,
|
||||
0x7b, 0xca, 0x0a, 0xc7, 0xf0, 0x8c, 0xd9, 0x28, 0xbe, 0xd8, 0xef, 0x5c, 0x6b, 0xa1, 0xd3, 0xe5,
|
||||
0x7d, 0x62, 0x1d, 0x06, 0x96, 0x05, 0x99, 0x82, 0x59, 0xe2, 0xab, 0x73, 0xaa, 0xc6, 0xce, 0xf7,
|
||||
0x3b, 0xd7, 0x7c, 0x78, 0x7e, 0x4c, 0xba, 0x8c, 0x10, 0x38, 0x2b, 0x32, 0x99, 0x39, 0xa6, 0x67,
|
||||
0xcc, 0x26, 0x89, 0xd2, 0xfe, 0xa7, 0x01, 0x63, 0xbd, 0x8a, 0x2c, 0xc0, 0x16, 0x4a, 0xa5, 0x82,
|
||||
0x71, 0xaa, 0x16, 0xd9, 0x91, 0x17, 0xfc, 0x76, 0xc9, 0xa0, 0x6f, 0xfe, 0x74, 0x92, 0x80, 0x38,
|
||||
0xba, 0x21, 0x04, 0x39, 0x55, 0x35, 0xfe, 0x83, 0xe0, 0x0f, 0x08, 0x72, 0x4a, 0xee, 0xe0, 0xe0,
|
||||
0xba, 0xd7, 0x56, 0x75, 0xed, 0xc8, 0xfd, 0x8b, 0xb1, 0x6a, 0x3b, 0x84, 0x25, 0xbe, 0x4d, 0x3c,
|
||||
0x02, 0xb3, 0xdd, 0xd6, 0xf1, 0xfc, 0xe5, 0x86, 0x32, 0x59, 0x6d, 0x37, 0x41, 0x8e, 0x75, 0xd8,
|
||||
0x03, 0x86, 0xf2, 0xf8, 0xbf, 0x9b, 0xb1, 0x92, 0xb7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x87,
|
||||
0x8c, 0x0a, 0x5f, 0xf3, 0x01, 0x00, 0x00,
|
||||
}
|
||||
24
proto/p2p/conn_msgs.proto
Normal file
24
proto/p2p/conn_msgs.proto
Normal file
@@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.p2p;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/p2p";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
|
||||
message PacketPing {}
|
||||
|
||||
message PacketPong {}
|
||||
|
||||
message PacketMsg {
|
||||
int32 channel_id = 1 [(gogoproto.customname) = "ChannelID"];
|
||||
int32 eof = 2 [(gogoproto.customname) = "EOF"];
|
||||
bytes data = 3;
|
||||
}
|
||||
|
||||
message Packet {
|
||||
oneof sum {
|
||||
PacketPing packet_ping = 1;
|
||||
PacketPong packet_pong = 2;
|
||||
PacketMsg packet_msg = 3;
|
||||
}
|
||||
}
|
||||
195
proto/p2p/pex_msgs.pb.go
Normal file
195
proto/p2p/pex_msgs.pb.go
Normal file
@@ -0,0 +1,195 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/p2p/pex_msgs.proto
|
||||
|
||||
package p2p
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type PexRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PexRequest) Reset() { *m = PexRequest{} }
|
||||
func (m *PexRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PexRequest) ProtoMessage() {}
|
||||
func (*PexRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b4d6fe6b009e47d8, []int{0}
|
||||
}
|
||||
func (m *PexRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PexRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PexRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PexRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PexRequest.Merge(m, src)
|
||||
}
|
||||
func (m *PexRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_PexRequest.Size(m)
|
||||
}
|
||||
func (m *PexRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PexRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PexRequest proto.InternalMessageInfo
|
||||
|
||||
type PexAddrs struct {
|
||||
Addrs []NetAddress `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PexAddrs) Reset() { *m = PexAddrs{} }
|
||||
func (m *PexAddrs) String() string { return proto.CompactTextString(m) }
|
||||
func (*PexAddrs) ProtoMessage() {}
|
||||
func (*PexAddrs) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b4d6fe6b009e47d8, []int{1}
|
||||
}
|
||||
func (m *PexAddrs) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PexAddrs.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PexAddrs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PexAddrs.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PexAddrs) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PexAddrs.Merge(m, src)
|
||||
}
|
||||
func (m *PexAddrs) XXX_Size() int {
|
||||
return xxx_messageInfo_PexAddrs.Size(m)
|
||||
}
|
||||
func (m *PexAddrs) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PexAddrs.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PexAddrs proto.InternalMessageInfo
|
||||
|
||||
func (m *PexAddrs) GetAddrs() []NetAddress {
|
||||
if m != nil {
|
||||
return m.Addrs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *Message_PexRequest
|
||||
// *Message_PexAddrs
|
||||
Sum isMessage_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Message) Reset() { *m = Message{} }
|
||||
func (m *Message) String() string { return proto.CompactTextString(m) }
|
||||
func (*Message) ProtoMessage() {}
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b4d6fe6b009e47d8, []int{2}
|
||||
}
|
||||
func (m *Message) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Message.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Message) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Message.Merge(m, src)
|
||||
}
|
||||
func (m *Message) XXX_Size() int {
|
||||
return xxx_messageInfo_Message.Size(m)
|
||||
}
|
||||
func (m *Message) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Message.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Message proto.InternalMessageInfo
|
||||
|
||||
type isMessage_Sum interface {
|
||||
isMessage_Sum()
|
||||
}
|
||||
|
||||
type Message_PexRequest struct {
|
||||
PexRequest *PexRequest `protobuf:"bytes,1,opt,name=pex_request,json=pexRequest,proto3,oneof" json:"pex_request,omitempty"`
|
||||
}
|
||||
type Message_PexAddrs struct {
|
||||
PexAddrs *PexAddrs `protobuf:"bytes,2,opt,name=pex_addrs,json=pexAddrs,proto3,oneof" json:"pex_addrs,omitempty"`
|
||||
}
|
||||
|
||||
func (*Message_PexRequest) isMessage_Sum() {}
|
||||
func (*Message_PexAddrs) isMessage_Sum() {}
|
||||
|
||||
func (m *Message) GetSum() isMessage_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetPexRequest() *PexRequest {
|
||||
if x, ok := m.GetSum().(*Message_PexRequest); ok {
|
||||
return x.PexRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetPexAddrs() *PexAddrs {
|
||||
if x, ok := m.GetSum().(*Message_PexAddrs); ok {
|
||||
return x.PexAddrs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Message) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*Message_PexRequest)(nil),
|
||||
(*Message_PexAddrs)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PexRequest)(nil), "tendermint.proto.p2p.PexRequest")
|
||||
proto.RegisterType((*PexAddrs)(nil), "tendermint.proto.p2p.PexAddrs")
|
||||
proto.RegisterType((*Message)(nil), "tendermint.proto.p2p.Message")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/p2p/pex_msgs.proto", fileDescriptor_b4d6fe6b009e47d8) }
|
||||
|
||||
var fileDescriptor_b4d6fe6b009e47d8 = []byte{
|
||||
// 255 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x2f, 0x30, 0x2a, 0xd0, 0x2f, 0x48, 0xad, 0x88, 0xcf, 0x2d, 0x4e, 0x2f, 0xd6, 0x03,
|
||||
0x0b, 0x09, 0x89, 0x94, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4,
|
||||
0x0a, 0x8c, 0x0a, 0xa4, 0x44, 0x11, 0xea, 0x4b, 0x2a, 0x0b, 0x52, 0xa1, 0x8a, 0xa5, 0xd4, 0x4a,
|
||||
0x32, 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0x21, 0x4a, 0xd2, 0xf3, 0xd3,
|
||||
0xf3, 0x11, 0x2c, 0x88, 0x3a, 0x25, 0x1e, 0x2e, 0xae, 0x80, 0xd4, 0x8a, 0xa0, 0xd4, 0xc2, 0xd2,
|
||||
0xd4, 0xe2, 0x12, 0x25, 0x0f, 0x2e, 0x8e, 0x80, 0xd4, 0x0a, 0xc7, 0x94, 0x94, 0xa2, 0x62, 0x21,
|
||||
0x1b, 0x2e, 0xd6, 0x44, 0x10, 0x43, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0x9b,
|
||||
0xf5, 0x7a, 0x7e, 0xa9, 0x25, 0x20, 0xe5, 0xa9, 0xc5, 0xc5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33,
|
||||
0x04, 0x41, 0x34, 0x29, 0x4d, 0x61, 0xe4, 0x62, 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15,
|
||||
0x72, 0xe6, 0xe2, 0x06, 0x79, 0xa5, 0x08, 0x62, 0x89, 0x04, 0xa3, 0x02, 0x23, 0x6e, 0xf3, 0x10,
|
||||
0x8e, 0xf1, 0x60, 0x08, 0xe2, 0x2a, 0x80, 0xf3, 0x84, 0x6c, 0xb9, 0x38, 0x41, 0x86, 0x40, 0x9c,
|
||||
0xc4, 0x04, 0x36, 0x42, 0x0e, 0xa7, 0x11, 0x60, 0x1f, 0x78, 0x30, 0x04, 0x71, 0x14, 0x40, 0xd9,
|
||||
0x4e, 0xac, 0x5c, 0xcc, 0xc5, 0xa5, 0xb9, 0x4e, 0x3a, 0x51, 0x5a, 0xe9, 0x99, 0x25, 0x19, 0xa5,
|
||||
0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x08, 0xed, 0xc8, 0x4c, 0x78, 0x80, 0x26, 0xb1, 0x81, 0x99,
|
||||
0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, 0x54, 0xb6, 0xcc, 0x94, 0x01, 0x00, 0x00,
|
||||
}
|
||||
20
proto/p2p/pex_msgs.proto
Normal file
20
proto/p2p/pex_msgs.proto
Normal file
@@ -0,0 +1,20 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.p2p;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/p2p";
|
||||
|
||||
import "proto/p2p/types.proto";
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
|
||||
message PexRequest {}
|
||||
|
||||
message PexAddrs {
|
||||
repeated NetAddress addrs = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message Message {
|
||||
oneof sum {
|
||||
PexRequest pex_request = 1;
|
||||
PexAddrs pex_addrs = 2;
|
||||
}
|
||||
}
|
||||
321
proto/p2p/types.pb.go
Normal file
321
proto/p2p/types.pb.go
Normal file
@@ -0,0 +1,321 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/p2p/types.proto
|
||||
|
||||
package p2p
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type NetAddress struct {
|
||||
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IP string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
|
||||
Str string `protobuf:"bytes,4,opt,name=str,proto3" json:"str,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NetAddress) Reset() { *m = NetAddress{} }
|
||||
func (m *NetAddress) String() string { return proto.CompactTextString(m) }
|
||||
func (*NetAddress) ProtoMessage() {}
|
||||
func (*NetAddress) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5c4320c1810ca85c, []int{0}
|
||||
}
|
||||
func (m *NetAddress) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NetAddress.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NetAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NetAddress.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NetAddress) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NetAddress.Merge(m, src)
|
||||
}
|
||||
func (m *NetAddress) XXX_Size() int {
|
||||
return xxx_messageInfo_NetAddress.Size(m)
|
||||
}
|
||||
func (m *NetAddress) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NetAddress.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NetAddress proto.InternalMessageInfo
|
||||
|
||||
func (m *NetAddress) GetID() string {
|
||||
if m != nil {
|
||||
return m.ID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetAddress) GetIP() string {
|
||||
if m != nil {
|
||||
return m.IP
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetAddress) GetPort() uint32 {
|
||||
if m != nil {
|
||||
return m.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NetAddress) GetStr() string {
|
||||
if m != nil {
|
||||
return m.Str
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ProtocolVersion struct {
|
||||
P2P uint64 `protobuf:"varint,1,opt,name=p2p,proto3" json:"p2p,omitempty"`
|
||||
Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"`
|
||||
App uint64 `protobuf:"varint,3,opt,name=app,proto3" json:"app,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ProtocolVersion) Reset() { *m = ProtocolVersion{} }
|
||||
func (m *ProtocolVersion) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProtocolVersion) ProtoMessage() {}
|
||||
func (*ProtocolVersion) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5c4320c1810ca85c, []int{1}
|
||||
}
|
||||
func (m *ProtocolVersion) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ProtocolVersion.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ProtocolVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ProtocolVersion.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ProtocolVersion) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ProtocolVersion.Merge(m, src)
|
||||
}
|
||||
func (m *ProtocolVersion) XXX_Size() int {
|
||||
return xxx_messageInfo_ProtocolVersion.Size(m)
|
||||
}
|
||||
func (m *ProtocolVersion) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ProtocolVersion.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ProtocolVersion proto.InternalMessageInfo
|
||||
|
||||
func (m *ProtocolVersion) GetP2P() uint64 {
|
||||
if m != nil {
|
||||
return m.P2P
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ProtocolVersion) GetBlock() uint64 {
|
||||
if m != nil {
|
||||
return m.Block
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ProtocolVersion) GetApp() uint64 {
|
||||
if m != nil {
|
||||
return m.App
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DefaultNodeInfo struct {
|
||||
ProtocolVersion ProtocolVersion `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version"`
|
||||
DefaultNodeID string `protobuf:"bytes,2,opt,name=default_node_id,json=defaultNodeId,proto3" json:"default_node_id,omitempty"`
|
||||
ListenAddr string `protobuf:"bytes,3,opt,name=listen_addr,json=listenAddr,proto3" json:"listen_addr,omitempty"`
|
||||
Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
|
||||
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Channels []byte `protobuf:"bytes,6,opt,name=channels,proto3" json:"channels,omitempty"`
|
||||
Moniker string `protobuf:"bytes,7,opt,name=moniker,proto3" json:"moniker,omitempty"`
|
||||
Other DefaultNodeInfoOther `protobuf:"bytes,8,opt,name=other,proto3" json:"other"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) Reset() { *m = DefaultNodeInfo{} }
|
||||
func (m *DefaultNodeInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*DefaultNodeInfo) ProtoMessage() {}
|
||||
func (*DefaultNodeInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5c4320c1810ca85c, []int{2}
|
||||
}
|
||||
func (m *DefaultNodeInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DefaultNodeInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DefaultNodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DefaultNodeInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DefaultNodeInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DefaultNodeInfo.Merge(m, src)
|
||||
}
|
||||
func (m *DefaultNodeInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_DefaultNodeInfo.Size(m)
|
||||
}
|
||||
func (m *DefaultNodeInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DefaultNodeInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DefaultNodeInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *DefaultNodeInfo) GetProtocolVersion() ProtocolVersion {
|
||||
if m != nil {
|
||||
return m.ProtocolVersion
|
||||
}
|
||||
return ProtocolVersion{}
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetDefaultNodeID() string {
|
||||
if m != nil {
|
||||
return m.DefaultNodeID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetListenAddr() string {
|
||||
if m != nil {
|
||||
return m.ListenAddr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetNetwork() string {
|
||||
if m != nil {
|
||||
return m.Network
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetVersion() string {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetChannels() []byte {
|
||||
if m != nil {
|
||||
return m.Channels
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetMoniker() string {
|
||||
if m != nil {
|
||||
return m.Moniker
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfo) GetOther() DefaultNodeInfoOther {
|
||||
if m != nil {
|
||||
return m.Other
|
||||
}
|
||||
return DefaultNodeInfoOther{}
|
||||
}
|
||||
|
||||
type DefaultNodeInfoOther struct {
|
||||
TxIndex string `protobuf:"bytes,1,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
|
||||
RPCAdddress string `protobuf:"bytes,2,opt,name=rpc_address,json=rpcAddress,proto3" json:"rpc_address,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfoOther) Reset() { *m = DefaultNodeInfoOther{} }
|
||||
func (m *DefaultNodeInfoOther) String() string { return proto.CompactTextString(m) }
|
||||
func (*DefaultNodeInfoOther) ProtoMessage() {}
|
||||
func (*DefaultNodeInfoOther) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5c4320c1810ca85c, []int{3}
|
||||
}
|
||||
func (m *DefaultNodeInfoOther) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DefaultNodeInfoOther.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DefaultNodeInfoOther) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DefaultNodeInfoOther.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DefaultNodeInfoOther) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DefaultNodeInfoOther.Merge(m, src)
|
||||
}
|
||||
func (m *DefaultNodeInfoOther) XXX_Size() int {
|
||||
return xxx_messageInfo_DefaultNodeInfoOther.Size(m)
|
||||
}
|
||||
func (m *DefaultNodeInfoOther) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DefaultNodeInfoOther.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DefaultNodeInfoOther proto.InternalMessageInfo
|
||||
|
||||
func (m *DefaultNodeInfoOther) GetTxIndex() string {
|
||||
if m != nil {
|
||||
return m.TxIndex
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DefaultNodeInfoOther) GetRPCAdddress() string {
|
||||
if m != nil {
|
||||
return m.RPCAdddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*NetAddress)(nil), "tendermint.proto.p2p.NetAddress")
|
||||
proto.RegisterType((*ProtocolVersion)(nil), "tendermint.proto.p2p.ProtocolVersion")
|
||||
proto.RegisterType((*DefaultNodeInfo)(nil), "tendermint.proto.p2p.DefaultNodeInfo")
|
||||
proto.RegisterType((*DefaultNodeInfoOther)(nil), "tendermint.proto.p2p.DefaultNodeInfoOther")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/p2p/types.proto", fileDescriptor_5c4320c1810ca85c) }
|
||||
|
||||
var fileDescriptor_5c4320c1810ca85c = []byte{
|
||||
// 471 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0xcf, 0x8a, 0xdb, 0x3e,
|
||||
0x18, 0xfc, 0xc5, 0x71, 0xfe, 0xec, 0x97, 0x5f, 0xf0, 0x56, 0xa4, 0xc5, 0xbb, 0x17, 0x87, 0x40,
|
||||
0x4b, 0x58, 0x8a, 0x53, 0xdc, 0x53, 0x8f, 0x9b, 0x86, 0x42, 0x2e, 0x5b, 0x23, 0xca, 0x1e, 0x7a,
|
||||
0x31, 0x8e, 0xa5, 0x4d, 0x44, 0x1c, 0x49, 0xc8, 0xda, 0x36, 0xfb, 0x86, 0x7d, 0x0a, 0x1f, 0xf2,
|
||||
0x12, 0xbd, 0x16, 0x49, 0xde, 0xdd, 0x10, 0x72, 0x9b, 0x19, 0x7d, 0xe3, 0xf9, 0x34, 0xc8, 0xf0,
|
||||
0x56, 0x2a, 0xa1, 0xc5, 0x4c, 0x26, 0x72, 0xa6, 0x9f, 0x24, 0xad, 0x62, 0xcb, 0xd1, 0x48, 0x53,
|
||||
0x4e, 0xa8, 0xda, 0x31, 0xae, 0x9d, 0x12, 0xcb, 0x44, 0x5e, 0x7f, 0xd0, 0x1b, 0xa6, 0x48, 0x26,
|
||||
0x73, 0xa5, 0x9f, 0x66, 0xce, 0xb8, 0x16, 0x6b, 0xf1, 0x8a, 0xdc, 0xec, 0x64, 0x05, 0x70, 0x47,
|
||||
0xf5, 0x2d, 0x21, 0x8a, 0x56, 0x15, 0x7a, 0x07, 0x1e, 0x23, 0x61, 0x6b, 0xdc, 0x9a, 0x5e, 0xcc,
|
||||
0xbb, 0x87, 0x3a, 0xf2, 0x96, 0x0b, 0xec, 0x31, 0x62, 0x75, 0x19, 0x7a, 0x47, 0x7a, 0x8a, 0x3d,
|
||||
0x26, 0x11, 0x02, 0x5f, 0x0a, 0xa5, 0xc3, 0xf6, 0xb8, 0x35, 0x1d, 0x62, 0x8b, 0xd1, 0x25, 0xb4,
|
||||
0x2b, 0xad, 0x42, 0xdf, 0x0c, 0x63, 0x03, 0x27, 0x3f, 0x20, 0x48, 0x4d, 0x58, 0x21, 0xca, 0x7b,
|
||||
0xaa, 0x2a, 0x26, 0x38, 0xba, 0x82, 0xb6, 0x4c, 0xa4, 0x4d, 0xf2, 0xe7, 0xbd, 0x43, 0x1d, 0xb5,
|
||||
0xd3, 0x24, 0xc5, 0x46, 0x43, 0x23, 0xe8, 0xac, 0x4a, 0x51, 0x6c, 0x6d, 0x9c, 0x8f, 0x1d, 0x31,
|
||||
0x5f, 0xcd, 0xa5, 0xb4, 0x41, 0x3e, 0x36, 0x70, 0xf2, 0xd7, 0x83, 0x60, 0x41, 0x1f, 0xf2, 0xc7,
|
||||
0x52, 0xdf, 0x09, 0x42, 0x97, 0xfc, 0x41, 0xa0, 0x7b, 0xb8, 0x94, 0x4d, 0x52, 0xf6, 0xcb, 0x45,
|
||||
0xd9, 0x8c, 0x41, 0xf2, 0x3e, 0x3e, 0x57, 0x53, 0x7c, 0xb2, 0xd7, 0xdc, 0xff, 0x53, 0x47, 0xff,
|
||||
0xe1, 0x40, 0x9e, 0xac, 0xfb, 0x05, 0x02, 0xe2, 0xa2, 0x32, 0x2e, 0x08, 0xcd, 0x18, 0x69, 0xca,
|
||||
0x78, 0x73, 0xa8, 0xa3, 0xe1, 0xf1, 0x16, 0x0b, 0x3c, 0x24, 0x47, 0x94, 0xa0, 0x08, 0x06, 0x25,
|
||||
0xab, 0x34, 0xe5, 0x59, 0x4e, 0x88, 0xb2, 0x17, 0xb8, 0xc0, 0xe0, 0x24, 0x53, 0x3b, 0x0a, 0xa1,
|
||||
0xc7, 0xa9, 0xfe, 0x2d, 0xd4, 0xb6, 0xe9, 0xec, 0x99, 0x9a, 0x93, 0xe7, 0x4b, 0x74, 0xdc, 0x49,
|
||||
0x43, 0xd1, 0x35, 0xf4, 0x8b, 0x4d, 0xce, 0x39, 0x2d, 0xab, 0xb0, 0x3b, 0x6e, 0x4d, 0xff, 0xc7,
|
||||
0x2f, 0xdc, 0xb8, 0x76, 0x82, 0xb3, 0x2d, 0x55, 0x61, 0xcf, 0xb9, 0x1a, 0x8a, 0xbe, 0x41, 0x47,
|
||||
0xe8, 0x0d, 0x55, 0x61, 0xdf, 0x56, 0x72, 0x73, 0xbe, 0x92, 0x93, 0x4e, 0xbf, 0x1b, 0x47, 0xd3,
|
||||
0x8b, 0xb3, 0x4f, 0x0a, 0x18, 0x9d, 0x1b, 0x42, 0x57, 0xd0, 0xd7, 0xfb, 0x8c, 0x71, 0x42, 0xf7,
|
||||
0xee, 0x0d, 0xe1, 0x9e, 0xde, 0x2f, 0x0d, 0x45, 0x9f, 0x60, 0xa0, 0x64, 0x61, 0x2b, 0xa0, 0x55,
|
||||
0xd5, 0x94, 0x17, 0x1c, 0xea, 0x68, 0x80, 0xd3, 0xaf, 0xb7, 0xc4, 0xc9, 0x18, 0x94, 0x2c, 0x9a,
|
||||
0xa7, 0x38, 0xff, 0xf8, 0xf3, 0x66, 0xcd, 0xf4, 0xe6, 0x71, 0x15, 0x17, 0x62, 0x37, 0x7b, 0xdd,
|
||||
0xf4, 0x18, 0xbe, 0xfc, 0x10, 0xab, 0xae, 0x85, 0x9f, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xa2,
|
||||
0x36, 0x05, 0x66, 0x24, 0x03, 0x00, 0x00,
|
||||
}
|
||||
35
proto/p2p/types.proto
Normal file
35
proto/p2p/types.proto
Normal file
@@ -0,0 +1,35 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.p2p;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/p2p";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
|
||||
message NetAddress {
|
||||
string id = 1 [(gogoproto.customname) = "ID"];
|
||||
string ip = 2 [(gogoproto.customname) = "IP"];
|
||||
uint32 port = 3;
|
||||
string str = 4;
|
||||
}
|
||||
|
||||
message ProtocolVersion {
|
||||
uint64 p2p = 1 [(gogoproto.customname) = "P2P"];
|
||||
uint64 block = 2;
|
||||
uint64 app = 3;
|
||||
}
|
||||
|
||||
message DefaultNodeInfo {
|
||||
ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false];
|
||||
string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"];
|
||||
string listen_addr = 3;
|
||||
string network = 4;
|
||||
string version = 5;
|
||||
bytes channels = 6;
|
||||
string moniker = 7;
|
||||
DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message DefaultNodeInfoOther {
|
||||
string tx_index = 1;
|
||||
string rpc_address = 2 [(gogoproto.customname) = "RPCAdddress"];
|
||||
}
|
||||
426
proto/privval/msgs.pb.go
Normal file
426
proto/privval/msgs.pb.go
Normal file
@@ -0,0 +1,426 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/privval/msgs.proto
|
||||
|
||||
package privval
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
keys "github.com/tendermint/tendermint/proto/crypto/keys"
|
||||
types "github.com/tendermint/tendermint/proto/types"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type RemoteSignerError struct {
|
||||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RemoteSignerError) Reset() { *m = RemoteSignerError{} }
|
||||
func (m *RemoteSignerError) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoteSignerError) ProtoMessage() {}
|
||||
func (*RemoteSignerError) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{0}
|
||||
}
|
||||
func (m *RemoteSignerError) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemoteSignerError.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RemoteSignerError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RemoteSignerError.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RemoteSignerError) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RemoteSignerError.Merge(m, src)
|
||||
}
|
||||
func (m *RemoteSignerError) XXX_Size() int {
|
||||
return xxx_messageInfo_RemoteSignerError.Size(m)
|
||||
}
|
||||
func (m *RemoteSignerError) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RemoteSignerError.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RemoteSignerError proto.InternalMessageInfo
|
||||
|
||||
func (m *RemoteSignerError) GetCode() int32 {
|
||||
if m != nil {
|
||||
return m.Code
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RemoteSignerError) GetDescription() string {
|
||||
if m != nil {
|
||||
return m.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// PubKeyRequest requests the consensus public key from the remote signer.
|
||||
type PubKeyRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PubKeyRequest) Reset() { *m = PubKeyRequest{} }
|
||||
func (m *PubKeyRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PubKeyRequest) ProtoMessage() {}
|
||||
func (*PubKeyRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{1}
|
||||
}
|
||||
func (m *PubKeyRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PubKeyRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PubKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PubKeyRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PubKeyRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PubKeyRequest.Merge(m, src)
|
||||
}
|
||||
func (m *PubKeyRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_PubKeyRequest.Size(m)
|
||||
}
|
||||
func (m *PubKeyRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PubKeyRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PubKeyRequest proto.InternalMessageInfo
|
||||
|
||||
// PubKeyResponse is a response message containing the public key.
|
||||
type PubKeyResponse struct {
|
||||
PubKey keys.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
|
||||
Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PubKeyResponse) Reset() { *m = PubKeyResponse{} }
|
||||
func (m *PubKeyResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*PubKeyResponse) ProtoMessage() {}
|
||||
func (*PubKeyResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{2}
|
||||
}
|
||||
func (m *PubKeyResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PubKeyResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PubKeyResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PubKeyResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PubKeyResponse.Merge(m, src)
|
||||
}
|
||||
func (m *PubKeyResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_PubKeyResponse.Size(m)
|
||||
}
|
||||
func (m *PubKeyResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PubKeyResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PubKeyResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *PubKeyResponse) GetPubKey() keys.PublicKey {
|
||||
if m != nil {
|
||||
return m.PubKey
|
||||
}
|
||||
return keys.PublicKey{}
|
||||
}
|
||||
|
||||
func (m *PubKeyResponse) GetError() *RemoteSignerError {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SignVoteRequest is a request to sign a vote
|
||||
type SignVoteRequest struct {
|
||||
Vote types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignVoteRequest) Reset() { *m = SignVoteRequest{} }
|
||||
func (m *SignVoteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignVoteRequest) ProtoMessage() {}
|
||||
func (*SignVoteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{3}
|
||||
}
|
||||
func (m *SignVoteRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignVoteRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignVoteRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignVoteRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignVoteRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SignVoteRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SignVoteRequest.Size(m)
|
||||
}
|
||||
func (m *SignVoteRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignVoteRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignVoteRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *SignVoteRequest) GetVote() types.Vote {
|
||||
if m != nil {
|
||||
return m.Vote
|
||||
}
|
||||
return types.Vote{}
|
||||
}
|
||||
|
||||
// SignedVoteResponse is a response containing a signed vote or an error
|
||||
type SignVoteResponse struct {
|
||||
Vote types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"`
|
||||
Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignVoteResponse) Reset() { *m = SignVoteResponse{} }
|
||||
func (m *SignVoteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignVoteResponse) ProtoMessage() {}
|
||||
func (*SignVoteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{4}
|
||||
}
|
||||
func (m *SignVoteResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignVoteResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignVoteResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignVoteResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignVoteResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SignVoteResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SignVoteResponse.Size(m)
|
||||
}
|
||||
func (m *SignVoteResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignVoteResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignVoteResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SignVoteResponse) GetVote() types.Vote {
|
||||
if m != nil {
|
||||
return m.Vote
|
||||
}
|
||||
return types.Vote{}
|
||||
}
|
||||
|
||||
func (m *SignVoteResponse) GetError() *RemoteSignerError {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SignProposalRequest is a request to sign a proposal
|
||||
type SignProposalRequest struct {
|
||||
Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignProposalRequest) Reset() { *m = SignProposalRequest{} }
|
||||
func (m *SignProposalRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignProposalRequest) ProtoMessage() {}
|
||||
func (*SignProposalRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{5}
|
||||
}
|
||||
func (m *SignProposalRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignProposalRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignProposalRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignProposalRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignProposalRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SignProposalRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SignProposalRequest.Size(m)
|
||||
}
|
||||
func (m *SignProposalRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignProposalRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignProposalRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *SignProposalRequest) GetProposal() types.Proposal {
|
||||
if m != nil {
|
||||
return m.Proposal
|
||||
}
|
||||
return types.Proposal{}
|
||||
}
|
||||
|
||||
// SignedProposalResponse is response containing a signed proposal or an error
|
||||
type SignedProposalResponse struct {
|
||||
Proposal types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal"`
|
||||
Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignedProposalResponse) Reset() { *m = SignedProposalResponse{} }
|
||||
func (m *SignedProposalResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignedProposalResponse) ProtoMessage() {}
|
||||
func (*SignedProposalResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{6}
|
||||
}
|
||||
func (m *SignedProposalResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignedProposalResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignedProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignedProposalResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignedProposalResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignedProposalResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SignedProposalResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SignedProposalResponse.Size(m)
|
||||
}
|
||||
func (m *SignedProposalResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignedProposalResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignedProposalResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SignedProposalResponse) GetProposal() types.Proposal {
|
||||
if m != nil {
|
||||
return m.Proposal
|
||||
}
|
||||
return types.Proposal{}
|
||||
}
|
||||
|
||||
func (m *SignedProposalResponse) GetError() *RemoteSignerError {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// PingRequest is a request to confirm that the connection is alive.
|
||||
type PingRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PingRequest) Reset() { *m = PingRequest{} }
|
||||
func (m *PingRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*PingRequest) ProtoMessage() {}
|
||||
func (*PingRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{7}
|
||||
}
|
||||
func (m *PingRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PingRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PingRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PingRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PingRequest.Merge(m, src)
|
||||
}
|
||||
func (m *PingRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_PingRequest.Size(m)
|
||||
}
|
||||
func (m *PingRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PingRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PingRequest proto.InternalMessageInfo
|
||||
|
||||
// PingResponse is a response to confirm that the connection is alive.
|
||||
type PingResponse struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PingResponse) Reset() { *m = PingResponse{} }
|
||||
func (m *PingResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*PingResponse) ProtoMessage() {}
|
||||
func (*PingResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9ec52cc5e378f9a4, []int{8}
|
||||
}
|
||||
func (m *PingResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PingResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PingResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PingResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PingResponse.Merge(m, src)
|
||||
}
|
||||
func (m *PingResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_PingResponse.Size(m)
|
||||
}
|
||||
func (m *PingResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PingResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PingResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RemoteSignerError)(nil), "tendermint.proto.privval.RemoteSignerError")
|
||||
proto.RegisterType((*PubKeyRequest)(nil), "tendermint.proto.privval.PubKeyRequest")
|
||||
proto.RegisterType((*PubKeyResponse)(nil), "tendermint.proto.privval.PubKeyResponse")
|
||||
proto.RegisterType((*SignVoteRequest)(nil), "tendermint.proto.privval.SignVoteRequest")
|
||||
proto.RegisterType((*SignVoteResponse)(nil), "tendermint.proto.privval.SignVoteResponse")
|
||||
proto.RegisterType((*SignProposalRequest)(nil), "tendermint.proto.privval.SignProposalRequest")
|
||||
proto.RegisterType((*SignedProposalResponse)(nil), "tendermint.proto.privval.SignedProposalResponse")
|
||||
proto.RegisterType((*PingRequest)(nil), "tendermint.proto.privval.PingRequest")
|
||||
proto.RegisterType((*PingResponse)(nil), "tendermint.proto.privval.PingResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/privval/msgs.proto", fileDescriptor_9ec52cc5e378f9a4) }
|
||||
|
||||
var fileDescriptor_9ec52cc5e378f9a4 = []byte{
|
||||
// 401 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xd1, 0xca, 0xd3, 0x30,
|
||||
0x1c, 0xc5, 0xad, 0x6c, 0x53, 0xff, 0x75, 0x9b, 0x56, 0xd0, 0x32, 0x14, 0x4b, 0x2f, 0x74, 0x20,
|
||||
0xa4, 0x32, 0xc1, 0x7b, 0x07, 0x0a, 0x63, 0x37, 0xa5, 0x82, 0xa0, 0x37, 0x63, 0x6d, 0xff, 0x74,
|
||||
0x61, 0x6b, 0x13, 0x93, 0x74, 0xd0, 0x87, 0xf0, 0x09, 0xbc, 0xf0, 0x75, 0x7c, 0x0a, 0x9f, 0x45,
|
||||
0x9a, 0xa4, 0x5f, 0xf7, 0x31, 0x76, 0xf3, 0xb1, 0xbb, 0xe4, 0xe4, 0x7f, 0x4e, 0xce, 0x2f, 0xb4,
|
||||
0xe0, 0x73, 0xc1, 0x14, 0x8b, 0xb8, 0xa0, 0xc7, 0xe3, 0xf6, 0x10, 0x95, 0xb2, 0x90, 0x44, 0x4b,
|
||||
0x9e, 0xaf, 0xb0, 0xca, 0x51, 0x94, 0xb4, 0x52, 0x46, 0x21, 0x76, 0x68, 0xf6, 0x46, 0xed, 0xa8,
|
||||
0xc8, 0x37, 0x7c, 0x2b, 0x54, 0x13, 0x19, 0x7f, 0xc1, 0x0a, 0xd6, 0xaf, 0xcc, 0xfc, 0xec, 0x95,
|
||||
0x51, 0x32, 0xd1, 0x70, 0xc5, 0xa2, 0x3d, 0x36, 0x32, 0x52, 0x0d, 0x47, 0x7b, 0xc1, 0xec, 0x85,
|
||||
0x39, 0xd6, 0xd2, 0xe9, 0x41, 0xb8, 0x82, 0xa7, 0x09, 0x96, 0x4c, 0xe1, 0x57, 0x5a, 0x54, 0x28,
|
||||
0x3e, 0x0b, 0xc1, 0x84, 0xe7, 0xc1, 0x20, 0x63, 0x39, 0xfa, 0x4e, 0xe0, 0xcc, 0x87, 0x89, 0x5e,
|
||||
0x7b, 0x01, 0xb8, 0x39, 0xca, 0x4c, 0x50, 0xae, 0x28, 0xab, 0xfc, 0xfb, 0x81, 0x33, 0x7f, 0x94,
|
||||
0x9c, 0x4a, 0xe1, 0x14, 0xc6, 0x71, 0x9d, 0xae, 0xb1, 0x49, 0xf0, 0x67, 0x8d, 0x52, 0x85, 0xbf,
|
||||
0x1d, 0x98, 0x74, 0x8a, 0xe4, 0xac, 0x92, 0xe8, 0x7d, 0x81, 0x07, 0xbc, 0x4e, 0x37, 0x7b, 0x6c,
|
||||
0x74, 0xb8, 0xbb, 0x78, 0x4b, 0xce, 0xd0, 0x0d, 0x03, 0x69, 0x19, 0x48, 0x5c, 0xa7, 0x07, 0x9a,
|
||||
0xad, 0xb1, 0x59, 0x0e, 0xfe, 0xfe, 0x7b, 0x7d, 0x2f, 0x19, 0x71, 0x9d, 0xe7, 0x7d, 0x82, 0x21,
|
||||
0xb6, 0x55, 0x75, 0x0f, 0x77, 0xf1, 0x8e, 0x5c, 0x7a, 0x40, 0x72, 0x46, 0x97, 0x18, 0x67, 0xb8,
|
||||
0x82, 0x69, 0xab, 0x7e, 0x63, 0x0a, 0x6d, 0x61, 0xef, 0x23, 0x0c, 0x8e, 0x4c, 0xa1, 0xad, 0xf6,
|
||||
0xf2, 0x3c, 0xd4, 0xbc, 0x5c, 0x6b, 0xb1, 0x7d, 0xf4, 0x7c, 0xf8, 0xcb, 0x81, 0x27, 0x7d, 0x96,
|
||||
0x45, 0xbd, 0x63, 0xd8, 0x35, 0xd0, 0xbe, 0xc3, 0xb3, 0x56, 0x8d, 0x05, 0xe3, 0x4c, 0x6e, 0x0f,
|
||||
0x1d, 0xde, 0x12, 0x1e, 0x72, 0x2b, 0xd9, 0x56, 0xc1, 0xa5, 0x56, 0x9d, 0xd5, 0x36, 0xbb, 0xf1,
|
||||
0x85, 0x7f, 0x1c, 0x78, 0xae, 0x6f, 0xcc, 0xfb, 0x74, 0x0b, 0x7c, 0x85, 0xf8, 0x6b, 0xc0, 0x8f,
|
||||
0xc1, 0x8d, 0x69, 0x55, 0x74, 0x1f, 0xe1, 0x04, 0x1e, 0x9b, 0xad, 0x69, 0xb9, 0x7c, 0xff, 0x83,
|
||||
0x14, 0x54, 0xed, 0xea, 0x94, 0x64, 0xac, 0x8c, 0xfa, 0xf8, 0xd3, 0xe5, 0xad, 0xff, 0x34, 0x1d,
|
||||
0xe9, 0xed, 0x87, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x00, 0x13, 0x1c, 0xbf, 0x03, 0x00,
|
||||
0x00,
|
||||
}
|
||||
50
proto/privval/msgs.proto
Normal file
50
proto/privval/msgs.proto
Normal file
@@ -0,0 +1,50 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.privval;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/privval";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/crypto/keys/types.proto";
|
||||
import "proto/types/types.proto";
|
||||
|
||||
message RemoteSignerError {
|
||||
int32 code = 1;
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
// PubKeyRequest requests the consensus public key from the remote signer.
|
||||
message PubKeyRequest {}
|
||||
|
||||
// PubKeyResponse is a response message containing the public key.
|
||||
message PubKeyResponse {
|
||||
tendermint.proto.crypto.keys.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
|
||||
RemoteSignerError error = 2;
|
||||
}
|
||||
|
||||
// SignVoteRequest is a request to sign a vote
|
||||
message SignVoteRequest {
|
||||
tendermint.proto.types.Vote vote = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SignedVoteResponse is a response containing a signed vote or an error
|
||||
message SignVoteResponse {
|
||||
tendermint.proto.types.Vote vote = 1 [(gogoproto.nullable) = false];
|
||||
RemoteSignerError error = 2;
|
||||
}
|
||||
|
||||
// SignProposalRequest is a request to sign a proposal
|
||||
message SignProposalRequest {
|
||||
tendermint.proto.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SignedProposalResponse is response containing a signed proposal or an error
|
||||
message SignedProposalResponse {
|
||||
tendermint.proto.types.Proposal proposal = 1 [(gogoproto.nullable) = false];
|
||||
RemoteSignerError error = 2;
|
||||
}
|
||||
|
||||
// PingRequest is a request to confirm that the connection is alive.
|
||||
message PingRequest {}
|
||||
|
||||
// PingResponse is a response to confirm that the connection is alive.
|
||||
message PingResponse {}
|
||||
199
proto/privval/types.pb.go
Normal file
199
proto/privval/types.pb.go
Normal file
@@ -0,0 +1,199 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/privval/types.proto
|
||||
|
||||
package privval
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
keys "github.com/tendermint/tendermint/proto/crypto/keys"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// FilePVKey stores the immutable part of PrivValidator.
|
||||
type FilePVKey struct {
|
||||
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
PubKey keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
|
||||
PrivKey keys.PrivateKey `protobuf:"bytes,3,opt,name=priv_key,json=privKey,proto3" json:"priv_key"`
|
||||
FilePath string `protobuf:"bytes,4,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *FilePVKey) Reset() { *m = FilePVKey{} }
|
||||
func (m *FilePVKey) String() string { return proto.CompactTextString(m) }
|
||||
func (*FilePVKey) ProtoMessage() {}
|
||||
func (*FilePVKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a9d74c406df3ad93, []int{0}
|
||||
}
|
||||
func (m *FilePVKey) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_FilePVKey.Unmarshal(m, b)
|
||||
}
|
||||
func (m *FilePVKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_FilePVKey.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *FilePVKey) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_FilePVKey.Merge(m, src)
|
||||
}
|
||||
func (m *FilePVKey) XXX_Size() int {
|
||||
return xxx_messageInfo_FilePVKey.Size(m)
|
||||
}
|
||||
func (m *FilePVKey) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_FilePVKey.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_FilePVKey proto.InternalMessageInfo
|
||||
|
||||
func (m *FilePVKey) GetAddress() []byte {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *FilePVKey) GetPubKey() keys.PublicKey {
|
||||
if m != nil {
|
||||
return m.PubKey
|
||||
}
|
||||
return keys.PublicKey{}
|
||||
}
|
||||
|
||||
func (m *FilePVKey) GetPrivKey() keys.PrivateKey {
|
||||
if m != nil {
|
||||
return m.PrivKey
|
||||
}
|
||||
return keys.PrivateKey{}
|
||||
}
|
||||
|
||||
func (m *FilePVKey) GetFilePath() string {
|
||||
if m != nil {
|
||||
return m.FilePath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// FilePVLastSignState stores the mutable part of PrivValidator.
|
||||
type FilePVLastSignState struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int64 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Step int32 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"`
|
||||
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
SignBytes []byte `protobuf:"bytes,5,opt,name=sign_bytes,json=signBytes,proto3" json:"sign_bytes,omitempty"`
|
||||
FilePath string `protobuf:"bytes,6,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *FilePVLastSignState) Reset() { *m = FilePVLastSignState{} }
|
||||
func (m *FilePVLastSignState) String() string { return proto.CompactTextString(m) }
|
||||
func (*FilePVLastSignState) ProtoMessage() {}
|
||||
func (*FilePVLastSignState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a9d74c406df3ad93, []int{1}
|
||||
}
|
||||
func (m *FilePVLastSignState) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_FilePVLastSignState.Unmarshal(m, b)
|
||||
}
|
||||
func (m *FilePVLastSignState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_FilePVLastSignState.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *FilePVLastSignState) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_FilePVLastSignState.Merge(m, src)
|
||||
}
|
||||
func (m *FilePVLastSignState) XXX_Size() int {
|
||||
return xxx_messageInfo_FilePVLastSignState.Size(m)
|
||||
}
|
||||
func (m *FilePVLastSignState) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_FilePVLastSignState.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_FilePVLastSignState proto.InternalMessageInfo
|
||||
|
||||
func (m *FilePVLastSignState) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *FilePVLastSignState) GetRound() int64 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *FilePVLastSignState) GetStep() int32 {
|
||||
if m != nil {
|
||||
return m.Step
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *FilePVLastSignState) GetSignature() []byte {
|
||||
if m != nil {
|
||||
return m.Signature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *FilePVLastSignState) GetSignBytes() []byte {
|
||||
if m != nil {
|
||||
return m.SignBytes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *FilePVLastSignState) GetFilePath() string {
|
||||
if m != nil {
|
||||
return m.FilePath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*FilePVKey)(nil), "tendermint.proto.privval.FilePVKey")
|
||||
proto.RegisterType((*FilePVLastSignState)(nil), "tendermint.proto.privval.FilePVLastSignState")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/privval/types.proto", fileDescriptor_a9d74c406df3ad93) }
|
||||
|
||||
var fileDescriptor_a9d74c406df3ad93 = []byte{
|
||||
// 357 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4d, 0x6e, 0xe2, 0x30,
|
||||
0x14, 0x9e, 0x0c, 0x10, 0x88, 0x87, 0x95, 0x67, 0x34, 0xca, 0x30, 0x45, 0x45, 0x2c, 0xda, 0xac,
|
||||
0x92, 0xaa, 0xbd, 0x01, 0x0b, 0xa4, 0x8a, 0x2e, 0x50, 0x90, 0xba, 0xe8, 0x26, 0x72, 0xc8, 0x6b,
|
||||
0x62, 0x11, 0x12, 0xcb, 0x7e, 0x41, 0xf2, 0xb1, 0x7a, 0x8b, 0x5e, 0xa0, 0xdb, 0x9e, 0xa5, 0xb2,
|
||||
0x43, 0x15, 0x50, 0x17, 0xdd, 0xbd, 0xef, 0xf3, 0xf3, 0xf7, 0x63, 0x99, 0xfc, 0x13, 0xb2, 0xc6,
|
||||
0x3a, 0x12, 0x92, 0x1f, 0x0e, 0xac, 0x8c, 0x50, 0x0b, 0x50, 0xa1, 0xe5, 0xa8, 0x8f, 0x50, 0x65,
|
||||
0x20, 0xf7, 0xbc, 0xc2, 0x96, 0x09, 0x8f, 0x5b, 0x93, 0x2b, 0x2c, 0xb8, 0xcc, 0x12, 0xc1, 0x24,
|
||||
0xea, 0xa8, 0x15, 0xc8, 0xeb, 0xbc, 0xee, 0xa6, 0x76, 0x7f, 0x32, 0x6d, 0x99, 0xad, 0xd4, 0x02,
|
||||
0xeb, 0x68, 0x07, 0x5a, 0x9d, 0x1a, 0xcc, 0xdf, 0x1c, 0xe2, 0x2d, 0x79, 0x09, 0xeb, 0xc7, 0x15,
|
||||
0x68, 0xea, 0x93, 0x21, 0xcb, 0x32, 0x09, 0x4a, 0xf9, 0xce, 0xcc, 0x09, 0xc6, 0xf1, 0x27, 0xa4,
|
||||
0x4b, 0x32, 0x14, 0x4d, 0x9a, 0xec, 0x40, 0xfb, 0x3f, 0x67, 0x4e, 0xf0, 0xeb, 0xf6, 0x3a, 0xfc,
|
||||
0x12, 0xad, 0xf5, 0x08, 0x8d, 0x47, 0xb8, 0x6e, 0xd2, 0x92, 0x6f, 0x57, 0xa0, 0x17, 0xfd, 0xd7,
|
||||
0xf7, 0xcb, 0x1f, 0xb1, 0x2b, 0x9a, 0xd4, 0x38, 0xdc, 0x93, 0x91, 0x69, 0x60, 0x85, 0x7a, 0x56,
|
||||
0x28, 0xf8, 0x46, 0x48, 0xf2, 0x03, 0x43, 0xe8, 0x94, 0x86, 0xe6, 0xbe, 0x91, 0xfa, 0x4f, 0xbc,
|
||||
0x67, 0x5e, 0x42, 0x22, 0x18, 0x16, 0x7e, 0x7f, 0xe6, 0x04, 0x5e, 0x3c, 0x32, 0xc4, 0x9a, 0x61,
|
||||
0x31, 0x7f, 0x71, 0xc8, 0xef, 0xb6, 0xd7, 0x03, 0x53, 0xb8, 0xe1, 0x79, 0xb5, 0x41, 0x86, 0x40,
|
||||
0xff, 0x12, 0xb7, 0x00, 0x9e, 0x17, 0x68, 0x0b, 0xf6, 0xe2, 0x23, 0xa2, 0x7f, 0xc8, 0x40, 0xd6,
|
||||
0x4d, 0x95, 0xd9, 0x76, 0xbd, 0xb8, 0x05, 0x94, 0x92, 0xbe, 0x42, 0x10, 0x36, 0xe9, 0x20, 0xb6,
|
||||
0x33, 0xbd, 0x20, 0x9e, 0xe2, 0x79, 0xc5, 0xb0, 0x91, 0x60, 0x6d, 0xc7, 0x71, 0x47, 0xd0, 0x29,
|
||||
0x21, 0x06, 0x24, 0xa9, 0x46, 0x50, 0xfe, 0xa0, 0x3b, 0x5e, 0x18, 0xe2, 0x3c, 0xb3, 0x7b, 0x9e,
|
||||
0x79, 0x71, 0xf3, 0x14, 0xe6, 0x1c, 0x8b, 0x26, 0x0d, 0xb7, 0xf5, 0x3e, 0xea, 0x5e, 0xe5, 0x74,
|
||||
0x3c, 0xfb, 0x2a, 0xa9, 0x6b, 0xe1, 0xdd, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xa3, 0x78,
|
||||
0xe9, 0x42, 0x02, 0x00, 0x00,
|
||||
}
|
||||
27
proto/privval/types.proto
Normal file
27
proto/privval/types.proto
Normal file
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.privval;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/privval";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/crypto/keys/types.proto";
|
||||
|
||||
// FilePVKey stores the immutable part of PrivValidator.
|
||||
message FilePVKey {
|
||||
bytes address = 1;
|
||||
tendermint.proto.crypto.keys.PublicKey pub_key = 2 [(gogoproto.nullable) = false];
|
||||
tendermint.proto.crypto.keys.PrivateKey priv_key = 3 [(gogoproto.nullable) = false];
|
||||
|
||||
string file_path = 4;
|
||||
}
|
||||
|
||||
// FilePVLastSignState stores the mutable part of PrivValidator.
|
||||
message FilePVLastSignState {
|
||||
int64 height = 1;
|
||||
int64 round = 2;
|
||||
int32 step = 3;
|
||||
bytes signature = 4;
|
||||
bytes sign_bytes = 5;
|
||||
|
||||
string file_path = 6;
|
||||
}
|
||||
431
proto/state/types.pb.go
Normal file
431
proto/state/types.pb.go
Normal file
@@ -0,0 +1,431 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/state/types.proto
|
||||
|
||||
package state
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/golang/protobuf/ptypes/timestamp"
|
||||
types "github.com/tendermint/tendermint/abci/types"
|
||||
types1 "github.com/tendermint/tendermint/proto/types"
|
||||
version "github.com/tendermint/tendermint/proto/version"
|
||||
math "math"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// ABCIResponses retains the responses
|
||||
// of the various ABCI calls during block processing.
|
||||
// It is persisted to disk for each height before calling Commit.
|
||||
type ABCIResponses struct {
|
||||
DeliverTxs []*types.ResponseDeliverTx `protobuf:"bytes,1,rep,name=deliver_txs,json=deliverTxs,proto3" json:"deliver_txs,omitempty"`
|
||||
EndBlock *types.ResponseEndBlock `protobuf:"bytes,2,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"`
|
||||
BeginBlock *types.ResponseBeginBlock `protobuf:"bytes,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ABCIResponses) Reset() { *m = ABCIResponses{} }
|
||||
func (m *ABCIResponses) String() string { return proto.CompactTextString(m) }
|
||||
func (*ABCIResponses) ProtoMessage() {}
|
||||
func (*ABCIResponses) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_00e69fef8162ea9b, []int{0}
|
||||
}
|
||||
func (m *ABCIResponses) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ABCIResponses.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ABCIResponses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ABCIResponses.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ABCIResponses) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ABCIResponses.Merge(m, src)
|
||||
}
|
||||
func (m *ABCIResponses) XXX_Size() int {
|
||||
return xxx_messageInfo_ABCIResponses.Size(m)
|
||||
}
|
||||
func (m *ABCIResponses) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ABCIResponses.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ABCIResponses proto.InternalMessageInfo
|
||||
|
||||
func (m *ABCIResponses) GetDeliverTxs() []*types.ResponseDeliverTx {
|
||||
if m != nil {
|
||||
return m.DeliverTxs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ABCIResponses) GetEndBlock() *types.ResponseEndBlock {
|
||||
if m != nil {
|
||||
return m.EndBlock
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ABCIResponses) GetBeginBlock() *types.ResponseBeginBlock {
|
||||
if m != nil {
|
||||
return m.BeginBlock
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ValidatorsInfo represents the latest validator set, or the last height it changed
|
||||
type ValidatorsInfo struct {
|
||||
ValidatorSet *types1.ValidatorSet `protobuf:"bytes,1,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty"`
|
||||
LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ValidatorsInfo) Reset() { *m = ValidatorsInfo{} }
|
||||
func (m *ValidatorsInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*ValidatorsInfo) ProtoMessage() {}
|
||||
func (*ValidatorsInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_00e69fef8162ea9b, []int{1}
|
||||
}
|
||||
func (m *ValidatorsInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ValidatorsInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ValidatorsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ValidatorsInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ValidatorsInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ValidatorsInfo.Merge(m, src)
|
||||
}
|
||||
func (m *ValidatorsInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_ValidatorsInfo.Size(m)
|
||||
}
|
||||
func (m *ValidatorsInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ValidatorsInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ValidatorsInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *ValidatorsInfo) GetValidatorSet() *types1.ValidatorSet {
|
||||
if m != nil {
|
||||
return m.ValidatorSet
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ValidatorsInfo) GetLastHeightChanged() int64 {
|
||||
if m != nil {
|
||||
return m.LastHeightChanged
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// ConsensusParamsInfo represents the latest consensus params, or the last height it changed
|
||||
type ConsensusParamsInfo struct {
|
||||
ConsensusParams types1.ConsensusParams `protobuf:"bytes,1,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"`
|
||||
LastHeightChanged int64 `protobuf:"varint,2,opt,name=last_height_changed,json=lastHeightChanged,proto3" json:"last_height_changed,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ConsensusParamsInfo) Reset() { *m = ConsensusParamsInfo{} }
|
||||
func (m *ConsensusParamsInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConsensusParamsInfo) ProtoMessage() {}
|
||||
func (*ConsensusParamsInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_00e69fef8162ea9b, []int{2}
|
||||
}
|
||||
func (m *ConsensusParamsInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ConsensusParamsInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ConsensusParamsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ConsensusParamsInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ConsensusParamsInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConsensusParamsInfo.Merge(m, src)
|
||||
}
|
||||
func (m *ConsensusParamsInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_ConsensusParamsInfo.Size(m)
|
||||
}
|
||||
func (m *ConsensusParamsInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ConsensusParamsInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ConsensusParamsInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *ConsensusParamsInfo) GetConsensusParams() types1.ConsensusParams {
|
||||
if m != nil {
|
||||
return m.ConsensusParams
|
||||
}
|
||||
return types1.ConsensusParams{}
|
||||
}
|
||||
|
||||
func (m *ConsensusParamsInfo) GetLastHeightChanged() int64 {
|
||||
if m != nil {
|
||||
return m.LastHeightChanged
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Version struct {
|
||||
Consensus version.Consensus `protobuf:"bytes,1,opt,name=consensus,proto3" json:"consensus"`
|
||||
Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Version) Reset() { *m = Version{} }
|
||||
func (m *Version) String() string { return proto.CompactTextString(m) }
|
||||
func (*Version) ProtoMessage() {}
|
||||
func (*Version) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_00e69fef8162ea9b, []int{3}
|
||||
}
|
||||
func (m *Version) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Version.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Version.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Version) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Version.Merge(m, src)
|
||||
}
|
||||
func (m *Version) XXX_Size() int {
|
||||
return xxx_messageInfo_Version.Size(m)
|
||||
}
|
||||
func (m *Version) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Version.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Version proto.InternalMessageInfo
|
||||
|
||||
func (m *Version) GetConsensus() version.Consensus {
|
||||
if m != nil {
|
||||
return m.Consensus
|
||||
}
|
||||
return version.Consensus{}
|
||||
}
|
||||
|
||||
func (m *Version) GetSoftware() string {
|
||||
if m != nil {
|
||||
return m.Software
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type State struct {
|
||||
Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
|
||||
// immutable
|
||||
ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
|
||||
// LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
|
||||
LastBlockHeight int64 `protobuf:"varint,3,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"`
|
||||
LastBlockID types1.BlockID `protobuf:"bytes,4,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
|
||||
LastBlockTime time.Time `protobuf:"bytes,5,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"`
|
||||
// LastValidators is used to validate block.LastCommit.
|
||||
// Validators are persisted to the database separately every time they change,
|
||||
// so we can query for historical validator sets.
|
||||
// Note that if s.LastBlockHeight causes a valset change,
|
||||
// we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1
|
||||
// Extra +1 due to nextValSet delay.
|
||||
NextValidators *types1.ValidatorSet `protobuf:"bytes,6,opt,name=next_validators,json=nextValidators,proto3" json:"next_validators,omitempty"`
|
||||
Validators *types1.ValidatorSet `protobuf:"bytes,7,opt,name=validators,proto3" json:"validators,omitempty"`
|
||||
LastValidators *types1.ValidatorSet `protobuf:"bytes,8,opt,name=last_validators,json=lastValidators,proto3" json:"last_validators,omitempty"`
|
||||
LastHeightValidatorsChanged int64 `protobuf:"varint,9,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"`
|
||||
// Consensus parameters used for validating blocks.
|
||||
// Changes returned by EndBlock and updated after Commit.
|
||||
ConsensusParams types1.ConsensusParams `protobuf:"bytes,10,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"`
|
||||
LastHeightConsensusParamsChanged int64 `protobuf:"varint,11,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"`
|
||||
// Merkle root of the results from executing prev block
|
||||
LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
|
||||
// the latest AppHash we've received from calling abci.Commit()
|
||||
AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *State) Reset() { *m = State{} }
|
||||
func (m *State) String() string { return proto.CompactTextString(m) }
|
||||
func (*State) ProtoMessage() {}
|
||||
func (*State) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_00e69fef8162ea9b, []int{4}
|
||||
}
|
||||
func (m *State) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_State.Unmarshal(m, b)
|
||||
}
|
||||
func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_State.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *State) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_State.Merge(m, src)
|
||||
}
|
||||
func (m *State) XXX_Size() int {
|
||||
return xxx_messageInfo_State.Size(m)
|
||||
}
|
||||
func (m *State) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_State.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_State proto.InternalMessageInfo
|
||||
|
||||
func (m *State) GetVersion() Version {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
}
|
||||
return Version{}
|
||||
}
|
||||
|
||||
func (m *State) GetChainID() string {
|
||||
if m != nil {
|
||||
return m.ChainID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *State) GetLastBlockHeight() int64 {
|
||||
if m != nil {
|
||||
return m.LastBlockHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *State) GetLastBlockID() types1.BlockID {
|
||||
if m != nil {
|
||||
return m.LastBlockID
|
||||
}
|
||||
return types1.BlockID{}
|
||||
}
|
||||
|
||||
func (m *State) GetLastBlockTime() time.Time {
|
||||
if m != nil {
|
||||
return m.LastBlockTime
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *State) GetNextValidators() *types1.ValidatorSet {
|
||||
if m != nil {
|
||||
return m.NextValidators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *State) GetValidators() *types1.ValidatorSet {
|
||||
if m != nil {
|
||||
return m.Validators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *State) GetLastValidators() *types1.ValidatorSet {
|
||||
if m != nil {
|
||||
return m.LastValidators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *State) GetLastHeightValidatorsChanged() int64 {
|
||||
if m != nil {
|
||||
return m.LastHeightValidatorsChanged
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *State) GetConsensusParams() types1.ConsensusParams {
|
||||
if m != nil {
|
||||
return m.ConsensusParams
|
||||
}
|
||||
return types1.ConsensusParams{}
|
||||
}
|
||||
|
||||
func (m *State) GetLastHeightConsensusParamsChanged() int64 {
|
||||
if m != nil {
|
||||
return m.LastHeightConsensusParamsChanged
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *State) GetLastResultsHash() []byte {
|
||||
if m != nil {
|
||||
return m.LastResultsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *State) GetAppHash() []byte {
|
||||
if m != nil {
|
||||
return m.AppHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ABCIResponses)(nil), "tendermint.proto.state.ABCIResponses")
|
||||
proto.RegisterType((*ValidatorsInfo)(nil), "tendermint.proto.state.ValidatorsInfo")
|
||||
proto.RegisterType((*ConsensusParamsInfo)(nil), "tendermint.proto.state.ConsensusParamsInfo")
|
||||
proto.RegisterType((*Version)(nil), "tendermint.proto.state.Version")
|
||||
proto.RegisterType((*State)(nil), "tendermint.proto.state.State")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/state/types.proto", fileDescriptor_00e69fef8162ea9b) }
|
||||
|
||||
var fileDescriptor_00e69fef8162ea9b = []byte{
|
||||
// 729 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x5d, 0x6a, 0xdb, 0x4a,
|
||||
0x18, 0xbd, 0xba, 0x4e, 0x62, 0xfb, 0x53, 0x1c, 0xdf, 0x3b, 0x81, 0x5c, 0x5d, 0x07, 0x6a, 0xe3,
|
||||
0x86, 0xc4, 0x2d, 0x45, 0x86, 0x74, 0x01, 0xa5, 0xb2, 0x4b, 0xa3, 0x92, 0x96, 0xa2, 0x84, 0x10,
|
||||
0xfa, 0x22, 0xc6, 0xd6, 0x44, 0x12, 0xb5, 0x25, 0xa1, 0x19, 0xbb, 0xc9, 0x1a, 0xfa, 0xd2, 0x1d,
|
||||
0x74, 0x3b, 0x5d, 0x85, 0x0b, 0x79, 0xee, 0x22, 0xca, 0xfc, 0x48, 0x9e, 0xfc, 0x11, 0x0c, 0x7d,
|
||||
0xf2, 0x68, 0xce, 0x77, 0xce, 0x77, 0x66, 0xe6, 0x7c, 0x18, 0xfe, 0xcb, 0xf2, 0x94, 0xa5, 0x7d,
|
||||
0xca, 0x30, 0x23, 0x7d, 0x76, 0x95, 0x11, 0x6a, 0x8b, 0x1d, 0xb4, 0xc3, 0x48, 0x12, 0x90, 0x7c,
|
||||
0x1a, 0x27, 0x4c, 0xee, 0xd8, 0xa2, 0xa6, 0xb5, 0xcf, 0xa2, 0x38, 0x0f, 0xfc, 0x0c, 0xe7, 0xec,
|
||||
0xaa, 0x2f, 0xc9, 0x61, 0x1a, 0xa6, 0xcb, 0x95, 0xac, 0x6e, 0xed, 0xe0, 0xd1, 0x38, 0x96, 0x8a,
|
||||
0xba, 0x6e, 0x4b, 0x35, 0xbc, 0x0b, 0xec, 0xea, 0xc0, 0x1c, 0x4f, 0xe2, 0x00, 0xb3, 0x34, 0x57,
|
||||
0xa0, 0xa5, 0x83, 0x19, 0xce, 0xf1, 0xf4, 0x16, 0x6d, 0x4e, 0x72, 0x1a, 0xa7, 0x49, 0xf1, 0xab,
|
||||
0xc0, 0x76, 0x98, 0xa6, 0xe1, 0x84, 0x48, 0x9f, 0xa3, 0xd9, 0x45, 0x9f, 0xc5, 0x53, 0x42, 0x19,
|
||||
0x9e, 0x66, 0xb2, 0xa0, 0xfb, 0xcb, 0x80, 0xc6, 0x6b, 0x67, 0xe0, 0x7a, 0x84, 0x66, 0x69, 0x42,
|
||||
0x09, 0x45, 0x2e, 0x98, 0x01, 0x99, 0xc4, 0x73, 0x92, 0xfb, 0xec, 0x92, 0x5a, 0x46, 0xa7, 0xd2,
|
||||
0x33, 0x0f, 0x7b, 0xb6, 0x76, 0x1b, 0xfc, 0x60, 0xb6, 0x74, 0x5e, 0xd0, 0x86, 0x92, 0x71, 0x7a,
|
||||
0xe9, 0x41, 0x50, 0x2c, 0x29, 0x1a, 0x42, 0x9d, 0x24, 0x81, 0x3f, 0x9a, 0xa4, 0xe3, 0xcf, 0xd6,
|
||||
0xdf, 0x1d, 0xa3, 0x67, 0x1e, 0x1e, 0x3c, 0x22, 0xf4, 0x26, 0x09, 0x1c, 0x5e, 0xee, 0xd5, 0x88,
|
||||
0x5a, 0xa1, 0x77, 0x60, 0x8e, 0x48, 0x18, 0x27, 0x4a, 0xa7, 0x22, 0x74, 0x9e, 0x3d, 0xa2, 0xe3,
|
||||
0x70, 0x86, 0x54, 0x82, 0x51, 0xb9, 0xee, 0x7e, 0x35, 0x60, 0xeb, 0xac, 0xb8, 0x5a, 0xea, 0x26,
|
||||
0x17, 0x29, 0x72, 0xa1, 0x51, 0x5e, 0xb6, 0x4f, 0x09, 0xb3, 0x0c, 0xd1, 0x60, 0xcf, 0xbe, 0xf3,
|
||||
0xfe, 0xb2, 0x43, 0x49, 0x3f, 0x21, 0xcc, 0xdb, 0x9c, 0x6b, 0x5f, 0xc8, 0x86, 0xed, 0x09, 0xa6,
|
||||
0xcc, 0x8f, 0x48, 0x1c, 0x46, 0xcc, 0x1f, 0x47, 0x38, 0x09, 0x49, 0x20, 0x4e, 0x5e, 0xf1, 0xfe,
|
||||
0xe5, 0xd0, 0x91, 0x40, 0x06, 0x12, 0xe8, 0x7e, 0x37, 0x60, 0x7b, 0xc0, 0xdd, 0x26, 0x74, 0x46,
|
||||
0x3f, 0x8a, 0x47, 0x15, 0x96, 0xce, 0xe1, 0x9f, 0x71, 0xb1, 0xed, 0xcb, 0xc7, 0x56, 0xae, 0x0e,
|
||||
0x1e, 0x72, 0x75, 0x4b, 0xc6, 0x59, 0xfb, 0xb1, 0x68, 0xff, 0xe5, 0x35, 0xc7, 0x37, 0xb7, 0x57,
|
||||
0x76, 0x98, 0x40, 0xf5, 0x4c, 0x06, 0x0a, 0xbd, 0x85, 0x7a, 0xa9, 0xa6, 0xdc, 0x3c, 0xbd, 0xeb,
|
||||
0xa6, 0x88, 0x5f, 0xe9, 0x47, 0x39, 0x59, 0x72, 0x51, 0x0b, 0x6a, 0x34, 0xbd, 0x60, 0x5f, 0x70,
|
||||
0x4e, 0x44, 0xe3, 0xba, 0x57, 0x7e, 0x77, 0x17, 0x1b, 0xb0, 0x7e, 0xc2, 0xc7, 0x0c, 0xbd, 0x82,
|
||||
0xaa, 0xd2, 0x52, 0xcd, 0xda, 0xf6, 0xfd, 0x03, 0x69, 0x2b, 0x83, 0xaa, 0x51, 0xc1, 0x42, 0xfb,
|
||||
0x50, 0x1b, 0x47, 0x38, 0x4e, 0xfc, 0x58, 0x9e, 0xaf, 0xee, 0x98, 0xd7, 0x8b, 0x76, 0x75, 0xc0,
|
||||
0xf7, 0xdc, 0xa1, 0x57, 0x15, 0xa0, 0x1b, 0xa0, 0xe7, 0x20, 0xce, 0x2d, 0xd3, 0xa5, 0x2e, 0x46,
|
||||
0x84, 0xac, 0xe2, 0x35, 0x39, 0x20, 0x82, 0x23, 0x6f, 0x05, 0x9d, 0x43, 0x43, 0xab, 0x8d, 0x03,
|
||||
0x6b, 0xed, 0x21, 0x6b, 0xf2, 0x55, 0x04, 0xd7, 0x1d, 0x3a, 0xdb, 0xdc, 0xda, 0xf5, 0xa2, 0x6d,
|
||||
0x1e, 0x17, 0x82, 0xee, 0xd0, 0x33, 0x4b, 0x75, 0x37, 0x40, 0xc7, 0xd0, 0xd4, 0x94, 0xf9, 0x94,
|
||||
0x5a, 0xeb, 0x42, 0xbb, 0x65, 0xcb, 0x11, 0xb6, 0x8b, 0x11, 0xb6, 0x4f, 0x8b, 0x11, 0x76, 0x6a,
|
||||
0x5c, 0xf6, 0xdb, 0xcf, 0xb6, 0xe1, 0x35, 0x4a, 0x2d, 0x8e, 0xa2, 0xf7, 0xd0, 0x4c, 0xc8, 0x25,
|
||||
0xf3, 0xcb, 0x74, 0x52, 0x6b, 0x63, 0x85, 0x54, 0x6f, 0x71, 0xf2, 0x72, 0x4c, 0xd0, 0x10, 0x40,
|
||||
0x53, 0xaa, 0xae, 0xa0, 0xa4, 0xf1, 0xb8, 0x29, 0x71, 0x44, 0x4d, 0xaa, 0xb6, 0x8a, 0x29, 0x4e,
|
||||
0xd6, 0x4c, 0x0d, 0xe0, 0x89, 0x1e, 0xe5, 0xa5, 0x6a, 0x99, 0xea, 0xba, 0x78, 0xc4, 0xdd, 0x65,
|
||||
0xaa, 0x97, 0x6c, 0x95, 0xef, 0x7b, 0x27, 0x0d, 0xfe, 0xc8, 0xa4, 0x7d, 0x80, 0xbd, 0x1b, 0x93,
|
||||
0x76, 0xab, 0x4b, 0x69, 0xd2, 0x14, 0x26, 0x3b, 0xda, 0xe8, 0xdd, 0x14, 0x2a, 0x9c, 0x16, 0x31,
|
||||
0xcd, 0x09, 0x9d, 0x4d, 0x18, 0xf5, 0x23, 0x4c, 0x23, 0x6b, 0xb3, 0x63, 0xf4, 0x36, 0x65, 0x4c,
|
||||
0x3d, 0xb9, 0x7f, 0x84, 0x69, 0x84, 0xfe, 0x87, 0x1a, 0xce, 0x32, 0x59, 0xd2, 0x10, 0x25, 0x55,
|
||||
0x9c, 0x65, 0x1c, 0x72, 0xec, 0x4f, 0x2f, 0xc2, 0x98, 0x45, 0xb3, 0x91, 0x3d, 0x4e, 0xa7, 0xfd,
|
||||
0xe5, 0x11, 0xf5, 0xa5, 0xf6, 0x8f, 0x38, 0xda, 0x10, 0x1f, 0x2f, 0x7f, 0x07, 0x00, 0x00, 0xff,
|
||||
0xff, 0x93, 0x33, 0x0f, 0xa0, 0x27, 0x07, 0x00, 0x00,
|
||||
}
|
||||
74
proto/state/types.proto
Normal file
74
proto/state/types.proto
Normal file
@@ -0,0 +1,74 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.state;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/state";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "abci/types/types.proto";
|
||||
import "proto/types/types.proto";
|
||||
import "proto/types/validator.proto";
|
||||
import "proto/types/params.proto";
|
||||
import "proto/version/version.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// ABCIResponses retains the responses
|
||||
// of the various ABCI calls during block processing.
|
||||
// It is persisted to disk for each height before calling Commit.
|
||||
message ABCIResponses {
|
||||
repeated tendermint.abci.types.ResponseDeliverTx deliver_txs = 1;
|
||||
tendermint.abci.types.ResponseEndBlock end_block = 2;
|
||||
tendermint.abci.types.ResponseBeginBlock begin_block = 3;
|
||||
}
|
||||
|
||||
// ValidatorsInfo represents the latest validator set, or the last height it changed
|
||||
message ValidatorsInfo {
|
||||
tendermint.proto.types.ValidatorSet validator_set = 1;
|
||||
int64 last_height_changed = 2;
|
||||
}
|
||||
|
||||
// ConsensusParamsInfo represents the latest consensus params, or the last height it changed
|
||||
message ConsensusParamsInfo {
|
||||
tendermint.proto.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false];
|
||||
int64 last_height_changed = 2;
|
||||
}
|
||||
|
||||
message Version {
|
||||
tendermint.proto.version.Consensus consensus = 1 [(gogoproto.nullable) = false];
|
||||
string software = 2;
|
||||
}
|
||||
|
||||
message State {
|
||||
Version version = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// immutable
|
||||
string chain_id = 2 [(gogoproto.customname) = "ChainID"];
|
||||
|
||||
// LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
|
||||
int64 last_block_height = 3;
|
||||
tendermint.proto.types.BlockID last_block_id = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"];
|
||||
google.protobuf.Timestamp last_block_time = 5
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
|
||||
// LastValidators is used to validate block.LastCommit.
|
||||
// Validators are persisted to the database separately every time they change,
|
||||
// so we can query for historical validator sets.
|
||||
// Note that if s.LastBlockHeight causes a valset change,
|
||||
// we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1
|
||||
// Extra +1 due to nextValSet delay.
|
||||
tendermint.proto.types.ValidatorSet next_validators = 6;
|
||||
tendermint.proto.types.ValidatorSet validators = 7;
|
||||
tendermint.proto.types.ValidatorSet last_validators = 8;
|
||||
int64 last_height_validators_changed = 9;
|
||||
|
||||
// Consensus parameters used for validating blocks.
|
||||
// Changes returned by EndBlock and updated after Commit.
|
||||
tendermint.proto.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false];
|
||||
int64 last_height_consensus_params_changed = 11;
|
||||
|
||||
// Merkle root of the results from executing prev block
|
||||
bytes last_results_hash = 12;
|
||||
|
||||
// the latest AppHash we've received from calling abci.Commit()
|
||||
bytes app_hash = 13;
|
||||
}
|
||||
385
proto/statesync/types.pb.go
Normal file
385
proto/statesync/types.pb.go
Normal file
@@ -0,0 +1,385 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/statesync/types.proto
|
||||
|
||||
package statesync
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Message struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *Message_SnapshotsRequest
|
||||
// *Message_SnapshotsResponse
|
||||
// *Message_ChunkRequest
|
||||
// *Message_ChunkResponse
|
||||
Sum isMessage_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Message) Reset() { *m = Message{} }
|
||||
func (m *Message) String() string { return proto.CompactTextString(m) }
|
||||
func (*Message) ProtoMessage() {}
|
||||
func (*Message) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bef273312884335b, []int{0}
|
||||
}
|
||||
func (m *Message) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Message.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Message) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Message.Merge(m, src)
|
||||
}
|
||||
func (m *Message) XXX_Size() int {
|
||||
return xxx_messageInfo_Message.Size(m)
|
||||
}
|
||||
func (m *Message) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Message.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Message proto.InternalMessageInfo
|
||||
|
||||
type isMessage_Sum interface {
|
||||
isMessage_Sum()
|
||||
}
|
||||
|
||||
type Message_SnapshotsRequest struct {
|
||||
SnapshotsRequest *SnapshotsRequest `protobuf:"bytes,1,opt,name=snapshots_request,json=snapshotsRequest,proto3,oneof" json:"snapshots_request,omitempty"`
|
||||
}
|
||||
type Message_SnapshotsResponse struct {
|
||||
SnapshotsResponse *SnapshotsResponse `protobuf:"bytes,2,opt,name=snapshots_response,json=snapshotsResponse,proto3,oneof" json:"snapshots_response,omitempty"`
|
||||
}
|
||||
type Message_ChunkRequest struct {
|
||||
ChunkRequest *ChunkRequest `protobuf:"bytes,3,opt,name=chunk_request,json=chunkRequest,proto3,oneof" json:"chunk_request,omitempty"`
|
||||
}
|
||||
type Message_ChunkResponse struct {
|
||||
ChunkResponse *ChunkResponse `protobuf:"bytes,4,opt,name=chunk_response,json=chunkResponse,proto3,oneof" json:"chunk_response,omitempty"`
|
||||
}
|
||||
|
||||
func (*Message_SnapshotsRequest) isMessage_Sum() {}
|
||||
func (*Message_SnapshotsResponse) isMessage_Sum() {}
|
||||
func (*Message_ChunkRequest) isMessage_Sum() {}
|
||||
func (*Message_ChunkResponse) isMessage_Sum() {}
|
||||
|
||||
func (m *Message) GetSum() isMessage_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetSnapshotsRequest() *SnapshotsRequest {
|
||||
if x, ok := m.GetSum().(*Message_SnapshotsRequest); ok {
|
||||
return x.SnapshotsRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetSnapshotsResponse() *SnapshotsResponse {
|
||||
if x, ok := m.GetSum().(*Message_SnapshotsResponse); ok {
|
||||
return x.SnapshotsResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetChunkRequest() *ChunkRequest {
|
||||
if x, ok := m.GetSum().(*Message_ChunkRequest); ok {
|
||||
return x.ChunkRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetChunkResponse() *ChunkResponse {
|
||||
if x, ok := m.GetSum().(*Message_ChunkResponse); ok {
|
||||
return x.ChunkResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Message) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*Message_SnapshotsRequest)(nil),
|
||||
(*Message_SnapshotsResponse)(nil),
|
||||
(*Message_ChunkRequest)(nil),
|
||||
(*Message_ChunkResponse)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
type SnapshotsRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SnapshotsRequest) Reset() { *m = SnapshotsRequest{} }
|
||||
func (m *SnapshotsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SnapshotsRequest) ProtoMessage() {}
|
||||
func (*SnapshotsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bef273312884335b, []int{1}
|
||||
}
|
||||
func (m *SnapshotsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SnapshotsRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SnapshotsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SnapshotsRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SnapshotsRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SnapshotsRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SnapshotsRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SnapshotsRequest.Size(m)
|
||||
}
|
||||
func (m *SnapshotsRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SnapshotsRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SnapshotsRequest proto.InternalMessageInfo
|
||||
|
||||
type SnapshotsResponse struct {
|
||||
Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
|
||||
Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"`
|
||||
Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
Metadata []byte `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SnapshotsResponse) Reset() { *m = SnapshotsResponse{} }
|
||||
func (m *SnapshotsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SnapshotsResponse) ProtoMessage() {}
|
||||
func (*SnapshotsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bef273312884335b, []int{2}
|
||||
}
|
||||
func (m *SnapshotsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SnapshotsResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SnapshotsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SnapshotsResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SnapshotsResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SnapshotsResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SnapshotsResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SnapshotsResponse.Size(m)
|
||||
}
|
||||
func (m *SnapshotsResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SnapshotsResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SnapshotsResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SnapshotsResponse) GetHeight() uint64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SnapshotsResponse) GetFormat() uint32 {
|
||||
if m != nil {
|
||||
return m.Format
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SnapshotsResponse) GetChunks() uint32 {
|
||||
if m != nil {
|
||||
return m.Chunks
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *SnapshotsResponse) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SnapshotsResponse) GetMetadata() []byte {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ChunkRequest struct {
|
||||
Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
|
||||
Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ChunkRequest) Reset() { *m = ChunkRequest{} }
|
||||
func (m *ChunkRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ChunkRequest) ProtoMessage() {}
|
||||
func (*ChunkRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bef273312884335b, []int{3}
|
||||
}
|
||||
func (m *ChunkRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ChunkRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ChunkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ChunkRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ChunkRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ChunkRequest.Merge(m, src)
|
||||
}
|
||||
func (m *ChunkRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_ChunkRequest.Size(m)
|
||||
}
|
||||
func (m *ChunkRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ChunkRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ChunkRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *ChunkRequest) GetHeight() uint64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ChunkRequest) GetFormat() uint32 {
|
||||
if m != nil {
|
||||
return m.Format
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ChunkRequest) GetIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ChunkResponse struct {
|
||||
Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"`
|
||||
Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
|
||||
Chunk []byte `protobuf:"bytes,4,opt,name=chunk,proto3" json:"chunk,omitempty"`
|
||||
Missing bool `protobuf:"varint,5,opt,name=missing,proto3" json:"missing,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ChunkResponse) Reset() { *m = ChunkResponse{} }
|
||||
func (m *ChunkResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ChunkResponse) ProtoMessage() {}
|
||||
func (*ChunkResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_bef273312884335b, []int{4}
|
||||
}
|
||||
func (m *ChunkResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ChunkResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ChunkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ChunkResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ChunkResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ChunkResponse.Merge(m, src)
|
||||
}
|
||||
func (m *ChunkResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_ChunkResponse.Size(m)
|
||||
}
|
||||
func (m *ChunkResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ChunkResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ChunkResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *ChunkResponse) GetHeight() uint64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ChunkResponse) GetFormat() uint32 {
|
||||
if m != nil {
|
||||
return m.Format
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ChunkResponse) GetIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ChunkResponse) GetChunk() []byte {
|
||||
if m != nil {
|
||||
return m.Chunk
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ChunkResponse) GetMissing() bool {
|
||||
if m != nil {
|
||||
return m.Missing
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Message)(nil), "tendermint.proto.statesync.Message")
|
||||
proto.RegisterType((*SnapshotsRequest)(nil), "tendermint.proto.statesync.SnapshotsRequest")
|
||||
proto.RegisterType((*SnapshotsResponse)(nil), "tendermint.proto.statesync.SnapshotsResponse")
|
||||
proto.RegisterType((*ChunkRequest)(nil), "tendermint.proto.statesync.ChunkRequest")
|
||||
proto.RegisterType((*ChunkResponse)(nil), "tendermint.proto.statesync.ChunkResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/statesync/types.proto", fileDescriptor_bef273312884335b) }
|
||||
|
||||
var fileDescriptor_bef273312884335b = []byte{
|
||||
// 357 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xcd, 0x4a, 0xc3, 0x40,
|
||||
0x14, 0x85, 0x9b, 0xfe, 0x73, 0x6d, 0xa4, 0x1d, 0x44, 0x42, 0xdd, 0x48, 0x56, 0x15, 0x34, 0x95,
|
||||
0xfa, 0x06, 0x75, 0xd3, 0x8d, 0x08, 0xa3, 0x2b, 0x05, 0x65, 0x9a, 0x8e, 0x49, 0x90, 0x4c, 0x62,
|
||||
0xee, 0x04, 0xec, 0x03, 0xb8, 0xf2, 0x6d, 0x7d, 0x02, 0xc9, 0x4d, 0x9a, 0xc6, 0x88, 0x52, 0xc1,
|
||||
0xdd, 0x9c, 0x43, 0xee, 0x97, 0x73, 0xee, 0x30, 0x70, 0x14, 0x27, 0x91, 0x8e, 0xa6, 0xa8, 0x85,
|
||||
0x96, 0xb8, 0x56, 0xee, 0x54, 0xaf, 0x63, 0x89, 0x0e, 0xb9, 0x6c, 0xac, 0xa5, 0x5a, 0xc9, 0x24,
|
||||
0x0c, 0x94, 0xce, 0x1d, 0xa7, 0xfc, 0xce, 0xfe, 0x68, 0x42, 0xef, 0x4a, 0x22, 0x0a, 0x4f, 0xb2,
|
||||
0x7b, 0x18, 0xa1, 0x12, 0x31, 0xfa, 0x91, 0xc6, 0xc7, 0x44, 0xbe, 0xa4, 0x12, 0xb5, 0x65, 0x1c,
|
||||
0x1b, 0x93, 0xbd, 0xd9, 0xa9, 0xf3, 0x33, 0xc3, 0xb9, 0xd9, 0x0c, 0xf1, 0x7c, 0x66, 0xd1, 0xe0,
|
||||
0x43, 0xac, 0x79, 0xec, 0x01, 0x58, 0x15, 0x8e, 0x71, 0xa4, 0x50, 0x5a, 0x4d, 0xa2, 0x9f, 0xed,
|
||||
0x48, 0xcf, 0x87, 0x16, 0x0d, 0x3e, 0xc2, 0xba, 0xc9, 0xae, 0xc1, 0x74, 0xfd, 0x54, 0x3d, 0x97,
|
||||
0xc1, 0x5b, 0x84, 0x9e, 0xfc, 0x86, 0xbe, 0xcc, 0x06, 0xb6, 0xa1, 0x07, 0x6e, 0x45, 0x33, 0x0e,
|
||||
0xfb, 0x1b, 0x60, 0x11, 0xb6, 0x4d, 0xc4, 0x93, 0x1d, 0x88, 0x65, 0x50, 0xd3, 0xad, 0x1a, 0xf3,
|
||||
0x0e, 0xb4, 0x30, 0x0d, 0x6d, 0x06, 0xc3, 0xfa, 0xce, 0xec, 0x77, 0x03, 0x46, 0xdf, 0xaa, 0xb2,
|
||||
0x43, 0xe8, 0xfa, 0x32, 0xf0, 0xfc, 0xfc, 0x1e, 0xda, 0xbc, 0x50, 0x99, 0xff, 0x14, 0x25, 0xa1,
|
||||
0xd0, 0xb4, 0x41, 0x93, 0x17, 0x2a, 0xf3, 0xe9, 0x8f, 0x48, 0xf5, 0x4d, 0x5e, 0x28, 0xc6, 0xa0,
|
||||
0xed, 0x0b, 0xf4, 0xa9, 0xc2, 0x80, 0xd3, 0x99, 0x8d, 0xa1, 0x1f, 0x4a, 0x2d, 0x56, 0x42, 0x0b,
|
||||
0xab, 0x43, 0x7e, 0xa9, 0xed, 0x5b, 0x18, 0x54, 0x97, 0xf3, 0xe7, 0x1c, 0x07, 0xd0, 0x09, 0xd4,
|
||||
0x4a, 0xbe, 0x16, 0x31, 0x72, 0x61, 0xbf, 0x19, 0x60, 0x7e, 0xd9, 0xd0, 0xff, 0x70, 0x33, 0x97,
|
||||
0x7a, 0x16, 0xf5, 0x72, 0xc1, 0x2c, 0xe8, 0x85, 0x01, 0x62, 0xa0, 0x3c, 0xaa, 0xd7, 0xe7, 0x1b,
|
||||
0x39, 0x9f, 0xdd, 0x9d, 0x7b, 0x81, 0xf6, 0xd3, 0xa5, 0xe3, 0x46, 0xe1, 0x74, 0x7b, 0x9d, 0xd5,
|
||||
0x63, 0xed, 0x41, 0x2d, 0xbb, 0x64, 0x5c, 0x7c, 0x06, 0x00, 0x00, 0xff, 0xff, 0x79, 0xd0, 0x53,
|
||||
0x2f, 0x6a, 0x03, 0x00, 0x00,
|
||||
}
|
||||
37
proto/statesync/types.proto
Normal file
37
proto/statesync/types.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.statesync;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/statesync";
|
||||
|
||||
message Message {
|
||||
oneof sum {
|
||||
SnapshotsRequest snapshots_request = 1;
|
||||
SnapshotsResponse snapshots_response = 2;
|
||||
ChunkRequest chunk_request = 3;
|
||||
ChunkResponse chunk_response = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message SnapshotsRequest {}
|
||||
|
||||
message SnapshotsResponse {
|
||||
uint64 height = 1;
|
||||
uint32 format = 2;
|
||||
uint32 chunks = 3;
|
||||
bytes hash = 4;
|
||||
bytes metadata = 5;
|
||||
}
|
||||
|
||||
message ChunkRequest {
|
||||
uint64 height = 1;
|
||||
uint32 format = 2;
|
||||
uint32 index = 3;
|
||||
}
|
||||
|
||||
message ChunkResponse {
|
||||
uint64 height = 1;
|
||||
uint32 format = 2;
|
||||
uint32 index = 3;
|
||||
bytes chunk = 4;
|
||||
bool missing = 5;
|
||||
}
|
||||
86
proto/store/types.pb.go
Normal file
86
proto/store/types.pb.go
Normal file
@@ -0,0 +1,86 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/store/types.proto
|
||||
|
||||
package store
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type BlockStoreState struct {
|
||||
Base int64 `protobuf:"varint,1,opt,name=base,proto3" json:"base,omitempty"`
|
||||
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockStoreState) Reset() { *m = BlockStoreState{} }
|
||||
func (m *BlockStoreState) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockStoreState) ProtoMessage() {}
|
||||
func (*BlockStoreState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_45a8553e38baf31c, []int{0}
|
||||
}
|
||||
func (m *BlockStoreState) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockStoreState.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockStoreState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockStoreState.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockStoreState) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockStoreState.Merge(m, src)
|
||||
}
|
||||
func (m *BlockStoreState) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockStoreState.Size(m)
|
||||
}
|
||||
func (m *BlockStoreState) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockStoreState.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockStoreState proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockStoreState) GetBase() int64 {
|
||||
if m != nil {
|
||||
return m.Base
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BlockStoreState) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*BlockStoreState)(nil), "tendermint.proto.store.BlockStoreState")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/store/types.proto", fileDescriptor_45a8553e38baf31c) }
|
||||
|
||||
var fileDescriptor_45a8553e38baf31c = []byte{
|
||||
// 138 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x2f, 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x03, 0x8b,
|
||||
0x08, 0x89, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4, 0xc0,
|
||||
0x6a, 0x94, 0x6c, 0xb9, 0xf8, 0x9d, 0x72, 0xf2, 0x93, 0xb3, 0x83, 0x41, 0xbc, 0xe0, 0x92, 0xc4,
|
||||
0x92, 0x54, 0x21, 0x21, 0x2e, 0x96, 0xa4, 0xc4, 0xe2, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xe6,
|
||||
0x20, 0x30, 0x5b, 0x48, 0x8c, 0x8b, 0x2d, 0x23, 0x35, 0x33, 0x3d, 0xa3, 0x44, 0x82, 0x09, 0x2c,
|
||||
0x0a, 0xe5, 0x39, 0xe9, 0x45, 0xe9, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7,
|
||||
0xea, 0x23, 0xec, 0x40, 0x66, 0x22, 0x39, 0x29, 0x89, 0x0d, 0xcc, 0x31, 0x06, 0x04, 0x00, 0x00,
|
||||
0xff, 0xff, 0xb2, 0x6b, 0x69, 0x83, 0xa8, 0x00, 0x00, 0x00,
|
||||
}
|
||||
9
proto/store/types.proto
Normal file
9
proto/store/types.proto
Normal file
@@ -0,0 +1,9 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.store;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/store";
|
||||
|
||||
message BlockStoreState {
|
||||
int64 base = 1;
|
||||
int64 height = 2;
|
||||
}
|
||||
110
proto/types/block.pb.go
Normal file
110
proto/types/block.pb.go
Normal file
@@ -0,0 +1,110 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/types/block.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Block struct {
|
||||
Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"`
|
||||
Data Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
|
||||
Evidence EvidenceData `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"`
|
||||
LastCommit *Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Block) Reset() { *m = Block{} }
|
||||
func (m *Block) String() string { return proto.CompactTextString(m) }
|
||||
func (*Block) ProtoMessage() {}
|
||||
func (*Block) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3aa007336dea920d, []int{0}
|
||||
}
|
||||
func (m *Block) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Block.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Block) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Block.Merge(m, src)
|
||||
}
|
||||
func (m *Block) XXX_Size() int {
|
||||
return xxx_messageInfo_Block.Size(m)
|
||||
}
|
||||
func (m *Block) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Block.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Block proto.InternalMessageInfo
|
||||
|
||||
func (m *Block) GetHeader() Header {
|
||||
if m != nil {
|
||||
return m.Header
|
||||
}
|
||||
return Header{}
|
||||
}
|
||||
|
||||
func (m *Block) GetData() Data {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return Data{}
|
||||
}
|
||||
|
||||
func (m *Block) GetEvidence() EvidenceData {
|
||||
if m != nil {
|
||||
return m.Evidence
|
||||
}
|
||||
return EvidenceData{}
|
||||
}
|
||||
|
||||
func (m *Block) GetLastCommit() *Commit {
|
||||
if m != nil {
|
||||
return m.LastCommit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Block)(nil), "tendermint.proto.types.Block")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/types/block.proto", fileDescriptor_3aa007336dea920d) }
|
||||
|
||||
var fileDescriptor_3aa007336dea920d = []byte{
|
||||
// 248 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 0x4f, 0xce, 0xd6, 0x03, 0x8b,
|
||||
0x08, 0x89, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4, 0xc0,
|
||||
0x6a, 0xa4, 0xd4, 0x4a, 0x32, 0x32, 0x8b, 0x52, 0xe2, 0x0b, 0x12, 0x8b, 0x4a, 0x2a, 0xf5, 0x21,
|
||||
0x9a, 0xd3, 0xf3, 0xd3, 0xf3, 0x11, 0x2c, 0x88, 0x6a, 0x29, 0x14, 0x83, 0xc1, 0x24, 0x54, 0x42,
|
||||
0x0a, 0x59, 0x22, 0xb5, 0x2c, 0x33, 0x25, 0x35, 0x2f, 0x39, 0x15, 0x22, 0xa7, 0xd4, 0xc6, 0xc4,
|
||||
0xc5, 0xea, 0x04, 0x72, 0x84, 0x90, 0x0d, 0x17, 0x5b, 0x46, 0x6a, 0x62, 0x4a, 0x6a, 0x91, 0x04,
|
||||
0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x9c, 0x1e, 0x76, 0xf7, 0xe8, 0x79, 0x80, 0x55, 0x39, 0xb1,
|
||||
0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0xd5, 0x23, 0x64, 0xc6, 0xc5, 0x92, 0x92, 0x58, 0x92, 0x28,
|
||||
0xc1, 0x04, 0xd6, 0x2b, 0x83, 0x4b, 0xaf, 0x4b, 0x62, 0x49, 0x22, 0x54, 0x27, 0x58, 0xbd, 0x90,
|
||||
0x1b, 0x17, 0x07, 0xcc, 0x45, 0x12, 0xcc, 0x60, 0xbd, 0x2a, 0xb8, 0xf4, 0xba, 0x42, 0xd5, 0x21,
|
||||
0x99, 0x01, 0xd7, 0x2b, 0x64, 0xcf, 0xc5, 0x9d, 0x93, 0x58, 0x5c, 0x12, 0x9f, 0x9c, 0x9f, 0x9b,
|
||||
0x9b, 0x59, 0x22, 0xc1, 0x82, 0xdf, 0x0b, 0xce, 0x60, 0x55, 0x41, 0x5c, 0x20, 0x2d, 0x10, 0xb6,
|
||||
0x93, 0x5e, 0x94, 0x4e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x42,
|
||||
0x1f, 0x32, 0x13, 0x29, 0x1c, 0x93, 0xd8, 0xc0, 0x1c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0x46, 0x9a, 0x1b, 0xf7, 0xcf, 0x01, 0x00, 0x00,
|
||||
}
|
||||
15
proto/types/block.proto
Normal file
15
proto/types/block.proto
Normal file
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.types;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/types";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/types/types.proto";
|
||||
import "proto/types/evidence.proto";
|
||||
|
||||
message Block {
|
||||
Header header = 1 [(gogoproto.nullable) = false];
|
||||
Data data = 2 [(gogoproto.nullable) = false];
|
||||
tendermint.proto.types.EvidenceData evidence = 3 [(gogoproto.nullable) = false];
|
||||
Commit last_commit = 4;
|
||||
}
|
||||
96
proto/types/events.pb.go
Normal file
96
proto/types/events.pb.go
Normal file
@@ -0,0 +1,96 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/types/events.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type EventDataRoundState struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
Step string `protobuf:"bytes,3,opt,name=step,proto3" json:"step,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *EventDataRoundState) Reset() { *m = EventDataRoundState{} }
|
||||
func (m *EventDataRoundState) String() string { return proto.CompactTextString(m) }
|
||||
func (*EventDataRoundState) ProtoMessage() {}
|
||||
func (*EventDataRoundState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_1bb9bdae76a076d6, []int{0}
|
||||
}
|
||||
func (m *EventDataRoundState) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EventDataRoundState.Unmarshal(m, b)
|
||||
}
|
||||
func (m *EventDataRoundState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_EventDataRoundState.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *EventDataRoundState) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_EventDataRoundState.Merge(m, src)
|
||||
}
|
||||
func (m *EventDataRoundState) XXX_Size() int {
|
||||
return xxx_messageInfo_EventDataRoundState.Size(m)
|
||||
}
|
||||
func (m *EventDataRoundState) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_EventDataRoundState.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_EventDataRoundState proto.InternalMessageInfo
|
||||
|
||||
func (m *EventDataRoundState) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *EventDataRoundState) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *EventDataRoundState) GetStep() string {
|
||||
if m != nil {
|
||||
return m.Step
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*EventDataRoundState)(nil), "tendermint.proto.types.EventDataRoundState")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/types/events.proto", fileDescriptor_1bb9bdae76a076d6) }
|
||||
|
||||
var fileDescriptor_1bb9bdae76a076d6 = []byte{
|
||||
// 162 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x03,
|
||||
0x0b, 0x09, 0x89, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95, 0x40, 0x44, 0xf4,
|
||||
0xc0, 0x8a, 0x94, 0xc2, 0xb9, 0x84, 0x5d, 0x41, 0xea, 0x5c, 0x12, 0x4b, 0x12, 0x83, 0xf2, 0x4b,
|
||||
0xf3, 0x52, 0x82, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33,
|
||||
0x4a, 0x24, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0xa0, 0x3c, 0x21, 0x11, 0x2e, 0xd6, 0x22, 0x90,
|
||||
0x2a, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xd6, 0x20, 0x08, 0x47, 0x48, 0x88, 0x8b, 0xa5, 0xb8, 0x24,
|
||||
0xb5, 0x40, 0x82, 0x59, 0x81, 0x51, 0x83, 0x33, 0x08, 0xcc, 0x76, 0xd2, 0x8b, 0xd2, 0x49, 0xcf,
|
||||
0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x47, 0xd8, 0x8e, 0xcc, 0x44, 0x72, 0x6d,
|
||||
0x12, 0x1b, 0x98, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x3c, 0x7d, 0xad, 0xc3, 0x00,
|
||||
0x00, 0x00,
|
||||
}
|
||||
10
proto/types/events.proto
Normal file
10
proto/types/events.proto
Normal file
@@ -0,0 +1,10 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.types;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/types";
|
||||
|
||||
message EventDataRoundState {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
string step = 3;
|
||||
}
|
||||
634
proto/types/evidence.pb.go
Normal file
634
proto/types/evidence.pb.go
Normal file
@@ -0,0 +1,634 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/types/evidence.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/golang/protobuf/ptypes/timestamp"
|
||||
keys "github.com/tendermint/tendermint/proto/crypto/keys"
|
||||
math "math"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// DuplicateVoteEvidence contains evidence a validator signed two conflicting
|
||||
// votes.
|
||||
type DuplicateVoteEvidence struct {
|
||||
PubKey *keys.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
|
||||
VoteA *Vote `protobuf:"bytes,2,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"`
|
||||
VoteB *Vote `protobuf:"bytes,3,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *DuplicateVoteEvidence) Reset() { *m = DuplicateVoteEvidence{} }
|
||||
func (m *DuplicateVoteEvidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*DuplicateVoteEvidence) ProtoMessage() {}
|
||||
func (*DuplicateVoteEvidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{0}
|
||||
}
|
||||
func (m *DuplicateVoteEvidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DuplicateVoteEvidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *DuplicateVoteEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_DuplicateVoteEvidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *DuplicateVoteEvidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_DuplicateVoteEvidence.Merge(m, src)
|
||||
}
|
||||
func (m *DuplicateVoteEvidence) XXX_Size() int {
|
||||
return xxx_messageInfo_DuplicateVoteEvidence.Size(m)
|
||||
}
|
||||
func (m *DuplicateVoteEvidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_DuplicateVoteEvidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_DuplicateVoteEvidence proto.InternalMessageInfo
|
||||
|
||||
func (m *DuplicateVoteEvidence) GetPubKey() *keys.PublicKey {
|
||||
if m != nil {
|
||||
return m.PubKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DuplicateVoteEvidence) GetVoteA() *Vote {
|
||||
if m != nil {
|
||||
return m.VoteA
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DuplicateVoteEvidence) GetVoteB() *Vote {
|
||||
if m != nil {
|
||||
return m.VoteB
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PotentialAmnesiaEvidence struct {
|
||||
VoteA *Vote `protobuf:"bytes,1,opt,name=vote_a,json=voteA,proto3" json:"vote_a,omitempty"`
|
||||
VoteB *Vote `protobuf:"bytes,2,opt,name=vote_b,json=voteB,proto3" json:"vote_b,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PotentialAmnesiaEvidence) Reset() { *m = PotentialAmnesiaEvidence{} }
|
||||
func (m *PotentialAmnesiaEvidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*PotentialAmnesiaEvidence) ProtoMessage() {}
|
||||
func (*PotentialAmnesiaEvidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{1}
|
||||
}
|
||||
func (m *PotentialAmnesiaEvidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PotentialAmnesiaEvidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PotentialAmnesiaEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PotentialAmnesiaEvidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PotentialAmnesiaEvidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PotentialAmnesiaEvidence.Merge(m, src)
|
||||
}
|
||||
func (m *PotentialAmnesiaEvidence) XXX_Size() int {
|
||||
return xxx_messageInfo_PotentialAmnesiaEvidence.Size(m)
|
||||
}
|
||||
func (m *PotentialAmnesiaEvidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PotentialAmnesiaEvidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PotentialAmnesiaEvidence proto.InternalMessageInfo
|
||||
|
||||
func (m *PotentialAmnesiaEvidence) GetVoteA() *Vote {
|
||||
if m != nil {
|
||||
return m.VoteA
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PotentialAmnesiaEvidence) GetVoteB() *Vote {
|
||||
if m != nil {
|
||||
return m.VoteB
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// MockEvidence is used for testing pruposes
|
||||
type MockEvidence struct {
|
||||
EvidenceHeight int64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"`
|
||||
EvidenceTime time.Time `protobuf:"bytes,2,opt,name=evidence_time,json=evidenceTime,proto3,stdtime" json:"evidence_time"`
|
||||
EvidenceAddress []byte `protobuf:"bytes,3,opt,name=evidence_address,json=evidenceAddress,proto3" json:"evidence_address,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MockEvidence) Reset() { *m = MockEvidence{} }
|
||||
func (m *MockEvidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*MockEvidence) ProtoMessage() {}
|
||||
func (*MockEvidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{2}
|
||||
}
|
||||
func (m *MockEvidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MockEvidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MockEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MockEvidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MockEvidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MockEvidence.Merge(m, src)
|
||||
}
|
||||
func (m *MockEvidence) XXX_Size() int {
|
||||
return xxx_messageInfo_MockEvidence.Size(m)
|
||||
}
|
||||
func (m *MockEvidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MockEvidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MockEvidence proto.InternalMessageInfo
|
||||
|
||||
func (m *MockEvidence) GetEvidenceHeight() int64 {
|
||||
if m != nil {
|
||||
return m.EvidenceHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MockEvidence) GetEvidenceTime() time.Time {
|
||||
if m != nil {
|
||||
return m.EvidenceTime
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *MockEvidence) GetEvidenceAddress() []byte {
|
||||
if m != nil {
|
||||
return m.EvidenceAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MockRandomEvidence struct {
|
||||
EvidenceHeight int64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"`
|
||||
EvidenceTime time.Time `protobuf:"bytes,2,opt,name=evidence_time,json=evidenceTime,proto3,stdtime" json:"evidence_time"`
|
||||
EvidenceAddress []byte `protobuf:"bytes,3,opt,name=evidence_address,json=evidenceAddress,proto3" json:"evidence_address,omitempty"`
|
||||
RandBytes []byte `protobuf:"bytes,4,opt,name=rand_bytes,json=randBytes,proto3" json:"rand_bytes,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MockRandomEvidence) Reset() { *m = MockRandomEvidence{} }
|
||||
func (m *MockRandomEvidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*MockRandomEvidence) ProtoMessage() {}
|
||||
func (*MockRandomEvidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{3}
|
||||
}
|
||||
func (m *MockRandomEvidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MockRandomEvidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MockRandomEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MockRandomEvidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MockRandomEvidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MockRandomEvidence.Merge(m, src)
|
||||
}
|
||||
func (m *MockRandomEvidence) XXX_Size() int {
|
||||
return xxx_messageInfo_MockRandomEvidence.Size(m)
|
||||
}
|
||||
func (m *MockRandomEvidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MockRandomEvidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MockRandomEvidence proto.InternalMessageInfo
|
||||
|
||||
func (m *MockRandomEvidence) GetEvidenceHeight() int64 {
|
||||
if m != nil {
|
||||
return m.EvidenceHeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MockRandomEvidence) GetEvidenceTime() time.Time {
|
||||
if m != nil {
|
||||
return m.EvidenceTime
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *MockRandomEvidence) GetEvidenceAddress() []byte {
|
||||
if m != nil {
|
||||
return m.EvidenceAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MockRandomEvidence) GetRandBytes() []byte {
|
||||
if m != nil {
|
||||
return m.RandBytes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ConflictingHeadersEvidence struct {
|
||||
H1 *SignedHeader `protobuf:"bytes,1,opt,name=h1,proto3" json:"h1,omitempty"`
|
||||
H2 *SignedHeader `protobuf:"bytes,2,opt,name=h2,proto3" json:"h2,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ConflictingHeadersEvidence) Reset() { *m = ConflictingHeadersEvidence{} }
|
||||
func (m *ConflictingHeadersEvidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConflictingHeadersEvidence) ProtoMessage() {}
|
||||
func (*ConflictingHeadersEvidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{4}
|
||||
}
|
||||
func (m *ConflictingHeadersEvidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ConflictingHeadersEvidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ConflictingHeadersEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ConflictingHeadersEvidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ConflictingHeadersEvidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConflictingHeadersEvidence.Merge(m, src)
|
||||
}
|
||||
func (m *ConflictingHeadersEvidence) XXX_Size() int {
|
||||
return xxx_messageInfo_ConflictingHeadersEvidence.Size(m)
|
||||
}
|
||||
func (m *ConflictingHeadersEvidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ConflictingHeadersEvidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ConflictingHeadersEvidence proto.InternalMessageInfo
|
||||
|
||||
func (m *ConflictingHeadersEvidence) GetH1() *SignedHeader {
|
||||
if m != nil {
|
||||
return m.H1
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ConflictingHeadersEvidence) GetH2() *SignedHeader {
|
||||
if m != nil {
|
||||
return m.H2
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type LunaticValidatorEvidence struct {
|
||||
Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Vote *Vote `protobuf:"bytes,2,opt,name=vote,proto3" json:"vote,omitempty"`
|
||||
InvalidHeaderField string `protobuf:"bytes,3,opt,name=invalid_header_field,json=invalidHeaderField,proto3" json:"invalid_header_field,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LunaticValidatorEvidence) Reset() { *m = LunaticValidatorEvidence{} }
|
||||
func (m *LunaticValidatorEvidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*LunaticValidatorEvidence) ProtoMessage() {}
|
||||
func (*LunaticValidatorEvidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{5}
|
||||
}
|
||||
func (m *LunaticValidatorEvidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LunaticValidatorEvidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LunaticValidatorEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LunaticValidatorEvidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LunaticValidatorEvidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LunaticValidatorEvidence.Merge(m, src)
|
||||
}
|
||||
func (m *LunaticValidatorEvidence) XXX_Size() int {
|
||||
return xxx_messageInfo_LunaticValidatorEvidence.Size(m)
|
||||
}
|
||||
func (m *LunaticValidatorEvidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LunaticValidatorEvidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LunaticValidatorEvidence proto.InternalMessageInfo
|
||||
|
||||
func (m *LunaticValidatorEvidence) GetHeader() *Header {
|
||||
if m != nil {
|
||||
return m.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LunaticValidatorEvidence) GetVote() *Vote {
|
||||
if m != nil {
|
||||
return m.Vote
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LunaticValidatorEvidence) GetInvalidHeaderField() string {
|
||||
if m != nil {
|
||||
return m.InvalidHeaderField
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Evidence struct {
|
||||
// Types that are valid to be assigned to Sum:
|
||||
// *Evidence_DuplicateVoteEvidence
|
||||
// *Evidence_ConflictingHeadersEvidence
|
||||
// *Evidence_LunaticValidatorEvidence
|
||||
// *Evidence_PotentialAmnesiaEvidence
|
||||
// *Evidence_MockEvidence
|
||||
// *Evidence_MockRandomEvidence
|
||||
Sum isEvidence_Sum `protobuf_oneof:"sum"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Evidence) Reset() { *m = Evidence{} }
|
||||
func (m *Evidence) String() string { return proto.CompactTextString(m) }
|
||||
func (*Evidence) ProtoMessage() {}
|
||||
func (*Evidence) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{6}
|
||||
}
|
||||
func (m *Evidence) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Evidence.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Evidence.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Evidence) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Evidence.Merge(m, src)
|
||||
}
|
||||
func (m *Evidence) XXX_Size() int {
|
||||
return xxx_messageInfo_Evidence.Size(m)
|
||||
}
|
||||
func (m *Evidence) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Evidence.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Evidence proto.InternalMessageInfo
|
||||
|
||||
type isEvidence_Sum interface {
|
||||
isEvidence_Sum()
|
||||
}
|
||||
|
||||
type Evidence_DuplicateVoteEvidence struct {
|
||||
DuplicateVoteEvidence *DuplicateVoteEvidence `protobuf:"bytes,1,opt,name=duplicate_vote_evidence,json=duplicateVoteEvidence,proto3,oneof" json:"duplicate_vote_evidence,omitempty"`
|
||||
}
|
||||
type Evidence_ConflictingHeadersEvidence struct {
|
||||
ConflictingHeadersEvidence *ConflictingHeadersEvidence `protobuf:"bytes,2,opt,name=conflicting_headers_evidence,json=conflictingHeadersEvidence,proto3,oneof" json:"conflicting_headers_evidence,omitempty"`
|
||||
}
|
||||
type Evidence_LunaticValidatorEvidence struct {
|
||||
LunaticValidatorEvidence *LunaticValidatorEvidence `protobuf:"bytes,3,opt,name=lunatic_validator_evidence,json=lunaticValidatorEvidence,proto3,oneof" json:"lunatic_validator_evidence,omitempty"`
|
||||
}
|
||||
type Evidence_PotentialAmnesiaEvidence struct {
|
||||
PotentialAmnesiaEvidence *PotentialAmnesiaEvidence `protobuf:"bytes,4,opt,name=potential_amnesia_evidence,json=potentialAmnesiaEvidence,proto3,oneof" json:"potential_amnesia_evidence,omitempty"`
|
||||
}
|
||||
type Evidence_MockEvidence struct {
|
||||
MockEvidence *MockEvidence `protobuf:"bytes,5,opt,name=mock_evidence,json=mockEvidence,proto3,oneof" json:"mock_evidence,omitempty"`
|
||||
}
|
||||
type Evidence_MockRandomEvidence struct {
|
||||
MockRandomEvidence *MockRandomEvidence `protobuf:"bytes,6,opt,name=mock_random_evidence,json=mockRandomEvidence,proto3,oneof" json:"mock_random_evidence,omitempty"`
|
||||
}
|
||||
|
||||
func (*Evidence_DuplicateVoteEvidence) isEvidence_Sum() {}
|
||||
func (*Evidence_ConflictingHeadersEvidence) isEvidence_Sum() {}
|
||||
func (*Evidence_LunaticValidatorEvidence) isEvidence_Sum() {}
|
||||
func (*Evidence_PotentialAmnesiaEvidence) isEvidence_Sum() {}
|
||||
func (*Evidence_MockEvidence) isEvidence_Sum() {}
|
||||
func (*Evidence_MockRandomEvidence) isEvidence_Sum() {}
|
||||
|
||||
func (m *Evidence) GetSum() isEvidence_Sum {
|
||||
if m != nil {
|
||||
return m.Sum
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Evidence) GetDuplicateVoteEvidence() *DuplicateVoteEvidence {
|
||||
if x, ok := m.GetSum().(*Evidence_DuplicateVoteEvidence); ok {
|
||||
return x.DuplicateVoteEvidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Evidence) GetConflictingHeadersEvidence() *ConflictingHeadersEvidence {
|
||||
if x, ok := m.GetSum().(*Evidence_ConflictingHeadersEvidence); ok {
|
||||
return x.ConflictingHeadersEvidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Evidence) GetLunaticValidatorEvidence() *LunaticValidatorEvidence {
|
||||
if x, ok := m.GetSum().(*Evidence_LunaticValidatorEvidence); ok {
|
||||
return x.LunaticValidatorEvidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Evidence) GetPotentialAmnesiaEvidence() *PotentialAmnesiaEvidence {
|
||||
if x, ok := m.GetSum().(*Evidence_PotentialAmnesiaEvidence); ok {
|
||||
return x.PotentialAmnesiaEvidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Evidence) GetMockEvidence() *MockEvidence {
|
||||
if x, ok := m.GetSum().(*Evidence_MockEvidence); ok {
|
||||
return x.MockEvidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Evidence) GetMockRandomEvidence() *MockRandomEvidence {
|
||||
if x, ok := m.GetSum().(*Evidence_MockRandomEvidence); ok {
|
||||
return x.MockRandomEvidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// XXX_OneofWrappers is for the internal use of the proto package.
|
||||
func (*Evidence) XXX_OneofWrappers() []interface{} {
|
||||
return []interface{}{
|
||||
(*Evidence_DuplicateVoteEvidence)(nil),
|
||||
(*Evidence_ConflictingHeadersEvidence)(nil),
|
||||
(*Evidence_LunaticValidatorEvidence)(nil),
|
||||
(*Evidence_PotentialAmnesiaEvidence)(nil),
|
||||
(*Evidence_MockEvidence)(nil),
|
||||
(*Evidence_MockRandomEvidence)(nil),
|
||||
}
|
||||
}
|
||||
|
||||
// EvidenceData contains any evidence of malicious wrong-doing by validators
|
||||
type EvidenceData struct {
|
||||
Evidence []Evidence `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence"`
|
||||
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *EvidenceData) Reset() { *m = EvidenceData{} }
|
||||
func (m *EvidenceData) String() string { return proto.CompactTextString(m) }
|
||||
func (*EvidenceData) ProtoMessage() {}
|
||||
func (*EvidenceData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{7}
|
||||
}
|
||||
func (m *EvidenceData) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EvidenceData.Unmarshal(m, b)
|
||||
}
|
||||
func (m *EvidenceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_EvidenceData.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *EvidenceData) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_EvidenceData.Merge(m, src)
|
||||
}
|
||||
func (m *EvidenceData) XXX_Size() int {
|
||||
return xxx_messageInfo_EvidenceData.Size(m)
|
||||
}
|
||||
func (m *EvidenceData) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_EvidenceData.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_EvidenceData proto.InternalMessageInfo
|
||||
|
||||
func (m *EvidenceData) GetEvidence() []Evidence {
|
||||
if m != nil {
|
||||
return m.Evidence
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *EvidenceData) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ProofOfLockChange struct {
|
||||
Votes []Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"`
|
||||
PubKey keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ProofOfLockChange) Reset() { *m = ProofOfLockChange{} }
|
||||
func (m *ProofOfLockChange) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProofOfLockChange) ProtoMessage() {}
|
||||
func (*ProofOfLockChange) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_86495eef24aeacc0, []int{8}
|
||||
}
|
||||
func (m *ProofOfLockChange) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ProofOfLockChange.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ProofOfLockChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ProofOfLockChange.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ProofOfLockChange) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ProofOfLockChange.Merge(m, src)
|
||||
}
|
||||
func (m *ProofOfLockChange) XXX_Size() int {
|
||||
return xxx_messageInfo_ProofOfLockChange.Size(m)
|
||||
}
|
||||
func (m *ProofOfLockChange) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ProofOfLockChange.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ProofOfLockChange proto.InternalMessageInfo
|
||||
|
||||
func (m *ProofOfLockChange) GetVotes() []Vote {
|
||||
if m != nil {
|
||||
return m.Votes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ProofOfLockChange) GetPubKey() keys.PublicKey {
|
||||
if m != nil {
|
||||
return m.PubKey
|
||||
}
|
||||
return keys.PublicKey{}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*DuplicateVoteEvidence)(nil), "tendermint.proto.types.DuplicateVoteEvidence")
|
||||
proto.RegisterType((*PotentialAmnesiaEvidence)(nil), "tendermint.proto.types.PotentialAmnesiaEvidence")
|
||||
proto.RegisterType((*MockEvidence)(nil), "tendermint.proto.types.MockEvidence")
|
||||
proto.RegisterType((*MockRandomEvidence)(nil), "tendermint.proto.types.MockRandomEvidence")
|
||||
proto.RegisterType((*ConflictingHeadersEvidence)(nil), "tendermint.proto.types.ConflictingHeadersEvidence")
|
||||
proto.RegisterType((*LunaticValidatorEvidence)(nil), "tendermint.proto.types.LunaticValidatorEvidence")
|
||||
proto.RegisterType((*Evidence)(nil), "tendermint.proto.types.Evidence")
|
||||
proto.RegisterType((*EvidenceData)(nil), "tendermint.proto.types.EvidenceData")
|
||||
proto.RegisterType((*ProofOfLockChange)(nil), "tendermint.proto.types.ProofOfLockChange")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/types/evidence.proto", fileDescriptor_86495eef24aeacc0) }
|
||||
|
||||
var fileDescriptor_86495eef24aeacc0 = []byte{
|
||||
// 784 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcb, 0x6e, 0xdb, 0x38,
|
||||
0x14, 0xb5, 0xfc, 0x9a, 0x84, 0x71, 0xe6, 0x41, 0x24, 0x13, 0x43, 0x48, 0x26, 0x81, 0x30, 0x98,
|
||||
0x64, 0x06, 0x33, 0x72, 0xe2, 0x0c, 0x8a, 0x2e, 0x1b, 0x27, 0x0d, 0x5c, 0x24, 0x45, 0x03, 0xb5,
|
||||
0xc8, 0xa2, 0x8b, 0x0a, 0x94, 0x44, 0x4b, 0x84, 0x25, 0x51, 0x90, 0x28, 0x03, 0x5a, 0xb7, 0x8b,
|
||||
0x2e, 0xbb, 0xe9, 0x67, 0x74, 0xdb, 0x1f, 0xe8, 0xa6, 0xeb, 0x7e, 0x40, 0xfb, 0x2b, 0x85, 0x48,
|
||||
0x4a, 0x72, 0x90, 0xc8, 0x70, 0xbb, 0xeb, 0x26, 0x60, 0x2e, 0xef, 0x3d, 0xe7, 0x90, 0xf7, 0xea,
|
||||
0xd0, 0x40, 0x8d, 0x62, 0xca, 0xe8, 0x80, 0x65, 0x11, 0x4e, 0x06, 0x78, 0x46, 0x1c, 0x1c, 0xda,
|
||||
0x58, 0xe7, 0x41, 0xf8, 0x3b, 0xc3, 0xa1, 0x83, 0xe3, 0x80, 0x84, 0x4c, 0x44, 0x74, 0x9e, 0xa6,
|
||||
0xfe, 0xc5, 0x3c, 0x12, 0x3b, 0x66, 0x84, 0x62, 0x96, 0x0d, 0x44, 0xbd, 0x4b, 0x5d, 0x5a, 0xad,
|
||||
0x44, 0xb6, 0xba, 0x35, 0x8f, 0xcd, 0xff, 0xca, 0x8d, 0x5d, 0x97, 0x52, 0xd7, 0xc7, 0xa2, 0xd6,
|
||||
0x4a, 0x27, 0x03, 0x46, 0x02, 0x9c, 0x30, 0x14, 0x44, 0x32, 0x61, 0x47, 0x54, 0xda, 0x71, 0x16,
|
||||
0x31, 0x3a, 0x98, 0xe2, 0xec, 0x46, 0xbd, 0xf6, 0x41, 0x01, 0x9b, 0x67, 0x69, 0xe4, 0x13, 0x1b,
|
||||
0x31, 0x7c, 0x4d, 0x19, 0x7e, 0x28, 0x85, 0xc3, 0x07, 0xe0, 0xa7, 0x28, 0xb5, 0xcc, 0x29, 0xce,
|
||||
0xfa, 0xca, 0x9e, 0x72, 0xb0, 0x36, 0xdc, 0xd7, 0x6f, 0x1d, 0x42, 0xa0, 0xea, 0x39, 0xaa, 0x7e,
|
||||
0x95, 0x5a, 0x3e, 0xb1, 0x2f, 0x70, 0x66, 0x74, 0xa3, 0xd4, 0xba, 0xc0, 0x19, 0x3c, 0x06, 0xdd,
|
||||
0x19, 0x65, 0xd8, 0x44, 0xfd, 0x26, 0x07, 0xd8, 0xd6, 0xef, 0xbe, 0x05, 0x3d, 0xe7, 0x35, 0x3a,
|
||||
0x79, 0xee, 0x49, 0x59, 0x64, 0xf5, 0x5b, 0xcb, 0x16, 0x8d, 0xb4, 0x57, 0x0a, 0xe8, 0x5f, 0x51,
|
||||
0x86, 0x43, 0x46, 0x90, 0x7f, 0x12, 0x84, 0x38, 0x21, 0xa8, 0x3c, 0x48, 0x25, 0x43, 0xf9, 0x1e,
|
||||
0x19, 0xcd, 0xe5, 0x65, 0xbc, 0x53, 0x40, 0xef, 0x31, 0xb5, 0xa7, 0x25, 0xf5, 0x3e, 0xf8, 0xa5,
|
||||
0x18, 0x04, 0xd3, 0xc3, 0xc4, 0xf5, 0x18, 0xd7, 0xd0, 0x32, 0x7e, 0x2e, 0xc2, 0x63, 0x1e, 0x85,
|
||||
0x8f, 0xc0, 0x7a, 0x99, 0x98, 0x77, 0x50, 0xb2, 0xaa, 0xba, 0x68, 0xaf, 0x5e, 0xb4, 0x57, 0x7f,
|
||||
0x56, 0xb4, 0x77, 0xb4, 0xf2, 0xf1, 0xf3, 0x6e, 0xe3, 0xcd, 0x97, 0x5d, 0xc5, 0xe8, 0x15, 0xa5,
|
||||
0xf9, 0x26, 0xfc, 0x1b, 0xfc, 0x5a, 0x42, 0x21, 0xc7, 0x89, 0x71, 0x92, 0xf0, 0xab, 0xec, 0x19,
|
||||
0xa5, 0x96, 0x13, 0x11, 0xd6, 0x3e, 0x29, 0x00, 0xe6, 0x7a, 0x0d, 0x14, 0x3a, 0x34, 0xf8, 0x41,
|
||||
0x54, 0xc3, 0x1d, 0x00, 0x62, 0x14, 0x3a, 0xa6, 0x95, 0x31, 0x9c, 0xf4, 0xdb, 0x3c, 0x69, 0x35,
|
||||
0x8f, 0x8c, 0xf2, 0x80, 0xf6, 0x5a, 0x01, 0xea, 0x29, 0x0d, 0x27, 0x3e, 0xb1, 0x19, 0x09, 0xdd,
|
||||
0x31, 0x46, 0x0e, 0x8e, 0x93, 0xf2, 0x70, 0xff, 0x83, 0xa6, 0x77, 0x24, 0x27, 0xe1, 0xcf, 0xba,
|
||||
0xa6, 0x3e, 0x25, 0x6e, 0x88, 0x1d, 0x51, 0x6a, 0x34, 0xbd, 0x23, 0x5e, 0x35, 0x94, 0xc7, 0x5b,
|
||||
0xb6, 0x6a, 0xa8, 0xbd, 0x57, 0x40, 0xff, 0x32, 0x0d, 0x11, 0x23, 0xf6, 0x35, 0xf2, 0x89, 0x83,
|
||||
0x18, 0x8d, 0x4b, 0x21, 0xf7, 0x40, 0xd7, 0xe3, 0xa9, 0x52, 0xcc, 0x1f, 0x75, 0xb0, 0x12, 0x50,
|
||||
0x66, 0xc3, 0x43, 0xd0, 0xce, 0xa7, 0x6d, 0xa9, 0xb9, 0xe4, 0x99, 0xf0, 0x10, 0x6c, 0x90, 0x70,
|
||||
0x96, 0x0b, 0x30, 0x05, 0x86, 0x39, 0x21, 0xd8, 0x77, 0xf8, 0xfd, 0xae, 0x1a, 0x50, 0xee, 0x09,
|
||||
0x9a, 0xf3, 0x7c, 0x47, 0x7b, 0xd9, 0x01, 0x2b, 0xa5, 0x50, 0x17, 0x6c, 0x39, 0x85, 0x43, 0x98,
|
||||
0xfc, 0xa3, 0x28, 0x3a, 0x22, 0x95, 0xff, 0x57, 0xa7, 0xe1, 0x4e, 0x63, 0x19, 0x37, 0x8c, 0x4d,
|
||||
0xe7, 0x4e, 0xc7, 0x99, 0x81, 0x6d, 0xbb, 0x6a, 0x9c, 0xd4, 0x9a, 0x54, 0x6c, 0xe2, 0xc4, 0xc3,
|
||||
0x3a, 0xb6, 0xfa, 0xa6, 0x8f, 0x1b, 0x86, 0x6a, 0xd7, 0x8f, 0x44, 0x04, 0x54, 0x5f, 0x74, 0xc9,
|
||||
0x9c, 0x15, 0x6d, 0xaa, 0x58, 0x85, 0x0d, 0x1d, 0xd6, 0xb1, 0xd6, 0xf5, 0x77, 0xdc, 0x30, 0xfa,
|
||||
0x7e, 0x5d, 0xef, 0x23, 0xa0, 0x46, 0x85, 0x5d, 0x99, 0x48, 0xf8, 0x55, 0xc5, 0xd8, 0x5e, 0xcc,
|
||||
0x58, 0x67, 0x74, 0x39, 0x63, 0x54, 0x67, 0x82, 0x17, 0x60, 0x3d, 0xa0, 0xf6, 0xb4, 0x22, 0xe9,
|
||||
0x2c, 0x9e, 0xe5, 0x79, 0x1b, 0x1b, 0x37, 0x8c, 0x5e, 0x30, 0x6f, 0x6b, 0x2f, 0xc0, 0x06, 0x07,
|
||||
0x8b, 0xb9, 0x6f, 0x54, 0x98, 0x5d, 0x8e, 0xf9, 0xcf, 0x22, 0xcc, 0x9b, 0x56, 0x33, 0x6e, 0x18,
|
||||
0x30, 0xb8, 0x15, 0x1d, 0x75, 0x40, 0x2b, 0x49, 0x03, 0x6d, 0x02, 0x7a, 0x45, 0xe8, 0x0c, 0x31,
|
||||
0x04, 0x47, 0x60, 0x65, 0x6e, 0xf2, 0x5a, 0x07, 0x6b, 0xc3, 0xbd, 0x3a, 0xaa, 0x12, 0xaa, 0x9d,
|
||||
0xfb, 0x8d, 0x51, 0xd6, 0x41, 0x08, 0xda, 0x1e, 0x4a, 0x3c, 0x3e, 0x4b, 0x3d, 0x83, 0xaf, 0xb5,
|
||||
0xb7, 0x0a, 0xf8, 0xed, 0x2a, 0xa6, 0x74, 0xf2, 0x64, 0x72, 0x49, 0xed, 0xe9, 0xa9, 0x87, 0x42,
|
||||
0x17, 0xc3, 0xfb, 0x80, 0xbb, 0x7a, 0x22, 0xa9, 0x16, 0x7e, 0x68, 0x92, 0x46, 0x14, 0xc0, 0xf3,
|
||||
0xea, 0xe5, 0x6c, 0x7e, 0xd3, 0xcb, 0x29, 0x61, 0xe4, 0xfb, 0x39, 0xd2, 0x9f, 0xff, 0xeb, 0x12,
|
||||
0xe6, 0xa5, 0x96, 0x6e, 0xd3, 0x60, 0x50, 0x41, 0xcc, 0x2f, 0xe7, 0x7e, 0x17, 0x58, 0x5d, 0xfe,
|
||||
0xcf, 0xf1, 0xd7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x06, 0x2d, 0xa0, 0x89, 0x08, 0x00, 0x00,
|
||||
}
|
||||
71
proto/types/evidence.proto
Normal file
71
proto/types/evidence.proto
Normal file
@@ -0,0 +1,71 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.types;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/types";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/types/types.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "proto/crypto/keys/types.proto";
|
||||
|
||||
// DuplicateVoteEvidence contains evidence a validator signed two conflicting
|
||||
// votes.
|
||||
message DuplicateVoteEvidence {
|
||||
tendermint.proto.crypto.keys.PublicKey pub_key = 1;
|
||||
Vote vote_a = 2;
|
||||
Vote vote_b = 3;
|
||||
}
|
||||
|
||||
message PotentialAmnesiaEvidence {
|
||||
Vote vote_a = 1;
|
||||
Vote vote_b = 2;
|
||||
}
|
||||
|
||||
// MockEvidence is used for testing pruposes
|
||||
message MockEvidence {
|
||||
int64 evidence_height = 1;
|
||||
google.protobuf.Timestamp evidence_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
bytes evidence_address = 3;
|
||||
}
|
||||
message MockRandomEvidence {
|
||||
int64 evidence_height = 1;
|
||||
google.protobuf.Timestamp evidence_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
bytes evidence_address = 3;
|
||||
bytes rand_bytes = 4;
|
||||
}
|
||||
|
||||
message ConflictingHeadersEvidence {
|
||||
SignedHeader h1 = 1;
|
||||
SignedHeader h2 = 2;
|
||||
}
|
||||
|
||||
message LunaticValidatorEvidence {
|
||||
Header header = 1;
|
||||
Vote vote = 2;
|
||||
string invalid_header_field = 3;
|
||||
}
|
||||
|
||||
message Evidence {
|
||||
oneof sum {
|
||||
DuplicateVoteEvidence duplicate_vote_evidence = 1;
|
||||
ConflictingHeadersEvidence conflicting_headers_evidence = 2;
|
||||
LunaticValidatorEvidence lunatic_validator_evidence = 3;
|
||||
PotentialAmnesiaEvidence potential_amnesia_evidence = 4;
|
||||
|
||||
MockEvidence mock_evidence = 5;
|
||||
MockRandomEvidence mock_random_evidence = 6;
|
||||
}
|
||||
}
|
||||
|
||||
// EvidenceData contains any evidence of malicious wrong-doing by validators
|
||||
message EvidenceData {
|
||||
repeated Evidence evidence = 1 [(gogoproto.nullable) = false];
|
||||
bytes hash = 2;
|
||||
}
|
||||
|
||||
message ProofOfLockChange {
|
||||
repeated Vote votes = 1 [(gogoproto.nullable) = false];
|
||||
tendermint.proto.crypto.keys.PublicKey pub_key = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
504
proto/types/params.pb.go
Normal file
504
proto/types/params.pb.go
Normal file
@@ -0,0 +1,504 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/types/params.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/golang/protobuf/ptypes/duration"
|
||||
math "math"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// ConsensusParams contains consensus critical parameters that determine the
|
||||
// validity of blocks.
|
||||
type ConsensusParams struct {
|
||||
Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"`
|
||||
Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"`
|
||||
Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
|
||||
func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConsensusParams) ProtoMessage() {}
|
||||
func (*ConsensusParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_95a9f934fa6f056c, []int{0}
|
||||
}
|
||||
func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ConsensusParams.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ConsensusParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConsensusParams.Merge(m, src)
|
||||
}
|
||||
func (m *ConsensusParams) XXX_Size() int {
|
||||
return xxx_messageInfo_ConsensusParams.Size(m)
|
||||
}
|
||||
func (m *ConsensusParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
|
||||
|
||||
func (m *ConsensusParams) GetBlock() BlockParams {
|
||||
if m != nil {
|
||||
return m.Block
|
||||
}
|
||||
return BlockParams{}
|
||||
}
|
||||
|
||||
func (m *ConsensusParams) GetEvidence() EvidenceParams {
|
||||
if m != nil {
|
||||
return m.Evidence
|
||||
}
|
||||
return EvidenceParams{}
|
||||
}
|
||||
|
||||
func (m *ConsensusParams) GetValidator() ValidatorParams {
|
||||
if m != nil {
|
||||
return m.Validator
|
||||
}
|
||||
return ValidatorParams{}
|
||||
}
|
||||
|
||||
// BlockParams contains limits on the block size.
|
||||
type BlockParams struct {
|
||||
// Note: must be greater than 0
|
||||
MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
|
||||
// Note: must be greater or equal to -1
|
||||
MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
|
||||
// Minimum time increment between consecutive blocks (in milliseconds)
|
||||
// Not exposed to the application.
|
||||
TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockParams) Reset() { *m = BlockParams{} }
|
||||
func (m *BlockParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockParams) ProtoMessage() {}
|
||||
func (*BlockParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_95a9f934fa6f056c, []int{1}
|
||||
}
|
||||
func (m *BlockParams) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockParams.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockParams.Merge(m, src)
|
||||
}
|
||||
func (m *BlockParams) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockParams.Size(m)
|
||||
}
|
||||
func (m *BlockParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockParams.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockParams proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockParams) GetMaxBytes() int64 {
|
||||
if m != nil {
|
||||
return m.MaxBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BlockParams) GetMaxGas() int64 {
|
||||
if m != nil {
|
||||
return m.MaxGas
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BlockParams) GetTimeIotaMs() int64 {
|
||||
if m != nil {
|
||||
return m.TimeIotaMs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// EvidenceParams determine how we handle evidence of malfeasance.
|
||||
type EvidenceParams struct {
|
||||
// Max age of evidence, in blocks.
|
||||
//
|
||||
// The basic formula for calculating this is: MaxAgeDuration / {average block
|
||||
// time}.
|
||||
MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"`
|
||||
// Max age of evidence, in time.
|
||||
//
|
||||
// It should correspond with an app's "unbonding period" or other similar
|
||||
// mechanism for handling [Nothing-At-Stake
|
||||
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
|
||||
MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"`
|
||||
// This sets the maximum number of evidence that can be committed in a single block.
|
||||
// and should fall comfortably under the max block bytes when we consider the size of
|
||||
// each evidence (See MaxEvidenceBytes). The maximum number is MaxEvidencePerBlock.
|
||||
// Default is 50
|
||||
MaxNum uint32 `protobuf:"varint,3,opt,name=max_num,json=maxNum,proto3" json:"max_num,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *EvidenceParams) Reset() { *m = EvidenceParams{} }
|
||||
func (m *EvidenceParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*EvidenceParams) ProtoMessage() {}
|
||||
func (*EvidenceParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_95a9f934fa6f056c, []int{2}
|
||||
}
|
||||
func (m *EvidenceParams) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_EvidenceParams.Unmarshal(m, b)
|
||||
}
|
||||
func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *EvidenceParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_EvidenceParams.Merge(m, src)
|
||||
}
|
||||
func (m *EvidenceParams) XXX_Size() int {
|
||||
return xxx_messageInfo_EvidenceParams.Size(m)
|
||||
}
|
||||
func (m *EvidenceParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_EvidenceParams.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo
|
||||
|
||||
func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 {
|
||||
if m != nil {
|
||||
return m.MaxAgeNumBlocks
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *EvidenceParams) GetMaxAgeDuration() time.Duration {
|
||||
if m != nil {
|
||||
return m.MaxAgeDuration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *EvidenceParams) GetMaxNum() uint32 {
|
||||
if m != nil {
|
||||
return m.MaxNum
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// ValidatorParams restrict the public key types validators can use.
|
||||
// NOTE: uses ABCI pubkey naming, not Amino names.
|
||||
type ValidatorParams struct {
|
||||
PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ValidatorParams) Reset() { *m = ValidatorParams{} }
|
||||
func (m *ValidatorParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*ValidatorParams) ProtoMessage() {}
|
||||
func (*ValidatorParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_95a9f934fa6f056c, []int{3}
|
||||
}
|
||||
func (m *ValidatorParams) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ValidatorParams.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ValidatorParams.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ValidatorParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ValidatorParams.Merge(m, src)
|
||||
}
|
||||
func (m *ValidatorParams) XXX_Size() int {
|
||||
return xxx_messageInfo_ValidatorParams.Size(m)
|
||||
}
|
||||
func (m *ValidatorParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ValidatorParams.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo
|
||||
|
||||
func (m *ValidatorParams) GetPubKeyTypes() []string {
|
||||
if m != nil {
|
||||
return m.PubKeyTypes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// HashedParams is a subset of ConsensusParams.
|
||||
// It is amino encoded and hashed into
|
||||
// the Header.ConsensusHash.
|
||||
type HashedParams struct {
|
||||
BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"`
|
||||
BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *HashedParams) Reset() { *m = HashedParams{} }
|
||||
func (m *HashedParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*HashedParams) ProtoMessage() {}
|
||||
func (*HashedParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_95a9f934fa6f056c, []int{4}
|
||||
}
|
||||
func (m *HashedParams) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_HashedParams.Unmarshal(m, b)
|
||||
}
|
||||
func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_HashedParams.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *HashedParams) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_HashedParams.Merge(m, src)
|
||||
}
|
||||
func (m *HashedParams) XXX_Size() int {
|
||||
return xxx_messageInfo_HashedParams.Size(m)
|
||||
}
|
||||
func (m *HashedParams) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_HashedParams.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_HashedParams proto.InternalMessageInfo
|
||||
|
||||
func (m *HashedParams) GetBlockMaxBytes() int64 {
|
||||
if m != nil {
|
||||
return m.BlockMaxBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *HashedParams) GetBlockMaxGas() int64 {
|
||||
if m != nil {
|
||||
return m.BlockMaxGas
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ConsensusParams)(nil), "tendermint.proto.types.ConsensusParams")
|
||||
proto.RegisterType((*BlockParams)(nil), "tendermint.proto.types.BlockParams")
|
||||
proto.RegisterType((*EvidenceParams)(nil), "tendermint.proto.types.EvidenceParams")
|
||||
proto.RegisterType((*ValidatorParams)(nil), "tendermint.proto.types.ValidatorParams")
|
||||
proto.RegisterType((*HashedParams)(nil), "tendermint.proto.types.HashedParams")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/types/params.proto", fileDescriptor_95a9f934fa6f056c) }
|
||||
|
||||
var fileDescriptor_95a9f934fa6f056c = []byte{
|
||||
// 469 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xd1, 0x6a, 0xd4, 0x40,
|
||||
0x14, 0x35, 0xae, 0xd6, 0xdd, 0xbb, 0xdd, 0xae, 0xcc, 0x83, 0xc6, 0x0a, 0xed, 0x12, 0x61, 0x2d,
|
||||
0x28, 0x09, 0x54, 0x7c, 0x16, 0xa3, 0xd2, 0x4a, 0xd9, 0x22, 0x41, 0x7c, 0xe8, 0xcb, 0x70, 0xb3,
|
||||
0x19, 0xb3, 0xa1, 0x3b, 0x99, 0x90, 0x99, 0x29, 0x9b, 0x3f, 0xf1, 0x07, 0x04, 0x3f, 0xc5, 0xaf,
|
||||
0x50, 0xf0, 0xcd, 0xbf, 0x90, 0xcc, 0xec, 0x98, 0xdd, 0xd2, 0xbe, 0xcd, 0xdc, 0x7b, 0xce, 0x99,
|
||||
0x7b, 0xce, 0x65, 0xc0, 0xaf, 0x6a, 0xa1, 0x44, 0xa4, 0x9a, 0x8a, 0xc9, 0xa8, 0xc2, 0x1a, 0xb9,
|
||||
0x0c, 0x4d, 0x89, 0x3c, 0x52, 0xac, 0xcc, 0x58, 0xcd, 0x8b, 0x52, 0xd9, 0x4a, 0x68, 0x40, 0xfb,
|
||||
0x53, 0xb5, 0x28, 0xea, 0x8c, 0x56, 0x58, 0xab, 0x26, 0xb2, 0xec, 0x5c, 0xe4, 0xa2, 0x3b, 0x59,
|
||||
0xf4, 0xfe, 0x41, 0x2e, 0x44, 0xbe, 0x64, 0x16, 0x92, 0xea, 0xaf, 0x51, 0xa6, 0x6b, 0x54, 0x85,
|
||||
0x28, 0x6d, 0x3f, 0xf8, 0xeb, 0xc1, 0xf8, 0x9d, 0x28, 0x25, 0x2b, 0xa5, 0x96, 0x9f, 0xcc, 0xcb,
|
||||
0xe4, 0x0d, 0xdc, 0x4f, 0x97, 0x62, 0x7e, 0xe9, 0x7b, 0x13, 0xef, 0x68, 0x78, 0xfc, 0x2c, 0xbc,
|
||||
0x79, 0x86, 0x30, 0x6e, 0x41, 0x96, 0x13, 0xdf, 0xfb, 0xf9, 0xeb, 0xf0, 0x4e, 0x62, 0x79, 0xe4,
|
||||
0x14, 0xfa, 0xec, 0xaa, 0xc8, 0x58, 0x39, 0x67, 0xfe, 0x5d, 0xa3, 0x31, 0xbd, 0x4d, 0xe3, 0xc3,
|
||||
0x1a, 0xb7, 0x25, 0xf3, 0x9f, 0x4d, 0xce, 0x60, 0x70, 0x85, 0xcb, 0x22, 0x43, 0x25, 0x6a, 0xbf,
|
||||
0x67, 0xa4, 0x9e, 0xdf, 0x26, 0xf5, 0xc5, 0x01, 0xb7, 0xb4, 0x3a, 0x7e, 0xc0, 0x60, 0xb8, 0x31,
|
||||
0x32, 0x79, 0x0a, 0x03, 0x8e, 0x2b, 0x9a, 0x36, 0x8a, 0x49, 0x63, 0xb5, 0x97, 0xf4, 0x39, 0xae,
|
||||
0xe2, 0xf6, 0x4e, 0x1e, 0xc3, 0x83, 0xb6, 0x99, 0xa3, 0x34, 0x0e, 0x7a, 0xc9, 0x0e, 0xc7, 0xd5,
|
||||
0x09, 0x4a, 0x32, 0x81, 0x5d, 0x55, 0x70, 0x46, 0x0b, 0xa1, 0x90, 0x72, 0x69, 0x86, 0xea, 0x25,
|
||||
0xd0, 0xd6, 0x3e, 0x0a, 0x85, 0x33, 0x19, 0x7c, 0xf7, 0x60, 0x6f, 0xdb, 0x16, 0x79, 0x01, 0xa4,
|
||||
0x55, 0xc3, 0x9c, 0xd1, 0x52, 0x73, 0x6a, 0x52, 0x72, 0x6f, 0x8e, 0x39, 0xae, 0xde, 0xe6, 0xec,
|
||||
0x5c, 0x73, 0x33, 0x9c, 0x24, 0x33, 0x78, 0xe8, 0xc0, 0x6e, 0x59, 0xeb, 0x14, 0x9f, 0x84, 0x76,
|
||||
0x9b, 0xa1, 0xdb, 0x66, 0xf8, 0x7e, 0x0d, 0x88, 0xfb, 0xad, 0xd9, 0x6f, 0xbf, 0x0f, 0xbd, 0x64,
|
||||
0xcf, 0xea, 0xb9, 0x8e, 0x73, 0x52, 0x6a, 0x6e, 0x66, 0x1d, 0x19, 0x27, 0xe7, 0x9a, 0x07, 0xaf,
|
||||
0x61, 0x7c, 0x2d, 0x32, 0x12, 0xc0, 0xa8, 0xd2, 0x29, 0xbd, 0x64, 0x0d, 0x35, 0x99, 0xfa, 0xde,
|
||||
0xa4, 0x77, 0x34, 0x48, 0x86, 0x95, 0x4e, 0xcf, 0x58, 0xf3, 0xb9, 0x2d, 0x05, 0x17, 0xb0, 0x7b,
|
||||
0x8a, 0x72, 0xc1, 0xb2, 0x35, 0x67, 0x0a, 0x63, 0xe3, 0x87, 0x5e, 0x0f, 0x73, 0x64, 0xca, 0x33,
|
||||
0x97, 0x68, 0x00, 0xa3, 0x0e, 0xd7, 0xe5, 0x3a, 0x74, 0xa8, 0x13, 0x94, 0xf1, 0xf1, 0x8f, 0x3f,
|
||||
0x07, 0xde, 0xc5, 0xcb, 0xbc, 0x50, 0x0b, 0x9d, 0x86, 0x73, 0xc1, 0xa3, 0x6e, 0xd7, 0x9b, 0xc7,
|
||||
0x8d, 0xef, 0x92, 0xee, 0x98, 0xcb, 0xab, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x3c, 0x66,
|
||||
0x44, 0x44, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *ConsensusParams) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*ConsensusParams)
|
||||
if !ok {
|
||||
that2, ok := that.(ConsensusParams)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if !this.Block.Equal(&that1.Block) {
|
||||
return false
|
||||
}
|
||||
if !this.Evidence.Equal(&that1.Evidence) {
|
||||
return false
|
||||
}
|
||||
if !this.Validator.Equal(&that1.Validator) {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *BlockParams) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*BlockParams)
|
||||
if !ok {
|
||||
that2, ok := that.(BlockParams)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.MaxBytes != that1.MaxBytes {
|
||||
return false
|
||||
}
|
||||
if this.MaxGas != that1.MaxGas {
|
||||
return false
|
||||
}
|
||||
if this.TimeIotaMs != that1.TimeIotaMs {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *EvidenceParams) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*EvidenceParams)
|
||||
if !ok {
|
||||
that2, ok := that.(EvidenceParams)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks {
|
||||
return false
|
||||
}
|
||||
if this.MaxAgeDuration != that1.MaxAgeDuration {
|
||||
return false
|
||||
}
|
||||
if this.MaxNum != that1.MaxNum {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *ValidatorParams) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*ValidatorParams)
|
||||
if !ok {
|
||||
that2, ok := that.(ValidatorParams)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.PubKeyTypes) != len(that1.PubKeyTypes) {
|
||||
return false
|
||||
}
|
||||
for i := range this.PubKeyTypes {
|
||||
if this.PubKeyTypes[i] != that1.PubKeyTypes[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
func (this *HashedParams) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*HashedParams)
|
||||
if !ok {
|
||||
that2, ok := that.(HashedParams)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.BlockMaxBytes != that1.BlockMaxBytes {
|
||||
return false
|
||||
}
|
||||
if this.BlockMaxGas != that1.BlockMaxGas {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
65
proto/types/params.proto
Normal file
65
proto/types/params.proto
Normal file
@@ -0,0 +1,65 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.types;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/types";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
// ConsensusParams contains consensus critical parameters that determine the
|
||||
// validity of blocks.
|
||||
message ConsensusParams {
|
||||
BlockParams block = 1 [(gogoproto.nullable) = false];
|
||||
EvidenceParams evidence = 2 [(gogoproto.nullable) = false];
|
||||
ValidatorParams validator = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// BlockParams contains limits on the block size.
|
||||
message BlockParams {
|
||||
// Note: must be greater than 0
|
||||
int64 max_bytes = 1;
|
||||
// Note: must be greater or equal to -1
|
||||
int64 max_gas = 2;
|
||||
// Minimum time increment between consecutive blocks (in milliseconds)
|
||||
// Not exposed to the application.
|
||||
int64 time_iota_ms = 3;
|
||||
}
|
||||
|
||||
// EvidenceParams determine how we handle evidence of malfeasance.
|
||||
message EvidenceParams {
|
||||
// Max age of evidence, in blocks.
|
||||
//
|
||||
// The basic formula for calculating this is: MaxAgeDuration / {average block
|
||||
// time}.
|
||||
int64 max_age_num_blocks = 1;
|
||||
|
||||
// Max age of evidence, in time.
|
||||
//
|
||||
// It should correspond with an app's "unbonding period" or other similar
|
||||
// mechanism for handling [Nothing-At-Stake
|
||||
// attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).
|
||||
google.protobuf.Duration max_age_duration = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
|
||||
|
||||
// This sets the maximum number of evidence that can be committed in a single block.
|
||||
// and should fall comfortably under the max block bytes when we consider the size of
|
||||
// each evidence (See MaxEvidenceBytes). The maximum number is MaxEvidencePerBlock.
|
||||
// Default is 50
|
||||
uint32 max_num = 3;
|
||||
}
|
||||
|
||||
// ValidatorParams restrict the public key types validators can use.
|
||||
// NOTE: uses ABCI pubkey naming, not Amino names.
|
||||
message ValidatorParams {
|
||||
repeated string pub_key_types = 1;
|
||||
}
|
||||
|
||||
// HashedParams is a subset of ConsensusParams.
|
||||
// It is amino encoded and hashed into
|
||||
// the Header.ConsensusHash.
|
||||
message HashedParams {
|
||||
int64 block_max_bytes = 1;
|
||||
int64 block_max_gas = 2;
|
||||
}
|
||||
965
proto/types/types.pb.go
Normal file
965
proto/types/types.pb.go
Normal file
@@ -0,0 +1,965 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/types/types.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/golang/protobuf/ptypes/timestamp"
|
||||
merkle "github.com/tendermint/tendermint/proto/crypto/merkle"
|
||||
bits "github.com/tendermint/tendermint/proto/libs/bits"
|
||||
version "github.com/tendermint/tendermint/proto/version"
|
||||
math "math"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// BlockIdFlag indicates which BlcokID the signature is for
|
||||
type BlockIDFlag int32
|
||||
|
||||
const (
|
||||
BLOCKD_ID_FLAG_UNKNOWN BlockIDFlag = 0
|
||||
BlockIDFlagAbsent BlockIDFlag = 1
|
||||
BlockIDFlagCommit BlockIDFlag = 2
|
||||
BlockIDFlagNil BlockIDFlag = 3
|
||||
)
|
||||
|
||||
var BlockIDFlag_name = map[int32]string{
|
||||
0: "BLOCKD_ID_FLAG_UNKNOWN",
|
||||
1: "BLOCK_ID_FLAG_ABSENT",
|
||||
2: "BLOCK_ID_FLAG_COMMIT",
|
||||
3: "BLOCK_ID_FLAG_NIL",
|
||||
}
|
||||
|
||||
var BlockIDFlag_value = map[string]int32{
|
||||
"BLOCKD_ID_FLAG_UNKNOWN": 0,
|
||||
"BLOCK_ID_FLAG_ABSENT": 1,
|
||||
"BLOCK_ID_FLAG_COMMIT": 2,
|
||||
"BLOCK_ID_FLAG_NIL": 3,
|
||||
}
|
||||
|
||||
func (BlockIDFlag) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{0}
|
||||
}
|
||||
|
||||
// SignedMsgType is a type of signed message in the consensus.
|
||||
type SignedMsgType int32
|
||||
|
||||
const (
|
||||
SIGNED_MSG_TYPE_UNKNOWN SignedMsgType = 0
|
||||
PrevoteType SignedMsgType = 1
|
||||
PrecommitType SignedMsgType = 2
|
||||
ProposalType SignedMsgType = 3
|
||||
)
|
||||
|
||||
var SignedMsgType_name = map[int32]string{
|
||||
0: "SIGNED_MSG_TYPE_UNKNOWN",
|
||||
1: "PREVOTE_TYPE",
|
||||
2: "PRECOMMIT_TYPE",
|
||||
3: "PROPOSAL_TYPE",
|
||||
}
|
||||
|
||||
var SignedMsgType_value = map[string]int32{
|
||||
"SIGNED_MSG_TYPE_UNKNOWN": 0,
|
||||
"PREVOTE_TYPE": 1,
|
||||
"PRECOMMIT_TYPE": 2,
|
||||
"PROPOSAL_TYPE": 3,
|
||||
}
|
||||
|
||||
func (SignedMsgType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{1}
|
||||
}
|
||||
|
||||
// PartsetHeader
|
||||
type PartSetHeader struct {
|
||||
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PartSetHeader) Reset() { *m = PartSetHeader{} }
|
||||
func (m *PartSetHeader) String() string { return proto.CompactTextString(m) }
|
||||
func (*PartSetHeader) ProtoMessage() {}
|
||||
func (*PartSetHeader) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{0}
|
||||
}
|
||||
func (m *PartSetHeader) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PartSetHeader.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PartSetHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PartSetHeader.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PartSetHeader) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PartSetHeader.Merge(m, src)
|
||||
}
|
||||
func (m *PartSetHeader) XXX_Size() int {
|
||||
return xxx_messageInfo_PartSetHeader.Size(m)
|
||||
}
|
||||
func (m *PartSetHeader) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PartSetHeader.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PartSetHeader proto.InternalMessageInfo
|
||||
|
||||
func (m *PartSetHeader) GetTotal() int64 {
|
||||
if m != nil {
|
||||
return m.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PartSetHeader) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Part struct {
|
||||
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
||||
Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
|
||||
Proof merkle.SimpleProof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Part) Reset() { *m = Part{} }
|
||||
func (m *Part) String() string { return proto.CompactTextString(m) }
|
||||
func (*Part) ProtoMessage() {}
|
||||
func (*Part) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{1}
|
||||
}
|
||||
func (m *Part) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Part.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Part.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Part) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Part.Merge(m, src)
|
||||
}
|
||||
func (m *Part) XXX_Size() int {
|
||||
return xxx_messageInfo_Part.Size(m)
|
||||
}
|
||||
func (m *Part) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Part.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Part proto.InternalMessageInfo
|
||||
|
||||
func (m *Part) GetIndex() uint32 {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Part) GetBytes() []byte {
|
||||
if m != nil {
|
||||
return m.Bytes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Part) GetProof() merkle.SimpleProof {
|
||||
if m != nil {
|
||||
return m.Proof
|
||||
}
|
||||
return merkle.SimpleProof{}
|
||||
}
|
||||
|
||||
// BlockID
|
||||
type BlockID struct {
|
||||
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
PartsHeader PartSetHeader `protobuf:"bytes,2,opt,name=parts_header,json=partsHeader,proto3" json:"parts_header"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockID) Reset() { *m = BlockID{} }
|
||||
func (m *BlockID) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockID) ProtoMessage() {}
|
||||
func (*BlockID) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{2}
|
||||
}
|
||||
func (m *BlockID) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockID.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockID.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockID) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockID.Merge(m, src)
|
||||
}
|
||||
func (m *BlockID) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockID.Size(m)
|
||||
}
|
||||
func (m *BlockID) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockID.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockID proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockID) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BlockID) GetPartsHeader() PartSetHeader {
|
||||
if m != nil {
|
||||
return m.PartsHeader
|
||||
}
|
||||
return PartSetHeader{}
|
||||
}
|
||||
|
||||
// Header defines the structure of a Tendermint block header.
|
||||
type Header struct {
|
||||
// basic block info
|
||||
Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
|
||||
ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
|
||||
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
|
||||
// prev block info
|
||||
LastBlockID BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
|
||||
// hashes of block data
|
||||
LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
|
||||
DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
|
||||
// hashes from the app output from the prev block
|
||||
ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
|
||||
NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"`
|
||||
ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"`
|
||||
AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
|
||||
LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
|
||||
// consensus info
|
||||
EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"`
|
||||
ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Header) Reset() { *m = Header{} }
|
||||
func (m *Header) String() string { return proto.CompactTextString(m) }
|
||||
func (*Header) ProtoMessage() {}
|
||||
func (*Header) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{3}
|
||||
}
|
||||
func (m *Header) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Header.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Header.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Header) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Header.Merge(m, src)
|
||||
}
|
||||
func (m *Header) XXX_Size() int {
|
||||
return xxx_messageInfo_Header.Size(m)
|
||||
}
|
||||
func (m *Header) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Header.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Header proto.InternalMessageInfo
|
||||
|
||||
func (m *Header) GetVersion() version.Consensus {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
}
|
||||
return version.Consensus{}
|
||||
}
|
||||
|
||||
func (m *Header) GetChainID() string {
|
||||
if m != nil {
|
||||
return m.ChainID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Header) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Header) GetTime() time.Time {
|
||||
if m != nil {
|
||||
return m.Time
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *Header) GetLastBlockID() BlockID {
|
||||
if m != nil {
|
||||
return m.LastBlockID
|
||||
}
|
||||
return BlockID{}
|
||||
}
|
||||
|
||||
func (m *Header) GetLastCommitHash() []byte {
|
||||
if m != nil {
|
||||
return m.LastCommitHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetDataHash() []byte {
|
||||
if m != nil {
|
||||
return m.DataHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetValidatorsHash() []byte {
|
||||
if m != nil {
|
||||
return m.ValidatorsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetNextValidatorsHash() []byte {
|
||||
if m != nil {
|
||||
return m.NextValidatorsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetConsensusHash() []byte {
|
||||
if m != nil {
|
||||
return m.ConsensusHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetAppHash() []byte {
|
||||
if m != nil {
|
||||
return m.AppHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetLastResultsHash() []byte {
|
||||
if m != nil {
|
||||
return m.LastResultsHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetEvidenceHash() []byte {
|
||||
if m != nil {
|
||||
return m.EvidenceHash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Header) GetProposerAddress() []byte {
|
||||
if m != nil {
|
||||
return m.ProposerAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Data contains the set of transactions included in the block
|
||||
type Data struct {
|
||||
// Txs that will be applied by state @ block.Height+1.
|
||||
// NOTE: not all txs here are valid. We're just agreeing on the order first.
|
||||
// This means that block.AppHash does not include these txs.
|
||||
Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
|
||||
// Volatile
|
||||
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Data) Reset() { *m = Data{} }
|
||||
func (m *Data) String() string { return proto.CompactTextString(m) }
|
||||
func (*Data) ProtoMessage() {}
|
||||
func (*Data) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{4}
|
||||
}
|
||||
func (m *Data) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Data.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Data.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Data) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Data.Merge(m, src)
|
||||
}
|
||||
func (m *Data) XXX_Size() int {
|
||||
return xxx_messageInfo_Data.Size(m)
|
||||
}
|
||||
func (m *Data) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Data.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Data proto.InternalMessageInfo
|
||||
|
||||
func (m *Data) GetTxs() [][]byte {
|
||||
if m != nil {
|
||||
return m.Txs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Data) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Vote represents a prevote, precommit, or commit vote from validators for
|
||||
// consensus.
|
||||
type Vote struct {
|
||||
Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
|
||||
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int64 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
|
||||
BlockID BlockID `protobuf:"bytes,4,opt,name=block_id,json=blockId,proto3" json:"block_id"`
|
||||
Timestamp time.Time `protobuf:"bytes,5,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
|
||||
ValidatorAddress []byte `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
|
||||
ValidatorIndex int64 `protobuf:"varint,7,opt,name=validator_index,json=validatorIndex,proto3" json:"validator_index,omitempty"`
|
||||
Signature []byte `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Vote) Reset() { *m = Vote{} }
|
||||
func (m *Vote) String() string { return proto.CompactTextString(m) }
|
||||
func (*Vote) ProtoMessage() {}
|
||||
func (*Vote) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{5}
|
||||
}
|
||||
func (m *Vote) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Vote.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Vote) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Vote.Merge(m, src)
|
||||
}
|
||||
func (m *Vote) XXX_Size() int {
|
||||
return xxx_messageInfo_Vote.Size(m)
|
||||
}
|
||||
func (m *Vote) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Vote.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Vote proto.InternalMessageInfo
|
||||
|
||||
func (m *Vote) GetType() SignedMsgType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return SIGNED_MSG_TYPE_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *Vote) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Vote) GetRound() int64 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Vote) GetBlockID() BlockID {
|
||||
if m != nil {
|
||||
return m.BlockID
|
||||
}
|
||||
return BlockID{}
|
||||
}
|
||||
|
||||
func (m *Vote) GetTimestamp() time.Time {
|
||||
if m != nil {
|
||||
return m.Timestamp
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *Vote) GetValidatorAddress() []byte {
|
||||
if m != nil {
|
||||
return m.ValidatorAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Vote) GetValidatorIndex() int64 {
|
||||
if m != nil {
|
||||
return m.ValidatorIndex
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Vote) GetSignature() []byte {
|
||||
if m != nil {
|
||||
return m.Signature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Commit contains the evidence that a block was committed by a set of validators.
|
||||
type Commit struct {
|
||||
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"`
|
||||
BlockID BlockID `protobuf:"bytes,3,opt,name=block_id,json=blockId,proto3" json:"block_id"`
|
||||
Signatures []CommitSig `protobuf:"bytes,4,rep,name=signatures,proto3" json:"signatures"`
|
||||
Hash []byte `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||
BitArray *bits.BitArray `protobuf:"bytes,6,opt,name=bit_array,json=bitArray,proto3" json:"bit_array,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Commit) Reset() { *m = Commit{} }
|
||||
func (m *Commit) String() string { return proto.CompactTextString(m) }
|
||||
func (*Commit) ProtoMessage() {}
|
||||
func (*Commit) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{6}
|
||||
}
|
||||
func (m *Commit) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Commit.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Commit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Commit.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Commit) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Commit.Merge(m, src)
|
||||
}
|
||||
func (m *Commit) XXX_Size() int {
|
||||
return xxx_messageInfo_Commit.Size(m)
|
||||
}
|
||||
func (m *Commit) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Commit.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Commit proto.InternalMessageInfo
|
||||
|
||||
func (m *Commit) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Commit) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Commit) GetBlockID() BlockID {
|
||||
if m != nil {
|
||||
return m.BlockID
|
||||
}
|
||||
return BlockID{}
|
||||
}
|
||||
|
||||
func (m *Commit) GetSignatures() []CommitSig {
|
||||
if m != nil {
|
||||
return m.Signatures
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Commit) GetHash() []byte {
|
||||
if m != nil {
|
||||
return m.Hash
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Commit) GetBitArray() *bits.BitArray {
|
||||
if m != nil {
|
||||
return m.BitArray
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CommitSig is a part of the Vote included in a Commit.
|
||||
type CommitSig struct {
|
||||
BlockIdFlag BlockIDFlag `protobuf:"varint,1,opt,name=block_id_flag,json=blockIdFlag,proto3,enum=tendermint.proto.types.BlockIDFlag" json:"block_id_flag,omitempty"`
|
||||
ValidatorAddress []byte `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
|
||||
Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
|
||||
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CommitSig) Reset() { *m = CommitSig{} }
|
||||
func (m *CommitSig) String() string { return proto.CompactTextString(m) }
|
||||
func (*CommitSig) ProtoMessage() {}
|
||||
func (*CommitSig) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{7}
|
||||
}
|
||||
func (m *CommitSig) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CommitSig.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CommitSig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CommitSig.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CommitSig) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CommitSig.Merge(m, src)
|
||||
}
|
||||
func (m *CommitSig) XXX_Size() int {
|
||||
return xxx_messageInfo_CommitSig.Size(m)
|
||||
}
|
||||
func (m *CommitSig) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CommitSig.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CommitSig proto.InternalMessageInfo
|
||||
|
||||
func (m *CommitSig) GetBlockIdFlag() BlockIDFlag {
|
||||
if m != nil {
|
||||
return m.BlockIdFlag
|
||||
}
|
||||
return BLOCKD_ID_FLAG_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *CommitSig) GetValidatorAddress() []byte {
|
||||
if m != nil {
|
||||
return m.ValidatorAddress
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CommitSig) GetTimestamp() time.Time {
|
||||
if m != nil {
|
||||
return m.Timestamp
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *CommitSig) GetSignature() []byte {
|
||||
if m != nil {
|
||||
return m.Signature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Proposal struct {
|
||||
Type SignedMsgType `protobuf:"varint,1,opt,name=type,proto3,enum=tendermint.proto.types.SignedMsgType" json:"type,omitempty"`
|
||||
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
||||
Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"`
|
||||
PolRound int32 `protobuf:"varint,4,opt,name=pol_round,json=polRound,proto3" json:"pol_round,omitempty"`
|
||||
BlockID BlockID `protobuf:"bytes,5,opt,name=block_id,json=blockId,proto3" json:"block_id"`
|
||||
Timestamp time.Time `protobuf:"bytes,6,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
|
||||
Signature []byte `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Proposal) Reset() { *m = Proposal{} }
|
||||
func (m *Proposal) String() string { return proto.CompactTextString(m) }
|
||||
func (*Proposal) ProtoMessage() {}
|
||||
func (*Proposal) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{8}
|
||||
}
|
||||
func (m *Proposal) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Proposal.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Proposal) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Proposal.Merge(m, src)
|
||||
}
|
||||
func (m *Proposal) XXX_Size() int {
|
||||
return xxx_messageInfo_Proposal.Size(m)
|
||||
}
|
||||
func (m *Proposal) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Proposal.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Proposal proto.InternalMessageInfo
|
||||
|
||||
func (m *Proposal) GetType() SignedMsgType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return SIGNED_MSG_TYPE_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *Proposal) GetHeight() int64 {
|
||||
if m != nil {
|
||||
return m.Height
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Proposal) GetRound() int32 {
|
||||
if m != nil {
|
||||
return m.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Proposal) GetPolRound() int32 {
|
||||
if m != nil {
|
||||
return m.PolRound
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Proposal) GetBlockID() BlockID {
|
||||
if m != nil {
|
||||
return m.BlockID
|
||||
}
|
||||
return BlockID{}
|
||||
}
|
||||
|
||||
func (m *Proposal) GetTimestamp() time.Time {
|
||||
if m != nil {
|
||||
return m.Timestamp
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (m *Proposal) GetSignature() []byte {
|
||||
if m != nil {
|
||||
return m.Signature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SignedHeader struct {
|
||||
Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
||||
Commit *Commit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SignedHeader) Reset() { *m = SignedHeader{} }
|
||||
func (m *SignedHeader) String() string { return proto.CompactTextString(m) }
|
||||
func (*SignedHeader) ProtoMessage() {}
|
||||
func (*SignedHeader) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{9}
|
||||
}
|
||||
func (m *SignedHeader) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SignedHeader.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SignedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SignedHeader.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SignedHeader) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SignedHeader.Merge(m, src)
|
||||
}
|
||||
func (m *SignedHeader) XXX_Size() int {
|
||||
return xxx_messageInfo_SignedHeader.Size(m)
|
||||
}
|
||||
func (m *SignedHeader) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SignedHeader.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SignedHeader proto.InternalMessageInfo
|
||||
|
||||
func (m *SignedHeader) GetHeader() *Header {
|
||||
if m != nil {
|
||||
return m.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SignedHeader) GetCommit() *Commit {
|
||||
if m != nil {
|
||||
return m.Commit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BlockMeta struct {
|
||||
BlockID BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id"`
|
||||
BlockSize int64 `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
|
||||
Header Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header"`
|
||||
NumTxs int64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *BlockMeta) Reset() { *m = BlockMeta{} }
|
||||
func (m *BlockMeta) String() string { return proto.CompactTextString(m) }
|
||||
func (*BlockMeta) ProtoMessage() {}
|
||||
func (*BlockMeta) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ff06f8095857fb18, []int{10}
|
||||
}
|
||||
func (m *BlockMeta) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_BlockMeta.Unmarshal(m, b)
|
||||
}
|
||||
func (m *BlockMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_BlockMeta.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *BlockMeta) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BlockMeta.Merge(m, src)
|
||||
}
|
||||
func (m *BlockMeta) XXX_Size() int {
|
||||
return xxx_messageInfo_BlockMeta.Size(m)
|
||||
}
|
||||
func (m *BlockMeta) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BlockMeta.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BlockMeta proto.InternalMessageInfo
|
||||
|
||||
func (m *BlockMeta) GetBlockID() BlockID {
|
||||
if m != nil {
|
||||
return m.BlockID
|
||||
}
|
||||
return BlockID{}
|
||||
}
|
||||
|
||||
func (m *BlockMeta) GetBlockSize() int64 {
|
||||
if m != nil {
|
||||
return m.BlockSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *BlockMeta) GetHeader() Header {
|
||||
if m != nil {
|
||||
return m.Header
|
||||
}
|
||||
return Header{}
|
||||
}
|
||||
|
||||
func (m *BlockMeta) GetNumTxs() int64 {
|
||||
if m != nil {
|
||||
return m.NumTxs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("tendermint.proto.types.BlockIDFlag", BlockIDFlag_name, BlockIDFlag_value)
|
||||
proto.RegisterEnum("tendermint.proto.types.SignedMsgType", SignedMsgType_name, SignedMsgType_value)
|
||||
proto.RegisterType((*PartSetHeader)(nil), "tendermint.proto.types.PartSetHeader")
|
||||
proto.RegisterType((*Part)(nil), "tendermint.proto.types.Part")
|
||||
proto.RegisterType((*BlockID)(nil), "tendermint.proto.types.BlockID")
|
||||
proto.RegisterType((*Header)(nil), "tendermint.proto.types.Header")
|
||||
proto.RegisterType((*Data)(nil), "tendermint.proto.types.Data")
|
||||
proto.RegisterType((*Vote)(nil), "tendermint.proto.types.Vote")
|
||||
proto.RegisterType((*Commit)(nil), "tendermint.proto.types.Commit")
|
||||
proto.RegisterType((*CommitSig)(nil), "tendermint.proto.types.CommitSig")
|
||||
proto.RegisterType((*Proposal)(nil), "tendermint.proto.types.Proposal")
|
||||
proto.RegisterType((*SignedHeader)(nil), "tendermint.proto.types.SignedHeader")
|
||||
proto.RegisterType((*BlockMeta)(nil), "tendermint.proto.types.BlockMeta")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/types/types.proto", fileDescriptor_ff06f8095857fb18) }
|
||||
|
||||
var fileDescriptor_ff06f8095857fb18 = []byte{
|
||||
// 1274 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0xdb, 0xc6,
|
||||
0x13, 0x37, 0x25, 0xca, 0x92, 0x86, 0x92, 0x2d, 0xf3, 0xef, 0x7f, 0xa2, 0xca, 0xad, 0xa5, 0xc8,
|
||||
0x4d, 0xea, 0x7c, 0x80, 0x2a, 0x5c, 0xa0, 0x68, 0x80, 0x5e, 0x24, 0xdb, 0x71, 0x84, 0xd8, 0xb2,
|
||||
0x40, 0xa9, 0xe9, 0xc7, 0x85, 0x58, 0x89, 0x1b, 0x8a, 0x08, 0x45, 0x12, 0xdc, 0x95, 0x61, 0xa7,
|
||||
0x40, 0x81, 0xde, 0x0a, 0x9f, 0xfa, 0x02, 0x3e, 0xa5, 0x05, 0xfa, 0x16, 0xed, 0xb1, 0xa7, 0x3e,
|
||||
0x42, 0x0a, 0xa4, 0xaf, 0xd0, 0x07, 0x28, 0xf6, 0x83, 0x94, 0x14, 0xd9, 0x6d, 0xd0, 0xa4, 0x17,
|
||||
0x9b, 0x3b, 0xf3, 0x9b, 0xd9, 0x9d, 0xdf, 0xfc, 0x66, 0xd7, 0x86, 0xeb, 0x61, 0x14, 0xd0, 0xa0,
|
||||
0x41, 0xcf, 0x42, 0x4c, 0xc4, 0x4f, 0x83, 0x5b, 0xf4, 0x6b, 0x14, 0xfb, 0x36, 0x8e, 0xc6, 0xae,
|
||||
0x4f, 0x85, 0xc5, 0xe0, 0xde, 0xca, 0x2d, 0x3a, 0x72, 0x23, 0xdb, 0x0a, 0x51, 0x44, 0xcf, 0x1a,
|
||||
0x22, 0xd8, 0x09, 0x9c, 0x60, 0xfa, 0x25, 0xd0, 0x95, 0xaa, 0x13, 0x04, 0x8e, 0x87, 0x05, 0x64,
|
||||
0x30, 0x79, 0xd2, 0xa0, 0xee, 0x18, 0x13, 0x8a, 0xc6, 0xa1, 0x04, 0x6c, 0x88, 0x10, 0xcf, 0x1d,
|
||||
0x90, 0xc6, 0xc0, 0xa5, 0x73, 0xbb, 0x57, 0xaa, 0xc2, 0x39, 0x8c, 0xce, 0x42, 0x1a, 0x34, 0xc6,
|
||||
0x38, 0x7a, 0xea, 0xe1, 0x39, 0x80, 0x8c, 0x3e, 0xc1, 0x11, 0x71, 0x03, 0x3f, 0xfe, 0x2d, 0x9c,
|
||||
0xf5, 0xfb, 0x50, 0xec, 0xa2, 0x88, 0xf6, 0x30, 0x7d, 0x88, 0x91, 0x8d, 0x23, 0x7d, 0x1d, 0x32,
|
||||
0x34, 0xa0, 0xc8, 0x2b, 0x2b, 0x35, 0x65, 0x3b, 0x6d, 0x8a, 0x85, 0xae, 0x83, 0x3a, 0x42, 0x64,
|
||||
0x54, 0x4e, 0xd5, 0x94, 0xed, 0x82, 0xc9, 0xbf, 0xeb, 0x5f, 0x83, 0xca, 0x42, 0x59, 0x84, 0xeb,
|
||||
0xdb, 0xf8, 0x94, 0x47, 0x14, 0x4d, 0xb1, 0x60, 0xd6, 0xc1, 0x19, 0xc5, 0x44, 0x86, 0x88, 0x85,
|
||||
0x7e, 0x00, 0x99, 0x30, 0x0a, 0x82, 0x27, 0xe5, 0x74, 0x4d, 0xd9, 0xd6, 0x76, 0xee, 0x1a, 0x0b,
|
||||
0xd4, 0x89, 0x3a, 0x0c, 0x51, 0x87, 0xd1, 0x73, 0xc7, 0xa1, 0x87, 0xbb, 0x2c, 0xa4, 0xa5, 0xfe,
|
||||
0xfa, 0xa2, 0xba, 0x64, 0x8a, 0xf8, 0xfa, 0x18, 0xb2, 0x2d, 0x2f, 0x18, 0x3e, 0x6d, 0xef, 0x25,
|
||||
0x67, 0x53, 0xa6, 0x67, 0xd3, 0x3b, 0x50, 0x60, 0xb4, 0x13, 0x6b, 0xc4, 0xab, 0xe2, 0x87, 0xd0,
|
||||
0x76, 0x6e, 0x1a, 0x97, 0x77, 0xca, 0x98, 0xa3, 0x40, 0x6e, 0xa4, 0xf1, 0x04, 0xc2, 0x54, 0xff,
|
||||
0x36, 0x03, 0xcb, 0x92, 0xa0, 0x5d, 0xc8, 0x4a, 0x0a, 0xf9, 0x8e, 0xda, 0xce, 0xd6, 0x62, 0xd6,
|
||||
0x98, 0xe3, 0xdd, 0xc0, 0x27, 0xd8, 0x27, 0x13, 0x22, 0x73, 0xc6, 0x91, 0xfa, 0x2d, 0xc8, 0x0d,
|
||||
0x47, 0xc8, 0xf5, 0x2d, 0xd7, 0xe6, 0x67, 0xcb, 0xb7, 0xb4, 0x97, 0x2f, 0xaa, 0xd9, 0x5d, 0x66,
|
||||
0x6b, 0xef, 0x99, 0x59, 0xee, 0x6c, 0xdb, 0xfa, 0x35, 0x58, 0x1e, 0x61, 0xd7, 0x19, 0x51, 0x4e,
|
||||
0x58, 0xda, 0x94, 0x2b, 0xfd, 0x13, 0x50, 0x99, 0x48, 0xca, 0x2a, 0x3f, 0x41, 0xc5, 0x10, 0x0a,
|
||||
0x32, 0x62, 0x05, 0x19, 0xfd, 0x58, 0x41, 0xad, 0x1c, 0xdb, 0xf8, 0xfb, 0xdf, 0xab, 0x8a, 0xc9,
|
||||
0x23, 0xf4, 0x2f, 0xa0, 0xe8, 0x21, 0x42, 0xad, 0x01, 0x63, 0x8f, 0x6d, 0x9f, 0xe1, 0x29, 0xaa,
|
||||
0x57, 0x51, 0x23, 0x59, 0x6e, 0xfd, 0x8f, 0xe5, 0x79, 0xf9, 0xa2, 0xaa, 0x1d, 0x22, 0x42, 0xa5,
|
||||
0xd1, 0xd4, 0xbc, 0x64, 0x61, 0xeb, 0xdb, 0x50, 0xe2, 0x99, 0x87, 0xc1, 0x78, 0xec, 0x52, 0x8b,
|
||||
0xf7, 0x64, 0x99, 0xf7, 0x64, 0x85, 0xd9, 0x77, 0xb9, 0xf9, 0x21, 0xeb, 0xce, 0x06, 0xe4, 0x6d,
|
||||
0x44, 0x91, 0x80, 0x64, 0x39, 0x24, 0xc7, 0x0c, 0xdc, 0xf9, 0x01, 0xac, 0x9e, 0x20, 0xcf, 0xb5,
|
||||
0x11, 0x0d, 0x22, 0x22, 0x20, 0x39, 0x91, 0x65, 0x6a, 0xe6, 0xc0, 0x0f, 0x61, 0xdd, 0xc7, 0xa7,
|
||||
0xd4, 0x7a, 0x15, 0x9d, 0xe7, 0x68, 0x9d, 0xf9, 0x1e, 0xcf, 0x47, 0xdc, 0x84, 0x95, 0x61, 0xdc,
|
||||
0x11, 0x81, 0x05, 0x8e, 0x2d, 0x26, 0x56, 0x0e, 0x7b, 0x07, 0x72, 0x28, 0x0c, 0x05, 0x40, 0xe3,
|
||||
0x80, 0x2c, 0x0a, 0x43, 0xee, 0xba, 0x03, 0x6b, 0xbc, 0xc6, 0x08, 0x93, 0x89, 0x47, 0x65, 0x92,
|
||||
0x02, 0xc7, 0xac, 0x32, 0x87, 0x29, 0xec, 0x1c, 0xbb, 0x05, 0x45, 0x7c, 0xe2, 0xda, 0xd8, 0x1f,
|
||||
0x62, 0x81, 0x2b, 0x72, 0x5c, 0x21, 0x36, 0x72, 0xd0, 0x6d, 0x28, 0x85, 0x51, 0x10, 0x06, 0x04,
|
||||
0x47, 0x16, 0xb2, 0xed, 0x08, 0x13, 0x52, 0x5e, 0x11, 0xf9, 0x62, 0x7b, 0x53, 0x98, 0xeb, 0xf7,
|
||||
0x40, 0xdd, 0x43, 0x14, 0xe9, 0x25, 0x48, 0xd3, 0x53, 0x52, 0x56, 0x6a, 0xe9, 0xed, 0x82, 0xc9,
|
||||
0x3e, 0x2f, 0x9d, 0xce, 0x3f, 0x53, 0xa0, 0x3e, 0x0e, 0x28, 0xd6, 0xef, 0x83, 0xca, 0x3a, 0xc9,
|
||||
0xc5, 0xba, 0x72, 0xf5, 0x08, 0xf4, 0x5c, 0xc7, 0xc7, 0xf6, 0x11, 0x71, 0xfa, 0x67, 0x21, 0x36,
|
||||
0x79, 0xc8, 0x8c, 0xfa, 0x52, 0x73, 0xea, 0x5b, 0x87, 0x4c, 0x14, 0x4c, 0x7c, 0x5b, 0x8a, 0x52,
|
||||
0x2c, 0xf4, 0x47, 0x90, 0x4b, 0x44, 0xa5, 0xbe, 0x9e, 0xa8, 0x56, 0xa5, 0xa8, 0xe2, 0x59, 0x36,
|
||||
0xb3, 0x03, 0x29, 0xa6, 0x16, 0xe4, 0x93, 0x5b, 0x50, 0x4a, 0xf4, 0xf5, 0x54, 0x3e, 0x0d, 0xd3,
|
||||
0xef, 0xc2, 0x5a, 0xa2, 0x8d, 0x84, 0x5c, 0xa1, 0xc8, 0x52, 0xe2, 0x90, 0xec, 0xce, 0xc9, 0xce,
|
||||
0x12, 0xf7, 0x59, 0x96, 0x57, 0x37, 0x95, 0x5d, 0x9b, 0x5f, 0x6c, 0xef, 0x42, 0x9e, 0xb8, 0x8e,
|
||||
0x8f, 0xe8, 0x24, 0xc2, 0x52, 0x99, 0x53, 0x43, 0xfd, 0x79, 0x0a, 0x96, 0x85, 0xd2, 0x67, 0xd8,
|
||||
0x53, 0x2e, 0x67, 0x8f, 0x91, 0x9a, 0xb9, 0x8c, 0xbd, 0xf4, 0x9b, 0xb2, 0x77, 0x00, 0x90, 0x1c,
|
||||
0x89, 0x94, 0xd5, 0x5a, 0x7a, 0x5b, 0xdb, 0xb9, 0x71, 0x55, 0x3a, 0x71, 0xdc, 0x9e, 0xeb, 0xc8,
|
||||
0x4b, 0x6a, 0x26, 0x34, 0x51, 0x56, 0x66, 0xe6, 0x6e, 0x6d, 0x42, 0x7e, 0xe0, 0x52, 0x0b, 0x45,
|
||||
0x11, 0x3a, 0xe3, 0x74, 0x6a, 0x3b, 0xef, 0x2f, 0xe6, 0x66, 0x8f, 0x95, 0xc1, 0x1e, 0x2b, 0xa3,
|
||||
0xe5, 0xd2, 0x26, 0xc3, 0x9a, 0xb9, 0x81, 0xfc, 0xaa, 0xff, 0xa1, 0x40, 0x3e, 0xd9, 0x56, 0x3f,
|
||||
0x80, 0x62, 0x5c, 0xba, 0xf5, 0xc4, 0x43, 0x8e, 0x94, 0xea, 0xd6, 0x3f, 0xd4, 0xff, 0xc0, 0x43,
|
||||
0x8e, 0xa9, 0xc9, 0x92, 0xd9, 0xe2, 0xf2, 0x86, 0xa7, 0xae, 0x68, 0xf8, 0x9c, 0xc2, 0xd2, 0xff,
|
||||
0x4e, 0x61, 0x73, 0x5a, 0x50, 0x5f, 0xd5, 0xc2, 0xcf, 0x29, 0xc8, 0x75, 0xf9, 0x10, 0x23, 0xef,
|
||||
0x3f, 0x1f, 0xc3, 0x44, 0x48, 0x1b, 0x90, 0x0f, 0x03, 0xcf, 0x12, 0x1e, 0x95, 0x7b, 0x72, 0x61,
|
||||
0xe0, 0x99, 0x0b, 0x2a, 0xcb, 0xbc, 0xd5, 0x19, 0x5d, 0x7e, 0x0b, 0x0c, 0x66, 0x5f, 0x65, 0xf0,
|
||||
0x1b, 0x28, 0x08, 0x42, 0xe4, 0xdb, 0xfb, 0x31, 0x63, 0x82, 0x3f, 0xe8, 0xe2, 0xe9, 0xdd, 0xbc,
|
||||
0xea, 0xf0, 0x02, 0x6f, 0x4a, 0x34, 0x8b, 0x13, 0xaf, 0x92, 0xfc, 0x43, 0x60, 0xf3, 0xef, 0x67,
|
||||
0xc1, 0x94, 0xe8, 0xfa, 0x6f, 0x0a, 0xe4, 0x79, 0xd9, 0x47, 0x98, 0xa2, 0x39, 0xf2, 0x94, 0x37,
|
||||
0x25, 0xef, 0x3d, 0x00, 0x91, 0x8c, 0xb8, 0xcf, 0xb0, 0x6c, 0x6c, 0x9e, 0x5b, 0x7a, 0xee, 0x33,
|
||||
0xac, 0x7f, 0x9a, 0x54, 0x9a, 0x7e, 0x9d, 0x4a, 0xe5, 0xe8, 0xc6, 0xf5, 0x5e, 0x87, 0xac, 0x3f,
|
||||
0x19, 0x5b, 0xec, 0x99, 0x50, 0x85, 0x64, 0xfc, 0xc9, 0xb8, 0x7f, 0x4a, 0xee, 0xfc, 0xa2, 0x80,
|
||||
0x36, 0x33, 0x3e, 0x7a, 0x05, 0xae, 0xb5, 0x0e, 0x8f, 0x77, 0x1f, 0xed, 0x59, 0xed, 0x3d, 0xeb,
|
||||
0xc1, 0x61, 0xf3, 0xc0, 0xfa, 0xac, 0xf3, 0xa8, 0x73, 0xfc, 0x79, 0xa7, 0xb4, 0xa4, 0x37, 0x60,
|
||||
0x9d, 0xfb, 0x12, 0x57, 0xb3, 0xd5, 0xdb, 0xef, 0xf4, 0x4b, 0x4a, 0xe5, 0xff, 0xe7, 0x17, 0xb5,
|
||||
0xb5, 0x99, 0x34, 0xcd, 0x01, 0xc1, 0x3e, 0x5d, 0x0c, 0xd8, 0x3d, 0x3e, 0x3a, 0x6a, 0xf7, 0x4b,
|
||||
0xa9, 0x85, 0x00, 0x79, 0x43, 0xde, 0x86, 0xb5, 0xf9, 0x80, 0x4e, 0xfb, 0xb0, 0x94, 0xae, 0xe8,
|
||||
0xe7, 0x17, 0xb5, 0x95, 0x19, 0x74, 0xc7, 0xf5, 0x2a, 0xb9, 0xef, 0x9e, 0x6f, 0x2e, 0xfd, 0xf4,
|
||||
0xc3, 0xe6, 0xd2, 0x9d, 0x1f, 0x15, 0x28, 0xce, 0x4d, 0x89, 0xbe, 0x01, 0xd7, 0x7b, 0xed, 0x83,
|
||||
0xce, 0xfe, 0x9e, 0x75, 0xd4, 0x3b, 0xb0, 0xfa, 0x5f, 0x76, 0xf7, 0x67, 0xaa, 0xb8, 0x01, 0x85,
|
||||
0xae, 0xb9, 0xff, 0xf8, 0xb8, 0xbf, 0xcf, 0x3d, 0x25, 0xa5, 0xb2, 0x7a, 0x7e, 0x51, 0xd3, 0xba,
|
||||
0x11, 0x3e, 0x09, 0x28, 0xe6, 0xf1, 0x37, 0x61, 0xa5, 0x6b, 0xee, 0x8b, 0xc3, 0x0a, 0x50, 0xaa,
|
||||
0xb2, 0x76, 0x7e, 0x51, 0x2b, 0x76, 0x23, 0x2c, 0x84, 0xc0, 0x61, 0x5b, 0x50, 0xec, 0x9a, 0xc7,
|
||||
0xdd, 0xe3, 0x5e, 0xf3, 0x50, 0xa0, 0xd2, 0x95, 0xd2, 0xf9, 0x45, 0xad, 0x10, 0x8f, 0x38, 0x03,
|
||||
0x4d, 0xcf, 0xd9, 0x32, 0xbe, 0xba, 0xe7, 0xb8, 0x74, 0x34, 0x19, 0x18, 0xc3, 0x60, 0xdc, 0x98,
|
||||
0x76, 0x6f, 0xf6, 0x73, 0xe6, 0x3f, 0x8a, 0xc1, 0x32, 0x5f, 0x7c, 0xf4, 0x57, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xfb, 0xb3, 0xf9, 0x43, 0x67, 0x0c, 0x00, 0x00,
|
||||
}
|
||||
146
proto/types/types.proto
Normal file
146
proto/types/types.proto
Normal file
@@ -0,0 +1,146 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.types;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/types";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "proto/libs/bits/types.proto";
|
||||
import "proto/crypto/merkle/types.proto";
|
||||
import "proto/version/version.proto";
|
||||
|
||||
// BlockIdFlag indicates which BlcokID the signature is for
|
||||
enum BlockIDFlag {
|
||||
option (gogoproto.goproto_enum_stringer) = false;
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
BLOCKD_ID_FLAG_UNKNOWN = 0;
|
||||
BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"];
|
||||
BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"];
|
||||
BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"];
|
||||
}
|
||||
|
||||
// SignedMsgType is a type of signed message in the consensus.
|
||||
enum SignedMsgType {
|
||||
option (gogoproto.goproto_enum_stringer) = false;
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
SIGNED_MSG_TYPE_UNKNOWN = 0;
|
||||
PREVOTE_TYPE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"];
|
||||
PRECOMMIT_TYPE = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"];
|
||||
PROPOSAL_TYPE = 3 [(gogoproto.enumvalue_customname) = "ProposalType"];
|
||||
}
|
||||
|
||||
// PartsetHeader
|
||||
message PartSetHeader {
|
||||
int64 total = 1;
|
||||
bytes hash = 2;
|
||||
}
|
||||
|
||||
message Part {
|
||||
uint32 index = 1;
|
||||
bytes bytes = 2;
|
||||
tendermint.proto.crypto.merkle.SimpleProof proof = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// BlockID
|
||||
message BlockID {
|
||||
bytes hash = 1;
|
||||
PartSetHeader parts_header = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
|
||||
// Header defines the structure of a Tendermint block header.
|
||||
message Header {
|
||||
// basic block info
|
||||
tendermint.proto.version.Consensus version = 1 [(gogoproto.nullable) = false];
|
||||
string chain_id = 2 [(gogoproto.customname) = "ChainID"];
|
||||
int64 height = 3;
|
||||
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
|
||||
// prev block info
|
||||
BlockID last_block_id = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"];
|
||||
|
||||
// hashes of block data
|
||||
bytes last_commit_hash = 6; // commit from validators from the last block
|
||||
bytes data_hash = 7; // transactions
|
||||
|
||||
// hashes from the app output from the prev block
|
||||
bytes validators_hash = 8; // validators for the current block
|
||||
bytes next_validators_hash = 9; // validators for the next block
|
||||
bytes consensus_hash = 10; // consensus params for current block
|
||||
bytes app_hash = 11; // state after txs from the previous block
|
||||
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
|
||||
|
||||
// consensus info
|
||||
bytes evidence_hash = 13; // evidence included in the block
|
||||
bytes proposer_address = 14; // original proposer of the block
|
||||
}
|
||||
|
||||
// Data contains the set of transactions included in the block
|
||||
message Data {
|
||||
// Txs that will be applied by state @ block.Height+1.
|
||||
// NOTE: not all txs here are valid. We're just agreeing on the order first.
|
||||
// This means that block.AppHash does not include these txs.
|
||||
repeated bytes txs = 1;
|
||||
// Volatile
|
||||
bytes hash = 2;
|
||||
}
|
||||
|
||||
// Vote represents a prevote, precommit, or commit vote from validators for
|
||||
// consensus.
|
||||
message Vote {
|
||||
SignedMsgType type = 1;
|
||||
int64 height = 2;
|
||||
int64 round = 3;
|
||||
BlockID block_id = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
|
||||
google.protobuf.Timestamp timestamp = 5
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
bytes validator_address = 6;
|
||||
int64 validator_index = 7;
|
||||
bytes signature = 8;
|
||||
}
|
||||
|
||||
// Commit contains the evidence that a block was committed by a set of validators.
|
||||
message Commit {
|
||||
int64 height = 1;
|
||||
int32 round = 2;
|
||||
BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
|
||||
repeated CommitSig signatures = 4 [(gogoproto.nullable) = false];
|
||||
bytes hash = 5;
|
||||
tendermint.proto.libs.bits.BitArray bit_array = 6;
|
||||
}
|
||||
|
||||
// CommitSig is a part of the Vote included in a Commit.
|
||||
message CommitSig {
|
||||
BlockIDFlag block_id_flag = 1;
|
||||
bytes validator_address = 2;
|
||||
google.protobuf.Timestamp timestamp = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
bytes signature = 4;
|
||||
}
|
||||
|
||||
message Proposal {
|
||||
SignedMsgType type = 1;
|
||||
int64 height = 2;
|
||||
int32 round = 3;
|
||||
int32 pol_round = 4;
|
||||
BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
|
||||
google.protobuf.Timestamp timestamp = 6
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
bytes signature = 7;
|
||||
}
|
||||
|
||||
message SignedHeader {
|
||||
Header header = 1;
|
||||
Commit commit = 2;
|
||||
}
|
||||
|
||||
message BlockMeta {
|
||||
BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
|
||||
int64 block_size = 2;
|
||||
Header header = 3 [(gogoproto.nullable) = false];
|
||||
int64 num_txs = 4;
|
||||
}
|
||||
171
proto/types/validator.pb.go
Normal file
171
proto/types/validator.pb.go
Normal file
@@ -0,0 +1,171 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/types/validator.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
keys "github.com/tendermint/tendermint/proto/crypto/keys"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type ValidatorSet struct {
|
||||
Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
|
||||
Proposer *Validator `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
TotalVotingPower int64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ValidatorSet) Reset() { *m = ValidatorSet{} }
|
||||
func (m *ValidatorSet) String() string { return proto.CompactTextString(m) }
|
||||
func (*ValidatorSet) ProtoMessage() {}
|
||||
func (*ValidatorSet) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2e7c6b38c20e5406, []int{0}
|
||||
}
|
||||
func (m *ValidatorSet) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ValidatorSet.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ValidatorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ValidatorSet.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ValidatorSet) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ValidatorSet.Merge(m, src)
|
||||
}
|
||||
func (m *ValidatorSet) XXX_Size() int {
|
||||
return xxx_messageInfo_ValidatorSet.Size(m)
|
||||
}
|
||||
func (m *ValidatorSet) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ValidatorSet.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ValidatorSet proto.InternalMessageInfo
|
||||
|
||||
func (m *ValidatorSet) GetValidators() []*Validator {
|
||||
if m != nil {
|
||||
return m.Validators
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ValidatorSet) GetProposer() *Validator {
|
||||
if m != nil {
|
||||
return m.Proposer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ValidatorSet) GetTotalVotingPower() int64 {
|
||||
if m != nil {
|
||||
return m.TotalVotingPower
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Validator struct {
|
||||
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
PubKey keys.PublicKey `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
|
||||
VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"`
|
||||
ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Validator) Reset() { *m = Validator{} }
|
||||
func (m *Validator) String() string { return proto.CompactTextString(m) }
|
||||
func (*Validator) ProtoMessage() {}
|
||||
func (*Validator) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2e7c6b38c20e5406, []int{1}
|
||||
}
|
||||
func (m *Validator) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Validator.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Validator.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Validator) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Validator.Merge(m, src)
|
||||
}
|
||||
func (m *Validator) XXX_Size() int {
|
||||
return xxx_messageInfo_Validator.Size(m)
|
||||
}
|
||||
func (m *Validator) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Validator.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Validator proto.InternalMessageInfo
|
||||
|
||||
func (m *Validator) GetAddress() []byte {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Validator) GetPubKey() keys.PublicKey {
|
||||
if m != nil {
|
||||
return m.PubKey
|
||||
}
|
||||
return keys.PublicKey{}
|
||||
}
|
||||
|
||||
func (m *Validator) GetVotingPower() int64 {
|
||||
if m != nil {
|
||||
return m.VotingPower
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Validator) GetProposerPriority() int64 {
|
||||
if m != nil {
|
||||
return m.ProposerPriority
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ValidatorSet)(nil), "tendermint.proto.types.ValidatorSet")
|
||||
proto.RegisterType((*Validator)(nil), "tendermint.proto.types.Validator")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/types/validator.proto", fileDescriptor_2e7c6b38c20e5406) }
|
||||
|
||||
var fileDescriptor_2e7c6b38c20e5406 = []byte{
|
||||
// 325 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbd, 0x4e, 0x02, 0x41,
|
||||
0x10, 0xc7, 0x5d, 0x21, 0xa0, 0x0b, 0x85, 0x6e, 0x61, 0x2e, 0x18, 0x23, 0x50, 0x28, 0x89, 0x64,
|
||||
0x2f, 0xd1, 0xda, 0x42, 0x0a, 0x1b, 0x1a, 0x72, 0x26, 0x14, 0x36, 0x97, 0x3b, 0x6e, 0x73, 0x6c,
|
||||
0xf8, 0x98, 0xcd, 0xdc, 0x1c, 0x66, 0x1f, 0x4e, 0x6b, 0x9f, 0xc2, 0x67, 0x31, 0xdc, 0x72, 0x07,
|
||||
0x89, 0x14, 0x76, 0x33, 0xff, 0xff, 0x7c, 0xfc, 0x76, 0xb2, 0xfc, 0xda, 0x20, 0x10, 0xf8, 0x64,
|
||||
0x8d, 0xca, 0xfc, 0x4d, 0xb4, 0xd4, 0x49, 0x44, 0x80, 0xb2, 0x50, 0xc5, 0x15, 0xa9, 0x75, 0xa2,
|
||||
0x70, 0xa5, 0xd7, 0xe4, 0x14, 0x59, 0xd4, 0x75, 0xee, 0x68, 0xae, 0x31, 0x09, 0x4d, 0x84, 0x64,
|
||||
0x7d, 0x37, 0x20, 0x85, 0x14, 0xf6, 0x91, 0xab, 0xee, 0xdc, 0x38, 0x65, 0x86, 0xd6, 0x10, 0xf8,
|
||||
0x0b, 0x65, 0x33, 0xb7, 0xc8, 0xd9, 0xfd, 0x2f, 0xc6, 0xdb, 0xd3, 0x72, 0xe5, 0x9b, 0x22, 0xf1,
|
||||
0xc2, 0x79, 0x85, 0x90, 0x79, 0xac, 0x5b, 0x1b, 0xb4, 0x1e, 0x7b, 0xf2, 0x38, 0x84, 0xac, 0x3a,
|
||||
0x83, 0x83, 0x26, 0xf1, 0xcc, 0xcf, 0x0c, 0x82, 0x81, 0x4c, 0xa1, 0x77, 0xda, 0x65, 0xff, 0x1b,
|
||||
0x50, 0xb5, 0x88, 0x21, 0x17, 0x04, 0x14, 0x2d, 0xc3, 0x0d, 0x90, 0x5e, 0xa7, 0xa1, 0x81, 0x0f,
|
||||
0x85, 0x5e, 0xad, 0xcb, 0x06, 0xb5, 0xe0, 0xa2, 0x70, 0xa6, 0x85, 0x31, 0xd9, 0xea, 0xfd, 0x4f,
|
||||
0xc6, 0xcf, 0xab, 0x29, 0xc2, 0xe3, 0xcd, 0x28, 0x49, 0x50, 0x65, 0x5b, 0x74, 0x36, 0x68, 0x07,
|
||||
0x65, 0x2a, 0x5e, 0x79, 0xd3, 0xe4, 0x71, 0xb8, 0x50, 0x76, 0xc7, 0x74, 0xff, 0x97, 0xc9, 0x1d,
|
||||
0x49, 0x6e, 0x8f, 0x24, 0x27, 0x79, 0xbc, 0xd4, 0xb3, 0xb1, 0xb2, 0xa3, 0xfa, 0xf7, 0xcf, 0xed,
|
||||
0x49, 0xd0, 0x30, 0x79, 0x3c, 0x56, 0x56, 0xf4, 0x78, 0xfb, 0x08, 0x57, 0x6b, 0xb3, 0x47, 0x12,
|
||||
0x0f, 0xfc, 0xb2, 0x7c, 0x4c, 0x68, 0x50, 0x03, 0x6a, 0xb2, 0x5e, 0xdd, 0xf1, 0x97, 0xc6, 0x64,
|
||||
0xa7, 0x8f, 0xe4, 0xfb, 0x30, 0xd5, 0x34, 0xcf, 0x63, 0x39, 0x83, 0x95, 0xbf, 0x47, 0x3a, 0x0c,
|
||||
0x0f, 0xfe, 0x47, 0xdc, 0x28, 0x92, 0xa7, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x28, 0xeb,
|
||||
0x40, 0x35, 0x02, 0x00, 0x00,
|
||||
}
|
||||
20
proto/types/validator.proto
Normal file
20
proto/types/validator.proto
Normal file
@@ -0,0 +1,20 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.types;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/types";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "proto/crypto/keys/types.proto";
|
||||
|
||||
message ValidatorSet {
|
||||
repeated Validator validators = 1;
|
||||
Validator proposer = 2;
|
||||
int64 total_voting_power = 3;
|
||||
}
|
||||
|
||||
message Validator {
|
||||
bytes address = 1;
|
||||
tendermint.proto.crypto.keys.PublicKey pub_key = 2 [(gogoproto.nullable) = false];
|
||||
int64 voting_power = 3;
|
||||
int64 proposer_priority = 4;
|
||||
}
|
||||
176
proto/version/version.pb.go
Normal file
176
proto/version/version.pb.go
Normal file
@@ -0,0 +1,176 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: proto/version/version.proto
|
||||
|
||||
package version
|
||||
|
||||
import (
|
||||
bytes "bytes"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// 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 uint64 `protobuf:"varint,1,opt,name=protocol,proto3" json:"protocol,omitempty"`
|
||||
Software string `protobuf:"bytes,2,opt,name=software,proto3" json:"software,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *App) Reset() { *m = App{} }
|
||||
func (m *App) String() string { return proto.CompactTextString(m) }
|
||||
func (*App) ProtoMessage() {}
|
||||
func (*App) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_14aa2353622f11e1, []int{0}
|
||||
}
|
||||
func (m *App) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_App.Unmarshal(m, b)
|
||||
}
|
||||
func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_App.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *App) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_App.Merge(m, src)
|
||||
}
|
||||
func (m *App) XXX_Size() int {
|
||||
return xxx_messageInfo_App.Size(m)
|
||||
}
|
||||
func (m *App) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_App.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_App proto.InternalMessageInfo
|
||||
|
||||
func (m *App) GetProtocol() uint64 {
|
||||
if m != nil {
|
||||
return m.Protocol
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *App) GetSoftware() string {
|
||||
if m != nil {
|
||||
return m.Software
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 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 uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"`
|
||||
App uint64 `protobuf:"varint,2,opt,name=app,proto3" json:"app,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Consensus) Reset() { *m = Consensus{} }
|
||||
func (m *Consensus) String() string { return proto.CompactTextString(m) }
|
||||
func (*Consensus) ProtoMessage() {}
|
||||
func (*Consensus) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_14aa2353622f11e1, []int{1}
|
||||
}
|
||||
func (m *Consensus) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Consensus.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Consensus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Consensus.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Consensus) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Consensus.Merge(m, src)
|
||||
}
|
||||
func (m *Consensus) XXX_Size() int {
|
||||
return xxx_messageInfo_Consensus.Size(m)
|
||||
}
|
||||
func (m *Consensus) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Consensus.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Consensus proto.InternalMessageInfo
|
||||
|
||||
func (m *Consensus) GetBlock() uint64 {
|
||||
if m != nil {
|
||||
return m.Block
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Consensus) GetApp() uint64 {
|
||||
if m != nil {
|
||||
return m.App
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*App)(nil), "tendermint.proto.version.App")
|
||||
proto.RegisterType((*Consensus)(nil), "tendermint.proto.version.Consensus")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("proto/version/version.proto", fileDescriptor_14aa2353622f11e1) }
|
||||
|
||||
var fileDescriptor_14aa2353622f11e1 = []byte{
|
||||
// 198 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f,
|
||||
0xc9, 0xd7, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x60, 0x51, 0x21, 0x89,
|
||||
0x92, 0xd4, 0xbc, 0x94, 0xd4, 0xa2, 0xdc, 0xcc, 0xbc, 0x12, 0x88, 0x88, 0x1e, 0x54, 0x5e, 0x4a,
|
||||
0xad, 0x24, 0x23, 0xb3, 0x28, 0x25, 0xbe, 0x20, 0xb1, 0xa8, 0xa4, 0x52, 0x1f, 0x62, 0x44, 0x7a,
|
||||
0x7e, 0x7a, 0x3e, 0x82, 0x05, 0x51, 0xaf, 0x64, 0xcb, 0xc5, 0xec, 0x58, 0x50, 0x20, 0x24, 0xc5,
|
||||
0xc5, 0x01, 0xe6, 0x27, 0xe7, 0xe7, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0xc1, 0xf9, 0x20,
|
||||
0xb9, 0xe2, 0xfc, 0xb4, 0x92, 0xf2, 0xc4, 0xa2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20,
|
||||
0x38, 0x5f, 0xc9, 0x92, 0x8b, 0xd3, 0x39, 0x3f, 0xaf, 0x38, 0x35, 0xaf, 0xb8, 0xb4, 0x58, 0x48,
|
||||
0x84, 0x8b, 0x35, 0x29, 0x27, 0x3f, 0x39, 0x1b, 0x6a, 0x02, 0x84, 0x23, 0x24, 0xc0, 0xc5, 0x9c,
|
||||
0x58, 0x50, 0x00, 0xd6, 0xc9, 0x12, 0x04, 0x62, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xe8, 0x64,
|
||||
0x10, 0xa5, 0x97, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0xf0, 0x08,
|
||||
0x32, 0x13, 0xc5, 0xef, 0x49, 0x6c, 0x60, 0xae, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xd3,
|
||||
0x5b, 0xf2, 0x13, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *Consensus) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
}
|
||||
|
||||
that1, ok := that.(*Consensus)
|
||||
if !ok {
|
||||
that2, ok := that.(Consensus)
|
||||
if ok {
|
||||
that1 = &that2
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
if this.Block != that1.Block {
|
||||
return false
|
||||
}
|
||||
if this.App != that1.App {
|
||||
return false
|
||||
}
|
||||
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
24
proto/version/version.proto
Normal file
24
proto/version/version.proto
Normal file
@@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package tendermint.proto.version;
|
||||
|
||||
option go_package = "github.com/tendermint/tendermint/proto/version";
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
|
||||
// App includes the protocol and software version for the application.
|
||||
// This information is included in ResponseInfo. The App.Protocol can be
|
||||
// updated in ResponseEndBlock.
|
||||
message App {
|
||||
uint64 protocol = 1;
|
||||
string software = 2;
|
||||
}
|
||||
|
||||
// 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.
|
||||
message Consensus {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 block = 1;
|
||||
uint64 app = 2;
|
||||
}
|
||||
239
types/block.go
239
types/block.go
@@ -15,6 +15,8 @@ import (
|
||||
"github.com/tendermint/tendermint/libs/bits"
|
||||
tmbytes "github.com/tendermint/tendermint/libs/bytes"
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
tmversion "github.com/tendermint/tendermint/proto/version"
|
||||
"github.com/tendermint/tendermint/version"
|
||||
)
|
||||
|
||||
@@ -450,6 +452,62 @@ func (h *Header) StringIndented(indent string) string {
|
||||
indent, h.Hash())
|
||||
}
|
||||
|
||||
// ToProto converts Header to protobuf
|
||||
func (h *Header) ToProto() *tmproto.Header {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &tmproto.Header{
|
||||
Version: tmversion.Consensus{Block: h.Version.App.Uint64(), App: h.Version.App.Uint64()},
|
||||
ChainID: h.ChainID,
|
||||
Height: h.Height,
|
||||
Time: h.Time,
|
||||
LastBlockID: h.LastBlockID.ToProto(),
|
||||
ValidatorsHash: h.ValidatorsHash,
|
||||
NextValidatorsHash: h.NextValidatorsHash,
|
||||
ConsensusHash: h.ConsensusHash,
|
||||
AppHash: h.AppHash,
|
||||
DataHash: h.DataHash,
|
||||
EvidenceHash: h.EvidenceHash,
|
||||
LastResultsHash: h.LastResultsHash,
|
||||
LastCommitHash: h.LastCommitHash,
|
||||
ProposerAddress: h.ProposerAddress,
|
||||
}
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf Header to the given pointer.
|
||||
// It returns an error if the header is invalid.
|
||||
func HeaderFromProto(ph *tmproto.Header) (Header, error) {
|
||||
if ph == nil {
|
||||
return Header{}, errors.New("nil Header")
|
||||
}
|
||||
|
||||
h := new(Header)
|
||||
|
||||
bi, err := BlockIDFromProto(&ph.LastBlockID)
|
||||
if err != nil {
|
||||
return Header{}, err
|
||||
}
|
||||
|
||||
h.Version = version.Consensus{Block: version.Protocol(ph.Version.Block), App: version.Protocol(ph.Version.App)}
|
||||
h.ChainID = ph.ChainID
|
||||
h.Height = ph.Height
|
||||
h.Time = ph.Time
|
||||
h.Height = ph.Height
|
||||
h.LastBlockID = *bi
|
||||
h.ValidatorsHash = ph.ValidatorsHash
|
||||
h.NextValidatorsHash = ph.NextValidatorsHash
|
||||
h.ConsensusHash = ph.ConsensusHash
|
||||
h.AppHash = ph.AppHash
|
||||
h.DataHash = ph.DataHash
|
||||
h.EvidenceHash = ph.EvidenceHash
|
||||
h.LastResultsHash = ph.LastResultsHash
|
||||
h.LastCommitHash = ph.LastCommitHash
|
||||
h.ProposerAddress = ph.ProposerAddress
|
||||
|
||||
return *h, h.ValidateBasic()
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
// BlockIDFlag indicates which BlockID the signature is for.
|
||||
@@ -565,6 +623,32 @@ func (cs CommitSig) ValidateBasic() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ToProto converts CommitSig to protobuf
|
||||
func (cs *CommitSig) ToProto() *tmproto.CommitSig {
|
||||
if cs == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &tmproto.CommitSig{
|
||||
BlockIdFlag: tmproto.BlockIDFlag(cs.BlockIDFlag),
|
||||
ValidatorAddress: cs.ValidatorAddress,
|
||||
Timestamp: cs.Timestamp,
|
||||
Signature: cs.Signature,
|
||||
}
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf CommitSig to the given pointer.
|
||||
// It returns an error if the CommitSig is invalid.
|
||||
func (cs *CommitSig) FromProto(csp tmproto.CommitSig) error {
|
||||
|
||||
cs.BlockIDFlag = BlockIDFlag(csp.BlockIdFlag)
|
||||
cs.ValidatorAddress = csp.ValidatorAddress
|
||||
cs.Timestamp = csp.Timestamp
|
||||
cs.Signature = csp.Signature
|
||||
|
||||
return cs.ValidateBasic()
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
// Commit contains the evidence that a block was committed by a set of validators.
|
||||
@@ -701,17 +785,18 @@ func (commit *Commit) ValidateBasic() error {
|
||||
if commit.Round < 0 {
|
||||
return errors.New("negative Round")
|
||||
}
|
||||
if commit.Height >= 1 {
|
||||
if commit.BlockID.IsZero() {
|
||||
return errors.New("commit cannot be for nil block")
|
||||
}
|
||||
|
||||
if commit.BlockID.IsZero() {
|
||||
return errors.New("commit cannot be for nil block")
|
||||
}
|
||||
|
||||
if len(commit.Signatures) == 0 {
|
||||
return errors.New("no signatures in commit")
|
||||
}
|
||||
for i, commitSig := range commit.Signatures {
|
||||
if err := commitSig.ValidateBasic(); err != nil {
|
||||
return fmt.Errorf("wrong CommitSig #%d: %v", i, err)
|
||||
if len(commit.Signatures) == 0 {
|
||||
return errors.New("no signatures in commit")
|
||||
}
|
||||
for i, commitSig := range commit.Signatures {
|
||||
if err := commitSig.ValidateBasic(); err != nil {
|
||||
return fmt.Errorf("wrong CommitSig #%d: %v", i, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -757,6 +842,65 @@ func (commit *Commit) StringIndented(indent string) string {
|
||||
indent, commit.hash)
|
||||
}
|
||||
|
||||
// ToProto converts Commit to protobuf
|
||||
func (commit *Commit) ToProto() *tmproto.Commit {
|
||||
if commit == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
c := new(tmproto.Commit)
|
||||
sigs := make([]tmproto.CommitSig, len(commit.Signatures))
|
||||
for i := range commit.Signatures {
|
||||
sigs[i] = *commit.Signatures[i].ToProto()
|
||||
}
|
||||
c.Signatures = sigs
|
||||
|
||||
c.Height = commit.Height
|
||||
c.Round = int32(commit.Round)
|
||||
c.BlockID = commit.BlockID.ToProto()
|
||||
if commit.hash != nil {
|
||||
c.Hash = commit.hash
|
||||
}
|
||||
c.BitArray = commit.bitArray.ToProto()
|
||||
return c
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf Commit to the given pointer.
|
||||
// It returns an error if the commit is invalid.
|
||||
func CommitFromProto(cp *tmproto.Commit) (*Commit, error) {
|
||||
if cp == nil {
|
||||
return nil, errors.New("nil Commit")
|
||||
}
|
||||
|
||||
var (
|
||||
commit = new(Commit)
|
||||
bitArray *bits.BitArray
|
||||
)
|
||||
|
||||
bi, err := BlockIDFromProto(&cp.BlockID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
bitArray.FromProto(cp.BitArray)
|
||||
|
||||
sigs := make([]CommitSig, len(cp.Signatures))
|
||||
for i := range cp.Signatures {
|
||||
if err := sigs[i].FromProto(cp.Signatures[i]); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
commit.Signatures = sigs
|
||||
|
||||
commit.Height = cp.Height
|
||||
commit.Round = int(cp.Round)
|
||||
commit.BlockID = *bi
|
||||
commit.hash = cp.Hash
|
||||
commit.bitArray = bitArray
|
||||
|
||||
return commit, commit.ValidateBasic()
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// SignedHeader is a header along with the commits that prove it.
|
||||
@@ -816,6 +960,51 @@ func (sh SignedHeader) StringIndented(indent string) string {
|
||||
indent)
|
||||
}
|
||||
|
||||
// ToProto converts SignedHeader to protobuf
|
||||
func (sh *SignedHeader) ToProto() *tmproto.SignedHeader {
|
||||
if sh == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
psh := new(tmproto.SignedHeader)
|
||||
if sh.Header != nil {
|
||||
psh.Header = sh.Header.ToProto()
|
||||
}
|
||||
if sh.Commit != nil {
|
||||
psh.Commit = sh.Commit.ToProto()
|
||||
}
|
||||
|
||||
return psh
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf SignedHeader to the given pointer.
|
||||
// It returns an error if the hader or the commit is invalid.
|
||||
func SignedHeaderFromProto(shp *tmproto.SignedHeader) (*SignedHeader, error) {
|
||||
if shp == nil {
|
||||
return nil, errors.New("nil SignedHeader")
|
||||
}
|
||||
|
||||
sh := new(SignedHeader)
|
||||
|
||||
if shp.Header != nil {
|
||||
h, err := HeaderFromProto(shp.Header)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sh.Header = &h
|
||||
}
|
||||
|
||||
if shp.Commit != nil {
|
||||
c, err := CommitFromProto(shp.Commit)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sh.Commit = c
|
||||
}
|
||||
|
||||
return sh, nil
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Data contains the set of transactions included in the block
|
||||
@@ -951,3 +1140,33 @@ func (blockID BlockID) IsComplete() bool {
|
||||
func (blockID BlockID) String() string {
|
||||
return fmt.Sprintf(`%v:%v`, blockID.Hash, blockID.PartsHeader)
|
||||
}
|
||||
|
||||
// ToProto converts BlockID to protobuf
|
||||
func (blockID *BlockID) ToProto() tmproto.BlockID {
|
||||
if blockID == nil {
|
||||
return tmproto.BlockID{}
|
||||
}
|
||||
|
||||
return tmproto.BlockID{
|
||||
Hash: blockID.Hash,
|
||||
PartsHeader: blockID.PartsHeader.ToProto(),
|
||||
}
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf BlockID to the given pointer.
|
||||
// It returns an error if the block id is invalid.
|
||||
func BlockIDFromProto(bID *tmproto.BlockID) (*BlockID, error) {
|
||||
if bID == nil {
|
||||
return nil, errors.New("nil BlockID")
|
||||
}
|
||||
blockID := new(BlockID)
|
||||
ph, err := PartSetHeaderFromProto(&bID.PartsHeader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
blockID.PartsHeader = *ph
|
||||
blockID.Hash = bID.Hash
|
||||
|
||||
return blockID, blockID.ValidateBasic()
|
||||
}
|
||||
|
||||
@@ -598,3 +598,139 @@ func TestBlockIDValidateBasic(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func makeRandHeader() Header {
|
||||
chainID := "test"
|
||||
t := time.Now()
|
||||
height := tmrand.Int63()
|
||||
randBytes := tmrand.Bytes(tmhash.Size)
|
||||
randAddress := tmrand.Bytes(crypto.AddressSize)
|
||||
h := Header{
|
||||
Version: version.Consensus{Block: 1, App: 1},
|
||||
ChainID: chainID,
|
||||
Height: height,
|
||||
Time: t,
|
||||
LastBlockID: BlockID{},
|
||||
LastCommitHash: randBytes,
|
||||
DataHash: randBytes,
|
||||
ValidatorsHash: randBytes,
|
||||
NextValidatorsHash: randBytes,
|
||||
ConsensusHash: randBytes,
|
||||
AppHash: randBytes,
|
||||
|
||||
LastResultsHash: randBytes,
|
||||
|
||||
EvidenceHash: randBytes,
|
||||
ProposerAddress: randAddress,
|
||||
}
|
||||
|
||||
return h
|
||||
}
|
||||
|
||||
func TestHeaderProto(t *testing.T) {
|
||||
h1 := makeRandHeader()
|
||||
tc := []struct {
|
||||
msg string
|
||||
h1 *Header
|
||||
expPass bool
|
||||
}{
|
||||
{"success", &h1, true},
|
||||
{"failure empty Header", &Header{}, false},
|
||||
}
|
||||
|
||||
for _, tt := range tc {
|
||||
tt := tt
|
||||
t.Run(tt.msg, func(t *testing.T) {
|
||||
pb := tt.h1.ToProto()
|
||||
h, err := HeaderFromProto(pb)
|
||||
if tt.expPass {
|
||||
require.NoError(t, err, tt.msg)
|
||||
require.Equal(t, tt.h1, &h, tt.msg)
|
||||
} else {
|
||||
require.Error(t, err, tt.msg)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestBlockIDProtoBuf(t *testing.T) {
|
||||
blockID := makeBlockID([]byte("hash"), 2, []byte("part_set_hash"))
|
||||
testCases := []struct {
|
||||
msg string
|
||||
bid1 *BlockID
|
||||
expPass bool
|
||||
}{
|
||||
{"success", &blockID, true},
|
||||
{"success empty", &BlockID{}, true},
|
||||
{"failure BlockID nil", nil, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoBlockID := tc.bid1.ToProto()
|
||||
|
||||
bi, err := BlockIDFromProto(&protoBlockID)
|
||||
if tc.expPass {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.bid1, bi, tc.msg)
|
||||
} else {
|
||||
require.NotEqual(t, tc.bid1, bi, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSignedHeaderProtoBuf(t *testing.T) {
|
||||
commit := randCommit(time.Now())
|
||||
h := makeRandHeader()
|
||||
|
||||
sh := SignedHeader{Header: &h, Commit: commit}
|
||||
|
||||
testCases := []struct {
|
||||
msg string
|
||||
sh1 *SignedHeader
|
||||
expPass bool
|
||||
}{
|
||||
{"empty SignedHeader 2", &SignedHeader{}, true},
|
||||
{"success", &sh, true},
|
||||
{"failure nil", nil, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoSignedHeader := tc.sh1.ToProto()
|
||||
|
||||
sh, err := SignedHeaderFromProto(protoSignedHeader)
|
||||
|
||||
if tc.expPass {
|
||||
require.NoError(t, err, tc.msg)
|
||||
require.Equal(t, tc.sh1, sh, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCommitProtoBuf(t *testing.T) {
|
||||
commit := randCommit(time.Now())
|
||||
|
||||
testCases := []struct {
|
||||
msg string
|
||||
c1 *Commit
|
||||
expPass bool
|
||||
}{
|
||||
{"success", commit, true},
|
||||
// Empty value sets signatures to nil, signatures should not be nillable
|
||||
{"empty commit", &Commit{Signatures: []CommitSig{}}, true},
|
||||
{"fail Commit nil", nil, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
tc := tc
|
||||
protoCommit := tc.c1.ToProto()
|
||||
|
||||
c, err := CommitFromProto(protoCommit)
|
||||
|
||||
if tc.expPass {
|
||||
require.NoError(t, err, tc.msg)
|
||||
require.Equal(t, tc.c1, c, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
|
||||
amino "github.com/tendermint/go-amino"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
cryptoenc "github.com/tendermint/tendermint/crypto/encoding"
|
||||
"github.com/tendermint/tendermint/crypto/merkle"
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -69,6 +69,118 @@ type Evidence interface {
|
||||
String() string
|
||||
}
|
||||
|
||||
func EvidenceToProto(evidence Evidence) (*tmproto.Evidence, error) {
|
||||
if evidence == nil {
|
||||
return nil, errors.New("nil evidence")
|
||||
}
|
||||
|
||||
switch evi := evidence.(type) {
|
||||
case *DuplicateVoteEvidence:
|
||||
voteB := evi.VoteB.ToProto()
|
||||
voteA := evi.VoteA.ToProto()
|
||||
pk, err := cryptoenc.PubKeyToProto(evi.PubKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tp := &tmproto.Evidence{
|
||||
Sum: &tmproto.Evidence_DuplicateVoteEvidence{
|
||||
DuplicateVoteEvidence: &tmproto.DuplicateVoteEvidence{
|
||||
PubKey: &pk,
|
||||
VoteA: voteA,
|
||||
VoteB: voteB,
|
||||
},
|
||||
},
|
||||
}
|
||||
return tp, nil
|
||||
case MockEvidence:
|
||||
if err := evi.ValidateBasic(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tp := &tmproto.Evidence{
|
||||
Sum: &tmproto.Evidence_MockEvidence{
|
||||
MockEvidence: &tmproto.MockEvidence{
|
||||
EvidenceHeight: evi.Height(),
|
||||
EvidenceTime: evi.Time(),
|
||||
EvidenceAddress: evi.Address(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return tp, nil
|
||||
case MockRandomEvidence:
|
||||
if err := evi.ValidateBasic(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tp := &tmproto.Evidence{
|
||||
Sum: &tmproto.Evidence_MockRandomEvidence{
|
||||
MockRandomEvidence: &tmproto.MockRandomEvidence{
|
||||
EvidenceHeight: evi.Height(),
|
||||
EvidenceTime: evi.Time(),
|
||||
EvidenceAddress: evi.Address(),
|
||||
RandBytes: evi.randBytes,
|
||||
},
|
||||
},
|
||||
}
|
||||
return tp, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("toproto: evidence is not recognized: %T", evi)
|
||||
}
|
||||
}
|
||||
|
||||
func EvidenceFromProto(evidence *tmproto.Evidence) (Evidence, error) {
|
||||
if evidence == nil {
|
||||
return nil, errors.New("nil evidence")
|
||||
}
|
||||
|
||||
switch evi := evidence.Sum.(type) {
|
||||
case *tmproto.Evidence_DuplicateVoteEvidence:
|
||||
|
||||
vA, err := VoteFromProto(evi.DuplicateVoteEvidence.VoteA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vB, err := VoteFromProto(evi.DuplicateVoteEvidence.VoteB)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pk, err := cryptoenc.PubKeyFromProto(evi.DuplicateVoteEvidence.GetPubKey())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
dve := DuplicateVoteEvidence{
|
||||
PubKey: pk,
|
||||
VoteA: vA,
|
||||
VoteB: vB,
|
||||
}
|
||||
|
||||
return &dve, dve.ValidateBasic()
|
||||
case *tmproto.Evidence_MockEvidence:
|
||||
me := MockEvidence{
|
||||
EvidenceHeight: evi.MockEvidence.GetEvidenceHeight(),
|
||||
EvidenceAddress: evi.MockEvidence.GetEvidenceAddress(),
|
||||
EvidenceTime: evi.MockEvidence.GetEvidenceTime(),
|
||||
}
|
||||
return me, me.ValidateBasic()
|
||||
case *tmproto.Evidence_MockRandomEvidence:
|
||||
mre := MockRandomEvidence{
|
||||
MockEvidence: MockEvidence{
|
||||
EvidenceHeight: evi.MockRandomEvidence.GetEvidenceHeight(),
|
||||
EvidenceAddress: evi.MockRandomEvidence.GetEvidenceAddress(),
|
||||
EvidenceTime: evi.MockRandomEvidence.GetEvidenceTime(),
|
||||
},
|
||||
randBytes: evi.MockRandomEvidence.RandBytes,
|
||||
}
|
||||
return mre, mre.ValidateBasic()
|
||||
default:
|
||||
return nil, errors.New("evidence is not recognized")
|
||||
}
|
||||
}
|
||||
|
||||
func RegisterEvidences(cdc *amino.Codec) {
|
||||
cdc.RegisterInterface((*Evidence)(nil), nil)
|
||||
cdc.RegisterConcrete(&DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil)
|
||||
@@ -221,6 +333,7 @@ func (dve *DuplicateVoteEvidence) Equal(ev Evidence) bool {
|
||||
// just check their hashes
|
||||
dveHash := tmhash.Sum(cdcEncode(dve))
|
||||
evHash := tmhash.Sum(cdcEncode(ev))
|
||||
fmt.Println(dveHash, evHash)
|
||||
return bytes.Equal(dveHash, evHash)
|
||||
}
|
||||
|
||||
|
||||
@@ -176,3 +176,44 @@ func TestMockBadEvidenceValidateBasic(t *testing.T) {
|
||||
badEvidence := NewMockEvidence(int64(1), time.Now(), 1, []byte{1})
|
||||
assert.Nil(t, badEvidence.ValidateBasic())
|
||||
}
|
||||
|
||||
func TestEvidenceProto(t *testing.T) {
|
||||
// -------- Votes --------
|
||||
val := NewMockPV()
|
||||
blockID := makeBlockID(tmhash.Sum([]byte("blockhash")), math.MaxInt64, tmhash.Sum([]byte("partshash")))
|
||||
blockID2 := makeBlockID(tmhash.Sum([]byte("blockhash2")), math.MaxInt64, tmhash.Sum([]byte("partshash")))
|
||||
const chainID = "mychain"
|
||||
v := makeVote(t, val, chainID, math.MaxInt64, math.MaxInt64, 1, 0x01, blockID)
|
||||
v2 := makeVote(t, val, chainID, math.MaxInt64, math.MaxInt64, 2, 0x01, blockID2)
|
||||
|
||||
tests := []struct {
|
||||
testName string
|
||||
evidence Evidence
|
||||
wantErr bool
|
||||
wantErr2 bool
|
||||
}{
|
||||
{"&DuplicateVoteEvidence empty fail", &DuplicateVoteEvidence{}, true, true},
|
||||
{"&DuplicateVoteEvidence nil voteB", &DuplicateVoteEvidence{VoteA: v, VoteB: nil}, true, true},
|
||||
{"&DuplicateVoteEvidence nil voteA", &DuplicateVoteEvidence{VoteA: nil, VoteB: v}, true, true},
|
||||
{"&DuplicateVoteEvidence success", &DuplicateVoteEvidence{VoteA: v2, VoteB: v,
|
||||
PubKey: val.PrivKey.PubKey()}, false, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.testName, func(t *testing.T) {
|
||||
pb, err := EvidenceToProto(tt.evidence)
|
||||
if tt.wantErr {
|
||||
assert.Error(t, err, tt.testName)
|
||||
return
|
||||
}
|
||||
assert.NoError(t, err, tt.testName)
|
||||
|
||||
evi, err := EvidenceFromProto(pb)
|
||||
if tt.wantErr2 {
|
||||
assert.Error(t, err, tt.testName)
|
||||
return
|
||||
}
|
||||
require.Equal(t, tt.evidence, evi, tt.testName)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/tendermint/tendermint/libs/bits"
|
||||
tmbytes "github.com/tendermint/tendermint/libs/bytes"
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -85,6 +86,30 @@ func (psh PartSetHeader) ValidateBasic() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ToProto converts BloPartSetHeaderckID to protobuf
|
||||
func (psh *PartSetHeader) ToProto() tmproto.PartSetHeader {
|
||||
if psh == nil {
|
||||
return tmproto.PartSetHeader{}
|
||||
}
|
||||
|
||||
return tmproto.PartSetHeader{
|
||||
Total: int64(psh.Total),
|
||||
Hash: psh.Hash,
|
||||
}
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf PartSetHeader to the given pointer
|
||||
func PartSetHeaderFromProto(ppsh *tmproto.PartSetHeader) (*PartSetHeader, error) {
|
||||
if ppsh == nil {
|
||||
return nil, errors.New("nil PartSetHeader")
|
||||
}
|
||||
psh := new(PartSetHeader)
|
||||
psh.Total = int(ppsh.Total)
|
||||
psh.Hash = ppsh.Hash
|
||||
|
||||
return psh, psh.ValidateBasic()
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
type PartSet struct {
|
||||
|
||||
@@ -136,3 +136,26 @@ func TestPartValidateBasic(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestParSetHeaderProtoBuf(t *testing.T) {
|
||||
testCases := []struct {
|
||||
msg string
|
||||
ps1 *PartSetHeader
|
||||
expPass bool
|
||||
}{
|
||||
{"success empty", &PartSetHeader{}, true},
|
||||
{"success",
|
||||
&PartSetHeader{Total: 1, Hash: []byte("hash")}, true},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
protoBlockID := tc.ps1.ToProto()
|
||||
|
||||
psh, err := PartSetHeaderFromProto(&protoBlockID)
|
||||
if tc.expPass {
|
||||
require.Equal(t, tc.ps1, psh, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/libs/bytes"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
)
|
||||
|
||||
@@ -95,3 +96,46 @@ func (p *Proposal) SignBytes(chainID string) []byte {
|
||||
}
|
||||
return bz
|
||||
}
|
||||
|
||||
// ToProto converts Proposal to protobuf
|
||||
func (p *Proposal) ToProto() *tmproto.Proposal {
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
pb := new(tmproto.Proposal)
|
||||
|
||||
pb.BlockID = p.BlockID.ToProto()
|
||||
pb.Type = tmproto.SignedMsgType(p.Type)
|
||||
pb.Height = p.Height
|
||||
pb.Round = int32(p.Round)
|
||||
pb.PolRound = int32(p.POLRound)
|
||||
pb.Timestamp = p.Timestamp
|
||||
pb.Signature = p.Signature
|
||||
|
||||
return pb
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf Proposal to the given pointer.
|
||||
// It returns an error if the proposal is invalid.
|
||||
func ProposalFromProto(pp *tmproto.Proposal) (*Proposal, error) {
|
||||
if pp == nil {
|
||||
return nil, errors.New("nil proposal")
|
||||
}
|
||||
|
||||
p := new(Proposal)
|
||||
|
||||
blockID, err := BlockIDFromProto(&pp.BlockID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p.BlockID = *blockID
|
||||
p.Type = SignedMsgType(pp.Type)
|
||||
p.Height = pp.Height
|
||||
p.Round = int(pp.Round)
|
||||
p.POLRound = int(pp.PolRound)
|
||||
p.Timestamp = pp.Timestamp
|
||||
p.Signature = pp.Signature
|
||||
|
||||
return p, p.ValidateBasic()
|
||||
}
|
||||
|
||||
@@ -142,3 +142,31 @@ func TestProposalValidateBasic(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestProposalProtoBuf(t *testing.T) {
|
||||
proposal := NewProposal(1, 2, 3, makeBlockID([]byte("hash"), 2, []byte("part_set_hash")))
|
||||
proposal.Signature = []byte("sig")
|
||||
proposal2 := NewProposal(1, 2, 3, BlockID{})
|
||||
|
||||
testCases := []struct {
|
||||
msg string
|
||||
p1 *Proposal
|
||||
expPass bool
|
||||
}{
|
||||
{"success", proposal, true},
|
||||
{"success", proposal2, false}, // blcokID cannot be empty
|
||||
{"empty proposal failure validatebasic", &Proposal{}, false},
|
||||
{"nil proposal", nil, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoProposal := tc.p1.ToProto()
|
||||
|
||||
p, err := ProposalFromProto(protoProposal)
|
||||
if tc.expPass {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.p1, p, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ package types
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
ce "github.com/tendermint/tendermint/crypto/encoding"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
)
|
||||
|
||||
// Volatile state for each Validator
|
||||
@@ -94,6 +97,47 @@ func (v *Validator) Bytes() []byte {
|
||||
})
|
||||
}
|
||||
|
||||
// ToProto converts Valiator to protobuf
|
||||
func (v *Validator) ToProto() (*tmproto.Validator, error) {
|
||||
if v == nil {
|
||||
return nil, errors.New("nil validator")
|
||||
}
|
||||
|
||||
pk, err := ce.PubKeyToProto(v.PubKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vp := tmproto.Validator{
|
||||
Address: v.Address,
|
||||
PubKey: pk,
|
||||
VotingPower: v.VotingPower,
|
||||
ProposerPriority: v.ProposerPriority,
|
||||
}
|
||||
|
||||
return &vp, nil
|
||||
}
|
||||
|
||||
// FromProto sets a protobuf Validator to the given pointer.
|
||||
// It returns an error if the public key is invalid.
|
||||
func ValidatorFromProto(vp *tmproto.Validator) (*Validator, error) {
|
||||
if vp == nil {
|
||||
return nil, errors.New("nil validator")
|
||||
}
|
||||
|
||||
pk, err := ce.PubKeyFromProto(&vp.PubKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
v := new(Validator)
|
||||
v.Address = vp.GetAddress()
|
||||
v.PubKey = pk
|
||||
v.VotingPower = vp.GetVotingPower()
|
||||
v.ProposerPriority = vp.GetProposerPriority()
|
||||
|
||||
return v, nil
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// RandValidator
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"github.com/tendermint/tendermint/crypto/merkle"
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -902,6 +903,64 @@ func (valz ValidatorsByAddress) Swap(i, j int) {
|
||||
valz[j] = it
|
||||
}
|
||||
|
||||
// ToProto converts ValidatorSet to protobuf
|
||||
func (vals *ValidatorSet) ToProto() (*tmproto.ValidatorSet, error) {
|
||||
if vals == nil {
|
||||
return nil, errors.New("nil validator set") // validator set should never be nil
|
||||
}
|
||||
vp := new(tmproto.ValidatorSet)
|
||||
valsProto := make([]*tmproto.Validator, len(vals.Validators))
|
||||
for i := 0; i < len(vals.Validators); i++ {
|
||||
valp, err := vals.Validators[i].ToProto()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
valsProto[i] = valp
|
||||
}
|
||||
vp.Validators = valsProto
|
||||
|
||||
valProposer, err := vals.Proposer.ToProto()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("toProto: validatorSet proposer error: %w", err)
|
||||
}
|
||||
vp.Proposer = valProposer
|
||||
|
||||
vp.TotalVotingPower = vals.totalVotingPower
|
||||
|
||||
return vp, nil
|
||||
}
|
||||
|
||||
// ValidatorSetFromProto sets a protobuf ValidatorSet to the given pointer.
|
||||
// It returns an error if any of the validators from the set or the proposer
|
||||
// is invalid
|
||||
func ValidatorSetFromProto(vp *tmproto.ValidatorSet) (*ValidatorSet, error) {
|
||||
if vp == nil {
|
||||
return nil, errors.New("nil validator set") // validator set should never be nil, bigger issues are at play if empty
|
||||
}
|
||||
vals := new(ValidatorSet)
|
||||
|
||||
valsProto := make([]*Validator, len(vp.Validators))
|
||||
for i := 0; i < len(vp.Validators); i++ {
|
||||
v, err := ValidatorFromProto(vp.Validators[i])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
valsProto[i] = v
|
||||
}
|
||||
vals.Validators = valsProto
|
||||
|
||||
p, err := ValidatorFromProto(vp.GetProposer())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("fromProto: validatorSet proposer error: %w", err)
|
||||
}
|
||||
|
||||
vals.Proposer = p
|
||||
|
||||
vals.totalVotingPower = vp.GetTotalVotingPower()
|
||||
|
||||
return vals, nil
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// for testing
|
||||
|
||||
|
||||
@@ -1408,6 +1408,48 @@ func TestSafeMul(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidatorSetProtoBuf(t *testing.T) {
|
||||
valset, _ := RandValidatorSet(10, 100)
|
||||
valset2, _ := RandValidatorSet(10, 100)
|
||||
valset2.Validators[0] = &Validator{}
|
||||
|
||||
valset3, _ := RandValidatorSet(10, 100)
|
||||
valset3.Proposer = nil
|
||||
|
||||
valset4, _ := RandValidatorSet(10, 100)
|
||||
valset4.Proposer = &Validator{}
|
||||
|
||||
testCases := []struct {
|
||||
msg string
|
||||
v1 *ValidatorSet
|
||||
expPass1 bool
|
||||
expPass2 bool
|
||||
}{
|
||||
{"success", valset, true, true},
|
||||
{"fail valSet2, pubkey empty", valset2, false, false},
|
||||
{"fail nil Proposer", valset3, false, false},
|
||||
{"fail empty Proposer", valset4, false, false},
|
||||
{"fail empty valSet", &ValidatorSet{}, false, false},
|
||||
{"false nil", nil, false, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoValSet, err := tc.v1.ToProto()
|
||||
if tc.expPass1 {
|
||||
require.NoError(t, err, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
|
||||
valSet, err := ValidatorSetFromProto(protoValSet)
|
||||
if tc.expPass2 {
|
||||
require.NoError(t, err, tc.msg)
|
||||
require.EqualValues(t, tc.v1, valSet, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------
|
||||
// Sort validators by priority and address
|
||||
type validatorsByPriority []*Validator
|
||||
|
||||
38
types/validator_test.go
Normal file
38
types/validator_test.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestValidatorProtoBuf(t *testing.T) {
|
||||
val, _ := RandValidator(true, 100)
|
||||
testCases := []struct {
|
||||
msg string
|
||||
v1 *Validator
|
||||
expPass1 bool
|
||||
expPass2 bool
|
||||
}{
|
||||
{"success validator", val, true, true},
|
||||
{"failure empty", &Validator{}, false, false},
|
||||
{"failure nil", nil, false, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoVal, err := tc.v1.ToProto()
|
||||
|
||||
if tc.expPass1 {
|
||||
require.NoError(t, err, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
|
||||
val, err := ValidatorFromProto(protoVal)
|
||||
if tc.expPass2 {
|
||||
require.NoError(t, err, tc.msg)
|
||||
require.Equal(t, tc.v1, val, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err, tc.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
tmbytes "github.com/tendermint/tendermint/libs/bytes"
|
||||
tmproto "github.com/tendermint/tendermint/proto/types"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -171,3 +172,47 @@ func (vote *Vote) ValidateBasic() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ToProto converts the handwritten type to proto generated type
|
||||
// return type, nil if everything converts safely, otherwise nil, error
|
||||
func (vote *Vote) ToProto() *tmproto.Vote {
|
||||
if vote == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &tmproto.Vote{
|
||||
Type: tmproto.SignedMsgType(vote.Type),
|
||||
Height: vote.Height,
|
||||
Round: int64(vote.Round),
|
||||
BlockID: vote.BlockID.ToProto(),
|
||||
Timestamp: vote.Timestamp,
|
||||
ValidatorAddress: vote.ValidatorAddress,
|
||||
ValidatorIndex: int64(vote.ValidatorIndex),
|
||||
Signature: vote.Signature,
|
||||
}
|
||||
}
|
||||
|
||||
//FromProto converts a proto generetad type to a handwritten type
|
||||
// return type, nil if everything converts safely, otherwise nil, error
|
||||
func VoteFromProto(pv *tmproto.Vote) (*Vote, error) {
|
||||
if pv == nil {
|
||||
return nil, errors.New("nil vote")
|
||||
}
|
||||
|
||||
blockID, err := BlockIDFromProto(&pv.BlockID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vote := new(Vote)
|
||||
vote.Type = SignedMsgType(pv.Type)
|
||||
vote.Height = pv.Height
|
||||
vote.Round = int(pv.Round)
|
||||
vote.BlockID = *blockID
|
||||
vote.Timestamp = pv.Timestamp
|
||||
vote.ValidatorAddress = pv.ValidatorAddress
|
||||
vote.ValidatorIndex = int(pv.ValidatorIndex)
|
||||
vote.Signature = pv.Signature
|
||||
|
||||
return vote, vote.ValidateBasic()
|
||||
}
|
||||
|
||||
@@ -286,3 +286,31 @@ func TestVoteValidateBasic(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestVoteProtobuf(t *testing.T) {
|
||||
privVal := NewMockPV()
|
||||
vote := examplePrecommit()
|
||||
err := privVal.SignVote("test_chain_id", vote)
|
||||
require.NoError(t, err)
|
||||
|
||||
testCases := []struct {
|
||||
msg string
|
||||
v1 *Vote
|
||||
expPass bool
|
||||
}{
|
||||
{"success", vote, true},
|
||||
{"fail vote validate basic", &Vote{}, false},
|
||||
{"failure nil", nil, false},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
protoProposal := tc.v1.ToProto()
|
||||
|
||||
v, err := VoteFromProto(protoProposal)
|
||||
if tc.expPass {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.v1, v, tc.msg)
|
||||
} else {
|
||||
require.Error(t, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user