Stateless Implementers Call #25

Stateless Implementers Call · 23 Sept 2024 · 22:26

Stateless Implementers Call #25, held on 23 September 2024. These calls follow work on stateless Ethereum and the move to a new state tree, with client teams sharing progress and open questions.

Topics

From Stateless Implementers Call, hosted by Ethereum Foundation.

Transcript

all righty welcome everybody to stateless implementers call 25 this is agenda 1159 in the PM Reco uh so we have a pretty light agenda today just shared it in the chat um yeah we can go ahead and uh get started with Team updates if anyone would like to go first okay I guess I'll go uh yeah we've been working on some uh well the the test net relaunch we merged most of our PRS

there's one that's still outstanding but we're currently debating so we should uh we should merge it soon um otherwise uh benchmarking I've had a lot of uh hardware issues um so no no to do to make right now unfortunately but uh yeah it's uh it's chugging along so hopefully next week I can share some stuff and uh otherwise there was some updates into the test Fields I think we we released the latest version ignasio is that uh is that correct yes um we we fixed some extra gu bags and I

also fix some tests uh regarding the exoy witness checks that were enabled a while ago so last Monday I shared with um some people a new version of fixtures so they can run them um we already know that G and nether mine already agree on the state route and use gas for them so that's pretty nice um but yeah we like it would be nice if other clients might uh use them to know if they are ready for the dev net and I also wanted to say that if y clients have a stateless mode

it will be also cool to run these fixtures in stateless mode which basically means try using the witness as your PR pre-state source of Truth to actually run the fixure right because that's kind of the whole point of the of all this um everything in the witness should be sufficient to run the fixture and to let you the test pass uh so uh I think actually running the fixture the fixtures in stateless mall is actually the ultimate test for knowing if the witness is having um the right data for running um a block so yeah just wanted to

mention that too uh but apart from that um well after having some extra confidence that more clients were passing this version of fixtures I have a bunch of other tests that I can enable uh that will be testing more like Corner cases about running out of gas in very particular places of execution uh but for the I have to do a lot of manual work to find this gas the right gas limits for the tests and yeah after I know that things are a bit stable I can do that work um because if we keep changing or fixing our bags I might have to do that work again so yeah

that's kind of the next steps right and I forgot to add the yeah we're working on uh rebasing on of Cancun it's taking a long time but uh yeah we're we're focusing on that now uh I can go next so for NE mind there is no major update just working with ignasio over h test and I'll also try to run the hyp test in stat test mode this week that's it okay on bus side I was last week trying to work on the flat DB so I'm

trying to to have a flat DB based on stem key uh for that I did some micro benchmarking I wanted to see what will be the impact in the S load operation and uh with my first micro benchmarking I found that really the performance was really bad um I had some discussion with Kev andry uh in order to understand why it's really really slow and we found that maybe we can have some optimization in the rest C library and maybe also on the Bas side we can optimize by changing how we are calling the library but we are also trying to integrate the Constantine Library into bzu we want also to compare the

performance with with this library and uh after that if we can see that result are better maybe I will continue to work on Splat PB based ony but for the moment regarding the performance we have I think we need to optimize performance before continue on this part uh on the gas C I will let Lis talk about that he's currently working on that yeah um so uh I I didn't make much progress on the gas costs I switch over to the enabling getting the test framework the fixtures to run with v on vessel and yeah I'm making good progress

I'm getting some errors while I'm executing the tests but uh so I'm I'm kind of missing some uh setups to do um and yeah I'm making progress on on that I will look into finalizing the gas costs uh once I get this out of the way uh just just some remark because we had the conversation with Kim last week so yeah we have u a hashing that is seven times slower than Kat Shack U I still

need to do some benchmarks that yeah I was uh like bed down by some hardware issues uh but it seems that using a flat DB that is using directly the the the hash uh the hash Keys like the pson hash Keys seem to be acceptable in terms of performance but yeah um I need the benchmarks to to support that claim yeah it's clearly what I want to have also on bizu having something close to seven times slower but for the moment when I did some Benchmark it was more 300 times slower so clearly we need to to look in the Bas sign of the

performance Co did we get everybody any other updates sweet if not we can keep going uh cool agenda item number two uh gam has some thoughts on E 7702 in veral yeah

so well you might be aware of the attempt to break Petra into two um two forks one is called Petra pectra and the other one is called temporarily called p b um that might be o after all we don't know yet it's not really important at this point um but part of Petra is uh 7702 um yeah let's let's not start the let's not start a fight over the the naming um 7702 is uh going to be in Petra so we implemented or we we made a proposal

that it's actually still in review let me see if I still have the pr right here uh yeah that's the one let me also share the link um in the in the chat is that it yeah um right okay here we go um so long story short um we yeah if you look at the EIP 7702 you have um you have uh a new type of transaction that contains uh what's

called an authorization list uh which is just um yeah like some kind of uh add um some kind of information that you use to update some accounts uh so there's an algorithm that is being described you you need to verify that uh whoever like the signature basically of that authorization and then if you do this authoriz if this authorization is correct uh you charge some gas and you will replace uh the code AS 0 XF 010 and concatenated with the address so you you update the code

basically and uh this is this serves as a pointer to um this serves as a pointer to uh call like if you for example do an xcode hash or if you do a call or anything um you uh it delegates so you just instead of calling uh if you do an excode hash on this account for example it will go and look into the address um and basically do the like forward it to the account that it's pointed pointed to so you will got you will get the code hash not of the eoa you're calling into but of that address um so this is an

update to the EIP that does exactly this that just says uh if you if you called the those functions you also need to touch the code hash LIF key um you we removed the specific uh uh case for xcode hash because uh we now we well I mean at least when it's uh when it's uh yeah when you need to when you access an account you need to know uh what the code is so actually this is incorrect there's already a problem I realized with the CIP uh you need to check the the first uh the first uh chunk of the code so yeah that should not be the code

hash it should be the code so yeah the long story short I just want to bring your attention on this uh please have a look there's a lot to criticize uh there's already a need for some updates actually I just realized uh but the idea is that yes because we need to check that there might be an inter Direction there might be a delegation we need to check the extra code uh like the first the first code chunk to see what what type of of account this is and we need to forward it um I think there's something else right um so yeah when you execute the code when you do an X code hash when you do whatever you need to check and then

you need to find the delegated address if that's a delegation and so if this is a 7702 account if this is a special kind of account instead of executing the the code of the account the target account you need to replace it with the the delegated account so yeah there's there's definitely a lot of CR of this ISM uh to this to the CIP but please have a look and tell me uh tell me what you think um it also describes the transaction itself so this I think is a bit more correct than the other part of the CIP but yeah the idea is that every time you you make uh you make a call uh you know that like for

for the type of transaction that does update the the the account uh you will need to read those values you will need to read the the leaf key you need to read the the code hash and you will need to read the the offset the first uh sorry the first chunk which is at code offset um actually this no no that's correct yeah and um and then you will need to write that and also fill them if it does not exist and uh yeah write uh write the first code the hash Le key if uh if the address is is not if the the code hash is is not so if you're creating an account with this operation you will need to write the the code hash

but otherwise you have to update the the basic data Leaf key because the nons needs to be incremented and uh you need to update the the first uh the first code slot um yeah right and there's definitely a controversial uh claim here that I'm um that I'm waiting for feedback on uh there are some extra costs that are added to to the 7702 EIP and I think but I'm not sure that they need to be clear they need to become zero because this is covered by the whole uh witness access costs so yeah just uh just wanted you guys to know

that this EIP exists please sorry this PR against the EIP exist please have a look give some feedback and uh yeah hopefully we can merge this for for devet 8 uh yeah y That's it cool thanks again do you or ignasio want to continue on with the topic of partial witness charging yes uh I can mention about this topic um so um last week or the week before I was the Bing um test that I wrote regarding um it is a test that basically does um a

jump to some other like you are executing a contract you jump to some other place and you have to charge for this new extra cold chunk and what I'm testing here is if you have to charge 200 gas for this new cold chunk as usual but you only have let's say 190 of gas available um I wanted to check really what e clients were doing in this case and this ended up being um um like a test that I discovered that it was different from like was doing something some somewhat

weird and the thing is that in Kenya as far as I know uh it was decided that if you don't have enough gas to to do whatever witness charging you have to do you actually don't have to include that in the witness so to continue the example if you do a jump and you have 190 of available gas to charge for that cold chunk where you are champing um you don't have to include that Cod Chunk in the witness this is something that gu was doing so gu was including this code chunk in the witness even if he didn't have enough gas to pay for it um so

that's that's kind of a a bug let's say uh just wanted to be clear that uh that shouldn't happen another situation where this can happen is there are many places in the execution where we have to include in the witness more than one Leap so for example if we try to do a right on an account that doesn't exist we usually have to write uh the basic data and the code hash for the address so intentionally I mean the intention is to add kind of to leave values atomically in the witness but maybe you only have gas to include the basic data

part of it but not the code hash so in these cases G was always including both leaves because uh it first added things to the witness and then it return how much gas un needed and then it tried to charge the gas so if you didn't have enough gas for it you have already added that thing to the witness so it was a pretty um it was like quite simple logic but um it didn't allow to do this kind of partial witness charging or having like finer granularity in how you charge for witness additions uh so this is uh what this open PR that we have in G uh that yo

mentioned before um we are still thinking on how to if like I I did like a fix for this but we are trying to see if like the best um way to fix it fix it but I just wanted to like um uh explain the situation because just to be sure that everyone is aware of it I know that n mine is already has already implemented this uh because I um I ALS so uh fill some extra test where I reenable this test that surface the situation and we are both agreeing on it uh but yeah forget it has been a bit tricky to solve this so um I don't know

maybe in other clients isn't the case it kind of depends on how you designed all the gas charging for the witness uh but yeah just to make sure that um you you only add things to the tldr that you should only add things to the witness if you have the available gas for it um um so yeah if you want to know a bit more details of have other like use cases where this can happen you can pick me if you want but uh yeah I guess this um this these two examples that I gave my already explain a the situation I know if anyone has any question but

that that's it thank you n cool if no questions on that the last agenda item we have is just circling back to the question of test net and potentially getting it launched this week I don't know if anyone has updates thoughts uh gasio or anyone else um yeah I mean we're more or less ready like we're one PR away from from launching um the question is really was there the devop the eth P P Ops has time

by the at the end of the week to to launch a test net I think I think 10ish is ready so that's two two clients that we can launch a test net with there's been some up up grade from Lighthouse base sorry tiku and um load star of course so yeah I think it's it's worth making an attempt this week it's just a question of uh devops having some time to do it I think I saw Parry in the call yeah I think later this week we should be able to try it out I would still do it locally for store so that you guys have like a testing environment in case there's bugs found and then once it works locally would switch to a public

doesn't it yeah that sounds good um so okay I think we have uh we have to go finally for definit 7 um yeah other there questions otherwise I think uh we can have uh you know an early end to the call seems like no questions so should we end it there let's do it cool all right thanks everybody see in two weeks yeah take care

by please hi