Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Blockchain for Python Developers

You're reading from   Hands-On Blockchain for Python Developers Gain blockchain programming skills to build decentralized applications using Python

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781788627856
Length 450 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Arjuna Sky Kok Arjuna Sky Kok
Author Profile Icon Arjuna Sky Kok
Arjuna Sky Kok
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Blockchain and Smart Contracts
2. Introduction to Blockchain Programming FREE CHAPTER 3. Smart Contract Fundamentals 4. Implementing Smart Contracts Using Vyper 5. Section 2: Web3 and Populus
6. Interacting with Smart Contracts Using Web3 7. Populus Development Framework 8. Building a Practical Decentralized Application 9. Section 3: Frontend Decentralized Applications
10. Frontend Decentralized Application 11. Section 4: Cryptocurrency and Wallets
12. Creating Token in Ethereum 13. Cryptocurrency Wallet 14. Section 5: Decentralized Filesystem
15. InterPlanetary - A Brave New File System 16. Using ipfsapi to Interact with IPFS 17. Implementing a Decentralized Application Using IPFS 18. Other Books You May Enjoy

Consensus

As we can see, the hashing function makes history tampering hard, but not too hard. Even if we have a blockchain that consists of 1000 blocks, it would be trivial to alter the content of the first block and change the 999 parent hashes on the other blocks with recent computers. So, to ensure that bad people cannot alter the history (or at least make it very hard), we distribute this append-only database to everyone who wants to keep it (let's call them miners). Say there are ten miners. In this case, you cannot just alter the blockchain in your copy because the other nine miners who would scold, saying something like hey, our records say history A but your record says B. In this case, the majority wins.

However, consensus is not just a case of choosing which blockchain has been chosen by the majority. The problem starts when we want to add a new block to the blockchain...

You have been reading a chapter from
Hands-On Blockchain for Python Developers
Published in: Feb 2019
Publisher: Packt
ISBN-13: 9781788627856
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime