From 3bd215313654ab4d125cb85d9a52b82f67e7b464 Mon Sep 17 00:00:00 2001 From: Rootul P Date: Fri, 21 Oct 2022 14:33:37 -0600 Subject: [PATCH] docs: clarify `BlockIDFlag` variants (#9590) * docs: clarify BlockIDFlag variants * Update proto/tendermint/types/types.proto Co-authored-by: Sergio Mena * Update proto/tendermint/types/types.proto Co-authored-by: Sergio Mena * Update spec/core/data_structures.md Co-authored-by: Sergio Mena * Update spec/core/data_structures.md Co-authored-by: Sergio Mena * make proto-gen Co-authored-by: Sergio Mena --- abci/types/types.pb.go | 35 +++++++++++++------------- proto/tendermint/blocksync/types.pb.go | 2 +- proto/tendermint/consensus/types.pb.go | 2 +- proto/tendermint/consensus/wal.pb.go | 16 ++++++------ proto/tendermint/crypto/keys.pb.go | 2 +- proto/tendermint/crypto/proof.pb.go | 2 +- proto/tendermint/libs/bits/types.pb.go | 2 +- proto/tendermint/mempool/types.pb.go | 2 +- proto/tendermint/p2p/conn.pb.go | 2 +- proto/tendermint/p2p/pex.pb.go | 2 +- proto/tendermint/p2p/types.pb.go | 2 +- proto/tendermint/privval/types.pb.go | 2 +- proto/tendermint/rpc/grpc/types.pb.go | 9 +++---- proto/tendermint/state/types.pb.go | 10 ++++---- proto/tendermint/statesync/types.pb.go | 2 +- proto/tendermint/store/types.pb.go | 2 +- proto/tendermint/types/block.pb.go | 2 +- proto/tendermint/types/canonical.pb.go | 16 ++++++------ proto/tendermint/types/events.pb.go | 2 +- proto/tendermint/types/evidence.pb.go | 16 ++++++------ proto/tendermint/types/params.pb.go | 10 ++++---- proto/tendermint/types/types.pb.go | 30 +++++++++++----------- proto/tendermint/types/types.proto | 10 ++++---- proto/tendermint/types/validator.pb.go | 2 +- proto/tendermint/version/types.pb.go | 2 +- rpc/grpc/types.pb.go | 9 +++---- spec/core/data_structures.md | 20 +++++++-------- 27 files changed, 105 insertions(+), 108 deletions(-) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 5f1bf8d3bd7..660a7b26810 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -7,10 +7,9 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" types1 "github.com/tendermint/tendermint/proto/tendermint/types" grpc "google.golang.org/grpc" @@ -3682,10 +3681,10 @@ type ABCIApplicationClient interface { } type aBCIApplicationClient struct { - cc grpc1.ClientConn + cc *grpc.ClientConn } -func NewABCIApplicationClient(cc grpc1.ClientConn) ABCIApplicationClient { +func NewABCIApplicationClient(cc *grpc.ClientConn) ABCIApplicationClient { return &aBCIApplicationClient{cc} } @@ -3906,7 +3905,7 @@ func (*UnimplementedABCIApplicationServer) ProcessProposal(ctx context.Context, return nil, status.Errorf(codes.Unimplemented, "method ProcessProposal not implemented") } -func RegisterABCIApplicationServer(s grpc1.Server, srv ABCIApplicationServer) { +func RegisterABCIApplicationServer(s *grpc.Server, srv ABCIApplicationServer) { s.RegisterService(&_ABCIApplication_serviceDesc, srv) } @@ -4808,7 +4807,7 @@ func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n18, err18 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err18 != nil { return 0, err18 } @@ -5230,7 +5229,7 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n22, err22 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err22 != nil { return 0, err22 } @@ -5318,7 +5317,7 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n24, err24 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n24, err24 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err24 != nil { return 0, err24 } @@ -6987,7 +6986,7 @@ func (m *Misbehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n52, err52 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n52, err52 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err52 != nil { return 0, err52 } @@ -7336,7 +7335,7 @@ func (m *RequestInitChain) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = len(m.ChainId) if l > 0 { @@ -7548,7 +7547,7 @@ func (m *RequestPrepareProposal) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = len(m.NextValidatorsHash) if l > 0 { @@ -7588,7 +7587,7 @@ func (m *RequestProcessProposal) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = len(m.NextValidatorsHash) if l > 0 { @@ -8355,7 +8354,7 @@ func (m *Misbehavior) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) if m.TotalVotingPower != 0 { n += 1 + sovTypes(uint64(m.TotalVotingPower)) @@ -9347,7 +9346,7 @@ func (m *RequestInitChain) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10779,7 +10778,7 @@ func (m *RequestPrepareProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11082,7 +11081,7 @@ func (m *RequestProcessProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -15397,7 +15396,7 @@ func (m *Misbehavior) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/blocksync/types.pb.go b/proto/tendermint/blocksync/types.pb.go index 17d76a278c6..fcbef7107a9 100644 --- a/proto/tendermint/blocksync/types.pb.go +++ b/proto/tendermint/blocksync/types.pb.go @@ -5,7 +5,7 @@ package blocksync import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" math "math" diff --git a/proto/tendermint/consensus/types.pb.go b/proto/tendermint/consensus/types.pb.go index 83eb0d2161e..053860743f9 100644 --- a/proto/tendermint/consensus/types.pb.go +++ b/proto/tendermint/consensus/types.pb.go @@ -6,7 +6,7 @@ package consensus import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" bits "github.com/tendermint/tendermint/proto/tendermint/libs/bits" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" diff --git a/proto/tendermint/consensus/wal.pb.go b/proto/tendermint/consensus/wal.pb.go index 3a4494941ab..5a097ea32dc 100644 --- a/proto/tendermint/consensus/wal.pb.go +++ b/proto/tendermint/consensus/wal.pb.go @@ -6,9 +6,9 @@ package consensus import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" @@ -484,7 +484,7 @@ func (m *TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) if err2 != nil { return 0, err2 } @@ -671,7 +671,7 @@ func (m *TimedWALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err8 != nil { return 0, err8 } @@ -714,7 +714,7 @@ func (m *TimeoutInfo) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) n += 1 + l + sovWal(uint64(l)) if m.Height != 0 { n += 1 + sovWal(uint64(m.Height)) @@ -806,7 +806,7 @@ func (m *TimedWALMessage) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovWal(uint64(l)) if m.Msg != nil { l = m.Msg.Size() @@ -994,7 +994,7 @@ func (m *TimeoutInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1393,7 +1393,7 @@ func (m *TimedWALMessage) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/crypto/keys.pb.go b/proto/tendermint/crypto/keys.pb.go index bbd97d44623..9702337123d 100644 --- a/proto/tendermint/crypto/keys.pb.go +++ b/proto/tendermint/crypto/keys.pb.go @@ -7,7 +7,7 @@ import ( bytes "bytes" fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/crypto/proof.pb.go b/proto/tendermint/crypto/proof.pb.go index 7a8315dc798..51e5d044516 100644 --- a/proto/tendermint/crypto/proof.pb.go +++ b/proto/tendermint/crypto/proof.pb.go @@ -6,7 +6,7 @@ package crypto import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/libs/bits/types.pb.go b/proto/tendermint/libs/bits/types.pb.go index ccaee70536a..c0ebcb97600 100644 --- a/proto/tendermint/libs/bits/types.pb.go +++ b/proto/tendermint/libs/bits/types.pb.go @@ -5,7 +5,7 @@ package bits import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/mempool/types.pb.go b/proto/tendermint/mempool/types.pb.go index f7d16a64cf1..11e259551d5 100644 --- a/proto/tendermint/mempool/types.pb.go +++ b/proto/tendermint/mempool/types.pb.go @@ -5,7 +5,7 @@ package mempool import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/p2p/conn.pb.go b/proto/tendermint/p2p/conn.pb.go index dccdbe4a05a..1d6c0a6ef63 100644 --- a/proto/tendermint/p2p/conn.pb.go +++ b/proto/tendermint/p2p/conn.pb.go @@ -6,7 +6,7 @@ package p2p import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" io "io" math "math" diff --git a/proto/tendermint/p2p/pex.pb.go b/proto/tendermint/p2p/pex.pb.go index 19ff524d986..34f260d51b8 100644 --- a/proto/tendermint/p2p/pex.pb.go +++ b/proto/tendermint/p2p/pex.pb.go @@ -6,7 +6,7 @@ package p2p import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/p2p/types.pb.go b/proto/tendermint/p2p/types.pb.go index 3f2ff71dac4..1e8b128be3b 100644 --- a/proto/tendermint/p2p/types.pb.go +++ b/proto/tendermint/p2p/types.pb.go @@ -6,7 +6,7 @@ package p2p import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/privval/types.pb.go b/proto/tendermint/privval/types.pb.go index de598e31865..07f153512c7 100644 --- a/proto/tendermint/privval/types.pb.go +++ b/proto/tendermint/privval/types.pb.go @@ -6,7 +6,7 @@ package privval import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" types "github.com/tendermint/tendermint/proto/tendermint/types" io "io" diff --git a/proto/tendermint/rpc/grpc/types.pb.go b/proto/tendermint/rpc/grpc/types.pb.go index 6d0fecf0b03..b9cbee03fc8 100644 --- a/proto/tendermint/rpc/grpc/types.pb.go +++ b/proto/tendermint/rpc/grpc/types.pb.go @@ -6,8 +6,7 @@ package coregrpc import ( context "context" fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -246,10 +245,10 @@ type BroadcastAPIClient interface { } type broadcastAPIClient struct { - cc grpc1.ClientConn + cc *grpc.ClientConn } -func NewBroadcastAPIClient(cc grpc1.ClientConn) BroadcastAPIClient { +func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient { return &broadcastAPIClient{cc} } @@ -288,7 +287,7 @@ func (*UnimplementedBroadcastAPIServer) BroadcastTx(ctx context.Context, req *Re return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") } -func RegisterBroadcastAPIServer(s grpc1.Server, srv BroadcastAPIServer) { +func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) { s.RegisterService(&_BroadcastAPI_serviceDesc, srv) } diff --git a/proto/tendermint/state/types.pb.go b/proto/tendermint/state/types.pb.go index d5620344b30..463e5847800 100644 --- a/proto/tendermint/state/types.pb.go +++ b/proto/tendermint/state/types.pb.go @@ -6,9 +6,9 @@ package state import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types "github.com/tendermint/tendermint/abci/types" types1 "github.com/tendermint/tendermint/proto/tendermint/types" version "github.com/tendermint/tendermint/proto/tendermint/version" @@ -843,7 +843,7 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n11, err11 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastBlockTime):]) + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) if err11 != nil { return 0, err11 } @@ -998,7 +998,7 @@ func (m *State) Size() (n int) { } l = m.LastBlockID.Size() n += 1 + l + sovTypes(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastBlockTime) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime) n += 1 + l + sovTypes(uint64(l)) if m.NextValidators != nil { l = m.NextValidators.Size() @@ -1798,7 +1798,7 @@ func (m *State) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/statesync/types.pb.go b/proto/tendermint/statesync/types.pb.go index 147e0f7d485..8391e0ead48 100644 --- a/proto/tendermint/statesync/types.pb.go +++ b/proto/tendermint/statesync/types.pb.go @@ -5,7 +5,7 @@ package statesync import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/store/types.pb.go b/proto/tendermint/store/types.pb.go index 85c7dec6c30..384fbe52aed 100644 --- a/proto/tendermint/store/types.pb.go +++ b/proto/tendermint/store/types.pb.go @@ -5,7 +5,7 @@ package store import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/types/block.pb.go b/proto/tendermint/types/block.pb.go index 59c17fe40e4..b11d9a9e991 100644 --- a/proto/tendermint/types/block.pb.go +++ b/proto/tendermint/types/block.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/types/canonical.pb.go b/proto/tendermint/types/canonical.pb.go index 5d3d4ce3aee..5e9be843888 100644 --- a/proto/tendermint/types/canonical.pb.go +++ b/proto/tendermint/types/canonical.pb.go @@ -7,9 +7,9 @@ import ( encoding_binary "encoding/binary" fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" @@ -454,7 +454,7 @@ func (m *CanonicalProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err2 != nil { return 0, err2 } @@ -526,7 +526,7 @@ func (m *CanonicalVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err4 != nil { return 0, err4 } @@ -630,7 +630,7 @@ func (m *CanonicalProposal) Size() (n int) { l = m.BlockID.Size() n += 1 + l + sovCanonical(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovCanonical(uint64(l)) l = len(m.ChainID) if l > 0 { @@ -658,7 +658,7 @@ func (m *CanonicalVote) Size() (n int) { l = m.BlockID.Size() n += 1 + l + sovCanonical(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovCanonical(uint64(l)) l = len(m.ChainID) if l > 0 { @@ -1045,7 +1045,7 @@ func (m *CanonicalProposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1235,7 +1235,7 @@ func (m *CanonicalVote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/events.pb.go b/proto/tendermint/types/events.pb.go index 127efe9769c..a9aa26a799b 100644 --- a/proto/tendermint/types/events.pb.go +++ b/proto/tendermint/types/events.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/proto/tendermint/types/evidence.pb.go b/proto/tendermint/types/evidence.pb.go index 37899ac8b3c..56bac317972 100644 --- a/proto/tendermint/types/evidence.pb.go +++ b/proto/tendermint/types/evidence.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" io "io" math "math" math_bits "math/bits" @@ -451,7 +451,7 @@ func (m *DuplicateVoteEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err3 != nil { return 0, err3 } @@ -516,7 +516,7 @@ func (m *LightClientAttackEvidence) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err6 != nil { return 0, err6 } @@ -667,7 +667,7 @@ func (m *DuplicateVoteEvidence) Size() (n int) { if m.ValidatorPower != 0 { n += 1 + sovEvidence(uint64(m.ValidatorPower)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovEvidence(uint64(l)) return n } @@ -694,7 +694,7 @@ func (m *LightClientAttackEvidence) Size() (n int) { if m.TotalVotingPower != 0 { n += 1 + sovEvidence(uint64(m.TotalVotingPower)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovEvidence(uint64(l)) return n } @@ -1008,7 +1008,7 @@ func (m *DuplicateVoteEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1199,7 +1199,7 @@ func (m *LightClientAttackEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/params.pb.go b/proto/tendermint/types/params.pb.go index 3d57b852c6b..763090dcf98 100644 --- a/proto/tendermint/types/params.pb.go +++ b/proto/tendermint/types/params.pb.go @@ -6,8 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" io "io" math "math" @@ -720,7 +720,7 @@ func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxAgeDuration):]) + n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) if err5 != nil { return 0, err5 } @@ -981,7 +981,7 @@ func (m *EvidenceParams) Size() (n int) { if m.MaxAgeNumBlocks != 0 { n += 1 + sovParams(uint64(m.MaxAgeNumBlocks)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxAgeDuration) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration) n += 1 + l + sovParams(uint64(l)) if m.MaxBytes != 0 { n += 1 + sovParams(uint64(m.MaxBytes)) @@ -1396,7 +1396,7 @@ func (m *EvidenceParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/types.pb.go b/proto/tendermint/types/types.pb.go index 11edb847f9b..41ed68e9281 100644 --- a/proto/tendermint/types/types.pb.go +++ b/proto/tendermint/types/types.pb.go @@ -6,9 +6,9 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" version "github.com/tendermint/tendermint/proto/tendermint/version" io "io" @@ -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 ( @@ -1348,7 +1348,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x2a - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) if err4 != nil { return 0, err4 } @@ -1452,7 +1452,7 @@ func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err6 != nil { return 0, err6 } @@ -1572,7 +1572,7 @@ func (m *CommitSig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err9 != nil { return 0, err9 } @@ -1622,7 +1622,7 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err10 != nil { return 0, err10 } @@ -1934,7 +1934,7 @@ func (m *Header) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) n += 1 + l + sovTypes(uint64(l)) l = m.LastBlockId.Size() n += 1 + l + sovTypes(uint64(l)) @@ -2009,7 +2009,7 @@ func (m *Vote) Size() (n int) { } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.ValidatorAddress) if l > 0 { @@ -2061,7 +2061,7 @@ func (m *CommitSig) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.Signature) if l > 0 { @@ -2090,7 +2090,7 @@ func (m *Proposal) Size() (n int) { } l = m.BlockID.Size() n += 1 + l + sovTypes(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovTypes(uint64(l)) l = len(m.Signature) if l > 0 { @@ -2677,7 +2677,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3271,7 +3271,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3649,7 +3649,7 @@ func (m *CommitSig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3875,7 +3875,7 @@ func (m *Proposal) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 8d4f009729d..bf3bc160000 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -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. diff --git a/proto/tendermint/types/validator.pb.go b/proto/tendermint/types/validator.pb.go index c3d39b73ce9..37679b997ed 100644 --- a/proto/tendermint/types/validator.pb.go +++ b/proto/tendermint/types/validator.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" io "io" math "math" diff --git a/proto/tendermint/version/types.pb.go b/proto/tendermint/version/types.pb.go index 81aa55fddff..ef7633c86fd 100644 --- a/proto/tendermint/version/types.pb.go +++ b/proto/tendermint/version/types.pb.go @@ -6,7 +6,7 @@ package version import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" diff --git a/rpc/grpc/types.pb.go b/rpc/grpc/types.pb.go index 6d0fecf0b03..b9cbee03fc8 100644 --- a/rpc/grpc/types.pb.go +++ b/rpc/grpc/types.pb.go @@ -6,8 +6,7 @@ package coregrpc import ( context "context" fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" + proto "github.com/gogo/protobuf/proto" types "github.com/tendermint/tendermint/abci/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -246,10 +245,10 @@ type BroadcastAPIClient interface { } type broadcastAPIClient struct { - cc grpc1.ClientConn + cc *grpc.ClientConn } -func NewBroadcastAPIClient(cc grpc1.ClientConn) BroadcastAPIClient { +func NewBroadcastAPIClient(cc *grpc.ClientConn) BroadcastAPIClient { return &broadcastAPIClient{cc} } @@ -288,7 +287,7 @@ func (*UnimplementedBroadcastAPIServer) BroadcastTx(ctx context.Context, req *Re return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") } -func RegisterBroadcastAPIServer(s grpc1.Server, srv BroadcastAPIServer) { +func RegisterBroadcastAPIServer(s *grpc.Server, srv BroadcastAPIServer) { s.RegisterService(&_BroadcastAPI_serviceDesc, srv) } diff --git a/spec/core/data_structures.md b/spec/core/data_structures.md index 62734c58779..b336462f7fd 100644 --- a/spec/core/data_structures.md +++ b/spec/core/data_structures.md @@ -202,12 +202,12 @@ Commit is a simple wrapper for a list of signatures, with one for each validator a particular `BlockID` or was absent. It's a part of the `Commit` and can be used to reconstruct the vote set given the validator set. -| Name | Type | Description | Validation | -|------------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| BlockIDFlag | [BlockIDFlag](#blockidflag) | Represents the validators participation in consensus: Either voted for the block that received the majority, voted for another block, voted nil or did not vote | Must be one of the fields in the [BlockIDFlag](#blockidflag) enum | -| ValidatorAddress | [Address](#address) | Address of the validator | Must be of length 20 | -| Timestamp | [Time](#time) | This field will vary from `CommitSig` to `CommitSig`. It represents the timestamp of the validator. | [Time](#time) | -| Signature | [Signature](#signature) | Signature corresponding to the validators participation in consensus. | The length of the signature must be > 0 and < than 64 | +| Name | Type | Description | Validation | +|------------------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| BlockIDFlag | [BlockIDFlag](#blockidflag) | Represents the validators participation in consensus: its vote was not received, voted for the block that received the majority, or voted for nil | Must be one of the fields in the [BlockIDFlag](#blockidflag) enum | +| ValidatorAddress | [Address](#address) | Address of the validator | Must be of length 20 | +| Timestamp | [Time](#time) | This field will vary from `CommitSig` to `CommitSig`. It represents the timestamp of the validator. | [Time](#time) | +| Signature | [Signature](#signature) | Signature corresponding to the validators participation in consensus. | The length of the signature must be > 0 and < than 64 | NOTE: `ValidatorAddress` and `Timestamp` fields may be removed in the future (see [ADR-25](https://github.com/tendermint/tendermint/blob/main/docs/architecture/adr-025-commit.md)). @@ -218,10 +218,10 @@ BlockIDFlag represents which BlockID the [signature](#commitsig) is for. ```go enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0; - BLOCK_ID_FLAG_ABSENT = 1; // signatures for other blocks are also considered absent - BLOCK_ID_FLAG_COMMIT = 2; - BLOCK_ID_FLAG_NIL = 3; + BLOCK_ID_FLAG_UNKNOWN = 0; // indicates an error condition + BLOCK_ID_FLAG_ABSENT = 1; // the vote was not received + BLOCK_ID_FLAG_COMMIT = 2; // voted for the block that received the majority + BLOCK_ID_FLAG_NIL = 3; // voted for nil } ```