Defend against transactions that source nonce account addresses from lookup tables · Issue #309 · anza-xyz/kit · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 an IAccountLookupMeta (already the case, I think)
isAdvanceNonceAccountInstructionForNonce() must assert that the nonce account in an AdvanceNonce instruction is not an IAccountLookupMeta
compressTransactionMessageUsingAddressLookupTables() should refuse to convert an AdvanceNonce instruction's nonce account from an IAccountMeta to an IAccountLookupMeta. 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 an AdvanceNonce 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?
The text was updated successfully, but these errors were encountered:
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
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 anIAccountLookupMeta
knowing that eventually the transaction message compiler will ‘upgrade’ it to a static entry. Thoughts?The text was updated successfully, but these errors were encountered: