Merge branch 'cal/vote-extensions-1' into cal/vote-extensions-2

This commit is contained in:
Callum Waters
2022-11-17 18:11:23 +01:00
321 changed files with 11626 additions and 7626 deletions
+73
View File
@@ -0,0 +1,73 @@
package blocksync
import (
"fmt"
"github.com/cosmos/gogoproto/proto"
"github.com/tendermint/tendermint/p2p"
)
var _ p2p.Wrapper = &StatusRequest{}
var _ p2p.Wrapper = &StatusResponse{}
var _ p2p.Wrapper = &NoBlockResponse{}
var _ p2p.Wrapper = &BlockResponse{}
var _ p2p.Wrapper = &BlockRequest{}
const (
BlockResponseMessagePrefixSize = 4
BlockResponseMessageFieldKeySize = 1
)
func (m *BlockRequest) Wrap() proto.Message {
bm := &Message{}
bm.Sum = &Message_BlockRequest{BlockRequest: m}
return bm
}
func (m *BlockResponse) Wrap() proto.Message {
bm := &Message{}
bm.Sum = &Message_BlockResponse{BlockResponse: m}
return bm
}
func (m *NoBlockResponse) Wrap() proto.Message {
bm := &Message{}
bm.Sum = &Message_NoBlockResponse{NoBlockResponse: m}
return bm
}
func (m *StatusRequest) Wrap() proto.Message {
bm := &Message{}
bm.Sum = &Message_StatusRequest{StatusRequest: m}
return bm
}
func (m *StatusResponse) Wrap() proto.Message {
bm := &Message{}
bm.Sum = &Message_StatusResponse{StatusResponse: m}
return bm
}
// Unwrap implements the p2p Wrapper interface and unwraps a wrapped blockchain
// message.
func (m *Message) Unwrap() (proto.Message, error) {
switch msg := m.Sum.(type) {
case *Message_BlockRequest:
return m.GetBlockRequest(), nil
case *Message_BlockResponse:
return m.GetBlockResponse(), nil
case *Message_NoBlockResponse:
return m.GetNoBlockResponse(), nil
case *Message_StatusRequest:
return m.GetStatusRequest(), nil
case *Message_StatusResponse:
return m.GetStatusResponse(), nil
default:
return nil, fmt.Errorf("unknown message: %T", msg)
}
}
+109
View File
@@ -0,0 +1,109 @@
package consensus
import (
"fmt"
"github.com/cosmos/gogoproto/proto"
"github.com/tendermint/tendermint/p2p"
)
var _ p2p.Wrapper = &VoteSetBits{}
var _ p2p.Wrapper = &VoteSetMaj23{}
var _ p2p.Wrapper = &Vote{}
var _ p2p.Wrapper = &ProposalPOL{}
var _ p2p.Wrapper = &Proposal{}
var _ p2p.Wrapper = &NewValidBlock{}
var _ p2p.Wrapper = &NewRoundStep{}
var _ p2p.Wrapper = &HasVote{}
var _ p2p.Wrapper = &BlockPart{}
func (m *VoteSetBits) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_VoteSetBits{VoteSetBits: m}
return cm
}
func (m *VoteSetMaj23) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_VoteSetMaj23{VoteSetMaj23: m}
return cm
}
func (m *HasVote) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_HasVote{HasVote: m}
return cm
}
func (m *Vote) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_Vote{Vote: m}
return cm
}
func (m *BlockPart) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_BlockPart{BlockPart: m}
return cm
}
func (m *ProposalPOL) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_ProposalPol{ProposalPol: m}
return cm
}
func (m *Proposal) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_Proposal{Proposal: m}
return cm
}
func (m *NewValidBlock) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_NewValidBlock{NewValidBlock: m}
return cm
}
func (m *NewRoundStep) Wrap() proto.Message {
cm := &Message{}
cm.Sum = &Message_NewRoundStep{NewRoundStep: m}
return cm
}
// Unwrap implements the p2p Wrapper interface and unwraps a wrapped consensus
// proto message.
func (m *Message) Unwrap() (proto.Message, error) {
switch msg := m.Sum.(type) {
case *Message_NewRoundStep:
return m.GetNewRoundStep(), nil
case *Message_NewValidBlock:
return m.GetNewValidBlock(), nil
case *Message_Proposal:
return m.GetProposal(), nil
case *Message_ProposalPol:
return m.GetProposalPol(), nil
case *Message_BlockPart:
return m.GetBlockPart(), nil
case *Message_Vote:
return m.GetVote(), nil
case *Message_HasVote:
return m.GetHasVote(), nil
case *Message_VoteSetMaj23:
return m.GetVoteSetMaj23(), nil
case *Message_VoteSetBits:
return m.GetVoteSetBits(), nil
default:
return nil, fmt.Errorf("unknown message: %T", msg)
}
}
+30
View File
@@ -0,0 +1,30 @@
package mempool
import (
"fmt"
"github.com/cosmos/gogoproto/proto"
"github.com/tendermint/tendermint/p2p"
)
var _ p2p.Wrapper = &Txs{}
var _ p2p.Unwrapper = &Message{}
// Wrap implements the p2p Wrapper interface and wraps a mempool message.
func (m *Txs) Wrap() proto.Message {
mm := &Message{}
mm.Sum = &Message_Txs{Txs: m}
return mm
}
// Unwrap implements the p2p Wrapper interface and unwraps a wrapped mempool
// message.
func (m *Message) Unwrap() (proto.Message, error) {
switch msg := m.Sum.(type) {
case *Message_Txs:
return m.GetTxs(), nil
default:
return nil, fmt.Errorf("unknown message: %T", msg)
}
}
+32
View File
@@ -0,0 +1,32 @@
package p2p
import (
"fmt"
"github.com/cosmos/gogoproto/proto"
)
func (m *PexAddrs) Wrap() proto.Message {
pm := &Message{}
pm.Sum = &Message_PexAddrs{PexAddrs: m}
return pm
}
func (m *PexRequest) Wrap() proto.Message {
pm := &Message{}
pm.Sum = &Message_PexRequest{PexRequest: m}
return pm
}
// Unwrap implements the p2p Wrapper interface and unwraps a wrapped PEX
// message.
func (m *Message) Unwrap() (proto.Message, error) {
switch msg := m.Sum.(type) {
case *Message_PexRequest:
return msg.PexRequest, nil
case *Message_PexAddrs:
return msg.PexAddrs, nil
default:
return nil, fmt.Errorf("unknown pex message: %T", msg)
}
}
+73 -73
View File
@@ -307,7 +307,7 @@ func (m *ConsensusParamsInfo) GetLastHeightChanged() int64 {
}
type ABCIResponsesInfo struct {
LegaycyAbciResponses *LegacyABCIResponses `protobuf:"bytes,1,opt,name=legaycy_abci_responses,json=legaycyAbciResponses,proto3" json:"legaycy_abci_responses,omitempty"`
LegacyAbciResponses *LegacyABCIResponses `protobuf:"bytes,1,opt,name=legacy_abci_responses,json=legacyAbciResponses,proto3" json:"legacy_abci_responses,omitempty"`
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
ResponseFinalizeBlock *types.ResponseFinalizeBlock `protobuf:"bytes,3,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"`
}
@@ -345,9 +345,9 @@ func (m *ABCIResponsesInfo) XXX_DiscardUnknown() {
var xxx_messageInfo_ABCIResponsesInfo proto.InternalMessageInfo
func (m *ABCIResponsesInfo) GetLegaycyAbciResponses() *LegacyABCIResponses {
func (m *ABCIResponsesInfo) GetLegacyAbciResponses() *LegacyABCIResponses {
if m != nil {
return m.LegaycyAbciResponses
return m.LegacyAbciResponses
}
return nil
}
@@ -592,68 +592,68 @@ func init() {
func init() { proto.RegisterFile("tendermint/state/types.proto", fileDescriptor_ccfacf933f22bf93) }
var fileDescriptor_ccfacf933f22bf93 = []byte{
// 963 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0x45,
0x14, 0xce, 0x36, 0x6d, 0x6c, 0x3f, 0xd7, 0x89, 0x33, 0x69, 0x53, 0xd7, 0xa5, 0xb6, 0xb1, 0xda,
0x2a, 0x42, 0x68, 0x2d, 0x95, 0x03, 0xe2, 0x52, 0x14, 0x3b, 0x81, 0x58, 0x8a, 0x10, 0x6c, 0x42,
0x25, 0x40, 0xea, 0x6a, 0xbc, 0x3b, 0x59, 0x8f, 0xb0, 0x77, 0x57, 0x3b, 0x63, 0x63, 0x73, 0xe7,
0xc6, 0xa1, 0x57, 0xfe, 0xa3, 0x1e, 0x7b, 0xe4, 0x42, 0x00, 0xe7, 0x82, 0xf8, 0x2b, 0xd0, 0xfc,
0xd8, 0x5f, 0xde, 0x20, 0x82, 0x7a, 0xdb, 0x9d, 0xf7, 0xbd, 0xef, 0x7d, 0xef, 0x9b, 0x79, 0xb3,
0x0b, 0xef, 0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3, 0x7c, 0xed, 0x8d, 0x02, 0xef, 0x78, 0xa3, 0x7c, 0x01, 0x4f, 0x72, 0x37, 0xca, 0x1a, 0x7f,
0x22, 0xaf, 0x2a, 0xe5, 0x75, 0x32, 0x57, 0x4c, 0x9e, 0x28, 0xd6, 0x18, 0x1f, 0xc4, 0x48, 0x7e,
0xa7, 0x99, 0x3d, 0xc6, 0x6c, 0xdc, 0xb8, 0xdb, 0x31, 0x0e, 0xee, 0xaa, 0x83, 0xa8, 0xbe, 0xdf,
0xec, 0x04, 0xb3, 0x31, 0x7a, 0x08, 0x65, 0x1c, 0x86, 0x0a, 0x52, 0x93, 0x90, 0x12, 0x0e, 0x43,
0x11, 0xea, 0x7f, 0xf5, 0x66, 0xd5, 0x32, 0xde, 0xae, 0x5a, 0xc6, 0x1f, 0xab, 0x96, 0xf1, 0xfa,
0xaa, 0xb5, 0xf1, 0xf6, 0xaa, 0xb5, 0xf1, 0xeb, 0x55, 0x6b, 0xe3, 0xdb, 0x8f, 0x3d, 0xca, 0xc7,
0xb3, 0x91, 0xe9, 0x04, 0xd3, 0x5e, 0xf6, 0x87, 0x25, 0x7d, 0x54, 0x7f, 0x4d, 0xeb, 0xff, 0x5b,
0xa3, 0x2d, 0xb9, 0xfe, 0xd1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xb2, 0x3f, 0xa1, 0x8a,
0x09, 0x00, 0x00,
// 961 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4b, 0x6f, 0xdb, 0x46,
0x17, 0x35, 0xa3, 0x44, 0x8f, 0x2b, 0xcb, 0x96, 0x47, 0x9f, 0x13, 0x45, 0xf9, 0x22, 0xa9, 0x42,
0x12, 0x18, 0x45, 0x41, 0x01, 0xe9, 0xa2, 0xe8, 0x26, 0x85, 0x25, 0xbb, 0xb5, 0x00, 0xa3, 0x68,
0x69, 0x37, 0x40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, 0x96, 0x5c, 0x09, 0xe8, 0x05, 0x40, 0x8a, 0xa3, 0x74, 0x2b, 0x8e, 0x54,
0x86, 0x10, 0x22, 0xdb, 0x4a, 0x91, 0x94, 0x6f, 0x27, 0x44, 0xa4, 0xa5, 0x84, 0x0c, 0xa1, 0x9d,
0x1e, 0xdb, 0x84, 0x2f, 0x9e, 0xe0, 0x8a, 0xdc, 0xac, 0x47, 0xc9, 0x04, 0x27, 0xd9, 0x7a, 0x96,
0x6f, 0xbc, 0x4f, 0xe0, 0x3d, 0xef, 0x93, 0x2f, 0xe1, 0x49, 0xe6, 0x3e, 0xd9, 0xe0, 0x8f, 0xe5,
0x55, 0xa5, 0xbc, 0x6e, 0xea, 0x82, 0xc9, 0x12, 0x45, 0x1a, 0xa3, 0x83, 0x18, 0xca, 0xaf, 0x34,
0xb3, 0xa7, 0x98, 0x4d, 0x9b, 0xdb, 0x5d, 0xe3, 0x60, 0x5b, 0x1d, 0x44, 0xf5, 0xf5, 0x66, 0x27,
0x98, 0x4d, 0xd1, 0x43, 0x28, 0xe3, 0x20, 0x50, 0x90, 0x9a, 0x84, 0x94, 0x70, 0x10, 0x88, 0xd0,
0xe0, 0xeb, 0xb7, 0xeb, 0xb6, 0xf1, 0x6e, 0xdd, 0x36, 0x7e, 0x5f, 0xb7, 0x8d, 0x37, 0xd7, 0xed,
0xad, 0x77, 0xd7, 0xed, 0xad, 0x5f, 0xae, 0xdb, 0x5b, 0xdf, 0x7e, 0x32, 0xa1, 0x7c, 0xba, 0x18,
0x9b, 0x8e, 0x3f, 0xef, 0xa7, 0x7f, 0x57, 0x92, 0x47, 0xf5, 0xcf, 0xb4, 0xf9, 0xb7, 0x35, 0x2e,
0xca, 0xf5, 0x8f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x86, 0xc8, 0x78, 0x88, 0x09, 0x00,
0x00,
}
func (m *LegacyABCIResponses) Marshal() (dAtA []byte, err error) {
@@ -932,9 +932,9 @@ func (m *ABCIResponsesInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x10
}
if m.LegaycyAbciResponses != nil {
if m.LegacyAbciResponses != nil {
{
size, err := m.LegaycyAbciResponses.MarshalToSizedBuffer(dAtA[:i])
size, err := m.LegacyAbciResponses.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -1235,8 +1235,8 @@ func (m *ABCIResponsesInfo) Size() (n int) {
}
var l int
_ = l
if m.LegaycyAbciResponses != nil {
l = m.LegaycyAbciResponses.Size()
if m.LegacyAbciResponses != nil {
l = m.LegacyAbciResponses.Size()
n += 1 + l + sovTypes(uint64(l))
}
if m.Height != 0 {
@@ -1955,7 +1955,7 @@ func (m *ABCIResponsesInfo) Unmarshal(dAtA []byte) error {
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LegaycyAbciResponses", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field LegacyAbciResponses", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -1982,10 +1982,10 @@ func (m *ABCIResponsesInfo) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.LegaycyAbciResponses == nil {
m.LegaycyAbciResponses = &LegacyABCIResponses{}
if m.LegacyAbciResponses == nil {
m.LegacyAbciResponses = &LegacyABCIResponses{}
}
if err := m.LegaycyAbciResponses.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
if err := m.LegacyAbciResponses.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
+1 -1
View File
@@ -48,7 +48,7 @@ message ConsensusParamsInfo {
}
message ABCIResponsesInfo {
LegacyABCIResponses legaycy_abci_responses = 1;
LegacyABCIResponses legacy_abci_responses = 1;
int64 height = 2;
abci.ResponseFinalizeBlock response_finalize_block = 3;
}
+58
View File
@@ -0,0 +1,58 @@
package statesync
import (
"fmt"
"github.com/cosmos/gogoproto/proto"
"github.com/tendermint/tendermint/p2p"
)
var _ p2p.Wrapper = &ChunkRequest{}
var _ p2p.Wrapper = &ChunkResponse{}
var _ p2p.Wrapper = &SnapshotsRequest{}
var _ p2p.Wrapper = &SnapshotsResponse{}
func (m *SnapshotsResponse) Wrap() proto.Message {
sm := &Message{}
sm.Sum = &Message_SnapshotsResponse{SnapshotsResponse: m}
return sm
}
func (m *SnapshotsRequest) Wrap() proto.Message {
sm := &Message{}
sm.Sum = &Message_SnapshotsRequest{SnapshotsRequest: m}
return sm
}
func (m *ChunkResponse) Wrap() proto.Message {
sm := &Message{}
sm.Sum = &Message_ChunkResponse{ChunkResponse: m}
return sm
}
func (m *ChunkRequest) Wrap() proto.Message {
sm := &Message{}
sm.Sum = &Message_ChunkRequest{ChunkRequest: m}
return sm
}
// Unwrap implements the p2p Wrapper interface and unwraps a wrapped state sync
// proto message.
func (m *Message) Unwrap() (proto.Message, error) {
switch msg := m.Sum.(type) {
case *Message_ChunkRequest:
return m.GetChunkRequest(), nil
case *Message_ChunkResponse:
return m.GetChunkResponse(), nil
case *Message_SnapshotsRequest:
return m.GetSnapshotsRequest(), nil
case *Message_SnapshotsResponse:
return m.GetSnapshotsResponse(), nil
default:
return nil, fmt.Errorf("unknown message: %T", msg)
}
}
+1 -1
View File
@@ -29,7 +29,7 @@ var _ = time.Kitchen
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// BlockIdFlag indicates which BlcokID the signature is for
// BlockIdFlag indicates which BlockID the signature is for
type BlockIDFlag int32
const (
+5 -5
View File
@@ -9,15 +9,15 @@ import "tendermint/crypto/proof.proto";
import "tendermint/version/types.proto";
import "tendermint/types/validator.proto";
// BlockIdFlag indicates which BlcokID the signature is for
// BlockIdFlag indicates which BlockID the signature is for
enum BlockIDFlag {
option (gogoproto.goproto_enum_stringer) = true;
option (gogoproto.goproto_enum_prefix) = false;
BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"];
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"];
BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition
BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received
BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority
BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil
}
// SignedMsgType is a type of signed message in the consensus.