Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: djbaniel on February 21, 2013, 06:11:39 AM



Title: Ripple.com - How does consensus work?
Post by: djbaniel on February 21, 2013, 06:11:39 AM
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


Title: Re: Ripple.com - How does consensus work?
Post by: toz on February 21, 2013, 06:19:08 AM
It's explained on the Ripple wiki:
https://ripple.com/wiki/Consensus


Title: Re: Ripple.com - How does consensus work?
Post by: djbaniel on February 21, 2013, 06:53:13 AM
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


Title: Re: Ripple.com - How does consensus work?
Post by: benmanns on February 21, 2013, 07:25:18 AM
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?


Title: Re: Ripple.com - How does consensus work?
Post by: JoelKatz on February 21, 2013, 07:37:48 AM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: myuser on February 21, 2013, 07:54:28 AM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: JoelKatz on February 21, 2013, 08:09:46 AM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: myuser on February 21, 2013, 04:13:00 PM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: mareo87 on February 21, 2013, 04:53:02 PM
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


Title: Re: Ripple.com - How does consensus work?
Post by: ccl on February 21, 2013, 05:19:01 PM
@mareo87 u can say that again hahahaha i juz joined and it's crazy but fun... :)


Title: Re: Ripple.com - How does consensus work?
Post by: nikb on February 21, 2013, 06:05:00 PM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: mr_john on October 07, 2013, 05:12:09 PM
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. :)


Title: Re: Ripple.com - How does consensus work?
Post by: JoelKatz on October 07, 2013, 05:29:33 PM
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


Title: Re: Ripple.com - How does consensus work?
Post by: mr_john on October 07, 2013, 05:39:58 PM
JoelKatz, thank you for your fast response. This makes it clearer for me now! :)


Title: Re: Ripple.com - How does consensus work?
Post by: kuusj98 on October 07, 2013, 05:44:57 PM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: Come-from-Beyond on October 07, 2013, 06:02:43 PM
Any newbies understand how consensus works on Ripple.com?

The answer contains just 3 words:

Ripple. Is. Centralized.


Title: Re: Ripple.com - How does consensus work?
Post by: mr_john on October 09, 2013, 10:11:56 AM
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. :)


Title: Re: Ripple.com - How does consensus work?
Post by: AmazonStuff on October 09, 2013, 10:27:38 AM
How Ripple Works - The Consensus Process (ADVANCED)

https://www.youtube.com/watch?v=pj1QVb1vlC0


Title: Re: Ripple.com - How does consensus work?
Post by: nikb on October 12, 2013, 12:07:22 AM
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.


Title: Re: Ripple.com - How does consensus work?
Post by: Come-from-Beyond on October 12, 2013, 11:48:46 AM
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?


Title: Re: Ripple.com - How does consensus work?
Post by: nikb on October 12, 2013, 09:09:21 PM
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?

No - try harder. The facts are that Ripple is a distributed payment network. With that established, what, specifically, about it is centralized in your opinion?


Title: Re: Ripple.com - How does consensus work?
Post by: Come-from-Beyond on October 13, 2013, 06:39:55 AM
No - try harder. The facts are that Ripple is a distributed payment network. With that established, what, specifically, about it is centralized in your opinion?

Ah, I got where ur logic failed. U think that distributed == decentralized. Think again.


Title: Re: Ripple.com - How does consensus work?
Post by: Sukrim on October 13, 2013, 11:31:04 AM
Distributed and open to any newcomers.

You cannot set up your own node in Paypal's distributed network, you can set up one in Ripple's. You also might be able to get a banking license to play with the rich kids in fiat banking, though there is a significantly higher hurdle to jump.

Just like anyone in Bitcoin needs to use the Satoshi chain though, everyone in Ripple needs to use the OpenCoin/RippleLabs chain, maybe that's what you mean by "centralized"? With that logic though, Bitcoin would also be centralized, as is every currency around here, as they are all build on global consensus that has to start at some universally agreed point ("genesis block").

This is still just speculation on what you could mean with "centralized" - so please stop the "oh come on people - it's sooo obvious" talk and state some facts. I really don't like these ways of arguing since it was the same that people supporting pirateat40 were employing ("it is completely clear how he legitimately makes his money, just look at the hints all over the forum and read between the lines, duh! Just think for yourself!").


Title: Re: Ripple.com - How does consensus work?
Post by: nikb on October 13, 2013, 11:49:49 AM
No - try harder. The facts are that Ripple is a distributed payment network. With that established, what, specifically, about it is centralized in your opinion?

Ah, I got where ur logic failed.

You do, do you? That's cool. Let's see what you "got", shall we?


U think that distributed == decentralized. Think again.

Oops... I already see a small problem here and I'm not referring to the silly use of the letter "u" as a substitute for the pronoun "you". No, the problem is that I never made the claim that "distributed == decentralized", nor do I believe that distributed implies decentralized. Such a belief would just be completely silly.
 
So with that established, I will reiterate: I fail to see what's "centralized" about Ripple. Can you please tell me what you mean by "centralized" and what, specifically, is centralized about Ripple in your opinion?

Inquiring minds want to know.


Title: Re: Ripple.com - How does consensus work?
Post by: Skinnkavaj on October 13, 2013, 11:51:17 AM
No - try harder. The facts are that Ripple is a distributed payment network. With that established, what, specifically, about it is centralized in your opinion?

Ah, I got where ur logic failed.

You do, do you? That's cool. Let's see what you "got", shall we?


U think that distributed == decentralized. Think again.

Oops... I already see a small problem here and I'm not referring to the silly use of the letter "u" as a substitute for the pronoun "you". No, the problem is that I never made the claim that "distributed == decentralized", nor do I believe that distributed implies decentralized. Such a belief would just be completely silly.
 
So with that established, I will reiterate: I fail to see what's "centralized" about Ripple. Can you please tell me what you mean by "centralized" and what, specifically, is centralized about Ripple in your opinion?

Inquiring minds want to know.
ripple shill! you know ripple is centralized..  who owns 100 million xrp.

EDIT: This post was done by a hacker that took control over my account. I had not changed my password on bitcointalk and I had an easy one. I have no regained control over the account. Ignore this post.


Title: Re: Ripple.com - How does consensus work?
Post by: Come-from-Beyond on October 13, 2013, 12:03:57 PM
Oops... I already see a small problem here and I'm not referring to the silly use of the letter "u" as a substitute for the pronoun "you".

Heh, this statement shows I shouldn't waste my time on u.


Title: Re: Ripple.com - How does consensus work?
Post by: nikb on October 13, 2013, 08:39:52 PM
Oops... I already see a small problem here and I'm not referring to the silly use of the letter "u" as a substitute for the pronoun "you".

Heh, this statement shows I shouldn't waste my time on u.

Oh come on... you can't even handle a bit of levity? Or are you just trying to avoid explaining what you mean by "centralized" and what, specifically, is centralized about Ripple in your opinion?


Title: Re: Ripple.com - How does consensus work?
Post by: Blockchainer12345 on February 12, 2018, 04:08:27 PM
Hello,

I have got question regarding the ripple consensus algorithm.
When watching the video https://vimeo.com/64405422 I didn't understand one point.
1) In a consensus round, when moving from stage 1 (50% treshhold) to stage 2 (60% treshhold), do I delete all votes of the proposals of stage 1 and consider only new proposals or do I keep the stage 1 vots in stage 2?

Example:
stage 1
My candidate set is [A,B,C,D]
Server 1 proposal [A,B,C,-]
Server 2 proposal [-,B,C,D]

"-" missing transaction in this proposal.

votes (including my candidate set):
A:2,
B:3,
C:2,
D:2


stage 2 I received new proposals from server 1 and 2
new proposal Server 1 [-,B,C-]
new proposal Server 2 [-,B,C,D]

What would be the votes now that go into the % calculation?

A:2 or A:1
B:3 or B:4 count it double?
C:3 or C:4
D:2 or D:3

I am appreciating every help I can get.
Thank you very much.

Kind regards


Title: Re: Ripple.com - How does consensus work?
Post by: Neo.Prometheus on February 25, 2018, 11:00:55 PM
Ripple is wolf in sheep's clothing. XRP is not a cryptocurrency. It is like a digital centralized asset. It is manipulated by the bankers which has the banking system on it, which is the counter part of the decentralized cryptocurrency.


Title: Re: Ripple.com - How does consensus work?
Post by: raahi on March 17, 2018, 01:47:05 PM
If you want to explore your options on buying ripple then I suggest that you go to the ripple website , there under the buy ripple section you may get a list of all possible places or exchange platforms to buy the cryptocurrency, many times they update wallets so buying or selling of ripple it is good to have multiple options.