rpc: fix Bloom filter response (#321)

* fix bloomfilter in rpc response

* add comments
This commit is contained in:
Thomas Nguy 2021-07-21 00:16:02 +09:00 committed by GitHub
parent bb6622b7fb
commit 0276f3465d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 165 additions and 92 deletions

View File

@ -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. * (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. * (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#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 ### Improvements

View File

@ -568,6 +568,11 @@ QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC
method. 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. |

View File

@ -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 { if err != nil {
e.logger.Debug("failed to query BlockBloom", "height", block.Height, "error", err.Error()) 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 return nil, err
} }
req := &evmtypes.QueryBlockBloomRequest{} req := &evmtypes.QueryBlockBloomRequest{Height: resBlock.Block.Height}
blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(resBlock.Block.Height), req) blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(resBlock.Block.Height), req)
if err != nil { if err != nil {
@ -287,7 +287,7 @@ func (e *EVMBackend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, erro
return nil, err return nil, err
} }
req := &evmtypes.QueryBlockBloomRequest{} req := &evmtypes.QueryBlockBloomRequest{Height: resBlock.Block.Height}
blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(resBlock.Block.Height), req) blockBloomResp, err := e.queryClient.BlockBloom(types.ContextWithHeight(resBlock.Block.Height), req)
if err != nil { if err != nil {

View File

@ -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 // 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. // 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 { func ContextWithHeight(height int64) context.Context {
if height == 0 { if height == 0 {
return context.Background() return context.Background()

View File

@ -222,7 +222,13 @@ message QueryBlockLogsResponse {
// QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC // QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC
// method. // 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 // QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC
// method. // method.

View File

@ -272,10 +272,10 @@ func (k Keeper) BlockLogs(c context.Context, req *types.QueryBlockLogsRequest) (
} }
// BlockBloom implements the Query/BlockBloom gRPC method // 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) ctx := sdk.UnwrapSDKContext(c)
bloom, found := k.GetBlockBloom(ctx, ctx.BlockHeight()) bloom, found := k.GetBlockBloom(ctx, req.Height)
if !found { if !found {
// if the bloom is not found, query the transient store at the current height // if the bloom is not found, query the transient store at the current height
k.ctx = ctx k.ctx = ctx
@ -283,7 +283,7 @@ func (k Keeper) BlockBloom(c context.Context, _ *types.QueryBlockBloomRequest) (
if bloomInt.Sign() == 0 { if bloomInt.Sign() == 0 {
return nil, status.Error( 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(),
) )
} }

View File

@ -540,14 +540,16 @@ func (suite *KeeperTestSuite) TestQueryBlockBloom() {
malleate func() malleate func()
expPass bool expPass bool
}{ }{
{"marshal error", {"bad height",
func() {}, func() {
req = &types.QueryBlockBloomRequest{Height: -2}
},
false, false,
}, },
{ {
"bloom from transient store", "bloom from transient store",
func() { func() {
req = &types.QueryBlockBloomRequest{} req = &types.QueryBlockBloomRequest{Height: 1}
bloom := ethtypes.BytesToBloom([]byte("bloom")) bloom := ethtypes.BytesToBloom([]byte("bloom"))
expBloom = bloom.Bytes() expBloom = bloom.Bytes()
suite.app.EvmKeeper.WithContext(suite.ctx.WithBlockHeight(1)) suite.app.EvmKeeper.WithContext(suite.ctx.WithBlockHeight(1))
@ -557,7 +559,7 @@ func (suite *KeeperTestSuite) TestQueryBlockBloom() {
}, },
{"bloom not found for height", {"bloom not found for height",
func() { func() {
req = &types.QueryBlockBloomRequest{} req = &types.QueryBlockBloomRequest{Height: 100}
bloom := ethtypes.BytesToBloom([]byte("bloom")) bloom := ethtypes.BytesToBloom([]byte("bloom"))
expBloom = bloom.Bytes() expBloom = bloom.Bytes()
suite.ctx = suite.ctx.WithBlockHeight(100) suite.ctx = suite.ctx.WithBlockHeight(100)
@ -568,11 +570,11 @@ func (suite *KeeperTestSuite) TestQueryBlockBloom() {
{ {
"success", "success",
func() { func() {
req = &types.QueryBlockBloomRequest{} req = &types.QueryBlockBloomRequest{Height: 3}
bloom := ethtypes.BytesToBloom([]byte("bloom")) bloom := ethtypes.BytesToBloom([]byte("bloom"))
expBloom = bloom.Bytes() expBloom = bloom.Bytes()
suite.ctx = suite.ctx.WithBlockHeight(1) suite.ctx = suite.ctx.WithBlockHeight(3)
suite.app.EvmKeeper.SetBlockBloom(suite.ctx, 1, bloom) suite.app.EvmKeeper.SetBlockBloom(suite.ctx, 3, bloom)
}, },
true, true,
}, },

View File

@ -782,6 +782,11 @@ func (m *QueryBlockLogsResponse) GetPagination() *query.PageResponse {
// QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC // QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC
// method. // method.
type QueryBlockBloomRequest struct { 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{} } func (m *QueryBlockBloomRequest) Reset() { *m = QueryBlockBloomRequest{} }
@ -817,6 +822,13 @@ func (m *QueryBlockBloomRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_QueryBlockBloomRequest proto.InternalMessageInfo 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 // QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC
// method. // method.
type QueryBlockBloomResponse struct { type QueryBlockBloomResponse struct {
@ -1180,85 +1192,86 @@ func init() {
} }
var fileDescriptor_8bbc79ec2b6c5cb2 = []byte{ 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, 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, 0x18, 0xc7, 0xbd, 0x89, 0x63, 0x27, 0x4f, 0x92, 0x36, 0x4c, 0x4d, 0x1a, 0xb6, 0xc5, 0x09, 0x0b,
0x8d, 0x9d, 0x97, 0xee, 0xd6, 0xe6, 0xad, 0x54, 0x20, 0x48, 0xa2, 0xa4, 0x95, 0x5a, 0x50, 0x71, 0x8d, 0x9d, 0x97, 0xee, 0xc6, 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, 0x22, 0x0e, 0x5c, 0xac, 0x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, 0x35, 0x09, 0xf3, 0x44, 0x83, 0xe9, 0x80, 0x2a,
0x8b, 0xc5, 0x51, 0x4e, 0x55, 0x87, 0xb0, 0x8d, 0x8d, 0x67, 0xc7, 0x79, 0xed, 0xf9, 0x71, 0x5e, 0x8f, 0x0c, 0x14, 0x79, 0x6d, 0x43, 0x24, 0xde, 0x58, 0x17, 0x38, 0xcb, 0xe8, 0xb5, 0x48, 0x1c,
0xfb, 0xf3, 0x38, 0xaf, 0x3d, 0x39, 0xc9, 0xa7, 0x9e, 0x9f, 0xe4, 0x53, 0xbf, 0x9f, 0xe4, 0x53, 0xe5, 0x54, 0x76, 0x31, 0xdd, 0xda, 0x7a, 0x76, 0x9a, 0xd5, 0x9e, 0x9f, 0x66, 0xb5, 0x3f, 0x4f,
0x9f, 0x16, 0x9d, 0xa6, 0xdf, 0xe8, 0xd6, 0x0c, 0x8b, 0xb6, 0x4d, 0xbf, 0x41, 0x3c, 0xd6, 0x64, 0xb3, 0xda, 0x93, 0xb3, 0x6c, 0xe2, 0xf9, 0x59, 0x36, 0xf1, 0xfb, 0x59, 0x36, 0xf1, 0x69, 0xde,
0xa1, 0x88, 0xfb, 0x22, 0xa6, 0x7f, 0xd0, 0xb1, 0x59, 0x2d, 0x23, 0xfe, 0x2b, 0x7e, 0xfd, 0xdf, 0xad, 0xb3, 0x5a, 0xa7, 0x62, 0xda, 0xa4, 0x69, 0xb1, 0x1a, 0x6e, 0xd3, 0x3a, 0x0d, 0x44, 0x3c,
0x00, 0x00, 0x00, 0xff, 0xff, 0x13, 0xa4, 0x09, 0x32, 0xf6, 0x0f, 0x00, 0x00, 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. // Reference imports to suppress errors if they are not otherwise used.
@ -2378,6 +2391,11 @@ func (m *QueryBlockBloomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
_ = i _ = i
var l int var l int
_ = l _ = l
if m.Height != 0 {
i = encodeVarintQuery(dAtA, i, uint64(m.Height))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
@ -2857,6 +2875,9 @@ func (m *QueryBlockBloomRequest) Size() (n int) {
} }
var l int var l int
_ = l _ = l
if m.Height != 0 {
n += 1 + sovQuery(uint64(m.Height))
}
return n 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) return fmt.Errorf("proto: QueryBlockBloomRequest: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { 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: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:]) skippy, err := skipQuery(dAtA[iNdEx:])

View File

@ -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) { 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 protoReq QueryBlockBloomRequest
var metadata runtime.ServerMetadata 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)) msg, err := client.BlockBloom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err return msg, metadata, err
@ -516,6 +527,13 @@ func local_request_Query_BlockBloom_0(ctx context.Context, marshaler runtime.Mar
var protoReq QueryBlockBloomRequest var protoReq QueryBlockBloomRequest
var metadata runtime.ServerMetadata 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) msg, err := server.BlockBloom(ctx, &protoReq)
return msg, metadata, err return msg, metadata, err