Book Image

Blockchain Developer's Guide

By : Brenn Hill, Samanyu Chopra, Paul Valencourt, Narayan Prusty
Book Image

Blockchain Developer's Guide

By: Brenn Hill, Samanyu Chopra, Paul Valencourt, Narayan Prusty

Overview of this book

Blockchain applications provide a single-shared ledger to eliminate trust issues involving multiple stakeholders. It is the main technical innovation of Bitcoin, where it serves as the public ledger for Bitcoin transactions. Blockchain Developer's Guide takes you through the electrifying world of blockchain technology. It begins with the basic design of a blockchain and elaborates concepts, such as Initial Coin Offerings (ICOs), tokens, smart contracts, and other related terminologies. You will then explore the components of Ethereum, such as Ether tokens, transactions, and smart contracts that you need to build simple DApps. Blockchain Developer's Guide also explains why you must specifically use Solidity for Ethereum-based projects and lets you explore different blockchains with easy-to-follow examples. You will learn a wide range of concepts - beginning with cryptography in cryptocurrencies and including ether security, mining, and smart contracts. You will learn how to use web sockets and various API services for Ethereum. By the end of this Learning Path, you will be able to build efficient decentralized applications. This Learning Path includes content from the following Packt products: • Blockchain Quick Reference by Brenn Hill, Samanyu Chopra, Paul Valencourt • Building Blockchain Projects by Narayan Prusty
Table of Contents (37 chapters)
Title Page
Copyright
About Packt
Contributors
Preface
Index

Proof of Stake


PoS has the same objectives as PoW to secure the network against attack and to allow consensus to occur in an open network. The first digital currency to use this method was Peercoin, and was followed by many others, such as NXT, Dash, PIVX, and so on. In PoW networks, solving the puzzle is what determines which node gets to create the next block in the chain. In PoS networks, blocks are said to be forged instead of mined, as they are in proof-of-work blockchains. In PoS chains, the validators get rewarded by getting paid the transaction fees for each block, and sometimes in additional coins created automatically each time a block is created. In PoS chains, the chance to be the creator of the next block is determined by the amount of investment a node has in the network.

Have a look at the following example:

There are five nodes in a PoS network. They have the following balances:

  1. 10,000 coins
  2. 200 coins
  3. 300 coins
  4. 4,000 coins
  5. 20,500 coins

The total number of tokens is 35,000 coins....