Skip to content

Commit

Permalink
feat: embed zypher videos
Browse files Browse the repository at this point in the history
  • Loading branch information
nuke-web3 committed Jun 10, 2024
1 parent 201bdb5 commit 87446bf
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
3 changes: 2 additions & 1 deletion content/risc-zero/zypher-buildathon/materials.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- <a target="_blank" href="https://zypher.network/">Zypher Homepage</a>
- RISC Zero [🪧 Presentation (Video & Sides)](./presentation.md)
- RISC Zero [👷 Workshop (ZK Chess Checkmate)](./workshop.md)
- <a target="_blank" href="https://www.youtube.com/playlist?list=PLQVEOmSomLGxlUsT8ThsEUkCcC4BW0rK6">📺 Playlist of all embedded videos</a>

### ⭐ Zypher 🤝 RISC Zero Example

Expand All @@ -29,7 +30,7 @@ Here are a few key game specific ones:

### RISC Zero powered <a target="_blank" href="https://devfolio.co/projects/zksnake-c689">zkSnake (R0 v0.20)</a>

<iframe loading=lazy width="560" height="315" src="https://www.youtube-nocookie.com/embed/zkMqd_AhCFU?si=XH-R6XPzIqf0pHN8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<iframe loading=lazy width="560" height="315" src="https://www.youtube-nocookie.com/embed/zkMqd_AhCFU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

> https://github.com/0xAndoroid/zkSnake
Expand Down
8 changes: 7 additions & 1 deletion content/risc-zero/zypher-buildathon/presentation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Verifiable Games Using RISC Zero

<center>
<iframe loading=lazy style="width: 97%; aspect-ratio: 1400/900; margin: 0 0;" src="https://www.youtube-nocookie.com/embed/AnMbd6hlRo0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</center>

## Slides

<!-- markdown-link-check-disable -->
<center>
<iframe style="width: 90%; aspect-ratio: 1400/900; margin: 0 0;" src="slides.html"></iframe>
Expand All @@ -9,6 +15,6 @@
</center>
<!-- markdown-link-check-enable -->

