- See Final Report
- circom: zksnark circuit for computing finishSetup and move proof
- move/move.circom
- finishSetup/finishSetup.circom
- mpc/garbled: garbler circuit for comparing ranks of two players
- examples/junqi.mpcl
- public
- js/lib: code for game logic
- js/client.js: main code of client, used for communicating with smart contract, update UI, etc.
- json: Application Binary Interface(ABI) for Ethereum smart contract
- routes
- http.js: frontend webserver
- smart_contract:
- contract/Junqi.sol: smart contract
- Run Ganache
- Deploy smart_contract
- cd smart_contract
- truffle migrate
- truffle migrate --reset (used for resetting smart_contract)
- Compile MPC garbled
- cd mpc/garbled
- go mod tidy
- go build
- Run frontend server
- npm install
- node server.js
- Need two different browsers (firefox, chrome, edge)
- Install Metamask extension for these browsers
- add network(HTTP://127.0.0.1:7545, chain ID: 1337)
- import accounts for different browsers (private key in Ganache)
- Battleship: https://courses.csail.mit.edu/6.857/2020/projects/13-Gupta-Kaashoek-Wang-Zhao.pdf
- GANACHE: https://www.trufflesuite.com/docs/ganache/overview
- TRUFFLE: https://www.trufflesuite.com/docs/truffle/overview
- Solidity: https://docs.soliditylang.org/en/v0.8.10/introduction-to-smart-contracts.html#a-simple-smart-contract
- Snarkjs: https://github.com/iden3/snarkjs
- Circom: https://docs.circom.io/getting-started/installation/
- (UPDATE) web3.js: https://web3js.readthedocs.io/en/v1.5.2/
- Online-Junqi: https://github.com/samuelyuan/online-junqi