Fork Choice Rule Simulator
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
Fork Choice Rule Simulator provides comprehensive simulation of consensus fork choice rules in Proof-of-Stake networks, enabling developers, consensus client maintainers, and protocol researchers to understand and analyze chain head selection. It retrieves on-chain consensus client and beacon chain data via RPC and beacon node endpoints, processes fork choice rule parameters and configuration, and analyzes chain head and block tree data. The tool simulates the LMD GHOST (Latest Message Driven Greedy Heaviest Observed Sub-Tree) fork choice rule, incorporating FFG finality information and proposer boost. It evaluates validator attestations and finality information to determine the canonical chain head. The output includes a simulation status (Complete, Partial, or Failed), selected head block identifier, LMD GHOST score, a detailed chain matrix showing each chain candidate's slot, weight, score, attestation count, and selection status, and actionable recommendations for understanding fork choice dynamics—such as interpreting chain weights, analyzing attestation distributions, or adjusting simulation parameters. This enables developers and researchers to simulate and understand fork choice behavior, test different scenarios, and validate consensus client implementations.
HOW TO USE
Connect your BGWallet to the target EVM chain. Provide the consensus client endpoint URL you wish to query. Provide fork choice parameters as a JSON object containing slot, block tree, attestations, and finality checkpoint data. Optionally supply a GitHub repository URL to pull fork choice implementation details and simulation specifications for additional context. The tool queries the consensus client, processes the fork choice data, and runs a comprehensive simulation. Review the simulation status, selected head, LMD GHOST score, chain matrix, and recommendations. Use the results to understand fork choice dynamics, validate consensus client behavior, and test different scenarios.
FORK CHOICE RULE SIMULATION AND ANALYSIS ENGINE
The real technical mechanism is the fork choice rule simulation and analysis engine that combines consensus client data with LMD GHOST semantics. The tool first retrieves consensus client data including the block tree, validator attestations, and finality checkpoints. It then simulates the LMD GHOST fork choice rule by traversing the block tree from the genesis block, applying attestation weights to each branch, and selecting the heaviest chain. The engine incorporates FFG finality by checking which blocks are finalized and justified, and applies proposer boost to favor blocks proposed by the current slot's proposer. The chain matrix provides a detailed view of each candidate chain's weight, score, and attestation support, enabling users to understand why a particular chain was selected. The LMD GHOST score reflects the relative weight of the selected chain compared to other candidates. The simulation also accounts for network-specific parameters such as the number of validators, attestation aggregation rules, and finality thresholds. This approach provides developers and researchers with a comprehensive, automated way to simulate and analyze fork choice rules, enabling better understanding of consensus dynamics and validation of client implementations.
WHAT IT CANNOT SEE
This tool cannot generate a complete fork choice rule simulation without access to consensus client data or beacon node endpoints. It is limited by network connectivity and API rate limits, which may affect simulation results on congested networks. It cannot determine if the fork choice simulation correctly models actual chain head selection without executing the simulation logic—the tool provides simulation results based on available data, not guaranteed outcomes. 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 simulation issues, such as simulation logic hidden in libraries or via delegate calls. The tool cannot assess runtime behavior or performance implications of fork choice simulation, such as how simulation performance varies with different network conditions or block tree sizes. It may produce false positives for data that appears similar to fork choice data but is used for other purposes. The tool does not execute the contract to validate simulation, so it cannot confirm that the simulated fork choice would match actual network behavior. It cannot account for network-specific fork choice implementation differences or future upgrades—different consensus clients may have different fork choice implementations, parameterizations, or optimization strategies. Fork choice rule 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 Proof-of-Stake consensus. 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 simulation results. Fork choice rule simulation is critical to understanding consensus dynamics and validating client implementations; always verify simulation results against actual consensus client behavior on testnet before relying on them for production operations. Different consensus clients may have different fork choice implementations, parameterizations, and optimization strategies.