An Overview of Blockchain Technologies and Uses Andy Dolan • Computer Science Department • Colorado State University
Outline ● An Introduction to Bitcoin ● The Core Features: What is a Blockchain? ● Distributed Consensus Image: Jay’s Brick Blog
The Killer App: Bitcoin Putting blockchain on the map
Introduction ● What is it?: A cryptocurrency ● What is it not?: Blockchain ● How does it work?: Blockchain � ● Price per 1 at time of writing: $10,217.90
Advantages ● No central authority ○ Self-governed ○ Community driven/maintained ● “Anonymous” ○ In quotes for a reason, as we’ll see later ● Public ○ Auditing ○ Validation
Disadvantages ● No central authority ○ No real “ground truth” regulators ● “Anonymous” ○ Illegal payments made easier ● Massive computational requirements ○ Trading power for distributed trust
A First Transaction A high level view of how Bitcoin functions
A First Transaction (1/4) � ● Alice want to buy coffee from Bob for 1 ● We have a few goals ○ Transfer from Alice to Bob the ownership of 1 bitcoin ○ Everyone should agree that this transaction took place and is valid ○ Everyone should be able to audit and validate this transaction
A First Transaction (2/4) ● Alice creates the transaction and signs it with her private key ○ Now Bob can verify that the transaction was initiated/created by Alice ● Alice also “locks” the funds with Bob’s public key ○ Now only Bob’s private key can “unlock” them
A First Transaction (3/4) ● Alice tells everyone about this transaction ○ Including Bob, of course ● Peers on the Bitcoin network listen for new transactions ● Special peers “race” to add this transaction to a new block ○ “Miners” ● First miner to do it broadcasts the new block ● The block propagates just as the transaction did
A First Transaction (4/4) ● Everyone now validates the block ○ Appending it to their local copy of the chain � ● Bob can now assert that he owns the 1 ○ He is backed up by the rest of the network ○ Furthermore, everyone can validate that the coin came from Alice ○ And so on
First Transaction Review ● Through this example, we saw: ○ Cryptographic integrity ○ Eventual consistency of distributed data ■ Consensus ○ Immutability (subtle, but present) ● Bitcoin is not Blockchain, but is built on Blockchain
Questions so far?
The Core Features What is a blockchain?
In a Sentence A blockchain is a distributed data structure that takes the form of an immutable, append-only ledger, maintained by a network of peers that use cryptography and consensus to ensure consistency.
Core Feature Overview ● Immutability ● Ledger ○ Full ○ Append-only ● Distributed ○ Consensus ● Verifiable
Transactions ● “Transaction:” misleading name ● Not necessarily a transfer of some ownership ● Just individual instances of some action or data ● Even further, just log entries
Blocks ● Collections of transactions ○ Can be one, can be one million ● Easily summarized ○ Hash for each and every block ○ Kept with other metadata in block header ● The transactions are really what’s summarized ● Why process transactions in batches anyway?
Format of Blocks ● A block is organized for easy verification ○ Merkle tree ● Root hash acts as a summary of the block ● Each block refers to the previous block’s hash ● Auditors can verify that history hasn’t changed
Merkle Trees ● Easy verification ● Simple binary search to find where something invalid is ● This is an optimization
Merkle Tree Example
Why a Chain? Hash(data) Hash(data) Hash(data)
The Chain - Imaginary View
True Block Format ● Root of Merkle tree: summary of transactions ● Block header contains reference to parent (previous) block’s root hash ○ This is just a linked list ● Block header is included in Merkle tree
The Chain - Real View
Why a Chain? ● What happens when we change any part of any transaction? ● What do validators need to check, at a minimum? ● What is required to change an old transaction? ○ Not too hard to do locally, but what about when we consider...
Questions so far?
Distributed Operation Consensus to provide consistency.
Factors to Consider ● Asynchronous ● Potentially lots of participants ○ IE, lots of transactions ● Imperative to verify everything ● What if there are bad actors? ● Operational efficiency ● Ensure immutability
Creating Blocks ● Unconfirmed transaction pool ○ Not yet “in the chain” ● “Miners” try to create a block: ○ When the time is right ○ When the number of transactions is right ○ Immediately ● Everyone validates a created block ○ And the transactions therein
Distributed Consensus ● No “master copy” ● All peers need to agree ● Transactions may be broadcast constantly ● Blocks too, perhaps less frequently ● How can the network keep up? ● Will peers lie?
Consensus Algorithms ● Incentivize block creation ○ Often tied to the creation/distribution of new tokens ● Keep miners honest ○ Tolerance against misbehavior ○ Byzantine Generals ● Create chain security ○ Present barriers to entry for attacks ● Many different approaches
Proof of Work ● “Solve” a difficult puzzle/math problem ○ This is a little misleading ● Find a solution first, and get a reward ● What if you lie? ○ Validators will throw out your solution ○ You will waste your time and resources ● Can scale with participation ● Large energy costs
The 51% Attack ● Key vulnerability/attack against PoW ● Requirements: own 51% of the network ○ A majority of the computational power ● Feasible?
Proof of Stake ● Back up a vote with some amount of currency ● Give “investors” more control over chain ● More energy efficient ● Promotes chain security ○ Attacks become extremely expensive ● Chance for monopoly? ○ Defenses
Others ● Practical Byzantine Fault Tolerance ● Proof of Burn ● Proof of Elapsed Time ● Semi-centralized alternatives ● Fully centralized alternatives
Next Time... ● Introduction to smart contracts ● More use cases ● More security implications
Thank you
Recommend
More recommend