Finality Gadget Test Harness
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Finality Gadget Test Harness provides comprehensive testing for the FFG (Casper Friendly Finality Gadget) finality mechanism in Proof-of-Stake networks, enabling developers, consensus client maintainers, and security auditors to verify that finality is correctly processed and enforced. It retrieves on-chain consensus client and beacon chain data via RPC and beacon node endpoints, processes FFG finality parameters and configuration, and analyzes checkpoint data including justified and finalized checkpoints. The tool validates validator attestation and voting history, checks epoch boundary processing, and verifies finality transition logic. It runs a suite of finality tests including FFG parameter validation, justified checkpoint verification, finalized checkpoint verification, attestation voting analysis, epoch boundary processing, and finality transition validation. The output includes a finality status (Finalized, Justified, or Pending), justified and finalized epoch numbers, a detailed check matrix showing each validation check's result, and actionable recommendations for resolving issues—such as checking attestation aggregation, verifying checkpoint validity, or reviewing epoch boundary logic. This enables consensus client developers and security auditors to verify that finality gadget logic is correctly implemented and that the chain is properly finalizing.
HOW TO USE
Connect your BGWallet to the target EVM chain. Provide the consensus client endpoint URL you wish to query. Provide FFG parameters as a JSON object containing currentEpoch, justifiedCheckpoint, finalizedCheckpoint, and attestations. Optionally supply a GitHub repository URL to pull finality gadget implementation details and test specifications for additional context. The tool queries the consensus client, processes the finality data, and runs a comprehensive finality gadget test suite. Review the finality status, justified and finalized epochs, check matrix, and recommendations. Use the results to verify that finality is correctly processed and that the finality gadget is operating as expected.
FINALITY GADGET TESTING AND FFG VALIDATION ENGINE
The real technical mechanism is the finality gadget testing and FFG validation engine that combines consensus client data analysis with FFG semantics. The tool first retrieves consensus client data including the current epoch, justified checkpoint, finalized checkpoint, and attestation history. It then validates the FFG state by checking that justified and finalized checkpoints are correctly formed and consistent with the attestation voting history. The engine verifies that the justified checkpoint has received sufficient attestations (supermajority of the validator set) and that the finalized checkpoint correctly follows from the justified checkpoint after the required number of epochs. The attestation voting analysis checks that attestations are correctly aggregated and that the voting patterns are consistent with the checkpoint state. The epoch boundary processing validates that epoch transitions correctly update the justifications and finalizations. The finality transition validation ensures that the finality gadget correctly handles edge cases such as epoch boundaries and checkpoint updates. This approach provides developers with a comprehensive, automated way to test finality gadget logic, catching issues that would otherwise only surface during live operations and ensuring that chain finality is correctly enforced.
WHAT IT CANNOT SEE
This tool cannot generate a complete finality gadget test without access to consensus client data or beacon node endpoints. It is limited by network connectivity and API rate limits, which may affect test results on congested networks. It cannot determine if the finality gadget correctly processes finality without executing the test logic—the tool provides test results based on available data, not guaranteed correctness. The detection relies on the completeness of API documentation and endpoint availability; incomplete or outdated documentation will produce incomplete or inaccurate results. Detection is based on pattern matching and may miss indirect or obfuscated test issues, such as finality logic hidden in libraries or via delegate calls. The tool cannot assess runtime behavior or performance implications of finality gadget testing, such as how finality processing performs under different network conditions or validator set sizes. It may produce false positives for data that appears similar to finality data but is used for other purposes. The tool does not execute the contract to validate finality, so it cannot confirm that the finality gadget would behave correctly on-chain. It cannot account for network-specific finality gadget implementation differences or future upgrades—different consensus clients may have different FFG implementations, parameterizations, or optimization strategies. Finality gadget mechanics may vary across networks and change over time as consensus protocols evolve.
PLEASE NOTE
This tool works exclusively with EVM-compatible chains that support beacon chain APIs and FFG finality. It requires active internet connectivity to access consensus client endpoints. Some consensus client endpoints may require authentication or API keys; ensure credentials are correctly provided. The tool is read-only and does not modify any chain state—it only produces test results. Finality gadget testing is critical to consensus security and chain reliability; always verify test results against actual consensus client behavior on testnet before relying on them for production operations. Different consensus clients may have different FFG implementations, parameterizations, and optimization strategies.