feat(alpenglow): introducing the alpenclock account to the bank#10623
Closed
ksn6 wants to merge 2 commits intoanza-xyz:masterfrom
Closed
feat(alpenglow): introducing the alpenclock account to the bank#10623ksn6 wants to merge 2 commits intoanza-xyz:masterfrom
ksn6 wants to merge 2 commits intoanza-xyz:masterfrom
Conversation
Author
|
Note: we don't invoke the introduced functions just yet; we'll be doing so shortly as we continue upstreaming Alpenglow pieces. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #10623 +/- ##
=========================================
- Coverage 83.0% 83.0% -0.1%
=========================================
Files 848 848
Lines 316606 316644 +38
=========================================
- Hits 262944 262925 -19
- Misses 53662 53719 +57 🚀 New features to boost your workflow:
|
0f20013 to
6895663
Compare
|
is this a duplicate of https://github.com/anza-xyz/agave/pull/10331/changes ? |
Author
oops, yep - closing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The clock sysvar (
Clock) has second-level resolution for itsunix_timestampfield. Alpenglow block footers carry UNIX timestamps at nanosecond resolution, but there is currently no on-chain account to store and expose this higher-precision timestamp.Summary of Changes
Introduce a new off-curve PDA account (
NANOSECOND_CLOCK_ACCOUNT) derived from the seed"alpenclock"under thealpenglowfeature gate program address.Add
Bank::update_clock_from_footer(unix_timestamp_nanos)Add
Bank::get_nanosecond_clock()to deserialize the nanosecond timestamp from thealpenclockaccount.This PR addresses solana-foundation/solana-improvement-documents#363.