Avail utilizes BABE and GRANDPA consensus mechanisms, inherited from the Polkadot SDK (Substrate).
BABE (Blind Assignment for Blockchain Extension) serves as the block production engine, prioritizing quick transaction processing. BABE assigns block production slots to validators according to stake and using the a randomness cycle. BABE execution happens in sequential non-overlapping phases known as epochs. Each epoch is divided into a predefined number of slots. Hence, time is divided up into discrete slots. During each slot, only some of the validators can produce a block. Validators are selected based on a verifiable random function (VRF).
Learn more: Block Production | Research at Web3 Foundation
GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) functions as the finality gadget, ensuring transaction accuracy and security. Finality is obtained by consecutive rounds of voting by the validator nodes. Validators execute the GRANDPA finality process in parallel to Block Production as an independent service. GRANDPA validators vote on a block that they consider best and their votes are applied transitively to all previous blocks. After two-thirds of the GRANDPA authorities have voted for a particular block, it is considered final, greatly speeding up the finalization process, even after long-term network partitioning or other networking failures.
It works in a partially synchronous network model as long as 2/3 of nodes are honest and can cope with 1/5 Byzantine nodes in an asynchronous setting. In other words, as soon as more than 2/3 of validators attest to a chain containing a certain block, all blocks leading up to that one are finalized at once.
Learn more: Finality | Research at Web3 Foundation
This hybrid approach involving both BABE & GRANDPA equips Avail with resilience against network partitions and node failures.