You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
7.2 KiB

  1. \section{Definitions} \label{sec:definitions}
  2. \subsection{Model}
  3. We consider a system of processes that communicate by exchanging messages.
  4. Processes can be correct or faulty, where a faulty process can behave in an
  5. arbitrary way, i.e., we consider Byzantine faults. We assume that each process
  6. has some amount of voting power (voting power of a process can be $0$).
  7. Processes in our model are not part of a single administrative domain;
  8. therefore we cannot enforce a direct network connectivity between all
  9. processes. Instead, we assume that each process is connected to a subset of
  10. processes called peers, such that there is an indirect communication channel
  11. between all correct processes. Communication between processes is established
  12. using a gossip protocol \cite{Dem1987:gossip}.
  13. Formally, we model the network communication using a variant of the \emph{partially
  14. synchronous system model}~\cite{DLS88:jacm}: in all executions of the system
  15. there is a bound $\Delta$ and an instant GST (Global Stabilization Time) such
  16. that all communication among correct processes after GST is reliable and
  17. $\Delta$-timely, i.e., if a correct process $p$ sends message $m$ at time $t
  18. \ge GST$ to a correct process $q$, then $q$ will receive $m$ before $t +
  19. \Delta$\footnote{Note that as we do not assume direct communication channels
  20. among all correct processes, this implies that before the message $m$
  21. reaches $q$, it might pass through a number of correct processes that will
  22. forward the message $m$ using gossip protocol towards $q$.}.
  23. In addition to the standard \emph{partially
  24. synchronous system model}~\cite{DLS88:jacm}, we assume an auxiliary property
  25. that captures gossip-based nature of communication\footnote{The details of the Tendermint gossip protocol will be discussed in a separate
  26. technical report. }:
  27. \begin{itemize} \item \emph{Gossip communication:} If a correct process $p$
  28. sends some message $m$ at time $t$, all correct processes will receive
  29. $m$ before $max\{t, GST\} + \Delta$. Furthermore, if a correct process $p$
  30. receives some message $m$ at time $t$, all correct processes will receive
  31. $m$ before $max\{t, GST\} + \Delta$. \end{itemize}
  32. The bound $\Delta$ and GST are system
  33. parameters whose values are not required to be known for the safety of our
  34. algorithm. Termination of the algorithm is guaranteed within a bounded duration
  35. after GST. In practice, the algorithm will work correctly in the slightly
  36. weaker variant of the model where the system alternates between (long enough)
  37. good periods (corresponds to the \emph{after} GST period where system is
  38. reliable and $\Delta$-timely) and bad periods (corresponds to the period
  39. \emph{before} GST during which the system is asynchronous and messages can be
  40. lost), but consideration of the GST model simplifies the discussion.
  41. We assume that process steps (which might include sending and receiving
  42. messages) take zero time. Processes are equipped with clocks so they can
  43. measure local timeouts.
  44. Spoofing/impersonation attacks are assumed to be impossible at all times due to
  45. the use of public-key cryptography, i.e., we assume that all protocol messages contains a digital signature.
  46. Therefore, when a correct
  47. process $q$ receives a signed message $m$ from its peer, the process $q$ can
  48. verify who was the original sender of the message $m$ and if the message signature is valid.
  49. We do not explicitly state a signature verification step in the pseudo-code of the algorithm to improve readability;
  50. we assume that only messages with the valid signature are considered at that level (and messages with invalid signatures
  51. are dropped).
  52. %Messages that are being gossiped are created by the consensus layer. We can
  53. %think about consensus protocol as a content creator, which %defines what
  54. %messages should be disseminated using the gossip protocol. A correct
  55. %process creates the message for dissemination either i) %explicitly, by
  56. %invoking \emph{send} function as part of the consensus protocol or ii)
  57. %implicitly, by receiving a message from some other %process. Note that in
  58. %the case ii) gossiping of messages is implicit, i.e., it happens without
  59. %explicit send clause in the consensus algorithm %whenever a correct
  60. %process receives some messages in the consensus algorithm\footnote{If a
  61. %message is received by a correct process at %the consensus level then it
  62. %is considered valid from the protocol point of view, i.e., it has a
  63. %correct signature, a proper message structure %and a valid height and
  64. %round number.}.
  65. %\item Processes keep resending messages (in case of failures or message loss)
  66. %until all its peers get them. This ensures that every message %sent or
  67. %received by a correct process is eventually received by all correct
  68. %processes.
  69. \subsection{State Machine Replication}
  70. State machine replication (SMR) is a general approach for replicating services
  71. modeled as a deterministic state machine~\cite{Lam78:cacm,Sch90:survey}. The
  72. key idea of this approach is to guarantee that all replicas start in the same
  73. state and then apply requests from clients in the same order, thereby
  74. guaranteeing that the replicas' states will not diverge. Following
  75. Schneider~\cite{Sch90:survey}, we note that the following is key for
  76. implementing a replicated state machine tolerant to (Byzantine) faults:
  77. \begin{itemize} \item \emph{Replica Coordination.} All [non-faulty] replicas
  78. receive and process the same sequence of requests. \end{itemize}
  79. Moreover, as Schneider also notes, this property can be decomposed into two
  80. parts, \emph{Agreement} and \emph{Order}: Agreement requires all (non-faulty)
  81. replicas to receive all requests, and Order requires that the order of received
  82. requests is the same at all replicas.
  83. There is an additional requirement that needs to be ensured by Byzantine
  84. tolerant state machine replication: only requests (called transactions in the
  85. Tendermint terminology) proposed by clients are executed. In Tendermint,
  86. transaction verification is the responsibility of the service that is being
  87. replicated; upon receiving a transaction from the client, the Tendermint
  88. process will ask the service if the request is valid, and only valid requests
  89. will be processed.
  90. \subsection{Consensus} \label{sec:consensus}
  91. Tendermint solves state machine replication by sequentially executing consensus
  92. instances to agree on each block of transactions that are
  93. then executed by the service being replicated. We consider a variant of the
  94. Byzantine consensus problem called Validity Predicate-based Byzantine consensus
  95. that is motivated by blockchain systems~\cite{GLR17:red-belly-bc}. The problem
  96. is defined by an agreement, a termination, and a validity property.
  97. \begin{itemize} \item \emph{Agreement:} No two correct processes decide on
  98. different values. \item \emph{Termination:} All correct processes
  99. eventually decide on a value. \item \emph{Validity:} A decided value
  100. is valid, i.e., it satisfies the predefined predicate denoted
  101. \emph{valid()}. \end{itemize}
  102. This variant of the Byzantine consensus problem has an application-specific
  103. \emph{valid()} predicate to indicate whether a value is valid. In the context
  104. of blockchain systems, for example, a value is not valid if it does not
  105. contain an appropriate hash of the last value (block) added to the blockchain.