Relay Executives: Keystore Migration
This guide outlines the steps to migrate your local keystore to the new encryption and decryption mechanism.
🔹 If you do not have a keystore configured, you can skip this section.
Due to differences between relayer client versions, the migration steps may vary depending on your current version. To check your client version, run the following command:
Example Output:
1. For Relayer Client versions below v2.1.1
1.1. Binary Update
To migrate your keystore, follow the steps below to update your relayer client to the latest version:
Step 1.
Remove or create a backup of the previous bifrost-relayer
binary file before proceeding.
Step 2.
Install the latest version of bifrost-relayer
in the same directory and update the necessary permissions. (Note: If the directory has changed, be sure to update the Systemd configuration file accordingly)
1.2. Configuration Update
1.2.1. Signer Configurations
The method for specifying and configuring the signer has changed. Previously, it was configured as follows:
However, the configuration has now changed. The private key from the system section has been removed. Instead, you must explicitly specify a signer_config
, which can contain either:
A plaintext private key
An AWS KMS key
Below is the updated configuration format:
1.2.2. Keystore Configurations
The method for specifying and configuring the keystore has changed. Previously, it was configured as follows:
However, the configuration has now changed. The path and password from the system section have been removed. Instead, you must explicitly specify a keystore_config
, which includes:
The keystore path
Either a plaintext password or an AWS KMS key
⚠️ Important: At this step, you must enter your previously used password to proceed with the migration.
Below is the updated configuration format:
1.3. Run the Migration CLI Command: migrate-keystore
migrate-keystore
Before proceeding with the migration, you have to first stop the running relayer. To do so, run the following command:
1.3.1. Fetch the latest BRP Round
And then, you need to fetch the latest BRP (Bitcoin Relay Protocol) round. To do so, run the following command:
Mainnet
Example Output:
Testnet
Example Output:
Now you have two options for migrating your keystore encryption:
Keystore encrypted by a plaintext password
Keystore encrypted by AWS KMS
Choose the option that best fits your security requirements and follow the corresponding steps.
1.3.2. Option 1: Password Encrypted Keystore
To migrate your keystore, run the following command with the necessary options:
chain: Specify the path to your config.yaml file.
round: Enter the round index you fetched in the previous step.
new-password: Set a new plaintext password for encrypting and decrypting keystore keys.
🚨 We highly recommend using a new password for better security.
version: This option must be set to 1 at this step.
⚠️ Important: Before running the command, your previously used password must be specified in the config.yaml file for the migration to succeed.
If the command successfully worked, replace keystore_config.password
with your newly set password in the config.yaml file.
Now it’s fully set to go. You can now restart your relayer.
1.3.3. Option 2: AWS KMS Encrypted Keystore
To migrate your keystore, run the following command with the necessary options:
chain
: Specify the path to your config.yaml file.round
: Enter the round index you fetched in the previous step.new-kms-key-id
: Set a new AWS KMS key ID for encrypting and decrypting keystore keys.version
: This option must be set to 1 at this step.
⚠️ Important: Before running the command, your previously used password must be specified in the config.yaml file for the migration to succeed.
If the command successfully worked, remove keystore_config.password
and add keystore_config.kms_key_id
, then set it to your new AWS KMS key ID in the config.yaml file.
Now it’s fully set to go. You can now restart your relayer.
2. For Relayer Client versions higher than or equal to v2.1.1
2.1. Binary Update
To migrate your keystore, follow the steps below to update your relayer client to the latest version:
Step 1.
Remove or create a backup of the previous bifrost-relayer
binary file before proceeding.
Step 2.
Install the latest version of bifrost-relayer
in the same directory and update the necessary permissions. (Note: If the directory has changed, be sure to update the Systemd configuration file accordingly)
2.2. Run the Migration CLI Command: migrate-keystore
migrate-keystore
Before proceeding with the migration, you have to first stop the running relayer. To do so, run the following command:
2.2.1. Fetch the latest BRP Round
And then, you need to fetch the latest BRP (Bitcoin Relay Protocol) round. To do so, run the following command:
Mainnet
Example Output:
Testnet
Example Output:
Now you have two options for migrating your keystore encryption:
Keystore encrypted by a plaintext password
Keystore encrypted by AWS KMS
Choose the option that best fits your security requirements and follow the corresponding steps.
2.2.2. Option 1: Password Encrypted Keystore
To migrate your keystore, run the following command with the necessary options:
chain
: Specify the path to your config.yaml file.round
: Enter the round index you fetched in the previous step.new-password
: Set a new plaintext password for encrypting and decrypting keystore keys.🚨 We highly recommend using a new password for better security.
⚠️ Important: Before running the command, your previously used password or AWS-KMS key ID must be specified in the config.yaml file for the migration to succeed.
If the command successfully worked, update your config.yaml file as follows:
If you previously had
keystore_config.password
, replace it with your newly set password.If you previously had
keystore_config.kms_key_id
, remove it and addkeystore_config.password
, then set it to your new password.
Now it’s fully set to go. You can now restart your relayer.
2.2.3. Option 2: AWS KMS Encrypted Keystore
To migrate your keystore, run the following command with the necessary options:
chain
: Specify the path to your config.yaml file.round
: Enter the round index you fetched in the previous step.new-kms-key-id
: Set a new AWS KMS key ID for encrypting and decrypting keystore keys.
⚠️ Important: Before running the command, your previously used password or AWS-KMS key ID must be specified in the config.yaml file for the migration to succeed.
If the command successfully worked, update your config.yaml file as follows:
If you previously had
keystore_config.kms_key_id
, replace it with your newly set key ID.If you previously had
keystore_config.password
, remove it and addkeystore_config.kms_key_id
, then set it to your new key ID.
Now it’s fully set to go. You can now restart your relayer.
Last updated