Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 5047369

Browse files
authoredJun 10, 2022
feat(nonce): adds system instruction to upgrade legacy nonce versions (#25789)
solana-labs/solana#25788 permanently disables durable transactions with legacy nonce versions which are within chain blockhash domain. This commit adds a new system instruction for a one-time idempotent upgrade of legacy nonce accounts in order to bump them out of chain blockhash domain.
1 parent e8b1cea commit 5047369

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/system-program.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ export type SystemInstructionType =
566566
| 'InitializeNonceAccount'
567567
| 'Transfer'
568568
| 'TransferWithSeed'
569-
| 'WithdrawNonceAccount';
569+
| 'WithdrawNonceAccount'
570+
| 'UpgradeNonceAccount';
570571

571572
type SystemInstructionInputData = {
572573
AdvanceNonceAccount: IInstructionInputData;
@@ -616,6 +617,7 @@ type SystemInstructionInputData = {
616617
WithdrawNonceAccount: IInstructionInputData & {
617618
lamports: number;
618619
};
620+
UpgradeNonceAccount: IInstructionInputData;
619621
};
620622

621623
/**
@@ -724,6 +726,12 @@ export const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{
724726
],
725727
),
726728
},
729+
UpgradeNonceAccount: {
730+
index: 12,
731+
layout: BufferLayout.struct<
732+
SystemInstructionInputData['UpgradeNonceAccount']
733+
>([BufferLayout.u32('instruction')]),
734+
},
727735
});
728736

729737
/**

0 commit comments

Comments
 (0)
This repository has been archived.