Skip to content

feat: support moocow#177

Merged
ypatil12 merged 7 commits into
masterfrom
alex/support-moocow
Jun 10, 2025
Merged

feat: support moocow#177
ypatil12 merged 7 commits into
masterfrom
alex/support-moocow

Conversation

@wadealexc

@wadealexc wadealexc commented May 21, 2025

Copy link
Copy Markdown
Contributor

Adds support for upcoming v1.6.0 core contract release, allowing EigenPods to request consolidations and withdrawals.

See EigenPod notes, docs, etc in the relevant PR: Layr-Labs/eigenlayer-contracts#1375

TODO: it's quite difficult to test this at the moment, since the upgrade isn't live on testnet yet. I don't have time this week to spin up a foundry forked network / anvil environment, so for now I've done some manual validation but it's possible there are bugs.

New commands and usage examples follow.


Notes on Safety/Predeploy Fees

Quick note on batching. One of the main things I want to avoid with the CLI is footguns due to the predeploy's exponential fee increase. For example, if someone submits a ton of consolidations at the right time, my predeploy fee might suddenly be much higher than I expected. The CLI needs to guarantee the user an upper bound on the predeploy fee. For this reason:

  • "Consent requests" before transactions cannot be turned off with the --no-prompt flag
  • Requests can be batched into multiple transactions, just like checkpoint/credential proof submission. However unlike checkpoint/credential proofs, we re-request consent with a freshly-calculated fee for each chunk in the batch. This ensures that if the fee spikes between transactions, the user is aware.
  • There is a --fee-overestimate-factor flag for each of the new commands. This is "1.5" by default, which will have the user send 1.5X the currently-measured predeploy fee when calling the contract. The user can tweak this if they want more/less wiggle room.

Required Flags

Outside of arguments required for specific commands, all new commands require the following flags:

-p podAddress
-b beaconNodeRPC
-e execNodeRPC
--sender senderPrivateKey (must use to actually call EP methods)

Consolidate - Switch

Pass in a list of validator indices. This will initiate switch requests to change each validator's withdrawal prefix from 0x01 to 0x02. In order to be a consolidation target, a validator must have 0x02 credentials.

./cli consolidate switch --validators 425303,123444,555333

Consolidate - Source to Target

Pass in a target index and a list of source indices. This will initiate consolidations from each source to the specified target.

./cli consolidate source-to-target --target 425303 --sources 123444,555333

Request Withdrawal - Full Exit

Pass in a list of validator indices. This will initiate full exits from the beacon chain.

./cli request-withdrawal  full-exit --validators 425303,123444,555333

Request Withdrawal - Partial

Pass in a list of validator indices and an equally-sized list of amounts in gwei. This will initiate partial withdrawals from the beacon chain. Note that this method will NOT allow amountGwei == 0, as that is a full exit. We want to be extra sure that CLI users are aware if they are initiating a full exit. Also note that in order to successfully process a partial withdrawal via this method, the beacon chain requires the validator to have 0x02 credentials. 0x01 validators can only full-exit.

./cli request-withdrawal partial --validators 425303,123444,555333 --amounts 1000000000,2000000000,3000000000

wadealexc added 5 commits May 14, 2025 13:52
* refactor: consolidate status print statements
* make verbose flag a per-command option instead of global (it was hidden when running subcommand help)
* fix verbosity in status command
* remove extraneous print in status command
@wadealexc
wadealexc marked this pull request as ready for review May 21, 2025 18:56
@wadealexc
wadealexc requested review from jbrower95 and ypatil12 May 21, 2025 19:29
@wadealexc wadealexc changed the title feat(wip): support moocow feat: support moocow May 21, 2025

@ypatil12 ypatil12 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor comments, I think we should:

  1. Add a usage guide for getting relevant validators to pod (so we can pass in the indices)
  2. Give error to user if attempt to consolidate or withdraw with validator type that will be a no-op on beacon chain

Comment thread cli/commands/consolidate.go
Comment thread cli/commands/consolidate.go
Comment thread cli/commands/requestWithdrawal.go
Comment thread cli/core/utils/utils.go
Comment thread cli/commands/consolidate.go

@ypatil12 ypatil12 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we also update the readme with usage guide in the PR description?

@ypatil12

Copy link
Copy Markdown
Contributor

-p, -e, -b gave me an error:

image

@wadealexc

Copy link
Copy Markdown
Contributor Author

-p, -e, -b gave me an error:

image

looks like you used --e rather than -e?

@wadealexc

Copy link
Copy Markdown
Contributor Author

hmm, no, --e works on my machine. i'm not sure what's erroring there, but maybe your env var is empty?

@ypatil12
ypatil12 merged commit f8aea12 into master Jun 10, 2025
6 checks passed
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.

2 participants