From 0276f3465dfaf36cd22c5206f722daa866d4ee84 Mon Sep 17 00:00:00 2001 From: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:16:02 +0900 Subject: [PATCH] rpc: fix Bloom filter response (#321) * fix bloomfilter in rpc response * add comments --- CHANGELOG.md | 1 + docs/core/proto-docs.md | 5 + ethereum/rpc/backend/backend.go | 6 +- ethereum/rpc/types/block.go | 1 + proto/ethermint/evm/v1alpha1/query.proto | 8 +- x/evm/keeper/grpc_query.go | 6 +- x/evm/keeper/grpc_query_test.go | 16 +- x/evm/types/query.pb.go | 196 ++++++++++++++--------- x/evm/types/query.pb.gw.go | 18 +++ 9 files changed, 165 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35646bf822..f0ed81a34b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (eth) [\#845](https://github.com/cosmos/ethermint/pull/845) The `eth` namespace must be included in the list of API's as default to run the rpc server without error. * (evm) [#202](https://github.com/tharsis/ethermint/pull/202) Web3 api `SendTransaction`/`SendRawTransaction` returns ethereum compatible transaction hash, and query api `GetTransaction*` also accept that. * (rpc) [tharsis#258](https://github.com/tharsis/ethermint/pull/258) Return empty `BloomFilter` instead of throwing an error when it cannot be found (`nil` or empty). +* (rpc) [tharsis#277](https://github.com/tharsis/ethermint/pull/321) Fix `BloomFilter` response. ### Improvements diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index c5c00b5824..4cc85e14b7 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -568,6 +568,11 @@ QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `height` | [int64](#int64) | | height of the block which we want to query the bloom filter. Tendermint always replace the query request header by the current context header, height cannot be extracted from there, so we need to explicitly pass it in parameter. | + + diff --git a/ethereum/rpc/backend/backend.go b/ethereum/rpc/backend/backend.go index 940293e64e..bc5887d76a 100644 --- a/ethereum/rpc/backend/backend.go +++ b/ethereum/rpc/backend/backend.go @@ -204,7 +204,7 @@ func (e *EVMBackend) EthBlockFromTendermint( } } - blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(block.Height), &evmtypes.QueryBlockBloomRequest{}) + blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(block.Height), &evmtypes.QueryBlockBloomRequest{Height: block.Height}) if err != nil { e.logger.Debug("failed to query BlockBloom", "height", block.Height, "error", err.Error()) @@ -266,7 +266,7 @@ func (e *EVMBackend) HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Heade return nil, err } - req := &evmtypes.QueryBlockBloomRequest{} + req := &evmtypes.QueryBlockBloomRequest{Height: resBlock.Block.Height} blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(resBlock.Block.Height), req) if err != nil { @@ -287,7 +287,7 @@ func (e *EVMBackend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, erro return nil, err } - req := &evmtypes.QueryBlockBloomRequest{} + req := &evmtypes.QueryBlockBloomRequest{Height: resBlock.Block.Height} blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(resBlock.Block.Height), req) if err != nil { diff --git a/ethereum/rpc/types/block.go b/ethereum/rpc/types/block.go index 6300b03242..6986305ae2 100644 --- a/ethereum/rpc/types/block.go +++ b/ethereum/rpc/types/block.go @@ -30,6 +30,7 @@ func NewBlockNumber(n *big.Int) BlockNumber { // ContextWithHeight wraps a context with the a gRPC block height header. If the provided height is // 0, it will return an empty context and the gRPC query will use the latest block height for querying. +// Note that all metadata are processed and removed by tendermint layer, so it wont be accessible at gRPC server level. func ContextWithHeight(height int64) context.Context { if height == 0 { return context.Background() diff --git a/proto/ethermint/evm/v1alpha1/query.proto b/proto/ethermint/evm/v1alpha1/query.proto index d2325141c3..ce2fe9840c 100644 --- a/proto/ethermint/evm/v1alpha1/query.proto +++ b/proto/ethermint/evm/v1alpha1/query.proto @@ -222,7 +222,13 @@ message QueryBlockLogsResponse { // QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC // method. -message QueryBlockBloomRequest {} +message QueryBlockBloomRequest { + // height of the block which we want to query the bloom filter. + // Tendermint always replace the query request header by the current context + // header, height cannot be extracted from there, so we need to explicitly pass + // it in parameter. + int64 height = 1; +} // QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC // method. diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index dd70647e4c..98b39a3ee4 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -272,10 +272,10 @@ func (k Keeper) BlockLogs(c context.Context, req *types.QueryBlockLogsRequest) ( } // BlockBloom implements the Query/BlockBloom gRPC method -func (k Keeper) BlockBloom(c context.Context, _ *types.QueryBlockBloomRequest) (*types.QueryBlockBloomResponse, error) { +func (k Keeper) BlockBloom(c context.Context, req *types.QueryBlockBloomRequest) (*types.QueryBlockBloomResponse, error) { ctx := sdk.UnwrapSDKContext(c) - bloom, found := k.GetBlockBloom(ctx, ctx.BlockHeight()) + bloom, found := k.GetBlockBloom(ctx, req.Height) if !found { // if the bloom is not found, query the transient store at the current height k.ctx = ctx @@ -283,7 +283,7 @@ func (k Keeper) BlockBloom(c context.Context, _ *types.QueryBlockBloomRequest) ( if bloomInt.Sign() == 0 { return nil, status.Error( - codes.NotFound, sdkerrors.Wrapf(types.ErrBloomNotFound, "height: %d", ctx.BlockHeight()).Error(), + codes.NotFound, sdkerrors.Wrapf(types.ErrBloomNotFound, "height: %d", req.Height).Error(), ) } diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 194c96f512..99bc41425a 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -540,14 +540,16 @@ func (suite *KeeperTestSuite) TestQueryBlockBloom() { malleate func() expPass bool }{ - {"marshal error", - func() {}, + {"bad height", + func() { + req = &types.QueryBlockBloomRequest{Height: -2} + }, false, }, { "bloom from transient store", func() { - req = &types.QueryBlockBloomRequest{} + req = &types.QueryBlockBloomRequest{Height: 1} bloom := ethtypes.BytesToBloom([]byte("bloom")) expBloom = bloom.Bytes() suite.app.EvmKeeper.WithContext(suite.ctx.WithBlockHeight(1)) @@ -557,7 +559,7 @@ func (suite *KeeperTestSuite) TestQueryBlockBloom() { }, {"bloom not found for height", func() { - req = &types.QueryBlockBloomRequest{} + req = &types.QueryBlockBloomRequest{Height: 100} bloom := ethtypes.BytesToBloom([]byte("bloom")) expBloom = bloom.Bytes() suite.ctx = suite.ctx.WithBlockHeight(100) @@ -568,11 +570,11 @@ func (suite *KeeperTestSuite) TestQueryBlockBloom() { { "success", func() { - req = &types.QueryBlockBloomRequest{} + req = &types.QueryBlockBloomRequest{Height: 3} bloom := ethtypes.BytesToBloom([]byte("bloom")) expBloom = bloom.Bytes() - suite.ctx = suite.ctx.WithBlockHeight(1) - suite.app.EvmKeeper.SetBlockBloom(suite.ctx, 1, bloom) + suite.ctx = suite.ctx.WithBlockHeight(3) + suite.app.EvmKeeper.SetBlockBloom(suite.ctx, 3, bloom) }, true, }, diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 458fc51c00..1035012a53 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -782,6 +782,11 @@ func (m *QueryBlockLogsResponse) GetPagination() *query.PageResponse { // QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC // method. type QueryBlockBloomRequest struct { + // height of the block which we want to query the bloom filter. + // Tendermint always replace the query request header by the current context + // header, height cannot be extracted from there, so we need to explicitly pass + // it in parameter. + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } func (m *QueryBlockBloomRequest) Reset() { *m = QueryBlockBloomRequest{} } @@ -817,6 +822,13 @@ func (m *QueryBlockBloomRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryBlockBloomRequest proto.InternalMessageInfo +func (m *QueryBlockBloomRequest) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + // QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC // method. type QueryBlockBloomResponse struct { @@ -1180,85 +1192,86 @@ func init() { } var fileDescriptor_8bbc79ec2b6c5cb2 = []byte{ - // 1245 bytes of a gzipped FileDescriptorProto + // 1258 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xc7, 0xbd, 0x8d, 0x63, 0x37, 0x4f, 0x92, 0x36, 0x4c, 0x4d, 0x1b, 0xb6, 0xc5, 0x09, 0x03, - 0x8d, 0x9d, 0x97, 0xee, 0xd6, 0xe6, 0xad, 0x54, 0x20, 0x48, 0xa2, 0xa4, 0x95, 0x5a, 0x50, 0x71, - 0x22, 0x0e, 0x5c, 0xac, 0xf1, 0x7a, 0xb5, 0xb6, 0x62, 0xef, 0xb8, 0x3b, 0x6b, 0x2b, 0x51, 0x94, - 0x0b, 0x07, 0xc4, 0xdb, 0xa1, 0x88, 0x03, 0x08, 0x09, 0xa9, 0x57, 0x6e, 0x7c, 0x05, 0x6e, 0x3d, - 0x56, 0xe2, 0xc2, 0x09, 0xa1, 0x84, 0x03, 0x1f, 0x82, 0x03, 0x9a, 0x97, 0xb5, 0x77, 0x1d, 0x6f, - 0xd6, 0x41, 0xdc, 0x66, 0x66, 0x9f, 0x97, 0xdf, 0xf3, 0xcc, 0xe3, 0xf9, 0x27, 0x80, 0x6d, 0xbf, - 0x61, 0x7b, 0xed, 0xa6, 0xeb, 0x9b, 0x76, 0xaf, 0x6d, 0xf6, 0x4a, 0xa4, 0xd5, 0x69, 0x90, 0x92, - 0xf9, 0xb8, 0x6b, 0x7b, 0x07, 0x46, 0xc7, 0xa3, 0x3e, 0x45, 0x57, 0xfb, 0x36, 0x86, 0xdd, 0x6b, - 0x1b, 0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, 0x60, 0x6f, 0xc2, 0x25, 0x79, 0x1d, 0xd5, 0x68, 0xa4, - 0x59, 0x79, 0xba, 0x2e, 0x0f, 0x91, 0x0e, 0x17, 0x19, 0x4f, 0xca, 0xf9, 0x2e, 0x08, 0xbe, 0xfe, - 0x9e, 0x87, 0x20, 0x32, 0x6a, 0xd5, 0xed, 0xb6, 0x6b, 0xb6, 0xa7, 0x2a, 0x98, 0x55, 0xa7, 0x1f, - 0x89, 0x43, 0xfc, 0x00, 0x6e, 0x08, 0x8e, 0x4f, 0x48, 0xab, 0x59, 0x27, 0x3e, 0xf5, 0x86, 0x8a, - 0x79, 0x05, 0x66, 0x2c, 0xea, 0x0e, 0x73, 0x4c, 0xf3, 0xb3, 0xf5, 0x53, 0x55, 0x7d, 0xad, 0xc1, - 0xcb, 0x31, 0xd1, 0x54, 0x61, 0x05, 0xb8, 0x1c, 0x50, 0x45, 0x23, 0x06, 0xb0, 0xff, 0x63, 0x69, - 0xc1, 0x10, 0x6d, 0xc8, 0x7b, 0x3e, 0xcf, 0xf5, 0xdc, 0x56, 0x43, 0xd4, 0x77, 0x4d, 0x1a, 0x22, - 0xfc, 0x40, 0x25, 0xdb, 0xf1, 0xa9, 0x47, 0x9c, 0xe4, 0x64, 0x68, 0x0e, 0x26, 0xf6, 0xec, 0x03, - 0x35, 0x6f, 0x7c, 0x19, 0x4a, 0xbf, 0xa6, 0xd2, 0xf7, 0x83, 0xa9, 0xf4, 0x39, 0x98, 0xec, 0x91, - 0x56, 0x37, 0x48, 0x2e, 0x37, 0xf8, 0x2d, 0x98, 0x53, 0xa3, 0x54, 0x3f, 0x57, 0x91, 0x05, 0x78, - 0x21, 0xe4, 0xa7, 0x52, 0x20, 0x48, 0xf3, 0xd9, 0x17, 0x5e, 0x33, 0x15, 0xb1, 0xc6, 0x65, 0x40, - 0xc2, 0x70, 0x77, 0xff, 0x21, 0x75, 0x58, 0x90, 0x02, 0x41, 0x5a, 0xfc, 0x62, 0x64, 0x7c, 0xb1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0x03, 0x6a, 0x66, 0x14, 0x05, 0xe8, 0x3a, 0x5a, 0x8d, + 0x02, 0x55, 0xe2, 0x46, 0x03, 0xed, 0xfd, 0x49, 0x83, 0xb4, 0x92, 0xa5, 0x18, 0xb4, 0xb0, 0x12, + 0xc6, 0xa0, 0x0d, 0x28, 0x9d, 0xf1, 0xb6, 0x40, 0x2b, 0x20, 0x2b, 0x0a, 0x8d, 0x4a, 0x87, 0x3e, + 0x99, 0x75, 0x7c, 0xe0, 0x1c, 0x9d, 0xa0, 0x6f, 0x34, 0x48, 0x72, 0x41, 0x43, 0xf9, 0x98, 0xa9, + 0xeb, 0x69, 0xa5, 0xbe, 0x32, 0x82, 0xa5, 0xc2, 0xb2, 0x04, 0xd6, 0x0a, 0xca, 0x45, 0x8f, 0x65, + 0x35, 0xd4, 0xae, 0x6f, 0x35, 0x48, 0x49, 0x09, 0x44, 0xab, 0x17, 0xa6, 0x09, 0x69, 0xab, 0xbe, + 0x36, 0x92, 0xad, 0x82, 0x32, 0x05, 0x54, 0x1e, 0x2d, 0x5b, 0x91, 0x7f, 0x56, 0x0b, 0x99, 0xb2, + 0x8e, 0xb9, 0x48, 0x8a, 0x2b, 0x9c, 0xea, 0xc9, 0x19, 0xba, 0x7d, 0xf1, 0xc8, 0x0c, 0xc8, 0xae, + 0x6e, 0x8e, 0x6a, 0x3e, 0xea, 0xa3, 0x53, 0xe1, 0x2e, 0x21, 0xbe, 0x1f, 0x35, 0x80, 0xbe, 0x22, + 0xa1, 0x11, 0x32, 0x06, 0xc5, 0x4e, 0xb7, 0x46, 0xb6, 0x57, 0x88, 0x6b, 0x02, 0xf1, 0x16, 0x7a, + 0xf5, 0x62, 0x44, 0xa1, 0x80, 0xe8, 0x4b, 0x0d, 0x52, 0x52, 0xaf, 0x62, 0x2e, 0x34, 0x24, 0x91, + 0x31, 0x17, 0x1a, 0x16, 0x4e, 0x63, 0x59, 0x00, 0x2d, 0xa1, 0x6c, 0x14, 0x90, 0x94, 0x48, 0xd1, + 0xa8, 0xbe, 0xa8, 0xc5, 0x34, 0xea, 0x9c, 0x8e, 0xc6, 0x34, 0xea, 0xbc, 0x5a, 0xc6, 0x37, 0x8a, + 0x0a, 0x9f, 0xb2, 0xcd, 0x69, 0xbe, 0xd2, 0x20, 0xad, 0x74, 0x14, 0x2d, 0x47, 0x65, 0x0a, 0x0b, + 0xad, 0x1e, 0x39, 0x8b, 0x1f, 0x52, 0x77, 0x87, 0x7f, 0x71, 0x3a, 0xcd, 0xfd, 0xc3, 0x1e, 0x4f, + 0x5e, 0xf0, 0x18, 0x68, 0x29, 0x8a, 0xc7, 0x61, 0x35, 0x09, 0xf3, 0x44, 0x83, 0xe9, 0x80, 0x2a, + 0x8f, 0x0c, 0x14, 0x79, 0x6d, 0x43, 0x24, 0xde, 0x58, 0x17, 0x38, 0xcb, 0xe8, 0xb5, 0x48, 0x1c, + 0xe5, 0x54, 0x76, 0x31, 0xdd, 0xda, 0x7a, 0x76, 0x9a, 0xd5, 0x9e, 0x9f, 0x66, 0xb5, 0x3f, 0x4f, + 0xb3, 0xda, 0x93, 0xb3, 0x6c, 0xe2, 0xf9, 0x59, 0x36, 0xf1, 0xfb, 0x59, 0x36, 0xf1, 0x69, 0xde, + 0xad, 0xb3, 0x5a, 0xa7, 0x62, 0xda, 0xa4, 0x69, 0xb1, 0x1a, 0x6e, 0xd3, 0x3a, 0x0d, 0x44, 0x3c, + 0x14, 0x31, 0xd9, 0x51, 0xcb, 0xa1, 0x95, 0x94, 0xf8, 0x6f, 0xf9, 0xf5, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x90, 0x70, 0xb1, 0x52, 0x0e, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2378,6 +2391,11 @@ func (m *QueryBlockBloomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.Height != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -2857,6 +2875,9 @@ func (m *QueryBlockBloomRequest) Size() (n int) { } var l int _ = l + if m.Height != 0 { + n += 1 + sovQuery(uint64(m.Height)) + } return n } @@ -4535,6 +4556,25 @@ func (m *QueryBlockBloomRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryBlockBloomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/evm/types/query.pb.gw.go b/x/evm/types/query.pb.gw.go index f67b893dd1..c2daa4f2af 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -503,10 +503,21 @@ func local_request_Query_BlockLogs_0(ctx context.Context, marshaler runtime.Mars } +var ( + filter_Query_BlockBloom_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_BlockBloom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryBlockBloomRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BlockBloom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.BlockBloom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -516,6 +527,13 @@ func local_request_Query_BlockBloom_0(ctx context.Context, marshaler runtime.Mar var protoReq QueryBlockBloomRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BlockBloom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.BlockBloom(ctx, &protoReq) return msg, metadata, err