ZKPodcast: Illia Polosukhin on the development and launch of NEAR protocol

29 Nov 2020 · 1:02:18

Anna Rose interviews Illia Polosukhin, CTO and co-founder of NEAR Protocol, for Zero Knowledge, catching up on what has changed at NEAR over the past year. They revisit sharded versus non-sharded blockchain design and data availability, then discuss the difficult path to launching a new proof-of-stake network, building a validator community, and where privacy and zero-knowledge proof technology might fit into NEAR going forward.

Speakers

Topics

Transcript

[Music] welcome to xero knowledge a podcast where we talk about the latest in zero knowledge research and the decentralized web the show is hosted by me anna and me frederick this week i catch up with ilya from near to talk about what's new in the network since our last conversation last year we also chat about the long and challenging road to launching a pos network sharded versus non-chartered blockchains and nears plans to provide an ideal spot for blockchain developers

but before we start in i want to say thank you to this week's sponsor trailer bits trail of bits has published a guide for building secure contracts with their crytic offering krytik is a sas based github application created by trailer bits it continuously assures that your ethereum smart contracts are safe and functional it reports build status on every commit and runs a suite of security analyses so you can get immediate security feedback check out the guide which i've added in the show notes for tips on how to build security into your dapps from the start as well as how to use the trailer bits suite of tools for automated vulnerability detection so thank you once again trail of bits now here is my interview with ilya from near so today i'm sitting with ilya from near

uh ilya's been on the show before with his co-founder alex last year you might want to check out that episode where we talk about you know how they got from from where they were too near at that point welcome ilya thanks for inviting me hi everyone in that show we actually did talk about your background we covered like sort of the work you had done before at google and how you got started with nir so in this episode i think what would be really interesting to hear is what's been happening since then we're now a year later what's happening in the world of near so i mean there's a bunch of stuff happened i mean there's a world stuff right obviously everybody's living through a

kind of devastating epidemic around the world and like it did affect kind of in one ways i mean obviously there's a lot of negative negative sides but there's also a positive side which is kind of our team and everybody around the world right when kind of into decentralized mode and really like everybody's more interested in what's going on online and what's like where they can find a community and work together to something that really like changes the world that's a really good point that like it's true that this has really turned like what was a decentralized focused industry but we'd still all meet in person and often offices still existed where everybody would get together now it's even more truly decentralized

with even if you live in the same city as your team you're actually going to be working from your little pod which is your house and people have like gone to you know they've gone back to their parents home or they've gone back to their hometowns because why stay in these centers it's super interesting to think of it that way what else has happened though in the world of near like you the big changes happen right yeah so i mean we went from kind of like discussing how we're gonna build to you know having having the protocol launched so and pretty much now having developers and community building on top of it so you launched the network how has that been it is very freaking hard um there's

i think like we've repeatedly miscalculated how much work it is right even like i mean there's obviously a technical work and we've built from scratch a lot so there's been a lot of kind of just work making sure that all works but then after that there's obviously community piece there's economics and token distribution piece there is a kind of regulatory you know foundation companies piece around that as well and kind of all of that together right like you always kind of underestimate how much work it is there like outside of what you know you think you're doing and i mean this part of it why like every single protocol has been late right uh from from their original kind of expectations

but uh it's a lot of work a lot of sleepless nights especially given like i'm in shahi so the time zones are hard but different yeah really kind of pushing forward this spin i mean it's it's it's fun and exciting because you know you're actually building something that's like affecting the whole world and you know runs around the world right but at the same time yeah there's a lot of kind of small details that need to come right for this all to work like i think like in last episode we talked about how much we evolved since like we started right so so last episode was about like a year in and i think we changed our protocol at least like three times by that time since then or by no buy them by then by then

and and big part of it was like we started pretty much like we came from building kind of you know centralized solution like distributed by centralized solutions and obviously you know decentralized space has a lot of its own challenges uh and really a lot of it was been learning and kind of you know researching and working with other folks on this since then i think most of the design is the same uh there's obviously a lot of like small details that kind of got refined as we built them some details are actually still getting refined like i think it's the same as any protocol in reality is like the work is never done but uh but like the kind of the high level construction is pretty much the same it was built like last year and then like since then it's pretty much been in

like in testing and then production uh over time cool in that episode we actually did a comparison of like sharded blockchains we talked about sort of the different ways that they were built and how near is built a little bit differently where instead of having something like a relay chain or beacon chain as a central point between equal chains it is mainly that beacon chain or relay chain is that still the case pretty much yeah so like conceptually it's just one chain and then each block is kind of sharded and so this like among other things allows to like increase and decrease number of shards somewhat like easily uh i mean obviously like there's a lot of like technical issues like how to do it but uh like it because from perspective of a user

or a developer this is just one chain they don't need to think about sharding right and so all of the kind of complexity has been handled on like layer deep right in on infrastructure layer and it's kind of been like our like design principle is that we're trying to hide kind of a lot of like blockchain complexity from user and developer and sometimes it's actually like backfired because especially when we have crypto developers or crypto users who familiar with like ethereum coming in and they're like wait but where is my you know public key or where's my address and it's like well the things they're used to yeah yeah they're used to the things and like ours kind of works more like regular stuff and so sometimes we kind of yeah we need to give them a little bit

more like for crypto users and encrypted developers we need to give them a little bit more too which is so funny you almost have to like diminish the ux experience so that it feels real yeah exactly yeah like we're like wait where's my keys like how do i know this is like cryptos like well i mean you can go into explorer and look at like you know dig in and like yes there's sharks there but like do you care one topic that's come up like just a few times in the last month or so on this show was just this question of data availability on the l1s i know that in the last episode we actually did touch on it but i i don't i don't know i don't really understand how data availability

