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

Add ability to generate signed exit messages with mnemonic or validator key #1

Closed
wants to merge 2 commits into from

Conversation

valefar-on-discord
Copy link
Collaborator

Port from ethereum#355

Adds two commands:
exit-transaction-keystore and exit-transaction-mnemonic

exit-transaction-keystore

Allows the user to specify a single keystore file to generate an exit message if the provided password is correct.
The success of this command will result in a single signed_exit_transaction-***.json file in exit_transactions

exit-transaction-mnemonic

Allows the user to specify a mnemonic to generate 1-n exit messages depending on how many validator indices are provided. The success of this command will result in n signed_exit_transaction-***.json files in exit_transactions for each validator index provided.

Testing

Build as instructed

Create a new mnemonic and keystore(s) on mainnet with
./deposit.sh new-mnemonic

For each keystore, create an entry in this base offline-preparation.json file:

{
  "version":"3",
  "validators":[
    {
      "index": "<ANY_INDEX_IE_123456>",
      "pubkey": "0x<PUBKEY>",
      "state": "active_ongoing",
      "withdrawal_credentials": "<CREDENTIALS>"
    }
  ],
  "genesis_validators_root":"0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95",
  "epoch":"274294",
  "genesis_fork_version":"0x00000000",
  "exit_fork_version":"0x03000000",
  "current_fork_version":"0x04000000",
  "bls_to_execution_change_domain_type":"0x0a000000",
  "voluntary_exit_domain_type":"0x04000000"
}

With the saved offline-preparation.json above in the same location as ethdo, create an exit message with ethdo using the following command:
./ethdo validator exit --offline --mnemonic="<GENERATED_MNEMONIC>" --validator=<VALIDATOR_INDEX_IN_PREF_FILE>

Create an exit message with the CLI using both
./deposit.sh exit-transaction-mnemonic --epoch=274294
for each keystore
./deposit.sh exit-transaction-keystore --epoch=274294

All outputs should match

@valefar-on-discord valefar-on-discord changed the base branch from master to main April 3, 2024 15:41
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.

1 participant