From 8f6d86c7ea62ce23c5d9cd45ecc548d2adfac38a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:17:12 +0000 Subject: [PATCH] deploy: 494a9105cbef3f5e56efdf1a5c9f47dae02634f3 --- 404.html | 4 ++-- ZKContainers.html | 6 +++--- assets/js/{076f2345.cebcef99.js => 076f2345.0b8c3840.js} | 2 +- assets/js/0dca48ed.78d3f6f6.js | 1 + assets/js/0dca48ed.b600577c.js | 1 - assets/js/2b850a9b.48858517.js | 1 - assets/js/2b850a9b.702d77ef.js | 1 + assets/js/3db59c3c.6f7d5e16.js | 1 - assets/js/3db59c3c.72589e52.js | 1 + assets/js/{46bc3aca.f9ef26f0.js => 46bc3aca.7ee32a82.js} | 2 +- assets/js/584ea0b6.aeed43a8.js | 1 + assets/js/584ea0b6.f978740e.js | 1 - assets/js/62ce5d13.dc2934d9.js | 1 - assets/js/62ce5d13.f2fdd712.js | 1 + assets/js/93a51358.349f8f03.js | 1 + assets/js/93a51358.aba52676.js | 1 - assets/js/a09c2993.7f47675d.js | 1 - assets/js/a09c2993.ac95bd37.js | 1 + assets/js/ec013bfd.0f494547.js | 1 + assets/js/ec013bfd.f1ea22a6.js | 1 - assets/js/fdbbc319.45462c64.js | 1 - assets/js/fdbbc319.9950e8cb.js | 1 + assets/js/runtime~main.4239796f.js | 1 - assets/js/runtime~main.69a37800.js | 1 + contributor-guide.html | 6 +++--- grants.html | 6 +++--- icicle/colab-instructions.html | 6 +++--- icicle/golang-bindings.html | 6 +++--- icicle/integrations.html | 6 +++--- icicle/introduction.html | 6 +++--- icicle/overview.html | 6 +++--- icicle/rust-bindings.html | 6 +++--- icicle/supporting-additional-curves.html | 6 +++--- index.html | 6 +++--- search.html | 4 ++-- 35 files changed, 49 insertions(+), 49 deletions(-) rename assets/js/{076f2345.cebcef99.js => 076f2345.0b8c3840.js} (55%) create mode 100644 assets/js/0dca48ed.78d3f6f6.js delete mode 100644 assets/js/0dca48ed.b600577c.js delete mode 100644 assets/js/2b850a9b.48858517.js create mode 100644 assets/js/2b850a9b.702d77ef.js delete mode 100644 assets/js/3db59c3c.6f7d5e16.js create mode 100644 assets/js/3db59c3c.72589e52.js rename assets/js/{46bc3aca.f9ef26f0.js => 46bc3aca.7ee32a82.js} (80%) create mode 100644 assets/js/584ea0b6.aeed43a8.js delete mode 100644 assets/js/584ea0b6.f978740e.js delete mode 100644 assets/js/62ce5d13.dc2934d9.js create mode 100644 assets/js/62ce5d13.f2fdd712.js create mode 100644 assets/js/93a51358.349f8f03.js delete mode 100644 assets/js/93a51358.aba52676.js delete mode 100644 assets/js/a09c2993.7f47675d.js create mode 100644 assets/js/a09c2993.ac95bd37.js create mode 100644 assets/js/ec013bfd.0f494547.js delete mode 100644 assets/js/ec013bfd.f1ea22a6.js delete mode 100644 assets/js/fdbbc319.45462c64.js create mode 100644 assets/js/fdbbc319.9950e8cb.js delete mode 100644 assets/js/runtime~main.4239796f.js create mode 100644 assets/js/runtime~main.69a37800.js diff --git a/404.html b/404.html index 4863ea4..b0ab45f 100644 --- a/404.html +++ b/404.html @@ -7,13 +7,13 @@ Page Not Found | Ingonyama Developer Documentation - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/ZKContainers.html b/ZKContainers.html index efc6d8d..2969a88 100644 --- a/ZKContainers.html +++ b/ZKContainers.html @@ -7,14 +7,14 @@ ZKContainer | Ingonyama Developer Documentation - +
Skip to main content

ZKContainer

We found that developing ZK provers with ICICLE gives developers the ability to scale ZK provers across many machines and many GPUs. To make this possible we developed the ZKContainer.

What is a ZKContainer?

A ZKContainer is an standardized, optimized and secure docker container that we configured with ICICLE applications in mind. A developer using our ZKContainer can deploy an ICICLE application on a single machine or on a thousand GPU machines in a data center with minimal concerns regarding compatibility.

ZKContainer has been used by Ingonyama clients to achieve scalability across large data centers. -We suggest you read our article regarding ZKContainer to understand the benefits of using them.

ZKContainer inside a ZK data center

- +We suggest you read our article regarding ZKContainer to understand the benefits of using them.

ZKContainer inside a ZK data center

