Add deactivation cooldown before address lookup tables can be closed#22011
Add deactivation cooldown before address lookup tables can be closed#22011jstarry merged 1 commit intosolana-labs:masterfrom
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 |
joncinque
left a comment
There was a problem hiding this comment.
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.
Just double-checking, this isn't being used yet, correct? If so, this reordering of instructions will break existing clients
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. |
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_slotfield todeactivation_slotto track when an address table has been deactivated long enough that it can be closed.Fixes #