Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_feeHistory invalid cached response #881

Closed
georgi-l95 opened this issue Feb 7, 2023 · 0 comments · Fixed by #882
Closed

eth_feeHistory invalid cached response #881

georgi-l95 opened this issue Feb 7, 2023 · 0 comments · Fixed by #882
Assignees
Labels
bug Something isn't working

Comments

@georgi-l95
Copy link
Collaborator

Description

The cache for eth_feeHistory is set no matter what the input is. That's resolved to an invalid response 👇

  • make a request with "latest" param
  • the relay caches the response
  • same response will be returned for the next 1 hour (cache TTL) no matter that there is a new block in that interval

Proposed fix:

  • do not cache "latest" or "pending" queries
  • refactor the cache key to include blockCount, newestBlock and rewardPercentilesс

Steps to reproduce

Execute multiple eth_feeHistory calls and observe that oldestBlock is always the same.

{
  "method": "eth_feeHistory",
  "params": ["0x4", "latest", [50]],
  "id": 2,
  "jsonrpc": "2.0"
}

Additional context

No response

Hedera network

other

Version

latest

Operating system

None

@georgi-l95 georgi-l95 added the bug Something isn't working label Feb 7, 2023
@natanasow natanasow self-assigned this Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants