-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add validator timestamp oracle proposal #7159
Add validator timestamp oracle proposal #7159
Conversation
8f2aaf4
to
0ef1d9e
Compare
I've been thinking it's a little unfortunate to make validators maintain another rent-exempt account. Would it be totally crazy to roll this into the vote account? Timestamp could be an additional instruction on intermittent votes. |
Yeah, different vote instruction is fine. I just didn't want the extra 8 bytes on the wire every 400ms. |
@garious , I've updated this with a write-up of the Vote account/instruction approach. Do you have any concerns? |
c788a91
to
4b299a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just looking for the one clarification. This looks great!
|
||
- At regular intervals, each validator records its observed time for a known slot | ||
on-chain (via a Timestamp added to a slot Vote) | ||
- A client can request a block time using the `getBlockTime` RPC method. When a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can use more definition. It's not clear to me if this is returning the latest block's timestamp, the rooted timestamp, or an estimate of the latest timestamp using the rooted timestamp and number of slots since the latest. And if there are forks, is that the latest latest? If returning the rooted timestamp is sufficient, that's certainly simplest.
@mvines , I'm merging on Greg's approval, but happy to make follow-up adjustments, if anything looks amiss to you. |
Problem
Users have no way to know when a Solana block was produced in real-world time.
We have some rough ideas about each validator submitting its UTC time to the ledger in order to identify a median time to use to compute subsequent block times, but no concrete plan.
Summary of Changes
Toward #7115