-
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
Block time calculation gets warped with high stakes #7781
Milestone
Comments
@CriesofCarrots Could you take a look at this to see if this behavior is indeed a bug? |
@ryoqun , at a glance, this does appear to be a bug! I'll write a failing test to expose it. |
Merged
This was referenced Aug 1, 2022
This was referenced Aug 2, 2022
This was referenced Aug 22, 2022
This was referenced Aug 24, 2022
Open
Open
Open
Open
This was referenced May 14, 2024
Open
Open
Open
Open
This was referenced May 22, 2024
This was referenced May 22, 2024
This was referenced Oct 12, 2024
This was referenced Oct 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
solana get-block-time XXX
can return warped value:under the configuration of:
Proposed Solution
My rough guess was
timestamp (around 30 bits these days) * stake (~ 44 bits)
could have been overflowed. Oddity is that rust's checked integer operation didn't complain...under this hacky patch:
background
I've tested large stakes hoping something odd for the bank hash mismatch #7736; And I've found this instead as part of the investigation. This block time calculation doesn't happen on chain (is it ok, btw?) and the vote timestamps in ledger themselves are fine.
The text was updated successfully, but these errors were encountered: