Consensus

In the Filecoin blockchain, network consensus is achieved using the Expected Consensus (EC) algorithm, a secret, fair, and verifiable consensus protocol used by the network to agree on the chain state

Overview

In the Filecoin blockchain, network consensus is achieved using the Expected Consensus (EC) algorithm, a probabilistic, Byzantine fault-tolerant consensus protocol. At a high level, EC achieves consensus by running a secret, fair, and verifiable leader election at every epoch where a set number of participants may become eligible to submit a block to the chain based on fair and verifiable criteria.

Properties

Expected Consensus (EC) has the following properties:

  • Each epoch has potentially multiple elected leaders who may propose a block.

  • A winner is selected randomly from a set of network participants weighted according to the respective storage power they contribute to the Filecoin network.

  • All blocks proposed are grouped together in a tipset, from which the final chain is selected.

  • A block producer can be verified by any participant in the network.

  • The identity of a block producer is anonymous until they release their block to the network.

Steps

In summary, EC involves the following steps at each epoch:

  1. A storage provider checks to see if they are elected to propose a block by generating an election proof.

  2. Zero, one, or multiple storage providers may be elected to propose a block. This does not mean that an elected participant is guaranteed to be able to submit a block. In the case where:

    • No storage providers are elected to propose a block in a given epoch; a new election is run in the next epoch to ensure that the network remains live.

    • One or more storage providers are elected to propose a block in a given epoch; each must generate a WinningPoSt proof-of-storage to be eligible to actually submit a block.

  3. Each potential block producer elected generates a storage proof using WinningPoSt for a randomly selected sector within in short window of time. Potential block producers that fail this step are not eligible to produce a block. In this step, the following could occur:

    • All potential block producers fail WinningPoSt, in which case EC returns to step 1 (described above).

    • One or more potential block producers pass WinningPoSt, which means they are eligible to submit that block to the epochs tipset.

  4. Blocks generated by block producers are grouped into a tipset.

  5. The tipset that reflects the biggest amount of committed storage on the network is selected.

  6. Using the selected tipset, the chain state is propagated.

  7. EC returns to step 1 in the next epoch.

Last updated