works or will work in near do you mind actually sharing that with me again so the idea is that uh so let's say you have you know for simplicity you have 100 validators and you have 10 shards so there's a 10 validators in each chart when they get the transactions for their chart they split it in 10 we call them parts and send it to uh to validators in other charts so the the construction that's used is called erasure coding and so this is a construction that if you take some piece of data and you can encode it in n parts and one third of that parts is enough to reconstruct the whole original data

right so so this is kind of a way that's used like for data reconstruction for signal reconstruction and so this is used by us and polkadot and and lazy ledger and bunch of other other people in in the scripted space and so so what this allows to do right is that even if one chart is malicious even if like in our case we rely even if one third is offline and one third is malicious you can still recover all of the data from all the shards from the left left one third of the validators or of the stake cool and so this provides the data ability for all the shards which means that even if something went malicious right even if if like because it's a smaller subset of validators and your chart you can always

reconstruct the data and prove that that thing went wrong and kind of roll roll back the whole chain and so this construction again it's like it's it's very similar to how uh polkadot for example does that specific piece but in our case because it's kind of considered one chain we actually embed this property directly into the chain's consensus and kind of chain rule so which means that the chain that has been built like by definition it needs to have this property of data availability otherwise the people who don't see the available data like who didn't receive the parts from other shards will just not accept the block until they receive this data

so which means like that kind of as chain been built you know that because people built on top of it right and they approved the kind of the block itself they have all the relevant data for this thing and so so kind of the data availability like properties are the same as as the properties of kind of security of the chain itself which is a little bit different actually from from i think like what bulk like polka dot properties are on data availability and definitely different from for example even the helium uh data availability like for example roll ups putting data on ethereum one the attack cost is actually a 50 attack right because you could just fork off the chain from it a different level right and so this means that the

kind of properties of of data availability are actually like their cost of attack is different from the kind of cost of the you know the itself uh protocol like the security model i guess yeah yeah the security model is different yeah so we try to align those all those models together of like the security of the protocol security of like data availability and everything into kind of one property that people can like reason about do you actually envision a roll-up type system also existing on nir though because i know with like you know if you look at the eth road map the idea of roll-ups also being kind of a permanent feature of an end and end game do you also think of it that way so

i actually like what we've built and actually what polkadot built i actually call it a realistic roll-up because what happens is like this shard or in in case of polka dot a power chain they kind of run this as an operator and they send it to the like in our case to everybody else or in case of uh polkadot to the relay chain and that relation executes it right away and verifies that this block is correct right away and acknowledges it that it's good right and like in optimistic case you wait seven days and and this is realistic case you just run it right away and say it's good and now everybody can use it right and you can have cross bar chain across chart communication right away so from this perspective like this is you know a roll up like and like that's what i'm saying the properties

underneath are actually very similar that you get wow now the zero knowledge has a different properties zero knowledge rollups have uh properties of zero knowledge of like first of all scaling the computation a lot more and privacy right you can actually execute some on data that maybe not available at the at the moment sometimes sometimes yeah it's it's like the problem with zero knowledge rollups is like it's a very like it's it's a big space of yeah of a lot of stuff you can do yeah so that i think is actually it will exist in its own right because there's so much more use cases you can do that like it's not it's not your normal kind of you know receive transactions execute you know post it on chain right like there's a lot more stuff you can do

including you can actually have a realistic kind of zero knowledge where you put transactions on chain first and then you execute zero knowledge and commit to the result on chain like right now zero knowledge like rollups because the kind of the transactional throughput of the like of the hedium is not enough to like accept transactions they would accept transactions on their own but it's actually not a good design because that means you have kind of a centralization point of receiving transactions and also this has actually some possible potential legal implications right because they may be like it's similar to if like a centralized exchange receives you know trades somebody's money and then settles on chain right like

centralized exchanges are enforced on what they can do and what they cannot do so like actually roll ups potentially right if they two if the number of operators is too small may get into the same problem but if you use a kind of unchain data availability first to like collect transactions you don't need to execute them because maybe the data is actually like just the commitment hashes like you don't have you don't reveal the data you want to execute on you just reveal the kind of desire to execute on and the ownership and then the zero knowledge kind of operator pulls the data up like runs it and then commits to the state and commits maybe to the result like that kind of system is very interesting because it allows to do like you know dark pools

and and kind of taxes and all this new stuff in in a very like kind of censorship resistant and private way how does that operator though like so you just described it like the operator's still there why is that no longer a point of uh centralization because any other operator can do the same job right okay like it's a very different way like i need to send transactions to this ip address or whatever to this domain and i send transaction to the chain right so any of the nodes can receive it and agree on this is a transaction and then any other operator can do the kind of the like private execution i see and then like at least from my perspective i mean again like we don't know what the legal requirements etc but like from my

perspective in this sense right like i can run an operator you can run an operator right and like we can kind of like whichever operator gets it first and executes it right that's that's the one that uh does it like there's you know also i guess gx stuff that can be uh used but yeah from perspective of like you know what for example right now like if you're doing starkware right you need to send transactions to starkware right that they will be receiving that there is a committee somewhere in there as well but and it's it's their committees for data availability their committees for data ability post factors yes yes like after you commit to the result but like so sending turns like somebody needs to receive transactions it's either you know a decentralized network or a centralized kind of entity like there's two options so they as they need to

