Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest a tutorial: Using zero-knowledge for a secret state #13234

Open
1 of 2 tasks
qbzzt opened this issue Jun 25, 2024 · 8 comments
Open
1 of 2 tasks

Suggest a tutorial: Using zero-knowledge for a secret state #13234

qbzzt opened this issue Jun 25, 2024 · 8 comments
Assignees
Labels
content 🖋️ This involves copy additions or edits feature ✨ This is enhancing something existing or creating something new proposal 🤔 This is a proposal request for comments 🗣️ A request for comments has been made; discussion and input is encouraged Status: Stale This issue is stale because it has been open 30 days with no activity.

Comments

@qbzzt
Copy link
Contributor

qbzzt commented Jun 25, 2024

Tutorial title

Using zero-knowledge for a secret state

Tutorial description

Onchain games are limited because they cannot keep any hidden information. After reading this tutorial, a reader will be able to combine zero-knowledge proofs and server components (see #13228) to create verifiable games with a secret state, offchain, component.

The technique to do this will be demonstrated by creating a minesweeper game.

Tutorial tags

server, offchain, centralized, zero-knowledge

Skill level

Intermediate

Hosted on ethereum.org or hosted elsewhere?

Hosted on ethereum.org

For tutorials to be hosted on Ethereum.org: Tutorial Content

  1. Why do this? Why do games need a secret state?
  2. How can we trust it? Precommitments and zero-knowledge proofs.
  3. Minesweeper, a complete example.
    • The server
      • Reporting the hash of a randomly generated map.
      • Reporting a move's results.
      • The zero-knowledge component, using Cairo or Zokrates to prove that a map with hash H has n mines around location (x,y).
    • The onchain component
      • Relaying moves
      • Verifying zero-knowledge proofs
      • Relaying results
    • The client
      • How it works
  4. Design choice: should verification happen onchain or in the client?
  5. Conclusion: when is this the appropriate technique?

For tutorials hosted elsewhere: URL to tutorial

No response

Would you like to work on this issue?

  • Yes
  • No
@qbzzt qbzzt added content 🖋️ This involves copy additions or edits feature ✨ This is enhancing something existing or creating something new labels Jun 25, 2024
@github-actions github-actions bot added the needs triage 📥 This issue needs triaged before being worked on label Jun 25, 2024
@wackerow wackerow added proposal 🤔 This is a proposal request for comments 🗣️ A request for comments has been made; discussion and input is encouraged and removed needs triage 📥 This issue needs triaged before being worked on labels Jun 27, 2024
@wackerow
Copy link
Member

Hey @qbzzt! Thanks for the suggestion, this sounds like a cool tutorial. Will go ahead and assign you.

cc: @minimalsm

@qbzzt
Copy link
Contributor Author

qbzzt commented Jun 29, 2024 via email

@qbzzt
Copy link
Contributor Author

qbzzt commented Jun 29, 2024

@wackerow , may I use MUD for this project? It's a framework that make dapp development easier (handles things like data storage and synchronization).

Proper disclosure: I work for the company that makes it, Lattice, although this will be an "own time" project, not part of my job duties.

@qbzzt
Copy link
Contributor Author

qbzzt commented Jul 21, 2024

I've already done 22 hours of work on this tutorial, and I'm nowhere near done. Sorry it's taking so long, but it's a complicated dapp to write and explain. It has three main components (server that holds the secret state, client with a UI, and the onchain component that facilitates communication between them), three computer languages (TypeScript, Zokrates, and Solidity), etc.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Status: Stale This issue is stale because it has been open 30 days with no activity. label Aug 20, 2024
@minimalsm
Copy link
Contributor

Hey @qbzzt, any update here?

@minimalsm minimalsm removed the Status: Stale This issue is stale because it has been open 30 days with no activity. label Aug 27, 2024
@qbzzt
Copy link
Contributor Author

qbzzt commented Aug 27, 2024

Hey @qbzzt, any update here?

Close to done. You can see my draft at https://github.com/qbzzt/ethereum-org-website/blob/240714-zero-knowledge-state/public/content/developers/tutorials/secret-state/index.md . It's just taking longer than expected because it's complicated, I think it's the most complicated article I've written for ethereum.org.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Status: Stale This issue is stale because it has been open 30 days with no activity. label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits feature ✨ This is enhancing something existing or creating something new proposal 🤔 This is a proposal request for comments 🗣️ A request for comments has been made; discussion and input is encouraged Status: Stale This issue is stale because it has been open 30 days with no activity.
Projects
None yet
Development

No branches or pull requests

3 participants