Ripple

基于拜占庭,注意Proposer的使用

Component

  • Server: A server is any entity running the Ripple Server software (as opposed to the Ripple Client software which only lets a user send and receive funds), which participates in the consensus process.
  • Ledger: The ledger is a record of the amount of currency in each user’s account and represents the “ground truth” of the network. The ledger is repeatedly updated with transactions that successfully pass through the consensus process.
  • Last-Closed Ledger: The last-closed ledger is the most recent ledger that has been ratified by the consensus process and thus represents the current state of the network.
  • Open Ledger: The open ledger is the current operating status of a node (each node maintains its own open ledger). Transactions initiated by end users of a given server are applied to the open. ledger of that server, but transactions are not considered final until they have passed through the consensus process, at which point the open ledger becomes the last-closed ledger.
  • Unique Node List (UNL) : Each server, s, maintains a unique node list, which is a set of other servers that s queries when determining consensus. Only the votes of the other members of the UNL of s are considered when determining consensus (as opposed to every node on the network). Thus the UNL represents a subset of the network which when taken collectively, is “trusted” by s to not collude in an attempt to defraud the network. Note that this definition of “trust” does not require that each individual member of the UNL be trusted (see section 3.2).
  • Proposer : Any server can broadcast transactions to be included in the consensus process, and every server attempts to include every valid transaction when a new consensus round starts. During the consensus process, however, only proposals from servers on the UNL of a server s are considered by s.

共识算法

screen shot 2017-10-28 at 11 34 34 am

  1. Initially, each server takes all valid transactions it has seen prior to the beginning of the consensus round that have not already been applied (these may include new transactions initiated by endusers of the server, transactions held over from a previous consensus process, etc.), and makes them public in the form of a list known as the “candidate set”.
  2. Each server then amalgamates the candidate sets of all servers on its UNL, and votes on the veracity of all transactions.
  3. Transactions that receive more than a minimum percentage of “yes” votes are passed on to the next round, if there is one, while transactions that do not receive enough votes will either be discarded, or included in the candidate set for the beginning of the consensus process on the next ledger.
  4. The final round of consensus requires a minimum percentage of 80% of a server’s UNL agreeing

注意Propose和Validate的区分

screen shot 2017-10-28 at 12 04 25 pm screen shot 2017-10-28 at 12 04 51 pm screen shot 2017-10-28 at 12 05 18 pm screen shot 2017-10-28 at 12 05 54 pm

Reference

Code

  • https://github.com/ripple/rippled.git