Ferramentas 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

Leitura rápida

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

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

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

Pense nisso como uma ferramenta ou abstração que reduz atrito no workflow de desenvolvimento em Solana.

Contexto técnico

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

Anchor, validators locais, explorers, SDKs e fluxos de teste.

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.

Invariant Testing (invariant-testing)
Categoria: Ferramentas de Dev
Definição: 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

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

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

Ramo

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.

Ramo

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.

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.

Ferramentas 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.'

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

Segurança

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.

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

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.

Ferramentas de Devtesting

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

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.

Ferramentas 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.'

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

Segurançafuzzing

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.

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.

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

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

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

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