Bitcoin Forum
March 20, 2019, 02:32:31 PM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Ripple.com - How does consensus work?  (Read 2146 times)
djbaniel
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
February 21, 2013, 06:11:39 AM
 #1

Any newbies understand how consensus works on Ripple.com?

-ibuyXRP

Ripple.com address: rNnLFDCRrAtuESodmwamAasMBZqCmkqQH9
questions or to make an offer: ibuyXRP@gmail.com
i pay above market price
1553092351
Hero Member
*
Offline Offline

Posts: 1553092351

View Profile Personal Message (Offline)

Ignore
1553092351
Reply with quote  #2

1553092351
Report to moderator
1553092351
Hero Member
*
Offline Offline

Posts: 1553092351

View Profile Personal Message (Offline)

Ignore
1553092351
Reply with quote  #2

1553092351
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1553092351
Hero Member
*
Offline Offline

Posts: 1553092351

View Profile Personal Message (Offline)

Ignore
1553092351
Reply with quote  #2

1553092351
Report to moderator
1553092351
Hero Member
*
Offline Offline

Posts: 1553092351

View Profile Personal Message (Offline)

Ignore
1553092351
Reply with quote  #2

1553092351
Report to moderator
toz
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
February 21, 2013, 06:19:08 AM
 #2

It's explained on the Ripple wiki:
https://ripple.com/wiki/Consensus
djbaniel
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
February 21, 2013, 06:53:13 AM
 #3

It's explained on the Ripple wiki:
https://ripple.com/wiki/Consensus


Greetings toz,

Thank you for the link.

I just wanted to start a dialog for newbies to discuss questions or comments about how it works.

Do you understand all the details? Any concerns of how consensus could have problems in certain situations?

Best regards,

-ibuyXRP



--
ibuyXRP@gmail.com - i pay above market value, and i offer any currency issued by Bitstamp.net

XRP: rNnLFDCRrAtuESodmwamAasMBZqCmkqQH9
benmanns
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
February 21, 2013, 07:25:18 AM
 #4

How does Ripple select the validators that we trust not to collude?

And how do I know that 15 years from now, they will still be sensibly selecting validators?
JoelKatz
Legendary
*
Offline Offline

Activity: 1582
Merit: 1004


Democracy is vulnerable to a 51% attack.


View Profile WWW
February 21, 2013, 07:37:48 AM
 #5

How does Ripple select the validators that we trust not to collude?
In principle, each user can select their own set of trusted validators based on entites they trust not to collude. The system is designed to be robust even with only minimal overlap.

Right now, you select a list of domains to trust and those domains list validators they believe are independently managed. Currently, only servers need a trust list and clients trust server to tell them what the current consensus ledger is. We are transition to an untrusted server model where clients will tell the server which validators they trust and servers will pass on validations from those validators to clients to convince them that the current ledger is what they claim it is.

Clients only need to trust validators to determine what the current ledger is. They can then walk the hash chains to confirm balances, transactions, and so on.

Servers need to decide which validators they will work to establish a consensus with. So having a good list of validators is much more important if you yourself are a validator. We expect people who choose to be a validator and ask people to trust them to put some effort into selecting the validators they will trust.

Quote
And how do I know that 15 years from now, they will still be sensibly selecting validators?
I can't tell you today what the scheme will be 15 years from now. If Ripple catches on, it may be domain scraping. Essentially, as you visit web sites, your browser would check if they provide a Ripple validator list. If so, you might click on a button to add them as a validator source. You would then look at validators that were nominated by several of your sources.

Unless your list winds up consisting of almost all colluding validators all colluding with each other, a bad trust list will be easily detected. And even if it does, good servers won't be able to convince you to accept what they claim is the latest ledger. So there would be multiple clear indications that your trust list was broken.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
myuser
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
February 21, 2013, 07:54:28 AM
 #6

Oddly enough, it seems that there isn't yet a consensus on how consensus works. But from what I understand, consensus is trusted validators looking at the ledger, and certifying it. The only way this would be vulnerable is if a validator orchestrated a 51% attack.
JoelKatz
Legendary
*
Offline Offline

Activity: 1582
Merit: 1004


Democracy is vulnerable to a 51% attack.


View Profile WWW
February 21, 2013, 08:09:46 AM
 #7

