Skip to content

Commit f8aea12

Browse files
authored
feat: support moocow (#177)
* feat: add withdrawal prefix to status output * refactor: consolidate status print statements * refactor: verbosity * 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 * feat: consolidate command * feat: add support for withdrawal requests * chore: improve help texts * fix: adjust indentation and spacing in consent messages * docs: add usage to README
1 parent 83faa43 commit f8aea12

File tree

15 files changed

+1845
-118
lines changed

15 files changed

+1845
-118
lines changed

cli/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,85 @@ Proofs are submitted to networks in batches by default. You can adjust the batch
6060

6161
Congrats! Your pod balance is up-to-date.
6262

63+
## Consolidation Requests
64+
65+
#### How Does Consolidation Work?
66+
67+
Consolidation allows you to combine multiple validator indices together, allowing your total balance to occupy fewer validator indices and saving tons of gas on checkpoint proofs.
68+
69+
Consolidations have a _source_ and a _target_. The _source_ is the validator index that will be "consumed", and the _target_ is where the source's balance will go once the consolidation request has been processed on the beacon chain.
70+
71+
Consolidations are initiated through your EigenPod which forwards requests to the consolidation predeploy. In order to successfully consolidate a source to a target, there are two primary requirements to keep in mind:
72+
73+
1. The _target_ validator must have 0x02 withdrawal credentials (and must not be exiting/exited) in order for the beacon chain to successfully process the consolidation. This is NOT checked by either the CLI or your pod.
74+
2. The consolidation predeploy requires each request to be sent with a "request fee", which fluctuates depending on whether more requests are being added than removed. This fee is only updated at the end of each block, so if you're sending a bunch of requests in a single transaction, the current consolidation fee applies to each of the individual requests.
75+
76+
For more technical details and a walkthrough of how to perform a consolidation, see the [MOOCOW HackMD](https://hackmd.io/uijo9RSnSMOmejK1aKH0vw#Technical-Details).
77+
78+
#### Required Flags
79+
80+
All consolidation requests require the following flags in addition to command-specific flags:
81+
82+
```
83+
-p podAddress
84+
-b beaconNodeRPC
85+
-e execNodeRPC
86+
--sender senderPrivateKey
87+
```
88+
89+
#### Switch to 0x02 credentials
90+
91+
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.
92+
93+
```
94+
./cli consolidate switch --validators 425303,123444,555333
95+
```
96+
97+
#### Source to Target
98+
99+
Pass in a target index and a list of source indices. This will initiate consolidations from each source to the specified target.
100+
101+
```
102+
./cli consolidate source-to-target --target 425303 --sources 123444,555333
103+
```
104+
105+
## Withdrawal Requests
106+
107+
#### How Do Withdrawal Requests Work?
108+
109+
Withdrawal requests allow your pod to initiate partial/full withdrawals on behalf of its validators. There are two kinds of withdrawal requests:
110+
1. Full exits. Fully exit a validator from the beacon chain, withdrawing its entire balance to your EigenPod. This works just like a standard beacon-chain-initiated full exit.
111+
2. Partial withdrawals. Withdraw a portion of your validator's balance, _down to 32 ETH_. The beacon chain will still process withdrawals that would bring a validator under 32 ETH
112+
113+
Withdrawal requests are initiated through your EigenPod which forwards requests to the withdrawal request predeploy. For more technical details, see the [MOOCOW HackMD](https://hackmd.io/uijo9RSnSMOmejK1aKH0vw#Technical-Details).
114+
115+
#### Required Flags
116+
117+
All withdrawal requests require the following flags in addition to command-specific flags:
118+
119+
```
120+
-p podAddress
121+
-b beaconNodeRPC
122+
-e execNodeRPC
123+
--sender senderPrivateKey
124+
```
125+
126+
#### Full Exit
127+
128+
*(0x01 AND 0x02 validators)*
129+
130+
Pass in a list of validator indices. This will initiate full exits from the beacon chain.
131+
132+
```
133+
./cli request-withdrawal full-exit --validators 425303,123444,555333
134+
```
135+
136+
#### Partial Withdrawal
137+
138+
*(0x02 validators only)*
139+
140+
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.
141+
142+
```
143+
./cli request-withdrawal partial --validators 425303,123444,555333 --amounts 1000000000,2000000000,3000000000
144+
```

0 commit comments

Comments
 (0)