I am trying to store 100KB+ data on a Solana Account. In Solana documents I've read that
"The current maximum size of an account's data is 10 megabytes."
Source: https://docs.solana.com/developing/programming-model/accounts
But when I try to create a space more than 10KB (space = 10240) it gives me error during init tests:
"Error processing Instruction 0: Failed to reallocate account data"
Here is an example code:
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(init, payer = user, space=100000)]
pub example_account: Account<'info, ExampleAccount>,
#[account(mut)]
pub user: Signer<'info>,
pub system_program: Program<'info, System>
}
#[account]
pub struct ExampleAccount {
pub data: String,
}
I need to store 100KB data on that account. How can I do that?