Sustain failures
don’t response response- but cannot tell if faulty node respond or not
- need
+ 1 to out number - Provide safety and liveness
- Safety:
- all non faulty replicas agree on a total order for the execution of requests despite failures.
System Model
- Network
- drop, delay, out of order, duplicate
- Faulty node behave arbitrarily
- Independent node failures
= digest of m = message sign by node- Adversary
- can
- coordinate faulty nodes
- delay correct nodes
- cannot
- delay correct nodes indefinitely
- quantum compute
- can
Algorithm
Terms
- replicas move through a succession of view
- primary of a view is
primary replica view number total replicas
max # to fail- Replica = all servers
- Primary, Backup
Process
- Client send request to primary
- primary multicasts all backups
- Replicas execute request and reply to client
- client wait for
same replies
Client
- Client
send to master timestamp operation to be executed
- Master broadcast to backups
- Replicas reply
result replica number view number
- Client wait for
replies with same and - If timeout
- Client broadcast request to all replica
- If already processed
- re-send reply (remember)
- If not processed & not primary
- redirect to primary
Normal Case
Replica state
- message log
- current view
Three-phase atomic broadcast
Pre-prepare
- Multicast to all backup and write to log
is the client’s request (message)?- maybe not the full content?
: ’s digest : seq number
- Backup accepts if
- Signature match
- in view
- has not accept same
, with different digest < seq num <- prevent exhausting seq number (by choosing a large one)
Prepare
- If backup accept, multicast and write to log
- Replica accepts if ^d8ce5a
- Signature match
- In view
- h < seq num < H
- prepared(m, v, n, i) = true if the following are all written to
’s log- request
- a pre-prepare in
and seq num prepares from different backups
- request
Commit
- when prepared(m, v, n, i) = true
- multicast
- Replicas accept and insert to log (same condition as before)
- execute if accepted
commits
Invariant
- if
prepared(m, v, n i)
is true thenprepared(m', v, n, j)
is false- (No prepared with same seq but diff msg)
- If executed locally, at least f+1 non-faulty replicas have prepared
Checkpoint
- multicast
- every
execution = checkpoint digest- correct if
same checkpoint - update low, high water mark
, = seq num of last stable checkpoint = + (big enough constant)
- every
View-Change
- Backup start timer if receive request but not executed
- Multicast
: seq num of last checkpoint : valid checkpoint messages : un-execute pre-prepared & valid prepare msgs
- When primary of view
receive other valid view-change in total - Multicast : all valid VIEW-CHANGE msgs : new pre-prepares generated by new primary- might be null
- Backup go to new view if receive valid new-view msg
Non-Determinism
- Primary select the non-determinism value
- Or let backups propose
In Class
Can’t trust single node
- Ask all nodes?
- Liveness
- Latency
- Primary can spoof other servers response
- Solution: Digital signature
Need a primary to order requests
What if primary fault?
- Primary lie to backup
- Sol: Signature
- Primary ignore request
- Sol: timeout => client broadcast
- Primary lie to backup
Can faulty replicas prevent progress?
- No, only wait for
replies, can tolerate faulty nodes
- No, only wait for
handle primary sending different ops
handle primary lie to clients (wait for
response)
distributed systems - Why is the commit phase in PBFT necessary? - Computer Science Stack Exchange