> For the complete documentation index, see [llms.txt](https://cardano-wiki.gitbook.io/cardano/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardano-wiki.gitbook.io/cardano/how-does-cardano-work/table-of-contents/three-layers/consensus-layer.md).

# Consensus Layer

This layer performs two fundamental functions:

* Running the [Ouroboros](https://eprint.iacr.org/2016/889.pdf) consensus protocol. This layer takes decisions like adopting blocks, choosing between competing chains (if there are any), and decides when to produce blocks of its own; and&#x20;
* Maintaining all the state that is required to make the decisions taken in the consensus layer.
