L4 - Consensus in Bitcoin Flashcards
How would a digital currency with a central authority look like?
The CA would sign and create every new block and publish it to the network.
Other nodes validate the content and append the new block to their own copy of the chain.
Disadvantages of a CA?
- CA has to be nominated
- CA can unilaterally ignore or delay transactions
- CA could render the network unavailable by being overloaded or intentionally shut down
Problem of random dictatorship
Problem of fairly choosing a random participant as the central authority. We must ensure that no one is getting chosen more often by creating multiple identities (Sybil attack).
is mining part of the consensus mechanism?
No.
What is a Sybil attack?
Where a user creates and controls multiple identities for malicious purpose
E.g. in a random dictatorship the attacker would create an arbitrary number of nodes to increase his chance to be selected as the central authority.
What is the Sybil control mechanism in Bitcoin?
Proof-of-Work (PoW) is the Sybil control mechanism for validating the expenditure of the computational work.
What is the logic to avoid Sybil attacks?
We need to bind the probability of getting selected to a scarce resource. In PoW, that resource is the computational hashing power. Now the chance of getting chosen is proportional to the computational power. Thus, creating new identities does not give you an advantage.
Disadvantages of Proof of Stake (PoS)
- requires large amounts of stake
What is a consensus?
Common world state
What is it called in Game Theory when the central authorities may not stick to the protocol?
Byzantine Generals Problem
What is the Byzantine Fault Tolerance (BTF)?
The goal is for all loyal generals to derive the same plan without the traitors being able to convince other generals of the wrong plan.
–> If more or equal to one third of the generals are malicious, it is impossible for the honest nodes to derive a common plan
Definition of Distributed Consensus and two properties that must hold
A network consists of N nodes. Each node has an input value that they propose to other nodes. Some of the nodes are faulty (not responding) or malicious, trying to propose a wrong input.
Two properties must hold:
- The process has to terminate with all honest nodes in agreement on the same input values.
- The value must have been generated by an honest node
What is the world state in Bitcoin?
The longest chain
What is probabilistic consensus?
The consensus mechanism is an ongoing process in Bitcoin. Therefore, the order of blocks or transactions is never 100% final
What is PoW
The network selects a random node to propose a new block using PoW. This ensures that probabilistic consensus can be reached assuming over 50% are honest.
What are incentivized nodes?
The network incentivizes nodes to participate in the consensus algorithm. They receive Bitcoins for created blocks which are included in the longest chain.
- Step in consensus of Bitcoin
Transaction Broadcast: Every node that receives transactions or creates them broadcasts them to the network, making everyone aware of the new transaction
- Step in consensus of Bitcoin
Block Building: Every node collects the valid transactions, orders them and creates a new block containing the transactions. (mining nodes do this)
- Step in consensus of Bitcoin
Random Node Selection: A node is randomly chosen out of the network. It is able to propose its block to the network. (random selection like with PoW)
- Step in consensus of Bitcoin
Other nodes receive the block from the randomly chosen node and validate whether it is correct. A correct block only contains valid transactions
- Step in consensus of Bitcoin
Block acceptance: other nodes show their acceptance for this block if the nodes build new blocks on top of the recently proposed block.
What is an orphan block?
A block that has been proposed in the network but has not been included in the longest chain.
What happens to transactions which are included in the orphan blocks?
- unconfirmed transaction are stored in the mempool before they get added to a block
- unconfirmed transactions are gossiped in the network so every node will know of all transactions
- when a new block is proposed, all nodes update their mempool and remove the transactions which were included.
- Hence, the transaction in an orphan block are simply considered as unconfirmed, waiting to be included in a later block
Does every node solve the same puzzle?
No, every node has a different puzzle, as the TX0 (reward -address) is different from node to node.