I'm a user of the reth node RPC (using via @sslivkoff's cryo), but believe most of the edge cases are likely broadly applicable as well. This centers mostly around the use of debug.tip and the retrieval of data from blocks that have not completed syncing.
Cryo sync utilizes the reth RPC to retrieve data via available block ranges. If cryo (or any client) attempts to retrieve a range that doesn't yet exist, the RPC will return empty. This is particularly acute when the debug.tip is changed (e.g. from a lower block number to a higher block number) and the reth node needs to "catch up" to the higher debug.tip from a lower block number.
Example:
in reth node, set debug.tip to lower range (i.e. 6m), let node catch up
client attempts to retrieve higher range (i.e. 12m), gets empty from rpc
realizing mistake, change reth node to higher range (i.e. 18m)
reth node is now "catching up" from lower range (i.e. 6m) to the higher range (i.e. 18m)
request to get ranges that are still catching up (i.e. 10m), gets empty from rpc
Not sure what is the best way to handle cases like this (exception or error code?). Would assume that an error code would be preferable to elegantly handle on the client rather than silently or loudly fail?
I don't have more detail ATM (ie. specific RPC calls and network traffic etc), just logging the edge case as I'm noticing it; but hopefully the description above is clear enough for those w/ a deeper expertise of the node rpc?
Describe the feature
I'm a user of the reth node RPC (using via @sslivkoff's cryo), but believe most of the edge cases are likely broadly applicable as well. This centers mostly around the use of debug.tip and the retrieval of data from blocks that have not completed syncing.
Cryo sync utilizes the reth RPC to retrieve data via available block ranges. If cryo (or any client) attempts to retrieve a range that doesn't yet exist, the RPC will return empty. This is particularly acute when the debug.tip is changed (e.g. from a lower block number to a higher block number) and the reth node needs to "catch up" to the higher debug.tip from a lower block number.
Example:
Not sure what is the best way to handle cases like this (exception or error code?). Would assume that an error code would be preferable to elegantly handle on the client rather than silently or loudly fail?
I don't have more detail ATM (ie. specific RPC calls and network traffic etc), just logging the edge case as I'm noticing it; but hopefully the description above is clear enough for those w/ a deeper expertise of the node rpc?
Additional context
Some context in these messages: https://t.me/paradigm_data/2148