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

Update BlockhashQuery to more correctly determine blockhash validity #27045

Closed
2501babe opened this issue Aug 9, 2022 · 1 comment
Closed

Comments

@2501babe
Copy link
Member

2501babe commented Aug 9, 2022

Problem

BlockhashQuery uses is_blockhash_valid. as discussed here: #23949 (comment), this can return a false negative if querying a node thats behind the chain. the better way is to compare the blockhash last valid block height to the result of get_block_height

Proposed Solution

ideally we could keep the interface the same and determine the last valid height from the hash, but i dont know if this is actually possible?

alternatively we can retain the last valid height and pass it through or store it in BlockhashQuery, but this means either breaking the interface of new or adding another constructor and falling back to is_blockhash_valid in absence of a height. obviously the first solution is preferred if possible

@2501babe
Copy link
Member Author

we ended up not needing BlockhashQuery after all

@2501babe 2501babe closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant