How and Why to Build a ZK-Based System w/ Jason Morton (ezkl)
26 Oct 2023 · 1:04:32
Rex Kirshner talks with Jason Morton, developer of EZKL, about the challenges of building functional zero-knowledge systems where a single mistake can be costly. Morton explains how EZKL takes a high-level program description and automatically generates the components needed for ZK verification, letting developers focus on applications instead of the underlying cryptographic theory, and discusses the broader resurgence of interest in ZK technology.
Speakers
Topics
Transcript
[Music] hello and welcome back to the strange waterer podcast thank you for joining us for another great conversation building anything related to zero knowledge cryptography is incredibly challening Ching forget about the already huge task of building and deploying a working product in a space where a single oversight could easily be the next nine fig hack you need to implement the most Cutting Edge esoteric mathematics ever invented mathematics so new that even last quarter's ideas might be considered
last generation today's guest is working on addressing this problem on abstracting out the implementation of ZK cryptography so that Builders can focus on building applications instead of waiting through Arcane number Theory Jason Morton is building ezk or Ezekiel to make creating and deploying a ZK prover and verifier as simple as possible e KL takes a highlevel description of a computer program and builds out all the components you need in order to make it verifiable via zero knowledge if you have any interest in ZK
from passing curiosity to already building a ZK powered Empire this episode is for you first Jason will help us understand the context that has created the Renaissance of activity in ZK that we have today then through explaining Ezekiel he'll sketch out what a ZK based system looks like and how it's implemented and finally we end with a huge conversation what is the purpose of ZK and what kind of world does it enable already excited about ZK get ready this episode is going to show you where ZK is going one more thing before we begin
please do not take Financial advice from this or any podcast ethereum will change the world one day but you can easily lose all of your money between now and then all right enough for me let's get to the conversation Jason thank you so much for joining me on the strange waterer podcast great to see you re so before we like really dive into the ZK cryptography um I'm a huge believer that like the most important part of every conversation are the people in it and so um with that as a frame can you tell us a little bit about like who you are and um what brought you into the world of
cryptography yeah so um I was a math professor um until pretty recently um and so what I studied was applied algebraic geometry uh so you take things like deep learning models um and turn them into systems of Pol nomial equations that started for me my first paper about deep learning and systems of polinomial equations it was in 2008 when deep learning was still not even on gpus we were trying to already study the math of it and then I got into the stara program where we were trying to trans to do this transformation and the Dara program my role I would characterize as these deep learning models are working great in practice but do they work in theory which is a problem that for the most part nobody cares about right but
we found it interesting and so worked on that and then that kind of got me into thinking about circuits and what I described is turning this into a system polinomial equations is kind of what we call arithmetization now in ZK um and so I was thinking about that a lot from from different angles not from a cryptographic angle so I had I was sometimes on the dissertation Committees of people that did cryptography but not myself a cryptographer and then for me a separate thread was kind of cryptocurrency um getting into Bitcoin getting into ethereum um I lost money on GX to start and then very back in 2011 so that was a big zero but it was still really cool and then uh got into ethereum around 2015 when it was when it was new I'm very excited about that um
and actually that was the same time I learned about xal proofs um but didn't really put all these threads together until relatively recently with sort of happy Coincidence of things coming coming coming together yeah and I think um the the more I like talk to people in this space and especially like to people with the academic background in the space the more I'm realizing that like what is truly special about crypto outside of like the the math and the applic and all this stuff but what's happening in this space is that like Theory and academics are touching like the bleeding edge of innovation and Company building in a way that is um just like never happened before it is unbelievably exciting no I
mean one of the things as you know as a mathematician right you try to do I was an applied mathematician so you try to do work that matters and and usually your application is kind of like well in theory this could eventually impact you know this area and here it's like you go off and do some math and suddenly your system is 50% faster or you know 100% faster and it makes an actual difference in terms of what people can do and you have people kind of like clamoring to use it and that kind of you know immediate translation of do some new math and deploy it is is incredibly satisfying yeah I um so like my like my near crypto origin story and then I missed it for 10 years was um in 2012 I
I was studying computer science at Stanford and I had read the Bitcoin white paper and I thought like I mean kind of cool like computer money for computer money sake like whatever and I was in intro to number Theory taught by Professor Dan Bonet and I sat there thinking like why did I why did I challenge myself on this this is so and you know his like end of the quarter um examples were all about Quantum cuz at the time like cryptocurrency weren wasn't really a y just like flashy sexy thing and so um I you know I I left I went and worked for in you know in like the beer manufacturing industry for 10 years or for 5 years and then I did bunch of stuff that uh eventually I
ended up back here but uh I was just the same for blockchain conference in um in September August and um yeah I mean it's just like oh a small world but um yeah no I mean I was just sitting there like literally watching professors read out like what their like students were finding in like new algorithms or like new whatever and then watching people like try to form you know it's this direct interaction and you know I fortunately like 10 years later I got this moment where I was able to meet with both uh Professor Bonet and Professor um David C and both of them remarked on they they've been the same comment where you know first like I
wrote a paper in this realm and like within 6 months it was a company and I thought that's cool that's a fluke and then it it was after it happened the second time that I realized like okay there's something very interesting happening here and so um yeah you're the first person since that's happened that uh would would be able to appreciate a comment like that so I'm happy I was able to share that story but yeah there's something like pretty crazy going on here it is it's really crazy especially I'd say that one of the interesting things that's happening in cryptography driven by blockchain even though it's not necessarily always connected right the research that's happened in ZK and stuff is that it's happening so quickly that sometimes people don't even have time to write it into a paper right it's it's the paper is kind of by the time you write the
paper it's it's so out of date that you know has cut up with a bleeding edge and I mean that's great and exciting it's also slightly dangerous because there aren't as many eyes on it you know on the other hand once you once you throw it into a production system in some sense you have lots of eyes on it you have lots of you know volunteer Auditors let's say uh that are out there trying to find vulnerabilities so um you know that's another form of peer review as part yeah hackers hackers are part of the ecosystem too right but um as per your comment as as part of your origin story of like you are interested in the problem of this works in um practice let's make sure it works in theory something I was so struck by uh listening to the starkware guys kind of
like read out about like where they are and how far they've gotten at um Stanford blockchain conference is like some of the breakthroughs that they're making right now now are like being able to like mathematically prove that the system is secure and like you hear that and you're like wait I'm or sorry not even secure but like performing or like all of these things that you thought like oh my God like I I can't believe we didn't know this yet and it was like well this technology is so Advanced it's coming straight off of you know like academic papers and into practice and um you know it's it's it's crazy here so um anyway let's uh let's go back to our story so we were talking about um in the first time you heard about ZK so like
talk to me about that yeah the first time I heard about ZK was actually yeah at an Air Force meeting in 2015 a research afosr meeting because I was working on some Quantum distributed systems algorithms and again with Quantum um so uh yeah and I heard about it and of course at the time was mostly talked about as probabilistically checkable proofs and it was mostly talked about in this context of um you don't trust the server right and you want to you want to Outsource your computation to Amazon but you don't trust that Amazon will do the right thing and I think at the time you know the overhead was so enormous and it was hard to make a case for that because you're like well if we don't trust
Amazon like we're done right and we have to turn off 30% of the internet or something right I mean it's it's it's quite a disaster um and so I think that was hard for me to understand but then I think in the of course the blockchain then the the asymmetry um starts to make sense we're saying that is of course zero knowledge proof lets you take computation for one machine pull it to a different machine and then the first machine can trust it and the analogy that I like to use is um it's it's more than analogy so an example of a zero knowledge proof is is a is a digital signature like ecdsa right I I put in some um message or the hash of the message I have a private key I run this algorithm that everyone knows I get out
a signature uh for that algorithm and then anyone can check that signature and believe I really knew the secret and I really signed this message right and it is also Pro because digital signatures are also probabilistic in the sense that you anybody could match on their keyboard and have a chance of guessing satoshi's Keys it's just a really small K small enough that we don't care about it right and so I think what people really get that okay it's not just probabilistically checkable proof it's it's uh it has the similar security properties to to a digital signature that it becomes much more interesting and of course the Zer knowledge proof you take that signature algorithm and you can replace it with any program and that's that's really exciting um so I think in order to justify the overhead though you know you need a big
differential between a weak computer that's Outsourcing computation to a strong computer uh and it has to be economically interesting to pay for that proof both in terms of time and in terms of compute um and so I think the first place where that asymmetry was enormous is when the computer is ethereum and you're trying you know which is This Global computer this like power of the smartphone extremely weak and your and your your powerful computer is your laptop or even your phone relative to you know relative to ethereum um and so that that asymmetry started to justify it but now that the the the overhead is coming down really fast so for us we've
we've seen uh improvements of by some measures 200,000 since we got started uh and 200,000 times rather 200,000 times since we got started and um that means that things that seemed ridiculous are starting to be a bit more practical um even even sort of that under original scenario of wanting to trust uh you know a server when you're a weak client starts to make sense man you're just like completely blowing my mind right now and like part of the amazing thing about this um podcast is like the opportunity to interview people that are smarter and more experienced than you and like to have these moments of like
oh I know nothing because like I as as someone who entered this space from literally a Hayden Adams on a Bloomberg podcast to thinking that defi was the purpose to like entering through crypto Twitter to eventually figuring out that ZK is the future and realize I thought my like ultimate unlock that I got to like was that we thought ZK was about privacy but really it's about like projecting computation and what you're telling me right now is like yeah that's what we were thinking about in the Air Force in 2015 but like e and like just with everything in ethereum like going back to reading vitalik's white paper and seeing the types of ideas that he was
outlining and we're still building today it's like oh my God like all this technology and all of the like insight and the knowledge and the understanding has been there and like we're not we're just witnessing the magical moment of it all coming together and happening there was this under you know under the surface exponential growth curve in terms of how fast this stuff was and then at some point it it sort of crossed the threshold of practicality I think around maybe a year and a half two years ago let's say uh and then now we're seeing just you know it keeps getting more practical but then all the infrastructure gets built right because there's still this huge gap between you know when something works in theory to
when something works in practice to when something you can you can actually build on it and if you had to like put a marker in the sand for what happened two-ish years ago that like where we bridged that from that moment to like practicality that's a good question I don't have a great answer to that I mean to me it's the it's the accumulation of of of Innovations over time rather than a particular single breakthrough yeah it's a mors lawlike process you know where you you can't really nail down exactly what it is but the with some regularity those those those pictures keep happening yeah for sure and so um while we still are at the beginning of the podcast and talking about your background can you talk to me a little bit about like what you were working on
from 2015 until this time two years ago when like your like really specific like expertise would come into fruition but like how were you engaging with the world computer until then I guess there there was you know research my my my research uh line was still around circuits and models of computation right so something like Quantum computation and other weird models so one of the things that I was studying for example is this question something called holographic algorithms which was a work by um West Valiant at Harvard um and this was an idea that you could um take a circuit and perform a kind of transformation on it and turn it into
something that looks like it should take take exponential time something that takes poal time of course um and so that's that that was a really interesting Avenue and it was it sort of led to a development of a bunch of tools for thinking about the way circuits transform um and so for me what we're doing now um is kind of a related and not directly related but related in a way to to that kind of thinking about how circuits transform over time yeah and I guess like since we're starting to get into the meat the meat of it um can we take an opportunity to like Define for people that are not like living and breathing this like what a circuit is um
I know that's something that like automatically enters every podcast about ZK and no one no one knows what it is yeah and and it's a bad it's an abusive notation too right like we're not literally talking about things put together with copper wires um right so there's like different ways of of describing it uh I think so what what we're focused on with with Ezekiel is um a particular kind of circuit uh and this is why I'm going to introduce this because I think this is the most well-known um type of circuit in programming uh which is machine learning models or AI models you know neural networks so a neural network is the type of circuit anything you can express with like P torch or tensor flow right so you the way you're doing is you're setting
up um a a dag you're setting up a a directly graph you're setting up a um a series of operations right and you're thinking about the abstract synx tree those operations so you're kind of freezing that graph you start with a a number you add one to it you multiply it by something else you hit it with a nonlinearity and then you could think about that series of operations as a as a computational graph or circuit um so in some sense when we say circuit we just mean something that doesn't have loops uh you know a an iterative computation but it's kind of a certain framing of that where you focus on the aspect of each of the each of the chunks
being a tensor um and in machine learning those tensors are represented by floating points like tables of floating Point numbers and in a Zer knowledge circuit it's kind of the same thing except that they're field elements elements of a finite field um that are progressively being transformed um in each and so what we're doing is uh in a machine learning setting what you're doing is you're you're taking that Frozen graph that series of operations and you're using back propagation to train it so you're saying okay the thing I got at the end was wrong let's adjust each of the layers slightly so until the thing that I got at the end is last less wrong right um and then that's basically
the idea and so what we're doing here is is is we're not doing back back propagation but we're doing something else once we have the trained series of operations that says okay input image we do a convolution we do some relus we do a bunch of operations on it and output we say is was this image a hot dog or not right instead of so then what what we're doing is we're transforming all those operations into operations that happen on field elements um in a finite field and then that proving that each step along the way was done correctly so let me like try to summarize and like you tell me how wrong I am but so the idea and just to keep it specifically into like the ZK um realm the idea is that
like we start with arbitrary computation right and like that can be anything from like simple addition to like anything that's like pretty complex like written in code all this like stuff but the idea is like you start with computation and then part of the magic of ZK and like all of this um research that had to happen over the last 10 years is like figuring out how to first represent that computation in what we are calling a circuit right and the circuit is the like abstract mathematical representation of that computation we we like execute or run that circuit through our like ZK proving system and what the ZK proving system gives us out is a um
like cryptographic proof that that circuit that was given to It produced the result that the circuit uh that that resulted from that circuit yeah given this input and this pre-committed circuit I got this output but you're also allowed to keep the input private yeah okay so the point is is that like the circuit is like the computation that you want to prove is that right yeah yeah and the the kind of the trick and the magic and the challenge is often figuring out good ways to turn the computation you want to prove into an efficient circuit representation for example you made the point that the circuit has to be uh it can't have loops right so it has to be iterative and you can take like human readable code that
has a loop in it and turn it into iterative but depending on how you like do that transform process like may be much more efficient much less efficient and so to your point that's what you're saying matters is the transformation yeah the transformation and a lot of the research you see is in kind of coming up with clever arguments um that make that transformation more efficient um some of them are are very cheap so let me give an example of something that I think it can sometimes give a intuition for what's happening so one of the things that we do is to use um what's called lookup table to express a nonlinearity so your most basic M network is just matrix multiplication for M
multiplication then you do a element wise operation like if the number is less than zero you set it to zero if the number is greater than zero you keep that number that's called relo um or you H it with a sigmoid function function or some other transformation element wise okay so the element wise thing we use these lookup tables lookup table is just you you literally write down all the possible inputs that you want to do all the possible outputs and then you prove that your input output pair is in that table and there are various Arguments for doing that um so one of the interesting things to keep in mind here is that you don't always in a proof need to kind of do everything you would do in order to compute the result um
so the example and look of table is this I'm talking about an element wise operation right so suppose I do a series of element wise operations okay I start with a thing then I add two to all the entries then I take the square root then I take the log then I take then I hit it with a tan function then I hit it with sigmoid function realer function I just hit it with a whole series of functions okay if I'm actually Computing that generating a witness as they say I actually need to do all those operations to find out where it gets to at the end but if I'm doing a proof in a lookup table I can just have the First Column of lookup table be the input the second column be the result of all of those operations stuck together and then I can
prove my input output is in that column so in that example I can no matter how many operations you add it doesn't change the cost of producing the proof yeah and and nothing in life is free right so you always have trade-offs and in this like construction the tradeoff is you're creating more and more lookup tables which in no no no so what I'm saying is in this situation you only create the one lookup table it is free yeah so the cost of doing a thousand operations one after another the cost of proving it is the same as the cost of doing one operation because you just write the input and the output and you get to skip all the stuff in the middle got it and and that I guess is a good like transition back into our narrative like
that is the point of ZK is that or really of cryptographic proving or whatever right is that you in order to verify a proof by definition you're not doing like the same expensive computation that it took to get there and and the other the other thing that's kind of lurking here is that where do all these speedups come from right why is it that we think we can get to a point where zero knowledge proofs are fast enough to be practical I think they're already there but why why are they going to get more and more practical over time part of it is just the Ingenuity and Engineering of people you know chipping away at it but part of it is this thing I just suggested which is that the complexity of producing a proof can be lower than the complexity
of producing the witness um and that means that for some operations we can hope that ASM totically the cost of proving goes to zero right another example to think about is something like ECC Ram right eror correcting code Ram where you know in a server you have this this air correting code so that when it hits with a cosmic ray you know you can you fix you flip the bit back right um you can imagine when that was first done there was a lot of overhead right uh but now it's just built into the system and we don't we ignore it and there's essentially no cost um and so there is some possible future where we get to something like that with Z knowledge proofs where that that cost keeps falling until eventually it's it's
you know essentially zero or not something that we have to think about yeah I mean I think um I can't remember like which like famous like person wrote a book about this and is now like but what like there's something about how just like when you get like super scalable econom like um cost like driven down and like boost of efficiency um like it actually does open up new applications and things that just sound like so incredibly absurd like when you think of them because uh you know what exactly what we're talking about in 2015 it was just like it it would take like 50x the amount of computation that it takes to run the actual program to prove it so like why would we even bother like
The Innovation and the scalability and like the 2ou 200,000 x gain makes like okay things that seem ridiculous actually like pretty casual and like once those things are casual like we have an entire we have like these are this is how technology happens yeah one of the fun examples that happened this past weekend at uh e e KL was one of the one of the people on our team built a like a kind of hackathon siiz project like in seven hours um a Tic Tac Toe onchain Tic-Tac toe game and he did it in the following ridiculous way which is is really fun and he kind of touches on the way people starting to use llms instead of coding the rules of the game he just enumerated a lot of
examples and then trained a model to decide if the game had been played across theu according to the rules or not um and then deployed that model as a zero knowledge proof um and so that that and that runs in less than a second um yeah less than half a second actually the proof of that model that said yes this game is you know legit or this game is not not you know that it was a cheating move yeah and I I definitely am still like a little bit struggling on how like these um like how this fits into gaming quite yet but like to see these early examples like already um like shows that like this is clearly a path we're going down so um it's super cool but okay so let's talk about um
like what you are building and and I I've been calling it ekz but I heard you call it Ezekiel so like easy KL like e easy zero Knowledge Learning or easy zero knowledge for liberty or what no I'm currently going through a naming thing right now it's a literally the worst part about like having ownership of anything so this one I like at least it's like you got Ezekiel that's good you can pronounce it yeah yeah um so can you like uh I guess start us off by just like telling us like what is is it what's the problem you're trying to solve and like um where are you in the process yeah so um you can think about it as a compiler uh that turns machine learning models or AI models or general
computational graphs um expressed in Python um into a circuit and by Circuit I mean a prover and verifier pair right so in order to make sense you have to have a way to prove it and you have to have a way to check that the proof is correct um and we try to also have kind of a a managed pipeline to help people deal with this because this process of creating provs and verifiers generates a lot of cryptographic artifacts cryptographic artifacts are a little bit um annoying to deal with because when they're wrong it's just like well this random looking 256bit string is the wrong random looking 256bit string and so so we have some tooling around that to to help but
yeah that's the basic thing and then the focus on terms of verifiers is on onchain verifiers things that can run on ethereum um because uh what of the reason obviously it's kind of a big Target and what a lot of people interested in doing so that you can extend what you can do with ethereum um uh to you put AI models on chain or just put complex logic business logic and also because I like the kind of epistemology of it right so one of the questions with with this in this whole Space is kind of okay great you have aover verifier pair but if you give me the approver and you give me the verifier how do I know you gave me the right verifier right or like how do I know this verifier corresponds to the
thing I want to be true uh one simple answer to that is you deploy the verifier on chain everyone knows where you know it's it's a consensus fact right so you use a little bit of consensus to solve that kind of public infrastructure type problem um and so we like the use of onchain verifiers for that although we don't don't need to use them no I mean I think like as you said like the the reason this is starting to get interesting is because for the first time we have this like um you know differential between computational power between computers that are re or VMS that are relevant right and so like in the past like yeah we we used to be able
to launch like the Apollo 11 with a computer that's like less sophisticated than my ti 81 but like we didn't think like oh how do we get these systems to like combine to create something even more powerful we were just like let's throw out the old systems for the better systems and so to not like Target the onchain verifiers is like to yeah I mean Miss Miss like the opportunity that you identified so um to that totally makes sense to me but I guess let's so let's break it down like the it it sounds like there's three spe three uh distinct parts right this is the circuit generation piece the um prover and the verifier and so um the verifier we we
kind of briefly talked about but like just to be explicit about it it's like the piece of code that exists probably on chain but as Jason just said like they can deploy it elsewhere that takes in the cryptographic proof and uh whatever other data is need with it and then like is able to verify was the proof correct with those inputs is that correct okay so the verifier is offchain it's actually like a pretty intensive piece of uh sof you mean the pro sorry the the prover the prover yeah verifier onchain the prover is offchain it's actually pretty intense piece of software like probably going to need like you know a lot of computation and that's why
it can't be on chain yeah well it varies actually right yes it can't be on chain because that's far too much but but the amount of computation that it needs again this is where we get the most of the performance gains and the ones that I quote earlier are are there they in how fast the appr runs um so the resources required are constantly falling and that's where a lot of like the Moors law stuff you're talking about is there's kind of three classes you can think of there's three targets I I ask you when they want to use this what you know what is your verification environment do you want to do onchain you want to do wasm like in the browser we can do that too and what is your proving environment you know does it have to fit in a browser does it have to
fit in a phone browser that's like the most difficult environment and laptop or server um and you know for the biggest models or the biggest computations we go all the way up to right you have to have this giant server with a terabyte of Ram or something right um uh but you know some things do fit in a wasin and then you can prove it on your prove it on even on a phone um and then the other thing that happens is um there and this is the true across across UK we have one particular implementation but there's lots of other implementations which is the the idea of a two-stage proof right so you have a first proof which is easy to produce but hard to verify because it's large or because it has some some
other issues that make it hard to verify you run that easy to produce hard to verify proof on your consumer on your device your end device um and that hopefully has the blinding factors in it so it preserves whatever you wanted to hide is Now hidden then you take that proof and you send it to a server which performs a compression um or second stage proof and turns into something that's easy to verify on train so for for our system we use aggregation proofs for that second stage right now uh in other systems um like um uh the Hermes polygon Hermes and stuff um you you'll see uh uh not sorry the St the Jord is doing now I foret name it but um
the ZK evm stuff from po yeah ZK evm stuff it's I mean just really like which which probably is called but the you do a first stage which is um fry based and then a second stage which is growth 16 based right so that's another way to do that you have a verifier written a different proof system um that can uh compress the first proof to something that's relatively easy to verify yeah yeah for sure and like that is you know like the magic of computer science like you you are a math professor but I'm sure you remember all the basics that you guys taught us which was like ESS that if like abstraction is always the answer it's always always the answer if like something's too big or needs to be
like like optimize or simplified or whatever you abstract away like the parts into like specialized pieces and then so um each individual thing can be like hypers Specialized or in this case like be fitted to um the computational resources that are available and so um yeah it makes sense that there would be like a lot of different options and more and more flexibility as you know just the technology stack matures so abstraction one of the I so I like I love abstraction of course mathematician mathematics is all about like building towers of abstraction and so like when we come to cryptography we're like oh my God this is all just like very detailed you know do this do this do this and we want to build abstraction so um a lot of
what we work we do in code is to build these layers of abstraction to make it easier to express high level programs as you know in terms of a a circuit but I think and in an even bigger picture as an industry right now we are struggling to find the right abstractions um so we are struggling to find kind of what is the right uh pattern to create a zero knowledge app right um I think about this is it's like we are collectively discovering what a web framework should be we don't know we never heard of MVC or any other web framework pattern and we have to figure out how to separate the parts of the system for verifiers and um approvers and what goes on chain and what doesn't go on chain and just
discover the patterns that are easy to understand but are powerful enough um however I think it's really important that we don't simply deliver a VM and they say okay here is a computer please build whatever you like right because that's not like okay I can go to lovo and buy a computer like you have to be a software developer like make some choices for me like n down the the possibilities that I can do um give me a framework give me something that's opinionated um so that you know you can quickly build build with it and yes there'll be some limitations but figuring out what what are the right opinions and what are the right design patternss I think it's going to be critical to getting this stuff so let
let's continue uh finishing the stack and then I want to get back to like what your position is like at least today on what the right configuration of all these things are but um so just to wrap up the um the prover is like uh might be compound might have like multiple stages might uh like exists on supercomputers as Mo's law gets better uh or Mo's law like effects get better then it might be happening just in your browser um and what that's doing is taking like the circuit which is the you know the skeleton of the computation like what is going to happen to your inputs and then it's taking the input running those together and giving you the
cryptographic proof that this input this circuit gave you this output and this is how you can verify it right correct okay and then the final piece of what you're building is this like I think you kind of referred to it as a compiler but it's essentially a piece of code that says okay given uh your python code or uh your neural network or you mentioned one other thing that I'm forgetting but given uh your code Cod this like give it to our compiler and we will transform it into a circuit that can be like understood by approver is that right and like so is that like a pretty intensive piece of uh
software that needs to be live in a like server Farm or like how how does that kind of work yeah I mean so not yes and no so for for very for let me say for The Cutting Edge computation for the bleeding edge computations it's always going to a big server but for many practical computations it doesn't need to be that so one of the things that we did early on was to build it such that we built python bindings and made it so that you can run you can use a Google collab notebook or other jupyter notebook you can you know Define your model train your model import Ezekiel and then use that to transform it into a circuit all inside of a Google cab notebook so that's enough for sources usually to do
the setup and to do a proof as long as it's it's not an enormous model um and of course enormous is changes all the time but it's not actually that enormous but it's you know okay um so uh you know right now we're kind of in the we can do around a billion flops let's say in a proof um a bit more than that but that's not that many flops actually yeah uh by today's standards but it's enough to do interesting things um yeah so so the resources are not that it's not that bad actually cool all right so uh going back to what you originally saying that you think it's important to have like an opinion or a like some sort of structure to how this is built so so it sounds
like Ezekiel like at the base layer is developing all these different tools that anyone can kind of like configure and mix and match but um how does like I guess Ezekiel is the organization or like the collection of people um work and then how do you like build these structures that can inform like devs yeah yeah so great so right so you can think of like an onion of software there's a little bit of core cryptography work which is obviously huge amount of work right so like that's the core if that doesn't work nothing works right so there's this core compiler that's doing all the comp cryptog or there's a even below that there's a cryptographic system uses a bunch of Open Source libraries then there's another open source compiler
that transforms you know your input just program into thing and then there's kind of an increasing amount of tooling around that I mentioned the python bindings we also have JavaScript bindings to make it easy to serialet so they're only like one of the hardest problems in cryptography always is serialization Right everything disagrees about you constantly to think about oh is this big Indian or little Indian and like how is the spites right so there's a lot of headaches around that so we building tooling you lay layers of the onion to try to make that easier to use um and then the kind of biggest layer of theion on the outside is is the services that that that are attached to it so this is kind of um if you just want to
take your model and a sample input and you know click a button and upload it to our server then we'll do all the other work for you right so you really want you just say like here's the model pick the model and give me you know and then later on there's an endpoint and you can ask for a proof you can upload the input and we'll compute the proof right so um so that kind of stuff is there to just make it easier can make it a shorter we like give a make a tight development right make it so that um people can go from their idea you know in the context of a hackathon or a trial um to seeing something that works as short a time as possible um so yeah and
that's that requires more opinion like a few more opinionated choices about we're not going to give you every possibility instead of for example as letting you decide the calibration of the circuit um like choices of how wide or tall it is and how it's laid out we have some automated tools that will make those choices for you and then if you don't like them you can drill down I mean like experience-wise there this reminds me of I just uh like tried to teach myself um like nodejs and nextjs and like versel to get the a little website up for this podcast and yeah I mean like the this it's set up like in this amazing way where like I push to GitHub and then
versel automatically like sees my code and compiles it and then puts it on a like web server and then it knows like somehow how to like repoint my URL to this new and you know it's just like I as someone who is not trying to build a like Enterprise or a corporation and like knows that if things ever really like took off like I might like crave a lot more like compo or uh customizability like I might need to make those choices in the future but like this gave me the opportunity to like focus on writing like I don't know hundreds of lines of code and getting like a full website working yeah so that you can explore an idea and figure yeah I think you know we're all excited about
the possibilities of ZK um and I think we can talk a little bit about the big picture why I think it's important but um you know what what I'm certain of is that I won't be able to find all those things right the most important thing is to make sure that it's easy for a lot of easy to search that space right so people can a lot of people can do it it's a short short development Loop to do it and you can also use AI models so if you don't you know to help you find that search that space or to help you deploy ideas quickly um that that will help us figure out kind of what it's for well unless you have anything else to say about like the product or um yeah just anything you want to talk about Ezekiel like I would love to um like
spend the remaining time of this conversation talking about yeah the big picture and um you know I I like to talk about the ethereum endgame um uh and I guess like we'll see if you and I agree that that's like really the proper frame for anything like cryptography SL like distributed compute uh related but anyway is it first of all is there anything you want to um close off on or should we talk about the future yeah let's talk about the Future Okay cool so what do you think is the U the like end game or the point or like why are we doing this um Okay so a couple of way points right so one of the things metallic talks about is that he thinks that CK will be you as important or more important than than blockchain it's a
technology um and let's operationalize that for a second so one way that I like to think about that is this kind of two AIS thing you know how many computation how much computation goes in one proof and I was talking earlier about flops right so J went from on the order of 10,000 flops per proof to on the order of a billion flops per flops per proof and I hope that you know that should continue right so you're you're squeezing more and more into a single proof that then gets hopefully you know verified on chain another way to think about it is how many proofs are happening per blockchain transaction so um one of the other examples that we've been integrating with is something called zo pass or PCD pass which is a product of Xerox Park that was built for
for Zulu it's kind of like a ticketing system that you could use to to get around uh and one of the cool things about that is that you produce many proofs in order to enter a venue or to kind of collect a I think it's sort of like a PO app that's kind of a you know someone will come around with a card and you scan the card and then it shows that you are in that room at that moment it's very intimate it's really cool um and there's no kind of public knowledge of that it's just only your wallet knows that it has that because it's proof that you got it um and so in that context you can start to see about tens or hundreds of proofs that are computed per blockchain transaction right so maybe you used a blockchain transaction to buy
a ticket and then you prove that you a member of the group many many times you know took a poll or participated in an event or whatever for me one of the transformative things was going to a music performance uh and using that pass to enter the performance and it was easy enough for the bouncer to scan and check the proof right um so I think you have that these two axes and you can kind of Imagine a world where there's billions of proofs being produced and billions of operations per proof uh per blockchain transaction and so we're really using this blockchain as kind of a you know a clearing layer it's kind of like the L2 model um but I think more even more scalable than that right um because it's
it's doing something different um it's it's to me kind of providing some of the promise of blockchain where we ran into just scalability and privacy problems and there were certain things we just couldn't Implement um now we can can build those things and then just use consensus when we actually need it um uh so you know one of one of the things I want to mention also is that why do I think for example the zero knowledge is is worth betting on even though it's still sort of slow relative to something like consensus and L2 L1 right especially L1 consensus and MPC um and one of the reasons is because anything that involves MPC or
consensus that involves nodes talking to each other is always going to be fundamentally bounded by the speed of light right if you want to make consensus all over the world you have to wait you know hundreds of milliseconds at least for that message to move around and if it's a chatty protocol it might take seconds right um so whereas the proof is being produced on a single device so there's kind of not as much of a limit no real limit to how fast that can go it doesn't require you there's no hard limit right from whether is you know fundamental laws of physics but you know there's no we can expect a lot of improvement put it that way that it's not limited by speed of light and so kind of I imagine kind of a lot of proofs being composed with each other
and sort of floating out there and occasionally attaching or touching back to the blockchain it's like a Sprinkle of consensus uh locks all these things into into a into a structure I man so much to say based on that but like I to to people not in this world well well first to people in this world who but like don't really understand the purpose of ethereum like what I always like to say is the idea that like the internet as we know it was essentially created in like 95 or 96 when Mark andreon gave us the internet you know and then um like then it got like better and better and better and what stopped when Zuckerberg invented Facebook and like since then
we've gotten like better ux like better resolution videos but like we're done like no like of course this is a new technology and it's still growing and like what I see ethereum not cryptocurrency which I think is like mostly garbage but ethereum specifically is this like hard durable backbone of the internet um that like provides us something to Anchor to and right and like what how people who are not like totally lost in the ZK Rabbit Hole like what I say is like this is just how we express property on the internet and I think that like that is like the first order effect and that's like we can see it with ether we can kind of start to
connect it to like oh maybe like property can have like representation on chain and like down that rabbit hole lines like sorry down that rabbit hole lies the idea of the internet of things right like this is the first way that like all these like refrigerators and like smart cars and whatever can be connected to the internet in a way that's you know actually like makes sense and is not like so like incredibly insecure and all this stuff but uh for us in the ZK world and especially you who's building the ZK world like it's to really understand that like what ZK does is make like computation like just like collapse down to zero and um like the
the ramifications for that are to me like the the couple things that like two as we said two years ago everything changed it was for me there was a specific podcast I remember uh the guys from starkware came on Bank list and they made a throwaway comment in November 2021 they're like oh yeah somebody today is uh folding proteins on starkware just like yeah it's like stupid there's no reason to do but like just to show that we can that was two years ago um and like the other part of it is like we realized the first like practical application for cryptograph graphy that wasn't like identity like and hiding Identity or hiding information and that was bundling
blockchain transactions like that was the first time we realized like oh my God like if we do this offchain um we blah I'm starting to ramble here but I think like what we're all starting to realize is that like ethereum can be the anchor and we don't have to limit ourselves to like the evm and to like this blockchain world and like whatever just like like warts in all that we have to deal with like as the tools that you're building as like the things that risk zero is building like so many people are starting to show us that like this is general purpose computation and it's like really like a step forward in like what it means to live in a like a world
where we have like supercomputers in our pockets yeah a couple of other metaphors that I like are just things I want to touch on that are reasons to be excited so one of the ways think one things that comes from Brian Brian buo from Zar Park is um that it's it's kind of like a language of Truth you know it lets you um restrict yourself to a language in which in some sense only true things can be said right so oh you know given the rules that you've decided and the verifier problems and stuff you know but you given those inputs you perform this transformation and you get an output and then those things are composable and have transitive trust properties um and that's something that
really unleashes like a whole new type of um communication power um right uh so that's that's something that I I I really like and one of one of the other kind of Concepts that I I want to come back to is I actually think and this is a whole another can of wordss but I actually think that in terms of property right that cryptocurrency in the sense of tokens ledgers um is kind of a skoric thing it's like the faster you know faster faster Carriage instead of an automobile or an airplane um and that like what we've built here with these tools of consensus and cryptography zero
knowledge proof signatures um is much can express much more complex things then here's a ledger with some number of tokens and they're transferred somewhere else right um and we don't really have another way of rep understanding um economics other than that because we're used to the system it's been with us for a long time um 600 years or something leg you know Double Entry accounting uh but you know there's a wide range of possible um kind of economic models that could could grow out of having this power um and um I say that is kind of in a sense money itself is a zero knowledge
proof um and you know you know we we've summarized the whole history of transactions all the things I ever did for someone and was ever done for me are summarized in some kind of bank balance by an old Ledger system with banks talking to each other and you just need to test against this balance you know is this thing does this person have enough money to buy a mango or whatever um and so now we can do much more sophisticated proofs that take into account a lot more information uh and it's going to be really interesting to see what people build with that that power man that's like incredibly mindblowing I mean do do you not to put you on the spot but do you have any thoughts on like what alternative models like look like in now that like we have more like yeah I mean
so I have I have only bad ideas but let me sh let me share one of those bad ideas okay so to expand what I was saying so you could imagine a world right where um instead of every time you do a transaction instead of um having an amount you just record what happens like uh you know someone Ms the lawn for me and we just kind of record oh you mow the lawn but we don't attach a price to it and then later on you can sort of think about any future point you can go back and attach prices to everything but those prices can vary either by um because of how much you value past actions or they can vary because of uh different societies Place different values so for example you say oh this this Society thinks you know burning
carbon is bad so retrospectively all the times you took gas we're going to you know it's going to cost you more right okay um so you can kind of pick these prices retrospectively or you can even just not ever bother to pick the prices because you know that will continue to happen in the future and each point you just kind of can do these zero knowledge proofs that summarize all the information that came before um another way of saying that something like that is that now another bad idea is you you could have an AI right so right now we could say you keep the track of all the things that you ever did without attaching prices to them and then you feed into the AI you know you call open AI you say hey this is all the good and bad things that Rex did should he be
allowed to buy this yacht or not right and om a makes a decision you're like oh that's like a terrible dictator thing you okay well we could do the same thing but we could use you know Zer knowledge Ai and it all seems very distopian but then you think well that's kind of the system that we have now right it's just that we we use the banking system to make those decisions and I think it's like super easy to call that dystopian but like so much of what I think about is like a post scarcity World which we're like rapidly entering into and you know like the the frames that we talk about like literally the only idea we have for solving that is universal basic income like literally that's the one and like what you're making me think of now is like okay like
maybe we could like find a way to use technology to facilitate like a real um like commun like you know just sense of like contributing in community and um and like togetherness in a way that like money like actively creates separation yeah financialization I think was a great technology that was developed you know 600 years ago but it's kind of we have computers now we can be a lot more sophisticated we don't have to reduce everything to one dimension um yeah another example I like to think about yeah like you think Community like Midwestern in the midwest you know a couple hundred years ago you of you can ask your neighbors to build a barn for
you they'll all come together and help um but you can't ask them to build a 100 barns so there in some sense you have a claim on that Community you have a share but it's definitely not a ledger right it's that not like you have a name you know one Barn for the first person or 1,000 Barn tokens right like there's some there's more subtlety and Humanity to it and I think we have the opport to find something that feels more Humane wow man that's incredibly powerful wow so um last thing before we go is like I want to touch this intersection of AI and crypto and like I think um like right now like here's some Alpha for you like if you want to go raise Venture
Capital just like create a startup that mashes those two words together and like you're golden but to have like a slightly more nuanced conversation about it like I I am not really sure where these two things intersect but what I do see as um like a relative Layman especially in this conversation is like AI is about like creativity and abundance and just like like dumping out as much like variation and possibility into the world as possible and what I see with crypto is the exact opposite it's about scarcity and it's about provability and about like identity and and like creating
like that trustless is such a misnomer right like it's all about trust right and um so to me like what you know I I don't know how these Technologies connect but I do see that like together they're almost like half of a story and um I just like I see this all as like the the history of humanity developing like technology going back to like let's start it Gutenberg right but it goes back further like this is about like how we use technology to like change communication and what that new mediums of communication like allow us to achieve on this planet so um I don't I don't really know where the intersection
is but I'm curious as someone who like lives and breathe this stuff like do you have any thoughts on what these two technologies mean for each other yeah I mean I think so you're right on all these points I I wouldn't say that like photography is really about scarcity it's more about composability or transitive trust and I think scarcity is one thing you can model with transitive trust but not the only thing you can model um and so there's a few places I see intersecting of course we make something that turns a put lets you put AI models on chain so if there's a reason that you want to do that you want to create a Jud smart contract that acts more like a human judge that you know decides whether a task was performed or you know
who should who should win and dispute or whatever that you can do that um and so there's there's a lot that happens there in terms of being able to create kind of objective but uh automated um and you know nonhuman judges or deploying them so that's pretty interesting I think I think one of the things that of course comes up is also Provence right so content Providence um which is a huge problem um as AI makes you know you can create any image you like uh so or any video you like so how do you know that something was real in some sense um you know you can prove all the transitions so you can
say okay the camera signed it Dan you worked with Sony on the camera that there a camera signs it or your app signs it and then all the Transformations that happen to that image crops and you know noise models and stuff are all um proved along the way um in that's sort of a weak kind of AI but depending on how you do it so that so then you know for sure what the you know what the chain of Providence I think that's that's probably going to become become more important um the other thing that is kind of another one of these little bit mindblow ideas is um when you think of an AI agent right um so suppose I wanted to in an extreme make an agent for myself so
after I die I want you know I wanted I train an LM to make decisions for me and I give it power of attorney how do I know that that agent um how does someone else authenticate that agent right um You can say oh well someone holds keys and they they run the agent and then they sign things using the cryptographic keys but that's a problem right because someone can change the data feed it you know feed it bad data change the algorithm or they can leak the keys one of the really cool things you can do with a proof an AI model that can prove itself or you know for which execution can be proved it it kind of is its own key it authenticates itself right so I can say you know I sign over my power
attorney to this model the model runs and when it gives an answer it comes with a signature a proof which is as long as the receiving you know the smart contract or wallet or whatever Honors that proof and we know that that thing ran correctly yeah essentially what you're saying is like today we have like eoas externally owned accounts which is essentially like what you have with a private key and your metamask is like you have your private key and you sign stuff and that's how you authenticate to ethereum that like you are doing the the thing that you want done is authorized by you and what you're like kind of painting is how we can reconstruct that
for AI models to give them like similar if not like identical levels of sovereignty on chain as people do they can be their own wallet the model itself is the wallet all right well man I think we're getting too dangerous here uh just to be clear all hail Skynet and um you know things are about to get crazy but no man Jason I really appreciate this conversation you've like both like blown my mind in terms of like where we're going but also just shown me like just like the this very concrete steps we're going toh take to get there through what you're building with Ezekiel so um just really appreciate the time and the sharing of thoughts and thank you so
much thank you for inviting me of course uh before I let you go can you just let the audience know where they can find you how they can like learn more about the project like where sure uh the best place is EZ k.x YZ all right thank you so much Jason really appreciate it and have a good rest of your week thank you you too n