
Hands-On Blockchain for Python Developers
Gain blockchain programming skills to build decentralized applications using Python
Arjuna Sky Kok

BIRMINGHAM - MUMBAI
Hands-On Blockchain for Python Developers
Copyright 2019 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 or 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.
Commissioning Editor: Sunith Shetty
Acquisition Editor: Devika Battike
Content Development Editor: Athikho Sapuni Rishana
Technical Editor: Utkarsha Kadam
Copy Editor: Safis Editing
Language Support Editor : Storm Mann
Project Coordinator: Kirti Pisat
Proofreader: Safis Editing
Indexer: Manju Arasan
Graphics: Jisha Chirayil
Production Coordinator: Tom Scaria
First published: February 2019
Production reference: 1120219
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78862-785-6
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Packt.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Foreword
The Movement
This book you're holding in your hands is part of a new movement: The movement of mainstream decentralization. The movement of Blockchain, DLT, and distributed applications. The movement that will rearchitecting many of our future systems, very soon.
Decentralized and distributed architectures, consensus rules, and P2P networks, are of course much older than Blockchain itself. However, Blockchain perfected the integration of these elements with some really ingenious concepts, and showed the world that the previous traditional architecture was not the be-all-and-end-all.
Blockchain's first use-case was Bitcoin, and Bitcoin managed to be something very interesting and rare: a killer app. All technologies, whether they are databases, network devices, touch-screens, high performance computing (HPC), or Big Data, seek killer apps. The iPhone was a killer app for a ton of technologies, but primarily touchscreen and computing hardware miniaturization technologies. Google's search engine was arguably the killer app for Big Data, and then High-Performance Computing as well. IBM's Watson is trying to be the killer app for enterprise-class AI. Oculus Rift is trying to be the killer app for VR. A ton of technologies out there are still looking for their killer app.
My point is, Blockchain got lucky: It found its killer app very earlyduring its birth. This is why a huge number of people in the media and the general public (even so-called tech-savvy people) have trouble differentiating between Blockchain and Bitcoin and other cryptocurrencies.
Since you're holding this book, I'm confident you're not one of these people.
I'm sure you're familiar with the mantra: Bitcoin is Blockchain, but Blockchain is not [just] Bitcoin.
The Expansion
This book brings you an end-to-end overview for creating awesome solutions on the Blockchain. Arjuna has done an amazing job at gathering the topics and researching them. You'll learn to create everything from smart contracts to decentralized apps to Blockchain-based (and Blockchain-friendly) filesystems.
My suggestion for when you begin architecting these solutions is to keep Bitcoin in mind, just as a reference point. It is the killer app, after all. It's the longest running security experiment for a Blockchain consensus mechanism. It's the widest-adopted financial technology without a central banking system. It's helped a lot of people directly and indirectly, including myself.
But what you have to do is expand upon the concept, just like the ecosystem used to expand from just Bitcoin to the current explosion of technologies, platforms, and solutions. Let your mind be creative. Think of ways that Bitcoin brought value to millions of people and companies all over the world, and break it down into actual business value that you can implement in your solution. Identify the weaknesses of Bitcoin, and explore other technologies in the Blockchain jungle that you can use. Ethereum is just one of these technologies. Nxt, Hyperledger (from Fabric to Indy), and IOTA, and so on, are others. Explore technologies and explore the histories of these technologies, why they were created, and what value they bring.
The Garden
Blockchain itself is a garden of competing solutions. Your role is that of a botanist, who explores the outgrowth of these technologies as responses to other technologies; or organisms competing with other organisms. This book gives you a taste of multiple technologies you may use, and there are many more waiting for you.
This is the only way to understand Blockchain in full: Enter the garden.
Have a safe journey,
Pandu Sastrowardoyo
Secretary-General, Asosiasi Blockchain Indonesia
Chief Technology Officer of Kendi.io
Cofounder of Blockchain Zoo
Senior Consulting Partner at Blocksphere
Contributors
About the author
Next page