Exit Message Generation & Signing
Exit Message Generation & Signing
Keystores or Dirk
If your validator signing keys are in keystores or in Dirk remote keymanager, the easiest method is to use ethdo.
For Keystores:
Create an ethdo wallet
Import keystores
Generate an exit
Erase the wallet if it's no longer needed
Create a new wallet:
Add key from a keystore:
Generate and sign an exit message:
ethdo will print out the exit message to stdout. You can save the file ethdo ... > 0x123.json
.
After we are done, delete the wallet:
If you are looking for a way to automate the process, check out this example.
:::info Although keystores are encrypted, it is highly recommended to interact with them in a secure environment without internet access. :::
ethdo allows you to prepare everything necessary for offline exit message generation in one convenient file. For this, on a machine with access to a Consensus Node run:
This command will pull validators info, fork versions, current epoch and other chain data for offline exit message generation and save it to offline-preparation.json
in the ethdo
directory.
This file can be then transferred to a secure machine along with ethdo
binary, for example on a encrypted USB drive.
On the secure machine, put offline-preparation.json
into the directory ethdo
is ran from, use --offline
argument for the validator exit
command and remove --connection
:
For Dirk:
For Web3Signer or Proprietary Signers
If you are using the /api/v1/modules/{module_id}/validators/generate-unsigned-exit-messages/{operator_id}
endpoint of the KAPI, you can skip getting the epoch and constructing an unsigned exit message in the example below.
Get current epoch:
Get fork parameters:
Get genesis parameters:
Construct an exit message:
Prepare a signing request:
Send the request:
Finally, construct a signed exit message:
:::info It's advised to prepare all the necessary parameters (forks, epoch, etc) ahead of time and communicate with Web3Signer securely, for example via a secure network with no other internet access. :::
Last updated