-
Notifications
You must be signed in to change notification settings - Fork 117
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(state-transitions): verify deposits against contract #2115
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: nidhi-singh02 <[email protected]>
This reverts commit 099716d.
Signed-off-by: nidhi-singh02 <[email protected]>
Signed-off-by: nidhi-singh02 <[email protected]>
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## state-transition-add-UTs #2115 +/- ##
============================================================
+ Coverage 23.48% 26.71% +3.23%
============================================================
Files 357 357
Lines 16064 16092 +28
Branches 12 12
============================================================
+ Hits 3772 4299 +527
+ Misses 12121 11519 -602
- Partials 171 274 +103
|
d28ec4c
to
fb9d020
Compare
fb9d020
to
6a191d1
Compare
@@ -87,7 +87,8 @@ func (s *Service[ | |||
envelope, err := s.retrieveExecutionPayload(ctx, st, blk) | |||
if err != nil { | |||
return blk, sidecars, err | |||
} else if envelope == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not strictly necessary but OCD kicking in here 😅
9c43988
to
64d19e5
Compare
if err != nil { | ||
return err | ||
} | ||
eth1Data, err := st.GetEth1Data() | ||
depositIndex++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@calbera while adding unit tests spot this bug.
st.GetEth1DepositIndex()
store the latest processed deposit, hence we need to move it up to process next.
This is similar to what we do in genesis
Deposit list in execution payload body should be validated against the deposit contracts events to avoid creation of fake validators or censorship of real validators.
To do that this PR:
Moreover it adds much needed logs to state processor (to be filled in time)
Build on top of #2114
Note:
and several like