Herramientas de Dev

Invariant Testing

A property-based testing approach where developers define invariants (properties that must always hold true) and a fuzzer generates random sequences of function calls attempting to violate them. Unlike unit tests that check specific scenarios, invariant tests explore the state space stochastically. Tools like Foundry invariant testing, Echidna, and Medusa support this approach.

IDinvariant-testingAliasProperty-Based Testing

Lectura rápida

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

A property-based testing approach where developers define invariants (properties that must always hold true) and a fuzzer generates random sequences of function calls attempting to violate them. Unlike unit tests that check specific scenarios, invariant tests explore the state space stochastically. Tools like Foundry invariant testing, Echidna, and Medusa support this approach.

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.

Invariant Testing (invariant-testing)
Categoría: Herramientas de Dev
Definición: A property-based testing approach where developers define invariants (properties that must always hold true) and a fuzzer generates random sequences of function calls attempting to violate them. Unlike unit tests that check specific scenarios, invariant tests explore the state space stochastically. Tools like Foundry invariant testing, Echidna, and Medusa support this approach.
Aliases: Property-Based Testing
Relacionados: Formal Verification, Symbolic Execution, Fuzzing (Trident)
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

Formal Verification

The use of mathematical proofs to verify that a smart contract's behavior matches its specification for all possible inputs, providing stronger guarantees than testing alone. Techniques include model checking, deductive verification, SAT/SMT solving, and interactive theorem proving. Tools like Halmos (a16z), Kontrol, and Certora Prover enable proving properties like 'total supply never exceeds max.'

Rama

Symbolic Execution

A program analysis technique that explores execution paths using symbolic variables instead of concrete inputs, building mathematical constraints for each branch to identify inputs that trigger specific behaviors. More systematic than fuzzing but computationally expensive due to path explosion. Tools like Halmos, Manticore, and Mythril apply symbolic execution to EVM bytecode.

Rama

Fuzzing (Trident)

An automated testing technique that generates pseudo-random, mutation-based, or coverage-guided instruction sequences and account inputs to discover crashes, panics, arithmetic errors, and invariant violations in Solana programs without requiring manually written test cases. Trident is the primary Solana-specific fuzzing framework, built on top of the Honggfuzz engine and the Anchor IDL, allowing developers to define instruction sequences and account state fuzzing harnesses that run thousands of iterations per second in a simulated runtime. Fuzzing complements manual audits by exhaustively exploring edge cases in instruction orderings and boundary values that reviewers may miss.

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

Formal Verification

The use of mathematical proofs to verify that a smart contract's behavior matches its specification for all possible inputs, providing stronger guarantees than testing alone. Techniques include model checking, deductive verification, SAT/SMT solving, and interactive theorem proving. Tools like Halmos (a16z), Kontrol, and Certora Prover enable proving properties like 'total supply never exceeds max.'

Herramientas de Dev

Symbolic Execution

A program analysis technique that explores execution paths using symbolic variables instead of concrete inputs, building mathematical constraints for each branch to identify inputs that trigger specific behaviors. More systematic than fuzzing but computationally expensive due to path explosion. Tools like Halmos, Manticore, and Mythril apply symbolic execution to EVM bytecode.

Seguridad

Fuzzing (Trident)

An automated testing technique that generates pseudo-random, mutation-based, or coverage-guided instruction sequences and account inputs to discover crashes, panics, arithmetic errors, and invariant violations in Solana programs without requiring manually written test cases. Trident is the primary Solana-specific fuzzing framework, built on top of the Honggfuzz engine and the Anchor IDL, allowing developers to define instruction sequences and account state fuzzing harnesses that run thousands of iterations per second in a simulated runtime. Fuzzing complements manual audits by exhaustively exploring edge cases in instruction orderings and boundary values that reviewers may miss.

Herramientas de Dev

Kinobi

A superset of the Solana IDL specification that enables automatic generation of program clients with full serialization and deserialization of instructions, accounts, and types. Kinobi reduces runtime errors from misaligned client-program logic by generating strongly-typed SDKs. The underlying libraries have been reorganized under the Codama project.

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 Devtesting

Pruebas (Programas Solana)

The process of validating Solana programs through unit tests, integration tests, and fuzz testing. Common approaches: Rust tests with solana-program-test or LiteSVM (fast, in-process), TypeScript tests with Bankrun or solana-test-validator (end-to-end), and fuzz testing with Trident. Best practice is testing both happy paths and attack vectors (missing signers, wrong owners).

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 Devformal-verification

Formal Verification

The use of mathematical proofs to verify that a smart contract's behavior matches its specification for all possible inputs, providing stronger guarantees than testing alone. Techniques include model checking, deductive verification, SAT/SMT solving, and interactive theorem proving. Tools like Halmos (a16z), Kontrol, and Certora Prover enable proving properties like 'total supply never exceeds max.'

Herramientas de Devsymbolic-execution

Symbolic Execution

A program analysis technique that explores execution paths using symbolic variables instead of concrete inputs, building mathematical constraints for each branch to identify inputs that trigger specific behaviors. More systematic than fuzzing but computationally expensive due to path explosion. Tools like Halmos, Manticore, and Mythril apply symbolic execution to EVM bytecode.

Seguridadfuzzing

Fuzzing (Trident)

An automated testing technique that generates pseudo-random, mutation-based, or coverage-guided instruction sequences and account inputs to discover crashes, panics, arithmetic errors, and invariant violations in Solana programs without requiring manually written test cases. Trident is the primary Solana-specific fuzzing framework, built on top of the Honggfuzz engine and the Anchor IDL, allowing developers to define instruction sequences and account state fuzzing harnesses that run thousands of iterations per second in a simulated runtime. Fuzzing complements manual audits by exhaustively exploring edge cases in instruction orderings and boundary values that reviewers may miss.

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).