What is consensus?
The process of reaching an agreed output between n processes which all have an input in_i and a output out_i
Rules for consensus
Synchronus Distributed System
Asynchronus Distributed System
Crash threat model
Every process is honest but can fail => n = 2f+1 processes needed to allow for f faulty processes
Byzantine threat model
Processes can act arbitrarily (equivocation) => n = 3f+1 processes and f+1 rounds of agreement needed to allow for f byzantine processes (n^2 message compexity)
BFT consensus
Hard to scale the number of consensus nodes only tested up to 20
Cryptographic foundations of BTC
HashFunctions and their onewayness
Public Key crypto: Verifiable signatures
RSA vs ECDSA
ECDSA keys smaller (better for BTC) and faster in keygen, compareable in signature generation but RSA significantly faster in signature verification
Security of Payments
Fairness: Cant pay more than you own
Resistance to impersonation: Can’t authorize payments of other users
Non-repudiation: Users can’t deny payments that are registered by the system
Accountability: User that misbehaves can be punished
Roles in Bitcoin
Miners: Do hash calculations and thus mine new blocks
Full-Nodes: Have a history of blocks and transactions and can respond to requests a user might have
(Lightweight-)Users: Regular users in the system that want to do transcations etc.
UTXO Model
Every transaction input must be the output of another transaction.
Thus if a user wants to use to pay he might need to split a previous transcation or combine multiple Unspend Transactions Outputs(UTXO).
Mining
Miners calculate hashes of so that Hash(prev_hash, nonce, F(Tx)) < Difficulty
Bitcoin Security Pillars