Herramientas de Dev

UncheckedAccount (Anchor)

An Anchor account type (UncheckedAccount<'info>) that performs no automatic validation — no owner check, no discriminator check, no deserialization. It is an alias for AccountInfo and should only be used when the program manually validates the account or when the account belongs to an external program. Requires a /// CHECK: doc comment explaining why it is safe. Misuse is a common audit finding.

IDunchecked-accountAliasAccountInfo wrapper

Lectura rápida

Empieza por la explicación más corta y útil antes de profundizar.

An Anchor account type (UncheckedAccount<'info>) that performs no automatic validation — no owner check, no discriminator check, no deserialization. It is an alias for AccountInfo and should only be used when the program manually validates the account or when the account belongs to an external program. Requires a /// CHECK: doc comment explaining why it is safe. Misuse is a common audit finding.

Modelo mental

Usa primero la analogía corta para razonar mejor sobre el término cuando aparezca en código, docs o prompts.

Piensa en esto como una herramienta o abstracción que reduce fricción en el workflow de desarrollo en Solana.

Contexto técnico

Ubica el término dentro de la capa de Solana en la que vive para razonar mejor sobre él.

Anchor, validators locales, explorers, SDKs y flujos de testing.

Por qué le importa a un builder

Convierte el término de vocabulario en algo operacional para producto e ingeniería.

Este término desbloquea conceptos adyacentes rápido, así que funciona mejor cuando lo tratas como un punto de conexión y no como una definición aislada.

Handoff para IA

Handoff para IA

Usa este bloque compacto cuando quieras dar contexto sólido a un agente o asistente sin volcar toda la página.

UncheckedAccount (Anchor) (unchecked-account)
Categoría: Herramientas de Dev
Definición: An Anchor account type (UncheckedAccount<'info>) that performs no automatic validation — no owner check, no discriminator check, no deserialization. It is an alias for AccountInfo and should only be used when the program manually validates the account or when the account belongs to an external program. Requires a /// CHECK: doc comment explaining why it is safe. Misuse is a common audit finding.
Aliases: AccountInfo wrapper
Relacionados: #[derive(Accounts)] (Anchor), Missing Owner Check, AccountInfo
Glossary Copilot

Haz preguntas de Solana con contexto aterrizado sin salir del glosario.

Usa contexto del glosario, relaciones entre términos, modelos mentales y builder paths para recibir respuestas estructuradas en vez de output genérico.

Abrir workspace completa del Copilot
Explicar este código

Opcional: pega código Anchor, Solana o Rust para que el Copilot mapee primitivas de vuelta al glosario.

Haz una pregunta aterrizada en el glosario

Haz una pregunta aterrizada en el glosario

El Copilot responderá usando el término actual, conceptos relacionados, modelos mentales y el grafo alrededor del glosario.

Grafo conceptual

Ve el término como parte de una red, no como una definición aislada.

Estas ramas muestran qué conceptos toca este término directamente y qué existe una capa más allá de ellos.

Rama

#[derive(Accounts)] (Anchor)

The Anchor macro that defines the accounts struct for an instruction. Each field specifies an account with validation constraints. Account types include: `Account<'info, T>` (deserialized), `Signer<'info>` (must sign), `Program<'info, T>` (program reference), `SystemAccount<'info>`, and `UncheckedAccount<'info>` (no validation, use carefully).

Rama

Missing Owner Check

A vulnerability where a program deserializes and trusts account data without first confirming that the account is owned by the expected program, allowing an attacker to substitute a maliciously crafted account owned by a different program whose byte layout happens to satisfy the deserialization. On Solana, every account stores a 32-byte owner field set to the program that created it; native programs must assert account.owner == &expected_program_id, while Anchor's Account<'info, T> wrapper performs this check automatically. Failure to validate ownership can lead to complete auth bypass if an attacker can construct a fake account whose data parses into a struct with elevated privileges.

Rama

AccountInfo

The runtime struct passed to programs for each account in an instruction: `AccountInfo { key, is_signer, is_writable, lamports, data, owner, executable, rent_epoch }`. In native programs, the entrypoint receives a slice of AccountInfos. Anchor abstracts this with typed account structs but AccountInfo is available via `to_account_info()`.

Siguientes conceptos para explorar

Mantén la cadena de aprendizaje en movimiento en lugar de parar en una sola definición.

Estos son los siguientes conceptos que vale la pena abrir si quieres que este término tenga más sentido dentro de un workflow real de Solana.

Herramientas de Dev

#[derive(Accounts)] (Anchor)

The Anchor macro that defines the accounts struct for an instruction. Each field specifies an account with validation constraints. Account types include: `Account<'info, T>` (deserialized), `Signer<'info>` (must sign), `Program<'info, T>` (program reference), `SystemAccount<'info>`, and `UncheckedAccount<'info>` (no validation, use carefully).

Seguridad

Missing Owner Check

A vulnerability where a program deserializes and trusts account data without first confirming that the account is owned by the expected program, allowing an attacker to substitute a maliciously crafted account owned by a different program whose byte layout happens to satisfy the deserialization. On Solana, every account stores a 32-byte owner field set to the program that created it; native programs must assert account.owner == &expected_program_id, while Anchor's Account<'info, T> wrapper performs this check automatically. Failure to validate ownership can lead to complete auth bypass if an attacker can construct a fake account whose data parses into a struct with elevated privileges.

Modelo de Programación

AccountInfo

The runtime struct passed to programs for each account in an instruction: `AccountInfo { key, is_signer, is_writable, lamports, data, owner, executable, rent_epoch }`. In native programs, the entrypoint receives a slice of AccountInfos. Anchor abstracts this with typed account structs but AccountInfo is available via `to_account_info()`.

Herramientas de Dev

Web3.js v2 (@solana/kit)

The next-generation Solana TypeScript SDK (@solana/kit, formerly @solana/web3.js v2) featuring a modular, functional API. Unlike v1's monolithic classes, v2 uses composable functions and tree-shaking for smaller bundles. Key changes: pipe-based transaction building, codec-based serialization, and native support for versioned transactions. Significantly smaller bundle size than v1.

Comúnmente confundido con

Términos cercanos en vocabulario, acrónimo o vecindad conceptual.

Estas entradas son fáciles de mezclar cuando lees rápido, haces prompting a un LLM o estás entrando en una nueva capa de Solana.

Herramientas de Devanchor-account-macro

#[account] Macro (Anchor)

The Anchor macro applied to structs to define on-chain account data layouts. `#[account]` auto-derives Borsh serialization, adds an 8-byte discriminator prefix (SHA-256 of 'account:<Name>'), and implements space calculation. Optional attributes: `#[account(zero_copy)]` for zero-copy deserialization of large accounts.

Herramientas de Devanchor-init

anchor init / anchor build / anchor test

Anchor CLI commands for project lifecycle. `anchor init <name>` scaffolds a new project (program, tests, Anchor.toml). `anchor build` compiles to SBF and generates the IDL. `anchor test` builds, starts a local validator, deploys, and runs Mocha/Jest tests. `anchor deploy` deploys to the configured cluster. `anchor verify` checks deployed bytecode.

Herramientas de Devanchor-v031

Anchor v0.31

A major release (March 2025) of the Anchor framework introducing custom discriminators (overriding the default 8-byte discriminator to save transaction space), LazyAccount for on-demand deserialization to reduce compute costs, and stack memory optimizations for init constraints. Positioned as a major milestone on the roadmap toward v1.0.

AliasAnchor 0.31.0
Términos relacionados

Sigue los conceptos que realmente le dan contexto a este término.

Las entradas del glosario se vuelven útiles cuando están conectadas. Estos enlaces son el camino más corto hacia ideas adyacentes.

Herramientas de Devanchor-derive-accounts

#[derive(Accounts)] (Anchor)

The Anchor macro that defines the accounts struct for an instruction. Each field specifies an account with validation constraints. Account types include: `Account<'info, T>` (deserialized), `Signer<'info>` (must sign), `Program<'info, T>` (program reference), `SystemAccount<'info>`, and `UncheckedAccount<'info>` (no validation, use carefully).

Seguridadmissing-owner-check

Missing Owner Check

A vulnerability where a program deserializes and trusts account data without first confirming that the account is owned by the expected program, allowing an attacker to substitute a maliciously crafted account owned by a different program whose byte layout happens to satisfy the deserialization. On Solana, every account stores a 32-byte owner field set to the program that created it; native programs must assert account.owner == &expected_program_id, while Anchor's Account<'info, T> wrapper performs this check automatically. Failure to validate ownership can lead to complete auth bypass if an attacker can construct a fake account whose data parses into a struct with elevated privileges.

Modelo de Programaciónaccount-info

AccountInfo

The runtime struct passed to programs for each account in an instruction: `AccountInfo { key, is_signer, is_writable, lamports, data, owner, executable, rent_epoch }`. In native programs, the entrypoint receives a slice of AccountInfos. Anchor abstracts this with typed account structs but AccountInfo is available via `to_account_info()`.

Más en la categoría

Quédate en la misma capa y sigue construyendo contexto.

Estas entradas viven junto al término actual y ayudan a que la página se sienta parte de un grafo de conocimiento más amplio en lugar de un callejón sin salida.

Herramientas de Dev

Framework Anchor

The most popular framework for building Solana programs in Rust. Anchor provides macros (#[program], #[account], #[derive(Accounts)]) that auto-generate boilerplate for account validation, serialization, discriminators, and error handling. It includes a CLI (anchor init/build/test/deploy), IDL generation, and TypeScript client generation. Reduces program code by ~80% compared to native development.

Herramientas de Dev

#[account] Macro (Anchor)

The Anchor macro applied to structs to define on-chain account data layouts. `#[account]` auto-derives Borsh serialization, adds an 8-byte discriminator prefix (SHA-256 of 'account:<Name>'), and implements space calculation. Optional attributes: `#[account(zero_copy)]` for zero-copy deserialization of large accounts.

Herramientas de Dev

#[derive(Accounts)] (Anchor)

The Anchor macro that defines the accounts struct for an instruction. Each field specifies an account with validation constraints. Account types include: `Account<'info, T>` (deserialized), `Signer<'info>` (must sign), `Program<'info, T>` (program reference), `SystemAccount<'info>`, and `UncheckedAccount<'info>` (no validation, use carefully).

Herramientas de Dev

Anchor Constraints

Declarative validation rules on Anchor account fields. Key constraints: `#[account(mut)]` (writable), `#[account(init, payer=x, space=n)]` (create), `#[account(seeds=[...], bump)]` (PDA validation), `#[account(has_one=field)]` (field equality), `#[account(constraint = expr)]` (custom boolean), `#[account(close=target)]` (close and reclaim rent).