Whiteboard Series with NEAR | Ep: 33 Alex from NEAR hosted by Justin Drake from Ethereum Foundation
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
Whiteboard Series with NEAR | Ep: 33 Alex from NEAR hosted by Justin Drake from Ethereum Foundation
Ethereum Foundation Engineer Justin Drake ( / drakefjustin ) and NEAR Co-Founder Alex Skidanov ( / alexskidanov ) do a deep dive on the NEAR Protocol Sharding design Nightshade (near.ai/nightshade), and Consensus algorithm (near.ai/doomslug), covering such topics as slashing, cross-shard transactions, economics in sharded systems and others.
Important links in the video -
At 9:28 - near.ai/slashing At 15:30 - near.ai/doomslug
------ About Whiteboard Series --------
The Whiteboard Series with NEAR is a set of video interviews with Founders who are building scalable solutions for Blockchain. We deep dive into their story, what they're developing and how it is helping the ecosystem.
Follow the latest from NEAR Protocol on,
Website: nearprotocol.com Discord: near.ai/discord Medium: near.ai/medium Twitter: near.ai/twitter GitHub: near.ai/github
#WhiteboardSeries #Blockchain #FutureIsNEAR
Transcript
17,302 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:03
hi welcome again in our next episode we have Alex Skidanov off from near who's going to you know tell us about the details of his design and as kind of framing for the discussion my understanding is that near basically use if - as a starting point at least a design from maybe a yoga or year and a half ago some aspects of it definitely yeah some aspects of it and you kind of fucked up so it would be interesting to see what what the key differences are between it - and there yep let's dive in cool so one of the things that I've
- 0:44
prepared is just to provide some some grounding is some of the design decisions in in if - and yeah we good as we talk about this like fill in the table for now yep yeah so so before before we do that they want me like to briefly the code nitrate so that when we use terms as we go through that yeah yeah please yeah I mean go ahead yeah okay so so the biggest working point between near and well I call the more classic charging designs so aetherium
- 1:19
uses so the more classic charging designs they have short chains where every chart chain is effectively to an extent it is an independent blockchain right so they're multiple short chains and the and there is a single chain which is what we'll refer to this beacon chain that's in the theorem term there's a single chain which has first of all significantly higher security then than all the remaining chains so everybody or like a very large percentage of
- 1:49
participants validates beacon chain and only a sample validates a wishart chain and so beacon chain is responsible for many things one of them is generating unbearable randomness and some others would be some way of improving security of every short chain so for example one common way of doing one common thing that exists in many such protocols is or for short chains to respect the last
- 2:16
block that is known to the beacon chain see if we can chain acknowledged in some way that it saw this block and the short chain will never built on top of anything that that is not this block so that's one of the things that we can chain might be doing so instead what we do in near which is we we took a step to simplify this process so specifically the problem is that when you when you need to orchestrate multiple chains the the implementation becomes pretty
- 2:43
complex right you need to maintain each each chain to an extent has its own fortune jewel its own consensus and orchestrating all of that becomes designing it thinking about it becomes more complex so near instead there's only one chain which we recall it the main chain we can also call it the nitrogen and this entire design is is called nightshade and so what happens is in this main chain every block so it has a header with the pretty standard things
- 3:15
like previous block or a global stage with etc and logically but not physically this block will also contain all the transactions that happened from the previous block however physically what will actually happen is similar similar to other charting designs this state is logically split into multiple shards so for example we can think of the entire state as I can continue a set of account IDs which is split at some bound agent to let's say for shorts and
- 3:44
so any any transaction that touches a particular shirt so all the transactions that touch the short one they will load they will physically be grouped into a thing called chunk for short one all the transaction that tied sure to will will will logically be grouped into chunk two etc and so even though logically the block contains all those transactions physically people will only download the
- 4:07
block and the block contains the headers of the chunks but then they will only download chunks for the shards they actually care about and so every every block contains at most one chunk for a particular sure but it could contain zero for example if the chain producer failed to produce it or if it wasn't sent on time and so you can think of chunks as those chunks they closely resemble are the church in right so the chunk builds on top of the previous chunk and it builds on top of the state that the previous Chang was the result
- 4:38
of applying transactions in the previous chunk but but it becomes simpler in many other aspects for example there's only one for chisel now there's only one concept of finality there's only one concerns was running here and it also simplifies to an extent the way obviously now same as with the short change design the concept of cross our transactions appears right if a transaction previously in an onshore the chain would have touched accountant two
- 5:05
different shirts now it has to be executed separately in every shirt and so the shirts need to communicate so that also becomes simpler to an extent and so let's see let's see how it fits into the table and then if something is not covered with this particular separation we can cover it later so I have a few questions here so are you saying that you have chunk produces and then block produces right so the way it works is that there
- 5:34
is a single set of block producers so let's say in in our design that number today is between 100 and 200 so if it's more than 200 the system as built today will not necessarily be able to handle it so the 200 block producers they take turns producing blocks yeah right and then they also each of them as a sign to some sub sort of shirts right and so within those charts they also take turns producing chunks okay right so you could
- 6:02
think about it like every like let's say five of the first five are assigned to maintain the first five shots and then the next type of a choice do you have they're probably going to launch for something very small like 8 but like up to up to a hundred today will probably be handleable oh how the green one doesn't work orange okay so you have you have eight shots we have 64 and so so
- 6:36
part of the idea here that we want to launch something that that is meaningful today right so today is especially given like the like it will take time for the wider adoption so a chart will be more than sufficient and there is that once it is shipped and it was operational then we can do so so number of hours we can just do an upgrade and increase after one hundred right but also increasing like beyond 200 validators or beyond what produced
- 7:00
restore beyond 200 charts we can we can be building the tag to support that as as the system already is operational and ok and that option is already so for us the minimum stake is 32 Eve so if you look at the kind of max number of validators then we get we get about 4 million validators oh that's like if you divide the total yeah and for you are you saying that the maximum abilities is
- 7:32
around 200 right and so instead of having the maximum the specific stake what happens is everyone in the system can stake any amount at any point right so you just go and you should have taking transaction and you just say how much you want to stake right and that amount gets locked right and what happens is that at the beginning of every epoch and epoch is approximately half a day at the beginning every epoch we find such a threshold that if you
- 7:57
divide every stake by that threshold then you get at least 200 full seats right but but any any higher threshold will yield less than 200 right and so that will be the the price of a single seat right so for example if I stay conduct you speak 50 and when you teach it total it will say well tassel 250 because if I divide by 50 I will get two sheets and you get one divided by fifty
- 8:20
one I would get one you would get zero and so we don't have enough and like sticking is purely optional right it's and there's no like delegation so we actually do build delegation you have delegation we at least I personally am extremely against delegation okay however however what will happen if you don't suffer if you don't support delegation people will still delegate with the idea that a not everybody wants to run a validator or like blow
- 8:45
producing note and be many people will be uncomfortable running their own infrastructure because there is a high chance of messing it up and getting slashed people will delegate they will just do it off gym they will just go to one of the professional validators who exist today and they will just transfer their money and do like a paper contract which is a perfectly viable solution but now the system does have now it becomes non
- 9:06
transparently so we have no insight into how how bad it is actually well if delegation exists on chain we have we have very clear picture of how much is actually delegated we see the extent of the of the disaster right so delegation will be supported convey and the delegation is it that you can get slashed if if you delegate to stake to someone else someone else to whom you delegated maitika can be the dispatchable actor you get slashed okay
- 9:34
great and like how do you split the rewards is that so so the reward is effectively at the end of the epoch the total reward is just split I think it's either equally with everybody or proportional to the number of block blocks produced but yeah it happens at the end of the epoch okay but I guess the split in between the delegate T and delegate error so that is interesting so what happens is staking happens to a smart contract so every delegate T I guess whoever is actually running the validator
- 10:09
right have a smart contract which outlines all the rules of how exactly the stake will be distributed so in the simplest form it will say I will just give you 80 percent back of the award proportional to to your state but it could be arbitrary smart contract which will distribute the rewards back oh that's cool so you kind of have delegation abstraction yes so these infer that is that one of the big cause most validators today has 0%
- 10:31
or like hundred percent fee and then off chain they distribute reward according to some custom rule because it's already happening in practice right it makes sense to to automate it okay great and what do you think in practice will be like the minimum like amount of value that you need to have one seat yes them so I think if we figure out the percentage of total stake right that can easily be derived right so if it's like let's say dog lost a kiss three is
- 11:01
thirty percent then thirty percent over two hundred will be the cost of a single seat it it's hard to estimate the percentage right so so frigid I don't have my own estimate Ilya my the other your co-founder he thinks is going to be over 50% total stake at least initially especially given that many of the initial near holders their tokens are locked meaning that they can stay but they cannot transfer them I think is only thing they can do mm-hm yeah so so just like think about
- 11:29
like let's say 60% is locked so that means 0.3 percent is very minimum stake for this sheet if you have less than that you can you can run you can still run a load it will not be just immediately returned to you you can you can claim it back right how about ideas that you want to be a fisherman you need to please some stick so that we can we can you need we need to be able to slash
- 11:50
you if you submit an invalid challenge so you can run a fisherman and there's no reward for the fisherman mm-hm so a fisherman is entirely willing you it's volunteer Lee Act reasons for that is that it's actually very hard to create fishermen do work in such a way that whomever inputs your transaction just doesn't steal your challenge like you need to do some commit reveal right of some sort and so instead of that we're just saying there are clearly entities
- 12:14
who will be willing to run fishermen like ourselves right well like hypothetically exchange that is running near and has a large stake in it so there are there's plenty of entities who will voluntarily run fishermen right and then nitrate has this concept of qidan validators which we don't ship initially but it's going to be like in one of the few future updates which provides you an extra layer of certainty that even if you don't trust there is a future man
- 12:35
they will be someone assigned to validate the shard who is not known to the system and so you get the next level we can dive different into it later okay so I guess I have a couple questions one is you know you mentioned the road map that some features are coming later right like we have phase zero phase one phase two what is your deployment roadmap right so I think ours is way
- 13:01
shorter so this is an usual mean that yes which will be launched I cannot I cannot provide exact date it depends a lot on stability right well March it will take until we actually certain that it will not go to on 2019 right it will not happen in 2019 anymore for sure and so there are two big features that are going to be included it's unbearable randomness beacon which we have actually built like it's on github right but stabilizing it will take longer than
- 13:32
comfortable yeah delaying the the launch and hidden validators so those are two big features yeah and hidden Valladares don't even started yet right but besides that these sort of long tail of things such as we do need to scale beyond 200 validators right at some point right early on it doesn't matter because we're not going to have enough like the number of total and professional people who run validators today is like in all hundreds right so
- 13:58
everybody who wants to run clearly will be able to about long term it means to scale yeah so this this max number value is 200 that's like a technical restriction it's not an economic one yep so 200 today is beyond 200 we like we will not have the blob production time for example that we want to have okay what is the blob production time we wish to have one second at some point okay today it is not there yeah but we can we can sort of draw the timeline of how
- 14:23
messages pass and according to the family in one second is technically possible right today it's somewhere between two and three seconds is what we can push okay yeah but like once we once we dive deeper into dooms like and nitric like we can just draw the timeline of how messages travel for the block to be produced right and in fact early what it boils down to is it needs to have two round trips between most of the
- 14:50
validators and and validating transactions which is two round trips okay yeah which is which is like round trip between China and Iran to Texas 200 milliseconds so without domestically without gossip network that that would fit with gossip network it becomes more challenging yeah okay interesting and how does your system degrade if latency becomes very high so what happens is so that boom slug right I can also cover things like quickly so
- 15:17
that all these thing looks yeah so those like is this nice so those like is a very new thing right so the initial almost like we published on the last day of the previous decade so glad to go haha and so those like is this very nice very simple construction which is when you produce blocks right so so I think this is sort of similar to to a theorem and many other systems blocks include approvals right or like some sort of
- 15:43
increase matter approvals or the examples just from all other block producers right yeah so that's something that will be used for if you now with gadgets etc we call them Atta stations you can call them vote yeah we can call them recall them approvals okay but yeah it's all the same thing you know like it's a message from all other every other block producer and or validator attesting to something in the past right it could be it could be the previous look it could be something else so specifically for
- 16:04
dooms like when you create the block to create a block you need you need this approval from 50% of the remaining block producers from the very previous block so that's one round-trip one book is published 50% of what producers needs to send it to you and once you have that 50% you can produce your book and do we have the 50% you cannot even produce it so the book that does not have 50% of
- 16:27
our Provost is invalid okay so what happens if you just don't get 50 percent then 50 if more if less than 50 percent are online at stalls Wow okay like definitely similar to definitely similar to almost everything which is at the table 2.0 but also it's not the third is 50% right so that's that's already mm-hmm it's not just a little bit better if you think about it right there's big difference right it's been requiring two
- 16:52
thirds of people and 50% yeah because Lauren is 50% is also has this side effect that if if you have a little less than 50% they could be another network in existence like why do you have less than 50% what producers one not right there's a global network split and there's another network building right okay so here we would get to this in question of consistency versus availability yeah if your law wasn't 50 percent clearly you look on the
- 17:15
available side right recording 51 percent is yeah cool being more on consistent side right exactly right and so it requires 50 cent of approvals on the very previous block and the way there's approvals work is the moment you see the book you immediately or like after waiting for a little bit for like let's say 200 milliseconds you sending approval to the next blog producer who you know and then you wait for some longer time let's say for like two seconds or like for one second or two seconds that's a parameter of the system and if
- 17:48
you don't see the blog then you send the same approval to the person two blocks ahead of you and then again if you don't see the block you know a little longer time you send approval to the next person right so he sent approvals to block proposals as opposed to actual blocks so you know so so from a given moment yeah you know blood proposes for every height going forward at least at least if no other blocks happen in between correct it is okay if the blood
- 18:13
proposes changed from the next block is produced if this block is the last block yeah then for the next block that is built on top of it you need to know block proposals for every height right depending on which hide the next block rule will be produced there could be skips right so like this kind like the current block has height five right you know that if the next look if it's on height six will be proposed by one person if it's grade 7 by some other etc right and so what you do is the moment
- 18:37
you see the block at height five humidities and approvals to the person you mediate isn't your approval to the person height six who will be proposing at head six and then even during one second you don't see the block you sent to the person who will be proposing at seven if during one second and 100 milliseconds you don't see the block you sent to the next guy and you increase the time every time mm-hm so you are sending approvals for a
- 19:00
specific block not for the tip of the chain as you know it right now yes right okay yeah and you're saying that every block can change the set of future so that today today our our schedule is fixed okay so when you have strong randomness that you talked about you will deploy also a way yes okay not necessarily because it does really help with get blessing because if you know the blog proposers for the particular block you can DDoS them it doesn't help in any way that the sharp oh right like if you don't using some Elgar and slash
- 19:34
robust magic they are DDoS about you know like so right the course is chase okay and so and so that's practically the entire don't slack and so what it gives is that property number one if a particular block has 51 percent of those approvals on the block at the very previous height and so the difference in Heights is exactly 1 then this block is reversible unless at least one seed gets slashed right okay so we call it boom
- 20:03
selection ality that makes sense here and then there's a phenology gadget which is running on top of that leveraging the very same approvals there's one extra field in their probe that phenology gadget it right and with the phenology gadget if everything goes very well the blocks are not skipped then when this block is produced this one becomes completely final by completely I mean like standard D of Technology where like one third needs to
- 20:24
be special right for it to be reversed the second problem but but if those like produces if there's a skip right so so for example it's u1 say let's say we configured it to be one second and one second is not realistic yeah right then you will expect to always have those skips and then you never have finality so what happens is in the domes like it has proven that after finite amount of time there will be because of the delay that after some finite amount of time there will be two
- 20:51
blocks in a row with atoms like finality right and so and and it will happen very closely very close to that moment when you actually cause the the time the actual realistic time out for the blocks right so those like rescue analogy and because of the sari lightness and because of those like blindness you know the gadget has lightens right I hope this to work and if there's a fork then
- 21:16
someone gets slashed and you can only slash people find a number of time okay so you have liveness at 50% yeah and then below 50% it's not just we don't have great dip lightness we don't have any Lightning right yeah okay so just to recap the fancy gadget if you have two blocks in a row both of which by construction will have at least 50% of the votes for the previous block then you in a situation where if there is a fork a break of the finality
- 21:44
then at least one first guess last almost oh of course oh I see okay but finality but but is also so for finality gadget it's a cape approval arise late so it's a key right some approval was looking for the senior yeah you've got a Pro Bowler I've mislaid yeah wait to graduate who will take advantage of it so now that you guys know we're using the assumption that the pros have to happen
- 22:08
on the very previous block yeah okay the same as Kasparov Jake is Casper frigid doesn't care when approval arrived Yeah right so you don't care between you know 50 and and above and 66 and above I guess we don't care even like from zero to two LM giggles yes yeah yeah yeah right but I guess first left for /table there's no flash hole behaviors and only go straight so four slash ball okay like personality or somebody will get slash there is the threshold of two thirds
- 22:37
right all right yeah right okay so basically you've taken these two things and you've called it doom plug and you have slightly different properties yeah okay thank you so yeah I would say like Ellen giggles dooms like and F of G is the phonology gadget we call it energy right you know what you gadget but you're saying that they kind of admissions and like slightly cleaner so energy will work with anything it will work with OMG ghost right it is similar to F of G the only like major difference is that in energy in F of G for finality
- 23:11
actually doing it two consecutive blocks well in your case it could be epochs right right it rocks it right but what we runs an hour together on the block level right so if we did use F of G would need to have two consecutive blocks where one of them has two thirds approve us on the previous one and n mg and I'm just very similar to F of G it's very similar commenced and as I have this requirement so you have you have okay so the folks voice is tube slogan
- 23:34
and you have n FG right yeah what Oh n is near of course per magnitude 98 okay great yep and it's my kind of generic G like it also uses like reference reference blocks it's very similar construction right but slightly different sufficiently different to remove that requirement okay great I mean while we're on the topic of like voting with steak I think it's very important to understand you know what is the distribution of steak because in if
- 24:03
to in a very unique position where you know we have a running network with you know let's say 30 billion dollars of steak and it's very and I think you know near you've come up with some clever ideas to find to have an initial distribution which is quite relatively in centralized so so those ideas are all currently in student discussion okay right so all the ideas were discussing last year yeah none of them is really in production yet okay right so we don't have some amount of pre-sale yeah which is below 30
- 24:36
percent or or like close to it which is split between us people who built it yeah and also people who co-founded it right right so and so it means 40 percent of this stake at launch or at lunch as much there okay right so the remaining 70 percent that goes to distribute them to the community okay exact way there are many ideas none of them still has decided to certainly take take place but but like some ideas would be to do something that
- 25:09
the handshake was doing handshake was like doing very very nice targeted drugs to my github account for example right where or like have some way of people doing some like doing logged jobs where people can look at video like what Edgware was doing people before us already found many many ways to distribute tokens we just we just need to to analyze and and and they also already did distribute tokens this way so what we need to do and we don't have
- 25:37
enough information yet is just to look how it went like what happened to the token holders of handshake right it's happened to the token holders of Edgware well sighs where is not I know they did launched a few days ago I think oh they did yeah great so so we will have we will have information mm-hmm to make a good but the collagen the goal is at least remaining 70% must be as distributed as possible right okay understood
- 26:04
after I get system chain recovered yeah so your system chain you call it the the main chain right yeah okay okay and for the deposits you know we have a deposit contract on - and you said you also have the contracts but you call them taking so that thing so that could have been a contract but instead it's just on the protocol level there is a separate kind of transaction right which is taking
- 26:32
transaction right where if you execute us taking transaction it locks the the money and in the next epoch if you do pass the threshold and you become a block producer if you don't you can at any point would throw the stick but for some of you have it you can you can you can relative so there's a stake transaction if you're delegating does it point towards a delegation contract cause if you delegate you that's not just taking
- 26:59
transaction that just oh yeah oh I see so basically you have a delegation contract and then the day the dessication contract makes to the staking transaction yeah okay cool so your negation from delegation contracts taking transaction is just one thing it can execute a delegation contract you don't like ask every particular entity that wants to be delegate key right uh-huh and so they responsible to audit it yeah okay great cool so yes one of the things that I've
- 27:35
been trying to to do in the space is have the various budgeting projects agree on basic primitives so can we talk about those yeah yeah so like one which is probably the least controversial which is the hash function do you use chat 56 so do you shut the 56 today yeah the right internal discussions to use like Blake 3 oh the non secure one that sort of so if it is not not secure that that will be brought up I guess right during the conversation that conversation is not very active so one of the biggest consideration for us
- 28:08
when we choose the primitives is that we need to have interrupted atheneum say we didn't one cannot alright we cannot use it right because we need like in any foreseeable future most of the assets we're gonna see them if we cannot freely speak to a theorem one we cannot we cannot take take advantage of those assets right and so the cash function use must be verifiable in the theorem signatures we use must be verifiable material right that's one of the big
- 28:36
considerations I actually don't know which be less curves you can validate to their own ethereal so right now only nope no bill describes only the bien to 5/4 but there is a proposal this two proposals I guess one is to just implement the most important curve for us probably which is be less 12 381 but there's a other proposal which is to have an opcode which is well actually a family of our codes which are much more general and supportive very wide range of curves so for example all the BLS 12 curves or
- 29:10
yeah but it's one of the reasons why we don't use BLS today is that when you only have 200 validators block producers it is actually feasible to send that many signatures right right but also because of that we can we can send our blocks to etherium and validate them in aetherium side because i did you two fight v online which can be validated on the team side ok so using EDG 500k and i
- 29:38
forget what is the opcode support for this on on the theorem one well I don't know I don't know Iver probably well if it is it supported on the - well I hope it is so the beauty of this particular curve is that and that's pretty hacky but this curve this curve can be converted to another curve called I think it's called distretto right which is the same as I did you two five five one line but the group size is actually a prime not prime multiplied by eight right so you remove the cofactor yeah so we don't do that under normal
- 30:12
operation in normal operation you only use it as indeed 5 - 9 but the random is beacon that we abandoned uses ristretto because it doesn't it how well do you abandoned it or you postponed responded well imagine for the initial watch right I'll turn initial launch with on you just yet though actually we're probably using for the GFS sorry VXR mm-hmm the same way but the cool thing is that the private can the public key from eg to 55.9 can be converted to ristretto by
- 30:37
just removing the cofactor yeah ok great and then I guess another primitive which would be good if we could standardize on and would be the networking layer what do you use there we use the PTT so networking I'm not the best person to top co-write whatsapp for some reason we stopped using liquid to pee okay the reasons I will not remember okay now but today we're not using whip-it - it's our language support so I mean you guys have writing in Russ it is last year at least parity with p2p right I think I think
- 31:13
generally most of the parity code we eventually removed was because of Perak uses very high abstraction layers right which are we use very low abstraction layers generally right and I think lip it was period so are using like a custom solution right now okay from scratch ok but it's not like we would be against to use with p2p right it's just that at that point it was cheaper for us to
- 32:05
build a custom don't understand the right I think it was like both pretty complex to understand but also at that point the stability was right I mean I think the PCP has a branch leaps and bounds in terms of production readiness with if to pushing it forward and all the other blocks in projects using it I mean one of the things that was that was mentioned is that like the maybe the
- 32:31
abstractions of the p2p and rust didn't fit well where the way your approach was organized I mean are you thinking of having a single client or do you want do you see a vision where there'll be multiple near clients maybe some outside of the internal so we're absolutely need multiple clients when they have one right now naturally because right like isn't finalized right right so for someone else trying to do that would be very painful process mm-hmm but the abstraction layer of liquid to be no parity is
- 32:58
to support multiple different clients right there it has very different goal well their goal is to create infrastructure in which people can build very different custom block chains right so they need to have an abstraction well near says there's one blockchain protocol which is near write with homogeneous shirts but we do want to support multiple different clients likely those clans will go through them in different languages right so we don't need the abstraction normally p2p we need something very
- 33:23
specific and so therefore code base of near and parity are very different in terms of for example traits you will see very few traits um in ear while Pyrrhic is almost every class is generic okay so you mentioned that you absolutely need multiple clients what is the thinking there also the thinking is the same thing where they don't want multiple classes that if there is a implementation bug right so I don't think you can defend against back bugs and except by you know like verifying spec very thoroughly about
- 33:55
implementation bugs you can you can avoid it if you have a sufficient number of implementations each of them sufficiently popular so that no implementation has like more than one third then if one implementation goes down the network remains light right right so so that's the that's the argument but also you don't want like the second concern is that imagine near like five years from now you decide to completely people to marketing automation and not working block chains anymore and abandons the client right
- 34:27
it's an extreme example right but in this case it's very good if there's another client or the queue get like people can pick up and continue maintaining I see but there's no theme that is up to speed to page right and that every other client will continue this isn't it easier example image and use some company called parity which says from now on parities is maintained in the community right there's going to be some delay right until community is ready to country to continue maintaining it yes there is a team that continues
- 34:56
good you know so it doesn't like the innovation doesn't stop I mean I remember you know maybe a year and a half or a year ago you know the NIA team coming to us potentially you know saying maybe we could build in the theorem client yeah but you know we'd need incentivization so you know I think the the the proposal was that you know part of the you know inflation would go to the the team developing the clients do
- 35:28
you think you would do that in there for another team too so it's it's hard to say with the client so one thing we do today which is I don't remember it was you who was like a big critic of this idea but the idea is that part of the inflation goes to the contracts which gets executed which gets executed so this is already now that's a cool idea that in place right so and part of the
- 35:49
inflation already goes to the foundation had to maintain the network right right so these but it's not quite found every word because I think found the reward was the fact that they give you should found the reward was paying for the prior work well in our case we're saying this is this is the finding of the future work right so the the cement is sort of the implementations the same the semantics is different so it would be feasible to have also put like for
- 36:15
example part of that could be payment for the for the implementers so he's saying that on day one you will have this feature where if a contract is being used as in transactions trigger it yeah then part of the transactions fees or even the inflation will go to the contract creator yeah that's exactly how it works today so today every contract which gets executed during the transaction gets a little small fee from the transaction
- 36:40
fee right and so motivation behind it is that like if you envision the future where there's a lot of or actually that's not even future its present right so it's like consider some defied primitive that exists today right they need to come up with some very complex ways to monetize their projects right because they like if they just the primitive if they not user facing the neutral don't pay for using them right that's what they need to figure out how to monetize if it's a very popular primitive like everybody builds on top
- 37:09
of this building block then that little thick would actually be meaningful right meaningful monetization for them as especially if it's not like a Silicon Valley company but just the project made by people right you know somewhere else that could be very meaningful so how does it work completely like you mentioned it's a cut of the transaction fee not the inflation yeah and like is
- 37:31
it a fixed percentage like five percent okay take some constant and does that money go to an address or can it also go to a contract I don't know how it is implemented right now but how it is supposed to be implemented is that the contract governs how exactly that money is used okay so there is a possibility that you know whatever it is the 10% cut it's actually redistributed given us a
- 37:57
refund so that's so there are couple problems there so that's one of them yeah and now the one is that and also technically you can implement it today on this video right you can make the call to actually be payable and require some of these but this how are the default is very important yes yeah right so from this perspective so so so so making it cost not part of the reason was so that people people don't work it out and make it cheaper so people still can't work it out to make it cheaper by reimbursing
- 38:22
you back right but that that becomes it's not it's not like as easy you know like if you really just use the cost right so that would be all over the place if it's if it's an involved process the hope is that it's going to be less widespread right okay understood I mean that's gonna be a fascinating experiment to watch out yeah cool okay so so how how does the how do you create the randomness in the current block just
- 38:49
the block reserves are so random so randomness over a particular block yeah he's a vrf yeah of the block proposer over me I see that by by the randomness of the previous book oh so basically you're using Weber blah pupusa shows up what doesn't show up yeah so that yeah so that's been things so the blog proposer can choose not to produce okay so that's assume that we have like really good latency around the world and every blog proposal shows up yeah doesn't mean you can predict what will be the random number you know what
- 39:25
you could but how do you executive ERF oh because it's it's okay it's like yeah nobody else can I see okay and the error comes with the proof immediately so you submit the output of the vrf and the proof right away okay and it's not a ristretto based vrf or something else it is you start to baste okay okay so it is so we are using this tattoo today okay and they actually random is become we we
- 39:51
have like some smart ideas but we ended up just building right what what Definity does so it effectively the way it works is in the in the epoch that receives the epoch where you need to j2 to where you are a blog producer you run a g/kg right which we just make it synchronous so in the first so what happens is in the first like 10% of the epoch roughly speaking everybody can it's the polynomial of degree K minus 1 right what K minus K is
- 40:22
50% not two-thirds in Definity everybody can use wk minus 1 yeah and they reveal the the generator ^ every of a or some K points and then they send encrypted private shares to every participant and then we spent 90% of the book with the participant can say you know what what you set me does not correspond to the to the committed one and so the the revealed the revealed share so the property is that if you have a polynomial of degree K minus 1 and then
- 40:54
if you if you raise a generator to the to the to each element of the of the polynomial again right by knowing any K of them you can also interpolate the remaining ones right so that property remains so by generator do you mean some sort of seed that you can generate points so like every so every participant I generates a polynomial P I of right right and so what they publish is they published G to the power P I of X for some key points and so oh and G is like some sort of yeah yeah
- 41:27
at the point or or it could be a pls point all right if we did you'd be a less correct and so wait so he commits to the coefficients of P I yeah yeah effectively but the beauty is that if this if this is a plan all right then knowing any K minus one sorry any K you can derive others that property remains mm-hmm so many of me maybe for people who are into cryptography that's obvious for me that's a right that was something new right and so then you also
- 41:53
publish encrypted version so you encrypt P I of X with the public key of the participant so you would say this is J with the participant J so this was also broadcasted this is public right together together with with the commitment right and so every participant now can come and say this is the proof that this is not the encryption like you can get a graphically prove that this does not crisp on to the same p IX that is that is used in the in there right and so you get 90 percent of the epoch but it is
- 42:30
synchronous okay in a sense that if you do not show up and you do not provide the proof then you cannot participate can take next epoch and the randomness become you can still do everything else okay right so so you can you can choose if you messed up and you didn't show up and you didn't challenge it and you don't have your private share you can still do approval validate blocks you know do all other duties you just cannot participate in the beacon and the
- 42:53
assumption is that after the D key G mm-hm if there are committed polynomials which are not challenged then at least K people at least 50% of people actually have verified their shares and would have challenged during the epoch and so in the next epoch what happens is that if we do have can we do not challenge polynomials then we use this and if you don't and then then we resort back to to the vgf sorry they are F okay right
- 43:19
aha I see okay yeah so you have a fullback and also another thing which is that so let's call I'm throwing the next epoch we just use standard random as become the Definity users right because you have this plane the random-ass output alright when you have like a block and you just H what you do is yeah you just interpolate you can you just compute H to the power move so everybody adds up their plea nominals
- 43:43
right so that gives my T of X and you just compute H to the pure zero okay nobody knows P of 0 right ok but even even more to that in so diffusing H here we use this thing right randomness of the previous block so like the G via wrap that is published in the previous block and so what it gives you is that even if someone did break like if someone did manage to get access of 50% of the of the fares and they can completely predict the output of the
- 44:17
night of the day of the of this random has become right they still only have one bit of influence because they still can only produce or not block or not produce right so it has all the properties of the underlying randomness of the seeds right yeah ok I see but in the good case you get you get completely unbiased one particular randomness unless someone has 50% of shares and assuming the Dicky jig didn't didn't break ok that's very interesting because I remember maybe roughly a year ago you were telling me that you know definitey
- 44:52
is all great and all but the one problem is the dkg it might be impossible right it might be too hard to to deploy it in practice so you've gone down the dkg route but it sounds like you've made some changes right so effectively we just said well where key would see because if you do if you're not ok with synchronous network assumption that becomes way more complex right right and so you can I think you can put it really created EKG in which 30% of people can
- 45:20
can predict about 60% like you can parameterize it right such a way that you need 30% to break lab is 30% to break to make it predictable while with the synchronous network assumption if you if you make the threshold 66% you need 30% to break loudness 66% to break right there and then we can push up to 50% because because we wanted to work we want lightness to it to me to remain with 50% right yeah okay so you basically you
- 45:48
have stronger assumptions which makes the construction simpler yes and so like a year ago if someone told me like let you think Network assumption I would say I'm crazy rather than like in practice if you think about it it's actually very meaningful to assume that during half a day mm-hmm right everybody will have at least one opportunity to show up and validate their share right and like the argument here that if during the previous half a
- 46:10
day at no point you were able to to show up and validate your share mm-hmm then probably also not going to be very live in the next epoch and so answer you right you sort of write a fine anyway like you can be considerate of line and one thing I'm interested in is let's see gasps gasps schedule yeah so in in if to where we're looking at something called a VIP 155 nine mm-hmm and you know as
- 46:46
you described it once it's like this exponential moving average and you know we basically have this this base fee that that gets burned and then we also have these variable size blocks yeah so you know we're trying to fix some of the problems of gas what is your thinking around gas I think we use something almost identical okay in the sense that they think if it's happen okay boy and correct me if I'm saying something wrong if the block is more than how full we
- 47:17
increase the price if it doesn't helpful we decrease something that's right yeah yeah okay very similar okay cool well that's a nice like kind of confirmation there where we might be on the on the right half okay one question I have is regarding the committee size so you mentioned there's let's say 200 validators and eight shards and each slot gets basically a sense not quite so
- 47:45
what happens is and I think this is this is where we're more like polka-dot school than etherium school right so in our case so there's a total of 200 yes and let's say every five of them so like they split into groups of five and each five whether they are assigned to some five shirts that's assuming like these hundred shots if there's a charge it's less interesting to analyze right but let's say these hundred shirts these like hundred book producers and and
- 48:10
there's some bipartite matching it's not quite bipartite matching but let's say first 500 producers are assigned to the first five shirts and then blood producers from ten to fifteen are sent like two shorts were saying the community size is five yes chemita size is very small and and so every person who is a cycler I didn't load the stage right so if you everybody has fire state of five shirts and and so there and so therefore they just they just take turns
- 48:37
between five of them to produce chunks right and that committee is not even technically a committee because when you produce a chunk the remaining four don't have to sign on it right so doing a meeting you you alone are attesting to the validity of it and what happens next is the person who produces blocks they obviously have no insight into the validity of chunks Oh for all they know I have a header and the header kinda looks looks legit like
- 49:05
hashes hashes check out signatures check out so they included okay so they're really like proposal committees more yeah okay yeah so what happens next is one thing which we use that'sthat's again polka dot thingy is that when you produce a chunk so let's say let's like throw this like this is 200 people right and so these people are close walk across all the shirts so when the
- 49:28
particular person like say this guy when he when he proposes a chunk what they do is they they compute an erasure code of the chunk mm-hmm which in our case let's say so for theoretical guarantees it needs to be 6x big so for something that is one mag you only six Meg's but we in practice we use less than that because in practice the practice is to kind of break it but you cannot theoretically
- 49:53
prove them that it's unbreakable right so what is your block size well your chunk size as you say so your racial coding is at the chunk level right what is on the chunk level yeah so it's based on the gas and I should have no idea what the sizes but there's also some gasolina trade yeah so circuit see yeah okay so let's see one thousand transactions let's say that's about two hundred kilobytes yes a
- 50:30
yeah okay and then you have let's did you say 6x oh yeah just like okay one megabyte yeah one megabyte yeah okay so what you do then is you send those but but then one megabyte every second we're talking about it so we'll let you go right that's very ambitious well although that can be fine-tuned right right yeah like that that can be decreased right right if we if we can if we can produce smaller blogs but still every second wait we will go that route
- 50:55
other blocks less frequently mm-hm because like for as long as nitrogen out you gadget finalizes them right the biggest concern of short block times disappears right the biggest concern usually is that it affects like in proof-of-work for example if you make it too short then that verse you could who does not have for fulness right they have advantage right but if you have if you have a PFG finality on the block that sort of not as big of a concern I mean you could have centralization on the proposing centralization on the
- 51:30
proposing okay so let's finish that I can think about it but what you do is well let's ambitiously say it is one megabyte raid so it is one one megabyte after you your razor coded it right so it is split into small parts exactly to it so let's say for now for simplicity exactly 200 of them as even with this committee size and definitely with Biggers it would be a sample of a block registers not not all of them but for some please don't say it's all of them
- 51:55
and so you send one part at every blow proposer yeah and they don't need to confirm it in any way besides that if they attest to the block it means that this means that they have one little part for every chunk that the block has right and so that means that if the block has 50% attestations that means that 50% of people write a test to the record they have their little parts of
- 52:20
the blocks right well then why the 6x is that if you assume that this less than 30% of people who for some reason lie to you then you have that 162 to recover right and like how do you prove that you know every are that they don't know like atomistic we say oh oh this thing is more closed right so this is a miracle root of this particular of these little parts right after this Merkel local hash mm-hmm hi isn't the chunk header yes FHI
- 52:54
first naturally depends on it now yeah so the block has depends on it and what if and save someone then loads the whole chunk yeah and they encoded and arrived to a different workers route that's that's a challenge that's enemy that's a special behavior right and effective what happens is that what can go wrong here are is right so one thing is that you can send something which is not so
- 53:19
another thing you can do is you can compute an incorrect erasure code coding and compute the more code oh yeah so if it's incorrect eraser coding then the Merkel route will not match right right when someone D encodes it if it's if it's completely irrecoverable yeah then then it's also easy to show like like I said show I will show the sufficient number of parts we routin everybody will see it's recoverable and and they cannot send something that doesn't correspond
- 53:45
to the Morocco's route at all okay so here's one thing I'm worried about that so basically you have the the the the chunk proposes let's say he creates garbage in major codes he sends them all off yeah and this this specific chunk goes in the block and then you get the financing gadget you know which happens in two seconds because each block is one second long and that's not enough time for someone to both kind of reconstruct
- 54:13
everything detect that it's wrong and you submit something unchanged yeah so does it mean that you might have to revert to find out it yes sir analogy so if it finality is a little tricky in this case and that's something that we're very upfront with people when they can I like if we talk to someone who potentially might integrate with me we're very clear that you either have to run all shorts locally not necessarily the same machine it
- 54:36
could be on multiple machines but if you locally run all the shirts then finality is final for you because you know that change is not coming right or alternatively you need you need to have alternatively the concept of finality for you is yes it is finalized by nmg but also sufficient time has passed that you certain and now that the challenge if it if it was existent would have come true right so I change you can you actually have all the shirts right well
- 55:02
you phenolic is actually but how does it work ok so I understand penalty from the 20 of view of the user yeah you can have these extra checks yeah everybody waiting more or by downloading or change yourself but what about from the point of view of the chain and and it proposes because presumably they would suddenly have to move to a different chain and do like you know right so it is it is actually especially with a single chain it's actually pretty simple right so it
- 55:28
so imagine like you're building a chain and then suddenly sometime later it was it was it was proven that this block has an invalid chunk right well it's very simple you just local you just say this blocks are invalid this is my tip and you continue operating and will you just continue working here just ignoring but now existed so that was initial time but that's actually very hard to do ok was
- 55:51
it's way harder to on implementation level so implementation level it's way easier to continue like this so the higher the height will continue from here it's gonna be the next kite but this is the parent it has some complications because now the finality gadget and dooms like need to be aware of the because if the finality right is the dose I have no idea that walks can be challenged then this is indistinguishable from actually someone
- 56:15
working out right that they should cost rational behavior right so the way the slope is what without details of phonology gadget and don't like it's not that easy to say but if actually would like finality guided for example has a concept of a score which needs to be strictly like increasing in certain cases and we just think that if there is a challenge book right then the score you can effectively say this core of the you can include this core of the block
- 56:39
we're presenting a challenge block which has higher score which will install the finality gadget okay so phonology gadget will be dysfunctional here but we will be able to to restarted here by proving that this Court has to be higher because there's a challenge of look with the higher score okay I mean it will be interesting to see how this kind of finality get it will get integrated in the system like cosmos right because in cosmos you know you
- 57:04
have a weak verifier that won't do some of the things that a user can do and also kind of cosmos tries to rely on kind of really strong finality but you have kind of but-but-but so so these are so we already have an athenian bridge which has exactly the same problem right Athenian bridge needs to know the latest block so the argument here is the following that first of all the
- 57:28
challenges presumably should propagate relatively fast you know in the sense that because of the data availability you should be able to download the chunk no slower than any valid chunk and valid chunks you like on the normal circumstances right under normal conditions you don't load chunk between every two blocks because that's that's that's how you operate right and so the unloading should not take more than one block time preparing the challenge and like distributing it could take some time because it's pretty large
- 57:52
today we don't use small challenges we use like the size of the challenge is proportional to the size of the chunk but like it should not take more than you know like like let's say 20 blocks or stuff like that right in practice and so if it was charged off the 20 blocks then this chain will stop it will stop growing it cannot grow any more because although can you like that and so what happens is that effectively if you're saying my finality is I see a final look
- 58:19
and they see another block which has its in the ancestry which is like hundred hundred Kyser beyond right then this is final because that block would not have been created if this block was challenged I see so cosmos can do that example yeah right okay okay that's one option so it on a thin bridge we just ignore challenges for now but so one thing I'm very interested in is state
- 58:42
mm-hm so in if two we kind of have the stateless client model yeah and so my question is like do you have statelessness and like how large do you imagine the state will become per how do you call it to purse let's go chart its - sure sure okay so I shot yeah yeah so it's hard to estimate how big the say the state will be but state Trent is built in engineer you have stations Wow
- 59:09
hey Trent and we have some sort of statement what was built not by me so I don't know all the all the answers but like we have sound solutions for all the well known problems right so for example like the account can be deleted but when you want to chip in so with state trancelike Lin ok can they restore the account if it but they can't just dice okay I can't just dice if you don't pay okay account just does if you don't pay and that will be I don't you have stake is it is there today yeah like today if you
- 1:00:01
create an account engineer okay and I'm gonna pay for a while it dies okay so you're trying to bound the state because what I'm worried about is you know the the proposers they're gonna be shuffled from one shot to another and they might need some time to sync right so yeah but they have half a day for that because you know the shuffling happens one epoch in advance oh you know the shirts and so you don't loading the state so the way it works is so select let's say this is
- 1:00:31
the previous e-book right and this is the book in which you use supposed to validate so the shuffling happens at this point so this point you know everybody could be validating in this ebook after you immediately you know the short assignments so you have half a day to the load the state and then there are like some implementation details here which is once you download at the state you need to start deploying block applying blocks because state at this point is different from state at this point right so what happens is you don't
- 1:01:00
load the state once you got here right it is this process called catching up right now where you apply all these blocks for these shards and then for every block after that you just apply current charts and the next shirts so what you already know what you validate next time okay so if an incorrect like half a day in advance you will know these five shots that you need to sync
- 1:01:22
up okay and okay and this state could be let's say I know 10 gigabyte per shot that's 50 gigabytes down or half a day maybe possibly doable yeah okay and yeah yep okay cool but other than that like the biggest problem in state which like I would love to solve what we have no solution today's that updating miracle trees is very expensive right like if we can get get rid of Merkle trees we will easily like 5x the number of transactions we can process but today today we cannot get rid of them we don't
- 1:01:56
have a good solution for that I mean one kind beautiful solution is like Merkle tree ASIC yeah sure or like even like running them properly on multiple course it's not something that commonly is commonly done today not something else interesting work State yeah okay so one thing that you guys innovated on is like guaranteed execution can you talk about right so so the way it works is so when
- 1:02:40
you have let me erase something guaranteed execution is a little bit stronger word it's it's going to DC delivery so you should will be delivered but then later it can get for various reasons the most obvious you might you might not have enough gas to execute excited to it will get new it but it will be delivered it will not get lost on the way and you don't have to sort of monitor it so the way it works is I when
- 1:03:08
you create a chunk so first of all I think what is important to notice is that the the chunk contains the state route as of before transactions in the chunk are applied okay not as if after right I don't remember how it is done in the theorem but after yeah so what what it allows you to do is that if you do after then you have transaction execution serialize twice because for you to create a block you need to like let's say these only Alice and Bob there's only two block producers and then they
- 1:03:39
take turns getting blocks right so Alice just created the block mm-hm and before to create a blocks execute all the transactions in the blog because she needed the post statehood right before she even sent the block to Bob Bob received the block I mean at the very least she Alice wants to know if she's gonna get paid you know a decent amount of fees for example what feels it should be the it should be the fact that when you're included transaction you
- 1:04:02
should be able to estimate the fee heuristic we may be heuristic we yeah but also because fees are paid at the end split equally split equally between the block like it doesn't matter whether you include the transaction or someone else it gets oh so you mean this committee of five variables 100 at the end of the day all the hundred gets paid more or less equally at the end of so what's the advantage for me to show up even as a
- 1:04:27
proposer well proportional to your participation you still need to participate oh oh very interesting yeah okay and so then Bob they receive the block and the first thing they need to do is to apply these transactions because the they need to validate them right right right and so after that they they produce their block counting it around their transaction right and so you can see that the transactions they get
- 1:04:53
serially executed twice from the from every block right so that that's that's unfortunate and so instead I think it's preaching woman now to include pre state food right in the chunk right so you know pre state who else is doing that I think me I think many people do I actually don't want to say name and be wrong but but I think it's at least like if you read papers it like Oh flow flow
- 1:05:14
for sure does that okay there's like the big thing that they saying okay and so so instead of include the pre state route and pre state would complicate it a little bit with the post a true that would have been easier but what the way it works now that so this is Alice and Bob in one chart and this Carol and Dave in another shirt so when Alice produces the block already the chunk for height so let's say this is two consecutive right seven an eight and
- 1:05:41
for simplicity let's say hi skipped and all the chunks are produced when Ellis produces the chunk for height 7 remember she like Kate those little parts like the eraser coating shares with Adam parts for some reason it should be cool should call them shares so she sends the part to everybody including Carolyn Dave and as she does that action all which hurts Carolyn they validate she also sends them three seats but the receipt she sends them wait but
- 1:06:09
she didn't do execution exactly so the history sends them are the receipts as of applying the previous check right so there was a chunk before at height six right and so L is before producing chunk seven she executed chunk six right right right and so chunk seven now chunk only contains to two things in the body it's the transactions that included and they see it as of executing the previous
- 1:06:32
chunk why do you need communicate with seeds why do we need also that what we definitely get that that's you you'll crush out communication yes exactly right and so the trunk contains transactions and ec3 seeds have Norco true right which again so now and so the merkel proof of the seeds is done in an interesting way so this is all the outgoing receipt how they sorted by the short ID the the destinations are DJ right and so with the nature are demoralized and then they Merkel eyes combined mm-hmm so when I
- 1:07:06
send thee seeds to the Dylan or whomever is d y ah I sent him the entirety of his of his portion with the with the apple with a proportion of the morkul proof he doesn't need the lower but in the future you can prove an occlusion of any receipt using the whole tree and so at this point i by the time deal Dylan or Dave produces for height eight they have the seeds as of six so it might feel
- 1:07:35
that there is a coup blocks delay but actually there is none so so they will include so they will know this receipts for six right ah but the cool thing is that think about this for Dylan to even create a chunk of hide 8 to create a chunk of height 8 Dylan needs to read to have the block at height 7 right when the Dylan accepts the look at hit 7 and then they produce the check the chunk of hide 8 and the condition if you remember the condition to receive the block is to say I have my little part for every check included
- 1:08:11
right which include which includes the part for 7 right so the moment Dylan accepts the block at height 7 they have their part at 7 and so therefore they have all the incoming receipts and so when they execute their chunk at height 7 mmm they have all the income in your seats ok ok but ok so you have you don't have guaranteed execution because you have this queueing and then you might even like just remove things from the queue if it becomes unmanageable so we
- 1:08:44
will still fail the transaction it just the failing failing the transaction cost very little so you can like this is the cute the cue balls defeating way faster I see ok but even for the guaranteed delivery which is a compare equal property what if everyone sends receipts to one shot then now this one shot you know they need to download so much more data right yeah so so they so that's
- 1:09:07
that's a problem so what will happen eventually is that so what will happen in practice is that our Dylan he's supposed to produce a chunk and people sent him the the one part as of that block and there's so much network that he doesn't even manage to then load all of them right before producing the next block so he skips the bit same happens to Carol yeah happens to you happens to
- 1:09:31
Carol finally given them loaded them so he produces the chunk danced all of them to the storage yeah and you do not you do not really include the three seeds into the into the parts so so whoever will validate like Carol and other guys but they're on the same schedule right so so they will mm-hmm they will catch up so that's sort of unfortunate yeah well it only happens if literally every shard is boarding Dylan but but also like if you think about it
- 1:10:01
obviously on from the network perspective the number of visits we sending is not is not we configuring it so that it's not the bottleneck we don't want you to be practical at capacity on the network in terms of how much you receive so even if this problem will just keep on getting bigger as you add more shots right with Marshall first yes and so once we try to scale way beyond so with hundred Charlotte's already
- 1:10:26
quite a bit of a problem but not yet as terrible because it doesn't mean it will take your hundred blocks doesn't load three seats right it will take less because because it's not the bottleneck right but like if we want to go two thousand charge that becomes infeasible at that point we need some other techniques where we're going to like the most natural one but it's a chi level
- 1:10:44
idea obvious it has many issues is that these are this is a limit to how much a particular short code could sent a specific chart in one block time so it's not so right now effectively analysis analysis chart every transaction can generate a receipt to give rise and then we say well you can only have include that many right at which point the rest will will like get R acute for example okay so you can mitigate the impact occur in more shots yeah okay but that
- 1:11:12
has many problems for example if you recued if you like let's say let's say because Ellis wants to produce as a block she doesn't know which races will be created yeah so she cannot not include the transaction that generates a seed so when the block is executed once you hit the capacity you need to do something with the remaining transactions right so most likely will just riku them like put them into the queue weekly the same way you do today
- 1:11:32
with receipts yeah but then the problem is that when when those transactions come back to the next block again have like large percentage of them will get to the Q so that's quadratic that's that's like that's not that's not a viable solution right it's just like a high level one high-level idea how it could be done with a bigger number of shorts but that's an open problem right with HR that obviously works mm-hmm so one of the things that you guys have
- 1:11:56
innovated on and you kind of drew a diagram at one point is like you have the state and then instead of being kind of nicely partitions regularly you kind of is more dynamic like this can you talk about this a bit more so first of all this is not built it's not built so today it's static but the idea would be that as the chars execute transactions you can monitor which shirt is more busier than others yeah and then at that point you can you
- 1:12:25
can start shifting the the boundaries they still going to be contiguous chunks right so if there's a particular contract which is disproportionately large then at the very best case right yeah yeah yeah it will be in the same chart right in the chart on its own but this is that is that the way state sync works is that when you do state sync you don't load contiguous parts of the state with the merkel proof and the Merkel wrote is global right right you can
- 1:12:52
easily compute global Merkel will just be moral icing right yeah Merkel roots of the chunks right so the Merkel root is global and so with this restarting it will it will happen let's say on the epoch boundary right and so when you don't load the stage for the next chart you know the new new boundaries it's actually it's it's a slight complication because today you don't load from particular person the entire state now I just need to be smarting it to say oh
- 1:13:15
and the previous epoch it was like this right right so you will say well this part this this part I will download from someone who was following this chart right and this part I will download from someone who's going this chart but the rest of the states sync infrastructure is already supporting sending any part of the global state with the Merkel proof and so that that doesn't need to be changed and other than that is the same as gasp you know like like you look
- 1:13:41
at how how busy the chart is if it's if it's too busy right then you start your shorting okay so and presumably to keep the complexity reasonable you'd only do the rebalancing let's say once a week or once a day or yeah once once per epoch is actually doable because you need to be done Louis taken away right so it doesn't matter if it's going to be like like at that point actually having is like the same bounteous doesn't give you much okay and then prior to the
- 1:14:07
rebalancing you'd expect you know every shot to have its own gas market with some variations so that's that's a unsolved problem at this point we debating right now internally okay how exactly it should be done so what are the options here well one option one option is to have gas market preferred which is less unavoidable now oh is it no mostly so it's an open problem right but yeah so gas market Porsche art has fewer problems but but it has a terrible UX right from perspective of the user who
- 1:14:42
submits a transaction yeah and if you have global gas mark gas price then obviously these many problems like a congestion one charge will be increasing right the price for everybody so that is that is an active active discussion and that's something that can be finding very easily even at the very late stage ok great so one one of the things that we're going with is wasum you guys are also
- 1:15:09
doing one yeah can you tell more about that like compiled versus interpreted or which engine specifically are you using will they and will will you have wasn't from day one so yeah we don't have wasn't today yeah so the DM today's wasn't yeah I think we use like single task compiler signifies compiler yeah is it the case max yeah we're using single Waze mer yeah we use yeah we used wise more today right with a single pass without optimizations it will even more crazily at this particular point we have
- 1:15:40
floating point numbers enabled which non deterministic maybe they have they have a particular source of non-determinism which is Nance and we just plan to to mitigate that particular non determinism which is Nance Nance yeah so the problem is that what's in the end and am not a number the particular problem with floats and the source of like according to was inspect the particular source of
- 1:16:05
non determinism is that if you have an operation which has two men's and those two Nance have different representation like you add them up then the output will be one of them but which one depends because a compiler can choose to optimize edition and answer of the arguments because addition is commutative but suddenly for dance addition is not commutative right right and so wrong man can become the output right but then obviously in a smart contract that could that your network diverged your state is one bit different
- 1:16:32
yeah yeah that's all right but Nance can be you can choose a canonical representation from them and just after every floating-point operation you can say now if it's named use a very particular canonical representation it becomes slower yes do check is NaN every time yes all right every time you touch floating-point numbers if output is floating-point number which is which is no worse of course they're completely
- 1:16:56
banning floating-point numbers okay and there isn't why we enabled floating point numbers we had them disabled for a while is that the actual Devex is terrible because you're constantly accidentally use floating-point numbers like you use because at the end of the day you use some of the one of the languages which compiles to wasum like assembly script arrests and they have floating numbers all over the place the cache tables in assembly script used to
- 1:17:18
be using floating point numbers I as a developer didn't do anything wrong right but suddenly my contract doesn't compile right right and so we just were just taking a half a step further instead of just banning floating points completely we specifically solve the the exact problem that that exists and also so for wasn't smart contracts for with our particular bindings you can do any asynchronous calls to any contract in any shard the way you do that is you
- 1:17:45
just say this is the contract this the same way you doing a theorem but it's just asynchronous so at every contract hole is a synchronous every unless you allow this kind of stuff yes one more like this kind of stuff right so factory what happens is in a smart context you can say now I want to call another contract and at least in all these languages languages we support today there is a concept of a promise right so it gives you a promise so in your code
- 1:18:08
alright your code is actually very readable you just think I call this contract dot them and then you provide what needs to happen next on our end we will separate it into two different whatever wasn't blows whatever they are we will call the first one right schedule did you see it wait for the receipt you see the back will call the second part so that is abstracted out so doing everything as synchronously that's what different is doing as well maybe we
- 1:18:31
don't know okay definitively knows right but but we also have this thing which James press which built for us Oh which is we have a theorem virtual machine as a smart contract compiled to wasn't deployed on one of the charts and so within that virtual machine you can run any VM contracts but obviously they they have no like they live in the isolated world of a single shirt they they have no concept of course
- 1:19:00
start communication because synchronous calls cross chart kind of don't work but within the particular chart you can have you can have a DM contracts training with with synchronous calls between themselves and theorem yeah yeah yeah EVM as a specific version like like how do you governance on that like you just freeze specific it's a smart contract I don't know what exact governance today
- 1:19:23
for grading that contract but like any smart contract on here at least there's some rules for redeployment actually that's a good question like governance like what is what is your thinking here so we don't have what you don't build any formal governance right and the way the way in you sleep will work is that I think it will work the same way as with any other chain well we will ship in
- 1:19:47
your binary which has a version right and on the protocol level everybody can vote right for the next version mm-hmm and even that might not exist on the very first person I'm the very first version it could be like completely social consensus so the voting is just signaling or just signaling yes ah well to an extent so the way I see it and that might not exist on the first version right with me debating if you want to build it before or after I mean that but the way I see it is that their approvals in the block they include the
- 1:20:14
version the highest version you can speak and a debug boundary the versions which can automatically happen if if if sufficient percentage of of the block producers do speak the new version okay yeah so that that that is all like at the early stage of how it works but there is no token vote or anything so it is talking low to extent but it's talking about babe what producers typically saying we want we're ready to use the new one aha but grabblings in terms of like who creates the spec who creates an implementation and the
- 1:20:46
beginning is going to be us we call it like the the reference maintainer or whatnot and if we go rogue people people can always say like okay let's not use data there's any more right let's carve pork like to say the same thing governance that has been working for the last how many now eleven writers I mean even Bitcoin has been using this signaling mechanism yes yes so 6 signaling the only question is like do I want to move
- 1:21:08
it in now or later actually going back to the awesome stuff so you said there was these promises mm-hmm like what how fast did these promises return so effectively let's say chunks are never skipped so every block has all the chunks yeah so what will happen is on height 7 Ellis creates a block which includes the the promise from 6:00 right right on height 721 receives their part they will already execute on the promise mm-hmm right and so so like a fact effectively so it's like one one slot duration so
- 1:21:44
one slot to get to 7 and then one slot to get back to 8 okay so if everything goes very well if there's no congestion and chunks are not skipped then south anything shaded in six will hear back in 8 okay but then what what if you you know with reasonably high probability that you know the two contracts are gonna be in the same chart do you get faster than so do they know okay so
- 1:22:13
that's a huge trade-off right yes so it's a trade-off the I think the biggest reason why we did that is that we don't want people to grind right because like what you will end up having is you will have one smart contract which everybody needs and then they want to be closer everybody will want to be in that chart right and even with your charging so without your shorting you're guaranteed to have everybody in the chart because like I mean the way is proof of work
- 1:22:36
it's like meritocracy it's not it's not a lot of proof of this hundred charts with the probability 1 percent every time you land in the fraud you want to so it takes you 100 attempts to deploy no but what I mean is like if you want to be extra close so that the probability that you'll be separated is very very low that's what dynamic recording with right now dynamic recording yeah we denied recording you can get closer and closer but it's still
- 1:23:01
it's very undesirable right property so instead what happens is that it gives you a little bit of an advantage to be in the same chart because you you're guaranteed to be in the video next chunk when that happens in the same chart well between charts like if the chunk is skipped okay still still you know one second is much slower than you know instant yes yeah so at least at least to date has built this way okay now the second
- 1:23:25
reason for that is that it's easier to implement everything consistently than special-case the same chart so here's my prediction of how near will evolve is that there will be like this one mega contract where you can do internal calls synchronously yeah like EVM country yeah and then and then that will be really really bigger than and then that will even break the dynamic right stuff and so you'll have one shot with a very expensive but if we see that happening
- 1:23:50
we can react right like problems will not happen overnight so how would you react well at this point I don't know okay okay but but you should there are so many things that can go wrong yeah we can spend time and and I just save each of them or we can launch and see what actually can go wrong yeah and adjust as we go and then we can learn from your mistakes well yeah the same way we learn from mistakes of others right right but you're one of the first movers at least
- 1:24:17
that's one of the goals right we want to be as early mover as possible it doesn't have to like code mice's already a first mover you know program from the series of block chains that I follow closely right yeah I mean we can't want to be last mover in the sense that you know we want to you know be the ones that are still there in ten years well everybody right that's more of a
- 1:24:41
philosophical question whether you want to watch early or late to be to be there in ten years so if I recall correctly one of the things that you really care about is not only dev X which you mentioned and passing but also you a user experience so you there's some innovations there can you talk about those so yeah so I think what like innovation would be a strong word many things we do exist in some way or another in the theorem ecosystem to do
- 1:25:07
they just exist as independent projects right which not always work very well together but I think over time that will all happen naturally so there are a few things one thing is that we allow so one thing is it's completely agnostic to the protocol it's just something we we have out-of-the-box built which is we have so-called hosted wallets and a host and so one of them were hosting ourselves
- 1:25:35
and the hosted wallet is a way for you to have to start using near without having to do anything with the blockchain so specifically the four things we try to avoid is a we don't want people to understand key pairs yes because it's not something that is easy to explain to people also people lose private keys B we don't want people to install meta masks yeah well there's two things and C we don't want people to to pay to pay like you don't have to buy
- 1:26:00
near before you use something because buying crypto today is extremely complex right right like I don't know how in the rest of the world but here I have to send my passport to the exchange it's insane yes right and so if to buy equip the kit I need to send a passport to someone like the drop-off rate would be very high okay other thing is that at least the first two things are necessary for you to get the security of the protocol if you don't have film at a
- 1:26:21
mask if you just use a webpage the the host of the webpage can send you whatever code they want and steal your private key even if it's in local storage what well unless it's maybe an IP FS page or something unless right but someone is hosting at the TFS page no because you know you you know for example the page could be hosted on an NS domain and then you know you trust that basically there's like a fixed link yeah to like but someone I do trust right well but the thing is that is like it's like social trust at a very
- 1:26:54
very high level yeah in the same way that I trust you know the near blockchain right so so the idea here is the following so the hosted wallet is this idea where there's a completely centralized server yeah this case we run it yeah which gives you gateway to all the tourists all the applications running on here right and so instead of installing metal mask and coming coming up with a key pair you will open this hosted
- 1:27:15
wallet this causes wooden is a different way to authenticate you so it will be like a logging and password or like something along the lines or like the way we do it today's you you will create an account and we will store the key locally in the local storage but we're also gonna store the key on our end so one thing we need to cover is we have a concept of an access key so the account is not defined by a single key
- 1:27:35
account as defined by a name the ens is sort of embedded in the system and the account can have arbitrary number of keys associated with it and those keys can have different permissions right and so near keeps a key on each side which is sufficient to to initiate their account recovery and so today that key technically can recover account and use it the way it once but the way it improved for example would be that key can initiate the current recovery which
- 1:28:00
will only happen seven days from that moment right like argent or something yes yeah so that's something that exists right and so what happens now is that near has that key that that allows to recover and so when you use horse of the bullet you can provide your phone number or your email and so you have Recovery Options if you do lose your key locally you can recover it using the means we used to but obviously you completely trust near at this point at least to a
- 1:28:25
very large extent because even even if that key has seven day delay right because you're using the near web website the next time you go to that website it just sends you JavaScript which extracts the key from the local storage sense of ten-year so there's a lot of trusting here right but if all you do is you buy a clickety to which which is worth 10 cents that's perfectly fine like near will not right you know go against you to steal a transcript the
- 1:28:49
kitchen and so what but because we have access keys and the account isn't defined by the key at the moment when you actually have valuable assets at that point you can you can create your own account like you're going to film a damask or like whatever the plug in out of the world you want to use you install it you create a key which is now local to you nobody has access to it and then the last transaction to you that you trust near to perform right is to bring
- 1:29:15
that key and remove near key at which point you have full control over the account near has no access to it anymore right and what is and it's way easier in the theorem if you need to transfer access to the account from one key to another the only way to do that is to create another account and transfer all the assets if some of them are locked or not transferable and then you cannot do that at all right if your key was compromised well inferior you can do the functionality yeah but but in this case
- 1:29:44
because because every account has access keys you maintain the same account you just change the key so it simplifies like argent argent has built argent on aetherium so it is clearly possible right right what is harder right and yeah and then why linear it's very easy to build such a hosted wallet so in expectation there's going to near course to the bullet but there are going to be others right so whichever one you trust you use that to start and
- 1:30:08
also the coastal bullet can choose to pay for your fees uh-huh so like right we have a strong incentive to pay for your fees because we want people to use near right right and you have lots of tokens and yeah we have we have tokens right so so we have an incentive but someone else like for example it could be application specific gateway which pays for your keys because they want they have future value in you like hypothetical key practice yeah we'll
- 1:30:29
build a hosted wallet they will pay for your fees and usually because like Angie over by $10,000 trip the key to covering fees for you know okay so let's talk about this $10,000 critically you saying that you can solve the passport problem does it mean that you're gonna become like the broker where you're going to sell near tokens and you're not gonna ask for passports the expectations that a I if people get sufficiently bought into some product but but also this wire
- 1:30:58
there are others right so we will we like the hope is to integrate for those people like we don't want to be broker ourselves right it's completely orthogonal to what we're building right but what about like someone could figure that out for aetherium they not attach the particular block channel as long as near torque industry to the same ways that didn't work and from perspective of particular jurisdiction right their solution will work for any blockchain
- 1:31:22
okay I see so basically you're taking as you said at the beginning different solutions from a theorem and then putting them all in a central solution well yeah some of them we will put into central solution and we will try to integrate with those who who we cannot replace ourselves yeah but but the the idea is that only on a theorem that to today there are steps towards very good UX but they they far from from converging and they and they just joined
- 1:31:47
and so we're just saying well let's have one combined solution right it works right right so so I wouldn't say that this is like a huge innovation it just in your axis what innovation it's just it's convenient that that matters right okay I mean this is this few things that I that we could talk about but is there anything in particular that you'd like to highlight before we wrap up no I think I think we covered so much more than I was expecting
- 1:32:16
okay excellent well thank you so much yeah yeah thank you thank you for participating yeah