Open
Description
Motivation
solana-foundation/solana-improvement-documents#242 will make it impossible to load a nonce account from an address lookup table, so we must adjust the ergonomics of the JS SDK to prohibit creating such a transaction message.
Details
- Make sure that
createAdvanceNonceAccountInstruction()
does not produce anIAccountLookupMeta
(already the case, I think) isAdvanceNonceAccountInstructionForNonce()
must assert that the nonce account in anAdvanceNonce
instruction is not anIAccountLookupMeta
compressTransactionMessageUsingAddressLookupTables()
should refuse to convert anAdvanceNonce
instruction's nonce account from anIAccountMeta
to anIAccountLookupMeta
. Note: this will be bad for package efficiency, because this will mean putting nonce-specific logic in a place where it will almost never be used. Think hard about whether this is worth it or not.getAddressMapFromInstructions()
should always upgrade lookup table entries to static entries if they belong to a nonce account that is subject to anAdvanceNonce
instruction. Note: like 3, this will be bad for package efficiency, because this will mean putting nonce-specific logic into the message compiler where it will almost never be used. Think hard about whether this is worth it or not.
Note
There is a world where, if we're OK with taking the hit on package efficiency to implement 4, then we can ignore all of the other changes. That is to say we can play fast and loose with whether we allow an AdvanceNonceInstruction
to contain an IAccountLookupMeta
knowing that eventually the transaction message compiler will ‘upgrade’ it to a static entry. Thoughts?