Running a remote SNARKer
Last updated
Last updated
Dark Forest is powered by ZK-Snark technology, a cryptographic technique that can be used to prove the correctness of a function without revealing the inputs or logic of the function.
Dark Forest uses this technique to verify moves within the game are valid without revealing the location of planets to folks snooping on-chain. This technique (Zk-snark Proof Generation) is computationally expensive! Let's move that computation outside of your browser instance.
Node.js: install
Git: follow instructions
First, get a copy of the code from Github.
git clone https://github.com/Bind/df-snarker
Enter the df-snarker directory.
cd df-snarker
Install code dependencies from NPM.
npm install
Start the server.
npm run start
If you are running the server on your machine with the default configuration you can click to verify it's working! You should see v.6 Round 1 Dark Forest Snarking Server
in your browser.
Add the IP address or the URL of the machine running the server into the plugin and set the concurrency to 1. (You can set the concurrency higher if you have a very powerful machine).
That is it! You should be generating your move snarks outside of your browser.
Like the remote miner, if your server doesn't have an ssl cert (it probably doesn't) then you need to enable mixed content in your browser.
Be sure to disable adblockers as they can block outbound requests from the browser to the server, causing moves to fail!
If you are running the snarking server on the same machine as your browser be sure to use http://
not https://
when connecting to it!
Copy the remote snarker plugin code from the