Mastering Blockchain
Fourth Edition
Inner workings of blockchain, from cryptography and decentralized identities, to DeFi, NFTs and Web3
Mastering Blockchain
Fourth Edition
Copyright © 2023 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Senior Publishing Product Manager: Devika Battike
Acquisition Editor – Peer Reviews: Gaurav Gavas
Project Editor: Meenakshi Vijay
Content Development Editor: Rebecca Robinson
Copy Editor: Safis Editing
Technical Editor: Karan Sonawane
Proofreader: Safis Editing
Indexer: Manju Arasan
Presentation Designer: Rajesh Shirsath
Developer Relations Marketing Executive: Vidhi Vashisth
First published: March 2017
Second edition: March 2018
Third edition: August 2020
Fourth edition: March 2023
Production reference: 2040723
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN: 978-1-80324-106-7
Disclaimer: The information and viewpoints expressed in this book are those of the author and not necessarily those of any of the author’s employers or their affiliates.
This book is dedicated with immeasurable love and gratitude to my beloved father.The most affectionate, selfless, and hardworking man, who sacrificed everything for me.
Don’t worry, my son! Adversities come and go.
—Scientist Bashir Ahmed Khan
76 → 363 → 1245 → 1003 → 275 → 77 → 60 → 588 → 1 → 12 → 12 → 2215 →
has an MSc in Information Security from Royal Holloway, University of London. He has a background in software development, solution architecture, infrastructure management, information security, and IT service management. His current focus is on the latest technologies, such as blockchain and quantum computing. He is a member of the Institute of Electrical and Electronics Engineers (IEEE). He has worked in various senior technology roles for different organizations around the world.
I would like to thank Edward Doxey for his dedication and Packt for their support and guidance throughout this project. I also want to thank John Cornyn, who read the previous edition of this book and suggested some corrections, as well as the reviewers of this edition.
I want to thank my wife and children for their support while I was writing, especially during the time I was supposed to spend with them.
Finally, I want to thank my father, who has always been there for me and always will be. And my mother, whose encouragement makes difficult obstacles easy to surmount for me. My parents’ prayers and unconditional love for me have enabled me to achieve anything I desire.
Disclaimer: The information and viewpoints expressed in this book are those of the author and not necessarily those of any of the author’s employers or their affiliates.
is a senior blockchain architect and consultant. Brian has over 20 years of hands-on experience across various technologies, including blockchain, big data, cloud, AI, systems, and infrastructure. He has worked on more than 50 projects in his career.
He has written nine books, published by O’Reilly, Packt, and Apress, on popular fields within the blockchain domain, including Learn Ethereum, First Edition; Learn Ethereum, Second Edition; Blockchain for Teens; Hands-On Smart Contract Development with Hyperledger Fabric V2; Hyperledger Cookbook; Blockchain Quick Start Guide; Security Tokens and Stablecoins Quick Start Guide; Blockchain By Example; and Seven NoSQL Databases in a Week.
is a computer engineer and has worked in software development for the last 21 years. He has been involved in blockchain development for about 8 years using different blockchain frameworks, like Ethereum (L1, L2, L3), Substrate, Polkadot, Solana, Cosmos (IBC), CasperLabs, Tezos, etc using various programming languages like C++, Rust, Golang, Ocaml, and Haskell.
He has worked with many different crypto startups since 2014 and as a blockchain consultant, he has worked with Mina Protocol, FTX, and others.
I would like to thank my friends who have worked with me on projects related to blockchain.
To join the Discord community for this book – where you can share feedback, ask questions to the author, and learn about new releases – follow the QR code below: