Skip to main content

Migrate from another setup

If you already have a setup running and want to migrate it to a new server, change the client you are using, or upgrade your node, you are in the right place.

tip

We recommend you to investigate and know which clients you are going to use before migrating your setup. This will help you to avoid some issues that may arise during the migration process.

Migrating from a not Sedge setup

If you are migrating from a setup that is not Sedge, you will need to do the following:

  1. Generate a new setup using Sedge, you can choose between the interactive or the non-interactive setup. In this case we will use the non-interactive setup.
sedge generate full-node
  1. Generate the keys, if you don't have ones already.
sedge keys

If you already have keys, you can copy them to the new setup. The keys are usually located in the ./sedge-data/keystore folder. It might require that the keys are in the expected format.

Otherwise, you can use your mnemonic to generate the keys, using the same sedge keys command.

  1. Import keys, either by copying them to the new setup or using the one generated in the previous step. The format of the keys should follow the EIP-2335 standard.
sedge import-key
  1. If you are using any politics for slashing protection on your node, you can export that info following the slashing export instructions of the node you are using. It will need to follow the EIP-3076 format.

Once you have the JSON file, you can import it to the new setup.

sedge slashing-import --from slashing-data.json [validator]

You will need to provide the validator client you are going to use in your setup, in order to import the slashing data.

  1. If you follow the previous steps, you should have a new setup with the same keys and slashing protection data.

You are ready to run it:

sedge run

Migrating from a Sedge setup to another Sedge setup

If you are migrating the setup from a previously generated Sedge setup, it will be easier.

You will be able to directly export the keys and slashing protection data, and import them to the new setup, using sedge without the need to follow any other step.

You can follow the next steps to make the migration:

  1. Generate the new setup, you can choose between the interactive or the non-interactive setup.
sedge generate full-node --path new-path
  1. You can either import the keystore folder from your previous setup, or generate the keys again using the mnemonic. In this case we will use the sedge import-key command.
sedge import-key --from [old-keystore-dir]
  1. Export the slashing protection data from the previous setup.
sedge slashing-export --out slashing-data.json [validator]

You will need to provide the validator client you are using in your previous setup, in order to export the slashing data.

  1. Import the slashing protection data to the new setup.
sedge slashing-import --from slashing-data.json [validator]

You will need to provide the validator client you are going to use in your setup, in order to import the slashing data.

  1. If you follow the previous steps, you should have a new setup with the same keys and slashing protection data.

You are ready to run it:

sedge run