BSV
$52.86
Vol 35.12m
-4.93%
BTC
$96754
Vol 51252.47m
-0.73%
BCH
$453.4
Vol 407.74m
0.1%
LTC
$100.21
Vol 921.86m
-1.25%
DOGE
$0.31
Vol 6607.25m
-2.94%
Getting your Trinity Audio player ready...

This post was first published on Medium.

Zero-Knowledge Proof (ZKP) is a powerful and foundational cryptographic technique in the blockchain space, due to its potential to address both privacy and scalability. However, its esoteric nature, rooted in abstract and advanced math, places a high barrier to entry to many developers, who are reluctant to learn it despite interest. The steep learning curve poses a severe challenge for the adoption of ZKP.

We are excited to introduce zkBattleship, the world’s first and only interactive ZKP tutorial, aimed at developers who want to learn how to use it without diving into math-heavy theory. It walks a user through the full process of building the classic guessing game Battleship on the Bitcoin blockchain. Started with no prior ZKP knowledge, a user can build a fully-fledged decentralized web game after completion of the tutorial, powered by zk-SNARKs. Afterwards, he can go on and apply the techniques learned to build all kinds of ZKP applications.

How to Build a zkSNARK-based Battleship Game on Bitcoin in line image 1

To get a sense of what the game looks like, you can play it online here. Its full code is in this repo.

poster with text Hello Battleship a strategy game at sea in line image 2

Support both Circom and ZoKrates

There are various ZK programming languages. We have decided to give users option of both Circom and ZoKrates, the most popular two languages to program a ZK circuit. Users can choose whichever they prefer.

  • Circom operates at low level and is similar to a hardware description languages, thus gives users more fine-grained control.
  • ZoKrate is a python-like high-level language and easier for modern developers to begin with.

Long prover time

Generating a ZK proof is CPU intensive and can easily take up to several seconds in a browser. The web UI is blocked and seems unresponsive in the meantime, degrading user experience. To address this issue, we move the proof generating in a separate web worker thread.

Watch: The BSV Global Blockchain Convention presentation, Smart Contracts and Computation on BSV

Recommended for you

Google unveils ‘Willow’; Bernstein downplays quantum threat to Bitcoin
Google claims that Willow can eliminate common errors associated with quantum computing, while Bernstein analysts noted that Willow’s 105 qubits...
December 18, 2024
WhatsOnChain adds support for 1Sat Ordinals with new API set
WhatsOnChain now supports the 1Sat Ordinals with a set of APIs in beta testing; with this new development, developers can...
December 13, 2024
Advertisement
Advertisement
Advertisement