diff --git a/service/cachemdw/cache.go b/service/cachemdw/cache.go index 8110d5b..1a11289 100644 --- a/service/cachemdw/cache.go +++ b/service/cachemdw/cache.go @@ -101,11 +101,15 @@ func IsCacheable( Msg("can't marshal EVM request params into json") } - logger.Logger.Error(). - Str("method", req.Method). - Str("params", string(paramsInJSON)). - Err(err). - Msg("can't parse block number from params") + // as of now proxy-service doesn't fully support all use-cases of eth_call - so we don't want to log error + // for actually valid requests + if req.Method != "eth_call" { + logger.Logger.Error(). + Str("method", req.Method). + Str("params", string(paramsInJSON)). + Err(err). + Msg("can't parse block number from params") + } return false } diff --git a/service/shard.go b/service/shard.go index 92bf973..dbc6560 100644 --- a/service/shard.go +++ b/service/shard.go @@ -58,7 +58,11 @@ func (hsp PruningOrDefaultProxies) ProxyForRequest(r *http.Request) (*httputil.R // parse height from the request height, err := decode.ParseBlockNumberFromParams(decodedReq.Method, decodedReq.Params) if err != nil { - hsp.Error().Msg(fmt.Sprintf("expected but failed to parse block number for %+v: %s", decodedReq, err)) + // as of now proxy-service doesn't fully support all use-cases of eth_call - so we don't want to log error + // for actually valid requests + if decodedReq.Method != "eth_call" { + hsp.Error().Msg(fmt.Sprintf("expected but failed to parse block number for %+v: %s", decodedReq, err)) + } return hsp.defaultProxies.ProxyForRequest(r) } @@ -135,7 +139,10 @@ func (sp ShardProxies) ProxyForRequest(r *http.Request) (*httputil.ReverseProxy, // parse height from the request parsedHeight, err := decode.ParseBlockNumberFromParams(decodedReq.Method, decodedReq.Params) if err != nil { - if err != decode.ErrUncachaebleByBlockNumberEthRequest { + // as of now proxy-service doesn't fully support all use-cases of eth_call - so we don't want to log error + // for actually valid requests + // also we don't want to spam with log errors if request is uncacheable + if decodedReq.Method != "eth_call" && err != decode.ErrUncachaebleByBlockNumberEthRequest { sp.Error().Msg(fmt.Sprintf("expected but failed to parse block number for %+v: %s", decodedReq, err)) } return sp.defaultProxies.ProxyForRequest(r)