diff --git a/proto/tendermint/rpc/grpc/types.pb.go b/proto/tendermint/rpc/grpc/types.pb.go index 62333d8317..51e2050899 100644 --- a/proto/tendermint/rpc/grpc/types.pb.go +++ b/proto/tendermint/rpc/grpc/types.pb.go @@ -818,7 +818,8 @@ func (m *ValidatorSetResponse) GetTotalVotingPower() int64 { } type NewHeightEvent struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (m *NewHeightEvent) Reset() { *m = NewHeightEvent{} } @@ -861,6 +862,13 @@ func (m *NewHeightEvent) GetHeight() int64 { return 0 } +func (m *NewHeightEvent) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + func init() { proto.RegisterType((*RequestPing)(nil), "tendermint.rpc.grpc.RequestPing") proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx") @@ -885,60 +893,61 @@ func init() { func init() { proto.RegisterFile("tendermint/rpc/grpc/types.proto", fileDescriptor_0ffff5682c662b95) } var fileDescriptor_0ffff5682c662b95 = []byte{ - // 843 bytes of a gzipped FileDescriptorProto + // 850 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0xef, 0xbf, 0xa4, 0x2f, 0xd9, 0x14, 0x26, 0x61, 0x9b, 0xba, 0x55, 0x36, 0x18, 0xa4, - 0xa6, 0xb0, 0x75, 0xaa, 0x20, 0x84, 0xc4, 0x9e, 0x9a, 0xb6, 0x12, 0x2b, 0x0a, 0x0a, 0xde, 0xa5, - 0x48, 0x5c, 0x82, 0x63, 0x8f, 0x6c, 0xab, 0x89, 0xc7, 0xcc, 0x4c, 0xd2, 0xf4, 0x5b, 0x70, 0xe1, -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, 0xc0, 0x32, 0x01, 0x7d, 0x38, 0xc8, 0x75, + 0x1f, 0xf4, 0x70, 0x69, 0xa8, 0xea, 0x58, 0xd1, 0x3f, 0x5b, 0x07, 0x9a, 0x9d, 0x8b, 0xc2, 0x87, + 0x0b, 0x7d, 0x02, 0x3d, 0x5a, 0x19, 0x6c, 0x4e, 0xd1, 0x5c, 0x17, 0x2e, 0x4f, 0xf7, 0x23, 0xec, + 0x26, 0x65, 0x89, 0x8c, 0x42, 0x66, 0x6e, 0xfa, 0xe9, 0x9f, 0x2c, 0xc5, 0x48, 0x97, 0x0e, 0x54, + 0xd5, 0x4a, 0x46, 0xc5, 0x7f, 0x6d, 0xc1, 0xb4, 0xd4, 0x1f, 0xae, 0x81, 0x94, 0x22, 0x63, 0xa8, + 0x17, 0x0c, 0x50, 0xd4, 0x29, 0xf4, 0x50, 0x3e, 0x6a, 0x4b, 0x4e, 0x94, 0xaf, 0xe6, 0xc7, 0x5a, + 0xef, 0xc5, 0xe5, 0xbc, 0xa5, 0xbd, 0x9d, 0xb7, 0xb4, 0x7f, 0xe6, 0x2d, 0xed, 0xf7, 0xab, 0xd6, + 0xc6, 0xdb, 0xab, 0xd6, 0xc6, 0xdf, 0x57, 0xad, 0x8d, 0x5f, 0xba, 0x5e, 0xc0, 0xfd, 0xc9, 0xd0, + 0x74, 0xc8, 0xb8, 0xa3, 0xbe, 0xaa, 0x16, 0x5f, 0x74, 0xa7, 0x0e, 0xa1, 0x38, 0x36, 0x86, 0xbb, + 0xe2, 0x35, 0xf5, 0xc5, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0xd4, 0x17, 0x5a, 0xf8, 0x09, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2036,6 +2045,13 @@ func (m *NewHeightEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } if m.Height != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- @@ -2298,6 +2314,10 @@ func (m *NewHeightEvent) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -3833,6 +3853,40 @@ func (m *NewHeightEvent) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/proto/tendermint/rpc/grpc/types.proto b/proto/tendermint/rpc/grpc/types.proto index 6631c74775..57fbab8ac6 100644 --- a/proto/tendermint/rpc/grpc/types.proto +++ b/proto/tendermint/rpc/grpc/types.proto @@ -85,6 +85,7 @@ message ValidatorSetResponse { message NewHeightEvent { int64 height = 1; + bytes hash = 2; } //---------------------------------------- diff --git a/rpc/grpc/api.go b/rpc/grpc/api.go index 338d6b6067..9e20363de3 100644 --- a/rpc/grpc/api.go +++ b/rpc/grpc/api.go @@ -42,22 +42,22 @@ func (bapi *broadcastAPI) BroadcastTx(ctx context.Context, req *RequestBroadcast }, nil } -type blockAPI struct { +type BlockAPI struct { sync.Mutex ctx context.Context - heightListeners map[chan int64]struct{} + heightListeners map[chan NewHeightEvent]struct{} newBlockSubscription types2.Subscription } -func NewBlockAPI(ctx context.Context) *blockAPI { - return &blockAPI{ +func NewBlockAPI(ctx context.Context) *BlockAPI { + return &BlockAPI{ ctx: ctx, // TODO(rach-id) make 1000 configurable if there is a need for it - heightListeners: make(map[chan int64]struct{}, 1000), + heightListeners: make(map[chan NewHeightEvent]struct{}, 1000), } } -func (blockAPI *blockAPI) StartNewBlockEventListener() { +func (blockAPI *BlockAPI) StartNewBlockEventListener() { env := core.GetEnvironment() if blockAPI.newBlockSubscription == nil { var err error @@ -85,38 +85,38 @@ func (blockAPI *blockAPI) StartNewBlockEventListener() { env.Logger.Debug("couldn't cast event data to new block") continue } - blockAPI.broadcastToListeners(data.Block.Height) + blockAPI.broadcastToListeners(data.Block.Height, data.Block.DataHash) } } } -func (blockAPI *blockAPI) broadcastToListeners(height int64) { +func (blockAPI *BlockAPI) broadcastToListeners(height int64, hash []byte) { for ch := range blockAPI.heightListeners { select { case <-blockAPI.ctx.Done(): return - case ch <- height: + case ch <- NewHeightEvent{Height: height, Hash: hash}: } } } -func (blockAPI *blockAPI) addHeightListener() chan int64 { +func (blockAPI *BlockAPI) addHeightListener() chan NewHeightEvent { blockAPI.Lock() defer blockAPI.Unlock() - ch := make(chan int64, 50) + ch := make(chan NewHeightEvent, 50) blockAPI.heightListeners[ch] = struct{}{} return ch } -func (blockAPI *blockAPI) removeHeightListener(ch chan int64) { +func (blockAPI *BlockAPI) removeHeightListener(ch chan NewHeightEvent) { blockAPI.Lock() defer blockAPI.Unlock() delete(blockAPI.heightListeners, ch) close(ch) } -func (blockAPI *blockAPI) BlockByHash(req *BlockByHashRequest, stream BlockAPI_BlockByHashServer) error { +func (blockAPI *BlockAPI) BlockByHash(req *BlockByHashRequest, stream BlockAPI_BlockByHashServer) error { blockStore := core.GetEnvironment().BlockStore blockMeta := blockStore.LoadBlockMetaByHash(req.Hash) for i := 0; i < int(blockMeta.BlockID.PartSetHeader.Total); i++ { @@ -136,7 +136,7 @@ func (blockAPI *blockAPI) BlockByHash(req *BlockByHashRequest, stream BlockAPI_B return nil } -func (blockAPI *blockAPI) BlockByHeight(req *BlockByHeightRequest, stream BlockAPI_BlockByHeightServer) error { +func (blockAPI *BlockAPI) BlockByHeight(req *BlockByHeightRequest, stream BlockAPI_BlockByHeightServer) error { blockStore := core.GetEnvironment().BlockStore blockMeta := blockStore.LoadBlockMeta(req.Height) for i := 0; i < int(blockMeta.BlockID.PartSetHeader.Total); i++ { @@ -156,21 +156,21 @@ func (blockAPI *blockAPI) BlockByHeight(req *BlockByHeightRequest, stream BlockA return nil } -func (blockAPI *blockAPI) BlockMetaByHash(ctx context.Context, req *BlockMetaByHashRequest) (*BlockMetaByHashResponse, error) { +func (blockAPI *BlockAPI) BlockMetaByHash(ctx context.Context, req *BlockMetaByHashRequest) (*BlockMetaByHashResponse, error) { blockMeta := core.GetEnvironment().BlockStore.LoadBlockMetaByHash(req.Hash).ToProto() return &BlockMetaByHashResponse{ BlockMeta: blockMeta, }, nil } -func (blockAPI *blockAPI) BlockMetaByHeight(ctx context.Context, req *BlockMetaByHeightRequest) (*BlockMetaByHeightResponse, error) { +func (blockAPI *BlockAPI) BlockMetaByHeight(ctx context.Context, req *BlockMetaByHeightRequest) (*BlockMetaByHeightResponse, error) { blockMeta := core.GetEnvironment().BlockStore.LoadBlockMeta(req.Height).ToProto() return &BlockMetaByHeightResponse{ BlockMeta: blockMeta, }, nil } -func (blockAPI *blockAPI) Commit(_ context.Context, req *CommitRequest) (*CommitResponse, error) { +func (blockAPI *BlockAPI) Commit(_ context.Context, req *CommitRequest) (*CommitResponse, error) { commit := core.GetEnvironment().BlockStore.LoadBlockCommit(req.Height).ToProto() return &CommitResponse{ @@ -181,7 +181,7 @@ func (blockAPI *blockAPI) Commit(_ context.Context, req *CommitRequest) (*Commit }, nil } -func (blockAPI *blockAPI) ValidatorSet(_ context.Context, req *ValidatorSetRequest) (*ValidatorSetResponse, error) { +func (blockAPI *BlockAPI) ValidatorSet(_ context.Context, req *ValidatorSetRequest) (*ValidatorSetResponse, error) { validatorSet, err := core.GetEnvironment().StateStore.LoadValidators(req.Height) if err != nil { return nil, err @@ -205,19 +205,16 @@ func (blockAPI *blockAPI) ValidatorSet(_ context.Context, req *ValidatorSetReque }, nil } -func (blockAPI *blockAPI) SubscribeNewHeights(_ *SubscribeNewHeightsRequest, stream BlockAPI_SubscribeNewHeightsServer) error { - heightChan := blockAPI.addHeightListener() - defer blockAPI.removeHeightListener(heightChan) +func (blockAPI *BlockAPI) SubscribeNewHeights(_ *SubscribeNewHeightsRequest, stream BlockAPI_SubscribeNewHeightsServer) error { + eventsChan := blockAPI.addHeightListener() + defer blockAPI.removeHeightListener(eventsChan) for { select { case <-blockAPI.ctx.Done(): return nil - case height := <-heightChan: - event := &NewHeightEvent{ - Height: height, - } - if err := stream.Send(event); err != nil { + case event := <-eventsChan: + if err := stream.Send(&event); err != nil { return err } case <-stream.Context().Done(): diff --git a/rpc/grpc/types.pb.go b/rpc/grpc/types.pb.go index 62333d8317..51e2050899 100644 --- a/rpc/grpc/types.pb.go +++ b/rpc/grpc/types.pb.go @@ -818,7 +818,8 @@ func (m *ValidatorSetResponse) GetTotalVotingPower() int64 { } type NewHeightEvent struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` } func (m *NewHeightEvent) Reset() { *m = NewHeightEvent{} } @@ -861,6 +862,13 @@ func (m *NewHeightEvent) GetHeight() int64 { return 0 } +func (m *NewHeightEvent) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + func init() { proto.RegisterType((*RequestPing)(nil), "tendermint.rpc.grpc.RequestPing") proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx") @@ -885,60 +893,61 @@ func init() { func init() { proto.RegisterFile("tendermint/rpc/grpc/types.proto", fileDescriptor_0ffff5682c662b95) } var fileDescriptor_0ffff5682c662b95 = []byte{ - // 843 bytes of a gzipped FileDescriptorProto + // 850 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0xef, 0xbf, 0xa4, 0x2f, 0xd9, 0x14, 0x26, 0x61, 0x9b, 0xba, 0x55, 0x36, 0x18, 0xa4, - 0xa6, 0xb0, 0x75, 0xaa, 0x20, 0x84, 0xc4, 0x9e, 0x9a, 0xb6, 0x12, 0x2b, 0x0a, 0x0a, 0xde, 0xa5, - 0x48, 0x5c, 0x82, 0x63, 0x8f, 0x6c, 0xab, 0x89, 0xc7, 0xcc, 0x4c, 0xd2, 0xf4, 0x5b, 0x70, 0xe1, - 0xcb, 0x20, 0x71, 0xdf, 0x63, 0x8f, 0x9c, 0x2a, 0xc8, 0x7e, 0x11, 0xe4, 0xf1, 0x38, 0x1d, 0x6f, - 0xec, 0x24, 0x07, 0xb8, 0x58, 0xcf, 0x6f, 0x7e, 0xbf, 0xf7, 0x7b, 0x33, 0x7e, 0xef, 0x8d, 0xe1, - 0x84, 0xe3, 0xd0, 0xc5, 0x74, 0x12, 0x84, 0xbc, 0x4b, 0x23, 0xa7, 0xeb, 0xc5, 0x0f, 0xfe, 0x26, - 0xc2, 0xcc, 0x8c, 0x28, 0xe1, 0x04, 0xd5, 0xdf, 0x03, 0x4c, 0x1a, 0x39, 0x66, 0x0c, 0xd0, 0xef, - 0x29, 0x2c, 0x7b, 0xe4, 0x04, 0x2a, 0x43, 0xbf, 0xaf, 0x2c, 0x0a, 0x7f, 0x66, 0xb5, 0xbd, 0xb2, - 0x3a, 0xb3, 0xc7, 0x81, 0x6b, 0x73, 0x42, 0x25, 0xa2, 0xe1, 0x11, 0x8f, 0x08, 0xb3, 0x1b, 0x5b, - 0x89, 0xd7, 0x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2d, 0xed, 0xf7, 0xab, 0xd6, + 0xc6, 0xdb, 0xab, 0xd6, 0xc6, 0xdf, 0x57, 0xad, 0x8d, 0x5f, 0xba, 0x5e, 0xc0, 0xfd, 0xc9, 0xd0, + 0x74, 0xc8, 0xb8, 0xa3, 0xbe, 0xaa, 0x16, 0x5f, 0x74, 0xa7, 0x0e, 0xa1, 0x38, 0x36, 0x86, 0xbb, + 0xe2, 0x35, 0xf5, 0xc5, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0a, 0xd4, 0x17, 0x5a, 0xf8, 0x09, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2036,6 +2045,13 @@ func (m *NewHeightEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } if m.Height != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Height)) i-- @@ -2298,6 +2314,10 @@ func (m *NewHeightEvent) Size() (n int) { if m.Height != 0 { n += 1 + sovTypes(uint64(m.Height)) } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -3833,6 +3853,40 @@ func (m *NewHeightEvent) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:])