L4 - Consensus in Bitcoin Flashcards

1
Q

How would a digital currency with a central authority look like?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Disadvantages of a CA?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Problem of random dictatorship

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

is mining part of the consensus mechanism?

A

No.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Sybil attack?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Sybil control mechanism in Bitcoin?

A

Proof-of-Work (PoW) is the Sybil control mechanism for validating the expenditure of the computational work.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the logic to avoid Sybil attacks?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Disadvantages of Proof of Stake (PoS)

A
  • requires large amounts of stake
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a consensus?

A

Common world state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is it called in Game Theory when the central authorities may not stick to the protocol?

A

Byzantine Generals Problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the Byzantine Fault Tolerance (BTF)?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Definition of Distributed Consensus and two properties that must hold

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the world state in Bitcoin?

A

The longest chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is probabilistic consensus?

A

The consensus mechanism is an ongoing process in Bitcoin. Therefore, the order of blocks or transactions is never 100% final

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is PoW

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are incentivized nodes?

A

The network incentivizes nodes to participate in the consensus algorithm. They receive Bitcoins for created blocks which are included in the longest chain.

17
Q
  1. Step in consensus of Bitcoin
A

Transaction Broadcast: Every node that receives transactions or creates them broadcasts them to the network, making everyone aware of the new transaction

18
Q
  1. Step in consensus of Bitcoin
A

Block Building: Every node collects the valid transactions, orders them and creates a new block containing the transactions. (mining nodes do this)

19
Q
  1. Step in consensus of Bitcoin
A

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)

20
Q
  1. Step in consensus of Bitcoin
A

Other nodes receive the block from the randomly chosen node and validate whether it is correct. A correct block only contains valid transactions

21
Q
  1. Step in consensus of Bitcoin
A

Block acceptance: other nodes show their acceptance for this block if the nodes build new blocks on top of the recently proposed block.

22
Q

What is an orphan block?

A

A block that has been proposed in the network but has not been included in the longest chain.

23
Q

What happens to transactions which are included in the orphan blocks?

A
  • 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
24
Q

Does every node solve the same puzzle?

A

No, every node has a different puzzle, as the TX0 (reward -address) is different from node to node.

25
Q

What is the block time?

A

Time between the creation of two blocks (In Bitcoin block time = 10min)

26
Q

Disadvantages of too fast block time?

A
  • Higher possibility of chain forking, leading to multiple realities
  • network has to keep track of these forks even if many will be orphaned
  • empty blocks
27
Q

How is the network speed adjusted?

A
  1. Measure how long the last 2016 blocks took to get mined (=T)
  2. Calculate the factor of speed (two weeks/T) = F
  3. The difficulty gets increased (F>1) or decreased (F<1)
    3a (maximum increase = 4; maximum decrease = .25)
  4. This process is done every 2016 blocks.
28
Q

Bitcoin size of data field?

A

8 bytes

29
Q

Representation

A

unsigned integer

30
Q

smallest unit

A

1 satochi

31
Q

base unit

A

1BTC = 100m Satochi

32
Q

Maximum amount of BTC

A

almost 21 million

33
Q

current bitcoin reward

A

6.25 bitcoin

34
Q

What is the transaction fee

A

difference btw inputs and outputs

- the higher, the faster the transaction gets included in the blockchain

35
Q

Coinbase transaction

A
  • first transaction in a block
  • Txin that has no Txout
  • consists out of block reward (newly available Bitcoins which are introduced into the system) and transaction fee
  • content of coinbase transaction:
  • block height
  • up to 100 arbitrary bytes that can be put into the transaction input (scriptSig)
36
Q

History of chips

A
  1. CPU
  2. GPU
  3. FPGA
  4. ASIC (Application-specific integrated circuit)
37
Q

What is a mining pool

A

Miners work together to stabilize their monthly income

  • organized by the pool manager
  • pool manager proposes for each new block height a block prototype to his pool, requiring PoW to be done (Tx0 –> pool manager)
  • near-solutions are sent to the pool manager to prove some work. Each proof is called a share.
  • Solutions are also sent to the pool manager and pushed into the network
  • pool manager receives mining reward and distributes it among the shares, keeps a fee