Skip to content

Tic Tac Toe game implementation with Noir (ZK-proofs) and Python3 (console interface)

License

Notifications You must be signed in to change notification settings

vovkapultik/noir-tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe using Noir

Guide:

  • prerequisites:
    • Truffle (worked on v5.5.9)
    • Nargo (Noir) (worked on v0.10.5)
    • Python3 (worked on v3.11.5)
    • ganache-cli (worked on v6.12.2 with ganache-core v2.13.2)

Step 1: Play the Tic Tac Toe game: cd interface && python3 tic-tac-toe.py

You will get an output like:

Your public inputs are:
 - game: 306
 - winner: 0
Your proof is: 2a4d8a9be7...44f61e9a29bf7

This data was saved to ../zk/Prover.toml and ../zk/proofs/noirTicTacToe.proof respectively.

Now run `cd ../zk && truffle test`

Step 2: Follow the output and run cd ../zk && truffle test

If everything was correct, you will get an output like:

Correct data test:
  Verifier deployment:
    ✔ Deployed successfully (63ms)
  Proving a correct game result:
    ✔ Proved successfully (343ms)
  Proving an incorrect game result:
    ✔ Proved unsuccessfully (425ms)

3 passing (847ms)

About

Tic Tac Toe game implementation with Noir (ZK-proofs) and Python3 (console interface)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published