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

Use block-hash header value to determine which block to use for subsequent requests. #229

Open
vikt0r0 opened this issue Mar 6, 2023 · 0 comments
Labels
good first issue Good for newcomers [Prio] Low Should be fixed if time permits but can be postponed. [Type] Change Request Some visible functionality should be change.

Comments

@vikt0r0
Copy link
Contributor

vikt0r0 commented Mar 6, 2023

Description
In numerous places, the client currently uses GetBlockInfo to get the actual block hash used when querying the best block. Subsequent requests then specify said block hash to consistently retrieve info from that block, instead of having each request use the best block hash at the time of the request. This is necessary since the best block may change in between the subsequent calls, and this could lead to inconsistencies.

However, the GRPC API v2 already includes a block-hash header in its response that contains the block hash if the block from which the information was retrieved. It would be preferable to use this in favor of the aforementioned pattern as it is not only more concise and reduces the number of requests made.

@vikt0r0 vikt0r0 added [Type] Change Request Some visible functionality should be change. good first issue Good for newcomers [Prio] Low Should be fixed if time permits but can be postponed. labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers [Prio] Low Should be fixed if time permits but can be postponed. [Type] Change Request Some visible functionality should be change.
Projects
None yet
Development

No branches or pull requests

1 participant