Some of my notes on this fun introduction to Blockchain and Ethereum by Max Fang. He goes over some buzz words to be explained, fundamental concepts and use cases.
Distributed: Peers/nodes separated by a network. You can have a large number of peers crash in this network, or attack the other nodes, but the network should still be able to function. This makes it really resilient. Byzantine fault tolerance: this blockchain system can tolerate a third of its peers trying to attack the network. It still functions.
No central point of failure means the blockchain is resilient, but that also means there’s no central point of control. Have faith in the technology itself.
Mutable means you can’t change the data once you’ve added it to the ledger. This is great for the history, as you can look at the history of the blockchain.
Consensus. What does it mean to come to Consensus? It means everyone agrees on the current state. (How much money does an account have?) If you want to change the blockchain itself, you need to go through a consensus process to make sure everything’s been validated correctly. To do this, you need a cryptographic identity. It allows you to own things. This comes in the form of a public key and a private key–you can think of as an email address and a password. You give others your public key when you want to receive bitcoin, and you need to sign with your private key whenever you want to send it.
How you reach consensus is one of the primary innovations of blockchain. You have to decide between these algorithms (common consensus algorithms).
Blockchain is an umbrella term, usually referring to smart contract platforms or ICOs. You also hear “private blockchains” or “private ledgers” which came out of the private communities who want private blockchains. “Distributed ledger technology” is non-blockchain but closely related.
If you’ve heard ‘blockchain is a ledger’, what does this mean? A ledger: imagine an excel sheet where you continually add rows. It can contain whatever information you want. Whatever asset, who owns it. You can store memory and storage of a computer.
Fundamentally, blockchain is a database. You have centralized databases and then distributed databases. A distributed ledger is like a distributed database, except the nodes in the network don’t necessarily trust each other, so they need a consensus algorithm to update the state.
A blockchain is a more specific form of a distributed ledger where you have so-called blocks which contain transactions, and each of these blocks references the previous block, and that’s why it is called a blockchain. Distributed ledgers don’t necessarily have that data structure.
There are many types of blockchains. Vitalik Buterin’s definition of three types:
Public blockchain: everyone can use it, anyone can participate in the consensus process.
A consortium blockchain is where a blockchain is where the consensus process is controlled by a preselected set of nodes: 15 banks and they trust 10 out of 15. So for every block you need 10 out of 15 to agree that it is valid.
A fully private blockchain is a blockchain where write permissions are kept centralized to one organization. Read permissions may be public or restricted to an arbitrary extent. This isn’t always a great use case for blockchain.
Private can sometimes also mean consortium, according to some people.
Ethereum and smart contracts. Ethereum is a decentralized smart contract platform. It’s very different from Bitcoin–it’s designed to add as many features as possible. Ethereum aims to be built like a decentralized computer, while Bitcoin aims to be a decentralized asset.
Ethereum has a Turing complete scripting language, much more powerful than what you can do with Bitcoin script. Turing Complete means that the language in which you write these smart contracts on Ethereum has the full expressive power of any other modern programming language. Ethereum also needs a native asset. In Ethereum this is called Ether. It allows you to program your money, align incentives. A useful tool within this ecosystem.
Ethereum is also considered a distributed state machine. Think of Git. Every transaction you’re making to the Ethereum network is some change or some commit. You use these transactions to move between different blocks which represent different states. Think of it as a decentralized computer.
It’s a blockchain system, so it is trustless, distributed, immutable.
What’s a smart contract?
First, what’s a contract? We have an agreement with someone and we want to make sure this agreement is enforced in case either of us tries to wrong the other party.
A smart contract: Code that facilitates, verifies or enforces the negotiation or execution of a digital contract. if you take the terms of that agreement and write it into programmatic code (such that if you just execute this code correctly, its automatically enforced). Now you just need a trusted entity to run the code. So, why don’t you use Ethereum? Ethereum network runs this code. The network itself runs this code and executes all these smart contracts. Some benefits:
-Network consensus removes need for Trusted Third Party
-No one can violate this contract. If you want to change the outcome of this contract, you can’t just change the outcome of this contract, you can’t just attack that single contract, you would need to subvert the entire Ethereum network itself, which is harder to do.