+ \ No newline at end of file diff --git a/assets/js/076f2345.cebcef99.js b/assets/js/076f2345.0b8c3840.js similarity index 55% rename from assets/js/076f2345.cebcef99.js rename to assets/js/076f2345.0b8c3840.js index cdb9d1c..046763f 100644 --- a/assets/js/076f2345.cebcef99.js +++ b/assets/js/076f2345.0b8c3840.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[131],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(n),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=n(7462),a=(n(7294),n(3905));n(8209);const o={},i="ZKContainer",s={unversionedId:"ZKContainers",id:"ZKContainers",title:"ZKContainer",description:"We found that developing ZK provers with ICICLE gives developers the ability to scale ZK provers across many machines and many GPUs. To make this possible we developed the ZKContainer.",source:"@site/docs/ZKContainers.md",sourceDirName:".",slug:"/ZKContainers",permalink:"/ZKContainers",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/ZKContainers.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Run ICICLE on Google Colab",permalink:"/icicle/colab-instructions"},next:{title:"Ingonyama Grant programs",permalink:"/grants"}},c={},l=[{value:"What is a ZKContainer?",id:"what-is-a-zkcontainer",level:2}],p={toc:l},u="wrapper";function d(e){let{components:t,...o}=e;return(0,a.kt)(u,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"zkcontainer"},"ZKContainer"),(0,a.kt)("p",null,"We found that developing ZK provers with ICICLE gives developers the ability to scale ZK provers across many machines and many GPUs. To make this possible we developed the ZKContainer."),(0,a.kt)("h2",{id:"what-is-a-zkcontainer"},"What is a ZKContainer?"),(0,a.kt)("p",null,"A ZKContainer is an standardized, optimized and secure docker container that we configured with ICICLE applications in mind. A developer using our ZKContainer can deploy an ICICLE application on a single machine or on a thousand GPU machines in a data center with minimal concerns regarding compatibility."),(0,a.kt)("p",null,"ZKContainer has been used by Ingonyama clients to achieve scalability across large data centers.\nWe suggest you read our ",(0,a.kt)("a",{parentName:"p",href:"https://medium.com/@ingonyama/product-announcement-zk-containers-0e2a1f2d0a2b"},"article")," regarding ZKContainer to understand the benefits of using them."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"ZKContainer inside a ZK data center",src:n(4943).Z,width:"1400",height:"875"})))}d.isMDXComponent=!0},4943:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/architecture-zkcontainer-2bf99eb4700d652c0e85f8938a75f1ea.png"},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[131],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(n),m=a,f=d["".concat(c,".").concat(m)]||d[m]||u[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[d]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=n(7462),a=(n(7294),n(3905));n(8209);const o={},i="ZKContainer",s={unversionedId:"ZKContainers",id:"ZKContainers",title:"ZKContainer",description:"We found that developing ZK provers with ICICLE gives developers the ability to scale ZK provers across many machines and many GPUs. To make this possible we developed the ZKContainer.",source:"@site/docs/ZKContainers.md",sourceDirName:".",slug:"/ZKContainers",permalink:"/ZKContainers",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/ZKContainers.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Run ICICLE on Google Colab",permalink:"/icicle/colab-instructions"},next:{title:"Ingonyama Grant programs",permalink:"/grants"}},c={},l=[{value:"What is a ZKContainer?",id:"what-is-a-zkcontainer",level:2}],p={toc:l},d="wrapper";function u(e){let{components:t,...o}=e;return(0,a.kt)(d,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"zkcontainer"},"ZKContainer"),(0,a.kt)("p",null,"We found that developing ZK provers with ICICLE gives developers the ability to scale ZK provers across many machines and many GPUs. To make this possible we developed the ZKContainer."),(0,a.kt)("h2",{id:"what-is-a-zkcontainer"},"What is a ZKContainer?"),(0,a.kt)("p",null,"A ZKContainer is an standardized, optimized and secure docker container that we configured with ICICLE applications in mind. A developer using our ZKContainer can deploy an ICICLE application on a single machine or on a thousand GPU machines in a data center with minimal concerns regarding compatibility."),(0,a.kt)("p",null,"ZKContainer has been used by Ingonyama clients to achieve scalability across large data centers.\nWe suggest you read our ",(0,a.kt)("a",{parentName:"p",href:"https://medium.com/@ingonyama/product-announcement-zk-containers-0e2a1f2d0a2b"},"article")," regarding ZKContainer to understand the benefits of using them."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"ZKContainer inside a ZK data center",src:n(4943).Z,width:"1400",height:"875"})))}u.isMDXComponent=!0},4943:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/architecture-zkcontainer-2bf99eb4700d652c0e85f8938a75f1ea.png"},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/0dca48ed.78d3f6f6.js b/assets/js/0dca48ed.78d3f6f6.js new file mode 100644 index 0000000..5091255 --- /dev/null +++ b/assets/js/0dca48ed.78d3f6f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[67],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),d=i,h=u["".concat(c,".").concat(d)]||u[d]||g[d]||a;return n?r.createElement(h,o(o({ref:t},p),{},{components:n})):r.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>g,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=n(7462),i=(n(7294),n(3905));n(8209);const a={},o="Integrations",l={unversionedId:"icicle/integrations",id:"icicle/integrations",title:"Integrations",description:"ICICLE has been used by companies like Celer Network, Gnark and others to accelerate their ZK proving pipeline.",source:"@site/docs/icicle/integrations.md",sourceDirName:"icicle",slug:"/icicle/integrations",permalink:"/icicle/integrations",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/integrations.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Getting started with ICICLE",permalink:"/icicle/introduction"},next:{title:"Golang bindings",permalink:"/icicle/golang-bindings"}},c={},s=[{value:"A primer to building your own integrations",id:"a-primer-to-building-your-own-integrations",level:2},{value:"Using ICICLE integrations",id:"using-icicle-integrations",level:2},{value:"Gnark",id:"gnark",level:3},{value:"Halo2",id:"halo2",level:3}],p={toc:s},u="wrapper";function g(e){let{components:t,...a}=e;return(0,i.kt)(u,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"integrations"},"Integrations"),(0,i.kt)("p",null,"ICICLE has been used by companies like ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/celer-network"},"Celer Network"),", ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark")," and others to accelerate their ZK proving pipeline."),(0,i.kt)("p",null,"Many of these integrations have been a collaboration between Ingonyama and the integrating company. We have learned a lot about designing GPU based ZK provers. "),(0,i.kt)("p",null,"If you're interested in understanding these integrations better or learning how you can use ICICLE to accelerate your existing ZK proving pipeline this is the place for you."),(0,i.kt)("h2",{id:"a-primer-to-building-your-own-integrations"},"A primer to building your own integrations"),(0,i.kt)("p",null,"Lets illustrate an ICICLE integration, so you can understand the core API and design overview of ICICLE."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"ICICLE architecture",src:n(2547).Z,width:"906",height:"878"})),(0,i.kt)("p",null,"Engineers usually use a cryptography library to implement their ZK protocols. These libraries implement efficient primitives which are used as building blocks for the protocol; ICICLE is such a library. The difference is that ICICLE is designed from the start to run on GPUs; the Rust and Golang APIs abstract away all low level CUDA details. Our goal was to allow developers with no GPU experience to quickly get started with ICICLE. "),(0,i.kt)("p",null,"A developer may use ICICLE with two main approaches in mind."),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Drop in replacement approach."),(0,i.kt)("li",{parentName:"ol"},"Full GPU replacement approach.")),(0,i.kt)("p",null,"The first approach for GPU-accelerating your Prover with ICICLE is quick to implement, but it has limitations, such as reduced memory optimization and limited protocol tuning for GPUs. It's a solid starting point, but those committed to fully leveraging GPU acceleration should consider a more comprehensive approach."),(0,i.kt)("p",null,"A full GPU replacement means performing the entire ZK proof on the GPU. This approach will reduce latency to a minimum and requires you to change the way you implement the protocol to be more GPU friendly. This approach will take full advantage of GPU acceleration. Redesigning your prover this way may take more engineering effort but we promise you that its worth it!"),(0,i.kt)("h2",{id:"using-icicle-integrations"},"Using ICICLE integrations"),(0,i.kt)("p",null,"Here we cover how a developer can run existing circuits on ICICLE integrated provers."),(0,i.kt)("h3",{id:"gnark"},"Gnark"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark")," officially supports GPU proving with ICICLE. Currently only Groth16 on curve ",(0,i.kt)("inlineCode",{parentName:"p"},"BN254")," is supported. This means that if you are currently using Gnark to write your circuits you can enjoy GPU acceleration without making many changes."),(0,i.kt)("p",null,"To use GPUs, add the ",(0,i.kt)("inlineCode",{parentName:"p"},"icicle")," buildtag to your build/run commands, e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"go run -tags=icicle main.go.")),(0,i.kt)("p",null,"You must also switch to the ICICLE backend, WithIcicleAcceleration backend ProverOption:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"// toggle on\nproofIci, err := groth16.Prove(ccs, pk, secretWitness, backend.WithIcicleAcceleration())\n \n// toggle off\nproof, err := groth16.Prove(ccs, pk, secretWitness)\n")),(0,i.kt)("p",null,"You can reference the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark?tab=readme-ov-file#gpu-support"},"Gnark docs")," for further information."),(0,i.kt)("h3",{id:"halo2"},"Halo2"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/zkonduit/halo2"},"Halo2")," fork integrated with ICICLE for GPU acceleration. This means that you can run your existing Halo2 circuits with GPU acceleration just by activating a feature flag."),(0,i.kt)("p",null,"To enable GPU acceleration just enable ",(0,i.kt)("inlineCode",{parentName:"p"},"icicle_gpu")," ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/zkonduit/halo2/blob/3d7b5e61b3052680ccb279e05bdcc21dd8a8fedf/halo2_proofs/Cargo.toml#L102"},"feature flag"),"."),(0,i.kt)("p",null,"This feature flag will seamlessly toggle on GPU acceleration for you."))}g.isMDXComponent=!0},2547:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/architecture-high-level-3c1ae0f257c7921b77378aa3daaab41c.png"},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/0dca48ed.b600577c.js b/assets/js/0dca48ed.b600577c.js deleted file mode 100644 index 176d01b..0000000 --- a/assets/js/0dca48ed.b600577c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[67],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),d=i,h=u["".concat(c,".").concat(d)]||u[d]||g[d]||a;return n?r.createElement(h,o(o({ref:t},p),{},{components:n})):r.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>g,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=n(7462),i=(n(7294),n(3905));n(8209);const a={},o="Integrations",l={unversionedId:"icicle/integrations",id:"icicle/integrations",title:"Integrations",description:"ICICLE has been used by companies like Celer Network, Gnark and others to accelerate their ZK proving pipeline.",source:"@site/docs/icicle/integrations.md",sourceDirName:"icicle",slug:"/icicle/integrations",permalink:"/icicle/integrations",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/integrations.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Getting started with ICICLE",permalink:"/icicle/introduction"},next:{title:"Golang bindings",permalink:"/icicle/golang-bindings"}},c={},s=[{value:"A primer to building your own integrations",id:"a-primer-to-building-your-own-integrations",level:2},{value:"Using ICICLE integrations",id:"using-icicle-integrations",level:2},{value:"Gnark",id:"gnark",level:3},{value:"Halo2",id:"halo2",level:3}],p={toc:s},u="wrapper";function g(e){let{components:t,...a}=e;return(0,i.kt)(u,(0,r.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"integrations"},"Integrations"),(0,i.kt)("p",null,"ICICLE has been used by companies like ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/celer-network"},"Celer Network"),", ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark")," and others to accelerate their ZK proving pipeline."),(0,i.kt)("p",null,"Many of these integrations have been a collaboration between Ingonyama and the integrating company. We have learned a lot about designing GPU based ZK provers. "),(0,i.kt)("p",null,"If you're interested in understanding these integrations better or learning how you can use ICICLE to accelerate your existing ZK proving pipeline this is the place for you."),(0,i.kt)("h2",{id:"a-primer-to-building-your-own-integrations"},"A primer to building your own integrations"),(0,i.kt)("p",null,"Lets illustrate an ICICLE integration, so you can understand the core API and design overview of ICICLE."),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"ICICLE architecture",src:n(2547).Z,width:"906",height:"878"})),(0,i.kt)("p",null,"Engineers usually use a cryptography library to implement their ZK protocols. These libraries implement efficient primitives which are used as building blocks for the protocol; ICICLE is such a library. The difference is that ICICLE is designed from the start to run on GPUs; the Rust and Golang APIs abstract away all low level CUDA details. Our goal was to allow developers with no GPU experience to quickly get started with ICICLE. "),(0,i.kt)("p",null,"A developer may use ICICLE with two main approaches in mind."),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Drop in replacement approach."),(0,i.kt)("li",{parentName:"ol"},"Full GPU replacement approach.")),(0,i.kt)("p",null,"The first approach for GPU-accelerating your Prover with ICICLE is quick to implement, but it has limitations, such as reduced memory optimization and limited protocol tuning for GPUs. It's a solid starting point, but those committed to fully leveraging GPU acceleration should consider a more comprehensive approach."),(0,i.kt)("p",null,"A full GPU replacement means performing the entire ZK proof on the GPU. This approach will reduce latency to a minimum and requires you to change the way you implement the protocol to be more GPU friendly. This approach will take full advantage of GPU acceleration. Redesigning your prover this way may take more engineering effort but we promise you that its worth it!"),(0,i.kt)("h2",{id:"using-icicle-integrations"},"Using ICICLE integrations"),(0,i.kt)("p",null,"Here we cover how a developer can run existing circuits on ICICLE integrated provers."),(0,i.kt)("h3",{id:"gnark"},"Gnark"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark")," officially supports GPU proving with ICICLE. Currently only Groth16 on curve ",(0,i.kt)("inlineCode",{parentName:"p"},"BN254")," is supported. This means that if you are currently using Gnark to write your circuits you can enjoy GPU acceleration without making many changes."),(0,i.kt)("p",null,"To use GPUs, add the ",(0,i.kt)("inlineCode",{parentName:"p"},"icicle")," buildtag to your build/run commands, e.g. ",(0,i.kt)("inlineCode",{parentName:"p"},"go run -tags=icicle main.go.")),(0,i.kt)("p",null,"You must also switch to the ICICLE backend, WithIcicleAcceleration backend ProverOption:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"// toggle on\nproofIci, err := groth16.Prove(ccs, pk, secretWitness, backend.WithIcicleAcceleration())\n \n// toggle off\nproof, err := groth16.Prove(ccs, pk, secretWitness)\n")),(0,i.kt)("p",null,"You can reference the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark?tab=readme-ov-file#gpu-support"},"Gnark docs")," for further information."),(0,i.kt)("h3",{id:"halo2"},"Halo2"),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/zkonduit/halo2"},"Halo2")," fork integrated with ICICLE for GPU acceleration. This means that you can run your existing Halo2 circuits with GPU acceleration just by activating a feature flag."),(0,i.kt)("p",null,"To enable GPU acceleration just enable ",(0,i.kt)("inlineCode",{parentName:"p"},"icicle_gpu")," ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/zkonduit/halo2/blob/3d7b5e61b3052680ccb279e05bdcc21dd8a8fedf/halo2_proofs/Cargo.toml#L102"},"feature flag"),"."),(0,i.kt)("p",null,"This feature flag will seamlessly toggle on GPU acceleration for you."))}g.isMDXComponent=!0},2547:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/architecture-high-level-3c1ae0f257c7921b77378aa3daaab41c.png"},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/2b850a9b.48858517.js b/assets/js/2b850a9b.48858517.js deleted file mode 100644 index a850f08..0000000 --- a/assets/js/2b850a9b.48858517.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[614],{3905:(e,t,i)=>{i.d(t,{Zo:()=>u,kt:()=>h});var n=i(7294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),i=t;return e&&(i="function"==typeof e?e(t):l(l({},t),e)),i},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(i),m=a,h=p["".concat(s,".").concat(m)]||p[m]||d[m]||r;return i?n.createElement(h,l(l({ref:t},u),{},{components:i})):n.createElement(h,l({ref:t},u))}));function h(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=i.length,l=new Array(r);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:a,l[1]=o;for(var c=2;c{i.r(t),i.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var n=i(7462),a=(i(7294),i(3905));i(8209);const r={},l="Getting started with ICICLE",o={unversionedId:"icicle/introduction",id:"icicle/introduction",title:"Getting started with ICICLE",description:"This guide is oriented towards developers who want to start writing code with the ICICLE libraries. If you just want to run your existing ZK circuits on GPU refer to this guide please.",source:"@site/docs/icicle/introduction.md",sourceDirName:"icicle",slug:"/icicle/introduction",permalink:"/icicle/introduction",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/introduction.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"What is ICICLE?",permalink:"/icicle/overview"},next:{title:"Integrations",permalink:"/icicle/integrations"}},s={},c=[{value:"ICICLE repository overview",id:"icicle-repository-overview",level:2},{value:"ICICLE Core",id:"icicle-core",level:3},{value:"ICICLE Rust and Golang bindings",id:"icicle-rust-and-golang-bindings",level:3},{value:"Running ICICLE",id:"running-icicle",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Optional Prerequisites",id:"optional-prerequisites",level:4},{value:"Setting up ICICLE and running tests",id:"setting-up-icicle-and-running-tests",level:3},{value:"Setting up our environment",id:"setting-up-our-environment",level:4},{value:"ICICLE Core",id:"icicle-core-1",level:4},{value:"ICICLE Rust",id:"icicle-rust",level:4},{value:"ICICLE Golang",id:"icicle-golang",level:4},{value:"Running ICICLE examples",id:"running-icicle-examples",level:3},{value:"Writing new bindings for ICICLE",id:"writing-new-bindings-for-icicle",level:2},{value:"ICICLE Adapters",id:"icicle-adapters",level:3}],u={toc:c},p="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getting-started-with-icicle"},"Getting started with ICICLE"),(0,a.kt)("p",null,"This guide is oriented towards developers who want to start writing code with the ICICLE libraries. If you just want to run your existing ZK circuits on GPU refer to ",(0,a.kt)("a",{parentName:"p",href:"/icicle/integrations#using-icicle-integrations"},"this guide")," please."),(0,a.kt)("h2",{id:"icicle-repository-overview"},"ICICLE repository overview"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"ICICLE API overview",src:i(5870).Z,width:"1932",height:"996"})),(0,a.kt)("p",null,"The diagram above displays the general architecture of ICICLE and the API layers that exist. The CUDA API, which we also call ICICLE Core, is the lowest level and is comprised of CUDA kernels which implement all primitives such as MSM as well as C++ wrappers which expose these methods for different curves."),(0,a.kt)("p",null,"ICICLE Core compiles into a static library. This library can be used with our official Golang and Rust wrappers or you can implement a wrapper for it in any language."),(0,a.kt)("p",null,"Based on this dependency architecture, the ICICLE repository has three main sections, each of which is independent from the other."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ICICLE core"),(0,a.kt)("li",{parentName:"ul"},"ICICLE Rust bindings"),(0,a.kt)("li",{parentName:"ul"},"ICICLE Golang bindings")),(0,a.kt)("h3",{id:"icicle-core"},"ICICLE Core"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle"},"ICICLE core")," contains all the low level CUDA code implementing primitives such as ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/primitives"},"points")," and ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/appUtils/msm"},"MSM"),". There also exists higher level C++ wrappers to expose the low level CUDA primitives (",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/curves/bn254/msm.cu"},"example"),")."),(0,a.kt)("p",null,"ICICLE Core would typically be compiled into a static library and used in a third party language such as Rust or Golang."),(0,a.kt)("h3",{id:"icicle-rust-and-golang-bindings"},"ICICLE Rust and Golang bindings"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/tree/main/wrappers/rust"},"ICICLE Rust bindings")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/tree/main/goicicle"},"ICICLE Golang bindings"))),(0,a.kt)("p",null,"These bindings allow you to easily use ICICLE in a Rust or Golang project. Setting up Golang bindings requires a bit of extra steps compared to the Rust bindings which utilize the ",(0,a.kt)("inlineCode",{parentName:"p"},"cargo build")," tool."),(0,a.kt)("h2",{id:"running-icicle"},"Running ICICLE"),(0,a.kt)("p",null,"This guide assumes that you have a Linux or Windows machine with a Nvidia GPU installed. If you don't have access to a Nvidia GPU you can access one for free on ",(0,a.kt)("a",{parentName:"p",href:"https://colab.google/"},"Google Colab"),"."),(0,a.kt)("h3",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"NVCC (version 12.0 or newer)"),(0,a.kt)("li",{parentName:"ul"},"cmake 3.18 and above"),(0,a.kt)("li",{parentName:"ul"},"GCC - version 9 or newer is recommended."),(0,a.kt)("li",{parentName:"ul"},"Any Nvidia GPU"),(0,a.kt)("li",{parentName:"ul"},"Linux or Windows operating system.")),(0,a.kt)("h4",{id:"optional-prerequisites"},"Optional Prerequisites"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Docker, latest version."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html"},"NVIDIA Container Toolkit"))),(0,a.kt)("p",null,"If you don't wish to install these prerequisites you can follow this tutorial using a ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/Dockerfile"},"ZK-Container")," (docker container). To learn more about using ZK-Containers ",(0,a.kt)("a",{parentName:"p",href:"/ZKContainers"},"read this"),"."),(0,a.kt)("h3",{id:"setting-up-icicle-and-running-tests"},"Setting up ICICLE and running tests"),(0,a.kt)("p",null,"The objective of this guide is to make sure you can run the ICICLE Core, Rust and Golang tests. Achieving this will ensure you know how to setup ICICLE and run a ICICLE program. For simplicity, we will be using the ICICLE docker container as our environment, however, you may install the prerequisites on your machine and follow the same commands in your terminal."),(0,a.kt)("h4",{id:"setting-up-our-environment"},"Setting up our environment"),(0,a.kt)("p",null,"Lets begin by cloning the ICICLE repository:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"git clone https://github.com/ingonyama-zk/icicle\n")),(0,a.kt)("p",null,"We will proceed to build the docker image ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/Dockerfile"},"found here"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker build -t icicle-demo .\ndocker run -it --runtime=nvidia --gpus all --name icicle_container icicle-demo\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"-it")," runs the container in interactive mode with a terminal."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"--gpus all")," Allocate all available GPUs to the container. You can also specify which GPUs to use if you don't want to allocate all."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"--runtime=nvidia")," Use the NVIDIA runtime, necessary for GPU support.")),(0,a.kt)("p",null,"To read more about these settings reference this ",(0,a.kt)("a",{parentName:"p",href:"https://developer.nvidia.com/nvidia-container-runtime"},"article"),"."),(0,a.kt)("p",null,"If you accidentally close your terminal and want to reconnect just call:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker exec -it icicle_container bash\n")),(0,a.kt)("p",null,"Lets make sure that we have the correct CUDA version before proceeding"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"nvcc --version\n")),(0,a.kt)("p",null,"You should see something like this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"nvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2023 NVIDIA Corporation\nBuilt on Tue_Aug_15_22:02:13_PDT_2023\nCuda compilation tools, release 12.2, V12.2.140\nBuild cuda_12.2.r12.2/compiler.33191640_0\n")),(0,a.kt)("p",null,"Make sure the release version is at least 12.0."),(0,a.kt)("h4",{id:"icicle-core-1"},"ICICLE Core"),(0,a.kt)("p",null,"ICICLE Core is found under ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle"},(0,a.kt)("inlineCode",{parentName:"a"},"/icicle")),". To build and run the tests first:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd icicle\n")),(0,a.kt)("p",null,"We are going to compile ICICLE for a specific curve"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"mkdir -p build\ncmake -S . -B build -DCURVE=bn254 -DBUILD_TESTS=ON\ncmake --build build\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"-DBUILD_TESTS=ON")," compiles the tests, without this flag ",(0,a.kt)("inlineCode",{parentName:"p"},"ctest")," won't work.\n",(0,a.kt)("inlineCode",{parentName:"p"},"-DCURVE=bn254")," tells the compiler which curve to build. You can find a list of supported curves ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/curves"},"here"),"."),(0,a.kt)("p",null,"The output in ",(0,a.kt)("inlineCode",{parentName:"p"},"build")," folder should include the static libraries for the compiled curve."),(0,a.kt)("div",{className:"admonition admonition-info alert alert--info"},(0,a.kt)("div",{parentName:"div",className:"admonition-heading"},(0,a.kt)("h5",{parentName:"div"},(0,a.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,a.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,a.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"info")),(0,a.kt)("div",{parentName:"div",className:"admonition-content"},(0,a.kt)("p",{parentName:"div"},"Make sure to only use ",(0,a.kt)("inlineCode",{parentName:"p"},"-DBUILD_TESTS=ON")," for running tests as the archive output will only be available when ",(0,a.kt)("inlineCode",{parentName:"p"},"-DBUILD_TESTS=ON")," is not supplied."))),(0,a.kt)("p",null,"To run the test"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd build\nctest\n")),(0,a.kt)("h4",{id:"icicle-rust"},"ICICLE Rust"),(0,a.kt)("p",null,"The rust bindings work by first compiling the CUDA static libraries as seen ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/wrappers/rust/icicle-curves/icicle-bn254/build.rs"},"here"),". The compilation of CUDA and the Rust library is all handled by the rust build toolchain."),(0,a.kt)("p",null,"Similar to ICICLE Core here we also have to compile per curve."),(0,a.kt)("p",null,"Lets compile curve ",(0,a.kt)("inlineCode",{parentName:"p"},"bn254")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd wrappers/rust/icicle-curves/icicle-bn254\n")),(0,a.kt)("p",null,"Now lets build our library"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cargo build --release\n")),(0,a.kt)("p",null,"This may take a couple of minutes since we are compiling both the CUDA and Rust code."),(0,a.kt)("p",null,"To run the tests"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cargo test -- --test-threads=1\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"--test-threads=1")," is needed because currently some tests might interfere with one another inside the GPU."),(0,a.kt)("p",null,"We also include some benchmarks"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cargo bench\n")),(0,a.kt)("h4",{id:"icicle-golang"},"ICICLE Golang"),(0,a.kt)("p",null,"Golang is WIP in v1, coming soon. Please checkout a previous ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/releases/tag/v0.1.0"},"release v0.1.0")," for golang bindings."),(0,a.kt)("h3",{id:"running-icicle-examples"},"Running ICICLE examples"),(0,a.kt)("p",null,"ICICLE examples can be found ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle-examples"},"here")," these examples cover some simple use cases using C++, rust and golang."),(0,a.kt)("p",null,"In each example directory, ZK-container files are located in a subdirectory ",(0,a.kt)("inlineCode",{parentName:"p"},".devcontainer"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"msm/\n\u251c\u2500\u2500 .devcontainer\n \u251c\u2500\u2500 devcontainer.json\n \u2514\u2500\u2500 Dockerfile\n")),(0,a.kt)("p",null,"Lets run one of our C++ examples, in this case the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle-examples/blob/main/c%2B%2B/msm/example.cu"},"MSM example"),"."),(0,a.kt)("p",null,"Clone the repository"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"git clone https://github.com/ingonyama-zk/icicle-examples.git\ncd icicle-examples\n")),(0,a.kt)("p",null,"Enter the test directory"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd c++/msm\n")),(0,a.kt)("p",null,"Now lets build our docker file and run the test inside it. Make sure you have installed the ",(0,a.kt)("a",{parentName:"p",href:"#optional-prerequisites"},"optional prerequisites"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker build -t icicle-example-msm -f .devcontainer/Dockerfile .\n")),(0,a.kt)("p",null,"Lets start and enter the container"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker run -it --rm --gpus all -v .:/icicle-example icicle-example-msm\n")),(0,a.kt)("p",null,"to run the example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"rm -rf build\nmkdir -p build\ncmake -S . -B build\ncmake --build build\n./build/example\n")),(0,a.kt)("p",null,"You can now experiment with our other examples, perhaps try to run a rust or golang example next."),(0,a.kt)("h2",{id:"writing-new-bindings-for-icicle"},"Writing new bindings for ICICLE"),(0,a.kt)("p",null,"Since ICICLE Core is written in CUDA / C++ its really simple to generate static libraries. These static libraries can be installed on any system and called by higher level languages such as Golang."),(0,a.kt)("p",null,"static libraries can be loaded into memory once and used by multiple programs, reducing memory usage and potentially improving performance. They also allow you to separate functionality into distinct modules so your static library may need to compile only specific features that you want to use."),(0,a.kt)("p",null,"Lets review the Golang bindings since its a pretty verbose example (compared to rust which hides it pretty well) of using static libraries. Golang has a library named ",(0,a.kt)("inlineCode",{parentName:"p"},"CGO")," which can be used to link static libraries. Here's a basic example on how you can use cgo to link these libraries:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'/*\n#cgo LDFLAGS: -L/path/to/shared/libs -lbn254 -lbls12_381 -lbls12_377 -lbw6_671\n#include "icicle.h" // make sure you use the correct header file(s)\n*/\nimport "C"\n\nfunc main() {\n // Now you can call the C functions from the ICICLE libraries.\n // Note that C function calls are prefixed with \'C.\' in Go code.\n\n out := (*C.BN254_projective_t)(unsafe.Pointer(p))\n in := (*C.BN254_affine_t)(unsafe.Pointer(affine))\n\n C.projective_from_affine_bn254(out, in)\n}\n')),(0,a.kt)("p",null,"The comments on the first line tell ",(0,a.kt)("inlineCode",{parentName:"p"},"CGO")," which libraries to import as well as which header files to include. You can then call methods which are part of the static library and defined in the header file, ",(0,a.kt)("inlineCode",{parentName:"p"},"C.projective_from_affine_bn254")," is an example."),(0,a.kt)("p",null,"If you wish to create your own bindings for a language of your choice we suggest you start by investigating how you can call static libraries."),(0,a.kt)("h3",{id:"icicle-adapters"},"ICICLE Adapters"),(0,a.kt)("p",null,"One of the core ideas behind ICICLE is that developers can gradually accelerate their provers. Many protocols are written using other cryptographic libraries and completely replacing them may be complex and time consuming."),(0,a.kt)("p",null,"Therefore we offer adapters for various popular libraries, these adapters allow us to convert points and scalars between different formats defined by various libraries. Here is a list:"),(0,a.kt)("p",null,"Golang adapters:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/iciclegnark"},"Gnark crypto adapter"))))}d.isMDXComponent=!0},5870:(e,t,i)=>{i.d(t,{Z:()=>n});const n=i.p+"assets/images/apilevels-1ab85a883df418516e16eb87aa7b0385.png"},8209:(e,t,i)=>{i(7294)}}]); \ No newline at end of file diff --git a/assets/js/2b850a9b.702d77ef.js b/assets/js/2b850a9b.702d77ef.js new file mode 100644 index 0000000..023d0bb --- /dev/null +++ b/assets/js/2b850a9b.702d77ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[614],{3905:(e,t,i)=>{i.d(t,{Zo:()=>u,kt:()=>h});var n=i(7294);function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t=0||(a[i]=e[i]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),i=t;return e&&(i="function"==typeof e?e(t):l(l({},t),e)),i},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var i=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=c(i),m=a,h=p["".concat(s,".").concat(m)]||p[m]||d[m]||r;return i?n.createElement(h,l(l({ref:t},u),{},{components:i})):n.createElement(h,l({ref:t},u))}));function h(e,t){var i=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=i.length,l=new Array(r);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:a,l[1]=o;for(var c=2;c{i.r(t),i.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var n=i(7462),a=(i(7294),i(3905));i(8209);const r={},l="Getting started with ICICLE",o={unversionedId:"icicle/introduction",id:"icicle/introduction",title:"Getting started with ICICLE",description:"This guide is oriented towards developers who want to start writing code with the ICICLE libraries. If you just want to run your existing ZK circuits on GPU refer to this guide please.",source:"@site/docs/icicle/introduction.md",sourceDirName:"icicle",slug:"/icicle/introduction",permalink:"/icicle/introduction",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/introduction.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"What is ICICLE?",permalink:"/icicle/overview"},next:{title:"Integrations",permalink:"/icicle/integrations"}},s={},c=[{value:"ICICLE repository overview",id:"icicle-repository-overview",level:2},{value:"ICICLE Core",id:"icicle-core",level:3},{value:"ICICLE Rust and Golang bindings",id:"icicle-rust-and-golang-bindings",level:3},{value:"Running ICICLE",id:"running-icicle",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Optional Prerequisites",id:"optional-prerequisites",level:4},{value:"Setting up ICICLE and running tests",id:"setting-up-icicle-and-running-tests",level:3},{value:"Setting up our environment",id:"setting-up-our-environment",level:4},{value:"ICICLE Core",id:"icicle-core-1",level:4},{value:"ICICLE Rust",id:"icicle-rust",level:4},{value:"ICICLE Golang",id:"icicle-golang",level:4},{value:"Running ICICLE examples",id:"running-icicle-examples",level:3},{value:"Writing new bindings for ICICLE",id:"writing-new-bindings-for-icicle",level:2},{value:"ICICLE Adapters",id:"icicle-adapters",level:3}],u={toc:c},p="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getting-started-with-icicle"},"Getting started with ICICLE"),(0,a.kt)("p",null,"This guide is oriented towards developers who want to start writing code with the ICICLE libraries. If you just want to run your existing ZK circuits on GPU refer to ",(0,a.kt)("a",{parentName:"p",href:"/icicle/integrations#using-icicle-integrations"},"this guide")," please."),(0,a.kt)("h2",{id:"icicle-repository-overview"},"ICICLE repository overview"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"ICICLE API overview",src:i(5870).Z,width:"1932",height:"996"})),(0,a.kt)("p",null,"The diagram above displays the general architecture of ICICLE and the API layers that exist. The CUDA API, which we also call ICICLE Core, is the lowest level and is comprised of CUDA kernels which implement all primitives such as MSM as well as C++ wrappers which expose these methods for different curves."),(0,a.kt)("p",null,"ICICLE Core compiles into a static library. This library can be used with our official Golang and Rust wrappers or you can implement a wrapper for it in any language."),(0,a.kt)("p",null,"Based on this dependency architecture, the ICICLE repository has three main sections, each of which is independent from the other."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ICICLE core"),(0,a.kt)("li",{parentName:"ul"},"ICICLE Rust bindings"),(0,a.kt)("li",{parentName:"ul"},"ICICLE Golang bindings")),(0,a.kt)("h3",{id:"icicle-core"},"ICICLE Core"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle"},"ICICLE core")," contains all the low level CUDA code implementing primitives such as ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/primitives"},"points")," and ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/appUtils/msm"},"MSM"),". There also exists higher level C++ wrappers to expose the low level CUDA primitives (",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/curves/bn254/msm.cu"},"example"),")."),(0,a.kt)("p",null,"ICICLE Core would typically be compiled into a static library and used in a third party language such as Rust or Golang."),(0,a.kt)("h3",{id:"icicle-rust-and-golang-bindings"},"ICICLE Rust and Golang bindings"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/tree/main/wrappers/rust"},"ICICLE Rust bindings")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/tree/main/goicicle"},"ICICLE Golang bindings"))),(0,a.kt)("p",null,"These bindings allow you to easily use ICICLE in a Rust or Golang project. Setting up Golang bindings requires a bit of extra steps compared to the Rust bindings which utilize the ",(0,a.kt)("inlineCode",{parentName:"p"},"cargo build")," tool."),(0,a.kt)("h2",{id:"running-icicle"},"Running ICICLE"),(0,a.kt)("p",null,"This guide assumes that you have a Linux or Windows machine with a Nvidia GPU installed. If you don't have access to a Nvidia GPU you can access one for free on ",(0,a.kt)("a",{parentName:"p",href:"https://colab.google/"},"Google Colab"),"."),(0,a.kt)("h3",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"NVCC (version 12.0 or newer)"),(0,a.kt)("li",{parentName:"ul"},"cmake 3.18 and above"),(0,a.kt)("li",{parentName:"ul"},"GCC - version 9 or newer is recommended."),(0,a.kt)("li",{parentName:"ul"},"Any Nvidia GPU"),(0,a.kt)("li",{parentName:"ul"},"Linux or Windows operating system.")),(0,a.kt)("h4",{id:"optional-prerequisites"},"Optional Prerequisites"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Docker, latest version."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html"},"NVIDIA Container Toolkit"))),(0,a.kt)("p",null,"If you don't wish to install these prerequisites you can follow this tutorial using a ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/Dockerfile"},"ZK-Container")," (docker container). To learn more about using ZK-Containers ",(0,a.kt)("a",{parentName:"p",href:"/ZKContainers"},"read this"),"."),(0,a.kt)("h3",{id:"setting-up-icicle-and-running-tests"},"Setting up ICICLE and running tests"),(0,a.kt)("p",null,"The objective of this guide is to make sure you can run the ICICLE Core, Rust and Golang tests. Achieving this will ensure you know how to setup ICICLE and run a ICICLE program. For simplicity, we will be using the ICICLE docker container as our environment, however, you may install the prerequisites on your machine and follow the same commands in your terminal."),(0,a.kt)("h4",{id:"setting-up-our-environment"},"Setting up our environment"),(0,a.kt)("p",null,"Lets begin by cloning the ICICLE repository:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"git clone https://github.com/ingonyama-zk/icicle\n")),(0,a.kt)("p",null,"We will proceed to build the docker image ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/Dockerfile"},"found here"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker build -t icicle-demo .\ndocker run -it --runtime=nvidia --gpus all --name icicle_container icicle-demo\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"-it")," runs the container in interactive mode with a terminal."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"--gpus all")," Allocate all available GPUs to the container. You can also specify which GPUs to use if you don't want to allocate all."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"--runtime=nvidia")," Use the NVIDIA runtime, necessary for GPU support.")),(0,a.kt)("p",null,"To read more about these settings reference this ",(0,a.kt)("a",{parentName:"p",href:"https://developer.nvidia.com/nvidia-container-runtime"},"article"),"."),(0,a.kt)("p",null,"If you accidentally close your terminal and want to reconnect just call:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker exec -it icicle_container bash\n")),(0,a.kt)("p",null,"Lets make sure that we have the correct CUDA version before proceeding"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"nvcc --version\n")),(0,a.kt)("p",null,"You should see something like this"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"nvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2023 NVIDIA Corporation\nBuilt on Tue_Aug_15_22:02:13_PDT_2023\nCuda compilation tools, release 12.2, V12.2.140\nBuild cuda_12.2.r12.2/compiler.33191640_0\n")),(0,a.kt)("p",null,"Make sure the release version is at least 12.0."),(0,a.kt)("h4",{id:"icicle-core-1"},"ICICLE Core"),(0,a.kt)("p",null,"ICICLE Core is found under ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle"},(0,a.kt)("inlineCode",{parentName:"a"},"/icicle")),". To build and run the tests first:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd icicle\n")),(0,a.kt)("p",null,"We are going to compile ICICLE for a specific curve"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"mkdir -p build\ncmake -S . -B build -DCURVE=bn254 -DBUILD_TESTS=ON\ncmake --build build\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"-DBUILD_TESTS=ON")," compiles the tests, without this flag ",(0,a.kt)("inlineCode",{parentName:"p"},"ctest")," won't work.\n",(0,a.kt)("inlineCode",{parentName:"p"},"-DCURVE=bn254")," tells the compiler which curve to build. You can find a list of supported curves ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/curves"},"here"),"."),(0,a.kt)("p",null,"The output in ",(0,a.kt)("inlineCode",{parentName:"p"},"build")," folder should include the static libraries for the compiled curve."),(0,a.kt)("div",{className:"admonition admonition-info alert alert--info"},(0,a.kt)("div",{parentName:"div",className:"admonition-heading"},(0,a.kt)("h5",{parentName:"div"},(0,a.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,a.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,a.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"info")),(0,a.kt)("div",{parentName:"div",className:"admonition-content"},(0,a.kt)("p",{parentName:"div"},"Make sure to only use ",(0,a.kt)("inlineCode",{parentName:"p"},"-DBUILD_TESTS=ON")," for running tests as the archive output will only be available when ",(0,a.kt)("inlineCode",{parentName:"p"},"-DBUILD_TESTS=ON")," is not supplied."))),(0,a.kt)("p",null,"To run the test"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd build\nctest\n")),(0,a.kt)("h4",{id:"icicle-rust"},"ICICLE Rust"),(0,a.kt)("p",null,"The rust bindings work by first compiling the CUDA static libraries as seen ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/wrappers/rust/icicle-curves/icicle-bn254/build.rs"},"here"),". The compilation of CUDA and the Rust library is all handled by the rust build toolchain."),(0,a.kt)("p",null,"Similar to ICICLE Core here we also have to compile per curve."),(0,a.kt)("p",null,"Lets compile curve ",(0,a.kt)("inlineCode",{parentName:"p"},"bn254")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd wrappers/rust/icicle-curves/icicle-bn254\n")),(0,a.kt)("p",null,"Now lets build our library"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cargo build --release\n")),(0,a.kt)("p",null,"This may take a couple of minutes since we are compiling both the CUDA and Rust code."),(0,a.kt)("p",null,"To run the tests"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cargo test -- --test-threads=1\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"--test-threads=1")," is needed because currently some tests might interfere with one another inside the GPU."),(0,a.kt)("p",null,"We also include some benchmarks"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cargo bench\n")),(0,a.kt)("h4",{id:"icicle-golang"},"ICICLE Golang"),(0,a.kt)("p",null,"Golang is WIP in v1, coming soon. Please checkout a previous ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/releases/tag/v0.1.0"},"release v0.1.0")," for golang bindings."),(0,a.kt)("h3",{id:"running-icicle-examples"},"Running ICICLE examples"),(0,a.kt)("p",null,"ICICLE examples can be found ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle-examples"},"here")," these examples cover some simple use cases using C++, rust and golang."),(0,a.kt)("p",null,"In each example directory, ZK-container files are located in a subdirectory ",(0,a.kt)("inlineCode",{parentName:"p"},".devcontainer"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"msm/\n\u251c\u2500\u2500 .devcontainer\n \u251c\u2500\u2500 devcontainer.json\n \u2514\u2500\u2500 Dockerfile\n")),(0,a.kt)("p",null,"Lets run one of our C++ examples, in this case the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle-examples/blob/main/c%2B%2B/msm/example.cu"},"MSM example"),"."),(0,a.kt)("p",null,"Clone the repository"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"git clone https://github.com/ingonyama-zk/icicle-examples.git\ncd icicle-examples\n")),(0,a.kt)("p",null,"Enter the test directory"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"cd c++/msm\n")),(0,a.kt)("p",null,"Now lets build our docker file and run the test inside it. Make sure you have installed the ",(0,a.kt)("a",{parentName:"p",href:"#optional-prerequisites"},"optional prerequisites"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker build -t icicle-example-msm -f .devcontainer/Dockerfile .\n")),(0,a.kt)("p",null,"Lets start and enter the container"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"docker run -it --rm --gpus all -v .:/icicle-example icicle-example-msm\n")),(0,a.kt)("p",null,"to run the example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"rm -rf build\nmkdir -p build\ncmake -S . -B build\ncmake --build build\n./build/example\n")),(0,a.kt)("p",null,"You can now experiment with our other examples, perhaps try to run a rust or golang example next."),(0,a.kt)("h2",{id:"writing-new-bindings-for-icicle"},"Writing new bindings for ICICLE"),(0,a.kt)("p",null,"Since ICICLE Core is written in CUDA / C++ its really simple to generate static libraries. These static libraries can be installed on any system and called by higher level languages such as Golang."),(0,a.kt)("p",null,"static libraries can be loaded into memory once and used by multiple programs, reducing memory usage and potentially improving performance. They also allow you to separate functionality into distinct modules so your static library may need to compile only specific features that you want to use."),(0,a.kt)("p",null,"Lets review the Golang bindings since its a pretty verbose example (compared to rust which hides it pretty well) of using static libraries. Golang has a library named ",(0,a.kt)("inlineCode",{parentName:"p"},"CGO")," which can be used to link static libraries. Here's a basic example on how you can use cgo to link these libraries:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-go"},'/*\n#cgo LDFLAGS: -L/path/to/shared/libs -lbn254 -lbls12_381 -lbls12_377 -lbw6_671\n#include "icicle.h" // make sure you use the correct header file(s)\n*/\nimport "C"\n\nfunc main() {\n // Now you can call the C functions from the ICICLE libraries.\n // Note that C function calls are prefixed with \'C.\' in Go code.\n\n out := (*C.BN254_projective_t)(unsafe.Pointer(p))\n in := (*C.BN254_affine_t)(unsafe.Pointer(affine))\n\n C.projective_from_affine_bn254(out, in)\n}\n')),(0,a.kt)("p",null,"The comments on the first line tell ",(0,a.kt)("inlineCode",{parentName:"p"},"CGO")," which libraries to import as well as which header files to include. You can then call methods which are part of the static library and defined in the header file, ",(0,a.kt)("inlineCode",{parentName:"p"},"C.projective_from_affine_bn254")," is an example."),(0,a.kt)("p",null,"If you wish to create your own bindings for a language of your choice we suggest you start by investigating how you can call static libraries."),(0,a.kt)("h3",{id:"icicle-adapters"},"ICICLE Adapters"),(0,a.kt)("p",null,"One of the core ideas behind ICICLE is that developers can gradually accelerate their provers. Many protocols are written using other cryptographic libraries and completely replacing them may be complex and time consuming."),(0,a.kt)("p",null,"Therefore we offer adapters for various popular libraries, these adapters allow us to convert points and scalars between different formats defined by various libraries. Here is a list:"),(0,a.kt)("p",null,"Golang adapters:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/iciclegnark"},"Gnark crypto adapter"))))}d.isMDXComponent=!0},5870:(e,t,i)=>{i.d(t,{Z:()=>n});const n=i.p+"assets/images/apilevels-1ab85a883df418516e16eb87aa7b0385.png"},8209:(e,t,i)=>{i(7294)}}]); \ No newline at end of file diff --git a/assets/js/3db59c3c.6f7d5e16.js b/assets/js/3db59c3c.6f7d5e16.js deleted file mode 100644 index ef22159..0000000 --- a/assets/js/3db59c3c.6f7d5e16.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[472],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=i,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||a;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:i,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var r=n(7462),i=(n(7294),n(3905));n(8209);const a={},o="Supporting Additional Curves",l={unversionedId:"icicle/supporting-additional-curves",id:"icicle/supporting-additional-curves",title:"Supporting Additional Curves",description:"Supporting additional curves is still a work in progress and is bound to change in the future. Currently, the process is very manual but plan to automate the majority of it in future releases.",source:"@site/docs/icicle/supporting-additional-curves.md",sourceDirName:"icicle",slug:"/icicle/supporting-additional-curves",permalink:"/icicle/supporting-additional-curves",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/supporting-additional-curves.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Rust bindings",permalink:"/icicle/rust-bindings"},next:{title:"Run ICICLE on Google Colab",permalink:"/icicle/colab-instructions"}},c={},s=[{value:"ICICLE Core",id:"icicle-core",level:2},{value:"Bindings",id:"bindings",level:2},{value:"Rust",id:"rust",level:3},{value:"Golang",id:"golang",level:3}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"supporting-additional-curves"},"Supporting Additional Curves"),(0,i.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,i.kt)("div",{parentName:"div",className:"admonition-heading"},(0,i.kt)("h5",{parentName:"div"},(0,i.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,i.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,i.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,i.kt)("div",{parentName:"div",className:"admonition-content"},(0,i.kt)("p",{parentName:"div"},"Supporting additional curves is still a work in progress and is bound to change in the future. Currently, the process is very manual but plan to automate the majority of it in future releases."))),(0,i.kt)("p",null,"We understand the need for ZK developers to use different curves, some common some more exotic. For this reason we designed ICICLE to allow developers to add any curve they desire."),(0,i.kt)("h2",{id:"icicle-core"},"ICICLE Core"),(0,i.kt)("p",null,"ICICLE core is very generic by design so all algorithms and primitives are designed to work based of configuration files ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/curves/curve_config.cuh"},"selected during compile")," time. This is why we compile ICICLE Core per curve."),(0,i.kt)("p",null,"To add support a new curve you must create a new file under ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/curves"},(0,i.kt)("inlineCode",{parentName:"a"},"icicle/curves")),". The file should be named ",(0,i.kt)("inlineCode",{parentName:"p"},"_params.cuh"),"."),(0,i.kt)("p",null,"We also require some changes to ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/curves/curve_config.cuh#L16-L29"},(0,i.kt)("inlineCode",{parentName:"a"},"curve_config.cuh")),", we need to add a new curve id."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"...\n\n#define BN254 1\n#define BLS12_381 2\n#define BLS12_377 3\n#define BW6_761 4\n#define 5\n\n...\n")),(0,i.kt)("p",null,"Make sure to modify the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/4beda3a900eda961f39af3a496f8184c52bf3b41/icicle/curves/curve_config.cuh#L16-L29"},"rest of the file")," accordingly."),(0,i.kt)("p",null,"Finally we must modify the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/CMakeLists.txt#L64"},(0,i.kt)("inlineCode",{parentName:"a"},"make")," file")," to make sure we can compile our new curve."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"set(SUPPORTED_CURVES bn254;bls12_381;bls12_377;bw6_761;)\n")),(0,i.kt)("h2",{id:"bindings"},"Bindings"),(0,i.kt)("p",null,"In order to support a new curves in the binding libraries you first must support it in ICICLE core."),(0,i.kt)("h3",{id:"rust"},"Rust"),(0,i.kt)("p",null,"Create a new folder named ",(0,i.kt)("inlineCode",{parentName:"p"},"icicle-")," under the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/wrappers/rust/icicle-curves"},"rust wrappers folder"),". Your new directory should look like this."),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"icicle-/",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"src/",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"ntt/",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"mod.rs"))),(0,i.kt)("li",{parentName:"ul"},"msm/",(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},"mod.rs"))),(0,i.kt)("li",{parentName:"ul"},"curve.rs"),(0,i.kt)("li",{parentName:"ul"},"lib.rs"))),(0,i.kt)("li",{parentName:"ul"},"Cargo.toml"),(0,i.kt)("li",{parentName:"ul"},"build.rs")))),(0,i.kt)("p",null,"Lets look at ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/wrappers/rust/icicle-curves/icicle-bn254/src/ntt/mod.rs"},(0,i.kt)("inlineCode",{parentName:"a"},"ntt/mod.rs"))," for example."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},'...\n\nextern "C" {\n #[link_name = "bn254NTTCuda"]\n fn ntt_cuda<\'a>(\n input: *const ScalarField,\n size: usize,\n is_inverse: bool,\n config: &NTTConfig<\'a, ScalarField>,\n output: *mut ScalarField,\n ) -> CudaError;\n\n #[link_name = "bn254DefaultNTTConfig"]\n fn default_ntt_config() -> NTTConfig<\'static, ScalarField>;\n\n #[link_name = "bn254InitializeDomain"]\n fn initialize_ntt_domain(primitive_root: ScalarField, ctx: &DeviceContext) -> CudaError;\n}\n\n...\n')),(0,i.kt)("p",null,"Here you would need to replace ",(0,i.kt)("inlineCode",{parentName:"p"},"bn254NTTCuda")," with ",(0,i.kt)("inlineCode",{parentName:"p"},"NTTCuda"),". Most of these changes are pretty straight forward. One thing you should pay attention to is limb sizes as these change for different curves. For example ",(0,i.kt)("inlineCode",{parentName:"p"},"BN254")," ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/4beda3a900eda961f39af3a496f8184c52bf3b41/wrappers/rust/icicle-curves/icicle-bn254/src/curve.rs#L15"},"has limb size of 8")," but for your curve this may be different."),(0,i.kt)("h3",{id:"golang"},"Golang"),(0,i.kt)("p",null,"Golang is WIP in v1, coming soon. Please checkout a previous ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/releases/tag/v0.1.0"},"release v0.1.0")," for golang bindings."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/3db59c3c.72589e52.js b/assets/js/3db59c3c.72589e52.js new file mode 100644 index 0000000..ba67c7c --- /dev/null +++ b/assets/js/3db59c3c.72589e52.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[472],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var i=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=i.createContext({}),s=function(e){var t=i.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return i.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},m=i.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=r,f=p["".concat(c,".").concat(m)]||p[m]||d[m]||a;return n?i.createElement(f,o(o({ref:t},u),{},{components:n})):i.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,o=new Array(a);o[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var i=n(7462),r=(n(7294),n(3905));n(8209);const a={},o="Supporting Additional Curves",l={unversionedId:"icicle/supporting-additional-curves",id:"icicle/supporting-additional-curves",title:"Supporting Additional Curves",description:"Supporting additional curves is still a work in progress and is bound to change in the future. Currently, the process is very manual but plan to automate the majority of it in future releases.",source:"@site/docs/icicle/supporting-additional-curves.md",sourceDirName:"icicle",slug:"/icicle/supporting-additional-curves",permalink:"/icicle/supporting-additional-curves",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/supporting-additional-curves.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Rust bindings",permalink:"/icicle/rust-bindings"},next:{title:"Run ICICLE on Google Colab",permalink:"/icicle/colab-instructions"}},c={},s=[{value:"ICICLE Core",id:"icicle-core",level:2},{value:"Bindings",id:"bindings",level:2},{value:"Rust",id:"rust",level:3},{value:"Golang",id:"golang",level:3}],u={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,i.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"supporting-additional-curves"},"Supporting Additional Curves"),(0,r.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,r.kt)("div",{parentName:"div",className:"admonition-heading"},(0,r.kt)("h5",{parentName:"div"},(0,r.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,r.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,r.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,r.kt)("div",{parentName:"div",className:"admonition-content"},(0,r.kt)("p",{parentName:"div"},"Supporting additional curves is still a work in progress and is bound to change in the future. Currently, the process is very manual but plan to automate the majority of it in future releases."))),(0,r.kt)("p",null,"We understand the need for ZK developers to use different curves, some common some more exotic. For this reason we designed ICICLE to allow developers to add any curve they desire."),(0,r.kt)("h2",{id:"icicle-core"},"ICICLE Core"),(0,r.kt)("p",null,"ICICLE core is very generic by design so all algorithms and primitives are designed to work based of configuration files ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/curves/curve_config.cuh"},"selected during compile")," time. This is why we compile ICICLE Core per curve."),(0,r.kt)("p",null,"To add support a new curve you must create a new file under ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/icicle/curves"},(0,r.kt)("inlineCode",{parentName:"a"},"icicle/curves")),". The file should be named ",(0,r.kt)("inlineCode",{parentName:"p"},"_params.cuh"),"."),(0,r.kt)("p",null,"We also require some changes to ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/curves/curve_config.cuh#L16-L29"},(0,r.kt)("inlineCode",{parentName:"a"},"curve_config.cuh")),", we need to add a new curve id."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"...\n\n#define BN254 1\n#define BLS12_381 2\n#define BLS12_377 3\n#define BW6_761 4\n#define 5\n\n...\n")),(0,r.kt)("p",null,"Make sure to modify the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/4beda3a900eda961f39af3a496f8184c52bf3b41/icicle/curves/curve_config.cuh#L16-L29"},"rest of the file")," accordingly."),(0,r.kt)("p",null,"Finally we must modify the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/icicle/CMakeLists.txt#L64"},(0,r.kt)("inlineCode",{parentName:"a"},"make")," file")," to make sure we can compile our new curve."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"set(SUPPORTED_CURVES bn254;bls12_381;bls12_377;bw6_761;)\n")),(0,r.kt)("h2",{id:"bindings"},"Bindings"),(0,r.kt)("p",null,"In order to support a new curves in the binding libraries you first must support it in ICICLE core."),(0,r.kt)("h3",{id:"rust"},"Rust"),(0,r.kt)("p",null,"Create a new folder named ",(0,r.kt)("inlineCode",{parentName:"p"},"icicle-")," under the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/tree/main/wrappers/rust/icicle-curves"},"rust wrappers folder"),". Your new directory should look like this."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"icicle-/",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"src/",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"ntt/",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"mod.rs"))),(0,r.kt)("li",{parentName:"ul"},"msm/",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"mod.rs"))),(0,r.kt)("li",{parentName:"ul"},"curve.rs"),(0,r.kt)("li",{parentName:"ul"},"lib.rs"))),(0,r.kt)("li",{parentName:"ul"},"Cargo.toml"),(0,r.kt)("li",{parentName:"ul"},"build.rs")))),(0,r.kt)("p",null,"Lets look at ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/wrappers/rust/icicle-curves/icicle-bn254/src/ntt/mod.rs"},(0,r.kt)("inlineCode",{parentName:"a"},"ntt/mod.rs"))," for example."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'...\n\nextern "C" {\n #[link_name = "bn254NTTCuda"]\n fn ntt_cuda<\'a>(\n input: *const ScalarField,\n size: usize,\n is_inverse: bool,\n config: &NTTConfig<\'a, ScalarField>,\n output: *mut ScalarField,\n ) -> CudaError;\n\n #[link_name = "bn254DefaultNTTConfig"]\n fn default_ntt_config() -> NTTConfig<\'static, ScalarField>;\n\n #[link_name = "bn254InitializeDomain"]\n fn initialize_ntt_domain(primitive_root: ScalarField, ctx: &DeviceContext) -> CudaError;\n}\n\n...\n')),(0,r.kt)("p",null,"Here you would need to replace ",(0,r.kt)("inlineCode",{parentName:"p"},"bn254NTTCuda")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"NTTCuda"),". Most of these changes are pretty straight forward. One thing you should pay attention to is limb sizes as these change for different curves. For example ",(0,r.kt)("inlineCode",{parentName:"p"},"BN254")," ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/4beda3a900eda961f39af3a496f8184c52bf3b41/wrappers/rust/icicle-curves/icicle-bn254/src/curve.rs#L15"},"has limb size of 8")," but for your curve this may be different."),(0,r.kt)("h3",{id:"golang"},"Golang"),(0,r.kt)("p",null,"Golang is WIP in v1, coming soon. Please checkout a previous ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/releases/tag/v0.1.0"},"release v0.1.0")," for golang bindings."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/46bc3aca.f9ef26f0.js b/assets/js/46bc3aca.7ee32a82.js similarity index 80% rename from assets/js/46bc3aca.f9ef26f0.js rename to assets/js/46bc3aca.7ee32a82.js index fb967b0..cdb926a 100644 --- a/assets/js/46bc3aca.f9ef26f0.js +++ b/assets/js/46bc3aca.7ee32a82.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[287],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>f});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(t),d=i,f=u["".concat(l,".").concat(d)]||u[d]||g[d]||o;return t?r.createElement(f,a(a({ref:n},p),{},{components:t})):r.createElement(f,a({ref:n},p))}));function f(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[u]="string"==typeof e?e:i,a[1]=c;for(var s=2;s{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>g,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var r=t(7462),i=(t(7294),t(3905));t(8209);const o={},a="Golang bindings",c={unversionedId:"icicle/golang-bindings",id:"icicle/golang-bindings",title:"Golang bindings",description:"Golang is WIP in v1, coming soon. Please checkout a previous release v0.1.0 for golang bindings.",source:"@site/docs/icicle/golang-bindings.md",sourceDirName:"icicle",slug:"/icicle/golang-bindings",permalink:"/icicle/golang-bindings",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/golang-bindings.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Integrations",permalink:"/icicle/integrations"},next:{title:"Rust bindings",permalink:"/icicle/rust-bindings"}},l={},s=[],p={toc:s},u="wrapper";function g(e){let{components:n,...t}=e;return(0,i.kt)(u,(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"golang-bindings"},"Golang bindings"),(0,i.kt)("p",null,"Golang is WIP in v1, coming soon. Please checkout a previous ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/releases/tag/v0.1.0"},"release v0.1.0")," for golang bindings."))}g.isMDXComponent=!0},8209:(e,n,t)=>{t(7294)}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[287],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>f});var r=t(7294);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=r.createContext({}),s=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=s(e.components);return r.createElement(l.Provider,{value:n},e.children)},u="mdxType",g={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(t),d=i,f=u["".concat(l,".").concat(d)]||u[d]||g[d]||o;return t?r.createElement(f,a(a({ref:n},p),{},{components:t})):r.createElement(f,a({ref:n},p))}));function f(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var c={};for(var l in n)hasOwnProperty.call(n,l)&&(c[l]=n[l]);c.originalType=e,c[u]="string"==typeof e?e:i,a[1]=c;for(var s=2;s{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>g,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var r=t(7462),i=(t(7294),t(3905));t(8209);const o={},a="Golang bindings",c={unversionedId:"icicle/golang-bindings",id:"icicle/golang-bindings",title:"Golang bindings",description:"Golang is WIP in v1, coming soon. Please checkout a previous release v0.1.0 for golang bindings.",source:"@site/docs/icicle/golang-bindings.md",sourceDirName:"icicle",slug:"/icicle/golang-bindings",permalink:"/icicle/golang-bindings",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/golang-bindings.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Integrations",permalink:"/icicle/integrations"},next:{title:"Rust bindings",permalink:"/icicle/rust-bindings"}},l={},s=[],p={toc:s},u="wrapper";function g(e){let{components:n,...t}=e;return(0,i.kt)(u,(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"golang-bindings"},"Golang bindings"),(0,i.kt)("p",null,"Golang is WIP in v1, coming soon. Please checkout a previous ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/releases/tag/v0.1.0"},"release v0.1.0")," for golang bindings."))}g.isMDXComponent=!0},8209:(e,n,t)=>{t(7294)}}]); \ No newline at end of file diff --git a/assets/js/584ea0b6.aeed43a8.js b/assets/js/584ea0b6.aeed43a8.js new file mode 100644 index 0000000..bc2a60c --- /dev/null +++ b/assets/js/584ea0b6.aeed43a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[83],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(r),g=a,d=u["".concat(c,".").concat(g)]||u[g]||m[g]||o;return r?n.createElement(d,i(i({ref:t},p),{},{components:r})):n.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var n=r(7462),a=(r(7294),r(3905));r(8209);const o={},i="Ingonyama Grant programs",s={unversionedId:"grants",id:"grants",title:"Ingonyama Grant programs",description:"Ingonyama understands the importance of supporting and fostering a vibrant community of researchers and builders to advance ZK. To encourage progress, we are not only developing in the open but also sharing resources with researchers and builders through various programs.",source:"@site/docs/grants.md",sourceDirName:".",slug:"/grants",permalink:"/grants",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/grants.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"ZKContainer",permalink:"/ZKContainers"},next:{title:"Contributor's Guide",permalink:"/contributor-guide"}},c={},l=[{value:"ICICLE ZK-GPU Ecosystem Grant",id:"icicle-zk-gpu-ecosystem-grant",level:2},{value:"Bounties & Grants",id:"bounties--grants",level:3},{value:"Contact",id:"contact",level:2}],p={toc:l},u="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"ingonyama-grant-programs"},"Ingonyama Grant programs"),(0,a.kt)("p",null,"Ingonyama understands the importance of supporting and fostering a vibrant community of researchers and builders to advance ZK. To encourage progress, we are not only developing in the open but also sharing resources with researchers and builders through various programs."),(0,a.kt)("h2",{id:"icicle-zk-gpu-ecosystem-grant"},"ICICLE ZK-GPU Ecosystem Grant"),(0,a.kt)("p",null,"Ingonyama invites researchers and practitioners to collaborate in advancing ZK acceleration. We are allocating $100,000 for grants to support this initiative."),(0,a.kt)("h3",{id:"bounties--grants"},"Bounties & Grants"),(0,a.kt)("p",null,"Eligibility for grants includes:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Students"),": Utilize ICICLE in your research."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Performance Improvement"),": Enhance the performance of accelerated primitives in ICICLE."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Protocol Porting"),": Migrate existing ZK protocols to ICICLE."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"New Primitives"),": Contribute new primitives to ICICLE."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Benchmarking"),": Compare ZK benchmarks against ICICLE.")),(0,a.kt)("h2",{id:"contact"},"Contact"),(0,a.kt)("p",null,"For questions or submissions: ",(0,a.kt)("a",{parentName:"p",href:"mailto:grants@ingonyama.com"},"grants@ingonyama.com")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Read the full article ",(0,a.kt)("a",{parentName:"strong",href:"https://www.ingonyama.com/blog/icicle-for-researchers-grants-challenges"},"here"))))}m.isMDXComponent=!0},8209:(e,t,r)=>{r(7294)}}]); \ No newline at end of file diff --git a/assets/js/584ea0b6.f978740e.js b/assets/js/584ea0b6.f978740e.js deleted file mode 100644 index 6f96b1e..0000000 --- a/assets/js/584ea0b6.f978740e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[83],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(r),g=a,d=u["".concat(l,".").concat(g)]||u[g]||m[g]||o;return r?n.createElement(d,i(i({ref:t},p),{},{components:r})):n.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var n=r(7462),a=(r(7294),r(3905));r(8209);const o={},i="Ingonyama Grant programs",s={unversionedId:"grants",id:"grants",title:"Ingonyama Grant programs",description:"Ingonyama understands the importance of supporting and fostering a vibrant community of researchers and builders to advance ZK. To encourage progress, we are not only developing in the open but also sharing resources with researchers and builders through various programs.",source:"@site/docs/grants.md",sourceDirName:".",slug:"/grants",permalink:"/grants",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/grants.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"ZKContainer",permalink:"/ZKContainers"},next:{title:"Contributor's Guide",permalink:"/contributor-guide"}},l={},c=[{value:"ICICLE ZK-GPU Ecosystem Grant",id:"icicle-zk-gpu-ecosystem-grant",level:2},{value:"Bounties & Grants",id:"bounties--grants",level:3},{value:"Contact",id:"contact",level:2}],p={toc:c},u="wrapper";function m(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"ingonyama-grant-programs"},"Ingonyama Grant programs"),(0,a.kt)("p",null,"Ingonyama understands the importance of supporting and fostering a vibrant community of researchers and builders to advance ZK. To encourage progress, we are not only developing in the open but also sharing resources with researchers and builders through various programs."),(0,a.kt)("h2",{id:"icicle-zk-gpu-ecosystem-grant"},"ICICLE ZK-GPU Ecosystem Grant"),(0,a.kt)("p",null,"Ingonyama invites researchers and practitioners to collaborate in advancing ZK acceleration. We are allocating $100,000 for grants to support this initiative."),(0,a.kt)("h3",{id:"bounties--grants"},"Bounties & Grants"),(0,a.kt)("p",null,"Eligibility for grants includes:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Students"),": Utilize ICICLE in your research."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Performance Improvement"),": Enhance the performance of accelerated primitives in ICICLE."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Protocol Porting"),": Migrate existing ZK protocols to ICICLE."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"New Primitives"),": Contribute new primitives to ICICLE."),(0,a.kt)("li",{parentName:"ol"},(0,a.kt)("strong",{parentName:"li"},"Benchmarking"),": Compare ZK benchmarks against ICICLE.")),(0,a.kt)("h2",{id:"contact"},"Contact"),(0,a.kt)("p",null,"For questions or submissions: ",(0,a.kt)("a",{parentName:"p",href:"mailto:grants@ingonyama.com"},"grants@ingonyama.com")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Read the full article ",(0,a.kt)("a",{parentName:"strong",href:"https://www.ingonyama.com/blog/icicle-for-researchers-grants-challenges"},"here"))))}m.isMDXComponent=!0},8209:(e,t,r)=>{r(7294)}}]); \ No newline at end of file diff --git a/assets/js/62ce5d13.dc2934d9.js b/assets/js/62ce5d13.dc2934d9.js deleted file mode 100644 index 6fad410..0000000 --- a/assets/js/62ce5d13.dc2934d9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[774],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),d=a,g=p["".concat(l,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(g,s(s({ref:t},u),{},{components:n})):r.createElement(g,s({ref:t},u))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:a,s[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));n(8209);const o={},s="Run ICICLE on Google Colab",i={unversionedId:"icicle/colab-instructions",id:"icicle/colab-instructions",title:"Run ICICLE on Google Colab",description:"Google Colab let's you use a GPU free of charge, it's an Nvidia T4 GPU with 16 GB of memory, capable of running latest CUDA (tested on Cuda 12.2)",source:"@site/docs/icicle/colab-instructions.md",sourceDirName:"icicle",slug:"/icicle/colab-instructions",permalink:"/icicle/colab-instructions",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/colab-instructions.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Supporting Additional Curves",permalink:"/icicle/supporting-additional-curves"},next:{title:"ZKContainer",permalink:"/ZKContainers"}},l={},c=[{value:"Prepare Colab environment",id:"prepare-colab-environment",level:2},{value:"Cloning ICICLE and running test",id:"cloning-icicle-and-running-test",level:2}],u={toc:c},p="wrapper";function m(e){let{components:t,...o}=e;return(0,a.kt)(p,(0,r.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"run-icicle-on-google-colab"},"Run ICICLE on Google Colab"),(0,a.kt)("p",null,"Google Colab let's you use a GPU free of charge, it's an Nvidia T4 GPU with 16 GB of memory, capable of running latest CUDA (tested on Cuda 12.2)\nAs Colab is able to interact with shell commands, a user can also install a framework and load git repositories into Colab space."),(0,a.kt)("h2",{id:"prepare-colab-environment"},"Prepare Colab environment"),(0,a.kt)("p",null,"First thing to do in a notebook is to set the runtime type to a T4 GPU."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'in the upper corner click on the dropdown menu and select "change runtime type"')),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Change runtime",src:n(4429).Z,width:"423",height:"388"})),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'In the window select "T4 GPU" and press Save')),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"T4 GPU",src:n(8259).Z,width:"582",height:"424"})),(0,a.kt)("p",null,"Installing Rust is rather simple, just execute the following command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!apt install rustc cargo\n")),(0,a.kt)("p",null,"To test the installation of Rust:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!rustc --version\n!cargo --version\n")),(0,a.kt)("p",null,"A successful installation will result in a rustc and cargo version print, a faulty installation will look like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"/bin/bash: line 1: rustc: command not found\n/bin/bash: line 1: cargo: command not found\n")),(0,a.kt)("p",null,"Now we will check the environment:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!nvcc --version\n!gcc --version\n!cmake --version\n!nvidia-smi\n")),(0,a.kt)("p",null,"A correct environment should print the result with no bash errors for ",(0,a.kt)("inlineCode",{parentName:"p"},"nvidia-smi")," command and result in a ",(0,a.kt)("strong",{parentName:"p"},"Teslt T4 GPU")," type:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"nvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2023 NVIDIA Corporation\nBuilt on Tue_Aug_15_22:02:13_PDT_2023\nCuda compilation tools, release 12.2, V12.2.140\nBuild cuda_12.2.r12.2/compiler.33191640_0\ngcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nCopyright (C) 2021 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ncmake version 3.27.9\n\nCMake suite maintained and supported by Kitware (kitware.com/cmake).\nWed Jan 17 13:10:18 2024 \n+---------------------------------------------------------------------------------------+\n| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |\n|-----------------------------------------+----------------------+----------------------+\n| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n| | | MIG M. |\n|=========================================+======================+======================|\n| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n| N/A 39C P8 9W / 70W | 0MiB / 15360MiB | 0% Default |\n| | | N/A |\n+-----------------------------------------+----------------------+----------------------+\n \n+---------------------------------------------------------------------------------------+\n| Processes: |\n| GPU GI CI PID Type Process name GPU Memory |\n| ID ID Usage |\n|=======================================================================================|\n| No running processes found |\n+---------------------------------------------------------------------------------------+\n")),(0,a.kt)("h2",{id:"cloning-icicle-and-running-test"},"Cloning ICICLE and running test"),(0,a.kt)("p",null,"Now we are ready to clone ICICE repository,"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!git clone https://github.com/ingonyama-zk/icicle.git\n")),(0,a.kt)("p",null,"We now can browse the repository and run tests to check the runtime environment:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!ls -la\n%cd icicle\n")),(0,a.kt)("p",null,"Let's run a test!\nNavigate to icicle/wrappers/rust/icicle-curves/icicle-bn254 and run cargo test:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"%cd icicle/wrappers/rust/icicle-curves/icicle-bn254/\n!cargo test --release\n")),(0,a.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,a.kt)("div",{parentName:"div",className:"admonition-heading"},(0,a.kt)("h5",{parentName:"div"},(0,a.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,a.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,a.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,a.kt)("div",{parentName:"div",className:"admonition-content"},(0,a.kt)("p",{parentName:"div"},"Compiling the first time may take a while"))),(0,a.kt)("p",null,"Test run should end like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"running 15 tests\ntest curve::tests::test_ark_point_convert ... ok\ntest curve::tests::test_ark_scalar_convert ... ok\ntest curve::tests::test_affine_projective_convert ... ok\ntest curve::tests::test_point_equality ... ok\ntest curve::tests::test_field_convert_montgomery ... ok\ntest curve::tests::test_scalar_equality ... ok\ntest curve::tests::test_points_convert_montgomery ... ok\ntest msm::tests::test_msm ... ok\ntest msm::tests::test_msm_skewed_distributions ... ok\ntest ntt::tests::test_ntt ... ok\ntest ntt::tests::test_ntt_arbitrary_coset ... ok\ntest msm::tests::test_msm_batch has been running for over 60 seconds\ntest msm::tests::test_msm_batch ... ok\ntest ntt::tests::test_ntt_coset_from_subgroup ... ok\ntest ntt::tests::test_ntt_device_async ... ok\ntest ntt::tests::test_ntt_batch ... ok\n\ntest result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 99.39s\n")),(0,a.kt)("p",null,"Viola, ICICLE in Colab!"))}m.isMDXComponent=!0},4429:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/colab_change_runtime-eda3091877f78ec971a41338d6b33c2c.png"},8259:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/t4_gpu-798c30098fd3b77784113e9a13659489.png"},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/62ce5d13.f2fdd712.js b/assets/js/62ce5d13.f2fdd712.js new file mode 100644 index 0000000..1d6e859 --- /dev/null +++ b/assets/js/62ce5d13.f2fdd712.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[774],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),d=a,g=p["".concat(l,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(g,s(s({ref:t},u),{},{components:n})):r.createElement(g,s({ref:t},u))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:a,s[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=n(7462),a=(n(7294),n(3905));n(8209);const o={},s="Run ICICLE on Google Colab",i={unversionedId:"icicle/colab-instructions",id:"icicle/colab-instructions",title:"Run ICICLE on Google Colab",description:"Google Colab let's you use a GPU free of charge, it's an Nvidia T4 GPU with 16 GB of memory, capable of running latest CUDA (tested on Cuda 12.2)",source:"@site/docs/icicle/colab-instructions.md",sourceDirName:"icicle",slug:"/icicle/colab-instructions",permalink:"/icicle/colab-instructions",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/colab-instructions.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Supporting Additional Curves",permalink:"/icicle/supporting-additional-curves"},next:{title:"ZKContainer",permalink:"/ZKContainers"}},l={},c=[{value:"Prepare Colab environment",id:"prepare-colab-environment",level:2},{value:"Cloning ICICLE and running test",id:"cloning-icicle-and-running-test",level:2}],u={toc:c},p="wrapper";function m(e){let{components:t,...o}=e;return(0,a.kt)(p,(0,r.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"run-icicle-on-google-colab"},"Run ICICLE on Google Colab"),(0,a.kt)("p",null,"Google Colab let's you use a GPU free of charge, it's an Nvidia T4 GPU with 16 GB of memory, capable of running latest CUDA (tested on Cuda 12.2)\nAs Colab is able to interact with shell commands, a user can also install a framework and load git repositories into Colab space."),(0,a.kt)("h2",{id:"prepare-colab-environment"},"Prepare Colab environment"),(0,a.kt)("p",null,"First thing to do in a notebook is to set the runtime type to a T4 GPU."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'in the upper corner click on the dropdown menu and select "change runtime type"')),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Change runtime",src:n(4429).Z,width:"423",height:"388"})),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'In the window select "T4 GPU" and press Save')),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"T4 GPU",src:n(8259).Z,width:"582",height:"424"})),(0,a.kt)("p",null,"Installing Rust is rather simple, just execute the following command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!apt install rustc cargo\n")),(0,a.kt)("p",null,"To test the installation of Rust:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!rustc --version\n!cargo --version\n")),(0,a.kt)("p",null,"A successful installation will result in a rustc and cargo version print, a faulty installation will look like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"/bin/bash: line 1: rustc: command not found\n/bin/bash: line 1: cargo: command not found\n")),(0,a.kt)("p",null,"Now we will check the environment:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!nvcc --version\n!gcc --version\n!cmake --version\n!nvidia-smi\n")),(0,a.kt)("p",null,"A correct environment should print the result with no bash errors for ",(0,a.kt)("inlineCode",{parentName:"p"},"nvidia-smi")," command and result in a ",(0,a.kt)("strong",{parentName:"p"},"Teslt T4 GPU")," type:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"nvcc: NVIDIA (R) Cuda compiler driver\nCopyright (c) 2005-2023 NVIDIA Corporation\nBuilt on Tue_Aug_15_22:02:13_PDT_2023\nCuda compilation tools, release 12.2, V12.2.140\nBuild cuda_12.2.r12.2/compiler.33191640_0\ngcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\nCopyright (C) 2021 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ncmake version 3.27.9\n\nCMake suite maintained and supported by Kitware (kitware.com/cmake).\nWed Jan 17 13:10:18 2024 \n+---------------------------------------------------------------------------------------+\n| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |\n|-----------------------------------------+----------------------+----------------------+\n| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n| | | MIG M. |\n|=========================================+======================+======================|\n| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n| N/A 39C P8 9W / 70W | 0MiB / 15360MiB | 0% Default |\n| | | N/A |\n+-----------------------------------------+----------------------+----------------------+\n \n+---------------------------------------------------------------------------------------+\n| Processes: |\n| GPU GI CI PID Type Process name GPU Memory |\n| ID ID Usage |\n|=======================================================================================|\n| No running processes found |\n+---------------------------------------------------------------------------------------+\n")),(0,a.kt)("h2",{id:"cloning-icicle-and-running-test"},"Cloning ICICLE and running test"),(0,a.kt)("p",null,"Now we are ready to clone ICICE repository,"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!git clone https://github.com/ingonyama-zk/icicle.git\n")),(0,a.kt)("p",null,"We now can browse the repository and run tests to check the runtime environment:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"!ls -la\n%cd icicle\n")),(0,a.kt)("p",null,"Let's run a test!\nNavigate to icicle/wrappers/rust/icicle-curves/icicle-bn254 and run cargo test:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"%cd icicle/wrappers/rust/icicle-curves/icicle-bn254/\n!cargo test --release\n")),(0,a.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,a.kt)("div",{parentName:"div",className:"admonition-heading"},(0,a.kt)("h5",{parentName:"div"},(0,a.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,a.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,a.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,a.kt)("div",{parentName:"div",className:"admonition-content"},(0,a.kt)("p",{parentName:"div"},"Compiling the first time may take a while"))),(0,a.kt)("p",null,"Test run should end like this:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"running 15 tests\ntest curve::tests::test_ark_point_convert ... ok\ntest curve::tests::test_ark_scalar_convert ... ok\ntest curve::tests::test_affine_projective_convert ... ok\ntest curve::tests::test_point_equality ... ok\ntest curve::tests::test_field_convert_montgomery ... ok\ntest curve::tests::test_scalar_equality ... ok\ntest curve::tests::test_points_convert_montgomery ... ok\ntest msm::tests::test_msm ... ok\ntest msm::tests::test_msm_skewed_distributions ... ok\ntest ntt::tests::test_ntt ... ok\ntest ntt::tests::test_ntt_arbitrary_coset ... ok\ntest msm::tests::test_msm_batch has been running for over 60 seconds\ntest msm::tests::test_msm_batch ... ok\ntest ntt::tests::test_ntt_coset_from_subgroup ... ok\ntest ntt::tests::test_ntt_device_async ... ok\ntest ntt::tests::test_ntt_batch ... ok\n\ntest result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 99.39s\n")),(0,a.kt)("p",null,"Viola, ICICLE in Colab!"))}m.isMDXComponent=!0},4429:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/colab_change_runtime-eda3091877f78ec971a41338d6b33c2c.png"},8259:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/t4_gpu-798c30098fd3b77784113e9a13659489.png"},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/93a51358.349f8f03.js b/assets/js/93a51358.349f8f03.js new file mode 100644 index 0000000..e452ed7 --- /dev/null +++ b/assets/js/93a51358.349f8f03.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[984],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>g});var i=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function c(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=i.createContext({}),s=function(e){var n=i.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):c(c({},n),e)),t},u=function(e){var n=s(e.components);return i.createElement(l.Provider,{value:n},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},m=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=s(t),m=r,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||a;return t?i.createElement(g,c(c({ref:n},u),{},{components:t})):i.createElement(g,c({ref:n},u))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,c=new Array(a);c[0]=m;var o={};for(var l in n)hasOwnProperty.call(n,l)&&(o[l]=n[l]);o.originalType=e,o[p]="string"==typeof e?e:r,c[1]=o;for(var s=2;s{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>s});var i=t(7462),r=(t(7294),t(3905));t(8209);const a={},c="Rust bindings",o={unversionedId:"icicle/rust-bindings",id:"icicle/rust-bindings",title:"Rust bindings",description:"Rust bindings allow you to use ICICLE as a rust library.",source:"@site/docs/icicle/rust-bindings.md",sourceDirName:"icicle",slug:"/icicle/rust-bindings",permalink:"/icicle/rust-bindings",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/rust-bindings.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Golang bindings",permalink:"/icicle/golang-bindings"},next:{title:"Supporting Additional Curves",permalink:"/icicle/supporting-additional-curves"}},l={},s=[{value:"Using ICICLE Rust bindings in your project",id:"using-icicle-rust-bindings-in-your-project",level:2}],u={toc:s},p="wrapper";function d(e){let{components:n,...t}=e;return(0,r.kt)(p,(0,i.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"rust-bindings"},"Rust bindings"),(0,r.kt)("p",null,"Rust bindings allow you to use ICICLE as a rust library."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-core")," defines all interfaces, macros and common methods."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-cuda-runtime")," defines DeviceContext which can be used to manage a specific GPU as well as wrapping common CUDA methods."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-curves")," implements all interfaces and macros from icicle-core for each curve. For example icicle-bn254 implements curve bn254. Each curve has its own build script which will build the CUDA libraries for that curve as part of the rust-toolchain build."),(0,r.kt)("h2",{id:"using-icicle-rust-bindings-in-your-project"},"Using ICICLE Rust bindings in your project"),(0,r.kt)("p",null,"Simply add the following to your ",(0,r.kt)("inlineCode",{parentName:"p"},"Cargo.toml"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'# GPU Icicle integration\nicicle-cuda-runtime = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v1.0.0" }\nicicle-core = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v1.0.0" }\nicicle-bn254 = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v1.0.0" }\n')),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-bn254")," being the curve you wish to use and ",(0,r.kt)("inlineCode",{parentName:"p"},"icicle-core")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"icicle-cuda-runtime")," contain ICICLE utilities and CUDA wrappers."),(0,r.kt)("p",null,"If you wish to point to a specific ICICLE branch add ",(0,r.kt)("inlineCode",{parentName:"p"},'branch = ""')," or ",(0,r.kt)("inlineCode",{parentName:"p"},'tag = ""')," to the ICICLE dependency. For a specific commit add ",(0,r.kt)("inlineCode",{parentName:"p"},'rev = ""'),"."),(0,r.kt)("p",null,"When you build your project ICICLE will be built as part of the build command."),(0,r.kt)("h1",{id:"how-do-the-rust-bindings-work"},"How do the rust bindings work?"),(0,r.kt)("p",null,"The rust bindings are just rust wrappers for ICICLE Core static libraries which can be compiled. We integrate the compilation of the static libraries into rusts toolchain to make usage seamless and easy. This is achieved by ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/wrappers/rust/icicle-curves/icicle-bn254/build.rs"},"extending rusts build command"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use cmake::Config;\nuse std::env::var;\n\nfn main() {\n println!("cargo:rerun-if-env-changed=CXXFLAGS");\n println!("cargo:rerun-if-changed=../../../../icicle");\n\n let cargo_dir = var("CARGO_MANIFEST_DIR").unwrap();\n let profile = var("PROFILE").unwrap();\n\n let out_dir = Config::new("../../../../icicle")\n .define("BUILD_TESTS", "OFF") //TODO: feature\n .define("CURVE", "bn254")\n .define("CMAKE_BUILD_TYPE", "Release")\n .build_target("icicle")\n .build();\n\n println!("cargo:rustc-link-search={}/build", out_dir.display());\n\n println!("cargo:rustc-link-lib=ingo_bn254");\n println!("cargo:rustc-link-lib=stdc++");\n // println!("cargo:rustc-link-search=native=/usr/local/cuda/lib64");\n println!("cargo:rustc-link-lib=cudart");\n}\n')))}d.isMDXComponent=!0},8209:(e,n,t)=>{t(7294)}}]); \ No newline at end of file diff --git a/assets/js/93a51358.aba52676.js b/assets/js/93a51358.aba52676.js deleted file mode 100644 index 60b8068..0000000 --- a/assets/js/93a51358.aba52676.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[984],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>g});var i=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function c(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=i.createContext({}),s=function(e){var n=i.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):c(c({},n),e)),t},u=function(e){var n=s(e.components);return i.createElement(l.Provider,{value:n},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return i.createElement(i.Fragment,{},n)}},m=i.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=s(t),m=r,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||a;return t?i.createElement(g,c(c({ref:n},u),{},{components:t})):i.createElement(g,c({ref:n},u))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,c=new Array(a);c[0]=m;var o={};for(var l in n)hasOwnProperty.call(n,l)&&(o[l]=n[l]);o.originalType=e,o[p]="string"==typeof e?e:r,c[1]=o;for(var s=2;s{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>s});var i=t(7462),r=(t(7294),t(3905));t(8209);const a={},c="Rust bindings",o={unversionedId:"icicle/rust-bindings",id:"icicle/rust-bindings",title:"Rust bindings",description:"Rust bindings allow you to use ICICLE as a rust library.",source:"@site/docs/icicle/rust-bindings.md",sourceDirName:"icicle",slug:"/icicle/rust-bindings",permalink:"/icicle/rust-bindings",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/rust-bindings.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Golang bindings",permalink:"/icicle/golang-bindings"},next:{title:"Supporting Additional Curves",permalink:"/icicle/supporting-additional-curves"}},l={},s=[{value:"Using ICICLE Rust bindings in your project",id:"using-icicle-rust-bindings-in-your-project",level:2}],u={toc:s},p="wrapper";function d(e){let{components:n,...t}=e;return(0,r.kt)(p,(0,i.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"rust-bindings"},"Rust bindings"),(0,r.kt)("p",null,"Rust bindings allow you to use ICICLE as a rust library."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-core")," defines all interfaces, macros and common methods."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-cuda-runtime")," defines DeviceContext which can be used to manage a specific GPU as well as wrapping common CUDA methods."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-curves")," implements all interfaces and macros from icicle-core for each curve. For example icicle-bn254 implements curve bn254. Each curve has its own build script which will build the CUDA libraries for that curve as part of the rust-toolchain build."),(0,r.kt)("h2",{id:"using-icicle-rust-bindings-in-your-project"},"Using ICICLE Rust bindings in your project"),(0,r.kt)("p",null,"Simply add the following to your ",(0,r.kt)("inlineCode",{parentName:"p"},"Cargo.toml"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'# GPU Icicle integration\nicicle-cuda-runtime = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v1.0.0" }\nicicle-core = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v1.0.0" }\nicicle-bn254 = { git = "https://github.com/ingonyama-zk/icicle.git", tag = "v1.0.0" }\n')),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"icicle-bn254")," being the curve you wish to use and ",(0,r.kt)("inlineCode",{parentName:"p"},"icicle-core")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"icicle-cuda-runtime")," contain ICICLE utilities and CUDA wrappers."),(0,r.kt)("p",null,"If you wish to point to a specific ICICLE branch add ",(0,r.kt)("inlineCode",{parentName:"p"},'branch = ""')," or ",(0,r.kt)("inlineCode",{parentName:"p"},'tag = ""')," to the ICICLE dependency. For a specific commit add ",(0,r.kt)("inlineCode",{parentName:"p"},'rev = ""'),"."),(0,r.kt)("p",null,"When you build your project ICICLE will be built as part of the build command."),(0,r.kt)("h1",{id:"how-do-the-rust-bindings-work"},"How do the rust bindings work?"),(0,r.kt)("p",null,"The rust bindings are just rust wrappers for ICICLE Core static libraries which can be compiled. We integrate the compilation of the static libraries into rusts toolchain to make usage seamless and easy. This is achieved by ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/blob/main/wrappers/rust/icicle-curves/icicle-bn254/build.rs"},"extending rusts build command"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-rust"},'use cmake::Config;\nuse std::env::var;\n\nfn main() {\n println!("cargo:rerun-if-env-changed=CXXFLAGS");\n println!("cargo:rerun-if-changed=../../../../icicle");\n\n let cargo_dir = var("CARGO_MANIFEST_DIR").unwrap();\n let profile = var("PROFILE").unwrap();\n\n let out_dir = Config::new("../../../../icicle")\n .define("BUILD_TESTS", "OFF") //TODO: feature\n .define("CURVE", "bn254")\n .define("CMAKE_BUILD_TYPE", "Release")\n .build_target("icicle")\n .build();\n\n println!("cargo:rustc-link-search={}/build", out_dir.display());\n\n println!("cargo:rustc-link-lib=ingo_bn254");\n println!("cargo:rustc-link-lib=stdc++");\n // println!("cargo:rustc-link-search=native=/usr/local/cuda/lib64");\n println!("cargo:rustc-link-lib=cudart");\n}\n')))}d.isMDXComponent=!0},8209:(e,n,t)=>{t(7294)}}]); \ No newline at end of file diff --git a/assets/js/a09c2993.7f47675d.js b/assets/js/a09c2993.7f47675d.js deleted file mode 100644 index 9ab185b..0000000 --- a/assets/js/a09c2993.7f47675d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[128],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var o=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=o.createContext({}),s=function(e){var t=o.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return o.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(r),m=a,f=u["".concat(c,".").concat(m)]||u[m]||d[m]||n;return r?o.createElement(f,i(i({ref:t},p),{},{components:r})):o.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,i=new Array(n);i[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>n,metadata:()=>l,toc:()=>s});var o=r(7462),a=(r(7294),r(3905));r(8209);const n={slug:"/",displayed_sidebar:"GettingStartedSidebar",title:""},i="Welcome to Ingonyama's Developer Documentation",l={unversionedId:"introduction",id:"introduction",title:"",description:"Ingonyama is a next-generation semiconductor company, focusing on Zero-Knowledge Proof hardware acceleration. We build accelerators for advanced cryptography, unlocking real-time applications. Our focus is on democratizing access to compute intensive cryptography and making it accessible for developers to build on top of.",source:"@site/docs/introduction.md",sourceDirName:".",slug:"/",permalink:"/",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/introduction.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{slug:"/",displayed_sidebar:"GettingStartedSidebar",title:""},sidebar:"GettingStartedSidebar",next:{title:"What is ICICLE?",permalink:"/icicle/overview"}},c={},s=[{value:"Our current take on hardware acceleration",id:"our-current-take-on-hardware-acceleration",level:2},{value:"ICICLE",id:"icicle",level:2},{value:"Get in Touch",id:"get-in-touch",level:2}],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,o.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"welcome-to-ingonyamas-developer-documentation"},"Welcome to Ingonyama's Developer Documentation"),(0,a.kt)("p",null,"Ingonyama is a next-generation semiconductor company, focusing on Zero-Knowledge Proof hardware acceleration. We build accelerators for advanced cryptography, unlocking real-time applications. Our focus is on democratizing access to compute intensive cryptography and making it accessible for developers to build on top of."),(0,a.kt)("p",null,"Currently our flagship products are:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"ICICLE"),":\n",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," is a fully featured GPU accelerated cryptography library for building ZK provers. ICICLE allows you to accelerate your ZK existing protocols in a matter of hours or implement your protocol from scratch on GPU.")),(0,a.kt)("hr",null),(0,a.kt)("h2",{id:"our-current-take-on-hardware-acceleration"},"Our current take on hardware acceleration"),(0,a.kt)("p",null,"We believe GPUs are as important for ZK as for AI."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"GPUs are a perfect match for ZK compute - around 97% of ZK protocol runtime is parallel by nature."),(0,a.kt)("li",{parentName:"ul"},"GPUs are simple for developers to use and scale compared to other hardware platforms."),(0,a.kt)("li",{parentName:"ul"},"GPUs are extremely competitive in terms of power / performance and price (3x cheaper)."),(0,a.kt)("li",{parentName:"ul"},"GPUs are popular and readily available.")),(0,a.kt)("p",null,"For a more in-depth understanding on this topic we suggest you read ",(0,a.kt)("a",{parentName:"p",href:"https://www.ingonyama.com/blog/revisiting-paradigm-hardware-acceleration-for-zero-knowledge-proofs"},"our article on the subject"),"."),(0,a.kt)("p",null,"Despite our current focus on GPUs we are still hard at work developing a ZPU (ZK Processing Unit), with the goal of offering a programmable hardware platform for ZK. To read more about ZPUs we suggest you read this ",(0,a.kt)("a",{parentName:"p",href:"https://medium.com/@ingonyama/zpu-the-zero-knowledge-processing-unit-f886a48e00e0"},"article"),"."),(0,a.kt)("h2",{id:"icicle"},"ICICLE"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," is a cryptography library for ZK using GPUs.\nICICLE implements blazing fast cryptographic primitives such as EC operations, MSM, NTT, Poseidon hash and more on GPU."),(0,a.kt)("p",null,"ICICLE is designed to be easy to use, developers don't have to touch a single line of CUDA code. Our Rust and Golang bindings allow your team to transition from CPU to GPU with minimal changes."),(0,a.kt)("p",null,"Learn more about ICICLE and GPUs ",(0,a.kt)("a",{parentName:"p",href:"/icicle/overview"},"here"),"."),(0,a.kt)("h2",{id:"get-in-touch"},"Get in Touch"),(0,a.kt)("p",null,"If you have any questions, ideas, or are thinking of building something in this space join the discussion on ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/6vYrE7waPj"},"Discord"),". You can explore our code on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk"},"github")," or read some of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/papers"},"our research papers"),"."),(0,a.kt)("p",null,"Follow us on ",(0,a.kt)("a",{parentName:"p",href:"https://x.com/Ingo_zk"},"Twitter")," and ",(0,a.kt)("a",{parentName:"p",href:"https://www.youtube.com/@ingo_ZK"},"YouTube")," and sign up for our ",(0,a.kt)("a",{parentName:"p",href:"https://wkf.ms/3LKCbdj"},"mailing list")," to get our latest announcements."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(7294)}}]); \ No newline at end of file diff --git a/assets/js/a09c2993.ac95bd37.js b/assets/js/a09c2993.ac95bd37.js new file mode 100644 index 0000000..c39fac4 --- /dev/null +++ b/assets/js/a09c2993.ac95bd37.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[128],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var o=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=o.createContext({}),s=function(e){var t=o.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return o.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(r),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||n;return r?o.createElement(f,i(i({ref:t},p),{},{components:r})):o.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,i=new Array(n);i[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:a,i[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>n,metadata:()=>c,toc:()=>s});var o=r(7462),a=(r(7294),r(3905));r(8209);const n={slug:"/",displayed_sidebar:"GettingStartedSidebar",title:""},i="Welcome to Ingonyama's Developer Documentation",c={unversionedId:"introduction",id:"introduction",title:"",description:"Ingonyama is a next-generation semiconductor company, focusing on Zero-Knowledge Proof hardware acceleration. We build accelerators for advanced cryptography, unlocking real-time applications. Our focus is on democratizing access to compute intensive cryptography and making it accessible for developers to build on top of.",source:"@site/docs/introduction.md",sourceDirName:".",slug:"/",permalink:"/",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/introduction.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{slug:"/",displayed_sidebar:"GettingStartedSidebar",title:""},sidebar:"GettingStartedSidebar",next:{title:"What is ICICLE?",permalink:"/icicle/overview"}},l={},s=[{value:"Our current take on hardware acceleration",id:"our-current-take-on-hardware-acceleration",level:2},{value:"ICICLE",id:"icicle",level:2},{value:"Get in Touch",id:"get-in-touch",level:2}],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,o.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"welcome-to-ingonyamas-developer-documentation"},"Welcome to Ingonyama's Developer Documentation"),(0,a.kt)("p",null,"Ingonyama is a next-generation semiconductor company, focusing on Zero-Knowledge Proof hardware acceleration. We build accelerators for advanced cryptography, unlocking real-time applications. Our focus is on democratizing access to compute intensive cryptography and making it accessible for developers to build on top of."),(0,a.kt)("p",null,"Currently our flagship products are:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"ICICLE"),":\n",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," is a fully featured GPU accelerated cryptography library for building ZK provers. ICICLE allows you to accelerate your ZK existing protocols in a matter of hours or implement your protocol from scratch on GPU.")),(0,a.kt)("hr",null),(0,a.kt)("h2",{id:"our-current-take-on-hardware-acceleration"},"Our current take on hardware acceleration"),(0,a.kt)("p",null,"We believe GPUs are as important for ZK as for AI."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"GPUs are a perfect match for ZK compute - around 97% of ZK protocol runtime is parallel by nature."),(0,a.kt)("li",{parentName:"ul"},"GPUs are simple for developers to use and scale compared to other hardware platforms."),(0,a.kt)("li",{parentName:"ul"},"GPUs are extremely competitive in terms of power / performance and price (3x cheaper)."),(0,a.kt)("li",{parentName:"ul"},"GPUs are popular and readily available.")),(0,a.kt)("p",null,"For a more in-depth understanding on this topic we suggest you read ",(0,a.kt)("a",{parentName:"p",href:"https://www.ingonyama.com/blog/revisiting-paradigm-hardware-acceleration-for-zero-knowledge-proofs"},"our article on the subject"),"."),(0,a.kt)("p",null,"Despite our current focus on GPUs we are still hard at work developing a ZPU (ZK Processing Unit), with the goal of offering a programmable hardware platform for ZK. To read more about ZPUs we suggest you read this ",(0,a.kt)("a",{parentName:"p",href:"https://medium.com/@ingonyama/zpu-the-zero-knowledge-processing-unit-f886a48e00e0"},"article"),"."),(0,a.kt)("h2",{id:"icicle"},"ICICLE"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," is a cryptography library for ZK using GPUs.\nICICLE implements blazing fast cryptographic primitives such as EC operations, MSM, NTT, Poseidon hash and more on GPU."),(0,a.kt)("p",null,"ICICLE is designed to be easy to use, developers don't have to touch a single line of CUDA code. Our Rust and Golang bindings allow your team to transition from CPU to GPU with minimal changes."),(0,a.kt)("p",null,"Learn more about ICICLE and GPUs ",(0,a.kt)("a",{parentName:"p",href:"/icicle/overview"},"here"),"."),(0,a.kt)("h2",{id:"get-in-touch"},"Get in Touch"),(0,a.kt)("p",null,"If you have any questions, ideas, or are thinking of building something in this space join the discussion on ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/6vYrE7waPj"},"Discord"),". You can explore our code on ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk"},"github")," or read some of ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/papers"},"our research papers"),"."),(0,a.kt)("p",null,"Follow us on ",(0,a.kt)("a",{parentName:"p",href:"https://x.com/Ingo_zk"},"Twitter")," and ",(0,a.kt)("a",{parentName:"p",href:"https://www.youtube.com/@ingo_ZK"},"YouTube")," and sign up for our ",(0,a.kt)("a",{parentName:"p",href:"https://wkf.ms/3LKCbdj"},"mailing list")," to get our latest announcements."))}d.isMDXComponent=!0},8209:(e,t,r)=>{r(7294)}}]); \ No newline at end of file diff --git a/assets/js/ec013bfd.0f494547.js b/assets/js/ec013bfd.0f494547.js new file mode 100644 index 0000000..25ee366 --- /dev/null +++ b/assets/js/ec013bfd.0f494547.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[541],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var o=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=o.createContext({}),c=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},h=o.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(a),h=n,m=u["".concat(s,".").concat(h)]||u[h]||d[h]||r;return a?o.createElement(m,i(i({ref:t},p),{},{components:a})):o.createElement(m,i({ref:t},p))}));function m(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:n,i[1]=l;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var o=a(7462),n=(a(7294),a(3905));a(8209);const r={},i="What is ICICLE?",l={unversionedId:"icicle/overview",id:"icicle/overview",title:"What is ICICLE?",description:"Static Badge",source:"@site/docs/icicle/overview.md",sourceDirName:"icicle",slug:"/icicle/overview",permalink:"/icicle/overview",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/overview.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"",permalink:"/"},next:{title:"Getting started with ICICLE",permalink:"/icicle/introduction"}},s={},c=[{value:"Dont have access to a GPU?",id:"dont-have-access-to-a-gpu",level:2},{value:"Grants",id:"grants",level:3},{value:"Google Colab",id:"google-colab",level:3},{value:"Vast.ai",id:"vastai",level:3},{value:"What can you do with ICICLE?",id:"what-can-you-do-with-icicle",level:2},{value:"Circuit developers",id:"circuit-developers",level:3},{value:"Integrating into existing ZK provers",id:"integrating-into-existing-zk-provers",level:3},{value:"Developing your own ZK provers",id:"developing-your-own-zk-provers",level:3},{value:"Developing proof of concepts",id:"developing-proof-of-concepts",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...a}=e;return(0,n.kt)(u,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"what-is-icicle"},"What is ICICLE?"),(0,n.kt)("p",null,(0,n.kt)("img",{parentName:"p",src:"https://img.shields.io/badge/Machines%20running%20ICICLE-544-lightblue",alt:"Static Badge"})),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," is a cryptography library for ZK using GPUs. ICICLE implements blazing fast cryptographic primitives such as EC operations, MSM, NTT, Poseidon hash and more on GPU."),(0,n.kt)("p",null,"ICICLE allows developers with minimal GPU experience to effortlessly accelerate there ZK application; from our experiments, even the most naive implementation may yield 10X improvement in proving times."),(0,n.kt)("p",null,"ICICLE has been used by many leading ZK companies such as ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/celer-network"},"Celer Network"),", ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark")," and others to accelerate their ZK proving pipeline."),(0,n.kt)("h2",{id:"dont-have-access-to-a-gpu"},"Dont have access to a GPU?"),(0,n.kt)("p",null,"We understand that not all developers have access to a GPU and we don't want this to limit anyone from developing with ICICLE.\nHere are some ways we can help you gain access to GPUs:"),(0,n.kt)("h3",{id:"grants"},"Grants"),(0,n.kt)("p",null,"At Ingonyama we are interested in accelerating the progress of ZK and cryptography. If you are an engineer, developer or an academic researcher we invite you to checkout ",(0,n.kt)("a",{parentName:"p",href:"https://www.ingonyama.com/blog/icicle-for-researchers-grants-challenges"},"our grant program"),". We will give you access to GPUs and even pay you to do your dream research!"),(0,n.kt)("h3",{id:"google-colab"},"Google Colab"),(0,n.kt)("p",null,"This is a great way to get started with ICICLE instantly. Google Colab offers free GPU access the down side being that the GPU doesn't have a lot of RAM but it should be enough for experimenting and even prototyping with ICICLE."),(0,n.kt)("p",null,"For an extensive guide on how to setup Google Colab with ICICLE refer to ",(0,n.kt)("a",{parentName:"p",href:"/icicle/colab-instructions"},"this article"),"."),(0,n.kt)("p",null,"If none of these options are appropriate for you reach out to us on ",(0,n.kt)("a",{parentName:"p",href:"https://t.me/RealElan"},"telegram")," we will do our best to help you."),(0,n.kt)("h3",{id:"vastai"},"Vast.ai"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://vast.ai/"},"Vast.ai")," is a global GPU marketplace where you can rent many different types of GPUs by the hour for ",(0,n.kt)("a",{parentName:"p",href:"https://vast.ai/pricing"},"competitive pricing"),". They provide on-demand and interruptible rentals depending on your need or use case; you can learn more about their rental types ",(0,n.kt)("a",{parentName:"p",href:"https://vast.ai/faq#rental-types"},"here"),"."),(0,n.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,n.kt)("div",{parentName:"div",className:"admonition-heading"},(0,n.kt)("h5",{parentName:"div"},(0,n.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,n.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,n.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,n.kt)("div",{parentName:"div",className:"admonition-content"},(0,n.kt)("p",{parentName:"div"},"If none of these options suit your needs, contact us on ",(0,n.kt)("a",{parentName:"p",href:"https://t.me/RealElan"},"telegram")," for assistance. We're committed to ensuring that a lack of a GPU doesn't become a bottleneck for you. If you need help with setup or any other issues, we're here to do our best to help you."))),(0,n.kt)("h2",{id:"what-can-you-do-with-icicle"},"What can you do with ICICLE?"),(0,n.kt)("p",null,(0,n.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," can be used in the same way you would use any other cryptography library. Over the past couple of months developing and integrating ICICLE into many systems, we found a couple use case categories:"),(0,n.kt)("h3",{id:"circuit-developers"},"Circuit developers"),(0,n.kt)("p",null,"If you are a circuit developer and are experiencing bottlenecks while running your circuits, an ICICLE integrated prover may be the solution."),(0,n.kt)("p",null,"ICICLE has been integrated into a number of popular ZK provers including ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark prover")," and ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/zkonduit/halo2"},"Halo2"),". This means that you can enjoy GPU acceleration for your existing circuits immediately without writing a single line of code by simply switching on the GPU prover flag!"),(0,n.kt)("h3",{id:"integrating-into-existing-zk-provers"},"Integrating into existing ZK provers"),(0,n.kt)("p",null,"From our collaborations we have learned that its possible to accelerate a specific part of your prover to solve for a specific bottleneck."),(0,n.kt)("p",null,"ICICLE can be used to accelerate specific parts of your prover without completely rewriting your ZK prover."),(0,n.kt)("h3",{id:"developing-your-own-zk-provers"},"Developing your own ZK provers"),(0,n.kt)("p",null,"If your goal is to build a ZK prover from the ground up, ICICLE is an ideal tool for creating a highly optimized and scalable ZK prover. A key benefit of using GPUs with ICICLE is the ability to scale your ZK prover efficiently across multiple machines within a data center."),(0,n.kt)("h3",{id:"developing-proof-of-concepts"},"Developing proof of concepts"),(0,n.kt)("p",null,"ICICLE is also ideal for developing small prototypes. ICICLE has Golang and Rust bindings so you can easily develop a library implementing a specific primitive using ICICLE. An example would be develop a KZG commitment library using ICICLE."))}d.isMDXComponent=!0},8209:(e,t,a)=>{a(7294)}}]); \ No newline at end of file diff --git a/assets/js/ec013bfd.f1ea22a6.js b/assets/js/ec013bfd.f1ea22a6.js deleted file mode 100644 index eb5c2c9..0000000 --- a/assets/js/ec013bfd.f1ea22a6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[541],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>m});var o=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=o.createContext({}),c=function(e){var t=o.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},h=o.forwardRef((function(e,t){var a=e.components,r=e.mdxType,n=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(a),h=r,m=u["".concat(s,".").concat(h)]||u[h]||d[h]||n;return a?o.createElement(m,i(i({ref:t},p),{},{components:a})):o.createElement(m,i({ref:t},p))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=a.length,i=new Array(n);i[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>d,frontMatter:()=>n,metadata:()=>l,toc:()=>c});var o=a(7462),r=(a(7294),a(3905));a(8209);const n={},i="What is ICICLE?",l={unversionedId:"icicle/overview",id:"icicle/overview",title:"What is ICICLE?",description:"Static Badge",source:"@site/docs/icicle/overview.md",sourceDirName:"icicle",slug:"/icicle/overview",permalink:"/icicle/overview",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/icicle/overview.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"",permalink:"/"},next:{title:"Getting started with ICICLE",permalink:"/icicle/introduction"}},s={},c=[{value:"Dont have access to a GPU?",id:"dont-have-access-to-a-gpu",level:2},{value:"Grants",id:"grants",level:3},{value:"Google Colab",id:"google-colab",level:3},{value:"Vast.ai",id:"vastai",level:3},{value:"What can you do with ICICLE?",id:"what-can-you-do-with-icicle",level:2},{value:"Circuit developers",id:"circuit-developers",level:3},{value:"Integrating into existing ZK provers",id:"integrating-into-existing-zk-provers",level:3},{value:"Developing your own ZK provers",id:"developing-your-own-zk-provers",level:3},{value:"Developing proof of concepts",id:"developing-proof-of-concepts",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(u,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"what-is-icicle"},"What is ICICLE?"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://img.shields.io/badge/Machines%20running%20ICICLE-544-lightblue",alt:"Static Badge"})),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," is a cryptography library for ZK using GPUs. ICICLE implements blazing fast cryptographic primitives such as EC operations, MSM, NTT, Poseidon hash and more on GPU."),(0,r.kt)("p",null,"ICICLE allows developers with minimal GPU experience to effortlessly accelerate there ZK application; from our experiments, even the most naive implementation may yield 10X improvement in proving times."),(0,r.kt)("p",null,"ICICLE has been used by many leading ZK companies such as ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/celer-network"},"Celer Network"),", ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark")," and others to accelerate their ZK proving pipeline."),(0,r.kt)("h2",{id:"dont-have-access-to-a-gpu"},"Dont have access to a GPU?"),(0,r.kt)("p",null,"We understand that not all developers have access to a GPU and we don't want this to limit anyone from developing with ICICLE.\nHere are some ways we can help you gain access to GPUs:"),(0,r.kt)("h3",{id:"grants"},"Grants"),(0,r.kt)("p",null,"At Ingonyama we are interested in accelerating the progress of ZK and cryptography. If you are an engineer, developer or an academic researcher we invite you to checkout ",(0,r.kt)("a",{parentName:"p",href:"https://www.ingonyama.com/blog/icicle-for-researchers-grants-challenges"},"our grant program"),". We will give you access to GPUs and even pay you to do your dream research!"),(0,r.kt)("h3",{id:"google-colab"},"Google Colab"),(0,r.kt)("p",null,"This is a great way to get started with ICICLE instantly. Google Colab offers free GPU access the down side being that the GPU doesn't have a lot of RAM but it should be enough for experimenting and even prototyping with ICICLE."),(0,r.kt)("p",null,"For an extensive guide on how to setup Google Colab with ICICLE refer to ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/gkigiermo/rust-cuda-colab"},"this article"),"."),(0,r.kt)("p",null,"If none of these options are appropriate for you reach out to us on ",(0,r.kt)("a",{parentName:"p",href:"https://t.me/RealElan"},"telegram")," we will do our best to help you."),(0,r.kt)("h3",{id:"vastai"},"Vast.ai"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://vast.ai/"},"Vast.ai")," is a global GPU marketplace where you can rent many different types of GPUs by the hour for ",(0,r.kt)("a",{parentName:"p",href:"https://vast.ai/pricing"},"competitive pricing"),". They provide on-demand and interruptible rentals depending on your need or use case; you can learn more about their rental types ",(0,r.kt)("a",{parentName:"p",href:"https://vast.ai/faq#rental-types"},"here"),"."),(0,r.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,r.kt)("div",{parentName:"div",className:"admonition-heading"},(0,r.kt)("h5",{parentName:"div"},(0,r.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,r.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,r.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,r.kt)("div",{parentName:"div",className:"admonition-content"},(0,r.kt)("p",{parentName:"div"},"If none of these options suit your needs, contact us on ",(0,r.kt)("a",{parentName:"p",href:"https://t.me/RealElan"},"telegram")," for assistance. We're committed to ensuring that a lack of a GPU doesn't become a bottleneck for you. If you need help with setup or any other issues, we're here to do our best to help you."))),(0,r.kt)("h2",{id:"what-can-you-do-with-icicle"},"What can you do with ICICLE?"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle"},"ICICLE")," can be used in the same way you would use any other cryptography library. Over the past couple of months developing and integrating ICICLE into many systems, we found a couple use case categories:"),(0,r.kt)("h3",{id:"circuit-developers"},"Circuit developers"),(0,r.kt)("p",null,"If you are a circuit developer and are experiencing bottlenecks while running your circuits, an ICICLE integrated prover may be the solution."),(0,r.kt)("p",null,"ICICLE has been integrated into a number of popular ZK provers including ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/Consensys/gnark"},"Gnark prover")," and ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/zkonduit/halo2"},"Halo2"),". This means that you can enjoy GPU acceleration for your existing circuits immediately without writing a single line of code by simply switching on the GPU prover flag!"),(0,r.kt)("h3",{id:"integrating-into-existing-zk-provers"},"Integrating into existing ZK provers"),(0,r.kt)("p",null,"From our collaborations we have learned that its possible to accelerate a specific part of your prover to solve for a specific bottleneck."),(0,r.kt)("p",null,"ICICLE can be used to accelerate specific parts of your prover without completely rewriting your ZK prover."),(0,r.kt)("h3",{id:"developing-your-own-zk-provers"},"Developing your own ZK provers"),(0,r.kt)("p",null,"If your goal is to build a ZK prover from the ground up, ICICLE is an ideal tool for creating a highly optimized and scalable ZK prover. A key benefit of using GPUs with ICICLE is the ability to scale your ZK prover efficiently across multiple machines within a data center."),(0,r.kt)("h3",{id:"developing-proof-of-concepts"},"Developing proof of concepts"),(0,r.kt)("p",null,"ICICLE is also ideal for developing small prototypes. ICICLE has Golang and Rust bindings so you can easily develop a library implementing a specific primitive using ICICLE. An example would be develop a KZG commitment library using ICICLE."))}d.isMDXComponent=!0},8209:(e,t,a)=>{a(7294)}}]); \ No newline at end of file diff --git a/assets/js/fdbbc319.45462c64.js b/assets/js/fdbbc319.45462c64.js deleted file mode 100644 index 41cbf38..0000000 --- a/assets/js/fdbbc319.45462c64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[429],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,g=p["".concat(u,".").concat(m)]||p[m]||d[m]||i;return n?r.createElement(g,o(o({ref:t},c),{},{components:n})):r.createElement(g,o({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));n(8209);const i={},o="Contributor's Guide",l={unversionedId:"contributor-guide",id:"contributor-guide",title:"Contributor's Guide",description:"We welcome all contributions with open arms. At Ingonyama we take a village approach, believing it takes many hands and minds to build a ecosystem.",source:"@site/docs/contributor-guide.md",sourceDirName:".",slug:"/contributor-guide",permalink:"/contributor-guide",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/contributor-guide.md",tags:[],version:"current",lastUpdatedBy:"ImmanuelSegol",lastUpdatedAt:1705918884,formattedLastUpdatedAt:"1/22/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Ingonyama Grant programs",permalink:"/grants"}},u={},s=[{value:"Contributing to ICICLE",id:"contributing-to-icicle",level:2},{value:"Opening a pull request",id:"opening-a-pull-request",level:3},{value:"Questions?",id:"questions",level:2}],c={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"contributors-guide"},"Contributor's Guide"),(0,a.kt)("p",null,"We welcome all contributions with open arms. At Ingonyama we take a village approach, believing it takes many hands and minds to build a ecosystem."),(0,a.kt)("h2",{id:"contributing-to-icicle"},"Contributing to ICICLE"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Make suggestions or report bugs via ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/issues"},"GitHub issues")),(0,a.kt)("li",{parentName:"ul"},"Contribute to the ICICLE by opening a ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/pulls"},"pull request"),"."),(0,a.kt)("li",{parentName:"ul"},"Contribute to our ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/developer-docs"},"documentation")," and ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle-examples"},"examples"),"."),(0,a.kt)("li",{parentName:"ul"},"Ask questions on Discord")),(0,a.kt)("h3",{id:"opening-a-pull-request"},"Opening a pull request"),(0,a.kt)("p",null,"When opening a ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/pulls"},"pull request")," please keep the following in mind."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Clear Purpose")," - The pull request should solve a single issue and be clean of any unrelated changes."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Clear description")," - If the pull request is for a new feature describe what you built, why you added it and how its best that we test it. For bug fixes please describe the issue and the solution."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Consistent style")," - Rust and Golang code should be linted by the official linters (golang fmt and rust fmt) and maintain a proper style. For CUDA and C++ code we use ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/blob/main/.clang-format"},(0,a.kt)("inlineCode",{parentName:"a"},"clang-format")),", ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/blob/605c25f9d22135c54ac49683b710fe2ce06e2300/.github/workflows/main-format.yml#L46"},"here")," you can see how we run it."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Minimal Tests")," - please add test which cover basic usage of your changes .")),(0,a.kt)("h2",{id:"questions"},"Questions?"),(0,a.kt)("p",null,"Find us on ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/6vYrE7waPj"},"Discord"),"."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/fdbbc319.9950e8cb.js b/assets/js/fdbbc319.9950e8cb.js new file mode 100644 index 0000000..ffdd1d3 --- /dev/null +++ b/assets/js/fdbbc319.9950e8cb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[429],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,g=p["".concat(u,".").concat(m)]||p[m]||d[m]||i;return n?r.createElement(g,o(o({ref:t},c),{},{components:n})):r.createElement(g,o({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var r=n(7462),a=(n(7294),n(3905));n(8209);const i={},o="Contributor's Guide",l={unversionedId:"contributor-guide",id:"contributor-guide",title:"Contributor's Guide",description:"We welcome all contributions with open arms. At Ingonyama we take a village approach, believing it takes many hands and minds to build a ecosystem.",source:"@site/docs/contributor-guide.md",sourceDirName:".",slug:"/contributor-guide",permalink:"/contributor-guide",editUrl:"https://github.com/ingonyama-zk/developer-docs/tree/main/docs/contributor-guide.md",tags:[],version:"current",lastUpdatedBy:"Leon Hibnik",lastUpdatedAt:1706022967,formattedLastUpdatedAt:"1/23/2024",frontMatter:{},sidebar:"GettingStartedSidebar",previous:{title:"Ingonyama Grant programs",permalink:"/grants"}},u={},s=[{value:"Contributing to ICICLE",id:"contributing-to-icicle",level:2},{value:"Opening a pull request",id:"opening-a-pull-request",level:3},{value:"Questions?",id:"questions",level:2}],c={toc:s},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"contributors-guide"},"Contributor's Guide"),(0,a.kt)("p",null,"We welcome all contributions with open arms. At Ingonyama we take a village approach, believing it takes many hands and minds to build a ecosystem."),(0,a.kt)("h2",{id:"contributing-to-icicle"},"Contributing to ICICLE"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Make suggestions or report bugs via ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/issues"},"GitHub issues")),(0,a.kt)("li",{parentName:"ul"},"Contribute to the ICICLE by opening a ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/pulls"},"pull request"),"."),(0,a.kt)("li",{parentName:"ul"},"Contribute to our ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/developer-docs"},"documentation")," and ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle-examples"},"examples"),"."),(0,a.kt)("li",{parentName:"ul"},"Ask questions on Discord")),(0,a.kt)("h3",{id:"opening-a-pull-request"},"Opening a pull request"),(0,a.kt)("p",null,"When opening a ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/ingonyama-zk/icicle/pulls"},"pull request")," please keep the following in mind."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Clear Purpose")," - The pull request should solve a single issue and be clean of any unrelated changes."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Clear description")," - If the pull request is for a new feature describe what you built, why you added it and how its best that we test it. For bug fixes please describe the issue and the solution."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Consistent style")," - Rust and Golang code should be linted by the official linters (golang fmt and rust fmt) and maintain a proper style. For CUDA and C++ code we use ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/blob/main/.clang-format"},(0,a.kt)("inlineCode",{parentName:"a"},"clang-format")),", ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ingonyama-zk/icicle/blob/605c25f9d22135c54ac49683b710fe2ce06e2300/.github/workflows/main-format.yml#L46"},"here")," you can see how we run it."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"Minimal Tests")," - please add test which cover basic usage of your changes .")),(0,a.kt)("h2",{id:"questions"},"Questions?"),(0,a.kt)("p",null,"Find us on ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/6vYrE7waPj"},"Discord"),"."))}d.isMDXComponent=!0},8209:(e,t,n)=>{n(7294)}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.4239796f.js b/assets/js/runtime~main.4239796f.js deleted file mode 100644 index 8995ed3..0000000 --- a/assets/js/runtime~main.4239796f.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,t,r,a,o,n={},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,d),r.loaded=!0,r.exports}d.m=n,d.c=c,e=[],d.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(d.O).every((e=>d.O[e](r[f])))?r.splice(f--,1):(c=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);d.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var c=2&a&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,d.d(o,n),o},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.u=e=>"assets/js/"+({53:"935f2afb",58:"a8dc15ca",67:"0dca48ed",83:"584ea0b6",128:"a09c2993",131:"076f2345",287:"46bc3aca",429:"fdbbc319",472:"3db59c3c",514:"1be78505",541:"ec013bfd",614:"2b850a9b",623:"bb0bd8d7",774:"62ce5d13",918:"17896441",920:"1a4e3797",984:"93a51358"}[e]||e)+"."+{53:"98eb0686",58:"d72dd6a1",67:"b600577c",83:"f978740e",128:"7f47675d",131:"cebcef99",287:"f9ef26f0",426:"e654100f",429:"45462c64",472:"6f7d5e16",514:"5d6a80d6",541:"f1ea22a6",608:"877c8809",614:"48858517",623:"d2ce985a",774:"dc2934d9",894:"fbf84e18",918:"60dfc074",920:"d7cc8439",945:"a66b494f",984:"aba52676"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="docusaurus:",d.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var c,f;if(void 0!==r)for(var i=document.getElementsByTagName("script"),u=0;u{c.onerror=c.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),f&&document.head.appendChild(c)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/",d.gca=function(e){return e={17896441:"918","935f2afb":"53",a8dc15ca:"58","0dca48ed":"67","584ea0b6":"83",a09c2993:"128","076f2345":"131","46bc3aca":"287",fdbbc319:"429","3db59c3c":"472","1be78505":"514",ec013bfd:"541","2b850a9b":"614",bb0bd8d7:"623","62ce5d13":"774","1a4e3797":"920","93a51358":"984"}[e]||e,d.p+d.u(e)},(()=>{var e={303:0,532:0};d.f.j=(t,r)=>{var a=d.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=d.p+d.u(t),c=new Error;d.l(n,(r=>{if(d.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",c.name="ChunkLoadError",c.type=o,c.request=n,a[1](c)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],c=r[1],f=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in c)d.o(c,a)&&(d.m[a]=c[a]);if(f)var u=f(d)}for(t&&t(r);i{"use strict";var e,t,r,a,o,n={},c={};function f(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=n,f.c=c,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(f.O).every((e=>f.O[e](r[d])))?r.splice(d--,1):(c=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var c=2&a&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({53:"935f2afb",58:"a8dc15ca",67:"0dca48ed",83:"584ea0b6",128:"a09c2993",131:"076f2345",287:"46bc3aca",429:"fdbbc319",472:"3db59c3c",514:"1be78505",541:"ec013bfd",614:"2b850a9b",623:"bb0bd8d7",774:"62ce5d13",918:"17896441",920:"1a4e3797",984:"93a51358"}[e]||e)+"."+{53:"98eb0686",58:"d72dd6a1",67:"78d3f6f6",83:"aeed43a8",128:"ac95bd37",131:"0b8c3840",287:"7ee32a82",426:"e654100f",429:"9950e8cb",472:"72589e52",514:"5d6a80d6",541:"0f494547",608:"877c8809",614:"702d77ef",623:"d2ce985a",774:"f2fdd712",894:"fbf84e18",918:"60dfc074",920:"d7cc8439",945:"a66b494f",984:"349f8f03"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="docusaurus:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var c,d;if(void 0!==r)for(var i=document.getElementsByTagName("script"),u=0;u{c.onerror=c.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),d&&document.head.appendChild(c)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"918","935f2afb":"53",a8dc15ca:"58","0dca48ed":"67","584ea0b6":"83",a09c2993:"128","076f2345":"131","46bc3aca":"287",fdbbc319:"429","3db59c3c":"472","1be78505":"514",ec013bfd:"541","2b850a9b":"614",bb0bd8d7:"623","62ce5d13":"774","1a4e3797":"920","93a51358":"984"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var n=f.p+f.u(t),c=new Error;f.l(n,(r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",c.name="ChunkLoadError",c.type=o,c.request=n,a[1](c)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],c=r[1],d=r[2],i=0;if(n.some((t=>0!==e[t]))){for(a in c)f.o(c,a)&&(f.m[a]=c[a]);if(d)var u=d(f)}for(t&&t(r);i