This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
Closed
Description
Problem
If a transaction references a system account that doesn't yet exist, the runtime creates one automatically. The "feature" introduces two problems:
- A transfer to a public key with a typo will succeed, effectively burning all tokens by accident.
- It's not available to arbitrary programs, which require a
space
parameter. Consequently, we seeCreateAccount
being used with an unusedfrom
key and zerolamports
, suggestingCreateAccount
is doing too much. It's anAllocate
and aTransfer
, when only anAllocate
is needed.
Proposed Solution
- Remove the automatic account creation feature.
- Add new instruction
Allocate
, which should be the same asCreateAccount
, but with nofrom
orlamports
parameters. Consider removingCreateAccount
.