Skip to content
by Unity Nodes
NEAR Protocol

NEAR EVM Working Group Update [2021-03-12]

about 27:51 long

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

https://gov.near.org/t/2021-03-12-evm...

Transcript

3,811 words

Captions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.

  1. 0:01

    hello everybody today evm working groups weekly update uh today we will not have everybody joining as the bridge releases uh imminent um let's see our agenda given that is it there so we um continue to work towards our evm test net release by the end of q1 which is in a couple of weeks so they don't light a lot of fire under us and today i think we have enough to discuss on the specific things everybody's working on but if somebody wants to add something

  2. 0:44

    to the agenda by all means now's the time to mention it all right so let's go ahead we don't have alex today he's attending a bridge bridge sink but i believe for him this week was just the bridge bridge work and on on my end uh this week i've been focusing on uh finishing the refactor and upgrade of the evm contract the even product now lives in a new new home um called aurora engine

  3. 1:27

    and over here i've rebuilt the the contract from from scratch in a in a more maintainable way um it has the it has feature parity with the old contracts but it's it's possible to upgrade the evm implementation we are on a much newer version than than the old contract so we have certain performance improvement and and some bugs are fixed um let's see here yeah we are we are now releases of two

  4. 2:02

    two days ago currently so pretty much in sync with upstream um so this this is what i've been working on and also i'm upstreaming our uh additions our changes to to the evm implementation uh so looking with upstream to to see what will be accepted and and what perhaps want but we will need to maintain on on our end uh that's everything from me this week uh from my side uh i started implementation of pure s connector a smart contract

  5. 2:41

    with now std and one major problem was related to dependencies and it was as obvi dependency and i successfully resolved that problem i forked implementation with no std and uh it was some bugs uh and i uh fixed all of them and uh currently uh the problem successfully resolved and uh everything work i mean as abi dependency it it was not dependency it i uh put it as some local implementation

  6. 3:29

    to to contract so currently it's all fine and i started implementation uh specific functions uh for s connector and currently almost implemented uh deposit uh and i think it's really good progress because i solve for probably all problems that uh stopped me to implement uh a new implementation for no std so next week i think i will have a really good progress and probably i will end the task okay sounds good

  7. 4:08

    uh tell me um the changes to srb are they something that we can upstream can srp be made no std compatible no it's not not support no cd so it's completely different implementation for upstream okay all right i also see that you you are now on the same nightly version as we are using in a contract that's good i was going to ask whether we needed to stay on an older version but if that works that's great

  8. 4:46

    uh yeah so this is coming along uh i will i will find some time in the next days to to review is it ready for review oh because uh read for you is avid but uh as you understand currently as connector as uh no std and not not completed because i should implement uh fungible tokens uh implement some uh things related to sdk i mean sdk now stevie sdk uh could be based some functionality from uh near evm and i put additional functions for

  9. 5:30

    for working to s connector so currently full environment for development is really and i think in next week i probably can finalize that smart contract okay sounds sounds very good um and no other dependencies gave you trouble we have a lot of dependencies here everybody else can default features false will be fine okay great good um okay frank i was continuing on the bully um so in order to call the evm contract we have to sign and

  10. 6:12

    um create transact create transactions and sign them and it's basically the same as transmitting money um so i started building that first to be able to test it and so it basically means creating a transaction and calling it as um with borsch and signing it and i i built that it's finished but it doesn't work um unfortunately i wasn't able to figure out um why exactly it's rejected by near core

  11. 6:43

    might be some bug in the bush go library or some other small thing but basically that's that's what i will do next once that is debugged then we can call the um contract functions okay and as you saw i hope i added those today yeah that's great so yeah um we can we can look a little bit at that so for the begin chain currently we're only taking chain id um we need to add the genesis state

  12. 7:21

    there for begin block i believe we have everything you need for that as long as we are tracking the block hashes uh in the contract yeah yeah so those those should be okay and you should be able to call those just remember to portion code the input it's not json we don't use none of the evm contracts um inputs are json that will change when we incorporate the punchable token standard perhaps but for now they are push okay sure

  13. 7:52

    okay um so how does it look in terms of our schedule then for beginning to replay can we replay next week i think so yeah okay i mean we are pretty much behind on on this desk let's see um how what do you think in terms of the data volume have you calculated how long it will take to replay the girly no i haven't calculated it okay let's let's calculate that um assume some reasonable transaction transactions per second

  14. 8:33

    and then just figure out how many days it will actually take to replay assuming that everything everything looks uh because we we're getting a little tight on that uh if it takes a week then we're not gonna get too many chances of of doing that if it gets interrupted later on um okay so so we have the center center transactions working um but with our salary session bug for the whole for the whole step implemented

  15. 9:13

    okay we don't have ilya today joshua yeah um so i i did the evm test except for the one that required uh pull request 320 on the near sdk uh which is now merged which is good um so all tests up up until the actual checking if it upgraded that's that's all that's all done um and then i added a better featured gates around uh pr 3954 which is uh the extra cryptography methods or the math api extension um i'm waiting on a response about a question i had

  16. 10:00

    about adding fields to the genesis config i mean typically you don't want to change those then i don't think we've like we've changed some fields since i think um but yeah i'm not not sure about actually adding fields to that i don't think we've ever done that um and then i looked at implementing the blake to f compress compression function and i was like a quarter of the way through it and i just thought i'm like it must be

  17. 10:31

    it must be in that library because i've been through that library before and i'm pretty sure i did see the compression function in there and uh sure enough it was the f compression that was described in the uh in the ethereum uh protocol uh what do they call those these uh yeah eip yeah in the eip also known as yeah so yeah um it was already there it was already it's already in the blake 2 library so we don't actually have to add

  18. 11:02

    it ourselves which is pretty sweet um is the difference though because if compression function in eip allows the caller to specify the number of rounds and then this implementation it is fixed so we'll probably have to copy it we can't use it from this library and we'll have to copy and have some modification to make some changes to this code so i'm not wondering yeah then i've been wondering about that then we would pretty much have to fork

  19. 11:34

    most of the blake 2 library um for us to add that in there because i know for it's 12 rounds for blake 2b and it's 10 rounds for blake 2s this only implements blake 2b so this pre-compile only is only implements a compression function for blake to be but you have to specify the number of rounds so in gif they copied library code and changed it and we will probably have to do the same okay so we're probably going to have to actually implement the uh blake tb library itself because i

  20. 12:13

    got i i got no public methods that i carry public fields so i can plug into my second person it shouldn't be difficult no no it isn't um it's just that we would have to actually take the blake 2 library and put it into our code because i i can't plug it in the way that is that it's set up right now or potentially fork it and add an api that you can use and see if upstream accepts it that would be better this kind of api isn't really useful

  21. 12:52

    outside of implementing this aap because i think one is using black 2 with non-standard number of rounds true however in any case they may accept it and so that would be that would be the preferable way to proceed but so joshua you need to keep your eye on the ball here as in this is this is what we need ultimately this this needs to be implementable um and whatever it takes to to get this implementable that's what

  22. 13:22

    you need to do uh so it's it's not enough uh as uh joking pointed out if something is uh um in the source code there we have to actually be able to provide this call signature um now this doesn't mean we we can discuss it in detail on tuesday when we have a call for discussion of those smart api editions yeah but there's still a bunch of days until tuesday which we wouldn't want to um misdirect joshua in the meantime so let's uh

  23. 13:54

    let's make sure that we we agree what we work on here so uh it doesn't mean it doesn't mean that the the mass api should have a host function which is exactly equivalent to the eep as it's defined because after all we would like these host functions to be generally useful beyond just the implementation of an evm however it must be flexible yes so i have thought about how to make a generally useful function that can also be used to implement this

  24. 14:25

    eip so what i thought about basically the function that can perform like the same of compression call but on multiple blocks at once this is general generally useful because you can for example compute regular blank two hash in a single call of such function even if the message to be hashed is longer than a single block and at the same time you can implement this pre-compile so this pre-compile in ethereum is

  25. 14:58

    not that good for ethereum users because it only compress perform this compression on one block at a time so if you need to hash a longer message you need to call it multiple times and currently in ethereum there is a high cost of for calling any contracts including pre-compiles but we are not ethereum we can make more useful first cost functions and we don't have this high cost for each call but for them we are just implementing the same thing that

  26. 15:42

    ethereum implements yeah that makes sense but you'll be able to sketch out the api for your concept um you know in a comment here so joshua can perhaps have a stab at it before tuesday yes so pro i will add the outline but still i think we should discuss that on tuesday in more depth so certainly but this is a lot of time between now and then so we need to put that time to use uh so if you would do that then then we can get yourself in the right direction there

  27. 16:19

    and i believe the the other things you were working on joshua were coming along nicely you got the feature gating i can also help with actually implementing this cryptographic code because as we see you can just use the library as used okay great any any help certainly welcome um any anything to do with the feature gating still joshua is that all um yeah i renamed or renamed it to kind of follow what we were doing before which was like the protocol feature underscore crypto extras and i

  28. 16:56

    implemented that into evm uh feature but uh other than that that's that's pretty much good to go i i still have to push that one but i was i was uh going a little bit over time when going through the f uh compression function um then i got one last thing yeah then i guess i've just been fixing the lingering ci issues because there's a couple backwards actually that was weird i i think all the backwards compatibility issues are done but i ran into like a weird server issue

  29. 17:30

    that something wasn't running when it should have so i'm not not too sure what that was about okay uh one one note here i don't think we need this uh on this granular level yeah that's that's that's that's pretty basically already gone okay all right that was that was going on later comments yeah yeah that that's that's gonna come and that's it's already gone okay okay good good all right so this is um um how does it look let's say that we

  30. 18:01

    we get the the hash function missing hash function in uh by wednesday next week how does it look uh from your point of view otherwise joshua in terms of the overall task list here yeah i looked at multiple different uh source codes that kind of that did the same thing and uh some of them were able to use the blake2 library that they were already no i i don't i don't mean i don't mean black let's let's defer blake uh it's it's not an important question

  31. 18:27

    there's there's many more important questions here than than blake uh so what about the the rest of all of these items other than blake yeah so the invest the investigate yeah i already took a bunch of notes on how 3971 already does uh or are did their uh implementation so i just got to add those last little bits um i still gotta do the test code uh test case for easy recover 10k um and then i still got to measure and assign the gas cost right that was another question

  32. 18:59

    because uh he mentioned that i needed a uh server because it has to run for six hours uh i believe yeah i mentioned that yes yeah uh i i wouldn't uh get held up on questions like that uh just uh boot one up and expensive um otherwise otherwise you introduce pipeline stalls into critical paths and that's not good right so let's just get it done um so i believe that the the other question that uh you had here

  33. 19:31

    we will need either yogani kuciako for or perhaps evgeny coupon or bo and one who on the call know something about this as in uh when we had new host functions that have never existed in the protocol before does the genesis json file need to be changed as well i just really know that that file is well so first of all that file is now the genesis file it is a file that's used to uh for testing purposes

  34. 20:04

    and uh and yes it has to be changed but that's not for the reason of changing the genesis file uh it's mostly just like uh i think some tests rely on that file uh rely on the fact that the file is updated okay um joshua maybe you can ask a more specific question to unblock you on this yeah it was just more so like uh the jason's failing to parse because we have a a check to make sure that uh all the fields

  35. 20:33

    are are the same um so it fails because it goes oh right md 160 doesn't exist because of course the one that was compiling was not running off the evm features so how do you want me to make a new genesis file well in that case you just don't update genesis file this opening this file all right all right no problem that was my other question if i just don't update it because i i think i already deleted it locally um

  36. 21:04

    just to get it to compile on my end okay okay uh all right so that sounds like you got pretty much the questions answered and will be able to continue anything else blocking blocking you no no that's that's it okay great um okay so those are those are the theme updates um now if we had uh if we had alex with us probably we would discuss the connector in more detail uh uh you have guinea you do you have any anything to comment on that um you are not blocked

  37. 21:44

    on anything you just actually were saying a new update you just need to finish the coding and and that's all you're not waiting on kirill or alexa or me or anything like that same question for the bully um other than the the support in the evm contract which is uh underway um do you need anything else frank any surprising okay my side either additional uh help so i think from in next week i should complete my task

  38. 22:34

    okay great okay uh then those are pretty much the the items we had let's see let's have a look at the roadmap also i will share another screen here so the bridge releases ostensibly next week and ours is not far behind so this is the roadmap as we originally formulated it six weeks ago and let's see where we are so the debug bounty program got deferred all together that will begin earliest middle of

  39. 23:39

    middle of april let's see that looks better for scrolling so currently the goal is that we we would deploy let's look at the calendar and see what date that was march 29 is a monday just a few days before the end of the month and we will certainly have something to deploy on that day for testnet no question given the evm contract approach a different question is what all might be missing in terms of performance

  40. 24:18

    and uh and testing um yeah actually arto i want to ask questions so are you still planning to release evm uh to test that on march 29th uh correct but not not any changes not any changes to near core uh just the contract oh so that that's that release is already near core yeah so we we don't need to have a protocol protocol change by then uh okay the the protocol change later on uh so that the joshua is working on right now that will give us a performance boost

  41. 24:57

    but that can be delivered asynchronously for now the the contract will have the same functionality just use more gas that's that's that's that's good enough for the end of march testnet okay thanks uh so the let's see so the bug bounty program was deferred um for both bridge and evm on the on the performance and uh we are definitely late with the replayer which is frank why why we need

  42. 25:29

    to know how long it will take to replay something like gurley so if you would calculate that as soon as you can and we did the protocol upgrade proposal there wasn't that much discussion around it that i saw but then again it's no longer on the critical path given the change to the contract the bridging is coming along nicely i do believe we can make that that date and uh the connector of course

  43. 26:02

    is also coming along very nicely in in fact this is pretty much on schedule still and the hard fork brilliant hard fork got um d scoped although upstream is actively working on it so we might uh we might even have it um in the next few weeks but if if so it's just a cherry on top the berlin hard fork for the ethereum mainnet is scheduled for middle of april so we have a little bit a little bit time before any tooling starts to assume

  44. 26:31

    that berlin is available um okay so i think we are we have late on the free player here um we are doing okay on the the connector and bridge and what's not really captured here because we when we made this roadmap we did not anticipate changing the architecture what is not captured here is um that we did change the architecture and and there are some um some things that still need

  45. 27:09

    re-implementation such as for example the pre-compiles so that's that's what i'm working on actively okay uh it's not looking too bad but time is time is running out anything else to to discuss today anybody have any questions or concerns okay then i suggest we get back to book and keep this a nice and short meeting um next week i'm sure we will have more to talk about given the bridge release and and all of this independent tracks uh coming together to

  46. 27:51

    some conclusion on each of our parts so i wish everybody a nice weekend and talk to you next week see you bye bye see you guys