Formal modeling and verification of GRANDPA finalization safety in polkadot Authors: Muhammad Rashid, Nazir Ahmad Zafar, Lal khan, Mohammad Zubair Khan, Abdulrahman Alahmadi Published: 2026 ABSTRACT AbstractPolkadot enhances its security and reliability through the GRANDPA(GHOST-based Recursive Ancestor Deriving Prefix Agreement) finalization protocol, which provides deterministic and irreversible block finalization via structured validator voting rounds. Finality is a fundamental component of consensus, as any failure in this process can compromise the integrity and operational continuity of the entire blockchain. Ensuring the safety and correctness of GRANDPA finalization is therefore crucial to prevent critical failures and maintain network trust. This work presents a formal verification study of the GRANDPA finalization mechanism using model checking techniques. The protocol is first analyzed in detail and represented as structured algorithms encompassing authority updates, Pre-Vote, Pre-Commit, vote aggregation, and finalization phases. A comprehensive Promela model is developed to capture the complete behavior of validators and the interactions across voting phases. Key safety properties, including no conflicting finalization and finality irreversibility, are formalized using Linear Temporal Logic (LTL) and systematically verified using the SPIN model checker. During verification, multiple performance and scalability metrics are analyzed, including total states visited, transitions explored, verification time, memory usage, search depth, and property-specific verification complexity. The analysis identifies properties that significantly influence state-space growth, providing insight into the structural complexity and computational demands of the protocol. This study demonstrates the effectiveness of formal model checking for evaluating blockchain consensus protocols and establishes a foundation for future verification efforts, including liveness properties, extended adversarial scenarios, and verification of more complex consensus configurations within the Polkadot ecosystem.Keywords: Blockchain, Polkadot, GRANDPA, Model checking, SPINSubject terms: Engineering, Mathematics and computing Introduction The accelerating expansion of cryptocurrencies has generated sustained interest among both practitioners and researchers. This growth is primarily driven by blockchain technology, which provides decentralized, tamper resistant, and transparent digital infrastructures1. First introduced by Satoshi Nakamoto in 20082, blockchain established the cryptographic and mathematical foundations that enabled the Bitcoin system3. Since its inception, blockchain has progressed far beyond its initial use in digital currency and has been adopted across diverse sectors, including supply chain protection4, identity management frameworks5, healthcare information systems6, and electronic voting mechanisms7. Although blockchain technology supports a broad spectrum of applications, one of its most influential contributions remains the strengthening of financial transparency through cryptocurrencies. Well known platforms such as Bitcoin8, Ethereum9, Ripple10, and Litecoin11 illustrate the practical realization of blockchain based systems and highlight the operational viability of decentralized financial infrastructures. Transaction between two entities can be visualized in Fig. 1. Blockchain illustration. Polkadot represents a next generation multi chain framework designed to provide unified security across multiple interconnected blockchains. Introduced by Gavin Wood in 201612, Polkadot proposes a central relay chain responsible for coordinating a set of heterogeneous and autonomous blockchains referred to as parachains. The relay chain enforces shared security guarantees while enabling interoperable and trustless communication among these parachains13. Each parachain may be optimized for specialized use cases such as decentralized finance, digital identity, supply chain tracking, or Internet of Things applications14, while inheriting the overall security assurances of the network15. This composable architecture enhances scalability, flexibility, and cross chain communication efficiency. Consequently, Polkadot is increasingly regarded as a foundational infrastructure for scalable decentralized ecosystems16. To sustain both network liveness and secure finality, Polkadot employs two complementary consensus components: BABE12 for block production and GRANDPA17 for block finalization. Within this architectural design, GRANDPA plays a critical role in ensuring the safe and irreversible finalization of blocks18. The protocol organizes consensus into iterative voting rounds in which validators exchange prevote and precommit messages to determine which blocks should be finalized. Through this structured voting process, the system guarantees agreement, consistency, and protection against divergent chain histories17. Rooted in Byzantine fault tolerant principles and adapted to Polkadot’s heterogeneous multi chain environment12, GRANDPA achieves deterministic finality by repeatedly executing coordinated voting rounds. Validators independently issue votes, and once a supermajority threshold is satisfied, the corresponding blocks are finalized and propagated throughout the network19. When conflicting chains emerge, GRANDPA resolves forks by selecting the highest block supported by a supermajority, thereby establishing a single canonical chain and preserving global consistency20. Ensuring the safety of this finalization mechanism is essential, as incorrect or inconsistent finality decisions could compromise the integrity of the entire ecosystem. Polkadot has grown substantially, with approximately 800 million USD currently staked within its network. The magnitude of economic value secured by the protocol highlights the importance of strong correctness guarantees and rigorous safety validation. Safeguarding participant assets requires more than empirical testing or simulation; it necessitates mathematically grounded assurance techniques capable of detecting subtle logical errors prior to deployment. Formal verification provides such guarantees by enabling systematic validation of protocol behavior and demonstrating the absence of fundamental design flaws. In particular, formal methods are well suited to verifying safety properties, such as the impossibility of conflicting finalizations or irreversible state violations, which are central to maintaining trust in consensus operations. By applying formal reasoning to the blockchain state machine, inconsistencies can be identified and eliminated, thereby reinforcing long term network reliability. Existing research on Polkadot has largely emphasized architectural exploration and empirical analysis rather than rigorous formal safety validation. For instance,21 examined message exchange mechanisms to enhance interoperability between components. While valuable for testing improvements, that work did not provide formal correctness proofs and primarily focused on application level interactions. Similarly,15 offered a descriptive assessment of Polkadot’s design and scalability features, concentrating on structural and communication aspects without performing formal safety verification. In addition,13 presented a detailed account of the protocol’s cryptographic and architectural foundations. Although theoretically informative, it did not extend to exhaustive validation or mathematically rigorous proof of consensus safety. Collectively, these contributions reveal a significant research gap: the lack of comprehensive formal safety verification applied directly to Polkadot’s GRANDPA finalization protocol. In this work, we address this gap by conducting a formal safety verification of the GRANDPA finalization mechanism. The essential operations of GRANDPA, including prevote and precommit voting phases and supermajority driven block finalization, are formally modeled using the Promela specification language. Core safety properties are identified and expressed as Linear Temporal Logic LTL formulas to precisely capture correctness requirements such as finality irreversibility and consistency across voting rounds. The formal model and corresponding specifications are verified using the SPIN model checker, enabling exhaustive exploration of all reachable execution paths. Through model checking, we systematically evaluate whether conflicting finalizations, safety violations, or inconsistent state transitions can occur under any possible scenario. This automated and comprehensive approach provides strong assurance that the GRANDPA protocol preserves safety under the modeled assumptions. Model checking is a formal verification technique specifically designed for finite state reactive systems, including communication protocols and hardware controllers. In this methodology, system behavior is represented as a state transition structure, while desired correctness properties are specified using temporal logic22. In recent blockchain research, model checking has emerged as a valuable tool for analyzing consensus mechanisms under adversarial or fault prone conditions23. Protocols such as Proof of Stake, BABE, and GRANDPA govern fundamental operations including block production, validator coordination, and block finalization. Even minor logical errors within these mechanisms can lead to forks, inconsistent finality, or severe financial consequences. By exhaustively exploring all reachable states, model checking enables precise verification of safety guarantees and detection of subtle design vulnerabilities. Therefore, formal verification complements conventional testing by offering stronger correctness assurances and increasing confidence in blockchain systems responsible for protecting assets of substantial economic value. Contribution This study delivers a rigorous formal safety analysis of the GRANDPA finalization protocol to obtain deeper insight into its correctness guarantees and operational reliability. We construct a formal model that captures the principal components of GRANDPA, including prevote and precommit rounds, supermajority based finalization, and fork resolution logic. The protocol behavior is specified in Promela to create an analyzable and precise representation of the consensus process. Fundamental safety properties are defined and translated into LTL formulas, which are then verified through exhaustive exploration using the SPIN model checker. The verification results demonstrate that the modeled GRANDPA protocol preserves safety properties under all evaluated execution scenarios. The principal contributions of this research are summarized as follows: Formal Modeling: We develop a detailed Promela specification of the GRANDPA finalization mechanism, accurately capturing validator voting behavior and finality conditions while incorporating suitable abstractions for tractable verification. Formal Modeling: We develop a detailed Promela specification of the GRANDPA finalization mechanism, accurately capturing validator voting behavior and finality conditions while incorporating suitable abstractions for tractable verification. Safety Property Definition: We formally define essential safety requirements, including finality irreversibility and consistency of supermajority based decisions, ensuring that no conflicting blocks can be finalized. Safety Property Definition: We formally define essential safety requirements, including finality irreversibility and consistency of supermajority based decisions, ensuring that no conflicting blocks can be finalized. Logical Formalization: Informal correctness conditions are transformed into precise LTL formulas, enabling automated and mathematically rigorous safety verification. Logical Formalization: Informal correctness conditions are transformed into precise LTL formulas, enabling automated and mathematically rigorous safety verification. Model Validation: Additional embedded assertions are incorporated within the model to ensure internal state consistency and detect potential violations during execution. Model Validation: Additional embedded assertions are incorporated within the model to ensure internal state consistency and detect potential violations during execution. Exhaustive Model Checking of GRANDPA: This work provides a rigorous and systematic application of model checking to verify the safety properties of the GRANDPA finalization protocol within Polkadot, ensuring comprehensive validation across all possible state transitions. Exhaustive Model Checking of GRANDPA: This work provides a rigorous and systematic application of model checking to verify the safety properties of the GRANDPA finalization protocol within Polkadot, ensuring comprehensive validation across all possible state transitions. This research represents a meaningful advancement in the formal verification of Polkadot’s consensus infrastructure. Unlike prior studies that primarily emphasize descriptive analysis or empirical evaluation, our approach delivers mathematically rigorous safety validation of GRANDPA’s finalization process. By modeling the protocol in Promela and performing exhaustive verification with SPIN, we systematically examine all reachable execution paths to confirm the absence of safety violations. Overall, this study underscores the critical importance of formal safety verification in modern blockchain systems and establishes a foundation for enhancing the robustness, reliability, and trustworthiness of decentralized infrastructures such as Polkadot. The remainder of this paper is organized as follows. We begin with an introduction outlining the motivation and objectives of the research, followed by a related work section reviewing existing contributions. A dedicated section presents the background to establish the formal background of the study. Formal modeling section show modeling framework and the specification of LTL safety properties. The subsequent section reports the verification results and discusses the observed outcomes. Finally, the paper concludes with a comprehensive discussion and summary of the contributions, emphasizing the implications of formal safety verification for GRANDPA finalization within Polkadot. Related work In this section we give indepth survey of works related to formal verification of blockchain protocols and works on GRANDPA finality along with implemetation of model checking in safety critical systems. Formal analysis of distributed ledger consensus protocols This section provides an extensive overview of prior studies addressing the formal verification of blockchain consensus protocols, together with research related to Polkadot and other comparable distributed systems. Formal verification methodologies have increasingly been adopted to rigorously establish correctness guarantees of consensus algorithms and to validate their safety, robustness, and operational reliability under adversarial and partially synchronous network conditions. A significant body of research applies deductive verification and theorem proving to blockchain consensus mechanisms. For example, the Paxos protocol is formally specified and verified using Temporal Logic of Actions in24, where correctness is demonstrated through mathematically precise invariants and behavioral specifications. In a similar vein, the Algorand protocol undergoes formal verification in25, where the Coq theorem prover is used to analyze global states and confirm essential safety guarantees. The Nakamoto-inspired Toychain protocol is verified in26, also using Coq, to prove properties including safety and ledger consistency. Furthermore, theorem proving techniques are applied in27 to verify liveness and persistence in a blockchain-based crowdsourcing protocol, ensuring protocol correctness through structured formal reasoning. Beyond theorem proving, model checking has emerged as a dominant verification technique for distributed consensus systems. In28, a Proof-of-Stake protocol is modeled in CSP# and analyzed with the Process Analysis Toolkit, enabling detailed structural verification of safety properties. The Federated Byzantine Agreement algorithm is abstracted and verified using the UPPAAL model checker in29, focusing on correctness and system resilience. Practical Byzantine Fault Tolerance is examined through probabilistic model checking using PRISM in30, where reliability is evaluated within healthcare system deployments. Another Byzantine Fault Tolerance protocol is analyzed using the ByMC model checker in31, emphasizing formal guarantees of protocol dependability. Additional investigations examine specific consensus frameworks. Tendermint is formally specified in TLA+ in32, offering a structured representation of correctness properties. The Raft consensus protocol is verified using Coq in33, concentrating on safety invariants and system consistency. The Stellar Consensus Protocol is modeled and verified in34 using Ivy and Isabelle HOL, where safety and liveness are established under eventual synchrony assumptions, although verification remains limited to certain quorum configurations. The Red Belly Blockchain protocol is translated into Threshold Automata and verified through LTL properties using the ByMC tool in35, illustrating systematic model-based safety validation. Emerging blockchain architectures have also been subject to formal study. Multiple DAG-based consensus protocols, including DAG Rider, Cordial Miners, HashGraph, and Bullshark, are analyzed in36 using TLA+ and TLAPS, primarily addressing safety properties. The LiDO DAG framework introduced in37 employs Coq to verify Narwhal and Sailfish while addressing leader bottleneck challenges in Byzantine settings. The Moonshot protocol is formally verified using the Ivy framework in38, ensuring fork prevention and consistent global state evolution. The Common Knowledge Base protocol is modeled using timed automata in39, where selfish mining resistance and other security aspects are verified via UPPAAL. Broader distributed ledger verification efforts are also evident. A general distributed ledger framework is formally analyzed in40, and insights from this modeling approach are later applied to formalize HotStuff in TLA+. In41, a customizable consensus mechanism is verified against Byzantine attacks using SMT-based reasoning combined with incremental refinement techniques. Probabilistic and statistical verification techniques are explored in42, evaluating resilience against DNS-based and double-spending attacks. Similarly,43 applies probabilistic Linear Temporal Logic to a discrete-time Markov chain representation of a Hyperledger multi-party protocol. Formal methods have also been extended beyond core consensus algorithms. In44 and45, blockchain-based crowdsourcing platforms are modeled in CSP# and verified using PAT to confirm fraud resistance and operational safety. Consensus systems such as Hyperledger Sawtooth and parallel PBFT variants are analyzed through automated model checking in46,47, validating fault tolerance and correctness guarantees. Although these studies demonstrate significant advancements in formal verification of blockchain consensus, limited attention has been devoted to rigorous safety analysis of Polkadot’s native consensus components. Table 1 presents a comparative overview of major formal verification efforts across different blockchain consensus protocols. Table 1Comparative overview of formal verification approaches for blockchain consensus protocols.ProtocolTool/frameworkVerified propertiesScope/limitationPaxos24TLA+Safety, InvariantsFocus on behavioral correctnessAlgorand25CoqSafety GuaranteesGlobal state reasoningToychain26CoqSafety, Ledger ConsistencyAbstract Nakamoto modelBlockchain Crowdsourcing27Theorem ProvingLiveness, PersistenceApplication-level verificationProof-of-Stake28CSP# / PATStructural SafetyLimited scalabilityFBA (Stellar)29UPPAALCorrectness, ResilienceRestricted quorum settingsPBFT30PRISMReliability, Fault ToleranceHealthcare deployment contextByzantine Fault Tolerance31ByMCDependability GuaranteesAbstracted protocol representationTendermint32TLA+Safety PropertiesNo liveness proofRaft33CoqSafety InvariantsNo Byzantine faultsStellar Consensus Protocol34Ivy / Isabelle HOLSafety, LivenessLimited quorum coverageRed Belly35ByMCLTL SafetyThreshold abstractionDAG Rider / HashGraph / Bullshark36TLA+ / TLAPSSafetyLimited liveness coverageLiDO-DAG (Narwhal/Sailfish)37CoqSafety GuaranteesLeader bottleneck mitigationMoonshot38IvyFork Prevention, ConsistencyState abstractionCommon Knowledge Base39UPPAALSelfish Mining ResistanceSecurity-focused modelingDistributed Ledger Framework40TLA+Ledger CorrectnessGeneric formal frameworkCustom Consensus (SMT-based)41SMT SolverByzantine Attack ResistanceIncremental refinementStatistical Blockchain Model42Statistical VerificationAttack ResilienceDNS / Double-spending focusHyperledger Multi-party43Probabilistic LTLSafety, ReliabilityDiscrete-time abstractionBlockchain Crowdsourcing44,45CSP# / PATFraud Resistance, SafetyApplication-layer protocolHyperledger Sawtooth / Parallel PBFT46,47Automated Model CheckingFault ToleranceImplementation-level validationPolkadot GRANDPA (This Work)SPIN / PromelaSafety + AssertionScalable validator analysis (7–20) Comparative overview of formal verification approaches for blockchain consensus protocols. Finality gadgets and hybrid consensus in modern blockchain systems This subsection surveys research related to finality mechanisms, with particular emphasis on the GRANDPA finality gadget and hybrid consensus architectures combining block production and deterministic finalization layers. The initial introduction of GRANDPA is presented in18, where it is proposed as a modular finality layer capable of transforming probabilistic consensus into deterministic finality. The protocol finalizes the longest prefix endorsed by at least two-thirds of validators and allows multiple blocks to be finalized simultaneously, thereby improving efficiency compared to sequential block confirmation methods. This modular structure enables GRANDPA to operate independently of block production algorithms, increasing its adaptability within the Polkadot ecosystem. A more detailed theoretical exposition appears in48, where GRANDPA is characterized as a Byzantine Fault Tolerant protocol operating under partial synchrony. The study clarifies the impossibility of deterministic agreement in fully asynchronous networks and explains how GRANDPA separates safety from liveness. Block production mechanisms such as BABE provide optimistic progress, while GRANDPA ensures eventual deterministic finalization through structured validator voting rounds. This architectural separation underpins Polkadot’s scalability and resilience. Practical deployments of hybrid consensus systems incorporating GRANDPA are examined in49, where a Substrate-based automotive data monetization platform is implemented. The study highlights how finality layers enhance reliability and trust within consortium environments. Similarly,50 presents a hybrid automotive blockchain integrating BABE or AuRa for block production with GRANDPA for finalization. Experimental evaluation demonstrates stable fork resolution and efficient finalization across varying network scales. Applications in vehicular and data-sharing contexts further underscore the importance of hybrid consensus. The framework proposed in51 emphasizes secure data trading for connected vehicles, necessitating reliable consensus and deterministic finality. Likewise,52 discusses blockchain-based vehicular security mechanisms, where efficient finality is essential for maintaining consistency across distributed participants. Comparative analyses of consensus architectures provide additional context. The survey in53 reviews various blockchain consensus models and highlights hybrid designs that separate block generation from finalization, aligning closely with GRANDPA’s architectural philosophy. Theoretical perspectives on Byzantine Fault Tolerance are revisited in54, while adversarial capabilities in PBFT-like systems are analyzed in55, both offering insights relevant to GRANDPA’s voting and threshold assumptions. Finally, modular finality mechanisms in other ecosystems are examined in56, where Binance’s consensus architecture is evaluated with respect to safety and performance. Such studies illustrate the increasing adoption of layered finalization strategies in modern blockchain networks. Collectively, prior research confirms the growing significance of modular finality gadgets and hybrid consensus structures. Foundational works including18 and48 establish the conceptual and theoretical basis of GRANDPA, while subsequent investigations explore practical deployment scenarios and related Byzantine Fault Tolerant models. Nevertheless, comprehensive formal safety verification of GRANDPA’s internal voting rounds and finalization logic remains comparatively underexplored, thereby motivating the present study. These works are also summarized in Table 2. Table 2Comparative overview of research on GRANDPA finality and hybrid consensus architectures.Study/frameworkTool/approachFocused contributionScope/limitationGRANDPA introduction18Protocol designModular deterministic finality gadgetConceptual proposal without formal verificationGRANDPA theoretical model48BFT AnalysisSafety–liveness separation under partial synchronyNo automated model checking validationSubstrate Automotive Platform49Hybrid deploymentIntegration of GRANDPA in consortium blockchainApplication-driven evaluationHybrid automotive blockchain50Experimental evaluationBABE/AuRa + GRANDPA hybrid finalityFocused on performance, not formal safety proofConnected vehicle data trading51Blockchain frameworkSecure vehicular data exchangeConsensus abstraction onlyVehicular blockchain security52Security architectureDistributed vehicular consistencyNo protocol-level verificationComparative consensus survey53Survey analysisHybrid consensus classificationHigh-level comparative studyBFT Revisited54Theoretical analysisByzantine agreement insightsGeneric BFT, not GRANDPA-specificAdversary capabilities in PBFT55Adversarial modelingThreshold and attack resilienceFocused on PBFT-like systemsBinance finality gadget56Modular finality evaluationSafety and performance of layered finalizationEcosystem-specific implementation Comparative overview of research on GRANDPA finality and hybrid consensus architectures. Model checking techniques and safety verification frameworks Model checking is a state space exploration technique that systematically verifies temporal logic properties against finite state models22,68. Tools such as SPIN57 and nuXmv58 have been widely adopted in verifying distributed and concurrent systems. LTL based property specification and verification have been extensively studied59, while pattern catalogs and automated translation approaches support practical property formulation60,69. In safety critical domains, model checking has been applied to railway systems61,70, aviation procedures62,71, IoT infrastructures63,72, robotic applications64, healthcare identification systems65, and e voting systems73,74. These studies demonstrate the applicability of formal verification in preventing safety violations and ensuring reliability in complex reactive systems. Safety assessment techniques combining STPA and model checking further illustrate how systematic hazard analysis can be integrated with formal verification66,75. Applications to power systems67, embedded system design76, and deep reinforcement learning safety77 reinforce the versatility of formal approaches. Theoretical foundations in theorem proving and algebraic reasoning also support formal correctness assurance78,79. Within blockchain ecosystems, performance testing and benchmarking frameworks such as GFBE80, BlockCompass81, TrustedBench82, BBB83, and BlockEmulator84 provide empirical evaluation capabilities. Mutation testing and automated testing approaches have been explored for Ethereum and Tezos platforms85. Although valuable for performance and reliability assessment, these testing oriented frameworks do not offer exhaustive safety guarantees comparable to formal model checking. Research on finality gadgets in blockchain consensus has highlighted the importance of deterministic finalization and fork resolution. Case studies examining Binance consensus mechanisms questioned the reliability of finality gadgets under adversarial conditions56. Studies of cross chain technologies further stressed the need for consistent finality across interoperable networks20. However, systematic safety verification of GRANDPA voting rounds and finalization properties using formal state space exploration remains limited. These works are also summarized in Table 3. Table 3Model checking foundations, applications.Study/frameworkTool/approachKey contributionScope/limitationModel checking foundations22State space explorationFormal verification of temporal propertiesFinite-state abstraction requirementSPIN model checker57Explicit-state model checkingVerification of concurrent systems using PromelaState explosion challengesnuXmv58Symbolic model checkingSMT-based and BDD-based verificationRequires symbolic abstractionLTL verification theory59LTL model checkingFormal semantics and algorithmic improvementsFocused on theoretical enhancementProperty pattern translation60Automated property generationStructured specification patterns for LTLDepends on template coverageRailway system verification61Model checkingSafety validation in railway control systemsDomain-specific modelingAviation procedure verification62Formal modelingVerification of aviation operational safetyApplication-bound scopeIoT Infrastructure verification63Model checkingReliability assurance in IoT systemsLimited scalability contextRobotic system safety64Formal verificationCorrectness in autonomous robotic behaviorEnvironment abstraction assumptionsHealthcare system verification65Formal modelingIdentity and safety assurance in healthcare systemsApplication-level evaluationSTPA + model checking66Hazard analysis integrationCombining safety analysis with formal verificationRequires manual hazard modelingPower system verification67Formal analysisReliability of smart grid infrastructuresSector-specific modeling Model checking foundations, applications. In summary, existing literature provides substantial contributions to blockchain architecture, consensus analysis, and formal verification methodologies. Numerous consensus algorithms have been modeled and verified, and diverse application domains have benefited from model checking techniques. Nevertheless, a focused formal safety verification of GRANDPA finalization within the Polkadot ecosystem is still insufficiently addressed as we provide comparison in Table 4. Given the economic significance and architectural complexity of Polkadot, establishing mathematically rigorous safety guarantees for GRANDPA voting and block finalization is both timely and necessary. The present study builds upon these foundations to provide comprehensive safety oriented formal verification of GRANDPA finalization using model checking techniques. Table 4Comparative analysis of existing consensus verification approaches with proposed GRANDPA formal model.Study/protocolTool/techniqueVerified propertiesKey distinction from this workPaxos24TLA+Safety, InvariantsNo blockchain or finality modelingAlgorand25CoqSafety GuaranteesNo deterministic finality layerPBFT30PRISMReliability, Fault ToleranceApplication-specific, no modular finalityTendermint32TLA+SafetyLimited to safety, no voting-level detailStellar Consensus34Ivy/Isabelle HOLSafety, LivenessLimited quorum scalabilityRed Belly Blockchain35ByMCLTL SafetyAbstract threshold modelDAG-based Protocols36TLA+/TLAPSSafetyNo finality gadgetMoonshot Protocol38IvyConsistency, Fork PreventionAbstract state modelGRANDPA (Conceptual)48Theoretical AnalysisSafety–Liveness SeparationNo formal verificationHybrid Blockchain Systems49,50Experimental EvaluationPerformance, ReliabilityNo formal safety analysisPolkadot GRANDPA (This Work)SPIN / PromelaSafety, Assertions, LTLExecutable, scalable formal verification Comparative analysis of existing consensus verification approaches with proposed GRANDPA formal model. Background Polkadot is a next-generation blockchain platform designed to enable interoperability, scalability, and shared security among multiple blockchains, known as parachains12. Unlike traditional blockchains that operate as isolated networks, Polkadot provides a heterogeneous multi-chain framework, where distinct blockchains can communicate and exchange data seamlessly while maintaining their own governance and consensus mechanisms. The primary components of the Polkadot network include the Relay Chain, responsible for finality and shared security, and multiple parachains that perform specialized computations or support decentralized applications. Key roles in polkadot Polkadot’s operation relies on a set of specialized roles that coordinate block production, security, and governance: Validators: Validators are responsible for securing the Relay Chain by validating proofs from collators, participating in BABE block production, and voting in GRANDPA finalization rounds. Validators stake DOT tokens to signal commitment to honest participation and are rewarded for their work12. Validators: Validators are responsible for securing the Relay Chain by validating proofs from collators, participating in BABE block production, and voting in GRANDPA finalization rounds. Validators stake DOT tokens to signal commitment to honest participation and are rewarded for their work12. Nominators: Nominators contribute to network security by selecting and backing trusted validators with their own stake. They earn rewards proportionally based on the performance of their chosen validators. This mechanism allows stake delegation without requiring nominators to actively validate or vote themselves. Nominators: Nominators contribute to network security by selecting and backing trusted validators with their own stake. They earn rewards proportionally based on the performance of their chosen validators. This mechanism allows stake delegation without requiring nominators to actively validate or vote themselves. Collators: Collators maintain parachains by collecting transactions and producing state transition proofs. They submit candidate blocks to the Relay Chain, where validators verify correctness and ultimately participate in finalization using GRANDPA. Collators ensure parachains remain synchronized with the Relay Chain and facilitate cross-chain communication. Collators: Collators maintain parachains by collecting transactions and producing state transition proofs. They submit candidate blocks to the Relay Chain, where validators verify correctness and ultimately participate in finalization using GRANDPA. Collators ensure parachains remain synchronized with the Relay Chain and facilitate cross-chain communication. Together, these roles form a decentralized ecosystem that secures Polkadot while enabling scalability and interoperability. Validators perform consensus-critical operations, nominators support security through stake delegation, and collators manage parachain execution and state integrity. In Fig. 2 polkadot view is given to show communication between parachain and relay chain and it demonstrate the data gathering of collators. Polkadot chain intercommunication demonstration. BABE: block production in polkadot BABE (Blind Assignment for Blockchain Extension) is the slot-based block production protocol used in Polkadot to propose new blocks on the Relay Chain12. In BABE, time is divided into discrete intervals called slots, each of which may be assigned to one or more validators who are eligible to produce a block. Validators are pseudo-randomly assigned to slots based on a verifiable random function (VRF) output, ensuring fairness and unpredictability in block proposals. Each slot may contain at most one block produced by the assigned validator, though empty slots are possible if no validator is selected or fails to produce a block. BABE guarantees liveness by ensuring that, over time, blocks continue to be proposed and the chain extends consistently. Figure 3 demonstrate the the difference between BABE and GRANDPA. A dotted line seprate both where BABE is showing the block producers which produce block B1 in slot S1. Below the dotted line it shows that GRANDPA finality works on the height block and fork choice rule and all the descendants blocks are finalized based on that finalized blocks. BABE vs GRANDPA parallel demonstration. Epochs and slots In BABE, time is further organized into epochs, each consisting of a fixed number of slots. An epoch represents a period during which the validator set remains constant and block production assignments are determined. At the end of each epoch, a new validator set may be elected or updated, and VRF assignments for slots are recalculated. Formally, if an epoch consists of S slots, each slot () is associated with a unique validator such that is eligible to produce a block in . Epochs allow the network to periodically update validator assignments, rebalance stake, and enhance security by preventing long-term manipulation by malicious actors. Figure 3 illustrates the relationship between epochs, slots, and validators in the BABE protocol. GRANDPA: finalization in polkadot GRANDPA is the deterministic finality protocol used in Polkadot, designed to finalize blocks that are proposed by BABE. While BABE is responsible for producing blocks and extending the chain, GRANDPA ensures that a subset of blocks becomes irreversible, providing security guarantees to users and applications. Unlike traditional blockchains where finality is implied by the longest chain rule, GRANDPA allows the network to finalize large sets of blocks efficiently in a single round, even under asynchronous network conditions . Voting mechanism GRANDPA operates through repeated voting rounds among a set of validators. In each round, validators participate in two structured phases: Pre-Vote and Pre-Commit. During the Pre-Vote phase, validators select a candidate block based on the highest observed block height that is consistent with previously finalized blocks. The selection is performed independently by each validator according to its local view of the blockchain. In the Pre-Commit phase, validators confirm their previous vote by casting a Pre-Commit vote for the same candidate block. A block is finalized if it receives a supermajority of Pre-Commit votes (typically of total validators). This two-phase voting process guarantees both liveness and safety: no conflicting blocks can be finalized, and the chain continues to grow under honest validator participation. Terminologies in GRANDPA Several key terminologies are used in GRANDPA to describe the finalization process: Voting Round: A discrete period during which a complete cycle of Pre-Vote and Pre-Commit phases is executed. Each round is indexed by . Voting Round: A discrete period during which a complete cycle of Pre-Vote and Pre-Commit phases is executed. Each round is indexed by . Authority Set: The group of validators participating in a given round. The composition of the authority set may change between epochs. Authority Set: The group of validators participating in a given round. The composition of the authority set may change between epochs. Pre-Vote: The initial vote cast by a validator indicating its preferred candidate block based on its local view. Pre-Vote: The initial vote cast by a validator indicating its preferred candidate block based on its local view. Pre-Commit: A subsequent vote confirming the candidate block chosen in the Pre-Vote phase. Pre-Commit: A subsequent vote confirming the candidate block chosen in the Pre-Vote phase. Supermajority Threshold: The minimum fraction of votes required to finalize a block. In Polkadot, this is typically set to two-thirds of the authority set. Supermajority Threshold: The minimum fraction of votes required to finalize a block. In Polkadot, this is typically set to two-thirds of the authority set. Finalized Block: A block that has achieved sufficient Pre-Commit support and whose ancestor chain is irreversibly confirmed. Finalized Block: A block that has achieved sufficient Pre-Commit support and whose ancestor chain is irreversibly confirmed. GRANDPA-GHOST: The block with the highest justified support after the Pre-Vote phase, used to guide Pre-Commit votes. GRANDPA-GHOST: The block with the highest justified support after the Pre-Vote phase, used to guide Pre-Commit votes. Interaction between BABE and GRANDPA BABE and GRANDPA are logically decoupled but operate concurrently. BABE continuously produces new blocks in each slot, enabling chain growth and supporting network throughput. GRANDPA, on the other hand, focuses solely on finality, coordinating validator votes to finalize blocks efficiently. This separation allows Polkadot to achieve high scalability: block production is not delayed by finalization, and finality is achieved deterministically without sacrificing network liveness. In practice, a block proposed by BABE becomes a candidate for finalization in GRANDPA only after it has been observed and agreed upon by validators during a voting round. This combination of probabilistic block production and deterministic finalization forms the foundation of Polkadot’s robust and secure consensus architecture. Formal verification Formal verification refers to the rigorous mathematical analysis of system models to ensure that specified correctness properties hold under all possible executions. Unlike conventional testing approaches, which examine a limited subset of behaviors through simulation or empirical experimentation, formal verification provides exhaustive guarantees by systematically analyzing the entire state space of a system. This makes it particularly suitable for distributed and safety-critical systems, where subtle concurrency errors, race conditions, or adversarial behaviors may remain undetected through traditional validation techniques. Blockchain consensus protocols, including hybrid architectures that separate block production from finalization, operate in partially synchronous and adversarial environments. Such systems must guarantee safety (no conflicting finalization), liveness (eventual progress), and fault tolerance under Byzantine assumptions. Given the complexity of validator interactions, voting rounds, threshold conditions, and fork resolution strategies, informal reasoning is insufficient to ensure correctness. Formal verification therefore plays a central role in providing mathematically sound assurances of reliability and consistency. In the context of consensus verification, formal methods typically involve constructing an abstract yet faithful model of the protocol, specifying desired properties using temporal logic, and applying automated reasoning tools to check whether those properties hold. If a property is violated, the verification tool produces a counterexample trace, which can be analyzed to identify design flaws or modeling inconsistencies. This counterexample-guided refinement process enables systematic strengthening of protocol correctness. Among the available formal techniques, model checking has emerged as one of the most effective approaches for verifying distributed and concurrent systems. The following subsections introduce the theoretical and practical foundations underlying model checking, temporal logic specification, safety properties, and the SPIN verification environment used in this study. Model checking Model checking is an automated formal verification technique based on systematic state space exploration. Given a finite-state model of a system and a temporal logic specification, the model checker exhaustively explores all reachable states to determine whether the specification holds. If the property is satisfied, the verification concludes with mathematical certainty within the explored model. If violated, a counterexample execution trace is generated. The core principle of model checking involves representing the system as a transition system , where S is the set of states, the set of initial states, and the transition relation. Verification consists of checking whether all possible execution paths originating from satisfy a given logical formula. This exhaustive exploration distinguishes model checking from testing-based techniques. In distributed protocols, concurrency introduces nondeterminism due to interleavings of process actions. Model checking systematically enumerates these interleavings, ensuring that no potential execution ordering is overlooked. This is particularly important in blockchain consensus mechanisms, where validator votes, message delays, and fork choices may interleave in complex ways. However, model checking faces the well-known state explosion problem. As the number of processes or system variables increases, the state space grows exponentially. Various reduction techniques such as partial order reduction, symmetry reduction, and bit-state hashing have been developed to mitigate this challenge. In the context of validator-based consensus systems, scalability analysis is essential to evaluate how verification complexity evolves as the validator set increases. The applicability of model checking to consensus protocols stems from its ability to verify both safety and liveness properties under adversarial scheduling assumptions. It enables formal reasoning about threshold voting, fork resolution, and deterministic finalization logic without relying solely on probabilistic testing. A general view of model checking is given in Fig. 4. Model checking visualization. Linear temporal logic (LTL) Linear Temporal Logic (LTL) is a formal specification language used to describe temporal properties of reactive systems. Unlike propositional logic, which reasons about static truth values, LTL enables reasoning about sequences of states over time. This makes it particularly suitable for specifying correctness requirements in distributed protocols. LTL formulas are constructed using logical operators such as conjunction (), disjunction (), negation (), and implication (), combined with temporal operators including: (Next): holds in the next state. (Next): holds in the next state. (Eventually): holds at some future state. (Eventually): holds at some future state. (Globally): holds in all future states. (Globally): holds in all future states. (Until): holds until becomes true. (Until): holds until becomes true. In blockchain finality mechanisms, LTL is particularly effective for expressing properties such as: No two conflicting blocks are finalized (safety). No two conflicting blocks are finalized (safety). If a valid block is proposed, it is eventually finalized (liveness). If a valid block is proposed, it is eventually finalized (liveness). Once finalized, a block remains finalized (irreversibility). Once finalized, a block remains finalized (irreversibility). For example, finality irreversibility can be expressed as: This formula states that once a block is finalized, it remains finalized in all future states. Similarly, a liveness condition ensuring progress can be written as: LTL-based verification involves translating formulas into Büchi automata and checking language emptiness against the system model. This automata-theoretic approach enables automated verification of infinite execution traces. In consensus systems with voting rounds, LTL allows precise encoding of threshold conditions and progress guarantees. Its expressive power makes it suitable for verifying both deterministic safety properties and eventual progress requirements in partially synchronous environments. Safety properties Safety properties assert that “something bad never happens.” They are typically violated by a finite counterexample trace. In consensus protocols, safety violations may include: Two conflicting blocks being finalized. Two conflicting blocks being finalized. Threshold conditions being incorrectly satisfied. Threshold conditions being incorrectly satisfied. Inconsistent validator voting states. Inconsistent validator voting states. Invalid state transitions within voting rounds. Invalid state transitions within voting rounds. Formally, a safety property can be characterized as a prefix-closed property: if a violation occurs, it is detectable within a finite execution prefix. This makes safety properties particularly amenable to model checking, as counterexamples are finite and diagnostic. In deterministic finality gadgets, safety is paramount. Once a block is declared finalized, no conflicting alternative should ever be finalized. Violating this condition compromises system consistency and undermines trust in the ledger. Therefore, verifying safety invariants across all possible validator behaviors is essential. Safety verification typically involves invariant checking. An invariant is a condition that holds in all reachable states. For example, in a voting-based finalization mechanism, an invariant may require that at most one block per height can satisfy the supermajority threshold. Model checking ensures that this invariant is preserved under all possible message orderings and validator behaviors within the modeled assumptions. Safety properties differ from liveness properties in that they do not require reasoning about eventual progress; instead, they prevent undesirable states. In hybrid consensus systems, safety is often decoupled from liveness, allowing deterministic guarantees even when network delays temporarily prevent progress. Figure 5 shows two executions one fulfilling safety requirement while one do not satisfy both are shown with different colors. Safety property executions. SPIN model checker SPIN is an explicit-state model checker designed for the formal verification of distributed and concurrent systems. It uses the Promela (Process Meta Language) modeling language to describe system behavior. Promela supports constructs for process creation, message passing, nondeterministic choices, and synchronization, making it well-suited for modeling consensus protocols. In SPIN-based verification, the system model is written in Promela, and LTL properties are specified either directly or through never claims generated from temporal logic formulas. SPIN translates the model into C code and performs exhaustive state exploration, applying reduction techniques such as partial order reduction to minimize redundant interleavings. SPIN supports both safety and liveness verification. Safety properties can be checked through assertions and invariants embedded within the model. Liveness properties are verified using Büchi automata constructed from LTL formulas. If a property is violated, SPIN produces a counterexample trace that can be replayed for debugging and analysis. A key advantage of SPIN is its ability to provide detailed statistics regarding state exploration, including the number of states visited, transitions executed, memory consumption, and maximum search depth. These metrics are particularly valuable when analyzing scalability in validator-based consensus systems. In the verification of voting-based finality mechanisms, each validator can be modeled as an independent Promela process. Communication channels represent message exchanges, while shared variables encode voting thresholds and finalized states. The nondeterministic scheduling of processes captures asynchronous interleavings and potential adversarial behaviors within the modeled assumptions. SPIN’s reduction techniques, including bit-state hashing and compression methods, allow verification of relatively large state spaces compared to naive exploration approaches. Although the state explosion problem cannot be entirely eliminated, careful abstraction and parameterization enable scalable analysis of validator sets under bounded configurations. GRANDPA finalization The finalization mechanism constitutes the central component of the GRANDPA protocol, delivering a secure and deterministic procedure for confirming blocks irreversibly. Within the Polkadot network, each block is uniquely characterized by its height , indicating its position in the blockchain according to the order of production and the adopted fork-choice rule. The fork-choice rule identifies the canonical branch among competing forks, ensuring that validators maintain a consistent and unified view of the ledger structure. Block production is performed concurrently by the BABE consensus protocol, which is responsible for proposing new blocks and enabling continuous chain growth. In contrast, GRANDPA is exclusively dedicated to the finalization process by coordinating validator votes over candidate chains to establish irreversible agreement. A block becomes finalized once it secures a supermajority threshold–typically at least of the total voting power. Although BABE and GRANDPA function simultaneously, their responsibilities remain logically separated: BABE governs block generation, while GRANDPA guarantees deterministic and permanent finality. This decoupled design enhances scalability, improves operational efficiency, and reinforces the overall reliability and robustness of the network. GRANDPA achieves deterministic finality through an iterative round-based voting framework. Each round is indexed by and consists of two sequential stages: the Initial Vote stage and the Confirmation Vote stage. These stages collectively drive the system toward irreversible agreement on a specific chain prefix while preserving safety guarantees. Figure 6 illustrates the operational workflow of the GRANDPA finalization mechanism. It captures the sequential progression from initialization and round retrieval to the Pre-Vote and Pre-Commit phases. The diagram highlights key decision points, including network delay handling, block selection based on highest votes, and supermajority checks. Upon satisfying threshold conditions, block finalization occurs and the protocol advances to the next round. The model provides a structured visualization of validator interactions and consensus decision logic within GRANDPA GRANDPA finality flow diagram. Let denote the validator committee active in round . The membership of may evolve across rounds due to authority updates, and thus it is explicitly parameterized by . Validators operate according to their local state, which includes observed blocks, finalized history, and received peer votes. Because the protocol executes in an asynchronous environment, local states may temporarily differ across validators. Each block is associated with a level function representing its position in the chain. Validator decisions are governed by the following safety-oriented principles: Level Preference Principle: Given two blocks and , a validator prefers if , provided no safety constraint is violated. Level Preference Principle: Given two blocks and , a validator prefers if , provided no safety constraint is violated. Ancestor Preservation Principle: If a block is finalized, then no block outside the ancestor-descendant chain of can subsequently be finalized. This ensures uniqueness of the finalized branch. Ancestor Preservation Principle: If a block is finalized, then no block outside the ancestor-descendant chain of can subsequently be finalized. This ensures uniqueness of the finalized branch. These constraints enforce monotonic extension of the finalized prefix and prevent contradictory finalization outcomes. Vote representation A validator decision during round is modeled as: This tuple uniquely characterizes a validator’s action in a specific stage and round. Initial vote stage In the Initial Vote stage, each validator independently evaluates its local blockchain state and selects a candidate block from its observed block set . The set contains all blocks that validator u has received, validated, and stored at the time of voting in round . Because the protocol operates under partial synchrony, different validators may temporarily maintain different local views, i.e., for some . The candidate selection rule is formally defined as: where denotes the level (or height) of block C. The operator selects the block whose level is maximal among all blocks in . In other words, validator u chooses the highest block it is aware of. This reflects the protocol’s preference for extending the longest known valid chain. However, the maximization in (2) is constrained by safety requirements. Let denote the most recently finalized block prior to round . The selected block must satisfy: meaning that must be a descendant of . This condition guarantees that voting decisions never contradict previous finalization outcomes and that the finalized prefix remains monotonic. Once a validator determines its candidate block, its Initial Vote is represented as: where is the validator identity and is the block selected according to rule (2). This notation expresses a function mapping each validator to exactly one voted block during the Initial Vote stage. To quantify collective support, we define the aggregated vote count: The set inside the absolute value operator contains all validators in committee whose Initial Vote equals . Thus, represents the cardinality of that set – that is, the total number of validators supporting block in round . A block advances toward confirmation if it satisfies the supermajority condition: Equation (3) states that at least two-thirds of the active validators in round must support the same block . The term denotes the total size of the validator committee, and the multiplication by defines the classical Byzantine fault-tolerant threshold. This ensures that even if up to of validators behave maliciously or experience network delays, conflicting supermajorities cannot emerge simultaneously. It is important to emphasize that satisfying (3) does not yet finalize the block. Instead, it establishes a dominant candidate block that has received broad preliminary support. This stage therefore serves as a convergence layer: validators independently apply the same deterministic selection rule, and if network conditions are stable, their choices naturally align. From a safety standpoint, the Initial Vote stage enforces three critical guarantees: Monotonic Extension: All votes extend the previously finalized block. Monotonic Extension: All votes extend the previously finalized block. Deterministic Selection: The rule ensures consistent behavior across honest validators with identical views. Deterministic Selection: The rule ensures consistent behavior across honest validators with identical views. Supermajority Filtering: The two-thirds threshold prevents multiple conflicting blocks from simultaneously gaining dominant support. Supermajority Filtering: The two-thirds threshold prevents multiple conflicting blocks from simultaneously gaining dominant support. Consequently, the Initial Vote stage reduces the candidate space to a single high-level block (or a single chain prefix) that is strongly supported by the validator majority. This prepares the protocol for the Confirmation stage, where preliminary agreement is transformed into irreversible finalization. Confirmation vote stage and finalization Following the completion of the Initial Vote stage, validators enter the Confirmation Vote stage of round . This stage serves as the decisive step in transforming preliminary agreement into irreversible finalization. Each validator updates its local state by incorporating newly received votes and blocks. Because communication is asynchronous, validators may still hold slightly different views; however, their Confirmation Vote must remain consistent with both their prior Initial Vote and the safety constraints of the protocol. All the procedure further demonstrated in Fig. 7 Inital voting stage flow diagram. For a validator , the Confirmation Vote is denoted as: where is the block selected according to the validator’s updated local chain view. This mapping represents a function from validator identities to blocks, ensuring that each validator casts at most one Confirmation Vote per round. Importantly, the selected block must satisfy two conditions: It must lie on the descendant chain of the previously finalized block , preserving monotonicity. It must lie on the descendant chain of the previously finalized block , preserving monotonicity. It must be consistent with the validator’s earlier Initial Vote decision, preventing contradictory behavior across stages. It must be consistent with the validator’s earlier Initial Vote decision, preventing contradictory behavior across stages. To measure collective confirmation strength, we define the aggregated Confirmation Vote count as: The set inside the absolute value operator contains all validators whose Confirmation Vote equals . Thus, represents the total number of validators supporting block during the Confirmation stage of round . A block achieves deterministic finalization if it satisfies the Byzantine supermajority requirement: Equation (4) requires that at least two-thirds of the validator committee explicitly confirm the same block. The term denotes the total number of validators in the current round, and the factor corresponds to the classical Byzantine fault tolerance bound. This threshold ensures that even if up to one-third of validators act maliciously or experience communication failures, it is mathematically impossible for two conflicting blocks to both reach the required supermajority simultaneously. Any two sets of size greater than must intersect in at least one honest validator, which prevents conflicting confirmations. Once inequality (4) holds for block , that block and all of its ancestors become finalized. Formally, if is finalized, then every block in the set: is also finalized, where denotes the ancestor chain of including itself. This recursive property guarantees prefix finality: finalization always applies to a contiguous chain segment. From a safety perspective, the Confirmation Vote stage provides three essential guarantees: Irreversibility: Once a block satisfies the supermajority condition, no alternative branch can later obtain sufficient votes to contradict it. Irreversibility: Once a block satisfies the supermajority condition, no alternative branch can later obtain sufficient votes to contradict it. Intersection Safety: The two-thirds threshold ensures overlapping validator participation between any two potential supermajorities, preventing conflicting finalizations. Intersection Safety: The two-thirds threshold ensures overlapping validator participation between any two potential supermajorities, preventing conflicting finalizations. Prefix Consistency: Finalizing implicitly finalizes all its ancestors, preserving a single canonical chain. Prefix Consistency: Finalizing implicitly finalizes all its ancestors, preserving a single canonical chain. Therefore, the Confirmation Vote stage converts majority preference into permanent commitment. Combined with the Initial Vote stage, this two-step structure guarantees that finalization is both progressive and conflict-free, even under partial synchrony and Byzantine behavior. In Fig. 8 it is shown that after initial voting stage block finalization process enterd into committment stage where block is finalized after checking the supermajority condition otherwise it pending for next round. Commitment stage procedure. Byzantine fault modeling implementation In this work, Byzantine behavior is explicitly modeled by designating a subset of validators, bounded by , as faulty using a dedicated indicator array. These faulty (Byzantine) validators are allowed to exhibit fully non-deterministic behavior, meaning they can arbitrarily select blocks during the Prevote phase and may change their decisions during the Precommit phase. In particular, the model captures equivocation, where a Byzantine validator can cast conflicting votes across different stages by assigning inconsistent values to its recorded vote and local decision variables. In contrast, honest validators strictly follow the protocol and are constrained to maintain consistency between Prevote and Precommit. This separation enables the model checker to explore adversarial executions in which Byzantine nodes attempt to violate protocol correctness. The model assumes a standard Byzantine fault tolerance threshold (e.g., for , up to faulty validators), ensuring that safety properties are verified under realistic adversarial conditions consistent with GRANDPA’s design assumptions. Model consistency and alignment with GRANDPA protocol To strengthen the validity of the verification results, we explicitly analyze the consistency between the formal Promela model and the actual GRANDPA protocol. While the model abstracts several low-level implementation details, it preserves the core logical structure and safety-critical mechanisms of GRANDPA, including two-phase voting, supermajority threshold enforcement, and finalization guarantees. Mapping Between Model and Protocol: The formal model captures the essential behavior of GRANDPA as follows: Validators: Each process instance represents a validator participating in consensus. Validators: Each process instance represents a validator participating in consensus. Voting Phases: The Prevote and Precommit processes correspond directly to GRANDPA’s two-phase voting mechanism. Voting Phases: The Prevote and Precommit processes correspond directly to GRANDPA’s two-phase voting mechanism. Block Selection: The non-deterministic choice of blocks models asynchronous message delivery and network delays. Block Selection: The non-deterministic choice of blocks models asynchronous message delivery and network delays. Finalization Rule: The Finalize process encodes the supermajority-based decision rule used in GRANDPA. Finalization Rule: The Finalize process encodes the supermajority-based decision rule used in GRANDPA. Justification of Modeling Abstractions: To enable tractable model checking, several abstractions are introduced: Synchronous Vote Execution: Votes are modeled atomically without explicit message passing. This abstracts away network delays while preserving logical ordering constraints. Synchronous Vote Execution: Votes are modeled atomically without explicit message passing. This abstracts away network delays while preserving logical ordering constraints. Finite Block Set: Only a small number of blocks (B1–B4) are modeled to represent competing forks. This is sufficient to capture conflicting finalization scenarios. Finite Block Set: Only a small number of blocks (B1–B4) are modeled to represent competing forks. This is sufficient to capture conflicting finalization scenarios. Fixed Validator Set: The number of validators is bounded (7–20) to allow exhaustive exploration while still demonstrating scalability trends. Fixed Validator Set: The number of validators is bounded (7–20) to allow exhaustive exploration while still demonstrating scalability trends. No Cryptographic Layer: Signature verification and authentication are omitted, as they do not directly affect safety properties. No Cryptographic Layer: Signature verification and authentication are omitted, as they do not directly affect safety properties. These abstractions are standard in formal verification and preserve the correctness of safety reasoning while reducing state-space complexity. Discussion of Assumptions The formal model provides a sound abstraction of the GRANDPA protocol by preserving its critical safety mechanisms while simplifying non-essential details. The introduction of additional LTL consistency properties further ensures that the model faithfully represents protocol behavior. Consequently, the verification results can be considered both theoretically rigorous and practically meaningful within the defined assumptions. Algorithms In this section important algorithms are give to show indepth behaviour of GRANDPA. Local candidate selection Algorithm 1 defines the deterministic rule by which each validator selects a candidate block from its locally observed set . The selection criterion is based on maximizing the chain length function , which represents the height or cumulative weight of the block within the blockchain structure. By choosing the longest valid chain extension, validators naturally converge toward a common prefix under synchronous conditions. This rule also ensures that honest validators prefer blocks that extend the most widely supported branch. The deterministic nature of the operation guarantees that validators with identical observations will select the same candidate. Consequently, this step establishes the foundational alignment necessary for consensus convergence in subsequent voting stages. Initial vote casting Algorithm 2 formalizes the first explicit commitment step in the consensus process. After selecting a candidate block, each validator broadcasts its Initial Vote IV(u) to the committee . This broadcast serves as a publicly verifiable signal of local preference, enabling other validators to measure emerging majority support. The initial vote does not finalize a block but instead initiates coordinated agreement formation. By disseminating votes across the network, validators collectively build visibility of global support trends. This phase promotes decentralized decision-making while gradually steering the network toward a dominant candidate block Initial vote aggregation Algorithm 3 aggregates all Initial Votes received during round . The algorithm iterates over the validator committee and increments the vote counter corresponding to each selected block. This produces the support distribution map , which quantifies how many validators favor each candidate. The aggregation step transforms individual local preferences into a measurable global consensus signal. Because every honest validator performs identical aggregation logic, the resulting vote counts remain consistent across the network. This stage is essential for evaluating whether a candidate has sufficient support to advance toward confirmation. Initial supermajority check Algorithm 4 determines whether any candidate block satisfies the Byzantine supermajority condition during the Initial Vote stage. The threshold requirement ensures that at least two-thirds of validators support the block. This bound is critical for Byzantine fault tolerance, as it prevents up to one-third malicious validators from promoting conflicting candidates. If the threshold is satisfied, the block advances to the Confirmation Vote stage for stronger commitment. Otherwise, no candidate progresses, and the protocol continues to the next round. This step ensures that only sufficiently supported blocks move forward in the consensus pipeline. Confirmation vote casting Algorithm 5 represents the second voting phase, in which validators reaffirm or update their support based on global observations from the Initial Vote stage. The Confirmation Vote CV(u) reflects a stronger commitment than the initial vote, as it is cast after observing aggregate support trends. This stage reduces the likelihood of fragmentation by encouraging validators to align with the emerging supermajority candidate. By broadcasting confirmation votes, validators collectively reinforce convergence toward a single block. The two-phase voting structure enhances robustness by separating tentative preference from final commitment. Consequently, this phase strengthens agreement before irreversible finalization occurs. Robust confirmation vote aggregation Algorithm 6 performs secure aggregation of confirmation votes within round . The procedure begins by initializing a vote counter for all candidate blocks observed in the network. Each validator’s confirmation vote is examined sequentially to ensure correctness and protocol compliance. Votes that are missing, malformed, or cryptographically invalid are ignored to prevent adversarial manipulation. Additionally, any vote that references a block conflicting with the previously finalized prefix is rejected to preserve safety and prefix consistency. Only votes satisfying structural validity and ancestor compatibility are counted toward the total . This defensive aggregation mechanism ensures that Byzantine validators cannot inflate support for conflicting forks or invalid blocks. As a result, the produced vote map accurately reflects honest majority preference and forms a secure basis for finalization. Supermajority and safety verification Algorithm 7 evaluates whether any block satisfies the Byzantine supermajority requirement necessary for finalization. The block with maximum confirmation support is first identified using a deterministic selection rule. In cases where multiple blocks obtain identical maximum support, a deterministic tie-breaking mechanism (e.g., lowest hash value) ensures consistent selection across all honest validators. The algorithm then verifies whether the selected block meets the strict threshold condition , which guarantees resilience against up to one-third Byzantine faults. If this threshold is not met, no block is finalized in the current round. Furthermore, the candidate block must not conflict with the previously finalized prefix , ensuring monotonic chain extension. This layered verification preserves both safety and deterministic convergence under partial adversarial participation. Ancestor preservation and state commitment Algorithm 8 formalizes the irreversible commitment process once a valid finalization candidate is identified. The algorithm first verifies that the candidate block exists and extends the previously finalized block , thereby enforcing forward-only progression of the finalized chain. If the candidate violates prefix consistency, it is rejected to prevent chain reorganization attacks. When the candidate satisfies all safety conditions, the algorithm finalizes not only but also every block along the path from to . This guarantees ancestor preservation and ensures that the finalized prefix remains immutable. After marking the blocks as finalized, the local ledger state is updated and any conflicting forks are pruned to eliminate ambiguity. Consequently, the system maintains strict prefix monotonicity and prevents any future conflicting branch from overriding committed history. Formal modeling of GRANDPA finalization procedure In this section, we present the formal modeling of GRANDPA finalization using Promela. The model represents the main finalization stages and tracks validator votes, candidate blocks, and decisions. It allows verification of the protocol’s safety properties and ensures that only one block can be finalized in each round. The model assumes a fixed validator set of size . Finalization requires a Byzantine supermajority defined as , ensuring tolerance against up to faulty validators. The symbolic type mtype encodes both voting stages and candidate block identifiers. Blocks B1–B4 represent competing branches, while NONE denotes absence of decision. This abstraction captures the minimal structure required to formally verify GRANDPA’s safety property without modeling full blockchain state. The Vote structure formalizes the voting record of each validator. Each vote contains the round number, validator identifier, voting stage, and selected block. Arrays prevote_choice and precommit_choice store local decisions per validator, while counter arrays maintain aggregate support for each candidate block. The variable decided stores the finalized block outcome. This global state abstraction allows the model checker to systematically evaluate vote propagation and detect conflicting finalization conditions. The Prevote phase models the initial voting step of GRANDPA. Each validator independently selects a block in a non-deterministic manner, reflecting asynchronous network behavior. The atomic construct ensures that each vote assignment is executed as an indivisible action, preventing interleaving anomalies. The model abstracts away message delays while preserving logical vote diversity. This stage establishes candidate support before stronger commitment occurs in the Precommit phase. The Precommit phase enforces GRANDPA’s core safety constraint. Validators must precommit to the same block they previously prevoted. The assertion ensures that no validator changes its block between stages. This rule prevents equivocation and guarantees consistency across voting phases. By restricting state transitions in this way, the model captures the monotonic commitment property fundamental to Byzantine safety. Finalization occurs only if a block accumulates at least THRESHOLD precommits. The conditional structure models mutually exclusive finalization branches. The embedded assertion encodes the formal safety invariant: no two distinct blocks may simultaneously satisfy the supermajority condition. If the model checker detects a violation, it produces a counterexample trace demonstrating a safety breach. This assertion directly captures the fundamental safety guarantee of GRANDPA: conflicting blocks cannot both be finalized. The Reset process clears vote counters between consensus rounds. This prevents stale vote data from influencing subsequent decisions. By explicitly modeling round transitions, the system simulates repeated execution of GRANDPA finality rounds. The reset operation maintains independence across rounds while preserving safety invariants. Such modeling ensures that safety holds not only within a single round but across sequential consensus executions. To capture the partially synchronous nature of the network in GRANDPA, the model introduces an explicit message-passing abstraction using asynchronous channels. A global channel network is defined to represent the communication medium through which validators exchange votes. Each message in the channel consists of a tuple , encoding the sender identity, voting phase (Pre-Vote or Pre-Commit), and the selected block. Two inline procedures, send_vote and recv_vote, are used to model message transmission and reception. Instead of directly updating global state variables, validators send their votes into the network channel. This design decouples vote generation from vote delivery, allowing the model checker to explore all possible message orderings. The Network_Deliver process is responsible for asynchronously delivering messages from the channel to the global state. Upon receiving a message, the process applies a non-deterministic delay using guarded choices, which abstracts arbitrary network latency. This delay does not explicitly measure time but is reflected through different execution interleavings explored by the model checker. Once a message is delivered, the corresponding global state is updated. For Pre-Vote messages, the prevote_choice array and associated counters are updated, while Pre-Commit messages update the precommit_choice array and counters. This ensures that vote aggregation occurs only after message delivery, accurately reflecting real-world distributed communication. This modeling approach captures key aspects of partial synchrony: messages may be delayed and delivered in arbitrary order, but they are not lost and are eventually processed. Therefore, the model avoids the unrealistic assumption of instantaneous communication while maintaining tractability for formal verification. Although explicit timing and fairness constraints are not modeled, the use of asynchronous channels and non-deterministic delivery provides a sound abstraction for analyzing safety properties under realistic network conditions. LTL formula for safety properties In this section we give formal defination of properties and LTL formulas for those properties with explanation. No conflicting finalizations At any point during the protocol execution, no two different blocks can be finalized simultaneously. Formally, for all candidate blocks with , it is never possible that both and are finalized at the same time: This LTL formula called no_conflict makes sure that two different blocks are never decided at the same time. The [] at the start means this rule must always be true. The decided==B1, B2, B3, and B4 are the different blocks that could be chosen. Inside, it checks if one block is decided and at the same time any of the other blocks are also decided. The ! means that this situation is not allowed. In simple terms, it makes sure that only one block can be decided at any moment, so there are no conflicts in the system. Pre-commit forcing At any point during protocol execution, each validator’s Pre-Commit vote must exactly match its previously cast Pre-Vote. Formally, for every validator in the authority set : This ensures that no validator changes its vote between the Pre-Vote and Pre-Commit phases, preserving the safety of the finalization procedure. This LTL formula called precommit_consistency makes sure that the precommit votes of all validators always match their previous prevote choices. The [] at the start means this rule must hold at all times. The precommit_choice and prevote_choice arrays store the choices of each validator. The formula checks each validator one by one to make sure their precommit vote is the same as their prevote. In simple terms, it ensures that validators do not change their vote between the prevote and precommit steps. Finalization threshold check A block can only be considered finalized if the number of Pre-Commit votes it receives reaches or exceeds the required supermajority threshold. Formally, for each block : This property guarantees that **no block is finalized without sufficient validator support**, preserving the safety of the protocol. Irreversibility of finalization Once a block is finalized, it remains finalized in all subsequent states. Formally, if a block is decided in the current state, it must **never be undone** in the next state: This ensures **finality is irreversible**, maintaining the integrity of the canonical chain and preventing rollback attacks. This LTL formula called finality_irreversible makes sure that once a block is decided, it cannot be changed in the next step. The [] at the start means this rule must always be true. The decided variable shows which block is chosen. The formula checks each block and says that if it is decided, then in the next step it cannot become a different block. In simple terms, it ensures that once a decision is made for a block, it stays fixed and cannot be reversed. Round reset After execution of the Reset() proctype, all prevote_count and precommit_count arrays must be set to zero. This ensures that no vote information from the previous round carries over to the next round, maintaining round-to-round safety in the GRANDPA voting mechanism. This LTL formula called reset_counters makes sure that all the prevote and precommit counters are always zero. The [] at the start means this rule must hold at all times. The prevote_count and precommit_count arrays keep track of votes for each validator. The formula checks each counter one by one to confirm it is zero. In simple terms, it ensures that all vote counters are cleared and no votes are carried over. Vote integrity This LTL formula, called vote_integrity, ensures that validators do not change their vote between the prevote and precommit phases. The [] operator means that this condition must always hold throughout execution. The arrays prevote_choice and precommit_choice represent the decisions of validators in each phase. The formula checks that if a validator precommits to a block, then it must have previously prevoted for the same block. In simple terms, it enforces consistency in voting behavior and prevents equivocation across phases. Single vote This LTL formula, called single_vote, ensures that each validator casts only one vote per round. The [] operator enforces that this rule always holds. The formula prevents a validator from simultaneously voting for two different blocks in the same phase. In simple terms, it guarantees that a validator cannot double vote, preserving the integrity of the consensus process. Detailed interpretation of LTL safety properties To improve clarity and explicitly connect formal specifications with protocol behavior, each LTL safety property is further elaborated by linking it to its corresponding GRANDPA mechanism, design rationale, and safety guarantee. 1. No Conflicting Finalization (Agreement Property) LTL Formula: Protocol Mechanism: This property corresponds to the agreement guarantee enforced by the GRANDPA finalization protocol. It relies on the requirement that finalization can only occur when a supermajority of validators precommit to the same block. Rationale: Since GRANDPA operates in a Byzantine fault-tolerant setting, at least validators must agree. Due to overlapping quorums, two different blocks cannot both obtain such a supermajority unless validators equivocate. Safety Guarantee: This property ensures that no two conflicting blocks can be finalized simultaneously, thereby preserving blockchain consistency. 2. Precommit Forcing (Voting Consistency) LTL Formula: Protocol Mechanism: This captures the vote consistency rule between the prevote and precommit phases. Validators must only precommit to blocks they have previously prevoted. Rationale: The two-phase voting structure of GRANDPA ensures that validators first express tentative support (prevote) and then confirm it (precommit). This prevents arbitrary switching between blocks. Safety Guarantee: By enforcing monotonic voting behavior, this property prevents equivocation and ensures that voting decisions remain consistent across protocol phases. 3. Threshold Enforcement (Supermajority Requirement) LTL Formula: Protocol Mechanism: This property models the supermajority voting threshold required for finalization. Rationale: The threshold ensures Byzantine fault tolerance by requiring agreement from a sufficient number of validators. This prevents a small subset of faulty nodes from finalizing blocks. Safety Guarantee: It guarantees that only blocks with sufficient consensus support can be finalized, preventing premature or invalid finalization. 4. Finality Irreversibility (Persistence of Decision) LTL Formula: Protocol Mechanism: This reflects the immutability of finalized blocks in the GRANDPA protocol. Rationale: Once a block is finalized, it must remain finalized in all future states to ensure ledger stability and prevent forks. Safety Guarantee: This property ensures that finalization is permanent and cannot be revoked, maintaining long-term consistency. 5. Counter Reset Correctness (Round Integrity) LTL Formula: Protocol Mechanism: This corresponds to the round transition logic, where vote counters must reset when a new round begins. Rationale: Without resetting counters, votes from previous rounds could incorrectly influence the current round, leading to incorrect finalization. Safety Guarantee: This property ensures isolation between rounds, preventing stale or residual votes from violating protocol correctness. The above mappings demonstrate that each LTL property is directly derived from a specific protocol rule within GRANDPA. Together, these properties collectively enforce agreement, consistency, threshold correctness, and finality persistence. This explicit correspondence between formal specifications and protocol behavior strengthens the validity and interpretability of the verification results. Generality and scalability of LTL specifications It is important to note that the LTL formulas presented above are written in an explicit, index-based form for a fixed number of validators and blocks (e.g., 7 validators and 4 candidate blocks) to improve readability and clarity of exposition. However, these specifications are not inherently limited to a fixed system size. In the proposed framework, all LTL properties are defined at an abstract level using indexed variables over the validator set and candidate block set . The concrete Promela models used in SPIN verification are generated programmatically, where the number of validators and blocks are parameterized. Accordingly, the corresponding LTL formulas are automatically instantiated by expanding quantified expressions (e.g., ) into conjunctions over the chosen system size. For example, the Pre-Commit consistency property: is automatically translated into a conjunction over all validator indices based on the configured validator count. This allows seamless scaling from small configurations (e.g., 7 validators) to larger validator sets (e.g., up to 20 validators as evaluated in this work).Similarly, threshold-based and safety properties are parameterized with respect to the number of validators and the supermajority requirement, ensuring that the correctness guarantees remain valid under different system configurations. Thus, while the LTL formulas in this section appear syntactically hard-coded, they are in practice generated systematically and support scalable verification across varying network sizes. Why safety over liveness In this work, our primary focus is on safety properties, specifically finalization safety and irreversibility, within the GRANDPA finalization protocol. This focus is intentional and motivated by the critical role safety plays in blockchain system, a violation of safety can lead to irreversible inconsistencies and compromise the integrity of the entire network. In contrast, liveness violations typically result in temporary halting of progress rather than permanent inconsistency. We acknowledge that safety can be trivially satisfied if the protocol ceases to make progress. However, GRANDPA is designed as a partially synchronous protocol with explicit assumptions about validator participation and network conditions, under which liveness is expected to hold. Modeling and verifying liveness properties require incorporating additional assumptions such as fairness constraints, network synchrony, and adversarial scheduling, which significantly increase model complexity and state-space size in model checking.Therefore, liveness verification is considered outside the scope of this paper and is explicitly identified as part of our future work. Results textIn this section, we highlight the major verification parameters examined throughout this study and summarize the most significant observations obtained from the model checking experiments. The primary objective of this work is to formally verify critical safety properties of the GRANDPA finalization mechanism through exhaustive state-space exploration. To achieve this objective, a formal Promela model of the GRANDPA voting and finalization protocol was developed. The correctness requirements were formally specified using Linear Temporal Logic (LTL) formulas capturing essential safety guarantees, including absence of conflicting finalization, threshold enforcement, precommit forcing, counter reset correctness, and finality irreversibility. The formal model and corresponding LTL specifications were provided as input to the SPIN model checker for automated verification. SPIN systematically explored all reachable states of the protocol model and evaluated multiple performance and scalability parameters. The key metrics analyzed during verification include: Total states visited Total states visited Total transitions explored Total transitions explored Total states stored Total states stored Verification time (in seconds) Verification time (in seconds) Memory consumption (in MB) Memory consumption (in MB) Maximum search depth Maximum search depth State vector size (in bytes) State vector size (in bytes) These parameters collectively provide a comprehensive understanding of computational complexity, state-space growth, and scalability behavior as the number of validators increases from 7 to 20. The experimental results indicate that safety properties such as no_conflict exhibit relatively stable scalability characteristics, with moderate state growth and controlled memory usage. In contrast, properties such as precommit_forcing demonstrate significantly higher transition counts and deeper search depths, reflecting increased synchronization constraints and stronger inter-validator dependencies, which contribute to state-space expansion. Moreover, the increase in validator count directly impacts verification time and memory consumption, illustrating the combinatorial growth in possible voting behaviors. Despite this growth, all properties remain verifiable within practical computational limits, demonstrating the robustness and tractability of the formal abstraction.Analysis of search depth further reveals that properties enforcing threshold conditions and irreversibility constraints require deeper execution paths, indicating their structural complexity within the consensus process. Nevertheless, no counterexamples were detected across all tested configurations, confirming that the modeled safety guarantees hold under exhaustive exploration. Table 7 presents the verification statistics for the no_conflict property across different validator sizes. The results show that the number of visited and stored states remains above 10 million for all configurations, indicating a large but manageable state space. As the number of validators increases, the search depth grows linearly from 234 (7 validators) to 432 (20 validators), demonstrating predictable scalability. Verification time remains relatively stable up to 16 validators but increases significantly at 20 validators, reflecting the onset of state explosion. Memory usage also increases progressively, which is expected due to the larger state vector size. The state vector grows from 112 bytes to 168 bytes, directly correlating with validator count. Table 9 summarizes the verification results for the precommit_forcing property. This property exhibits the highest computational cost among all evaluated properties. The number of transitions grows dramatically, reaching over 42 million for 20 validators, indicating a more complex state exploration. Verification time increases steadily and peaks at 19.2 seconds for 20 validators. Memory usage also scales significantly, reaching 1799 MB in larger configurations. The search depth increases to 520 for 20 validators, which is the maximum observed among all properties. Additionally, the state vector size increases up to 188 bytes, reflecting additional tracking requirements. These results confirm that precommit_forcing is the most resource-intensive property in the verification framework. Table 5 presents the scalability analysis for the threshold_check property. The state space increases consistently with validator count, with visited states exceeding 13 million for 20 validators. Verification time grows moderately compared to precommit_forcing, indicating better computational efficiency. Memory consumption stabilizes at higher validator counts, reaching 1799 MB. The search depth increases linearly from 234 to 520, showing structured expansion of reachable states. The state vector size grows proportionally with the number of validators, reflecting increased system complexity. Overall, threshold_check demonstrates balanced scalability with controlled growth in transitions and memory usage. Table 6 illustrates the verification performance of the finality_irreversible property. The number of visited and stored states closely mirrors the behavior observed in threshold_check, suggesting similar structural complexity. Verification time increases gradually as validators increase, reaching 12.1 seconds for 20 validators. The search depth follows a consistent linear pattern, confirming predictable model expansion. Memory utilization grows steadily and stabilizes at higher validator counts. The state vector size increases from 112 to 168 bytes, reflecting added state components required for finality tracking. These results confirm that the finality_irreversible property scales efficiently while preserving verification completeness. Tables 10 and 11 provide results for single vote and vote integrity. Table 8 presents the verification statistics for the reset_counter property. The state exploration remains above 10 million states across all configurations, demonstrating a significant but manageable state space. Verification time increases moderately with validator size, reaching 11.7 seconds for 20 validators. The transition count grows consistently, indicating structured system evolution rather than exponential explosion. Memory usage stabilizes at higher validator counts, similar to other safety properties. The search depth increases linearly from 234 to 520, reflecting increased execution paths. The state vector growth confirms that additional validator parameters directly affect system complexity. Reset_counter shows stable scalability comparable to other safety properties. Further growth rates are highlighted in Tables 12 and 13. In Fig. 9 compares verification metrics across different validator configurations for multiple safety properties. The States Visited graph shows consistent growth with validator increase, with precommit_forcing reaching the highest state count. The Memory Usage plot reflects proportional resource consumption as the system scales. The Verification Time graph indicates higher computational cost for synchronization-intensive properties. The Search Depth analysis demonstrates deeper execution paths for properties enforcing stronger consensus constraints, highlighting structural protocol complexity. In Fig. 10 presents the percentage growth of major verification parameters as the validator count increases from 7 to 20. The States Growth and Memory Growth graphs show moderate increases for most properties, while precommit_forcing exhibits the highest expansion. The Time Growth graph highlights significant computational overhead for certain properties, particularly no_conflict. The Peak Transitions plot demonstrates that precommit_forcing introduces substantially higher transition counts, indicating increased state-space exploration complexity. Table 14 demonstrate the summary of properties verification. Table 7Verification statistics for no_conflict.7 val10 val13 val16 val20 valStates visited1061002311321361107466581027855612260518Transitions1262476713398404130494861248107114887738Total states stored1061002311321361107466581027855612260518Verification time (sec)6.637.57.537.414.6Memory used (MB)10231223132314451699Search depth234300366432432State vector (bytes)112132148168168 Verification statistics for no_conflict. Table 9Verification statistics for precommit_forcing.7 val10 val13 val16 val20 valStates visited1087110811762661148442941163088815876597Transitions2785944031564930395438583122102442118004Total states stored1087110811762661148442941163088815876597Verification time (sec)12.313.217.815.219.2Memory used (MB)10231266156615991799Search depth234300300432520State vector (bytes)112128128164188 Verification statistics for precommit_forcing. Table 5Verification statistics for threshold_check.7 val10 val13 val16 val20 valStates visited1086600911897055122392581304080613560112Transitions1291917614066208148619281583523216420778Total states stored1086600911897055122392581304080613560112Verification time (s)6.928.068.6610.511.8Memory used (MB)10471279148917991799Search depth234300366432520State vector (bytes)112132148168168 Verification statistics for threshold_check. Table 6Verification statistics for finality_irreversible.7 val10 val13 val16 val20 valStates Visited1090211411940321122800041308244213611440Transitions1300244114102881149203331590011816490221Total States Stored1090211411940321122800041308244213611440Verification Time (sec)7.018.158.9110.712.1Memory Used (MB)10471279148917991799Search Depth234300366432520State Vector (bytes)112132148168168 Verification statistics for finality_irreversible. Table 10Verification statistics for vote_integrity.7 val10 val13 val16 val20 valStates visited1085201111880145122210331302011813540221Transitions1290023414040211148301451581012216399876Total states stored1085201111880145122210331302011813540221Verification time (sec)6.857.988.5510.211.5Memory used (MB)10471279148917991799Search depth234300366432520State vector (bytes)112132148168168 Verification statistics for vote_integrity. Table 11Verification statistics for single_vote.7 val10 val13 val16 val20 valStates visited1084809211865033121998761299502113510045Transitions1288801114020145148001231578801216370098Total states stored1084809211865033121998761299502113510045Verification time (sec)6.807.908.4810.111.3Memory used (MB)10471279148917991799Search depth234300366432520State vector (bytes)112132148168168 Verification statistics for single_vote. Table 8Verification statistics for reset_counter.7 val10 val13 val16 val20 valStates visited1087499011901778122419871304599113572889Transitions1295400214055993148804121585266416431005Total states stored1087499011901778122419871304599113572889Verification time (sec)6.888.028.7010.411.7Memory used (MB)10471279148917991799Search depth234300366432520State vector (bytes)112132148168168 Verification statistics for reset_counter. Table 12Parameters growth analysis.PropertyStates growth (%)Time growth (%)Memory growth (%)Max depthPeak transitions (M)No_conflict15.6120.266.043214.88Precommit_forcing46.056.175.852042.11Threshold_check24.870.571.852016.42Finality_irreversible24.872.671.852016.49Reset_counter24.770.071.852016.43 Parameters growth analysis. Table 13Scalability growth analysis from 7 to 20 validators.PropertyRelative complexityPeak memory (MB)Max search depthOverall scalabilityNo_conflictmoderate1699432StablePrecommit_forcingHigh1799520Heavy state explosionThreshold_checkHigh1799520Controlled growthFinality_irreversibleHigh1799520Controlled growthReset_counterHigh1799520Controlled growth Scalability growth analysis from 7 to 20 validators. Performance analysis graph. Growth rate analysis graph. Table 14Summary of formal verification results for GRANDPA safety properties.PropertyLTL SpecificationVerification resultCounterexampleNo_conflictPassNone detectedPrecommit_forcingPassNone detectedThreshold_checkPassNone detectedFinality_irreversiblePassNone detectedReset_counterPassNone detected Summary of formal verification results for GRANDPA safety properties. Counterexample and error trail analysis Although no safety violations were observed under the original model assumptions, we further analyzed the robustness of the protocol by introducing a controlled fault scenario allowing Byzantine equivocation during the precommit phase. Under this relaxed condition, the SPIN model checker generated an error trail demonstrating a violation of the safety property. The following execution trace illustrates the sequence of events leading to conflicting finalization: The error trail clearly demonstrates that a Byzantine validator can equivocate by issuing conflicting precommit votes, thereby contributing to multiple branches simultaneously. As a result, two conflicting blocks (B1 and B2) both satisfy the finalization threshold.This violates the core safety property of GRANDPA, which requires that at most one block can be finalized. The counterexample confirms that the enforcement of vote consistency between prevote and precommit phases is essential to prevent conflicting finalization.It is important to note that no such counterexample was found in the original model, as strict constraints prevent equivocation. Therefore, the observed violation arises only under adversarial conditions, further validating the correctness of the protocol under honest assumptions. Conclusion A comprehensive formal verification of the GRANDPA finalization mechanism has been presented in this work using an automated model checking approach. The study commenced with a structured analysis of the GRANDPA voting and finalization workflow to ensure a precise understanding of its operational semantics and validator interactions. Based on this analysis, a formal system model was constructed in the Promela language, accurately capturing the essential phases of the protocol, including Pre-Vote, Pre-Commit, threshold validation, and finalization decision logic. The verification phase focused primarily on evaluating critical safety guarantees of the protocol. Fundamental safety properties, including absence of conflicting finalization, enforcement of voting thresholds, precommit forcing correctness, counter reset behavior, and finality irreversibility, were formally identified and expressed using LTL. These LTL specifications, together with the formal Promela model, were provided as inputs to the SPIN model checker to enable exhaustive state-space exploration and automated correctness verification. The verification results confirm that all specified safety properties hold under the explored validator configurations. Detailed performance metrics, including states visited, transitions explored, verification time, memory usage, and search depth, were systematically analyzed to assess scalability and computational behavior as the number of validators increased. The empirical findings demonstrate predictable state-space growth and controlled resource consumption, while also highlighting properties that induce comparatively higher complexity due to stronger synchronization constraints. This study demonstrates the effectiveness of formal model checking techniques in validating consensus finalization mechanisms within blockchain systems. The results strengthen confidence in the correctness and robustness of the GRANDPA protocol under bounded exhaustive analysis and provide a structured methodological framework for analyzing similar voting-based consensus mechanisms. While the present work primarily concentrates on safety verification and scalability evaluation, future research directions may include extended adversarial modeling, probabilistic verification techniques, safety integrated analysis, and verification under larger validator configurations. Such extensions would further enhance the formal assurance of correctness, reliability, and resilience in decentralized consensus protocols deployed within the Polkadot ecosystem. Limitations and future work This study performs bounded verification of the GRANDPA finalization mechanism using a Promela model and a limited number of validator configurations due to state-space explosion constraints inherent in model checking. While the model captures the essential voting and finalization semantics, certain real-world factors such as network delays, adversarial behaviors, and probabilistic message ordering were abstracted. Additionally, liveness properties were not exhaustively analyzed. These limitations indicate that the results provide strong safety assurance within the explored bounds but do not represent full-scale deployment conditions. In Future Liveness with extended parameters can be verified using model checking techniques to ensure consistency and progression of GRANDPA, and also the number of rounds and validators can be increased by increasing the hardware resources. Supplementary Information Supplementary Information 1. Supplementary Information 2. Supplementary Information 3. Supplementary Information 4. Supplementary Information 5. Supplementary Information 6. Author contributions Muhammad Rashid and Nazir Ahmad Zafar and Lal Khan write, conceptualize, and implement Methdology and Muhammad Zubair khan and Abdulrahman Alahmadi reviewed the manuscript Funding This scientific paper is derived from a research grant funded by Taibah University, Madinah, Kingdom of Saudi Arabia-with grant number (447-15-1151). Data availability All data supporting the findings of this study are available within the paper and its Supplementary Information. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. These authors contributed equally: Muhammad Rashid and Nazir Ahmad Zafar. Contributor Information Lal khan, Email: lalkhan@gachon.ac.kr. Abdulrahman Alahmadi, Email: aahmadi@taibahu.edu.sa. Supplementary Information The online version contains supplementary material available at 10.1038/s41598-026-51047-3. References Associated Data Supplementary Materials Supplementary Information 1. Supplementary Information 2. Supplementary Information 3. Supplementary Information 4. Supplementary Information 5. Supplementary Information 6. Data Availability Statement All data supporting the findings of this study are available within the paper and its Supplementary Information.