prohibit adding nonce account to address lookup table#659
prohibit adding nonce account to address lookup table#659shubhiscoding wants to merge 5 commits into
Conversation
|
lorisleiva
left a comment
There was a problem hiding this comment.
Thanks for this! However, before I review this in more details, I think we should first figure out if this change is really worth it (as discussed here).
|
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
Problem
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.
Summary of Changes
createAdvanceNonceAccountInstruction()produces an AdvanceNonce instruction having anStaticAccount<WritableAccount<TNonceAccountAddress>>.isAdvanceNonceAccountInstructionForNonce()to assert that the nonce account in an AdvanceNonce instruction has static set to true.compressTransactionMessageUsingAddressLookupTables()to refuse to convert any account to a lookup account, if its incompressible property is true.getAccountMetas()to mark every address in staticAccounts array with propertystatic: true(discussed here).Fixes #309