Consensus is a fundamental problem of distributed computing. While this problem has been known to be unsolvable since 1985, existing protocols were designed these past three decades to solve consensus under various assumptions. Today, with the recent advent of blockchains, various consensus implementations were proposed to make replicas reach an agreement on the order of transactions updating what is often referred to as a distributed ledger. Very little work has however been devoted to explore its theoretical ramifications. As a result existing proposals are sometimes misunderstood and it is often unclear whether the problems arising during their executions are due to implementation bugs or more fundamental design issues.
In this paper, we discuss the mainstream blockchain consensus algorithms and how the classic Byzantine consensus can be revisited for the blockchain context. In particular, we discuss proof-of-work consensus and illustrate the differences between the Bitcoin and the Ethereum proof-of-work consensus algorithms. %and discuss a new variant of the Byzantine consensus applied to blockchains. Based on these definitions, we warn about the dangers of using these blockchains without understanding precisely the guarantees their consensus algorithm offers. In particular, we survey attacks against the Bitcoin and the Ethereum consensus algorithms. We finally discuss the advantage of the recent Blockchain Byzantine consensus definition over previous definitions, and the promises offered by emerging consistent blockchains.