build their own decentralized network to receive transactions and come and agree on commit on them what you just described as those operators they almost start to take a role like they have to be incentivized somehow to do this and so they're like sub validators or something you've talked about like the validators that are also going to be existing on various shards could these be the same roles uh like do they have to be independent of the system so they don't need to be so this is idea of like off-chain workers actually okay so so this idea of off-chain worker where if the job is like committed unchained and paid on chain but you do some work and you commit to the result like on chain but you do the work of chain right so it's not you

don't need a committee and so zero knowledge like provable work is actually very well suited for this because you don't need a committee like the result itself is a proof that you've done their work correctly right so that is a really cool thing because yeah like i mean from my perspective it can be like a piece of software that reads from the chain the the input and what it needs to run executes it and then commits to chain back what it does right so then anybody can run this worker and there can be like pools of this workers like and yes validators can be running this job as well but it will be kind of a separate service you can you can set up this thing for pretty much anything right in theory you can have like a you know mapreduce job where everybody's like pulls some

different pieces of data executes and then you know commits to result on chain uh and like you you cross reference that you know the job is actually done correctly and you know the results matches do you have that role the off chain worker is that something that neer would actually build or is that just something is a concept that exists so we haven't published this yet but we're actually working on like a i would say like a five-year roadmap which is not just like not just for what not just for what we're building but like what the ecosystem should build uh including a bunch of like different applications of kind of open web right and so this includes like the old chain workers and like off-chain storage is kind of pieces of that like ecosystem because they will power will be powering

kind of these new use cases so for example new cypher is really cool thing and they it took them i don't know like two years i think to build it because they needed to build their own infrared for the soft chain workers so if there is a rare existing pool of off-chain workers their work would be just to put a contract to do like the same contract they have right now but also just write some piece of code piece of web assembly that everybody can run yeah but like they needed to actually run their own test nets they needed to do all the stuff because they built the whole stacks themselves and so the idea is like to have this kind of common infra and that would pretty much feed into it right and and use like different pieces of infrastructure man this is so

interesting to hear new cipher put in that context i didn't think of their role as doing that but now i'm like oh that's because i always learned about the tech i didn't really understand how it fit into everything else but that's really cool to hear i wanted to ask you something else about sort of the the general system stateless clients this is something we just on the last episode had a lean on uh aileen temesco to talk about this kind of research into stateless clients and i just wondered if you're thinking about that if that's also research you're paying attention to what that would actually mean for near i've been having actually these conversations because uh i actually got a little bit into well some discussions on twitter

about like one is too and uh so i've been talking with with some folks who are working on this um and we also have a episode of our whiteboard series about uh turbo turbogath one related topic so i think like stateless clients are actually really great from a protocol developer side so as a protocol developer stateless clients are great amazing because you're actually removing a lot of needs from kind of on the side of a protocol and you're kind of pushing it all on on somebody else to deal with right the problem is that like as a developer of who wants to build on top of the protocol as soon as i start thinking about like well how am i going to handle this it becomes like super complicated

because it means that somewhere there needs to be like data available right we go back to like what is the data availability layer looks like and on top of it it's not just it needs to be available it needs to be really fast so so like kind of the on-chain data availability the reason it's fast is because all those people are super motivated otherwise it's going to get slashed right but like as soon as you say well the validators actually don't care about data anymore right they just like you know they just receive transactions with all the data they need they execute it and they're done on the side of like developing this client and protocol is easy and it also removes big big chunk of like economic issues which is like how to like how to charge for storing data on

chain but now you have this this whole like this problem didn't didn't disappear from the ecosystem you just moved it to somebody else to deal with right so now you have like things like for example let's let's talk about x1 let's say it's one transitions to stateless the world now you have infuria the graph like all the systems now still need to maintain the data because they will need to still feed like give data to their users and so now they need to do it and if they go down which you know they do well everybody is completely like screwed because like where else can you gonna get data you cannot go to miners anymore they don't have data like you really need like one of these guys to actually work

and so so obviously there'll be archival nodes which will have data but again like there's no like we already know there's no motivation to run archival node in the first place so the only people who run archival nodes are infuriated graph and like other kind of data providers and so so you kind of like you remove this problem but i haven't seen at least yet a solution for this problem on the other side right how the users will be giving getting access to this data because to send a transaction now you do need to get like all of the like merkle path right to your balance right for example even in a simple case like i want to send you some eth i need to get like a merkle pass to my account right so i need to maintain that information like somewhere i need to

pull it some somewhere so part of part of like i'm yeah i'm trying to get in more with some folks who are like working on this uh personally and also our team is talking but i think like it's it it's not yet like fully thought out from perspective of like how it will affect the whole ecosystem yeah and also just just going back to that episode from last week we actually did bank this distinction between stateless clients and stateless validators or validation rather in what you just talked about would you also put stateless validation in there like or is that a sort of different angle from what we just i would say like i mean status validation is what you want because the reason for example we cannot change number of shards dynamically all the time is because we have validators need to

get state right like i'm like why i'm saying like if if we were rent stateless it would solve so many problems for us like we've thought about it right and we actually have we have all the stateless like client stuff built yeah because challenges are actually challenges are actually validated in a stateless manner like when you send the transactions and you send the state affected and we can validate this in a stateless manner like across the whole network so like we already built all that the problem is we just yeah if we shift to that then like well who has data right like yeah so so there is like there's this missing piece i think which i mean i'm actually interested like maybe ethereum there's some folks in the theorem who already sought it out so like i'm really

interested to learn from them in this case uh but i've i haven't seen yet like a a clear plan why like what's the motivation to maintain this data kind of somewhere else and fee and also serve it right in a way it's actually like something like file coin right or like some data storage solution may be like closer to how then this needs to function but then like falcon serving data in falcon itself has all the problems right you need to pay for it to get data well how do i pay for to get data if to pay i need a data to send a transaction and it's like anyway there's like a lot of those kind of interesting questions like how to design this in like really working way cool i had anatoly on from solana with guest host giorgio's

also a few months ago and he had this extreme anti-sharding set sentiment and as like a team that's very focused on sharding i always like because we had that interview and i left it we never i haven't quite i haven't had a chance to really revisit that but i want to hear sort of a counterbalance argument from you um i'm sure you know his argument right oh yeah like you are friends you guys yeah we we worked across across the road from each other actually in san francisco so yeah i think so so there's like a snarky answer which is uh if anatoly is right then the mainframe is enough to like one mainframe is how google and facebook should be running their infrastructure okay

right but experience proves otherwise i guess yes yes there's kind of two conceptual reasons right one conceptual reason is that yes you can rely on like a very optimized you know pieces of hardware that like cans kind of scale up in in big ways but this piece of hardware will always be expensive right and kind of his point is like you know moore's law double every every two years and like but the bleeding edge will be super expensive not a lot of people can afford it but also you need like very fast network like the fastest network possible and on top of it it's still only double it double every two years and kind of

if you think from like facebook adoption google adoption like the adoption we want right not adoption we have right now sadly like we don't want double every two years right we want you know like 10x in you know in a year for example yeah or something like we want you know billions of people using this and obviously that billions of people cannot fit on one computer at least like not not in foreseeable future so that's kind of one side and it's kind of like like there's a usage on one side and there's centralization on the other side right the centralization part is like there's only that many people who can afford to run this hardware and so sharding solves these problems right charting says like well we will run on kind of on less sophisticated hardware uh like it's still you know reasonable hardware at least right now

well the status validation can be actually less sophisticated but um the like we can actually scale up and we also don't need to have everybody like receiving all the transactions all the time so we don't need to have huge bandwidth uh requirements either and instead you know we kind of scale out so that that is like one part and the other part is actually very interesting which is like salon is built on is actually different from how ethereum built it's different from how other like like one chain networks build it's actually built in very similar way as we build it because they like they want to paralyze as much as possible they want to use all hardware which is a lot of cpus which is a lot of things and so ethereum is actually not built like that ethereum is kind of one

process running stuff solana paralyzes execution of multiple contracts otherwise you cannot achieve you know actual performance with like more cpus and more hard drives which is actually actually what sharding is sharding is literally paralyzing stuff yeah it's just like it's done on one machine instead of done on multiple machines and so so the the kind of like all the issues like we have on on the kind of like and and some other like and how users need to like work with the stuff they actually have them as well it almost sounds like the the parallelization moves up a level in the sharding system yeah exactly yeah so we're just like well if everything's paralyzed how do we solve this right and and and like the interesting thing is

like we can say well let's just run our shards on on the same machines like all machines run all shards and then we kind of get solana to like too big extent uh and and then so so we actually have this like the way we're rolling out sharding is so we start i mean we can go into that a little bit more but you can actually like in reality say well some some shards will be running together right it's just like they need to run on more sophisticated hardware and some shards can like scale out right and so in this way you can actually combine this like different like requirements and different environments a little bit uh while still maintaining like the same developer experience are your in in here are the shards homogeneous are they

identical yes and soon no what what um we started with everything's homogeneous and actually like the interesting thing because the way we actually start blocks not not there's an interesting like mind shift you can think of it every account and contract on year is its own shard huh and instead we group them into batches for optimizing processing right so if you have your own contract or your own account it actually lives on its own chart and then we just group them kind of batch them in a way

such that uh you know you don't waste resources right yeah and so that's the idea like the block every transaction kind of comes into its own chart but then you just batch them to execute them into the shards that you kind of described into the shards yeah yeah yeah into the actual like physical charts right and so and from like from perspective like salon actually works kind of the same way it's like every every contract in account is actually it runs in parallel right and then uh they're just like batched you can think of it as a batch on one machine and now that's why we can actually change number of shards very easily we just rebatch where the accounts are on on what shards so this is very different from how like for example obviously like polka dot and but also

any other like most of the other sharding networks think of it because you have like pretty much in in other sharing networks or in ethereum 2 serenity design you kind of have an account on every shard in a way because you like and you need to send money to yourself and there's a chart and like your wallet needs to show it somehow and it's like super complicated like for a user like now i need to think of like well do i have money on that account do i have die on that account if i want to like you know use maker on that chart and like do i need like so so we kind of removed all that we said well like from a user perspective like you don't need to think about it you just have one account and we just say well the contract cross

account communication all of this is across chart communication even if they right now in the same chart this allows us to rebadge things and it kind of makes everything in a way homogeneous because like everybody runs the same thing but now the interesting thing is well actually because each contract is is its own chart in a way you can say well one construct will be something else so for example we're going to be launching evm as a contract on near whoa so evm like ethedium virtual machine with all the accounts and contracts will be launched as a one contractor near and so inside it you have all this like ethereum contracts and accounts and

everything right yeah and like you can think of it as it's like without launching and then on top of that you'd have solidity code running so you'd be yeah running on of evm on the actual okay exactly yeah yeah and like you can think of it as actually this is what uh polkadot is like your your one substrate chain is really just one contract that then runs on relay chain like your power chains are just contracts that run the delay chain that's that's kind of and then the parachain could be like exactly yeah or something else okay so so so this is what we're launching right now is like evm is and and so it actually will not be the its own like physical shot right away

