1
There an interesting page about contracts on the Ripple Wiki.
My limited understanding of contracts is that like other transactions in Ripple, it is the consensus across many servers that ensures validity. Am I right that when a contract is running in Ripple, the code runs on multiple servers and consensus ensures the contract's instructions are run correctly?
If so, I'm particularly curious about the "Lotto" example on the wiki page. It chooses one account randomly to be paid some amount of some currency.
If that code ran simultaneously on many Ripple servers, they'd each randomly choose a different winner. How would they ever achieve consensus?
1Right, for the contract to work, it would have to be deterministic and only random in the sense that nobody could choose what its final output is. – David Schwartz – 2014-04-17T04:46:39.840
This has yet to be implemented, but there are more possible details at https://ripple.com/forum/viewtopic.php?f=2&t=7084&p=51049#p50997
– dchapes – 2014-06-12T14:49:58.863