Unregistering Validators Programmatically

Hi all,

I have previously provided a Python unregister script in my GitHub here but there were a couple of “quality of life” issues with this script. Firstly it requires the validator owner badge to be sent to a Keystore wallet (thereby meaning transactions can’t also be made from the mobile wallet). Secondly, the current epoch is required to be manually entered for the transaction.

I am pleased to share an alternative that uses a seed phrase to derive the private key. The advantage of this is that the validator owner badge can be retained in the mobile wallet for ease of access. In addition, the current epoch is obtained programmatically reducing the need for any data entry. Please see the improved script here: Mnemonic Unregister Script

In the coming mobile wallet update, it will be possible to enter a seed phrase directly into the wallet to derive an account. The suggested workflow will therefore be as follows:

  1. Use a BIP39 generator to produce a fresh seed phrase (24 words ideally). Write this down and store it securely.
  2. Enter the seed phrase into the mobile wallet to derive the account.
  3. Send your validator owner badge to this new account in the mobile wallet along with 10XRD to cover fees.
  4. Use the script babylon_mnemonic_to_keys.py from the Radstakes GitHub to extract the private key bytes.
  5. Copy the mnemonic_unregister.py script and enter the private key bytes where specified, along with your validator address where specified.
  6. Install the Radix Engine Toolkit along with any dependencies as instructed in the GitHub Readme.
  7. Run the script using python3 mnemonic_unregister.py

If you’re ever caught unaware and find yourself without your phone or browser, you can unregister by running this script, and therefore only need access to a terminal!

As usual, any questions - please let me know.