Blockchain 101
- A blockchain is a chain of blocks that contains information or data.
- Blockchains are used for the secure transfer of items. The item could vary from money to contracts.
- Blockchain does not require a third party
- A blockchain is a software protocol (like email)
- Blockchain has to have access to the internet
- Blockchain is also called meta technology
- Blockchain affects other technologies
- Once data is stored in a blockchain, it is extremely difficult to change it
- Blockchain enables bitcoin, but is not bitcoin
- Bitcoin is a digital token
- Blockchain is a ledger
- A block contains the information stored, which depends on the type of the blockchain
- The first block is called a genesis block
- A block has a Hash
- A Hash is like a unique fingerprint of the block
- A Hash is a combination of letters and numbers
- If the data is changed in a block, the hash is also changes
- Each block contains the data, the hash and the hash of the previous block
- The genesis block has no previous hash
- If the attacker changes the hash of a block, then the following block is invalid because they do not have the correct hash of the previous block
- Changing a single block can make the entire chain invalid
- Computers are becoming more and more powerful, so they can decode a whole chain quickly and make it all valid
- Proof of work(POW) is used.
- POW is a mechanism that slows down the creation of new blocks
- A POW is a computational problem that takes a certain effort to solve
- It takes some time to solve the POW
- if the attacker tampers with a single block, they need to recalculate all the following blocks
- P2P is another method used
- Everyone on the network has a full copy of the blockchain
- Each computer is called a node
- When a user creates a new block, the block is sent to every user on the network
- Each node needs to verify the block
- Once verifies, the block is added
- Al the nodes need to create a consensus and reject all blocks that are tempered with
- To temper with a blockchain, the attacker needs to do three things
- The attacker needs to tamper with all blocks on the chain
- The attacker needs to redo the POW for each block
- The attacker needs to take control of the majority (more than 50) of the P2P network
- There are generally 4 steps of a blockchain
- Step 1: A person requests a transaction
- Step 2: The request is broadcasted to P2P from nodes
- Step 3: The network of nodes validates the transaction
- Step 4: Once the transaction is complete, the new block is added
- A blockchain is resilient, so if a node is down, there are still many nodes running the system
- Blockchain is quick and is faster without a third party
- Blockchain is reliable
- Blockchain is unchangeable (nearly)
- Blockchain is secure
- Blockchain does not have a centralized system
- There are three general versions of bitcoin
- 1.0: the blockchain is used in currency and payments
- 2.0: Smart contract is implemented, and small computer programs are within blockchains
- The computer programs execute automatic checks
- 3.0: A DApp can have frontend Blockchain example code and user interfaces written in any language that can make a call to its backend, like a traditional App
- There are also 3 main variants of blockchain
- Public: anyone can verify and add a block of transaction
- Private: works within a single organization. It allows only specific people to verify and add transaction blocks
- Consortium: Only a group of organizations can verify and add transactions. It is also only controlled by pre-authorized nodes
There are not quite 101 points for a basic tutorial, but there are a lot more once you dive deeper. This is meant to give a basic overview of blockchain, so it is not meant to be a detailed guide.