Lecture 4 - Blockchain Flashcards
What is a Blockchain?
A unique type of computerised ledger relies on cryptopgrahic techniques and new methods for consensus to capture and secure the data
- Money transactions
- Medical records
- Buying and selling goods
- Insurance policies
What is so special about blockchain?
- Distributed
- Consensus mechanism
- Encrypted
- Immutable
What is a ledger?
A ledger is a book or collection of accounts in which account transactions are recorded
Where is this ledger?
In a central location? Central banks, governments
Why is it controversial to have the ledger in a central location?
- Attack vulnerability
- Single point of contact
- Rely on middle-men
- Operational inefficiency
Types of ledgers
- Centralised ledger
- Decentralised ledger
- Distributed yet centralised
- Distributed ledger
Types of ledgers (control perspective)
- Centralised: One entity controls the entire system
- Decentralised: Multiple entities control the system
Types of ledgers (Location perspective)
- Centralised: ledgers exist at the same location
- Distributed: ledgers exist at different locations
Types of ledgers (Distributed yet centralised)
Distributed servers but controlled by a single authority
- Cloud service providers
Distributed Ledger Technology
- Distributed ledger technology
Everyone in the peer-to-peer network have an identical copy of the ledger - No single entity is the authority of the system
- System is widely distributed among entities in the network
- Blockchain
One type of DLT
Based on a P2P network
What is so special about blockchain?
Self-regulating system
- In a centralised system: administrator has the authority to update and maintain the database
- In blockchain, everyone in the network can:
Read the chain, make legitimate changes in the chain, write a new block into the chain - Blockchain is a self-regulating system
Contributions by the participants, authentication and verification of the transactions
Distributed consensus
Risk of computers programmed to introduce false information
Satoshi Nakamto (2008) proposed a solution to this problem:
- All computers in a blockchain network use a system of distributed consensus to agree upon continually updated history of transactions in a ledger
- There is only one version of the transaction ledger in bitcoin since over a decade (The trust machine)
Consensus mechanisms
- Proof of work - complex problem that needs computation power to solve (miners) based on an algorithmically adjusted difficulty. E.g. Bitcoin, Ethereum
- Proof of stake - a lottery-like system randomly rewarded to those based on how much stake (currency) they commit (have). E.g. EOS, Cardano, Ouroboros
- Proof of Authority - slightly adjusted proof of stake, validators are selected based on their reputation. E.g. IBM Hyperledger
Proof of work
- Bitcoin’s breakthrough feature
- Participants (miners) competing to win rewards in Bitcoin in the presence of a computational cost
- Each miner collects a set of pending transactions (block: a list of ~2000 transactions)
- While simultaneously competing to find a randomly chosen string (~10 minutes to find)
- Once a miner finds the required string, they broadcast the string and the block (gets a reward of 6.25 BTC + fees)
- Fraud?
- Computationally infeasible
- Controversies
- Energy intensive
- Costly barriers of entry for miners
How to update the ledger?
The process of blockchain:
- Transaction
- Transaction broadcasted to the network
- Nodes / Peers validate the transaction
- Validated transaction added to a new block
- New block added to the blockchain
- New block distributed to all nodes
- Transaction complete
How secure is blockchain?
- Users have control over their transactions (or a cryptocurrencies) via digital signature system by which they indicate consent to transfer goods (coins)
These digital signatures are:
- public
- cannot be forged
- can be verified by anyone
Digital signatures in blockchain (pt 1)
Every user has a:
- private key (only the user can see it)
- public key (everyone in the network can see it)
Digital signatures in blockchain (pt 2)
256-bit digital signature is produced based on:
- the document (message), John pays Ashley 100$)
- private key, John’s private key
How does Ashley (or anyone) verify that it is indeed John that signed this document?
- Verification function (True / False) based on
- Digital signature (John’s Digital signature)
- The message (John pays Ashley 100 $)
- Public key (John’s public key that anyone can see)
When Ashley verify John’s signature
* Extremely confident that it is indeed John
What does a block store?
- Timestamp - time when the block was mined
- Block number - the length of the blockchain in blocks
- Difficulty - effort required to mine the block
- Hash - unique identified for that block
- A parent hash - unique identifier for the block that came before (this is how blocks are linked in a chain)
- Transaction list - transactions included in the block
- Nonce - a hash that, when combined with the mixHash, proves that the block has gone through proof of work
Changing Blocks
One needs to compete with all the other miners in the network to find new Hash for the rest of the blocks
Unless someone has more than 50% of the computational power of all the miners combined
- you cannot change a block in the blockchain
- 51% attack
Computationally infeasible to change a block
- Immutability
Top 10 Blockchain Adoption Challenges
- Inefficient Technological Design
- The criminal connection
- Scalability
- Privacy
- Security
- Public perception
- Blockchain canoe slow and cumbersome
- Lack of adequate skill set
- Regulation
- Energy consumption