-
Notifications
You must be signed in to change notification settings - Fork 35
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
--find-stale-pods
and --correct-stale-pod
#132
Conversation
"github.com/pkg/errors" | ||
) | ||
|
||
func PodManagerContracts() map[uint64]string { |
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.
u can prob just do a compile time map declaration? https://github.com/Layr-Labs/eigenlayer-backend/blob/8bf03057b8eea6b5ee186b9907fb71b3e65aba85/common/utils/webappconfigs.go#L60
podAddress := executionWithdrawalAddress(validator.Validator.WithdrawalCredentials) | ||
if podAddress != nil { | ||
slashedEigenpods[*podAddress] = append(slashedEigenpods[*podAddress], validator) | ||
validatorToPod[validator.Index] = *podAddress |
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.
u could just reuse withdrawalAddressesToCheck
here?
4a0d1e2
to
8efc429
Compare
8efc429
to
4ac29f7
Compare
|
||
allActiveSlashedValidatorsBelongingToEigenpods := aFilter(allSlashedValidatorsBelongingToEigenpods, func(validator ValidatorWithIndex) bool { | ||
validatorInfo := allValidatorInfo[validator.Index] | ||
return validatorInfo.Status == 1 |
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.
Should probably reuse utils.ValidatorStatusActive
here
This PR introduces new two commands to the CLI --
--find-stale-pods
and--correct-stale-pod
.--find-stale-pods
- This will traverse the beacon state and look for any nodes who have been slashed, s.t their execution balance is now 5% greater than the total sum of their beacon balances. This essentially indicates that you should checkpoint this node again (or, as an external party, invoke
verifyStaleBalances()
).- This command reports back all the data in JSON by default. If using
--verbose
you can get a non-JSON view with additional log messages.--correct-stale-pod
- Now that you've used the previous command to identify all of the eigenpods who have stale balances, you can use
--corect-stale-pod
to force the pod to start a new checkpoint! The flow looks like this:- If the pod in question has a checkpoint in progress, the CLI will attempt to complete it by generating proofs and invoking
verifyCheckpointProofs
.- The CLI will otherwise/then attempt to start a new checkpoint, using the
EigenPod.verifyStaleBalances()
method. This onchain function requires a credential proof targeting the slashed validator, and starts a new checkpoint on the pod.We'll be running these at EigenLabs, to keep the execution balances in sync with beacon balances for pods.