New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

ZK dApps - Why, What and How? | Wed, Jul 26, 2023, 8:00 PM | Meetup

Ethereum MalaysiaMon, Oct 9, 2023, 12:00 AM

Zero Knowledge Technology refers to an encryption technique where parties can verify information without having direct access to the information itself. In the Web3 world, this technology encompasses various services that utilize zero-knowledge proofs, commonly known as ZK dApps. Join us in our journey to understand the components that make up a ZK dApp, breaking down into three parts: Why ZK dApps What does a ZK dApp consists of How to build a ZK dApp ----------------------- Savio Sou is a product manager of Noir, an open-source, Rust-based programming language for Aztec. Noir enables safe, seamless construction of privacy-preserving zero-knowledge circuits. ----------------------- Aztec is the first ever hybrid zkRollup, with two layers of zero knowledge circuits; one layer of zk to encrypt private user transactions and a second layer of zk to compress transactions, allowing Aztec to succinctly prove large bundles of encrypted state transitions.

Transcript

cool I believe you're not recorded uh hi everyone my name is uh and came together with together with me we have Savio the speaker for today seven years from Aztec he's the he's the he's the product manager but I will leave the introduction to him uh before we start I would like to say thank you all for coming and uh a quick share a quick shoe of what was coming what's our biggest event that is coming up it's going to be ethereum Kuala Lumpur 2023 it's it's uh being organized by us the EPL team it's going to be an in real life hackathon plus conference event happening at the same time it's going to be on the 13th to 15th of October Sunway University the revenue is just amazing the chairs are fantastic we have received a lot of good feedbacks for the location you know past many events um you can join both as a hacker or as participant uh hackers are free limited to only 200 participants we'll do a pre-filter so that means we will want to make sure that the quality of the hackers are there that means not everyone is able to join the cycle unfortunately but everyone is definitely able to join as participant the ticket price is very cheap it's priced at 50 Ringgit myr which translates to around 11 US Dollars Samuel have you seen a better price than 11 per ticket or conference I mean there are probably some of them that are free but um the good ones are always a lot pricier than this so yeah definitely exciting thank you yes we want to make it for free but we also want to keep it so that people don't come for free food and feed swag that's why it's only in 10 11 US dollars is I hope it's going to be very cheap and it's very fun uh we do have a couple of confirmed speakers already uh caddy saw I will pass uh online speaker it's it's very supportive of the event caddy if you're watching thank you so much and we have people from Elio we have people from Quan stand the founder of etherscan is going to be here noses one sub a very famous uh figure in the CK space and we have uh zhen Yu Yong from referee Foundation from Red free off uh sponsors uh we have a confirmed goal sponsor already from Elio uh we have more will be announced soon uh but the event is looking good right now and um I'm done talking I would like to let servio take it away take it away dang yeah very looking forward to the event as well it looks very cool um but yeah let me try to share my screen and good evening everyone and that is joining live or good morning good afternoon to whoever um that is watching the recording I'm Savio I'm the product manager of um Noir The Secret Language um that we are building in NASDAQ um it's just great to um be here with everyone um thank you chi for the invite um definitely excited for the ethereum developer community that is um building up in Kuala Lumpur um it's been a while since I've been in Kuala Lumpur I would say it's probably like six years ago but I definitely still miss the um no she fun the the um kind of thing um in Kuala Lumpur um so yeah um definitely missed the plays and I'm looking forward to visit it sooner rather than later um if I get the chance but um today's talk is um a brief introduction as well as an overview on CK depths if you're a part of it more particularly on why what's how um do people write CK tabs um or web free apps that are CK tied and the lengths of the sites will be shared at the end of the speech so um don't hustle too much on scaling the QR code right now and just enjoy the top so a brief rundown of the top itself and we'll first go through kind of the pipeline to writing a secret app um following up with some of the components or technical thingies that are needed to manage our own private States um following to that we'll anchor the learnings concepts that we covered in part one part two into an example in part three and then following up with a brief glimpse of the exciting things that are both offered by Noah as well as that will be offered by Noir um very exciting journey and stay tuned for that so um let's kick start things with the pipeline itself um we might or might not have heard about like CK proofs and how powerful they are but um some of the um depths or apps or infrastructures that are CK based um you must have heard of them for example ccash uses CK proofs to hide away the transferies or the transfer amounts um happening on the blockchain itself to achieve private transfers um of private yeah fairly transactions um using CK proofs um if you are aware of this logo it's the Dark Forest one um as I say kind of MMO strategy game um based on web3 and it uses CK proofs to hide away like um Planet coordinates or or attack forces informations to achieve an incomplete Information Gain on top of a fully transparent blockchain and pretty exciting stuff so shielding information is one of the values that CK proofs offers the another one being it helps us kind of compress computations so for example CK is saying stopware uses CK technology to kind of compress and roll up transactions as well as like computations happening on the layer 2. and anchor that proof um on and there you want or if you are aware of like Axiom the project it uses CK proofs to um prove their computation of extracting historical ethereum States hence using CK to enable kind of a Oracle to the history of ethereum so yeah another value that is over it basically approves is the compression of computation that is and to fully appreciate the values that um CK proofs and secret technology offers um I think there's only one key mindset shifting that is required that is we are no longer doing just computations itself um like we are doing with like typescript and solidity rust etc etc but now in the CK world we are actually proving the computation so what do I mean by that um so in the case of like ccash Dark Forest we're actually proving the computation without actually reviewing what is being used to compute um the computation so for example in ccash we are actually not reviewing like the transferies on servers transfer amounts Etc um L byte we successfully computed and prove it and then generate a CK proof and for that for us that would be the coordinates the information um and at the same time we are also proving computation um that results in a proof that is nearly constantly for Revival and achieving the phone call compression of computation that applies to like CK sync applies to Axiom projects and projects that makes use of CK proofs for that property so we are proving computation but not necessarily just Computing things um as we used to in the phone called traditional world um and onto the actual pipeline itself it kind of looks something like that no worries we'll go through it by that um it often starts with two entities one being the approver the another being deferral value um and to kick start the whole pipe whole pipeline we usually pick from CK tap step I'll just use Noah as an example but there are other great ones out there as well Circle Halo 2 perhaps even Cairo Etc and with that tax stack you can write your program kind of in CK which will then generate a proving program and generate a verifying program that is run by the approver and the verifier respectively and in the previous side it would first execute the computation just like how things are traditionally ran on like computers smartphones Etc but on top of that the tech stack or the improving program will also enable the approver to improve its execution not necessarily just executing and that proving would generate a proof that is just like a large buy array or just yeah pure data so there's the proof itself which is then passed on to the verifier and the verb wire with the verifying program and the proof itself and then verify that the proving and the execution was executed either correctly or incorrectly um that's basically it before buyer would speed up that one or zero um answer and that completes the whole like CK pipeline or the CK workflow just to Anchor things a bit um in more details we can do a side-by-side demo maybe fine tune my screen Arrangement real quick um just to make sure we are Noise free so if we go back to the pipeline itself this is how it looks from a high level and in vs code and let's go zoom in a bit just doing this on Florida so we'll be making use of noggle now I'll go with the kind of CLI 2 for Noir to do things um related to the war but um let's start a new start a new project with KL um and if we go into each KL itself we will then see this for that we'll then see a source file and another file which is just like the config but in the source file we can actually hold our CK program that is and by default it simply generates a main function that takes an X as an input and Y as another input and asserts that X does not equal to y um that's pretty much the computation and then if we do generate the input files say if I put in one or two um as the inputs of X and Y and we run our group it would generate the proof itself which is um just a long string of hex data and at this point we have already achieved um the Execute order itself and the proving part itself that generates the proof and if we want to mimic our row as the fur wire we can then do logo for by P and if it spits nothing that means the verification is successful but say if we if we edit the proof itself um then that would not actually be a like valid computation or a valid proof and it will try to verify it and it will tell us that the proof is spelled to verify reason probably being the proof itself is either corrupted or it was maliciously produced and so it um it enables us to verify the computation itself um and that's kind of the role of the profile in this case so going back to our slide and we have then kind of just in the last minute or two mimic the whole CK workflow from writing on the wall program to execute plus proof to verify on the verify side um so far so good and what's actually the fun part of it of this pipeline or things that we can play with are playing the game of who the proof and who to pray about because um in fact the fun part is about approval and the verifier is often performed or executed by different parties and to make make things interesting and starting off it could be a P2P program where a prover is for example G the verb wire for example is me and on cheese and he could be say playing a game and generate a proof of um one game move that is making in the game and sending that proof to me and I can then verify that he has made a correct step without actually perhaps knowing some of the inputs that he was using to um making that game move or it could be improver could be a a user itself and verifier could be say a server or a company in this use case what would be interesting is for example the Never Dying traditional CK metaphor of using CK to prove your age being an adult and say if I'm going to an alcohol alcoholic online store I could be generating a proof on my local end about I am a legal adult in the country that I'm staying in but not necessarily reviewing what age am I at and send that proof to the verifier which is the alcoholic company and they can safely assure be assured that they can sell me the alcohol that I'm ordering online another thing that's interesting could be the another one um so for example the proverb could be the server while the verifier would be a local client um if you have heard about like Kathy's talk in last month here in ukl about ckml this could be a perfect use case for it where the approver AKA The Machine learning service provider could be carrying out their machine learning algorithms in a CK proof and then generating a proof that the request was actually computed and being like being computed on the machine learning model or the algorithm that they are selling on and generate that proof and send to the consumer actually proving that they have legitimately computed and the requests that the user has requested and getting perhaps the more interesting part the approval could be a server and a third wire could actually be a blockchain or a smart contract um actually this is pretty common right now because um all the CK Roll-Ups would be adopting more unless this model where the robot itself would be computed and executed on a kind of super computer or a large machine where um the roads are proof would then be submitted on ethereum layer one where the Verve is my contract would verify the state transitions on the row up but to the juicy part of today's talk about secret apps um the exciting thing would be having proofers that being local clients or local users Where the Fur wire would be the smart contract and the users themselves can generate CK proofs and interact directly with the smart contract so this would enable a lot of different use cases for example um blockchain unchain gaming for example on chain governance for example um hiring platforms Etc we can talk a bit more about it later but um this opens up the CK technology to every depth Developers for users to make use of the technology and play with interesting use cases ah to reduce cases themselves for example um battleships the team has spoke with us on building an implementation in Noir where um the game itself can be played on if I recall correctly either political and Mumbai or an evm chain that is um out by the fully transferring chain they can hide away the lead information themselves and mimic the traditional battleships games on the blockchain and Knox is a company that uses Noir and CK technology to build up a web free hiring platform for pseudonymous pseudonymous fans and at the same time Aragon has also been researching or using Noir to enable trustless CK proving that trustlessly testifies to your ownership of the voting token and but doesn't actually reveal who is actually casting that vote so yeah very exciting stuff um just doing a quick pause to see if there's any questions if not we can definitely follow on as well live coding that's not that's fairly coding it's just showcasing it seems like we are good but for those who want to ask questions I encourage you to put them down the chat uh so that um oh what was that so that servio can take a look into uh the questions and answer them later so so yeah don't don't be shy to uh leave the questions down check no worries thank you there will be a few quick process as well just to make sure we are have the time to digest um things being shared but yeah happy to answer questions if there are any any time as well um so so far we have covered the pipeline from writing to Noir program all the way to verifying it um as well as the potential use cases of um using a smart contract provider to enable like that use cases but what's the actual caveat behind um the question then arises is where do we actually store our private variables so for example in the battleships games um the ship coordinates in the voting example the folder themselves um or the oops or in noxious cases the the talents informations themselves those are things that we would like to keep private but at the same time we would like to store it somewhere web free so that the actual damp itself can lift fully trustlessly and decentralizedly but then at the same time evm doesn't actually understand or comprehend private States so how do we actually store private information in an evm this then ties to the CK depth workflow here where we start by writing the depth itself or the logic themselves in the war for example Dark Forest logic Knox logic Etc then we then deploy the very value on those smart contract chains for example ethereum and then we would have to actually manage ourselves the private states that we would like for our secret apps in order to complete the entire workflow of both executing and storing in a web free context which then adds this extra component to the workflow that we mentioned just now execute approved verify but at the same time the smart contract that is leaving on say ethereum will also have to carry out the management of private States so let's um go through what are the components um um that makes up of a travel State Management scheme um pretty straightforward I would say um just that um we would go through the slide to understand it a bit more so starting off um not necessarily just private States but also for every state usually local tree is a fundamental concept to how they are managed so at Virgo tree simply looks like that leaves at the bottom boiling up all the way to a root at the top um yeah leaves at the bottom and the intermediate notes in between the root and the leaves would be usually be a hash of the components that are below it so for example this intermediate node would be a hash of a b but then it just goes up all the way according to the same logic F being hash of CD and the root hash would then be a hash of the EF intermediate notes so the Merit of mergo tree is that giving inclusion of certain data would be easy for example if I would like to prove that [Music] um definitely lives investment country with we will then only need um the data of deep sea lifty as well as hash AV to actually compute and match the computation result to reboot hash itself doesn't seem that intuitive at this slide but um if we're working with a very big tree we can vary soon see the logarithmic advantage of managing States in this manner where we only need a subset of the information in between to actually prove that we own or there exists a certain data in this whole Mercury rather than knowing all the way from this page and say live c um to actually prove inclusion of data and the question then might arise if we are storing things on ethereum where everything is public how can we make sure things are private then we'll be making use of the concept of hashing where we'll be specifically making use of the one-way property of hashing One Way being well the raw data can be computed into the hash value but the hash value itself cannot be reversely computed into the raw data that represents um be fairly and we would still be sticking with the Merkel tree that we introduced this now but in this case we'll be adding a private layer um underneath the leaves themselves where um the upper half would be the local tree that lives on a public blockchain where a private part would live under um just to the knowledge of it uses so for example we have the raw value a to d with a hash them to the actual leaves that are leaving on chain on the Merkel tree and we then just hash things upwards and complete the whole tree and in this case everything stored in the public side would be fully hashed and and unknown to people that are not involved in certain use cases about the private values that constant that makes up the old Merkel tree itself and then the question pops up again if everything is private then how do we actually prevent people double Stand double spending things um that others might not know seems um rather unintuitive right that brings us to the third component to the management of private states which would be nullifies um we are still making use of hashes but in this case we are making use of the deterministic property of most hashing algorithms which means um if we are hashing the same raw data we would be getting the same deterministic hash results from running the hashing algorithm itself um so a would always lead to 0xaa rather than leading to a serious ABAB for example in this case then we can make use of the property to um combined with that hashing property we can also work with deterministic mobile trees so just now in our previous example we are kind of just inserting values to the Mercury arbitrarily through our liking but they deterministic deterministic Miracle tree usually is possible country that is very very um would bring about the property of the insertion of data to that mercury is always tied to a deterministic location that is only occupiable to that data rather than arbitrarily to um any point on the tree so for example if we are carrying a 0x AAA data and we would like to insert it to the deterministic mobile tree it can only be say for example inserted to this green box right here rather than um any other leaves locations or other boxes um that are on the tree so this is the deterministic version of Virgo tree that would be useful for composing nullifiers in a private security fan so how a nullifier works not something like this so on the left side it would be the normal value Miracle tree and that we have went through and on the right side would be the deterministic nullifier tree that we touched on just now and for example Alice currently owns a value a on the seller tree itself and Alice would like to spend his um very a value a um that is on the tree um she would then compute a deterministic nullifier and insert that nullifier to the nullifier tree which would then update the record of the nullifier location that is some tied to the value node a and if Alice attempts to double spend or value a um she would then she would then deterministically compute the same nullifier due to the deterministic hashing property of hashes and you will be attempting to insert the same nullifier at the same location due to the limitations introduced by a deterministic vocal trees and then the nullifier tree would then understands that the nullifier already exists and prohibits Alice from spending or double spending in this case her value note a so there's a sound number five helps in the CK tab to prevent double spending of private notes in the app itself so this would then complete the completer version of the pipeline where we execute proof on the Improvement side and on the verifier contract side we verify the proof as well as with the components that we went through just now we can also manage private states on the smart contract attack another quick pause just to make sure things are clear as well as some address questions if there are any I'll give it a few seconds and take a sip of water just to make sure people have time to time it out it seems like no one has questions um probably I train really well to have you thanks she um hopefully it helps and um if um people are having a hard time following on definitely let me know I can go through Concepts um in more details as well but um if there aren't any questions we can continue on the slides so with the concepts covered both on the CK pipeline as well as on the component setbackup of a private State let's tie things together with an example that is a private value transfer and proof of concept so in this um Dem not necessarily a demo but in this proof of concept the objective here would be transferring and a known amount of quote-unquote value to an unknown recipient but all happening on a web 3 basis or perhaps in an evm in ethereum and we'll be covering how it works from a high level and then on a Noir proof of concept code that we can share with you guys so uh if they probably transferred that we will be sticking to the local tree that we introduced this now as well as the um caching that is happening between the private and public boundaries and in this case the local tree will be made up of value notes that as an owner as well as a secret value to keep things secret where the hash shop denote itself would live in the public blockchain tied to a hash Committee of the private note and a value say some amount of yeast that is typed it is um and spend note that is living on the chain so let's say Alice would like to transfer five ether to Bob um in this case Alice would start by owning the value of a which relates to an ownership of five if either on this blockchains itself um this would be how the state looks like before and after the transfer there will be a new note of um for Bob that is owned by Bob of a value Note 5 and Alice's note would be nullified and no longer be spendable and this would completely um transfer itself and to go through the detailed steps themselves Alice would first set the proof that she owns the five either in this case it would be a Mercury inclusion inclusion proof um that this Hash A Deal actually exists on the Merkel tree as well as analyst is actually owning the node underneath which would require a bit of seeking knowledge to complete this um jump of proving between private and public and then Alice would also have to prove that the node itself is expandable in this case that means um there's not a nullifier that already exists on the nullifier tree at the deterministic location of um of her value node a and then Alice would have to nullify her own node which is inserting that nullifier to the tree at that position and deprecating the note that she was able to spend and she would then create Bob's note that is owned by Bob with the same value and in this case the transfer of value is completed um within these four steps so if you would like to write the Noir part of this step um brief reminder of the workflow itself [Music] we would be covering this part of the pipeline that can then be written in no office and this is how the Noir program would look like no worries you go through it line by line um but first we would be defining the main function in the Noir program which follows with the first input that is the recipient in this case it could be the address of Bob's water and then this proof of concept we are also using private keys to prove that we all notes as far as span notes so in this case we would also be inputting analysis privately and then there is the node root index node hash path that are the parameters for Alice's node node on the Merkel tree itself there's also a random secret that will be showing in to prevent Brute Force attacks on unauthorized expenditure of Alice's notes and then there is also the nullifier three hash Channel just to compare with some of trees and we will start by Computing the public key of Alice using the private key supplemented and we would then hash the node commitment that we would like to add on chain in this case that would be the public Keys as well as the secret value and we will be hashing it with the Patterson hashing algorithm and then we would be Computing the nullify which would be another Patterson hash of the node commitment itself and then the index that will be inserted in private key etc etc and we will also perform the Merkle tree membership check that is the green line proof of Alice actually owning the value node a and so we will be using the hash path the node commitment the node group that is currently on chain Etc to perform the miracle ship Miracle tree membership check and then we will be Computing the new Mercury root due to the insertion of the new node that is now owned by Bob which we've altered the ultimate hash that lives on top of the vehicle tree and return the recipient and in this case so that Noah program would cover the proof apart as well as the verifier part where the normal program can be executed on Alice's site and the proof can then be dropped on a smart contract or the depth smart contract that carries out the verification part of the value transfer from Alice to Bob and then on to the manage private State part and boom dive too deep into this because there's more solidity than Noir but we will start by Noir itself which fortunately comes with the capability to generate a solidity verb via contract and automatically according to the NOAA program that is being moved in for a ride will then expand that verify contract to a full-fledged private transfer contract that also manages the local trees not the wires hashing Etc and then we can deploy the food object onto ethereum itself and optionally compose it with other depths out there for example swaps for example I don't know 14 maybe um as as long as there's interest and if you guys are interested um the full code can also be accessible through the QR code link here um and at the same time the links to the site would be dropped at the end so um no hurries on scanning things if not already um so we've went through some code we've went through the concepts behind of an example as well as how things could look in the wall and the pipeline itself on how to complete um from writing our program all the way to deploying on chain so why have we been talking about like the war and War and War so much what's so special about it um that's also spend some time on how um spend some time on learning a bit about what Noir offers and why is it exciting as a CK Tech stack and to actually achieve what we have went through just now and before we hop into the language itself let's do a five second Spot the Difference challenge um and try to see if you can identify the differences between the left side and the right side being just the color that is behind and the knowledge of the side left side is actually a Noir program and the right side would be a rust program that is written in Rust this necessary brings us to in our opinion the most important value proposition of the war that is writing CK programs should be about writing code but not writing CK circuits like cryptographers do we do believe that CK technology and CK dap writing is um for everyone except perhaps the person in the middle of the IQ curve um but what Noir actually offers um oh do note that we are still in Alabama so things could be changing pretty rapidly um and we are actively adding features as well so I'm very exciting progress but yeah things could be changing but within the language Noah offers some primitive types so there will be integers bowling strings that you might be used to we do also have compound types that's arrays tuples and if you are familiar with Russ then there are also slices effectives that are more mutable or more Dynamic versions of a race and we do also have structs that is pretty common in all programming languages noise also capable of doing control flows if statements for Loops in this case we are doing an if condition and a 10 time for Loop within that increments the count the walls always operators so we can do comparative operations we can also do bitwise operations of Shifting things and Etc and a lot more um so they are globals there are logs there are commons there are modules that is helpful for organizing code etc etc um a lot of exciting features offered um within the language itself but outside of the language there are also very interesting things that we can play with with Noir starting with testes that can be written and executed in the wall itself JavaScript packages that could be extremely useful if people would like to develop secret apps that comes with a front-end comes with an application that is run that can be run on like computers mobiles web browsers Etc and as mentioned and the wall also comes with the capability of generating solidity for buyers of CK programs written in Noah which can then be deployed and composed on EVMS and complete the actual damp workflow of um a CK program written in Noir rather than just a app that runs in a web 2 context so if we return to um yeah this pipeline um the generation of disability for Via would be this part of the pipeline where um the proof verification can actually happen in Solitaire and on EVMS rather than just on local computers or service and some a supreme court of exciting stuff that is coming to the war or already in Noir um are starting with a rapidly growing set of community libraries we have community members building out back-ends that enables like curve operations or whatever applications that require spec numbers we also have this SP 256 R1 Library um it might sound cryptic but if you are familiar with like web 2 use cases or web or them that is um this would enable um CK proofs of for example a iPhone Touch ID authentication or for example Android authentications as well um web or fan is actually a pretty common authentication method in the web 2 space so this would enable us to tie that into web3 using 3K and there are also community members building out the EC recovery library that enables the verification of ecdsa signatures that is ethereum wallet secretaries um in the CK program and Aragon's team is also putting together the ethereum storage proof library that enables us to prove a certain datum exists on the ethereum history and for example we can prove that I own say announce nft at one point on the ethereum history or perhaps I can also prove uniswolf's prize was XXX during a certain time on the blockchain at a certain block Etc so storage proofs enables us to trustlessly prove that um from ethereum's history and then there it's also a RSA signature verification library in the world that enables us to prove for example email headers for example um signed git commits etc etc very exciting web to use cases that um you can then tie into web free using and more and another exciting feature that Noah offers this recursion um which just means a proof of proofs of proofs of proofs um to unlim uh to to Infinity which could be useful for saving gases for example um this is actually a a technique that could be used on say any roll-up contacts or perhaps even in a CK depth context where we can then aggregate all the proofs and recursively prove them into one substant proof that we actually submit on chain and since for a vacation um it's like roughly constant L by the number of proofs that we recursively moved into that final proof and we can we will be spending the same amount of gas but then we will be verifying a whole tree of grooves rather than just one proof and to begin with it is also useful for State channels or P2P applications or example in the battleships case um the player a could be making a proof about his move which he then sends the player B so you'll be you would verify that Uma was doing a correct move and generate a proof that he would like to make a following the previous round and they can ping pong between themselves um the game proofs um between rounds and between turns and at the very end only set to the game with one final proof um that is verified on chain um to complete the state Channel communication or the P2P game in this case the recursion would be very helpful and powerful and enabling that and one more thing um so far we have covered that Noah is capable of handling this part of the things and we would still be required to manage our private States but what if we no longer have to worry about like there are plus the Privacy level three plus nullify as possible three plus whatever solidity business logic that we have to build on top of it and we can just write one elegant to ask my contract in this case um the future that we are looking for it still is on enormous contract that not only handles this part but with a chain or an L2 that adopts no RSS um as a smart contract language they can abstract away all the private State Management components um behind the scene itself kind of like how um smart contract developers only have to deal with solidity but they don't actually have to deal with like work or producer tries vocal tries that actually live beneath the hood and evm handles all those smart contract data in and this would be the protocol V2 of CK test so from version 0.0.9.9.

