Introduction to Blockchain Technology. Tiana Laurence
Чтение книги онлайн.
Читать онлайн книгу Introduction to Blockchain Technology - Tiana Laurence страница 15

The number of miners competing for bitcoins changes frequently because each miner is participating willingly and freely. The Proof of Work algorithm will adjust the difficulty of the problem the miners are solving in order to maintain a more consistent time between blocks and to ensure the security of the transactions that are being secured in each block.
It is not uncommon for more than one miner to solve a block problem concurrently. When this happens, miners pick one of the wining blocks to continue building their chain. The longest chain wins. It is recommended that you wait for at least six blocks before confirming a transaction. You do this to ensure that enough blocks have been secured on top of the block your transaction was placed within.
The Bitcoin blockchain is protected from corruption as long as 51% or more of the blocks being created by miners are legitimate. The miners are economically incentivized only to produce valid blocks.
PoW tends to be used for peer-to-peer transaction between parties that are not connected. It can be expensive to scale applications that are built within PoW blockchains (Decentralized application, DApp) as they can be expensive and cumbersome to operate.
Figure 15 Proof of Work.
Pros:
■ It has been tested since 2009 and still works great;
■ It is slower and safer - you know your transaction will not be rolled back;
■ It is trustless - no one can block your transaction from processing.
Cons:
■ It’s slow - you have to wait for your transaction to be confirmed;
■ It’s costly - transaction costs can go up with the number of users;
■ It’s susceptible to centralization over time - those with the most recourses can pool together their efforts in mining.
3.2 Proof of Stake (PoS)
Proof of Stake (PoS) is a competitive consensus algorithm. It was created as an alternative to the Proof of Work (PoW) because blockchains had difficulty meeting the transaction speed demands.
PoS nodes do not mine cryptocurrency. Users can put some of their cryptocurrency, from a blockchain, in a retainer. This retainer allows the user to “stake” that they will process transactions honestly and by the rules of the consensus system. If the user fails to do so, they will forfeit their cryptocurrency. It is becoming popular in public blockchain networks as it is a low-cost alternative that supports greater decentralization.
Proof of Stake allows anyone to participate at any level in the creation and maintenance of the network. The one catch is that a node operator must have the minimum amount of cryptocurrency needed to stake. If they do, they can process transactions for the network. The node’s probability of securing the next block and being rewarded for doing so is equivalent to the percentage of cryptocurrency they stake.
In the event that there are two or more competing blocks (known as a fork) in the Proof of Stake algorithm, you can stake your cryptocurrency on both blocks without consequence. This is called the “nothing-at-stake” problem. It is important to note that in a Proof of Work system it is not economically viable to mine on both chains. But in PoS, there is little cost involved in working on several chains and an economic incentive to do so. There are open questions regarding what rules would be applied across PoS environments when situations arise where a staker is nefarious from start. See figure 16.
Pros:
■ It is energy efficient and does not burn electricity when mining;
■ It can be more expensive to attack than PoW - hackers need to purchase a large percentage of the native cryptocurrency;
■ It scales easily to handle transaction load and size.
Cons:
■ Rewards are weighted to those who stake their cryptocurrency the longest. The longer a miner stakes, the greater the reward. The network structure allows wealthy stakers to control more of the network and this may cause centralization and censorship.
PoS is used by Ethereum, Peercoin and Nxt.
Figure 16 Proof of Stake.
3.3 Delegated Proof of Stake
The competition to be a validator happens outside of consensus. Those with better websites and social media accounts, at this point, are selected. Delegated Proof of Stake (DPoS) is a collaborative effort, and nodes that are validating transactions are rewarded equally in this consensus system.
As a stakeholder you elect “witnesses” who will validate transactions and create blocks for the network. EOS, one of the most popular DPoS blockchains, only has 21 witnesses.
Each of the EOS witnesses are paid fees for producing blocks, and the fee is set by the stakeholders.
The witness nodes produce blocks one at a time in a round-robin fashion, or by random selection. Witnesses can’t publish consecutive blocks or execute double-spending attacks where they allow cryptocurrency to be sent twice or more from the same address without updating the ownership. This would be the equivalent to writing checks from an empty bank account that you don’t own. The person you wrote the check to believes they have been paid, but once the check is processed by the bank, it is rejected, and they learn that they have been defrauded.
Конец ознакомительного фрагмента.
Текст предоставлен ООО «ЛитРес».
Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.
Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.