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

[RPC] - Encode if workshare is an uncle or not in getblockbynumber #1927

Closed
mibuono opened this issue Jul 2, 2024 · 1 comment
Closed

[RPC] - Encode if workshare is an uncle or not in getblockbynumber #1927

mibuono opened this issue Jul 2, 2024 · 1 comment
Assignees
Labels
Blockscout Issues related to blockscout project

Comments

@mibuono
Copy link

mibuono commented Jul 2, 2024

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.

@mibuono mibuono added the Blockscout Issues related to blockscout project label Jul 2, 2024
@mibuono mibuono changed the title [RPC] - Add endpoint for calculating workhash for workobjectheader [RPC] - Encode if workshare is an uncle or not in getblockbynumber Jul 3, 2024
@mibuono
Copy link
Author

mibuono commented Jul 3, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blockscout Issues related to blockscout project
Projects
None yet
Development

No branches or pull requests

2 participants