In this chapter, we have studied IPFS. We started by looking at the motivations of the IPFS project and its history. Although IPFS is not a part of the blockchain technology, it is similar to blockchain because it complements blockchain technology. We then learned about the data structure of the content that we saved in the IPFS filesystem. This data structure is Merkle Directed Acyclic Graph (DAG), which is based on the Merkle tree. We created simple Merkle tree and Merkle DAG libraries to understand the uniqueness of these data structures. Merkle trees provide an easy way to check the integrity of partial data, while Merkle DAGs are used when we want to save a directory with files and we want to keep the filenames. Then, we learned about the peer-to-peer networking aspect of a Kademlia distributed hash table. The distance between nodes is based on the XOR distance. The...
Hands-On Blockchain for Python Developers
By :
Hands-On Blockchain for Python Developers
By:
Overview of this book
Blockchain is seen as the main technological solution that works as a public ledger for all cryptocurrency transactions. This book serves as a practical guide to developing a full-fledged decentralized application with Python to interact with the various building blocks of blockchain applications.
Hands-On Blockchain for Python Developers starts by demonstrating how blockchain technology and cryptocurrency hashing works. You will understand the fundamentals and benefits of smart contracts such as censorship resistance and transaction accuracy. As you steadily progress, you'll go on to build smart contracts using Vyper, which has a similar syntax to Python. This experience will further help you unravel the other benefits of smart contracts, including reliable storage and backup, and efficiency. You'll also use web3.py to interact with smart contracts and leverage the power of both the web3.py and Populus framework to build decentralized applications that offer security and seamless integration with cryptocurrencies. As you explore later chapters, you'll learn how to create your own token on top of Ethereum and build a cryptocurrency wallet graphical user interface (GUI) that can handle Ethereum and Ethereum Request for Comments (ERC-20) tokens using the PySide2 library. This will enable users to seamlessly store, send, and receive digital money. Toward the end, you'll implement InterPlanetary File System (IPFS) technology in your decentralized application to provide a peer-to-peer filesystem that can store and expose media.
By the end of this book, you'll be well-versed in blockchain programming and be able to build end-to-end decentralized applications on a range of domains using Python.
Table of Contents (19 chapters)
Preface
Introduction to Blockchain Programming
Smart Contract Fundamentals
Implementing Smart Contracts Using Vyper
Section 2: Web3 and Populus
Interacting with Smart Contracts Using Web3
Populus Development Framework
Building a Practical Decentralized Application
Section 3: Frontend Decentralized Applications
Frontend Decentralized Application
Section 4: Cryptocurrency and Wallets
Creating Token in Ethereum
Cryptocurrency Wallet
Section 5: Decentralized Filesystem
InterPlanetary - A Brave New File System
Using ipfsapi to Interact with IPFS
Implementing a Decentralized Application Using IPFS
Other Books You May Enjoy
Customer Reviews