Introduction to blockchain
- Blockchain quick introduction
Exchanging things of value usually relies on trusted third parties.
Trusted third parties add extra cost, and can introduce human error or corruption.
The blockchain helps to exchange things of value without a trusted third party.
2. Cryptocurrency
Bitcoin is an implementation of blockchain technology.
Cryptocurrency is a digital currency.
Blockchain uses cryptography to ensure integrity.
3. Why use the blockchain
Exchanging value without trust.
Eliminating middlemen and reducing costs.
Efficiency through direct interaction.
Complete transaction history.
Resilience through replication.
Transparency.
4. Blockchain data and blocks
Most programs support CRUD operations on data (create, read, update, and delete)
The blockchain only allows create (add) and read.
The blockchain is like one long ledger where data is added and added and added.
Blockchain payment transactions basically consist of an amount, a source, and a target.
Any type of data can be stored in a database can be stored on the blockchain.
5. Blockchain immutability
Blockchain data is stored on multiple nodes (devices).
Each node stores an identical copy of the blockchain.
Nodes compare their copies of the blockchain and can tell if anything has changed.
6. Blockchain Consensus
No node has more authority than another.
Nodes use consensus to agree to add blocks to the blockchain.
Consensus is achieved when more than half the nodes agree. At least 3 servers.
7. A chain of blocks
The genesis block, or block 0, is the first block in a blockchain.
Each block is linked by storing the previous block’s hash.
The body of each block contains the transactions.
If data in any block is changed, it changes its hash, thus breaking the link to each block after it.
8. Finding the nonce
Hash complexity requirements make it difficult to spoof blocks.
A nonce is a value added to block data to create a new hash.
Finding the correct nonce to meet complexity requirements takes a lot of computational power and energy.
Hashes make blockchain work.
9. Blockchain mining
Mining is the process of calculating the correct nonce.
Mining is resource-intensive and requires special mining rigs.
Miners get paid a reward for calculating the nonces to add blocks to the blockchain.
10. Building Process
Request submitted to blockchain node.
When node has enough data, it organizes and adds header.
Block is submitted for consensus.
If accepted, each node validates block and adds to their local blockchain copy.
11. Public vs. private blockchains
Public blockchains are permissionless, anyone can participate, and all information is shared among every node.
Private blockchains are permitted, only authorized nodes can access.
Full nodes download entire copies of the blockchain.
Lightweight nodes only download the most recent blocks.