Here at Blockbid we use the latest technology for your security and confidence.Unfortunately, your browser doesn’t support these technologiesClick Here to be taken to a site to download a more recent and safe browser.

Model Consensus

Sep 10 2018

<h5>Consensus</h5>
<p>A gigantic word in cryptocurrency. It influences and sets everything from security and decentralisation to speed and environmental friendliness. It is the essential algorithm that checks the Blockchain &mdash; it is the keeper of the truth.</p>
<p>Despite this key importance, it is still very misunderstood.</p>
<h5>What is a Consensus Algorithm?</h5>
<p>A consensus algorithm is a process used to achieve agreement on a single data value among distributed processes or systems. In Blockchain, these algorithms work as instructions to allow the network to validate and confirm transactions on the Blockchain.</p>
<h5>Where does Consensus Fit on the Blockchain?</h5>
<p>Let&rsquo;s consider a typical transaction.</p>
<ol>
<li><strong>User requests a transaction</strong> &mdash; A user requests a value change in the network. This could be a trading value, stored data, contracts, etc.</li>
<li><strong>The transaction is submitted to the Network</strong> &mdash; The network nodes check with their own copies of the chain. The scale of the network and where this change is checked depends on the inbuilt rules of the chain.</li>
<li><strong>Transaction validation</strong> &mdash; The network either validates the transaction or kicks it out. Again, depending on the Blockchain, this is generally where most of the consensus algorithm work is done. The user asks the nodes of the network to say yes or no to the new Information. Different rules will apply to different Blockchains as to how this is handled. Different nodes might have different opinions, the consensus algorithm is the instrument that overcomes these differences and achieves a network endorsed value on the ledger.</li>
<li><strong>Block Creation</strong> &mdash; The transaction is added to the current &lsquo;block&rsquo; of transactions. In both of the popular models for consensus PoW and PoS (covered below) nodes must prove themselves to then facilitate this function. Here older blocks are compared against newer blocks in the hash chain. This block of transactions is then mathematically &lsquo;chained&rsquo; to older blocks of transactions.</li>
<li><strong>Block Validation</strong> &mdash; The transaction is confirmed. Finality is achieved with the user requested change becoming a confirmed part of the chain. At this point the underlying Blockchain algorithm will often reward the validator for their service to the network, in the case of Bitcoin with an amount of coin. In this sequence depending on the Blockchain and the rules set up in it&rsquo;s code, the consensus algorithm operates at points from transaction validation, to block creation and block validation. At each of these points the nodes check in with their own copy of the Blockchain and use algorithmic instruction to form consensus.</li>
</ol>
<h5>Proof</h5>
<p>Blockchain nodes must prove themselves worthy to validate and perpetuate the chain.</p>
<p>There are many different ways built in code to achieve this, but the two main working models are <strong>PoW</strong> and <strong>PoS</strong>.</p>
<p>Between the two they currently hold a rough 70/30 split in the market.</p>
<h5>PoW &mdash; Proof of Work</h5>
<p>The original algorithm, the Bitcoin Blockchain consensus algorithm, PoW relies on nodes &lsquo;working&rsquo; to prove themselves. The &lsquo;work&rsquo; is usually achieved by mining. Mining is a competition to solve a complex computational problem, generally the node that solves the problem, gets the right to propose the next block. The network of nodes will then check the solution of the competition and the validity of the block, if it all checks out the successful miner will get the Bitcoins created out of this process.</p>
<h5>Coins:</h5>
<p>Bitcoin, Ethereum (Moved to PoS), Litecoin (another Hybrid), XMR&hellip; Most Blockchain currently (approx. 70%)</p>
<p><strong>Summary:</strong><br />Miners use hardware to solve hard computational problems to compete for the chance to create new blocks and tokens.</p>
<p><strong>Positives ➕</strong><br />It works. It is tried and tested. Top-notch integrity.</p>
<p><strong>Negatives ➖</strong><br />Energy consumption, slow and prone to 51% attacks.</p>
<h5>Point of Contention: Energy Use</h5>
<p>Bitcoin using a PoW consensus, for example, consumes 61.4 TWh annually (April 2018), compared to an Australian annual national average consumption of 224 TWh (estimate for 2014). That&rsquo;s more annual power consumption than than countries like Switzerland, Singapore and Columbia.</p>
<h5>PoS &mdash; Proof of Stake</h5>
<p>Proof of stake relies on nodes putting forward a stake in the chain. The stake is mostly tokens held as stake. The higher the stake, the more likely the consensus algorithm will pick that node for a chance to validate the block. The main benefit to this model is it&rsquo;s lighter approach to Proof. There is no mining and all tokens that exist, exist from day one of the chain.</p>
<h5>Coins:</h5>
<p>Ethereum, Decred, PIVX&hellip; (the other 30%)</p>
<h5>Summary:</h5>
<p>Blockchain participants with the most stake &mdash; time and token &mdash; are selected by algorithm for the right to propose the next block.</p>
<p>Positives ➕<br />Expensive to disrupt or attack, decentralised, low energy consumption and fast.</p>
<p>Negatives ➖<br />Nothing to lose if a validator/stakeholder backs the wrong chain.</p>
<h5>Point of Contention: Nothing to Lose / Nothing at Stake</h5>
<p>The darkness at the heart of PoS is where there is actually nothing at stake for a malicious node or stakeholder to propose or endorse a version of the chain that is not the right one.</p>
<p>Ethereum has recently updated it&rsquo;s core code with Casper &mdash; a move towards addressing Nothing at Stake &mdash; prescribing harsh penalties for going against the chain.</p>
<h5>Proof of &lsquo;X&rsquo;</h5>
<p>Beyond the main two types of consensus modelling, a whole range of proof algorithms exist. Below are three other varieties usually built on the structures of PoW or PoS, with different ways of approaching &lsquo;proof&rsquo;.</p>
<p>DPoS &mdash; Delegated Proof of Stake<br />Coins:<br />EOS, Steemit, BitShares</p>
<p><strong>Summary:</strong><br />Each token has inbuilt voting power. Token holders vote for nodes to have the right to mine/validate.</p>
<p><strong>Positives➕</strong><br />Democratic, scalable, fast and cheap.</p>
<p><strong>Negatives ➖</strong><br />Centralised.</p>
<p>PoA &mdash; Proof of Authority<br />Coins:<br />Kovan, Rinkeby and POA Network</p>
<p><strong>Summary:</strong><br />Blockchain with system administrators, identity as stake.</p>
<p><strong>Positives➕</strong><br />Great for private networks needing high throughput.</p>
<p><strong>Negatives➖</strong><br />HIGHLY CENTRALIZED.</p>
<p>Proof of Time, Proof of Space, Proof of Spacetime&hellip;<br />Coins:<br />Filecoin (Proof of Replication &amp; Proof of Spacetime), Chia</p>
<h5>Summary:</h5>
<p>Stake goes beyond token and identity and uses another relative measurement (space or IPFS data for example) to suggest which node gets to propose the next block.</p>
<p><strong>Positives➕</strong><br />Customisable to the relative measurement.</p>
<p><strong>Negatives➖</strong><br />Generally hard to create incentive. Can become centralised and committee dominated.</p>
<h5>World of Consensus</h5>
<p>These models are a sample of the possible ways consensus algorithms can operate in the Blockchain. The means to achieve consensus is as varied and as vibrant as the Blockchain itself and with each different expression and application comes new possibilities.</p>