Lecture
Decentralized Consensus and Blockchains
- Learn the fundamentals of decentralized consensus and the blockchain data structure
Slides
Google Sheets
Ch3.1 Overview
Block
- A bunch of data that is hashed and propagated to the network (often the data is transactions that change the state).
Blockchain
- Adding a pointer from each block to the block before it, creating a chain of blocks. This way if something changes in a past block it would change the hashes for all future blocks too. The dependency of each block on the block that came before it ties them together in a "chain".
Fork Choice Rule
- The rules that determine how nodes on a network choose forks. In Bitcoin this is to always choose the longest valid fork.
Confirmations
- When a block is added on top of another block, signalling that everything in that original block is valid
Consensus
- Making sure that all nodes on a network agree on the same state.
Recommended Resources
But how does a blockchain work? - Awesome video by 3Blue1Brown explaining how blockchains work.
Anders Brownworth's blockchain demo - Put data in a block, "mine" (hash) it, then add data to the next block, "mine" (hash) it, etc... The "mine" button perfoms the state transition function and you can see the history (blockchain) being created right in front of you.
Ethereum Stack Exchange: Fork Choice Rule - Fork choice rule explained.
Truffle Ethereum Overview - Truffle is one of the most popular frameworks for building, testing, and deploying applications on Ethereum.
Solidty Docs: intro to blocks - Solidity is the language for Ethereum contracts, but their docs also have great explanations of blockchain basics like blocks.