Yao's Millionaires' Problem
Allows "millionaires" to enter their net worth and see who is the richest without revealing their wealth.
Implementation of the articles that introduce Enigma, the Rust programming language, the process of creating your first Enigma secret contract, and React/Redux front-end, using the latest improvements for writing secret contracts.
- Getting Started with Enigma (Part 1): The Rust Programming Language
- Getting Started with Enigma (Part 2): An Intro to Secret Contracts
- Getting Started with Enigma (Part 3): A Front End Demo for dApps
- Secret Contracts: Now New and Improved!
Install the CLI for the Enigma Protocol Developer Testnet:
npm install -g @enigmampc/discovery-cli
git clone https://github.com/lauraweindorf/enigma-millionaires-problem
cd enigma-millionaires-problem
npm install
- In another terminal, start :
discovery start
- Compile the contracts:
discovery compile
- Migrate:
discovery migrate
- Run the tests:
discovery test
Now you're all set to run the DApp front-end:
cd client
npm install
npm start
For more information on the client front-end, see the discovery-template-dapp repo on GitHub.
NOTE: The DApp uses the Http Web3 provider to connect to the local Ethereum blockchain (Ganache network) configured in truffle.js
. An alternative implementation would be to set the Web3 provider to use MetaMask and change the address field from a dropdown to a text field.
- All things Enigma: Enigma Technical Resource Index.
For instructions on how to install and setup the Enigma Developer Testnet see the link above for Getting Started with Enigma: An Intro to Secret Contracts.
rustc 1.40.0-nightly
node 11.15
Docker version 19.03.5
docker-compose version 1.24.1
@enigmampc/discovery-cli 0.1.8
- Aditya Palepu, Enigma MPC - Millionaires' Problem articles and code
- Reuven Podmazo, Enigma MPC - New and Improved Secret Contracts article and code
- Victor Grau Serrat, Enigma MPC - Enigma DApp template code
- Laura Weindorf, Enigma Collective - Pulled the info together and created this repo
- The Developer Quickstart Guide to Enigma
- Enigma Project Team - Enigma Blog and Updates