because it's not worth it right right now we don't have will not have in the beginning enough processing but as it grows as usage grows in the tvm it actually can pop up into its own physical chart so it depends on the usage not on on how we want it but also this means that anybody else can say like well i want an oracle shard or whatever and you know you deploy a contract that does that and then maybe like we are thinking about adding like ability to prepay for some specific gas limit so that you say well i want this much gas be like allocated for me and then so based on that you may allocate it like into its own chart or like into its own mini shard are are the shards specific sizes like is there a limit to the size of a shard and so you could

almost like buy the entire one yeah so that's kind of the idea is like each shard is really like what what the benchmarking is so we want like one second blocks so you need to execute like within like the shard execution should take like 0.8.9 it's like it tries to balance it so it fits plus data distribution everything and we have like obviously gas estimation for everything to kind of how to fit time on basic hardware to the execution and so this is this is kind of your limit how much one shard can have and so into this we kind of package all the all the contracts that can fit and yeah so you can't say like hey i want like whole shards for myself uh so we we don't have this implemented yet but like it's kind of it a lot like our system allows to do that because you

can just say like i want to prepay for this much gas for my contract or set of contracts and then like when you send transactions to those right they'll kind of go into its own like physical processing and so this is very valuable for oracle's for example because oracles don't want to be kind of squeezed by somebody else like even intermittently and so they may prepay like they don't need like a full shot space but they prepay for certain amount of capacity to just like always have have enough processing okay so i think now would be a really good time to go back to something you teased at the beginning this idea of like you've launched this new network i want to hear a little bit more about like what that

means for near like what is launching to mainnet do you have this entire system like ready poof presto are there steps are there stages yeah so we actually have had already a bunch of stages and probably going to have a bunch more or phases yeah what do we call them i guess phases yeah i think i think it's been yeah it's been a thing now so one thing is like launching network is super freaking hard like there's a multiple complicated parts and i would say we also like i mean we underestimated how much work it is multiple times to be honest right okay like we're like okay now we know what it is and then like no that that actually there's

a bunch of more work that you didn't think of and so yeah i mean i'm this is big part why i'm like like it's so hard to launch networks even even if you have all the code ready it's so much easier to just launch an app on an existing network so i mean this is like this kind of like i've been having this is a warning to all those l1 that are coming up yeah l once and but also and also like people who are trying to like you know launch it like it's their own cosmos network or or even pyrochain is like yes like the the framework solved a lot of problems for you but there's still a lot of more work that's kind of there to do uh to get it off the ground um would you say most of that is like lives in the

community side of things or is that like a technical challenge there's technical there's a kind of economic community communication like technical i mean obviously like we built all of our code base from scratch so there's a lot of technical thing which kind of we got ourselves into uh but then even after that right if you think of it like just coordinating a bunch of validators and getting them to be like running the same software you know making sure everything works networking firewalls all the stuff and obviously like now we have like this layer of professional validators so let me let me walk through kind of yeah how we've been launching right so i think like kind of a general practice now is has this like incentivized

test net the first time we started this was actually like end of november last year so like a year ago and so it was like a stake wars kind of idea we wanted kind of validators to like battle against each other and try to find vulnerabilities and what happened is our software was not ready at all right uh like it wasn't about battling against each other it was like can we get just getting it to work yeah and and the the part is like in our kind of we it's not like we were like hey you know we wrote some code it's ready to go no we had like bunch of testing we had our own internal networks we had all the stuff and you know we it seems like it's ready but like the real world is just so much more unpredictable than uh than what you have kind of in

the lab and so so so we actually stopped our stake wars and we said like okay thanks everyone this was uh very informative uh we're gonna we're gonna take the time back to like actually like analyze and and find the core process issues in our kind of way of doing things and so so this led to like multiple changes on kind of how we do software development like pull request reviews how we do release process how we do testing and and kind of what kind of testing we do as well and so this like we kind of revamped the whole process and restarted like i mean with that we kind of fixed a lot of problems and found a lot of problems and restarted

stake wars again um in like february march this year and so with that it actually worked way better some people were like it works too well like you got why are you guys launching so late but but you had learned a lesson that you there were huge cases you had to really try out for yeah really look out for because i mean one of the things is like if you have like very like non-based software you get a lot of the same problems all the time and it actually stresses people out like kind of that's actually developing right it's really hard to like communicate around it so now like with kind of very straightforward process it was like very easy because we're like well we're going to be like hard forking the network

every every this much so like if there is issues if networks stop it's like okay fine we're going to restart and like this is also like lessons learned obviously like from cosmos ecosystem so like like zacchaeus recommendation etc been kind of incorporated into this so that started and even then there was a lot of like really funky problems that kind of came out right and so each funky problem we saw we kind of incorporated it into our like lab testing so we have this like uh we call it the nadak a testing suite there's like 100 20 130 like scenarios and so this is not like unit tests or integration tests this is a full like cluster spinning up a cluster of nodes and doing something with them and seeing

that everything works so it's like you spin up a cluster you send malicious blocks you spin up a cluster you drop nodes you restart nodes you like hammer them with transactions you like do all kinds of stuff uh you know you change ebooks you kind of remove validators and in like ad validators all those like scenarios is this something that you built or is this something that's standard is this like an existing tool set we have builders this is actually this is actually alex's experience from mem sequel oh yeah uh which we should have adopted way earlier but it's good to adapt that uh i think it's a standard thing for like in the centralized development environment and i was actually surprised i've been talking with like

