Freelancer posting:
https://www.freelancer.com/projects/project-10687503/#/detailsI need a C# implementation of the Ripple Consensus Algorithm as described below. In other words I only need a way to build consensus among peers as described in this video:
Consensus Video:
https://www.youtube.com/watch?v=pj1QVb1vlC0What are they making consensus on? For my use case, it's not "ripples", instead, all nodes have to agree that random number X in the range of 1 - 10,000 equals random number Y.
NO Cryptography is needed in this project.
NO Networking code is needed in this project.
Instead of networking, the code will spawn a new thread that simulates each node class.
- There will be 100 classes of type node in memory (configurable).
- As each node starts, the constructor will use a lock to add a reference to itself in the static dictionary
- A random wait time from 1-30 seconds will occur
- Each "node" will locate 5 random other nodes from a C# static dictionary.
At this point we have 100 nodes in RAM that create a mesh network.
The Main program will have a console prompt that asks me to type in a node number (in this case I type in a number from 1 to 100).
The Main program grabs an object reference from the static dictionary.
Next the console application will ask me what variable "X" is. I input an integer.
Next the console application will ask me what variable "Y" is. I input an integer.
It's up to you to implement the consensus algorithm in a way the ensures all in-memory nodes get updated.
Part two of this project is to randomly poison the in memory nodes so that they
- Don't replicate the value (ignores it)
- Replicate a wrong value
- Delay the response in a FIFO queue
Docs:
https://ripple.com/knowledge_center/the-ripple-ledger-consensus-process/WhitePaper:
https://ripple.com/files/ripple_consensus_whitepaper.pdfRipple Wiki:
https://wiki.ripple.com/Consensus Source:
https://github.com/ripple/rippled/tree/develop/src/ripple