Consensus Graphic

From Ripple Wiki
Jump to: navigation, search

This is a graphical walk through of the Consensus algorithm.

The goal of consensus is for all the servers to agree on a set of transactions to apply to the Last Closed Ledger. They don't have to worry if the transactions are valid or what order they took place. They are only concerned with all servers agreeing on what is in this set.

Consensus is an iterative process. Servers propose one transaction set and then another as they receive proposals from their peers.

Here we have an abstract representation of one server in the ripple network.

2.png

In the center it shows the Closing Bundle. This is the set of Transactions that the network is trying to come to consensus on.


3.png

Now we see a proposal come into this server. During consensus every server sends a series of proposals. Proposals are just a list of transactions that the server thinks should be included in the closing bundle.

4.png

This incoming proposal is checked against the UNL. If the server that sent the proposal is on the UNL then this proposal is sent to the closing bundle and the transactions it contains each receive one vote.

5.png

While the network is trying to reach consensus on the last transaction set, new transactions are coming in. These transactions are collected in the next bundle. They will be applied to the next ledger.

7.png

Here we see a proposal come in from a server not on our UNL. This proposal is simply discarded and not used to determine what to include in the closing bundle.

8.png

Now we have gotten several proposals in from other servers. There are currently 5 active servers on our UNL. Any transaction with over 50% of the active servers voting for it is considered as belonging in the bundle by this server. You can see these transactions marked green.

9.png

Now the timer has run out so we send our vote for the current bundle out to the network. The threshold for a transaction to be considered part of the current bundle has also increased from 50% to 60%. This way transactions that have a lot of disagreement will have a tendency to be pushed off to the next ledger.

10.png

We have received more proposals and have changed what we think the closing bundle should include.

11.png

Consensus is considered reached when 80% of the servers on our UNL agree on the exact set of transactions to be included in this ledger. You can see that has happened here since every transactions has 4 or more votes or less than 2 votes. These transactions are sent to be applied to the Last Closed Ledger.

12.png

The closing bundle was applied generating a new Last Closed Ledger. The transactions you collected during that closing process are added to the transactions from the previous candidate set that didn't make it into the ledger. Now the consensus process starts again...

Personal tools
Namespaces

Variants
Actions
Navigation
Tools