Oddly enough, it seems that there isn't yet a consensus on how consensus works. But from what I understand, consensus is trusted validators looking at the ledger, and certifying it. The only way this would be vulnerable is if a validator orchestrated a 51% attack.
I think descriptions of the "interesting" case (how Ripple uses consensus to solve the double spend problem) are getting confused with how the uninteresting cases are solved. There are really three cases:

1) As a non-validating client or server operates: Here, you just collect validations, which are signed statements of the hash of the last closed ledger. The validations are timestamped and sequenced. This allows a client to determine the current ledger which includes things like balances. You can then follow hash chains to get the results of transactions, view order books, and so on without any trust needed.

2) When a new validator comes online: A new validator can determine the current ledger using the same mechanism a client does. The new validator will then synchronize to the current ledger. The validator can also walk the hash chains to ensure that there is a valid path from the last ledger it accepted to the current ledger.

3) The interesting case -- as a validator operates, solving the double spend problem: The validator must already agree on the last closed ledger as described above. Validators exchange proposals that state which transactions the validator believes should be candidate to be applied to the ledger. Once a consensus is reached, the candidate transactions are applied deterministically so that all validators produce the same new last closed ledger. They then sign validations of this ledger (for use by clients and new validators as in 1 and 2 above). The servers then start the next consensus cycle and also collect validations from the ledger they just closed to ensure that nothing went wrong in the consensus process and to provide to clients.

Using my (overly simplified) agreement room analogy, it works like this:

1) There's a room where everyone agrees on the last closed ledger.

2) If you want to disagree, you can, but you must leave the room to do so.

3) If you want to know what the current ledger is, you walk in and ask everyone in the room.

4) If you want to perform a transaction, you read it out loud. Everyone honest agrees that it's valid.

5) If there are any transactions that someone in the room believes is valid and is not in the current ledger, they attempt to obtain a consensus on that transaction.

6) When a consensus is reach, the consensus transactions are applied to the last closed ledger forming a new last closed ledger.

7) Everyone agrees on the new last closed ledger.

8 ) We go back to step 5. Any transactions believed still valid but that didn't get into the consensus transaction set for some reason should now be voted in by every honest person.

9) If people appear to be acting in ways that don't make sense, such as voting no on transactions that have no reason not to be included or failing to validate the correct ledger, you ignore them.

10) Your top priority is to enforce the rules of the room. Your second priority is to achieve consensus.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
myuser
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
February 21, 2013, 04:13:00 PM
 #8

Oddly enough, it seems that there isn't yet a consensus on how consensus works. But from what I understand, consensus is trusted validators looking at the ledger, and certifying it. The only way this would be vulnerable is if a validator orchestrated a 51% attack.
I think descriptions of the "interesting" case (how Ripple uses consensus to solve the double spend problem) are getting confused with how the uninteresting cases are solved. There are really three cases:

1) As a non-validating client or server operates: Here, you just collect validations, which are signed statements of the hash of the last closed ledger. The validations are timestamped and sequenced. This allows a client to determine the current ledger which includes things like balances. You can then follow hash chains to get the results of transactions, view order books, and so on without any trust needed.

2) When a new validator comes online: A new validator can determine the current ledger using the same mechanism a client does. The new validator will then synchronize to the current ledger. The validator can also walk the hash chains to ensure that there is a valid path from the last ledger it accepted to the current ledger.

3) The interesting case -- as a validator operates, solving the double spend problem: The validator must already agree on the last closed ledger as described above. Validators exchange proposals that state which transactions the validator believes should be candidate to be applied to the ledger. Once a consensus is reached, the candidate transactions are applied deterministically so that all validators produce the same new last closed ledger. They then sign validations of this ledger (for use by clients and new validators as in 1 and 2 above). The servers then start the next consensus cycle and also collect validations from the ledger they just closed to ensure that nothing went wrong in the consensus process and to provide to clients.

Using my (overly simplified) agreement room analogy, it works like this:

1) There's a room where everyone agrees on the last closed ledger.

2) If you want to disagree, you can, but you must leave the room to do so.

3) If you want to know what the current ledger is, you walk in and ask everyone in the room.

4) If you want to perform a transaction, you read it out loud. Everyone honest agrees that it's valid.

5) If there are any transactions that someone in the room believes is valid and is not in the current ledger, they attempt to obtain a consensus on that transaction.

6) When a consensus is reach, the consensus transactions are applied to the last closed ledger forming a new last closed ledger.

7) Everyone agrees on the new last closed ledger.

8 ) We go back to step 5. Any transactions believed still valid but that didn't get into the consensus transaction set for some reason should now be voted in by every honest person.

9) If people appear to be acting in ways that don't make sense, such as voting no on transactions that have no reason not to be included or failing to validate the correct ledger, you ignore them.

10) Your top priority is to enforce the rules of the room. Your second priority is to achieve consensus.


Wow, thank you for the amazingly detailed response. That actually really makes sense for me.
mareo87
Newbie
*
Offline Offline

Activity: 15
Merit: 0



View Profile WWW
February 21, 2013, 04:53:02 PM
 #9

i watch bitcoin for over a year and just about to get a hang of it. i wonder how long it would take for me to understand ripple hahaha
ccl
Full Member
***
Offline Offline

Activity: 175
Merit: 100



View Profile
February 21, 2013, 05:19:01 PM
 #10

@mareo87 u can say that again hahahaha i juz joined and it's crazy but fun... Smiley

BTC.sx - Leveraged Bitcoin Trading.
Get paid weekly for your signature.

1GTJ2DhqSPHBTEjG7GCjz6XLYZhU1hEz2a - thanks for donating Smiley
nikb
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile WWW
February 21, 2013, 06:05:00 PM
 #11

Oddly enough, it seems that there isn't yet a consensus on how consensus works. But from what I understand, consensus is trusted validators looking at the ledger, and certifying it. The only way this would be vulnerable is if a validator orchestrated a 51% attack.
I think descriptions of the "interesting" case (how Ripple uses consensus to solve the double spend problem) are getting confused with how the uninteresting cases are solved. There are really three cases:

1) As a non-validating client or server operates: Here, you just collect validations, which are signed statements of the hash of the last closed ledger. The validations are timestamped and sequenced. This allows a client to determine the current ledger which includes things like balances. You can then follow hash chains to get the results of transactions, view order books, and so on without any trust needed.

2) When a new validator comes online: A new validator can determine the current ledger using the same mechanism a client does. The new validator will then synchronize to the current ledger. The validator can also walk the hash chains to ensure that there is a valid path from the last ledger it accepted to the current ledger.

3) The interesting case -- as a validator operates, solving the double spend problem: The validator must already agree on the last closed ledger as described above. Validators exchange proposals that state which transactions the validator believes should be candidate to be applied to the ledger. Once a consensus is reached, the candidate transactions are applied deterministically so that all validators produce the same new last closed ledger. They then sign validations of this ledger (for use by clients and new validators as in 1 and 2 above). The servers then start the next consensus cycle and also collect validations from the ledger they just closed to ensure that nothing went wrong in the consensus process and to provide to clients.

Using my (overly simplified) agreement room analogy, it works like this:

1) There's a room where everyone agrees on the last closed ledger.

2) If you want to disagree, you can, but you must leave the room to do so.

3) If you want to know what the current ledger is, you walk in and ask everyone in the room.

4) If you want to perform a transaction, you read it out loud. Everyone honest agrees that it's valid.

5) If there are any transactions that someone in the room believes is valid and is not in the current ledger, they attempt to obtain a consensus on that transaction.

6) When a consensus is reach, the consensus transactions are applied to the last closed ledger forming a new last closed ledger.

7) Everyone agrees on the new last closed ledger.

8 ) We go back to step 5. Any transactions believed still valid but that didn't get into the consensus transaction set for some reason should now be voted in by every honest person.

9) If people appear to be acting in ways that don't make sense, such as voting no on transactions that have no reason not to be included or failing to validate the correct ledger, you ignore them.

10) Your top priority is to enforce the rules of the room. Your second priority is to achieve consensus.


That is an excellent description of consensus. Thanks JoelKatz.
mr_john
Newbie
*
Offline Offline

Activity: 41
Merit: 0



View Profile
October 07, 2013, 05:12:09 PM
 #12

hI!

Thanks to JoelKatz for his patience with us and his detailled  explanations. But I still have one open question about the process of "consensus". Please correct me if I got something wrong:


As I understood, new transaction are broadcasted to every server in the network (or read it out load in the room analogy). Each server receives this new transaction and decides for itself if it is valid and if so adds it to its "candidate list" of transactions which could be applied to the last closed ledger (LCL) to form a new LCL. Also each server receives proposals from other servers on its UNL and compares them with its own candidate list.