open ethereum team and the ethereum actually has a version of this but it's a kind of it doesn't seem like it's actually being like fully used uh so actually actually super like i'm gonna put some bounties for people to like to use nadak to use our infra to run ethereum clients on it to test uh kind of their scenarios as well interesting um because i think like this is a yeah this is very powerful framework to kind of test this like very complicated setups i think like they have they have the c4 but actually for this one the cathedral foundation has a framework but like i don't think it's been like exercising a lot of the a lot of the like kind of more networking level problems like i think that the frameworks they have right now is mostly

for consensus part but anyways but this idea like it actually helped us a lot right to kind of standardize how kind of developers can test like can get like battle tested their code before before uh submitting it and so it helped a lot but still we had all kinds of like random weird stuff happening like one of the valedictories had like some cpu instruction missing on their on their like somewhat new uh cpu and that led to like a fork of the network right and all the edge cases you're gonna have to think about my goodness and then we also had like upgradability was so we introduced upgradability it came kind of late like we were already like in like during this process and like we were

pretty like stable and so introduced upgradability because we were like well as we launch mainnet right we will want to continue evolving the protocol and it's important that like it's pretty easy to do right and so we introduced kind of like a protocol level of gradability and that on its own led to a bunch of stuff because actually like we haven't really tested it well in this lab and so when you know when network upgraded and like some people didn't and then there's like you know all kinds of fun stuff that happened so yeah so a lot of just like edge cases and random weird stuffs that happen that what we did right we just took it and we implemented it in snadac and just like keep kept building up the library of this like uh kind of stress test for the network so so that's been like

the kind of summer let's just say and so with that right we've we've had kind of a we call it the betternet uh so betternet was our network where pretty much it was hardworking all the time so it wasn't for developers but it was for validators to like just really hammer at it like we had hundred plus people like hammering in it all the time like it was professional validators but also like a bunch of people from kind of community who came in who was like hey i wanna figure out how to run nodes uh let me try it and so like learned a lot figured out a lot and then kind of we transitioned them to like our official testnet so our test net actually the interesting history for it this testnet has been running since april 19. so it's the same network that's been hard forked and upgraded

into what it runs right now with was not changing state so like if you deployed some contract in april 19 it's still there still there wow and so it took a lot of work to to make that work but but so because of this like some we had like a you know a group of developers who've been developing and near and so they've been kind of using this test net so we introduced kind of validators to that network and like by that time everybody already learned kind of how to how to do the work how to like how to validate what does all the kind of like we have smart contracts taking so it's like a little bit more interesting and but also complicated for validators but uh yeah so this is like then we ran test it for a while

making sure that that operates properly and so then in parallel actually we launched a proof of authority version or like kind of permissioned version of mainnet and so we did that in like end of april beginning of may and the idea was there's actually a chicken and egg problem of a lot of tooling needs mainnet to start being built and at the same time we needed a lot of tooling for mainnet right like a wallet explorer all the stuff right we wanted to test it on mainnet but like it needed mainnet to to to be tested right and like you know sometimes need mainnet to be tested it's like couldn't you test that on a test net like all the accounts and all

that stuff yeah so we tested everything on testnet obviously but like for a lot of like actual you know real stuff you still want like still kind of acceptance testing on mainnet right and the same type of thing for like talking distribution like sounds uh like kind of other stuff because like obviously like some accounts are different the keys will be different all the stuff will be different so we kind of like launched this poa so we can start like getting some developers to to like really deploy to mainnet and actually test everything yeah and this still was like kind of operated by us and so there's a lot of constraints but what it allowed us to do is actually not needing this like oh today everybody's starting mainnet it was like now that you know how tested

works you can actually onboard the mainnet so we had like the slow process of validators coming in uh through pretty much august september and september 24th is where we stopped validating completely mainnet right so it was kind of not like a step function where it's like okay today you know everything launched it was like a smooth function where it's like you know started was like near foundation and then over time like all the validators were kind of external yeah and i should say like the zero knowledge validator which i've mentioned a few times on the show is a validator on near and that is actually where i started to see more about the near network it was probably like you know earlier on this summer so i did see a little bit of beta net to testnet to mainnet

i guess this is the big challenge for the rollout is having i mean has has anyone tried i don't know if cosmos did it this way but like has anyone tried to go straight in like launch mainnet with validators day one so i think like everybody's in recent days uh like maybe like in in 17 beginning of 18 is different but like cosmos polkadot and us we all launched with kind of uh restricted tokens so we did not allow to transfer tokens and we gave this decision to the community itself the cosmos did start with like already a set of validators on day one us and polkadot have kind of uh randomly poised

version two yeah public yeah and cosmos i mean big reason is like all the valid like customers been building this validated community for two years so like to to big extent like us being able to build it like quicker is the reason because cosmos already paved a lot of work yeah for a lot of work for a lot of us yeah and uh so they had like this people who are kind of ready to go and they've been doing this for two years and and uh like it was like on day one they had had all of them kind of ready to go yeah uh in our case yeah we kind of built them up like and trained them and big part of it like we like our system is pretty different like we have different account

model we have you know smart contract staking we do have sharding like there's like some other stuff that's kind of uh like interestingly different and it was like really good to have like people kind of test everything before they you know like i think like if we tried to launch it on day one it would have been like a pretty pretty dramatic like mess yeah no definitely there was like these small steps and like educating the validators as they go as you were rolling it out there were like parts that we had to do to get to get on board um are you let's talk a little bit about like building these validators this this group how did you go about putting that together was it like existing validators like what was your thinking around it