<center style="margin: 1.3em 0; font-size: 1.2em;"><i class="fa fa-chevron-circle-down"></i> <strong>Slides Content </strong><i class="fa fa-chevron-circle-down"></i></center>
<center style="margin: 1.3em 0; font-size: 1.2em;"><i class="fa fa-chevron-circle-down"></i> <strong>Slides Content</strong><i class="fa fa-chevron-circle-down"></i></center>
{{#include slides.md}}
<a href="#top" style="position: fixed; right: 11%; bottom: 3%;"><i style="font-size: 1.3em;" class="fa fa-arrow-up"></i></a>
2 changes: 1 addition & 1 deletion content/risc-zero/zypher-buildathon/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Notes:

## <a target="_blank" href="https://devfolio.co/projects/zksnake-c689">zkSnake (R0 v0.20)</a>

<iframe loading=lazy width="560" height="315" src="https://www.youtube-nocookie.com/embed/zkMqd_AhCFU?si=XH-R6XPzIqf0pHN8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<iframe loading=lazy width="560" height="315" src="https://www.youtube-nocookie.com/embed/zkMqd_AhCFU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

#### <a target="_blank" href="https://github.com/0xAndoroid/zkSnake">zkSnake Source ↗️</a>

Expand Down
24 changes: 20 additions & 4 deletions content/risc-zero/zypher-buildathon/workshop.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ Let's experiment with a ZK chess game for verifying a winning move (a checkmate)
We extend the example by proving we know a set of moves that arrives at that final board state.

1. (Optional) <a target="_blank" href="https://www.youtube.com/watch?v=juxiL-PM6kk">Watch a primer</a> on <a target="_blank" href="https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation">FEN</a> and <a target="_blank" href="https://www.dcode.fr/san-chess-notation">SAN</a> notation for chess.

Check warning on line 6 in content/risc-zero/zypher-buildathon/workshop.md

View workflow job for this annotation

GitHub Actions / ci-checks

link checker warning

https://www.dcode.fr/san-chess-notation. Request was redirected to https://www.dcode.fr/san-chess-notation?__r=1.918ab40cb6d29d448fb2d0852fa05b7c
1. Watch <a target="_blank" href="https://www.youtube.com/playlist?list=PLcPzhUaCxlCj7wKkzekYYq7QDvtGTOPm7">this playlist</a> to learn the basics of RISC Zero
1. Watch <a target="_blank" href="https://www.youtube.com/playlist?list=PLcPzhUaCxlCj7wKkzekYYq7QDvtGTOPm7">this playlist</a> to learn the basics of RISC Zero.
1. Use `rzup` to setup your development environment based on the **correct version of the <a target="_blank" href="https://dev.risczero.com/api/">RISC Zero Getting Started Docs</a>** for you.
<center>
<iframe loading=lazy style="width: 80%; aspect-ratio: 1400/900; margin: 0 0;" src="https://www.youtube-nocookie.com/embed/G25EtWklxFk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</center>

```sh
# Get rzup
curl -L https://risczero.com/install | bash
Expand All @@ -24,6 +28,10 @@ We extend the example by proving we know a set of moves that arrives at that fin
# If you get errors, see step one to get setup!
```
1. Take a look at the structure of the code and key files:
<center>
<iframe loading=lazy style="width: 80%; aspect-ratio: 1400/900; margin: 0 0;" src="https://www.youtube-nocookie.com/embed/HTXlI3x8FFY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</center>

```sh
risc0/examples/risc0-v1-chess
├── Cargo.toml
Expand Down Expand Up @@ -57,15 +65,23 @@ We extend the example by proving we know a set of moves that arrives at that fin

> <a target="_blank" href="https://github.com/nuke-web3/risc0-v1-chess/pull/1">One possible solution with comments and tips</a>
<center>
<iframe loading=lazy style="width: 80%; aspect-ratio: 1400/900; margin: 0 0;" src="https://www.youtube-nocookie.com/embed/cOEx0doRit0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</center>

</details>

## 📝 Key Takeaways

<center>
<iframe loading=lazy style="width: 80%; aspect-ratio: 1400/900; margin: 0 0;" src="https://www.youtube-nocookie.com/embed/TjDZcLUgRV0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</center>

- Use crates in the zkVM without modification - no need to rewrite in circuits or zkDSL!
- Use standard patterns like `println!` & `fmt!` normally for basic experiments and debugging in `DEV_MODE`.
- 10s on lines of code overall -> useful proof, easily extensible!
- <a target="_blank" href="https://en.wikipedia.org/wiki/Bayesian_game">Incomplete information games</a> are possible on-chain! Hidden data/moves for players are proven, never revealed to _anyone_!
- There is still many risks of creating privacy and security faults via bugs and all the normal ways cyrptographic systems can break down...
- There is still many risks of creating privacy and security faults via bugs and all the normal ways cryptographic systems can break down...
_**With zkVMs you are abstracting the math/circuits of zk... NOT the robust design and audits required to harden your system!**_

## 🤓 Taking it Further
Expand All @@ -77,6 +93,6 @@ Here are some ideas to keep extending this example to learn more:
- Perhaps using moves signed by players in a <a target="_blank" href="https://ethereum.org/en/developers/docs/scaling/state-channels/">state channel</a> type construction, latter proven to arrive at a final winner (only?) in the receipt.
- Integrate with the <a target="_blank" href="https://github.com/risc0/risc0-foundry-template">Foundry Template</a>
- Game with stake or pot to play?
- Verify a winner and dispence funds accordingly.
- Verify a winner and dispense funds accordingly.

> Original <a target="_blank" href="https://www.youtube.com/watch?v=vxqxRiTXGBI&list=PLcPzhUaCxlCgig7ofeARMPwQ8vbuD6hC5&index=10">deep dive video</a> & <a target="_blank" href="https://drive.google.com/file/d/1Bum4x50qatqBUlQyNVkt90nnA2SEOHNO/view">slides</a> & <a target="_blank" href="https://github.com/risc0/risc0-rust-examples/tree/main/chess">source</a> - a great reference to supliment, but outdated using R0 v0.12 .
> Original <a target="_blank" href="https://www.youtube.com/watch?v=vxqxRiTXGBI&list=PLcPzhUaCxlCgig7ofeARMPwQ8vbuD6hC5&index=10">deep dive video</a> & <a target="_blank" href="https://drive.google.com/file/d/1Bum4x50qatqBUlQyNVkt90nnA2SEOHNO/view">slides</a> & <a target="_blank" href="https://github.com/risc0/risc0-rust-examples/tree/main/chess">source</a> - a great reference to supplement, but outdated using R0 v0.12 .

0 comments on commit 87446bf

Please sign in to comment.