Blockchain
Learn how new data is stored and written in a blockchain.
We'll cover the following...
In the previous lessons, we learned that blockchain is a data structure used to store data in both Bitcoin and Ethereum. Now, we're ready to discuss what a blockchain is, how it's organized, and how it differs from regular databases. We'll also see how data is written to a blockchain.
Data in a blockchain
Before diving into how a blockchain works, let’s step back and think about what the potential design goals of this data structure are. There are at least three:
Decentralized: No actor has admin privileges in the system; all the participants have equal permissions.
Auditable: Everyone can verify that all the changes were performed according to the system rules. A system can have multiple rules, such as a requirement that only an owner can transfer their funds.
Censorship-resistant: No actor in the system can prevent a transaction from happening.
To achieve those goals, data in a blockchain is not organized as a table in a database that can be changed and rewritten. In a regular database, if a value is changed, we usually can’t get the previous versions of the same data or verify that all state changes were done according to the ...