yeah so it was as i said like combination it was existing kind of professional validators who already been doing this on like cosmos some were doing this on teslas it's a pretty small community at the end right so we like connected to most of them one way or another so uh we kind of been talking to them before and we just invited them to this like beta net when when it started and at the same time we made it open right so we said like hey anybody can apply we actually had like over 300 something applications when we just launched it and so this like big part of it was like this professional ones but also like there's a lot more people who are kind of like i'm a you know like a developer who's

interested in this stuff or i'm a developer but actually i've been validating something some on some test nets or i am validating some one other network and so so this group of people they were kind of i would say newer to like to the validating in general but at the end like you know they gave a lot of feedback as well because there were people who are maybe less like they're newer so they have a fresh eye so they can give give kind of more and also they were writing like all kinds of different hardware like as i said a lot of people running in cloud but a lot of people were running like dedicated hardware with like all kinds of random random things like like docker is not working and stuff like this there we had like a set of challenges where kind of through doing them you

kind of learn how everything works and you also write documentation or tutorials for other people to learn so it's kind of like learning fire training by fire yeah training by fire but also like like the thing we're trying to do is find these people who are like who are excited and willing to do it and use them kind of as an amplifier right so like i was mentioned as like a fractal fractal model is i think like obviously like as a kind of core team and as like as now network launch to kind of our role you know is still pushing some of the infrastuff but at the end it is that work you know of the community so we want kind of in a community people who around whom they'll be kind of keep growing the network and ideally it

will span up its own like kind of uh like maybe as a tree right and so so we we we've been kind of doing that on the other side and we also started doing this on the kind of community side so we have this guild guilds program which is really around like if you're interested in creating a community around some topic uh which is related to near in some way right like like we can actually like help you and fund you and you know give you tools and and kind of place and everything to to grow that right so and ideally you know like there will be meta guilds which will spun up into a bunch of other guilds and stuff like this like so that's been kind of growing like we have really cool create bass guild uh running by mid bass

which is like about nfts on the air right they just had a treasure hunt actually uh yesterday inside uh like a kind of this vr experience oh yeah i saw that neat i didn't get a chance to do it i love that connection though nfts to vr but but yeah so this is ideas like you know invalidators kind of has the same thing so one of the validators like has he has been running russian community for near and now he's like he built already like two applications right on near as well right so and and kind of like from there like from that russian community there's also like new validators by now that actually like you know kind of doing their own like ecosystem stuff in the works so so really to trying to grow

from there where it's like you know the educate kind of next generation the next generation becomes like you know on its own kind of uh evangelists in the in the system let's talk now a little bit about like to go forward on this community topic like how are you incentivizing people to actually build on near like why build on near when there's all these other l ones that we've talked about what's the benefit and i feel like i mean you guys especially have really worked on on making this the developer experience so i'm curious to hear what you say yeah so i think there is kind of a few levels of this right so the reason why we started this right was because we wanted to build something ourselves

in in kind of this blockchain space and we realized like how hard it is and also i mean obviously like scalability being one kind of hard part and also just building is another hard part so we focused a lot on kind of reducing this barrier to entry and to be honest like we're not there yet like there's still a lot of work to do right i mean we've we've solved some problems and there's still other problems that we like we're still identifying as we bring more developers in and seeing kind of their feedback but the kind of the goal right the aim is to yeah to make this experience really smooth for a new developer both from existing crypto and from like open source or even from kind of people who build software in other spaces like you have

those great moments where people like coming from ethereum ecosystem and say like holy this is so much easier and like you know i'm like up and running in in one day and already deployed something on testnet right and you're like yes this is great and then you have other people who come in it's like where is the graph where is the you don't have any tools yeah and you're like yes we we kind of we have like our day zero was you know november like october 13 right so give us some time right so so you have this kind of uh like there is still a lot of work but you know we have like this early early confirmation that we're on the right path now so this was like a kind of basic thing the other thing is and this is why like this is my belief

why i believe in in kind of blockchain in the first place right and we really like to kind of reframe this as open web because i think actually like i saw vitalik tweeted yesterday was like oh how do we rename the crypto space right uh and like what are the names like and the thing is like web 3 is is like it's cool for like just like geeks but it's not really means much for people and there's this concept of open web which existed for 15 years and google mozilla been pushing for it like a while ago and this is idea of really removing walled gardens this is the idea of really like kind of enabling people to interact with web without kind of boundaries and you know and centralized powers

and it's it's it's like back then when google was kind of fighting this microsoft was fighting with adobe it was flash with all those things they were like pushing for it and now when they're there are a little bit of walls but yeah but it sounds like this is so in line with the open source community the open source spirit decentralization exactly cool but then you go to open source people and you say like hey why are you guys not building a blockchain they were like blockchain isn't that like the whole scam thing that's been you know in 17. and so so the idea is actually bring bridge into this gap of like open source developers who building a lot of really cool software and not getting paid for it or getting paid by big companies and bridging this gap where we have this

token economics we have these instruments for like ownership economy for all those things and bringing them together and so to do that we we have few pieces one is on the protocol level and so this is this contract rewards uh kind of economic piece that we built into protocol where a percentage of transaction fees goes to the kind of contracts that are you know serving the user right and so this allows like as you build libraries as you build pieces like services and pieces of software on chain they actually accrue value like and they can be distributed to developer to like maybe a dow or something like like developer can decide how they can be distributed but this allows to have a business model

around open source and this is super different from what exists right now where you have developers who will produce some sort of very very important tool or code like some some kind of middleware i don't know if that's the right term but you know like something that will be used by other profit-making entities but there's no way to fund it and there's no reason to maintain it this is kind of trying to solve for that it sounds like exactly yeah i mean even if you think of it like unioswap is like originally right as as a piece of software didn't have a token it didn't have an economics like the developer unit swap actually were not able to kind of take a fee even off of this thing as like for regulatory reason but like all the people with money were benefiting right and it's kind of like it's it's very

mind-boggling and part of it is i think like this i call it ownership like ownership economy right this whole liquidity mining and all this stuff is kind of this idea of distributing ownership of something and so this is a very powerful concept that can be used across the whole space the kind of this idea i've been pitching which is like let's let's imagine we're building an instant messenger and you can actually distribute tokens to people who are bringing more people into this instant messenger right like so so you can leverage the same like kind of liquidity mining patterns and like distribute to people who are adding value to your network like to whatever network it is instant messenger you know gig economy whatever like a marketplace for nfts right you can leverage the same patterns everywhere so this is kind of the second

layer of economics which is i'm actually like i'm writing a blog post about this but like i mean all this is like this is not news i'm just kind of trying to summarize it into like a pattern and then give like people some tools so so they can do it and so this is built on top of kind of this like open source libraries and services which then will be accruing part of the value from there that sounds like something that would be really appealing to that to that community is there anything else that you've done that makes it sort of easier to to build on near one piece that we've we've started working actually way like long ago we actually started working also last year somewhere around this time is a bridge to ethereum

and our original like from the beginning we were like uh you can do kind of a multi-sig approach where you know like few people sign but this creates such a big like vulnerability in the whole system that like we wanted something that's like trustless and decentralized from the start so anton who is a co-founder of one inch uh back then was working on like how to do this and so he figured out a way kind of piecing together some work that khyber network did and some like kind of new stuff on our side and we actually changed our protocol a little bit like which like i mean some technical parts right how are blocks organized et cetera to enable this new like rainbow bridge between ethereum and near in a fully

trustless manner so so this thing like it's pretty much we actually have a private beta uh that's coming out and so we had a like it's been running on test net we had security reviews we had a hackathon with a bunch of people building on top of it and so the idea is it allows you in a trustless manner to connect those two networks to transfer assets tokens nfts whatever you want and also to really do anything you want you can call contracts on the other side you can like prove that some piece of data exists on the other chain like you can actually read data from some other contracts uh on the other chain without even having to call a transaction on the other side so it's very like versatile protocol it actually works also with

like other networks like anything that has like as a smart contract so it can be like programmed like uh cosmos and like in substrate networks like you can actually link using the same protocol you can link to them as well and so there's like few folks are working with a few other chains to see how how to do that but like with the cdm specifically this allows the developers on near to leverage all the kind of assets from start for example if you're building some new assets or new marketplaces you can kind of leverage the like assets from ethereum or you can bring your assets to ethereum and leverage the existing like exchanges etc so it creates this like very interoperable uh system is this bridge is it a mint and burn or a lock and unlock

uh well it actually depends on uh what you're doing so even oh so so so the mid the bridge itself is actually like it's a three-layer architecture and so on the top like first two layers are providing the proving infrastructure it's a proof that some information or something happened on the other chain and then on the third layer is we call it application the connector layer and this is where you as a developer can define whatever you want and so for example for token for erc20 to like near's version of it it's a lock you know mint and burn unlock kind of model but you can also build your own like if it's not like an existing token but a new token that you want to deploy on both sides

it can be mint burn on both sides or it can be whatever you want right you can also like unlock i don't know like you can have pools you can have like so so some people actually already working on a cross chain pool which like is is instead of having like kind of your situation that you send you're actually maintaining balances that kind of are joint balance between those two things and you just kind of settling underneath how things are for example ample force like we have a bounty with ample force and ample force you cannot like just you know send tokens directly because you know the balance that's the rebase can change your amounts so you actually need to handle it a little bit differently on this connector level and so this connector level is really where developers can go crazy and develop

kind of lots of cool stuff there including like a liquidity mining connector that you know as you deposit more funds you know you maybe get like another token or stuff like this so you just mentioned sort of these three layers and that there's this proof layer do you know if there's a chance to put like zkp's in that proof layer or do you think of using that or is that totally off the table no no it's totally on the table it's totally like we have i actually have a bounty sorry as as the zk podcast and zk validator these are the questions i need to ask so we have a bounty actually out for building a zero knowledge uh or like succinct proof for our light client so one of the issues with ethereum is that ethereum is it's it's expensive and it's actually

pretty limited on how much computation you could do like our like client i mean we made it very cheap but still costs like pretty pretty expensive to verify all the signatures so we actually like yeah like our light client can be succinctly proved with with zero knowledge proof and that would actually speed up the connectivity between near and ethereum very much and then on top of it yeah any any other proofs like there's a there's a bunch of proofs that uh flying around can also be like uh compressed versus zero not like with a recursive zero knowledge proof so yes for sure there's a lot there's a lot of cool cool cool stuff there to do so yeah if anybody like uh uh on this podcast ex interested and excited to build something like this

reach out uh we have we have like funding to do that and i mean we also can connect you to all the people in this ecosystem however kansas very cool well listen ilya i want to say thank you so much for coming back on the show and sharing this update with us yeah thanks a lot i mean thanks for supporting us as well with the zero knowledge validator and yeah thanks for great questions cool and to our listeners thanks for listening