From 85003806413e3344a3787338aa8e22a75b0fec08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuke=20=F0=9F=8C=84?= Date: Sat, 8 Jun 2024 10:07:20 -0600 Subject: [PATCH] zypher workshop deets & solution --- bun.lockb | Bin 86318 -> 85636 bytes .../risc-zero/zypher-buildathon/workshop.md | 22 +++++++++++++----- justfile | 12 ++++++---- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/bun.lockb b/bun.lockb index 34c39bcdf82b21e2a3477773d6acbf71fdda513e..1665ff39a24af34ba7fa883609b4c4920ae71d1c 100755 GIT binary patch delta 14563 zcmeHOd3;mF+Rmg6^Z?zUkcO55l^vSyJ0vZeAhduRJCe3(8|X%oLQ|HuvLmY_92NmV zP*6b-v=jwF;VLc&DsoXk5Zq8IA}SQ9-}BDNQO~{H`}@BCzx;mBnR(x5-dWyxXL52f zXXj?aob`s~=I)p8{5WG+i>jC**Pj2b?H6a8uC!l18)sfVKhozNcJt7O?i*Q5N1v}( zjBMZYa8QrI4dnY%)4J=ykdvkfkNLc2ZAs+RDm2I-L=EGHT#V)8TeGO7e>w1%>VwDBm3V_UH=nWzNz9r`_c$b`*US^`Re9>XQ)y zwIzAeM(C-QD@a3-I$SoV)8^5ghfKAlc=cT6I5$0&(ycCs)vfC?a)%&)8Ra-<8yE7%!L^~^=rD9AtSydH44 zqDsn&b-HlGc8+AbiaLFbfK*h?_z zr#dQqKaG_1?IM-b4VebH6Egf#{VY55%+)#;r4qOVcv+ePV49A^e&6_um9)b&|f<`$*j?W)w7 zTUa{Tk!N$}yX;f#C2p6~Zp(uw%Eok8YB}3YaRw%&pr|xQXY8TWcigMr1Q{Vz{WfIk zYmU>FYex$uJw>^y>b=Ndda9fBQYy5Sc#3WA+`@6_7?L{Vhwfc3zt+p!?NRv-r^~&}EBnMN_Aa;0UGB2G^6X{8F3;|AJ4-z}b#oH4 zQiTfN@K#t}QsyYbzO~CMZ}nE_@uroDifcbaN*#3CrbXqH=6P~FZt|$k?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hHzj=Px&fcB3`Q}@L20t?rGVS-L zJdZm3a{3+4g&Y8R-S`oY=iZkd*0(vsY{tK%gTx!YtbJ&4QNegyPLU^SY(Y`>`0RX} z!x?4Ew&mCh%jzQin7*Ny(~GsPyFZA%>Lm_I#bx_Y7Q|SRIH5gjCAJD;UFt@Lv2hKP z)9||=IXJanWuH)jL-b<$ zJuF~&PDycrz0~eX$g_K*aI)TxpV}yzM8)0qDE#gO{bYzE8#eCZBB$G49F=XuZ<7>I zMV=z4Z8=h%vL${zAxa8TRDrEjToj6}f_G$<;>&H>05KwxrHK>TvR>kV_N=w|RXf&J z%<6zGtSk~&xTltj)sgI8@t(FUQ)KPfuDZtU+2c%X(UJ8LXWhf9#bF&;YTbcImfJ); z8^WxjB?+q@acC-@N zsVJ8^=Z>NV#JzzmOgxam0>!R9rQ(&IESbU`CVrC4+SI*vA4@WbhsgHw05D!@ ztiL$37n>*!O2as1rm=?N`V1B=Uh9S7F2zZ4abj=QPkgWsn%v%-EfMGUVew*kI_n{J a$Y4{%^MTAqNW{NUiP4_C$von@W&Z=SSb6LK diff --git a/content/risc-zero/zypher-buildathon/workshop.md b/content/risc-zero/zypher-buildathon/workshop.md index 98a95b2..294a3e6 100644 --- a/content/risc-zero/zypher-buildathon/workshop.md +++ b/content/risc-zero/zypher-buildathon/workshop.md @@ -45,24 +45,34 @@ We extend the example by proving we know a set of moves that arrives at that fin └── src └── main.rs # 🏃 Host = Execution of guest & GUI & more unproven ``` -1. Make some changes to: - 1. `src/main.rs` to change the FEN game state and see if a non-mate move is detected. - 1. `methods/guest/src/main.rs` to change what is proven about the game: - Perhaps add something to `core/src/lib.rs` around player ID that could be proven? +1. Add the ability to prove multiple moves arriving at a final checkmate: + 1. In `core/src/lib.rs` change `Inputs` to allow for many moves, also refactor where that struct is used as needed. + 1. In `src/main.rs` change the FEN `initial_state` and `mv` to `moves` to support multiple _(legal)_ moves. + 1. ✨Experiment with game `Inputs` on chess.com/analysis by `Loading` a valid FEN in "setup position" any playing moves. + 1. Test if a non-mate move is detected. + 1. In `methods/guest/src/main.rs` change what is `commit`ed about the game. -## 📝 Key Takeaways +
+⚠️ SPOILERS ⚠️ + +> One possible solution with comments and tips -This example is a bit contrived as it's a single move that should be easy to spot, but highlights: +
+ +## 📝 Key Takeaways - 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! - Incomplete information games 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... + _**With zkVMs you are abstracting the math/circuits of zk... NOT the robust design and audits required to harden your system!**_ ## 🤓 Taking it Further Here are some ideas to keep extending this example to learn more: +- Add something to `core/src/lib.rs` around player identity that could be proven, perhaps their blockchain account via [ENS](https://ens.domains/). - Make the game multiplayer with turns between untrusting parties - Perhaps using moves signed by players in a state channel type construction, latter proven to arrive at a final winner (only?) in the receipt. - Integrate with the Foundry Template diff --git a/justfile b/justfile index 98c8659..e9a2e90 100644 --- a/justfile +++ b/justfile @@ -22,6 +22,8 @@ install: if ! $(echo "type bun" | sh > /dev/null ); then echo "🥟 Installing https://bun.sh ..." curl -fsSL https://bun.sh/install | bash + # FIXME - only works on linux 🙈 + source ~/.bashrc fi echo "💽 Bun installed. NOTE: you may need to update your shell to include this, see above output." @@ -46,14 +48,16 @@ reinstall-dev: reinstall install-dev # Install base deps and dev tools. install-dev: install + #!/usr/bin/env bash + set -euxo pipefail # Install markup link checker (mlc). - if ! $(echo "type dprint" | sh > /dev/null ); then - cargo install --locked mlc + if ! $(echo "type mlc" | sh > /dev/null ); then + cargo install --locked mlc fi # Install formatter (dprint). if ! $(echo "type dprint" | sh > /dev/null ); then - cargo install dprint + cargo install dprint fi # First *build* the embedded slides, then serve book. @@ -83,7 +87,7 @@ serve-book: serve-slides: bun s -# Serve book with embedd slides for local viewing, NO updates for slides-source file changes +# Serve book with embedded slides for local viewing, NO updates for slides-source file changes serve-embedded: bun serve-book 2> /dev/null