-
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 deactivation cooldown before address lookup tables can be closed #22011
Add deactivation cooldown before address lookup tables can be closed #22011
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22011 +/- ##
=========================================
- Coverage 81.4% 81.3% -0.1%
=========================================
Files 517 517
Lines 145470 145522 +52
=========================================
- Hits 118430 118417 -13
- Misses 27040 27105 +65 |
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.
Looks good with just the one question. Is this leaning more heavily on the idea that there will be other storage mechanisms for these accounts? Also, does this implicitly mean that address lookup tables are immediately usable? Or will there be some runtime hook to ensure that new tables aren't used in the same slot? I don't totally understand why the address is derived from a slot now, or how it's used elsewhere.
/// # Account references | ||
/// 0. `[WRITE]` Address lookup table account to deactivate | ||
/// 1. `[SIGNER]` Current authority | ||
DeactivateLookupTable, |
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 double-checking, this isn't being used yet, correct? If so, this reordering of instructions will break existing clients
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.
Correct!
It's possible that we add an extra cache for these lookup tables but not required for the initial implementation. Address table additions can be used in the following slot. The design allows the runtime to safely read address table accounts for transaction address table lookups without any locking. This part will be clearer in the next PR. The address is derived from a slot so that it's not possible to recreate an address table account with different addresses. |
…22011) (#22036) (cherry picked from commit f5d1115) Co-authored-by: Justin Starry <[email protected]>
Problem
Address lookup tables will be used to load transaction addresses without taking a read lock on the address lookup table account so they cannot be closed in a way that would affect in-progress address loading.
Summary of Changes
derivation_slot
field todeactivation_slot
to track when an address table has been deactivated long enough that it can be closed.Fixes #