buildwithgrove / path

All paths lead to Grove
6 stars 0 forks source link

[QoS] Ensure returned id fields in JSON-RPC match the requested id field #24

Open fredteumer opened 2 months ago

fredteumer commented 2 months ago

Objective

Sometimes when nodes experience issues they can return an ID field that is inconsistent with the requested ID field. QoS should filter these responses and trigger a retry when this behavior is detected.

Origin Document

Originally raised in a ticket in discord: https://discord.com/channels/824324475256438814/1284063416826462249

call:

curl $BASE \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'

response: {"jsonrpc":"2.0","id":1430873,"result":"0x12cefc9"}

testing with "id":6 call:

curl $BASE \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":6,"jsonrpc":"2.0"}'

response: {"jsonrpc":"2.0","id":6,"result":"0x12cf010"}

Note the inconsistency in the first eth_blockNumber between the id fields versus the second example.

Goals

Deliverables

Non-goals / Non-deliverables

General deliverables

Creator: @fredteumer

Olshansk commented 2 months ago

@adshmh I believe you either have a TODO for this or have already tended to it?

Can you confirm if it's the latter? If not, let's bring this in.