Infraestructura

Account Filter (memcmp / dataSize)

Optional filter objects passed to getProgramAccounts that narrow results by comparing raw bytes in account data. A memcmp filter specifies a byte offset and an expected bytes value (base58 or base64 encoded), enabling field-level matching such as filtering all token accounts by a specific mint address; a dataSize filter restricts results to accounts whose data length equals an exact byte count. Combining both filters is the standard pattern for efficiently querying discriminated Anchor accounts or specific SPL token account sets.

IDaccount-filter

Lectura rápida

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

Optional filter objects passed to getProgramAccounts that narrow results by comparing raw bytes in account data. A memcmp filter specifies a byte offset and an expected bytes value (base58 or base64 encoded), enabling field-level matching such as filtering all token accounts by a specific mint address; a dataSize filter restricts results to accounts whose data length equals an exact byte count. Combining both filters is the standard pattern for efficiently querying discriminated Anchor accounts or specific SPL token account sets.

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 un bloque de construcción que conecta una definición aislada con el sistema mayor donde vive.

Contexto técnico

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

RPCs, validators, snapshots, indexación y plumbing de red.

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.

Account Filter (memcmp / dataSize) (account-filter)
Categoría: Infraestructura
Definición: Optional filter objects passed to getProgramAccounts that narrow results by comparing raw bytes in account data. A memcmp filter specifies a byte offset and an expected bytes value (base58 or base64 encoded), enabling field-level matching such as filtering all token accounts by a specific mint address; a dataSize filter restricts results to accounts whose data length equals an exact byte count. Combining both filters is the standard pattern for efficiently querying discriminated Anchor accounts or specific SPL token account sets.
Relacionados: getProgramAccounts (GPA), RPC Methods
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

getProgramAccounts (GPA)

An RPC method that scans all accounts owned by a given program and returns those matching optional memcmp (memory compare) and dataSize filters, making it the standard way to discover all state accounts for a protocol (e.g., all open order books, all user positions). GPA is resource-intensive because it performs a full account-store scan on the RPC node; many public endpoints rate-limit or disable it, which is why purpose-built indexers and services like Helius are used in production to serve GPA-equivalent queries at scale.

Rama

RPC Methods

The enumerated JSON-RPC endpoints exposed by Solana nodes, covering account queries (getAccountInfo, getMultipleAccounts, getProgramAccounts), block and transaction retrieval (getBlock, getTransaction), cluster metadata (getEpochInfo, getSlot, getVersion), and transaction submission (sendTransaction, simulateTransaction). Methods accept a Commitment parameter (processed, confirmed, finalized) to control the recency-vs-safety tradeoff of returned data.

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.

Infraestructura

getProgramAccounts (GPA)

An RPC method that scans all accounts owned by a given program and returns those matching optional memcmp (memory compare) and dataSize filters, making it the standard way to discover all state accounts for a protocol (e.g., all open order books, all user positions). GPA is resource-intensive because it performs a full account-store scan on the RPC node; many public endpoints rate-limit or disable it, which is why purpose-built indexers and services like Helius are used in production to serve GPA-equivalent queries at scale.

Infraestructura

RPC Methods

The enumerated JSON-RPC endpoints exposed by Solana nodes, covering account queries (getAccountInfo, getMultipleAccounts, getProgramAccounts), block and transaction retrieval (getBlock, getTransaction), cluster metadata (getEpochInfo, getSlot, getVersion), and transaction submission (sendTransaction, simulateTransaction). Methods accept a Commitment parameter (processed, confirmed, finalized) to control the recency-vs-safety tradeoff of returned data.

Infraestructura

accountSubscribe

A WebSocket subscription method that pushes a notification to the client every time the data or lamport balance of a specified account changes, delivering the updated AccountInfo payload at the configured commitment level. It is commonly used by UIs to reactively update token balances, NFT ownership, or program state without polling, and each subscription is referenced by a numeric subscription ID returned upon successful registration.

Infraestructura

RPC (Llamada a Procedimiento Remoto)

The JSON-RPC 2.0 protocol interface through which clients communicate with Solana nodes to query chain state, submit transactions, and subscribe to events. Solana exposes a rich set of HTTP and WebSocket endpoints (e.g., getAccountInfo, sendTransaction) that abstract direct peer-to-peer network participation, making RPC the primary integration point for wallets, dApps, and indexers.

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.

Infraestructuraget-program-accounts

getProgramAccounts (GPA)

An RPC method that scans all accounts owned by a given program and returns those matching optional memcmp (memory compare) and dataSize filters, making it the standard way to discover all state accounts for a protocol (e.g., all open order books, all user positions). GPA is resource-intensive because it performs a full account-store scan on the RPC node; many public endpoints rate-limit or disable it, which is why purpose-built indexers and services like Helius are used in production to serve GPA-equivalent queries at scale.

Infraestructurarpc-methods

RPC Methods

The enumerated JSON-RPC endpoints exposed by Solana nodes, covering account queries (getAccountInfo, getMultipleAccounts, getProgramAccounts), block and transaction retrieval (getBlock, getTransaction), cluster metadata (getEpochInfo, getSlot, getVersion), and transaction submission (sendTransaction, simulateTransaction). Methods accept a Commitment parameter (processed, confirmed, finalized) to control the recency-vs-safety tradeoff of returned data.

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.

Infraestructura

RPC (Llamada a Procedimiento Remoto)

The JSON-RPC 2.0 protocol interface through which clients communicate with Solana nodes to query chain state, submit transactions, and subscribe to events. Solana exposes a rich set of HTTP and WebSocket endpoints (e.g., getAccountInfo, sendTransaction) that abstract direct peer-to-peer network participation, making RPC the primary integration point for wallets, dApps, and indexers.

Infraestructura

Nodo RPC

A Solana full node that stores ledger state and serves JSON-RPC and WebSocket requests from clients without participating in consensus or voting. RPC nodes must replay every transaction to maintain an accurate account state database, and high-throughput deployments typically run dedicated RPC nodes with large SSDs, high RAM (256 GB+), and high-bandwidth network connections to handle concurrent client load without impacting validator performance.

Infraestructura

RPC Methods

The enumerated JSON-RPC endpoints exposed by Solana nodes, covering account queries (getAccountInfo, getMultipleAccounts, getProgramAccounts), block and transaction retrieval (getBlock, getTransaction), cluster metadata (getEpochInfo, getSlot, getVersion), and transaction submission (sendTransaction, simulateTransaction). Methods accept a Commitment parameter (processed, confirmed, finalized) to control the recency-vs-safety tradeoff of returned data.

Infraestructura

getAccountInfo

An RPC method that returns the complete on-chain state of a single account identified by its base-58 public key, including its lamport balance, owner program, executable flag, rent epoch, and raw data payload encoded as base64 or base58. It is the most fundamental read primitive in Solana development and is called at the specified commitment level, with the data field being null if the account does not exist.