+ All Categories
Home > Documents > Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses...

Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses...

Date post: 28-May-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
32
BLOCKCHAIN BASICS LECTURE 1
Transcript
Page 1: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

BLOCKCHAIN BASICSLECTURE 1

Page 2: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

BITCOIN: A PEER-TO-PEER

ELECTRONIC CASH SYSTEM — SATOSHI NAKAMOTO

BLOCKCHAIN BASICS

Page 3: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

THE FUNDAMENTAL PROBLEM: DOUBLE SPENDING

IN A DECENTRALIZED ENVIRONMENT

BLOCKCHAIN BASICS

Page 4: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

Page 5: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

Page 6: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

Page 7: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

Page 8: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

BOTH ARE P2P =)

BLOCKCHAIN BASICS

Page 9: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

Page 10: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

SATOSHI’S SOLUTION: A DISTRIBUTED LEDGER

▸ A ledger stores every transaction

▸ The ledger is distributed to everyone running the network

▸ Everyone has a copy of every transaction

▸ The majority of the network has to agree on a transaction in order to consider it valid.

Page 11: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

THE FIRST BITCOIN TRANSACTION

Page 12: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

BLOCK STRUCTUREBlock header

Hash of previous block header

Transactions

Block 5 Block 6 Block 7

Page 13: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

#HASHES_ARE_NOT_HASHTAGS

BITCOIN USES

SHA256(SHA256(BLOCKHEADER))

BLOCKCHAIN BASICS

Page 14: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

#HASH #DEMO

Page 15: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

TRANSACTIONS

▸ Transactions happen between two bitcoin addresses

▸ The owner of the sender address creates a transaction

▸ By signing the transaction with his private key

▸ Transactions get verified by miners and get added to the next block

▸ Once the block is completed and propagated to the other nodes, the transaction becomes a fact.

Page 16: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

ADDRESSES

▸ Addresses generated by an algorithm.

▸ Two keys get generated: a public key, which acts as the recipient address. And a private key, which proves ownership. The private key must be kept secret.

▸ Anyone can generate a new bitcoin address, even offline. Even by pen and paper.

▸ A sender can send to a new address, even if that was generated offline and it never interacted with the network.

Page 17: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

WALLETS

▸ A wallet is just a software that stores the addresses and its private keys

▸ There are no bitcoins in a bitcoin wallet. Just keys.

▸ There are no bitcoins even in the blockchain — only transactions. If you have an incoming transactions of 1 BTC and no outgoing transactions, then it is implied that you have 1 BTC

Page 18: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

PUBLIC AND PRIVATE KEYS

Public key cryptography is another set of asymmetric cryptographic functions like hashes.

They are called asymmetric, because they only go one way. For example hashing a long string can be done, but recovering the long string from the hash is impossible.

Public and private keys work somewhat similarly.

Page 19: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

PUBLIC AND PRIVATE KEYS 2 — GENERATING A TRANSACTION

The sender creates a transaction that says “I want to send x BTC from address A to address B”

The sender signs the transaction with the private key that belongs to address A.

The miners check the signature. Knowing address A, it is trivial to determine whether the sender indeed has the key or not.

Page 20: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

MINING

▸ Mining is the process of confirming transactions

▸ Miners collect unconfirmed transactions and put them into a new block

▸ Miners “mine” the block and if the peers accept it, it gets distributed and it becomes part of the blockchain

▸ For this work, the miners collect the transaction fees and the “block reward” — new bitcoin minted by the network.

Page 21: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

IF ITS SO SIMPLE, WHY ARE THERE HUGE MINING FARMS?

Page 22: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

MINING AS A COMPETITIVE SPORT

Fair and random distribution of miners is required.

Important to fairly compensate miners.

It would be a security risk if it would be known which miner will mine which block in advance. So it has to be provably random.

Difficult when decentralized.

Page 23: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

BITCOIN MINING IS A DECENTRALIZED LOTTERY

——— THE MORE COMPUTING POWER YOU HAVE

THE MORE BLOCKS YOU WILL MINE

Page 24: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

PROOF OF WORK

▸ The miners compete in solving a puzzle. When they find the solution, that is the proof that they performed the work.

▸ That gives them the privilege to creat the block and collect the fees.

▸ The work and the proof is another asymmetric algorithm example — very difficult to find the solution, but very easy to verify.

▸ There are other types of “proofs”. More later.

Page 25: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

CONCLUSION

BLOCKCHAIN BASICS

Page 26: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

BITCOIN, THE FIRST KNOWN BLOCKCHAIN SYSTEM WAS CREATED TO SOLVE THE DOUBLE SPENDING

PROBLEM IN DECENTRALIZED SYSTEMS.

BLOCKCHAIN BASICS

Page 27: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

PRIVATE KEY PUBLIC KEY ADDRESSES

TRANSACTIONS WALLETS

BLOCKCHAIN BASICS

Page 28: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

THE BLOCKCHAIN IS TRANSACTIONS ORGANIZED INTO BLOCKS

CHAINED TOGETHER BY HASHES

BLOCKCHAIN BASICS

Page 29: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

THERE ARE NO BITCOINS IN A BITCOIN WALLET ONLY PRIVATE AND PUBLIC KEYS

BLOCKCHAIN BASICS

Page 30: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

THERE ARE NO BITCOINS ON THE BLOCKCHAIN ONLY TRANSACTIONS

BLOCKCHAIN BASICS

Page 31: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBA

THE MINERS ARE THE TRANSACTION VALIDATORS. THEY GET THE PRIVILEGE TO CREATE A NEW BLOCK BY PARTICIPATING IN AND WINNING A DISTRIBUTED

LOTTERY.

BLOCKCHAIN BASICS

Page 32: Lecture 1 - Blockchain basics...BLOCKCHAIN BASICS ANDRAS KRISTOF @AKOMBA ADDRESSES Addresses generated by an algorithm. Two keys get generated: a public key, which acts as the recipient

ANDRAS KRISTOF @AKOMBABLOCKCHAIN BASICS

THANK YOU

© 2018 ANDRAS KRISTOF

TWITTER, MEDIUM: @AKOMBA, EMAIL: [email protected]


Recommended