After the current timer expires (according to the youtube consensus video) the server checks which transactions in the candidate set have passed the approval rate threshold (eg. >50% of server on UNL agree with it) and forms its own new proposal containing these transactions which then will be sent out to other servers on the network. And the next iteration round may begin.

Is this correct until here?


If so, I still do not understand one single point:

My Question:
How can a new transaction in the beginning ever get an approval rate over 50% if each server first needs to see the transaction approved by some other servers in his UNL?

Wouldn't this be a chicken-or-egg problem?
A server only includes a transaction in his own proposals, if he sees the transactions in other server's proposals. But if nobody starts inlcuding it in his porposals, it never will get a 50% approval rate.

What am I missing here?
Can someone point me in the right direction? (documentation, wiki, source code, another posting,...) Any help understanding the consensus concept would be highly appreciated. Smiley
JoelKatz
Legendary
*
Offline Offline

Activity: 1582
Merit: 1004


Democracy is vulnerable to a 51% attack.


View Profile WWW
October 07, 2013, 05:29:33 PM
Last edit: October 07, 2013, 06:37:03 PM by JoelKatz
 #13

How can a new transaction in the beginning ever get an approval rate over 50% if each server first needs to see the transaction approved by some other servers in his UNL?
Before each consensus round starts, servers collect and forward transactions. When the consensus round starts, each validator makes an initial proposal based on what transactions they saw before the consensus round and what transactions didn't make it into the previous consensus round. There's a window with a minimum length of two seconds to give validators a chance to make an initial proposal. Validators can then look at the set of initial proposals to see how many validators are participating in this consensus round and how many of them vote yes or no on each transaction. They use this information to update their proposals to avalanche to consensus.

Quote
A server only includes a transaction in his own proposals, if he sees the transactions in other server's proposals. But if nobody starts inlcuding it in his porposals, it never will get a 50% approval rate.

What am I missing here?
Each server's initial proposal is based on its independent opinion of which transactions should go in the consensus set.
https://ripple.com/wiki/Ledger_Cycle

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
mr_john
Newbie
*
Offline Offline

Activity: 41
Merit: 0



View Profile
October 07, 2013, 05:39:58 PM
 #14

JoelKatz, thank you for your fast response. This makes it clearer for me now! Smiley
kuusj98
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000


I <3 VW Beetles


View Profile
October 07, 2013, 05:44:57 PM
Last edit: October 07, 2013, 06:16:30 PM by kuusj98
 #15

it doesnt work, nuff said.

@Under me: You just say it perfectly sir.
I had ~500 Ripples at the beginning of this coin and just deleted my account becouse I don't want to help this development which actually defeats all perposes of Bitcoin in general.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2086
Merit: 1007

Newbie


View Profile
October 07, 2013, 06:02:43 PM
 #16

Any newbies understand how consensus works on Ripple.com?

The answer contains just 3 words:

Ripple. Is. Centralized.
mr_john
Newbie
*
Offline Offline

Activity: 41
Merit: 0



View Profile
October 09, 2013, 10:11:56 AM
 #17

For others who are interested in understanding consensus: I found this unorganized article helpful: https://ripple.com/wiki/Unedited_Notes

To make it clear: I'm not a promoter for Ripple, I'm just interested in the different concepts used by different cryptocurrencies. And as this is so different to Bitcoin it's interesting, so I want to learn to understand it from a technical perspective. Smiley
AmazonStuff
Hero Member
*****
Offline Offline

Activity: 628
Merit: 500



View Profile
October 09, 2013, 10:27:38 AM
 #18

How Ripple Works - The Consensus Process (ADVANCED)

https://www.youtube.com/watch?v=pj1QVb1vlC0
nikb
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile WWW
October 12, 2013, 12:07:22 AM
 #19

Any newbies understand how consensus works on Ripple.com?

The answer contains just 3 words:

Ripple. Is. Centralized.

I don't think that the word "centralized" means what you think it means.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2086
Merit: 1007

Newbie


View Profile
October 12, 2013, 11:48:46 AM
 #20

Any newbies understand how consensus works on Ripple.com?

The answer contains just 3 words:

Ripple. Is. Centralized.

I don't think that the word "centralized" means what you think it means.

Fiat centralized. Paypal centralized. Ripple centralized. Do I get the word "centralized" correctly enough?
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!