Book Image

Blockchain By Example

By : Bellaj Badr, Richard Horrocks, Xun (Brian) Wu
Book Image

Blockchain By Example

By: Bellaj Badr, Richard Horrocks, Xun (Brian) Wu

Overview of this book

The Blockchain is a revolution promising a new world without middlemen. Technically, it is an immutable and tamper-proof distributed ledger of all transactions across a peer-to-peer network. With this book, you will get to grips with the blockchain ecosystem to build real-world projects. This book will walk you through the process of building multiple blockchain projects with different complexity levels and hurdles. Each project will teach you just enough about the field's leading technologies, Bitcoin, Ethereum, Quorum, and Hyperledger in order to be productive from the outset. As you make your way through the chapters, you will cover the major challenges that are associated with blockchain ecosystems such as scalability, integration, and distributed file management. In the concluding chapters, you’ll learn to build blockchain projects for business, run your ICO, and even create your own cryptocurrency. Blockchain by Example also covers a range of projects such as Bitcoin payment systems, supply chains on Hyperledger, and developing a Tontine Bank Every is using Ethereum. By the end of this book, you will not only be able to tackle common issues in the blockchain ecosystem, but also design and build reliable and scalable distributed systems.
Table of Contents (13 chapters)

Background

The Ethereum Virtual Machine (EVM) operates on words that are 256 bits, or 32 bytes, in size. Each 256-bit word of data costs 20,000 gas units to store, equating to 640,000 gas units per kilobyte. At the time of writing, the gas price is around 4.5 Gwei (0.0000000045 ETH), making a kilobyte of data cost 0.00288 ETH.

Scaling this up gives a cost of 2,880 ETH per GB of data, with the current price of $220 per ETH giving each GB a price tag of $621,000. This is an extremely high cost as compared to conventional centralized cloud storage, where the costs per GB are usually in the region of cents.

If we can't store large amounts of data in the blockchain itself, then the logical alternative would be to store it in a centralized storage layer, while making it available to the data layer located on a blockchain. An example of this would be a DApp that uses the blockchain...