-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: getBlockTime returns null for slot that hasn't been purged #10089
Comments
This problem is quite visible on mainnet-beta too:
|
Alternatively/additionally consider adding the block-time estimate to the results from:
|
At the same time, consider adding a block-time column in blockstore to reduce the compute performed by the |
Once #10093 is fixed, there only needs to be a single estimated block production time as well |
Once |
This needs #10630 to land (cc: #10984 (review)) |
Unless we add |
Yeah the current form of the confirmed block endpoint is pretty expensive. I wouldn't mind deprecating getBlockTime if we made sure to have a lighter weight confirmed block endpoint. It could exclude tx details and paginate transaction signatures via options |
@mvines I apologize, I might not be up to date with all of the other issues you guys are solving for and this is an older issue so the conversation here might be outdated. However, my team has a need for getting just the |
There are no current plans to deprecate getBlockTime so seems like you'd be just fine to continue using it |
This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs. |
Problem
Developers expect that
getBlockTime
will return a non-null response when the requested block is still available viagetConfimedBlock
. The reason it can return null is because we only keep the last 5 epochs of stake info and stake info is needed for calculating stake-weighted timestamp for a block.Proposed Solution
Only prune epochs from
epoch_stakes
when the last slot in an epoch is purged from the blockstore.The text was updated successfully, but these errors were encountered: