-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: consistently check no pending withdrawals when processing voluntary exit #7379
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7379 +/- ##
============================================
+ Coverage 48.62% 48.63% +0.01%
============================================
Files 603 603
Lines 40516 40506 -10
Branches 2071 2071
============================================
Hits 19700 19700
+ Misses 20778 20768 -10
Partials 38 38 |
Performance Report✔️ no performance regression detected Full benchmark results
|
Something to note, we apply the same validation on the api as we do on gossip
this is due to the fact that we publish it to the network immediately
but something we could consider is that we separate out some transient checks which would become valid eventually, there are like 3-4 of them and post-electra we add another one which checks that there are no pending withdrawals. Meaning we would keep the volunary exit in the cache and publish it to the network only after those conditions are met. As this has worked like this since phase0 it seems like no issue but something to consider to improve UX, on the other hand I can also see that accepting the voluntary exit but not publishing it immediately might be confusing as well. |
Fixes another issue, we might build a block with an invalid voluntary exit since we haven't updated the check when building the block post-electra, only in state transition.
This was caught by pk910
Looking at the spec, it's pretty clear that those validations should be applied to gossip as well as block construction
From phase0 p2p / gossip spec here
which references
process_voluntary_exit
which was updated in electra hereUpdating the existing
isValidVoluntaryExit
and adding the check there ensures we apply the check everywhere. It also follows the same order of checks now as in the spec, ie. run less expensive checks first.