Blockchain Protocols Flashcards
Define a synchronously safe protocol.
If it’s safety is guaranteed by an assumption about timing or about how the race conditions are resolved.
Define an asynchronous consensus protocol.
If it’s safety is guaranteed WITHOUT assumption about timing or about how the race conditions are resolved (as long as everyone eventually gets the message).
Traditionally which two properties do consensus protocol have?
1) Safety
2) Liveness
Define “Safety” as a consensus property
It is not possible for nodes to make inconsistent decisions
Safety means that the results produced by the system should be correct
Define “Liveness” as a consensus protocol property
Node eventually/inevitably make decisions
Fault tolerant consensus protocols have ………….. and/or …………… despite some number of faults.
Safety
Liveness
Faulty behaviour is either considered to be …………… ……………… or ……………….
Crash faulty
Byzantine
Define crash tolerate behaviour
Nodes are faulty by virtue of not sending messages
Define Byzantine Fault behaviour
Where a node fails but there is not agreement between the other nodes about whether it has failed because the fault detection results are inconsistent.
What does the FLP Possibility show?
Can’t have
-deterministic consensus protocol
that is SAFE and LIVE
In an ASYNCHRONOUS system
IF
There is even one crash fault.
List the two “Liveness” faults:
Crash fault - failing to SEND a message when expected
Omission fault - failing to RECEIVE a message when expected
List the two “Safety” faults
Invalid message fault
Equivocation fault
Define an Invalid message fault
Producing messages that cannot be produced by a protocol following node.
Define an Equivocation fault
Producing valid message in a way that could not have been produced by a single execution of the protocol
Liveness faults are indistinguishable from ……………. ……………….
Network latency
Network latency (and therefore …………… ……………….) cannot cause protocol following ………….. to make inconsistent decisions in an asynchronous safe consensus protocol.
Liveness faults
Nodes
What does CBC stand for?
Correct by construction
What is a Byzantine fault?
When components may fail but appear to some on the network as failed and others as fine.
Under what conditions are Byzantine faults a problem?
When the network requires consensus on whether there is a fault on the problem component
What is a consequence of a Byzantine fault?
The faulty component is NOT shut out of the network
Because consensus can’t be reached about whether it is faulty as there is inconsistency about its state
What is Byzantine fault tolerance?
The ability of the network to continue operating even if some of the nodes fail or are acting maliciously
What does BFT stand for?
Byzantine fault tolerance
What are the requirements in the Byzantine generals problem?
Each general has to decide: attack or retreat (yes or no)
After the decision is made, it cannot be changed
All generals have to agree on the same decision
Have to execute in a synchronized manner
How does the Byzantine generals problem translate to blockchain?
The MAJORITY of participants within a distributed network have to :
AGREE and EXECUTE the same action in order to avoid complete failure.
Works based on majority so even if there are MALICIOUS or FAULTY nodes it won’t be a problem (unless they gain 51% of the network)
What is the consensus problem?
Agreement among a number of nodes for a single data value is required.
Some of the nodes may fail or be unreliable in other ways, so consensus protocols must be fault tolerant or resilient.
The nodes must put forth their candidate values, communicate with one another, and agree on a single value.
What is the difference between a crash failure and a Byzantine failure?
A crash failure occurs when a process abruptly stops and does not resume.
A Byzantine failure may send contradictory or conflicting data to other nodes, or it may sleep and then resume activity after a lengthy delay.
What is FLP?
It has been proved that consensus is impossible
- In a fully asynchronous message-passing distributed system
- Where even one node has a crash failure
Once every node has agreed on consensus with one another, ………….. is guaranteed.
Liveness
Safety should guarantee that ……………..
A bad thing never happens
Liveness should guarantee that …………….
Something good eventually happens
Why would nodes want mine on every fork in POS system? (are nothing at stake problem)
No cost to mine all forks
Guarantees that you will collect a transaction fee as one of the forks will win
What is the problem when nodes start mining on every fork in a POS system? (re nothing at stake problem)
Leaves the network vulnerable to double spending attacks
What is the Nothing at Stake problem?
A theoretical security hole in POS systems.
The problem can occur anytime there is a fork in the blockchain, either because of a malicious action or accidentally when two honest validators propose blocks simultaneously.
Why is a Nothing at Stake problem unlikely in reality?
Assumes that:
Every validator will seek profit
- even at the detriment of network security and quality
No validators will act altruistically
Validators modified or used modified software (as mining on multiple forks is not part of standard software)
How does the Casper protocol seek to deter Nothing at Stake problem?
By requiring funds that can be lost to be staked
In other system just having money in your wallet that would not be at risk was all that was required
Casper is a……………….. based economic consensus protocol.
security-deposit
What happens in a security-deposit based protocol?
Nodes who wish to validate transactions must place a security deposit in order to do so.
If a validator produces anything invalid
- A portion or all of their deposit is forfeited
- Their ability to continue participating in consensus is forfeited
How does Casper tackle the Nothing at Stake problem?
The security-deposit attaches a cost to being dishonest
makes it in the best economic interest of all of the miners to behave honestly
Safety also means……………., a transaction that got recorded in the ledger at some position shouldn’t change position.
Once the system or the ledger outputs some kind of ……………., this should be the same for all nodes or for all participants in the system.
persistence
ordering
………….. means that if a transaction is sent, it should appear in the ledgers of all nodes (or at least, the honest nodes that follow the protocol)
Liveness
Safety = ………..
Liveness = ……….
Correctness (that everyone will agree on the same thing)
Agreement (that agreement across nodes will be reached)
Name 4 types of fault on Tendermint (Cosmos) network
Liveness - network halts
Safety - blockchain forks
Censorship - data withholding
Hard fork failure - invalid state transition