Mastering Blockchain
eBook - ePub

Mastering Blockchain

Imran Bashir

Compartir libro
  1. 656 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering Blockchain

Imran Bashir

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Publisher's Note: This edition from 2018 is outdated and does not cover the latest insights on consensus algorithms, Ethereum 2.0, tokenization, and enterprise blockchains. A new and updated edition of this book that includes all the newest developments and improvements in Blockchain including the above topics is now available.

Learn about cryptography and cryptocurrencies, so you can build highly secure, decentralized applications and conduct trusted in-app transactions.

Key Features

  • Get to grips with the underlying technical principles and implementations of blockchain
  • Build powerful applications using Ethereum to secure transactions and create smart contracts
  • Explore cryptography, mine cryptocurrencies, and solve scalability issues with this comprehensive guide

Book Description

A blockchain is a distributed ledger that is replicated across multiple nodes and enables immutable, transparent and cryptographically secure record-keeping of transactions. The blockchain technology is the backbone of cryptocurrencies, and it has applications in finance, government, media and almost all other industries. Mastering Blockchain, Second Edition has been thoroughly updated and revised to provide a detailed description of this leading technology and its implementation in the real world.

This book begins with the technical foundations of blockchain technology, teaching you the fundamentals of distributed systems, cryptography and how it keeps data secure. You will learn about the mechanisms behind cryptocurrencies and how to develop applications using Ethereum, a decentralized virtual machine. You will also explore different other blockchain solutions and get an introduction to business blockchain frameworks under Hyperledger, a collaborative effort for the advancement of blockchain technologies hosted by the Linux Foundation. You will also be shown how to implement blockchain solutions beyond currencies, Internet of Things with blockchain, blockchain scalability, and the future scope of this fascinating and powerful technology.

What you will learn

  • Master the theoretical and technical foundations of the blockchain technology
  • Understand the concept of decentralization, its impact, and its relationship with blockchain technology
  • Master how cryptography is used to secure data - with practical examples
  • Grasp the inner workings of blockchain and the mechanisms behind bitcoin and alternative cryptocurrencies
  • Understand the theoretical foundations of smart contracts
  • Learn how Ethereum blockchain works and how to develop decentralized applications using Solidity and relevant development frameworks
  • Identify and examine applications of the blockchain technology - beyond currencies
  • Investigate alternative blockchain solutions including Hyperledger, Corda, and many more

Who this book is for

This book will appeal to those who wish to build fast, highly secure, transactional applications. It targets people who are familiar with the concept of blockchain and are comfortable with a programming language.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering Blockchain un PDF/ePUB en línea?
Sí, puedes acceder a Mastering Blockchain de Imran Bashir en formato PDF o ePUB, así como a otros libros populares de Computer Science y Cryptography. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2018
ISBN
9781788838672
Edición
2
Categoría
Cryptography

Further Ethereum

This chapter is the continuation of the previous chapter. We will examine more concepts of Ethereum such as programming languages that can be used to program smart contracts on Ethereum.
We will also cover both a practical and theoretical in-depth introduction to wallet software, mining, and setting up Ethereum nodes. Material on various challenges, such as security and scalability faced by Ethereum, will also be introduced. Additionally, trading and market dynamics will be discussed. Moreover, prominent advanced supporting protocols such as Swarm and Whisper will also be introduced in this chapter.
Ethereum has several programming languages built-in to support smart contract development. We will start with programming languages and will gradually discuss other relevant topics.
This chapter includes discussion of the elements of Ethereum blockchain that we started in the previous chapter, Chapter 10, Ethereum 101. These elements include
  • Programming languages
  • Blocks and Blockchain
  • Nodes and miners
  • Wallets and client software
  • APIs (Web3)
  • Supporting protocols
First, we will introduce programming languages which are used to develop smart contracts on the Ethereum blockchain.

Programming languages

Code for smart contracts in Ethereum is written in a high-level language such as Serpent, LLL, Solidity, or Viper and is converted into the bytecode that EVM understands for it to be executed.
Solidity is one of the high-level languages that has been developed for Ethereum with JavaScript like syntax to write code for smart contracts. Once the code is written, it is compiled into bytecode that's understandable by the EVM using the Solidity compiler called solc.
Official Solidity documentation is available at http://solidity.readthedocs.io/en/latest/.
Low-level Lisp-like Language (LLL) is another language that is used to write smart contract code. Serpent is a Python-like high-level language that can be used to write smart contracts for Ethereum. Vyper is a newer language which has been developed from scratch to achieve a secure, simple, and auditable language.
More information regarding Vyper is available at https://github.com/ethereum/vyper.
LLL and Serpent are no longer supported by the community and their usage has almost diminished. Most commonly used language is Solidity, which we will discuss at length in this chapter.
For example, a simple program in Solidity is shown as follows:
pragma solidity ^0.4.0; contract Test1 { uint x=2; function addition1(uint x) returns (uint y) { y=x+2; } } 
This program is converted into bytecode, as shown in the following subsection. Details on how to compile Solidity code with examples will be given in Chapter 13, Development Tools and Frameworks.

Runtime bytecode

Raw hex codes:
606060405260e060020a6000350463989e17318114601c575b6000565b346000576029600435603b565b60408051918252519081900360200190f35b600281015b91905056 
Opcodes:
PUSH1 0x60 PUSH1 0x40 MSTORE PUSH1 0x2 PUSH1 0x0 SSTORE CALLVALUE PUSH1 0x0 JUMPI JUMPDEST PUSH1 0x45 DUP1 PUSH1 0x1A PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN PUSH1 0x60 PUSH1 0x40 MSTORE PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV PUSH4 0x989E1731 DUP2 EQ PUSH1 0x1C JUMPI JUMPDEST PUSH1 0x0 JUMP JUMPDEST CALLVALUE PUSH1 0x0 JUMPI PUSH1 0x29 PUSH1 0x4 CALLDATALOAD PUSH1 0x3B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x2 DUP2 ADD JUMPDEST SWAP2 SWAP1 POP JUMP 

Opcodes and their meaning

There are different opcodes that have been introduced in the EVM. Opcodes are divided into multiple categories based on the operation they perform. The list of opcodes with their meaning and usage is ...

Índice