-
Notifications
You must be signed in to change notification settings - Fork 1k
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
EIP-7002:Execution layer triggerable withdrawals #14031
Conversation
if isFullExitRequest { | ||
//# Only exit validator if it has no pending withdrawals in the queue | ||
if pendingBalanceToWithdraw == 0 { | ||
maxExitEpoch, churn := validators.MaxExitEpochAndChurn(st) |
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.
Could be defined outside of the for loop
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.
I don't think so, if there are multiple values the loop updates the state I think
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.
Ah. Good point
Co-authored-by: Sammy Rosso <[email protected]>
Co-authored-by: Sammy Rosso <[email protected]>
Co-authored-by: Sammy Rosso <[email protected]>
|
||
vIdx, exists := st.ValidatorIndexByPubkey(bytesutil.ToBytes48(wr.ValidatorPubkey)) | ||
if !exists { | ||
log.Debugln("Skipping execution layer withdrawal request, validator index not found") |
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.
What's the difference between Debug
and Debugln
?
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.
hmm not sure i used debugln since i know it adds a new line not sure if debug also does
@@ -75,6 +86,107 @@ import ( | |||
// withdrawable_epoch=withdrawable_epoch, | |||
// )) | |||
func ProcessExecutionLayerWithdrawRequests(ctx context.Context, st state.BeaconState, wrs []*enginev1.ExecutionLayerWithdrawalRequest) (state.BeaconState, error) { |
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.
In the spec the function is called process_execution_layer_withdrawal_request
(Withdraw
--> Withdrawal
). The parameter also has Withdrawal
in the name,
Co-authored-by: Radosław Kapka <[email protected]>
What type of PR is this?
Feature
What does this PR do? Why is it needed?
implements https://eips.ethereum.org/EIPS/eip-7002 with changes described in https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/beacon-chain.md
Which issues(s) does this PR fix?
Fixes #
Other notes for review