0 of Noah onwards um we can already write an awesome contract and compatible with the smart contract apis which when deployed on a compatible chain for example the Aztec roll-up that is soon coming um we can directly write everything in the war and enable a complete CK Dev workflow um fully and easily ignore and just as a final sneak peek of that interesting feature this is a CK token that is written in Noir where you can then see both of them most of the things are the same for example the importing of libraries that's just the same thing with um with quote-unquote normal Noir OG Noir but then we will also have Constructors like soluti and we will have let me see do we actually see that I don't think it's actually available here but we can also add um Define things as like public variables and private valuables that are stored on chain as well as in say utxo formats in value note formats things like that so yeah exciting smart contract in the water that it's done if you would like to get started um I would definitely recommend awesome Noir as the southern resource um they are a great bunch of talks workshops sites um that go through the language itself or tabs that are built using the language there are a lot of like developer toolings as well um vs code extensions boilerplates libraries um oxs on there and there are some projects that are written in Norway that is linked on there as well if you would like to prefer reading code rather than reading words definitely be my guess awesome Noir has it all um and yeah just feel free to refer to it if you would like to learn a bit more about the language itself and this would wrap my reef sharing today about not just the CK Dev pipeline but also a bit on like Noir how it actually helps tying things together as well as being a means to enter the CK World um and yeah write awesome depths for our users and have to take questions if any let me see oh uh it's okay um what we will do now is we'll do a quick fireside chat and then we'll answer all the questions Most Wanted by me some other people fight chat fireside chat is basically just a quick way of getting to know you as a speaker and I will start off with one simple question like uh tell us a bit about your history and how do you get into web free and how do you get into ZK wow that's that's a very long question um I actually got into web three I remember now I actually got into web screen because of um how big of a gamer I was um I was actually a huge gamer fan that checks out literally pretty much every game that was released um in the market back in the days um and one of the games that I came across was Gods Unchained which is a trading card game um that uses nfts as a representation of um like virtual trading cards in the digital digital game itself back then it was leaving on like ethereum mainnet so it doesn't really make sense to um play games and draw cards on there and now I believe they are living on the immutable weeks emporical correctly so um should be a bit more economical to actually pay through the game um but yeah I found the use of like nfts to represent digital cards really fascinating because um um what came before it was like half stones or Magic the Gathering the digital version that is those kind of games never um truly shows the value of like ownership of headsets as well as um openly tradable versions of um of um digital cards that we used to have in like physical card games and using nfts to represent those pairing it with like openc or whatever open market out there um kind of successfully mimics the physical play through um but now on a web free context or in a like digital context which um was pretty amazing to me and so that's how I started getting myself into the rabbit hole of learning about like what nfts are what erc721 or sorry um yes it's one since then and so it's like what ethereum is bitcoin is smart contract s Etc and then fast forwarding for like a year or two from that point and then kind of have a good grasp of where the space is and starting to see the pain point being first in privacy that everything living on ethereum fully publicly doesn't sound really right to me and at the same time on throughput as well because ethereum can't actually settle that many transactions economically for a lot of people if we are in this anticipating more to join the community so at that point then um there are a lot of like talks as well as chats about how CK could be a solution for both so that's kind of the point where I started um getting into CK as was learning a bit about CK and coincidentally I actually came across the CKU course that well she you were in there but um Kathy that was the speaker last month actually hosted and coordinated the whole course and yeah that was the kind of kick-starting boost to um to my seeking knowledge as far as um getting my hands dirty with coding CK and then leading to my position now in Aztec on the zika language that we're building so yeah kind of an exciting journey I would say thank you Shelby I I thought to all everyone is something I feel to mention that Savio was one of my mentors in my court I think seven graduated one of who calls earlier than me and he was my mentor during that zku study and there's a question we have let me just jump straight to the kind of question uh by us majafar if I want to start learning ZK and blockchain you see where should I begin uh and then a quick background by you Savia were you a developer or were you a community science student back in uni oh I actually came from a mechanical engineering background so the only computer science course that I did was an introduction to python during my four year in University and that was that um so yeah I kind of Glimpse over the details but in between I also spent some time like self-learning about computer science um to get myself at least being able to talk to the purpose I won't say I can write good apps at this point but um yeah at least I know a bit of the concepts there so um to your question um on starting to learn ckm blockchain so I would say learning blockchain would probably comes first I would say there are a lot of great resources online already about blockchain learning um both like written in text as well as in code if you are interested in learning that and we can focus a bit more on learning CK I would say CKU could be a great resource um the course program outline is actually opens or open to access from everyone but I recently also coming to learn about CK camp let me see if I can actually search that up oh yes so let's say I have cohorti thing that is run by freeze which used to run like solidity educational [Music] cohorts or bootcamish things but they have been my internet Subs but um they have been writing some pretty great blog poses on this website as well and they are going to do a CK cohort where they will then be open sourcing the educational contents that is covered in that code one so I would say stay tuned to whatever resources that they are releasing it'd be a great way to get yourself familiar with CK as well as in the application of CK and um in the Westfield context as well so yeah feel free to check them out cool I hope that that helped you uh us majafa uh and a bit of a more Noel question uh something I I just decided to skip all the questions and ask this question first because creating a language is something creating a DSL in this case Noah I believe is a DSL is correct me around servio okay right yeah all right cool uh so um that that also means that there is a need for developer to pick up a new language with the Advent of so many languages now the music space we have Circle we have Cairo and the stock net committee is doing so much to get people to learn Cairo uh does expect Aztec has a problem getting people to learn more or any other efforts besides uh you giving talks and advocating Aztec do you guys have like a program like a boot camp or like a hackathon so how what is a stack strategy into pushing Noah oh that's a good question so um the CK cam thing that I share just now um they are looking to start in one cohort so um feel free to register for that if you are interested but at the same time yeah we're also doing quite a lot of um stocks and workshops around events as well as online um on like just Noir education as well as on sharing um things regarding the war um we do also have hackathons but the next one would probably be in Istanbul with very cool correctly I'm not sure if we are going for ethos or but if not then yeah Istanbul would definitely be the um next hackathon venue that we'll be hosting links um and we do also have a ground program actually so if people would like to build out things or try things in a while feel free to try apply through my colleagues will be reviewing them and if you find them interesting we will be um working with you on the ground as well to help you and go through the hiccups um and learn through things but um the I would say the most important out of all actually with the the more Discord that you can find the link within our jobs only not publicly so if you do actually read out dogs you'll find the awesome community that we have on Discord um it's very close touch very high signal um pretty much developers only at this point since we are hiding the link in our docs but yeah people are always sharing great insights on there as well as on like tips and tricks on happy with Noir there so um yeah if you manage retail jobs feel free to jump in and say hi this is a massive Alpha for those who are watching till this point including for me I would definitely catch a link out so so yeah that's really cool uh back to a couple of more questions which I I have uh I do understand that you you had a nice comparison of um two functions one is no one was Russ at the point of time I was looking through it I was like aren't they exactly the same and that's exactly what you want to point out right you want to show that no one is exactly across and people who already know Russ would have zero difficulties in switching between these two languages is that that I think that is Noah's a principle idea yeah yeah and we actually do get asked a lot on why building a like language at all if we are just doing rust like um or what Russia equivalent um the short answer to that is that it's just a lot easier to communicate both progress as well as on like what are the caveats or different things um to other languages if we build a language our own um so for example um when I talk about like features I talked about arrays tuples oops skip through that slide I talked about how we have arrays two pose slices factors etc etc but if we if we are just like a month back we don't actually have sizes we don't actually have factors we only have like arrays and two posts and structs if I recall correctly so if we do have our own language and we do have our um out before that um coding things in CK is actually very different to just building things in say rust remember we are not just Computing things but we also have to constrain and prove the computations themselves so a slice in the war and by looking the same in Ross doesn't actually work the same behind the scenes because we are not just executing the slices but also constraining and proving the computations that are carried out on those sizes and so um with our own language with our own documentations with our own resources it's a lot easier to communicate where we are at um to the 100 Ross progress bar on for example now we have a race now we have two pools and when we have sizes we can add in slices when we have factors we can announce that we have factors etc etc so communicating progress is one thing the another thing that perhaps fits into the middle and longer term it's about the differences that will be in the war and rust so Noah itself is just like but it's never going to be rusty equivalent um that's partly because of like how things work differently in CK so for example if we talked about primitive types um L by our recommendations you'll always stick with like integers but there is also the field type that is in the wall that is kind of the Native type in CK that is dependent on the improving back-end that it uses and the cryptographic curve that it uses um so for example with the um Ultra Plum improving back end that comes by default a field type would be a 254 bit integer but if we are using a different proofing back end it could be 11 but um field itself is the native Seagate type that exists in Noir but not necessarily in Rust and at the same time we are also adding in um smart contract capabilities as we mentioned and in that case there are smart contract syntaxes that would never exist in Rust as a general programming language but would make a lot of sense to include in Noir for developer experience for just more intuitive code reading and coding so for those reasons um that's why in the war um itself could be an interesting feat to um um be in the market be in the be in the space just like how we need it solidity for smart contracts um the work could very much be justified um as we need CK so yeah that's pretty much the reasoning behind that's a great answer as expected from product manager working in or I do I do have a couple of things to point out and ask like you mentioned that uh slices are basically synthetic sugar over you declaring some variable and constraining it so the user the the developers using don't have the thing about the extensions behind the scene so I'm wondering if there is still a need to write constraints for example if you're performing maybe a square root of um maybe maybe external of a very complex number at this point of time it's basically much easier performing the reverse and then constrain it so that the the output of the square root is constrained so we'll be able to do the same thing you know and how does it probably look like so in the war itself uh whatever so for now whatever that you write in the wall by default is already constrained behind the scene so in your example since this is a kind of a simple optimization I believed in our compiler would automatically optimizes that step as well as um on straining that step as according to how you described it but um for both Advanced um ways of writing logically Noir um with the 0.9.0 release we are also offering unconstrained functions so people can actually hopefully only Advance users that knows what they are doing can then write on constraints and executions within Noir that doesn't automatically get constrained but then they can lay out the constraints themselves for those unconstrained code excerpts and in order to achieve like more complex optimizations for the programs or for their logic and that would be kind of the like Advanced side of things um but yeah by default everything written in the wall would be already constrained behind the scene nice so everything is very safe to use meaning that should you write it normally without doing some fancy operations that like for example the one I'm saying about it's very safe and everything should be constrained I exactly yeah nice this is a very cool feature to have and uh the unconstrained final feature reminds me a lot like the hidden part in Cairo which is something that they now don't do not allow people to do it by default and I'm happy to see that Noah has it and I will do it in our uh I hope that no one uh from Kyle started listening to this yeah like Vines think I like that is super important right and uh yeah I do personally have a couple questions uh we got 20 plus minutes plenty of time I hope you have time to save you uh so in uh in Russ one of the things that people find a bit weird is that there's there are things like lifetime there are things that you need to drop uh there are things like dropping uh the the reference the things like referencing immutable reference are all all these Concepts uh available uh present in NOAA yeah at this moment I would say they aren't fully present yet but we are working on getting those into Noir just to make sure we complete kind of the feature set that is um offered by Russ and enjoyed by Russ certainly it's um comprehend but um they are definitely useful in the programming context as well so fingers crossed then we can do a better educational effort than Russ's stocks or materials and we can actually get those um Concepts boiled down pretty clearly for users um to yeah actually take advantage of them instead of getting annoyed by them through and uh that the concept of Trades and impulse are also very um very rust-like does Noah has those traits and impose because it's nice that you have a trade and you can just implement it and stuff like that we don't currently have it yet but we already are working with a team to introduce them so um yeah soon trademarked nice I'm asking very good questions here and I'm proud of you uh and you mentioned out reply being the proof system under the hood uh and I I learned that Noah's basically is a language like it's a front-ending language that supports a variety of proof systems uh because the compounds down to an IR and IR only needs to um support whatever proof systems it uh it um it runs under the hood correct me if I Wrong savior good I'm right fantastic I'm happy that I'm going right have anyone implemented any uh sort of other proof systems aside from alpha plan yes um there is and there was um so at some point we actually had the Marlin backhand as well as a general artworks backend if I recall correctly that works with um the intermediate representation and the wall itself we kind of deprecated those um since we are shifting Focus but at this point there are also two teams working on one um the knock back end that is built by consensus or Canuck if you pronounce the G and there's another team that is also working on Halo 2 integration with the Noir Tech stack um so if you actually go to right he loves you back in this repo I kind of see here already in my head I was like someone to write for Halo 2. it was Halo 2 it's just so hard to write in Russ actually not hard but very difficult yeah that's what we have been hearing but people do miss the like performance stand in office so I'm hoping tying it into Noah will offer The Best of Both Worlds but um yeah there's the team that is working on Halo 2 integration I believe they are aiming for pse's flavor 802 first but they are also working on like axiom's version in parallel so um yeah exciting stuffs ahead as things happen to hit indeed and uh how does lookup tables look like in a version of Halo 2 that's I think Ultra Chrome probably supports lookups right because Ultra point is one of those new plan and long uh advantageous local tables how does lookup table look like you know how do you declare lookup table that's a very good question um so right now we don't directly expose um the lookup tables themselves but if you define a dynamical array in the war in behind the scenes it actually makes use of look up tables already so yeah we can kind of mimic it as an array um in Noir rather than yeah defining the whole table itself so interestingly you try to mimic uh lookup tables using array but why not you mimic using Maps or mimic using mappings without those make more sense I know you're probably you probably know more and I just I just randomly throw questions to you but wouldn't Maps make more sense because map is like look up as well yeah that's um a good point perhaps we would be introducing Maps as a syntax slides down the road but um I would say immutable arrays are kind of like Maps I guess so yeah let's see um right key values yeah we can definitely think through that as well yeah maths could make sense cool I wanted to see my limited contribution list should not no no no uh fantastic all right uh let's see what other questions obviously asked a ton of questions oh um you mentioned that storage proof library is being written or has been written uh by our Direct on team would that effectively put XML of business and uh he's done if you're listening to this episode um Axiom is still a bit ahead um than us too so the library itself currently only proves the ownership of a nouns energy is kind of hard-coded as well as I'm tied to certain smart contracts Etc so right now I want to improves is a nouns ownership at a certain block um and that's pretty much it um and we managed to generalize it a bit then we can do yeah generous voicethrews of things but um I believe Axiom doesn't only do storage proofs they also do account State proofs or yeah there are a few different trees within ethereum and they do approve some all of them and in this case it is only storage proof so by Future set we are still pretty far behind as well as on like developer experience since they they are focusing more on exposing those as a kind of solidity API you could say where people can directly call through smart contracts where in our case we are still like verifying the proof on a in a solidity environment and it might require quite a bit of additional Works to um and make it as friendly as um as axiom's text but um I would say the interesting part of like ethereum storage truths in Noir would be how composable it is with other Noir libraries with other Noir programs um and you can actually suck it into like different depths written in Noir rather than yeah just calling it on solidity in axiom's case so um they're kind of serving different needs help by originating from the um same technology that is thanks for clarifying that basically I go and the question uh how how are witnesses being written for uh Witnesses being our private inputs uh in a in uh in Noah because we know that right your private input and how do you like oh so so without the pop keyword it will be a private book but before is that what we're trying to say Yes um so if we look into the example code that we shared you could find some of the inputs so I defined as up and some orange so by default things are always private unless you declare them as Pop which stands for public and in that case the input itself would the input value itself would be incorporated as well as tied into the proof that is generated and so the first value can access those public inputs as well as return values um on the verifiers time not just on the previous cool I'm going to jump ahead to some other people's question because I'm asking my question uh Victor asked which ckvm is built with Noah or which chain is building or anyone uses Noah to build a roll up for now wow I would be looking forward to that but at this moment um I don't think any EVMS or chains are built with Noir there is a ckvm project um that is more of a like experimental thing rather than rather than um legitimately building out the chain in the world but um yeah definitely looking forward to seeing that being built in Noah if if someone is interesting today you check that out and think of how it looked like uh I would think of it later uh so actually speak up with uh speaking of ckvm now this is a really question back to my question again uh stop building a language itself is be let's be honest it's not profitable we need to convince people use it uh uh you people don't like uh you cannot that's not business model in building a language so what is the the plan or goal of Aztec to build Noir like I I know I expect from from building a language I know that Aztec is trying to lay some brickwork to building something could you perhaps exposed to us or lick a bit of a alpha if we didn't knew what you can say about Aztecs go using Noah the juicy 100 million question huh um so yeah in fact building simply building a language itself um would not really make sense as a business model but in our case we are building the war as a both proving back-end agnostic language as well as chain agnostic language once it um is extended with spark contract capabilities for the bigger purpose of growing the entire CK Pi because um we do see how kind of limited in terms of like the CK talents CK developers CK dabs that currently accessed today versus what that uh what the technology can actually offers for the Becca public or people that might not even have heard about web free at this point so um kind of aiming for aiming the war as a kind of public goods as well as an asset as an agnostic good would be helpful and just growing that adoption growing that snowballing effect for the Becker CK space and in Aztec's point of view um so we are our main business or the baker engineering team apart from the Noir team that lives within Aztec Labs is working on Aztec developer so that is the L2 that supports not only um public state public States like ethereum like um no offense stock net like CK sync but also private states that enables the very different design space um CK devs could tap into ones um ones that is a bit more intuitive to work with as far as people learn about it so s tap would very likely be the first roll up or the first chain that adopts Noir as its stock contract language and yeah at that point we'll be competing with whatever chains um that would like to I don't know as as this language and hopefully Aztec and deliver the best developer experience and um and succeeds from that point onwards very cool and that that pretty much answered Victor's question which is weird with Noah we won't be CK event but it will be ZK VM that's really normal it's going to be by the extract team right right Savio that's what you guys are planning to do yeah yeah at this point we're still building things like C plus plus unfortunately but yeah down the road we will probably be integrating more tightly with um Noir not only developers are building um using Noir on that ckvm but also that ckvm could be partly built down using the wall itself as The Proven language so yeah cool before I jump onto my final question I have to I have to ask we are we have seven minutes away we pick up time one more I don't I do not want to uh ignore Harris's how Rich's question he asked can I incorporate ZK use cases into small business usually like FMB I'm going to take that because it really depends on how you want to use it in the context you definitely can use DK everywhere it depends on how I'm going to use it so I'm not going to let stop you answer this because this is the way your cancer is unclear but you're free to completely free to clarify them in a in a question in the message box and I'm more than happy to ask them again oh but he left so he can clarify so so okay back to my question uh you mentioned ZK depths and uh and you mentioned also mentioned theorem being a public State uh public State chain and that's like uni swap like a lot of swaps they are very easy to be done in the public space because they are they're storing this the storage route and then um people are able to examine the states and perform whatever soft they want like how will this look like because we won't we won't be maintaining storage rules anymore how will this looks like in the world of Aztec where there are private transactions private decks or has this all been thought up already or not yeah that's a very good question we actually spend quite a bit of time last year um thinking through that and the takeaway from that kind of brainstorming is that we don't we can't live solely as a private role but we have to live as a hybrid grower that supports not just private States but also public States whatever that is needed so for example in a token swap scenario if everything is public it's easy to do like um I can directly support the units for pool and someone can directly form with the uni support pool no problem there but if everything's private how do I actually know for example the price that I'm shopping with how do I actually know the liquidity that is available that's purely impossible um and the beauty of secret apps would probably lie right in between of that Spectrum whereas some of the variables are public some of them aren't so for example if we're doing a CK token swap the price itself could be public the total liquidity who would be public um depending on the design but then the actual swappers themselves could be private um that would make things a lot more interesting so I could privately swap either to usdc successfully according to the public market price but not necessarily reviewing that I am the one that is swapping as well as if I'm sending it to another address that another address wouldn't be directly associated with that trade as well so um yeah that would be how a private swap it looked like say on Aztec or whatever hybrid production is out there another question follow question on for mine is that uh what if you let's say that this price has to be public because people kind of not need the low price liquidity I don't know yet probably has to be public as well but wouldn't you be able to infer like the amount of token being swapped because the price and liquidity is public and then you make some math and then you infer that oh this guy is swapping how much token to that token and because the address not be public it has to be public because it comes from the address uh I don't know if this has been thought out or or before or something that I something that's even worth asking what do you think yeah that's very true um so the amount itself could be a public information I'll buy in every specific swaps but the swapper itself would be private so fundamentally um things could be private um assuming that the user is like um careful enough not to swap like very unique amounts that is only tied to um his or her deposit under the chain etc etc and that part of the Privacy equation would probably best be solved at the like front-end interface and level that reminds users about like best privacy practices as well as perhaps guiding them through those processes rather than having them to stand up bring our own thinking through managing splitting the traits traits into like sums or 10 succession Etc but um yeah fundamentally you can be kept private and albeit the amounts being public it's kind of similar in the voting scenario as well so um for example if you would like to do a private phone there are two ways to achieve that either the amounts or the or the direction that we are promoting yes though is um being kidding from public or the photo themselves can be hidden from the public and hiding the amounts or hiding the the folding preference could be tricky unless we incorporate like homomorphic encryption etc etc that we can actually tell you results um um in an encrypted format but if not then the approach would usually rely on to hiding the photos themselves Now by um being known like a yes vote was casted and no vote was casted Etc so yeah actually actually just point out a a problem that I'm trying to solve regarding voting and homophobic Christian is something that I'm wondering if Noah has a library oh right so I won't say we have been out of the box library for focusing but um the Aragon spiritual research on the ethereum storage truth is actually um a part of the bigger research on doing trustless private voting um on the ethereum so but in addition to that we do also have the Noir starter repo let me find that oh no no assaulted in raw example video um and in there there is a voting there's a voting example if I recognize oh yes Foundry voting um it's a like basic implementation of voting um using Noir um voice that showcase and proof of concept rather than rather than before fledged app itself but yeah if you would like to learn a bit more about um how private 14 could be done this could be a good starting point and moving on to Aragon's research we can read through the whole proposal as well as on their progress reports on understanding the minute details the technical conflictacies regarding private supporting but yeah well thanks for sharing and uh sharing a lot of good resources uh there are some of them still left but I'm sure there are a lot of people who's going to watch the video afterwards any words that you want to say to our viewers about Aztec about NOAA uh how do you encourage people to get involved how should people get involved yeah take it away um I don't really have any great advice I would say just in a short answer um don't fear about CK so so far we may have heard about like I've learned Ross how to learn about circuits and actually if you do find like CK courses online a lot of them are very math heavy very cryptographically heavy um and things could look scary I would say we are no longer in that historical state with like Noir with like Aztec as well as a lot of great shootings out there we can actually write CK programs fairly easily um just like normal programs but then we can tap into the CK values advantages that we have been hearing um so far ourselves so yeah get hands dirty and try coding drop a feedback to Savio and the Discord Channel and I probably probably these are things that the normal desk would like to know right that's that's from the comedy like what can be improve and whatnot oh sure for sure yeah or even a p i don't know if you guys uh uh would would uh would welcome uh public contributions yes definitely um if you would like to support and submit an issue fully appreciate that and if you would like to submit that PL really appreciate it for that as well and if you would like to join the team definitely check our website and find the openings there cool you guys are hiring too uh I don't know you do you want to open a page to let people know that your guys are hiring more than happy for you to do that if you want yeah we are hiring um if you go to estec.network um and go to the careers page you can find the open rows there I believe we have a at least one opening for yes we have a compiler opening I'll buy a bit um focused but um we have other openings for the Aztec teams I believe some are coming up for commercial teams as well so um yeah stay tuned for that and to apply away if you're interested so that probably sums uh we are at 9 32 both our times and uh I took I took one half hour away from you already servio and I'd like to thank ex thank you so much thank you so much for sharing all these very useful details I personally about Noah I'm sure many of our listeners uh learn a lot too thank you so much uh Victor says thanks uh said say thanks thank you so much and I appreciate it any last words if not we shall call it a day um thank you all for um bearing through the talk and thank you for the invite um fully honored to be here and sharing things with you guys um definitely looking forward to the mutual sharing as well so definitely let me know if um interesting things are happening in your circles not just your Chief and also everyone on this call as well as everyone that is um watching the recording thank me on telegram on Discord on Twitter whatever I'm happy to connect yes and I will also include the slide link which uh Savio has shared with me before the the talk into our uh if KL telegram group uh savvy are you in the group ready if you if you want to be in group I can give you an invite and people can ask you questions uh sounds good I'll do that and we'll also include the this slide link into our YouTube description which will come afterwards because it's not being recorded aside from that I hope everyone had a great day Sarah you have a great day if you have not had dinner please go for the dinner and I'll go for dinner myself uh thank you everyone and I will see you guys in the next one thank you take care you too thank

Automatic transcript — names and jargon may be misspelled.