Skip to content
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

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Conversation

jbrower95
Copy link
Contributor

@jbrower95 jbrower95 commented Aug 16, 2024

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.
image

--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.

@jbrower95 jbrower95 marked this pull request as ready for review August 16, 2024 18:04
cli/core/beaconClient.go Outdated Show resolved Hide resolved
cli/core/findStalePods.go Outdated Show resolved Hide resolved
cli/core/findStalePods.go Outdated Show resolved Hide resolved
cli/core/findStalePods.go Outdated Show resolved Hide resolved
cli/main.go Outdated Show resolved Hide resolved
cli/main.go Outdated Show resolved Hide resolved
"github.com/pkg/errors"
)

func PodManagerContracts() map[uint64]string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cli/core/findStalePods.go Outdated Show resolved Hide resolved
podAddress := executionWithdrawalAddress(validator.Validator.WithdrawalCredentials)
if podAddress != nil {
slashedEigenpods[*podAddress] = append(slashedEigenpods[*podAddress], validator)
validatorToPod[validator.Index] = *podAddress
Copy link
Contributor

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?

@jbrower95 jbrower95 merged commit 19cc998 into master Aug 20, 2024
4 checks passed

allActiveSlashedValidatorsBelongingToEigenpods := aFilter(allSlashedValidatorsBelongingToEigenpods, func(validator ValidatorWithIndex) bool {
validatorInfo := allValidatorInfo[validator.Index]
return validatorInfo.Status == 1
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants