shamatar / go-snarks

Set of functions for golang verification of zkSNARKs
31 stars 8 forks source link

The game of SNARKs (and STARKs later)

HODL the door!

Description and rationale

During the ETHBerlin we've tried to make a good demonstration of the power of zkSNARKs by implementing a "Battleships" game where an interaction between the players is governed by the SNARKs. During the development we understood that it's actually is quite abstract two-party state-channel with some kind of a smart-contract inside. Keeping the state updates is expensive in the mainnet, so such interaction can be moved to Plasma, where the operator verifies SNARKs upon transaction submissions and updates a "state". Many people forget that Plasma was introduced not only as L2 solution for payments, but also as kind of map-reduce system.

Other repositories related to this work, developers were working in their own repos or reusing the current R&D code:

Limitations

Due to a huge pain of building a libsnark anywhere but Linux this repo contains a binary assembled under Ubuntu16.04, that is called through the command line(!) from the Go backend. In principle Go backend is ready to verify proofs itself, it's just a matter of pain with proof serialization.

How to run

Keep in mind the limitations above!

That's all for now

Intended functionality

Much work to do!

Authors (team)

Alex Vlasov, shamatar

Konstantin Panarin, Konstantce

Artem Vorobyev, artall64