what is the maximum size of a program that can be rented on solana. And can I rent more when needed ?
1 Answer
Solana accounts are currently limited to 10MB of storage. Generally, a compiled program binary should not come anywhere near this limit. For example, the [Openbook's executable binary is just under 469Kb. If an account your program uses is running out of space, you can use the realloc
command to give it a larger memory allocation.
-
A couple more links for those curious about the source code -- here's where it's defined: docs.rs/solana-program/latest/solana_program/system_instruction/… and here's where it's imported/enforced at runtime: docs.rs/solana-runtime/latest/src/solana_runtime/… Commented Dec 9, 2022 at 22:31