ethereum-oasis-op / baseline-blips

Baseline Protocol Improvement Proposals (BLIPs) play a key role in properly proposing, developing, and implementing changes to the Baseline Protocol. This repo contains all BLIPs.
Creative Commons Zero v1.0 Universal
10 stars 5 forks source link

[BLIP-5] Baseline Battleship #7

Closed humbitious closed 2 years ago

humbitious commented 2 years ago

Baseline Battleship

<Developers new to Baseline Protocol need a simple "hello world" example that they can quickly npm/install and fool with (without any assistance from GUI tools) that gives them a real case for the notion of multiparty coordination under zero knowledge. The game Battleship is a good example to use. In this case, two players have grids where they place one or more "ships", each grid being secret from the other. Then they take turns calling out grid locations: "E4" for column E row 4. In a SaaS computer game, this would be relatively trivially handled by a central server having the complete grids with the ship arrangement of both players. But assume no central server. Then it becomes important that the two players can prove to each other that when one calls "E4" and misses, that it is truly a miss and not the other player lying. It is also important that both players can say that they are in a state of verified consistency, both having the proofs, for example, that E4 was already called and scored a miss. (In other words, there needs to be a common frame of reference that allows both players to maintain verified state of consistency through each round of the game...ensuring that neither can say, "You didn't call E4" when the other player did, or "You already called E4" when they didn't. Hopefully it is clear from this description how Battleship is an apt metaphor for the range of business cases we aim to address with baselining.

<John Wolpert (@humbitious)>


Specification

Suggestion. One could write the baseline battleship game from scratch, including the zero knowledge circuits. Or one could use an existing zero knowledge battleship game like

  1. this one: https://courses.csail.mit.edu/6.857/2020/projects/13-Gupta-Kaashoek-Wang-Zhao.pdf
  2. or this one: https://tommymsz006.github.io/zkbattleship/setup
  3. https://github.com/tommymsz006/zkbattleship

Also, while the CCSM (common frame of reference) used in the example would conveniently be baseledger, the example should show easily where and how to switch from baseledger to any other location to store the proofs.


Copyright Copyright and related rights waived via CC0-Universal.

(This template adapted from the EIP template at https://github.com/ethereum/EIPs/

GoldenBit0 commented 2 years ago

Members: Manik Jain, Stefan Kostic, ---

Cadence: Weekly touch points for status updates, code reviews

Activities: 1) Read existing work for reference (Team) 2) Change folder structure (Stefan) 3) Create "battleship" in /examples folder and "battleship" branch (Manik) 4) Create slack channel for battleship (Sonal) 5) Create (Team) and facilitate grant approval process (Sonal) 6) Review circuits (Team)

Notes: 1) Audience is developers 2) Decision: create 2 grids (1 for your board, 1 for opponent)

GoldenBit0 commented 2 years ago

11/29-

GoldenBit0 commented 2 years ago

Core Devs 12/13/21 Session:

GoldenBit0 commented 2 years ago

1/10/22 Core Devs Session: