# Consensus

## 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](/reference/general/glossary.md#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](/reference/general/glossary.md#winning-proof-of-spacetime-winningpost) for a randomly selected [*sector*](/reference/general/glossary.md#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](/reference/general/glossary.md#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.

[Was this page helpful?](https://airtable.com/apppq4inOe4gmSSlk/pagoZHC2i1iqgphgl/form?prefill_Page+URL=https://docs.filecoin.io/basics/the-blockchain/consensus)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.filecoin.io/basics/the-blockchain/consensus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
