Book Image

Ethereum Cookbook

By : Manoj P R
Book Image

Ethereum Cookbook

By: Manoj P R

Overview of this book

Ethereum and Blockchain will change the way software is built for business transactions. Most industries have been looking to leverage these new technologies to gain efficiencies and create new business models and opportunities. The Ethereum Cookbook covers various solutions such as setting up Ethereum, writing smart contracts, and creating tokens, among others. You’ll learn about the security vulnerabilities, along with other protocols of Ethereum. Once you have understood the basics, you’ll move on to exploring various design decisions and tips to make your application scalable and secure. In addition to this, you’ll work with various Ethereum packages such as Truffle, Web3, and Ganache. By the end of this book, you’ll have comprehensively grasped the Ethereum principles and ecosystem.
Table of Contents (13 chapters)

Introduction

It is really important to understand how to configure and work with various implementations of the Ethereum protocol before developing applications in it. There are several flavors, which can be used interchangeably for development, testing, and deployment. Keywords in Ethereum might be very new to a person who is just getting started, so it is important to understand and use the tools and services in the Ethereum ecosystem.

Ethereum is a distributed public ledger, like Bitcoin. Bitcoin acts more like a peer-to-peer electronic cash system, whereas Ethereum is a decentralized platform for building applications. Ethereum has a built-in Turing complete programming language (solidity), which can be used to write smart contracts. This means that Ethereum has a broader application than other traditional blockchains. Ethereum also has a cryptocurrency (Ether), which can be traded for value or to pay the transaction fee for applications and services in Ethereum.

POW (Proof of Work), POS (Proof of Stake), IBFT (Istanbul Byzantine Fault Tolerance), Raft, and so on are different commonly used consensus algorithms. These algorithms are used to achieve agreement on a data value among distributed systems. Each algorithm has their own advantages and disadvantages, and various blockchain platforms use them based on their requirements.

A smart contract is a computer program that outlines the rules in a relationship. Smart contracts work exactly as intended and cannot be changed at a later point in time. Once deployed, these smart contracts cannot be changed. This gives users trust and transparency. With the help of Ethereum smart contracts, you can create your own tradable tokens, raise funds for your startup, build a decentralized organization, or even make a fun game.

The recipes in this chapter will primarily focus on Ethereum configuration and platform tools, which will help the reader understand more about the Ethereum ecosystem before starting to develop applications.

While the recipes in this chapter will give you an overview of Ethereum and working with various clients, we encourage you to adopt this proposal according to your needs. Since the software used is still in development and gaining in popularity, some organization's policies and antivirus software will prevent you from using this. In such cases, it is typically a good idea to discuss this with your IT security department—if your company happens to have one—well in advance, to prevent lengthy discussions later on.