Open mibuono opened 2 days ago
@gameofpointers from Blockscout:
Blockscout initiate it's indexing processing by calling quai_getBlockByNumber with ["latest", false] as param. When the latest block number is defined, it will start to query this same endpoint for every previous and new block, but this time using the block number as parameter.
encoding it in the get block response is going to be the simplest for them, we save on the API calls as well, since its necessary information
Background:
Gameofpointers and I were going back and forth to determinethe best path forward for the blockscout team to be able to index work shares on getblockbynumber call. Initial thoughts were to provide an API call to calculate the proof of the work hash to return the value, so the difficulty of the block could be compared and thereby determine what is a work share and what is an uncle. An API was also proposed as a solution, but that might be cumbersome due to the amount of calls for each uncle/workshare that would need to be made.
We landed at encoding this in the hash itself to save on API calls.