ethereum-consensus
ethereum-consensus copied to clipboard
`bin/ec`: generate signed bls to execution messages
I'm down to try this out @ralexstokes unless it falls under/blocked by your current open pr #263
@PatStiles that would be great!
let me merge that one (should merge today) so you have the same foundation to work off of and then it would be great if you could build this command out
I think the best way to handle this would be:
given a withdrawal mnemonic, a range of key indices to operate on and a path to a configuration file, generate a directory with the signed bls to execution changes.
using the mnemonic and the indices, we can get each validator's withdrawal private key (just like we do in #263). the format of the configuration file is an array of json objects that contain the validator index and the desired execution address per validator
actually it would be nice to have two commands, one to take a range of validator indices and the execution address(es) to generate this config file, and then another to make the signed objects
then, we can just assemble the BlsToExecutionChange
message and sign it, each signed message can be serialized as json and stored in the target directory
likely something like
-
ec validator generate-bls-to-execution-change-config beacon-api-client-endpoint path-to-pubkey-file <execution-address OR path-to-execution-address-file>
for each pubkey in path-to-pubkey-file
, use the beacon api client to fetch their validator index and make a pair (index, execution-address) (either using the one execution address for all validators, or grabbing the corresponding one from the file) and once we have all of these pairs together, write them as json to STDOUT
-
ec validator generate-signed-bls-to-execution-changes withdrawal-mnemonic range-of-key-indices path-to-config-file
do the thing up above
@PatStiles #263 has been merged, you should be able to make a new command on top of that work to do this now!