Network upgradesDevelopers1 min read
Create account with prefund (SIMD-0312) activates at epoch 410 (FG 03)
A new CreateAccountAllowPrefund instruction. CreateAccount is unchanged.
Nick P · X1 Labs ·
SIMD-0312 activated at the start of epoch 410 (slot 86,014,112, 00:40 UTC on 15 October). It adds one new system instruction, CreateAccountAllowPrefund, and changes nothing that already works.
What it is
Creating an account is normally one call to CreateAccount, which refuses to run if the address already holds any XNT. That refusal was a safety measure, but it gets in the way of a common pattern: paying an account's rent in advance, or having someone else fund it before it is created. Programs work around it by doing the job in three separate steps (transfer, allocate, assign), each a cross-program call with its own overhead of at least 1,000 compute units.
CreateAccountAllowPrefund does the same job in one call and keeps any XNT already at the address. A program that does not need to move XNT can pass zero and use it as a plain "allocate and assign".
Why it's good for X1
It saves compute on one of the most common things programs do. The upstream benchmarks for the associated token account program show a saving of about 2,500 compute units per account created. It also removes a griefing trick: sending a speck of XNT to an address a program is about to create used to make that creation fail.
What to watch
- The old CreateAccount is unchanged, so nothing breaks.
- Programs only benefit once they switch to the new instruction, typically through an updated library.
Sources
- The X1 Labs announcement (below)
- SIMD-0312: https://github.com/solana-foundation/solana-improvement-documents/blob/main/proposals/0312-create-account-allow-prefund.md
- Feature account CEcWg4qpTS3fzAXaZM2Si4XeKSpzEhX5ra6tjuwU26DB
Original post · Nick P
Feature gate update: FG 03 is live Create account with prefund (SIMD-0312) activates on mainnet at the start of epoch 410 (slot 86,014,112, around 00:40 UTC on Oct 15). This adds a new system program instruction, CreateAccountAllowPrefund, which can create an account at an address that already holds XNT. The existing CreateAccount instruction is unchanged, so nothing that works today behaves differently. This has been live on testnet since early September. Feature: CEcWg4qpTS3fzAXaZM2Si4XeKSpzEhX5ra6tjuwU26DB Activation tx: 3Z5R8aqHmDpsGoTdhCg8KyXpL2pewvAktaHSjtakCWr7o526WojqLVudn7Rgusufsk4ZwGaKtEhEb6AjSfm5BPag
Feature gates in this post
Create account with prefund (SIMD-0312)
New CreateAccountAllowPrefund instruction. CreateAccount is unchanged.
CEcW…26DBLiveepoch 410