/circuits
contains the circom which encodes the game rules/src
has a crude UI to play the game a more polished game built using this can be found here, Ronin's Gambit A p2p truly on-chain game/src/core
contains the main piece which implements the p2p layers (zk state channel)
Explainer video : an overview of how the game works
The idea behind the architecture is explained here
The accompanying solidity contracts can be found in my other repo
- The circuits are defined inside
/circuits
folderinit.circom
verifies the starting state of a gamemoveA.circom
verifies the moves (state transitions) of player 0moveB.circom
verifies the moves (state transitions) of player 1
npm run dev
to runs the UI build using Svelte for testing the circuits.- run
compile.sh
helper script to compile all circom files and copy the necessary files to the destination location for the frontend to use Will need a.ptau
file and update the correct file path incompile.sh
for it to work
Perform powersOfTau to produce *.ptau
files needed for verification key generation. for more details