diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b42106 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..878a2fa --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Sudoku snark : intro diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..030f226 --- /dev/null +++ b/flake.lock @@ -0,0 +1,114 @@ +{ + "nodes": { + "devshell": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1687173957, + "narHash": "sha256-GOds2bAQcZ94fb9/Nl/aM+r+0wGSi4EKYuZYR8Dw4R8=", + "owner": "numtide", + "repo": "devshell", + "rev": "2cf83bb31720fcc29a999aee28d6da101173e66a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1677383253, + "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9952d6bc395f5841262b006fbace8dd7e143b634", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1685564631, + "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1687502512, + "narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devshell": "devshell", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 26136ce..9df3c65 100644 --- a/flake.nix +++ b/flake.nix @@ -18,12 +18,28 @@ name = "HTTP_PORT"; value = 8080; }]; - commands = [{ - help = "print hello"; - name = "hello"; - command = "echo hello"; - }]; - packages = with pkgs; [ pandoc nixfmt ]; + commands = [ + { + help = "serve slides"; + name = "serve"; + command = '' + caddy file-server --listen :7777 --root ./public + ''; + } + { + help = "build slides"; + name = "build"; + command = '' + pandoc -t revealjs \ + --from markdown+yaml_metadata_block+link_attributes \ + -H src/header.html \ + -o public/index.html \ + -s \ + src/index.md + ''; + } + ]; + packages = with pkgs; [ pandoc nixfmt caddy ]; }; }; flake = { diff --git a/public/assets/background.avif b/public/assets/background.avif new file mode 100644 index 0000000..b73a871 Binary files /dev/null and b/public/assets/background.avif differ diff --git a/public/assets/dp.jpg b/public/assets/dp.jpg new file mode 100644 index 0000000..daa7851 Binary files /dev/null and b/public/assets/dp.jpg differ diff --git a/public/assets/hydra.png b/public/assets/hydra.png new file mode 100644 index 0000000..4f2d683 Binary files /dev/null and b/public/assets/hydra.png differ diff --git a/public/assets/zk-pr-screenshot.png b/public/assets/zk-pr-screenshot.png new file mode 100644 index 0000000..6edb7c8 Binary files /dev/null and b/public/assets/zk-pr-screenshot.png differ diff --git a/public/fonts/JetBrainsMono-Bold.woff2 b/public/fonts/JetBrainsMono-Bold.woff2 new file mode 100644 index 0000000..4917f43 Binary files /dev/null and b/public/fonts/JetBrainsMono-Bold.woff2 differ diff --git a/public/fonts/JetBrainsMono-BoldItalic.woff2 b/public/fonts/JetBrainsMono-BoldItalic.woff2 new file mode 100644 index 0000000..536d3f7 Binary files /dev/null and b/public/fonts/JetBrainsMono-BoldItalic.woff2 differ diff --git a/public/fonts/JetBrainsMono-ExtraBold.woff2 b/public/fonts/JetBrainsMono-ExtraBold.woff2 new file mode 100644 index 0000000..8f88c54 Binary files /dev/null and b/public/fonts/JetBrainsMono-ExtraBold.woff2 differ diff --git a/public/fonts/JetBrainsMono-ExtraBoldItalic.woff2 b/public/fonts/JetBrainsMono-ExtraBoldItalic.woff2 new file mode 100644 index 0000000..d1478ba Binary files /dev/null and b/public/fonts/JetBrainsMono-ExtraBoldItalic.woff2 differ diff --git a/public/fonts/JetBrainsMono-ExtraLight.woff2 b/public/fonts/JetBrainsMono-ExtraLight.woff2 new file mode 100644 index 0000000..b97239f Binary files /dev/null and b/public/fonts/JetBrainsMono-ExtraLight.woff2 differ diff --git a/public/fonts/JetBrainsMono-ExtraLightItalic.woff2 b/public/fonts/JetBrainsMono-ExtraLightItalic.woff2 new file mode 100644 index 0000000..be01aac Binary files /dev/null and b/public/fonts/JetBrainsMono-ExtraLightItalic.woff2 differ diff --git a/public/fonts/JetBrainsMono-Italic.woff2 b/public/fonts/JetBrainsMono-Italic.woff2 new file mode 100644 index 0000000..d60c270 Binary files /dev/null and b/public/fonts/JetBrainsMono-Italic.woff2 differ diff --git a/public/fonts/JetBrainsMono-Light.woff2 b/public/fonts/JetBrainsMono-Light.woff2 new file mode 100644 index 0000000..6538498 Binary files /dev/null and b/public/fonts/JetBrainsMono-Light.woff2 differ diff --git a/public/fonts/JetBrainsMono-LightItalic.woff2 b/public/fonts/JetBrainsMono-LightItalic.woff2 new file mode 100644 index 0000000..66ca3d2 Binary files /dev/null and b/public/fonts/JetBrainsMono-LightItalic.woff2 differ diff --git a/public/fonts/JetBrainsMono-Medium.woff2 b/public/fonts/JetBrainsMono-Medium.woff2 new file mode 100644 index 0000000..669d04c Binary files /dev/null and b/public/fonts/JetBrainsMono-Medium.woff2 differ diff --git a/public/fonts/JetBrainsMono-MediumItalic.woff2 b/public/fonts/JetBrainsMono-MediumItalic.woff2 new file mode 100644 index 0000000..80cfd15 Binary files /dev/null and b/public/fonts/JetBrainsMono-MediumItalic.woff2 differ diff --git a/public/fonts/JetBrainsMono-Regular.woff2 b/public/fonts/JetBrainsMono-Regular.woff2 new file mode 100644 index 0000000..40da427 Binary files /dev/null and b/public/fonts/JetBrainsMono-Regular.woff2 differ diff --git a/public/fonts/JetBrainsMono-SemiBold.woff2 b/public/fonts/JetBrainsMono-SemiBold.woff2 new file mode 100644 index 0000000..5ead7b0 Binary files /dev/null and b/public/fonts/JetBrainsMono-SemiBold.woff2 differ diff --git a/public/fonts/JetBrainsMono-SemiBoldItalic.woff2 b/public/fonts/JetBrainsMono-SemiBoldItalic.woff2 new file mode 100644 index 0000000..c5dd294 Binary files /dev/null and b/public/fonts/JetBrainsMono-SemiBoldItalic.woff2 differ diff --git a/public/fonts/JetBrainsMono-Thin.woff2 b/public/fonts/JetBrainsMono-Thin.woff2 new file mode 100644 index 0000000..17270e4 Binary files /dev/null and b/public/fonts/JetBrainsMono-Thin.woff2 differ diff --git a/public/fonts/JetBrainsMono-ThinItalic.woff2 b/public/fonts/JetBrainsMono-ThinItalic.woff2 new file mode 100644 index 0000000..a643215 Binary files /dev/null and b/public/fonts/JetBrainsMono-ThinItalic.woff2 differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..469a749 --- /dev/null +++ b/public/index.html @@ -0,0 +1,413 @@ + + + + + + Sudoku snark + + + + + + + + + + +
+
+ +
+

Sudoku snark

+

a story by Kompact.io

+
+ +
+
+

How +it started

+ +
+
+

There is hackathon on cardano πŸ₯³ …

+
+
+

But wait! 🧐 There is a ZK track

+
+
+

Surely No!?

+
    +
  • Fundemtal primitives for any zk-alg are not available in +plutus

  • +
  • Midnight, the much hyped zk sidechain, is essentially in stealth +mode

  • +
  • zk on cardano? not possible! πŸ˜΅β€πŸ’«

  • +
  • Using some other chain for zk and bridging over … that’s +bridging: we want zk

  • +
+
+
+

… oh, hello PR#5231 +πŸ‘€

+
+
+

+
    +
  • A beast of a PR: 6 months, 230 commits, 319 files changed
  • +
  • Finally merged during this hackathon
  • +
+
+

This PR adds new built-in types and functions to Plutus Core and +PlutusTx for pairings over BLS12-381, as specified in CIP-0381.

+
+
+
+

What does this mean??

+
    +
  • CIP-0381: +Plutus support for Pairings over BLS12_381
  • +
  • In other words, plutus gets the builtins that make it possible to +begin genuine zk on cardano
  • +
+
+
+

So Yes! We can zk on cardano

+
+
+

First hurdle

+
    +
  • Only the primitives are provided; we need implement a zk-alg
  • +
  • Use it as the basis for a dapp
  • +
  • And do both in a way that doesn’t break the (tx exunits) bank
  • +
+
+
+

And then?

+
    +
  • Having zk in the latest version of plutus is one thing: Running a +zk dapp on cardano is quite another!

  • +
  • There is no chance of running these new primitives on Cardano +mainnet any time soon

  • +
+
+
+

Not on L1, but … hydra

+
    +
  • Hydra can, in theory, run a modified version of plutus
  • +
  • Hydra is very much Cardano
  • +
+
+
+

… so we’d need to: πŸ“‹

+
    +
  • Create a zk validator
  • +
  • Create the related functionality to build relevant txs
  • +
  • Bump the various cardano libraries necessary to get hydra to run the +latest
  • +
  • Deploy
  • +
+

(Do this all in less than three weeks, while keeping the day job +πŸ˜…)

+
+
+
+

Sudoku snark

+ +
+
+

Aims

+

Create a non trivial zk dapp on Cardano, that provides as a +demonstrable PoC.

+

The Dapp itself can be facile: its contribution is to derisk more +ambitious dapps with stronger use cases.

+
+
+

…

+ +
+ +
+

What next?

+ +
+ +
+
+

Why this should win?

+ +
+
+

The judging criteria

+
    +
  • Innovation and Necessity to the Cardano Blockchain Ecosystem +(20%)
  • +
+

This evaluates how novel and essential your solution is within the +Cardano ecosystem. It looks at whether your idea is unique and if it +solves a critical need.

+
    +
  • Maturity of the Tech and Product (40%)
  • +
+

This assesses the technical robustness and readiness of your +solution. It considers the technology used, the degree of completion, +and the readiness for deployment of your product.

+
    +
  • Go-to-Market Strategy, User Acquisition Strategy and Community +Growth Strategy (20%)
  • +
+

This looks at your plan to introduce your product to the market, how +you plan to acquire users, and strategies you have for growing your +community. It evaluates the viability and potential effectiveness of +these strategies.

+
    +
  • Team and Experience (20%)
  • +
+
+
+

..

+
    +
  • Given that zk is +
      +
    • highly technical
    • +
    • incredibly nacent in blockchain
    • +
    • barely exists on cardano
    • +
  • +
  • expecting a maturish product with a β€œgo2market” strategy seemed … +ambitious
  • +
+
+
+
+

As for the team

+ +
+
+

@waalge

+
    +
  • Cheif of Kompact.io
  • +
  • 2 years building around cardano (eg guchi.io)
  • +
  • Previously full stack dev, ML/NLP researcher
  • +
  • PhD in geometry
  • +
+

+ + + + β€” + + + +

+
+
+
+ + + + + + + + + + + diff --git a/src/header.html b/src/header.html new file mode 100644 index 0000000..8a06f6e --- /dev/null +++ b/src/header.html @@ -0,0 +1,14 @@ + diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..9e982f5 --- /dev/null +++ b/src/index.md @@ -0,0 +1,149 @@ +--- +title: Sudoku snark +subtitle: a story by [Kompact.io](https://kompact.io) +mainfont: jetbrains-mono +# title-slide-attributes: + # data-background-image: ./assets/background.jpg + # data-background-gradient: "linear-gradient(147deg, #000000 0%, #2c3e50 74%)" +# data-background-gradient: "radial-gradient(#283b95,#17b2c3)" +background-image: ./assets/background.avif +background-opacity: "0.35" +--- + +# How it started + +## There is hackathon on cardano πŸ₯³ ... + +## But wait! 🧐 There is a ZK track + +## Surely No!? + +- Fundemtal primitives for any zk-alg are not available in plutus +- Midnight, the much hyped zk sidechain, is essentially in stealth mode +- zk on cardano? not possible! πŸ˜΅β€πŸ’« + +- Using some other chain for zk and bridging over +... that's _bridging_: we want _zk_ + +## ... oh, hello [PR#5231][pr-5231] πŸ‘€ {data-background-image="./assets/zk-pr-screenshot.png" data-background-opacity="0.3"} + +[pr-5231]: https://github.com/input-output-hk/plutus/pull/5231 + +## + +- A beast of a PR: 6 months, 230 commits, 319 files changed +- Finally merged during this hackathon + +> This PR adds new built-in types and functions to Plutus Core and PlutusTx +> for pairings over BLS12-381, as specified in CIP-0381. + +## What does this mean?? + +- [CIP-0381][cip-0381]: Plutus support for Pairings over `BLS12_381` +- In other words, plutus gets the builtins +that make it possible to begin genuine zk on cardano + +[cip-0381]: https://cips.cardano.org/cips/cip0381/ + +## So Yes! We can zk on cardano + +## First hurdle + +- Only the primitives are provided; we need implement a zk-alg +- Use it as the basis for a dapp +- And do both in a way that doesn't break the (tx exunits) bank + +## And then? + +- Having zk in the latest version of plutus is one thing: +Running a zk dapp on cardano is quite another! + +- There is no chance of running these new primitives on +Cardano mainnet any time soon + +## Not on L1, but ... hydra {data-background-image="./assets/hydra.png" data-background-opacity="0.3"} + +- Hydra can, in theory, run a modified version of plutus +- Hydra is very much Cardano + +## ... so we'd need to: πŸ“‹ + +- Create a zk validator +- Create the related functionality to build relevant txs +- Bump the various cardano libraries necessary to get hydra to run +the latest +- Deploy + +(Do this all in less than three weeks, while keeping the day job πŸ˜…) + +# Sudoku snark + +## Aims + +- Create a non trivial zk dapp on Cardano, that provides as a demonstrable PoC + +- The Dapp itself can be facile: its contribution is to derisk more ambitious dapps with stronger use cases + +## The game + +- Competitive sudoku. +- Contestants register their desire to take part +- Game master initializes a puzzle with first, and second prizes +- A contestant can claim a prize by proving they know the answer +- by the powers of zk, the claim does not disclose the solution + +xxxxxxxxxxxx + + +# What next? + +# Why this should win? + +## The judging criteria + +- Innovation and Necessity to the Cardano Blockchain Ecosystem (20%) + +This evaluates how novel and essential your solution is within the Cardano ecosystem. It looks at whether your idea is unique and if it solves a critical need. + +- Maturity of the Tech and Product (40%) + +This assesses the technical robustness and readiness of your solution. It considers the technology used, the degree of completion, and the readiness for deployment of your product. + +- Go-to-Market Strategy, User Acquisition Strategy and Community Growth Strategy (20%) + +This looks at your plan to introduce your product to the market, how you plan to acquire users, and strategies you have for growing your community. It evaluates the viability and potential effectiveness of these strategies. + +- Team and Experience (20%) + +## .. + +- Given that zk is + - highly technical + - incredibly nacent in blockchain + - barely exists on cardano +- expecting a maturish product with a "go2market" strategy seemed ... ambitious + +# As for the team + +## @waalge {data-background-image="./assets/dp.jpg" data-background-opacity="0.3"} + +- Cheif of [Kompact.io](https://kompact.io) +- 2 years building around cardano (eg guchi.io) +- Previously full stack dev, ML/NLP researcher +- PhD in geometry + + + + + + + +--- + + + + + + diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..f55c75f --- /dev/null +++ b/src/style.css @@ -0,0 +1,8 @@ +@font-face{ + font-family: 'JetBrainsMono'; + src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') format('woff2'), + url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff') format('woff'), + url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +}