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.
In the center it shows the Closing Bundle. This is the set of Transactions that the network is trying to come to consensus on.
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.
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.
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.
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.
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.
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.
We have received more proposals and have changed what we think the closing bundle should include.
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.
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...