-
Notifications
You must be signed in to change notification settings - Fork 74
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
chain_getBlockHash not implemented properly #1925
Comments
MMRs! |
Without this it is impossible to iterate blocks so I would give this a bump on priority. |
This is unfixable before Beefy is shipped. |
If the head is 9,000,000 it would be nice if recent block numbers were supported. Presumably the hash of block 8,999,999 is known? If so it could be returned rather than the currennt |
Recent block numbers are supported, but this is completely useless because there's no future-proof way to define "recent". |
Maybe I'm reading the runes wrong on this one but it looks like only 0 is supported; should it not care about the height parameter here if it is implemented:
When I'm asking for the recent (as in within 1-2 blocks from the head that I know it should have history of) blocks I just seem to get null returned. |
Ah right, we used to look in the cache of recent blocks, but I intentionally removed that hastily after realizing that the cache of recent blocks could contain non-canonical blocks (i.e. can contain multiple blocks of the same number, without a way to know which one is on the best chain and which one isn't). I can restore that behavior by improving the cache to store the canonical chain. |
chain_getBlockHash
is very problematic to implement. If the JSON-RPC client requests for example block number 2,000,000 while the head is for example around 9,000,000 then we have no reasonable way to know it.Asking a full node for the block with that number works, but because we have no proof of ancestry we have no guarantee that this block is the correct one.
The text was updated successfully, but these errors were encountered: