Modelo de Programação

Realloc (Account Resize)

The process of resizing an on-chain account's data allocation after creation. Realloc can increase or decrease the data field size, but each instruction can increase by at most 10,240 bytes (10KB). The account owner program must sign the realloc, and if the account grows, additional lamports must be provided to maintain rent exemption. In Anchor, the realloc constraint on #[account(mut, realloc = new_size, realloc::payer = payer, realloc::zero = false)] handles this automatically.

IDrealloc

Leitura rápida

Comece pela explicação mais curta e útil antes de aprofundar.

The process of resizing an on-chain account's data allocation after creation. Realloc can increase or decrease the data field size, but each instruction can increase by at most 10,240 bytes (10KB). The account owner program must sign the realloc, and if the account grows, additional lamports must be provided to maintain rent exemption. In Anchor, the realloc constraint on #[account(mut, realloc = new_size, realloc::payer = payer, realloc::zero = false)] handles this automatically.

Modelo mental

Use primeiro a analogia curta para raciocinar melhor sobre o termo quando ele aparecer em código, docs ou prompts.

Pense nisso como uma das peças centrais que seu programa lê, escreve ou invoca durante a execução.

Contexto técnico

Coloque o termo dentro da camada de Solana em que ele vive para raciocinar melhor sobre ele.

Accounts, instruções, PDAs, transações e fluxo de execução.

Por que builders ligam para isso

Transforme o termo de vocabulário em algo operacional para produto e engenharia.

Este termo destrava conceitos adjacentes rapidamente, então funciona melhor quando você o trata como um ponto de conexão, não como definição isolada.

Handoff para IA

Handoff para IA

Use este bloco compacto quando quiser dar contexto aterrado para um agente ou assistente sem despejar a página inteira.

Realloc (Account Resize) (realloc)
Categoria: Modelo de Programação
Definição: The process of resizing an on-chain account's data allocation after creation. Realloc can increase or decrease the data field size, but each instruction can increase by at most 10,240 bytes (10KB). The account owner program must sign the realloc, and if the account grows, additional lamports must be provided to maintain rent exemption. In Anchor, the realloc constraint on #[account(mut, realloc = new_size, realloc::payer = payer, realloc::zero = false)] handles this automatically.
Relacionados: Conta, Isenção de Aluguel, Account Data
Glossary Copilot

Faça perguntas de Solana com contexto aterrado sem sair do glossário.

Use contexto do glossário, relações entre termos, modelos mentais e builder paths para receber respostas estruturadas em vez de output genérico.

Explicar este código

Opcional: cole código Anchor, Solana ou Rust para o Copilot mapear primitivas de volta para termos do glossário.

Faça uma pergunta aterrada no glossário

Faça uma pergunta aterrada no glossário

O Copilot vai responder usando o termo atual, conceitos relacionados, modelos mentais e o grafo ao redor do glossário.

Grafo conceitual

Veja o termo como parte de uma rede, não como uma definição sem saída.

Esses ramos mostram quais conceitos esse termo toca diretamente e o que existe uma camada além deles.

Ramo

Conta

The fundamental data storage unit on Solana. Every piece of state is stored in an account identified by a 32-byte public key. Accounts hold a lamport balance, an owner program, a data byte array (up to 10MB), and an executable flag. Only the owning program can modify an account's data, but anyone can credit lamports to it.

Ramo

Isenção de Aluguel

The state where an account holds enough lamports to cover two years of rent, making it effectively permanent. The minimum balance is approximately 0.00089088 SOL per byte of data. Since Solana requires all new accounts to be rent-exempt, this is the minimum funding required when creating accounts.

Ramo

Account Data

The byte array stored in an account that holds program-specific state. Data is typically serialized using Borsh and must be explicitly allocated at account creation. The maximum data size is 10MB. Programs are responsible for defining and managing their own data layout, including discriminators for type identification.

Próximos conceitos para explorar

Continue a cadeia de aprendizado em vez de parar em uma única definição.

Estes são os próximos conceitos que valem abrir se você quiser que este termo faça mais sentido dentro de um workflow real de Solana.

Modelo de Programação

Conta

The fundamental data storage unit on Solana. Every piece of state is stored in an account identified by a 32-byte public key. Accounts hold a lamport balance, an owner program, a data byte array (up to 10MB), and an executable flag. Only the owning program can modify an account's data, but anyone can credit lamports to it.

Modelo de Programação

Isenção de Aluguel

The state where an account holds enough lamports to cover two years of rent, making it effectively permanent. The minimum balance is approximately 0.00089088 SOL per byte of data. Since Solana requires all new accounts to be rent-exempt, this is the minimum funding required when creating accounts.

Modelo de Programação

Account Data

The byte array stored in an account that holds program-specific state. Data is typically serialized using Borsh and must be explicitly allocated at account creation. The maximum data size is 10MB. Programs are responsible for defining and managing their own data layout, including discriminators for type identification.

Modelo de Programação

Return Data (set_return_data)

A mechanism for programs to return data to the caller after CPI, introduced in v1.10. Programs call `set_return_data(data)` (max 1,024 bytes), and the caller retrieves it with `get_return_data()`. This enables CPI callers to receive structured results without parsing logs or modifying shared accounts.

Comumente confundido com

Termos próximos em vocabulário, sigla ou vizinhança conceitual.

Essas entradas são fáceis de misturar quando você lê rápido, faz prompting em um LLM ou está entrando em uma nova camada de Solana.

Modelo de Programaçãoaccount-data

Account Data

The byte array stored in an account that holds program-specific state. Data is typically serialized using Borsh and must be explicitly allocated at account creation. The maximum data size is 10MB. Programs are responsible for defining and managing their own data layout, including discriminators for type identification.

Modelo de Programaçãobuffer-account

Buffer Account

A temporary account used during Solana program deployment to hold the program's ELF binary before it is written to the program data account. The deployer creates a buffer account, uploads the compiled SBF binary in chunks via the Upgradeable BPF Loader's Write instruction, and then issues a Deploy or Upgrade instruction that copies the buffer contents to the final program data account. Buffer accounts can be closed after deployment to reclaim rent.

Modelo de Programaçãoclose-account

Close Account

The process of reclaiming an account's lamports and marking it for deletion. To close an account: transfer all lamports to a recipient, zero out the data, and (in Anchor) set the discriminator to a closed sentinel. The runtime garbage-collects zero-lamport accounts. Failing to zero data enables revival attacks.

Termos relacionados

Siga os conceitos que realmente dão contexto a este termo.

Entradas de glossário só ficam úteis quando estão conectadas. Esses links são o caminho mais curto para ideias adjacentes.

Modelo de Programaçãoaccount

Conta

The fundamental data storage unit on Solana. Every piece of state is stored in an account identified by a 32-byte public key. Accounts hold a lamport balance, an owner program, a data byte array (up to 10MB), and an executable flag. Only the owning program can modify an account's data, but anyone can credit lamports to it.

Modelo de Programaçãorent-exemption

Isenção de Aluguel

The state where an account holds enough lamports to cover two years of rent, making it effectively permanent. The minimum balance is approximately 0.00089088 SOL per byte of data. Since Solana requires all new accounts to be rent-exempt, this is the minimum funding required when creating accounts.

Modelo de Programaçãoaccount-data

Account Data

The byte array stored in an account that holds program-specific state. Data is typically serialized using Borsh and must be explicitly allocated at account creation. The maximum data size is 10MB. Programs are responsible for defining and managing their own data layout, including discriminators for type identification.

Mais na categoria

Permaneça na mesma camada e continue construindo contexto.

Essas entradas vivem ao lado do termo atual e ajudam a página a parecer parte de um grafo maior, não um beco sem saída.

Modelo de Programação

Conta

The fundamental data storage unit on Solana. Every piece of state is stored in an account identified by a 32-byte public key. Accounts hold a lamport balance, an owner program, a data byte array (up to 10MB), and an executable flag. Only the owning program can modify an account's data, but anyone can credit lamports to it.

Modelo de Programação

Programa

Executable code deployed on-chain, equivalent to a smart contract on other blockchains. Programs are stateless—they store no data themselves but read/write data in separate accounts they own. Programs are compiled to SBF bytecode and loaded via the BPF Loader. Every program has a unique Program ID (its account's public key).

Modelo de Programação

Instrução

A single operation within a transaction that invokes a program. An instruction specifies: (1) the program ID to call, (2) an array of account metas (pubkey, is_signer, is_writable), and (3) an opaque data byte array. Programs decode the instruction data to determine which operation to perform.

Modelo de Programação

Transação

An atomic unit of execution containing one or more instructions, a recent blockhash, and one or more signatures. All instructions in a transaction execute sequentially and atomically—if any instruction fails, the entire transaction reverts. Transactions have a 1,232-byte size limit (matching IPv6 MTU) and a default 200,000 CU budget.