-
Notifications
You must be signed in to change notification settings - Fork 386
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
docs: add validator migration guide and networks list table #1854
Open
redwest88
wants to merge
2
commits into
celestiaorg:main
Choose a base branch
from
redwest88:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,6 +181,12 @@ Now, connect to the network of your choice. | |
|
||
You have the following option of connecting to list of networks shown below: | ||
|
||
| Name | Type | Chain ID | CLI Usage | | ||
|--------------------------------|---------------|--------------------------------|--------------------------------------------| | ||
| [Celestia](./mainnet.md) | Mainnet Beta | {{ constants.mainnetChainId }} | `--chain-id {{ constants.mainnetChainId }}`| | ||
| [Mocha](./mocha-testnet.md) | Testnet | {{ constants.mochaChainId }} | `--chain-id {{ constants.mochaChainId }}` | | ||
| [Arabica](./arabica-devnet.md) | Devnet | {{ constants.arabicaChainId }} | `--chain-id {{ constants.arabicaChainId }}`| | ||
|
||
Continuing the validator tutorial, here are the steps to connect your | ||
validator to Mocha: | ||
|
||
|
@@ -240,6 +246,72 @@ Follow the instructions under | |
[transaction indexer configuration options](/how-to-guides/consensus-node#optional-transaction-indexer-configuration-options) | ||
to configure your `config.toml` file to select which transactions to index. | ||
|
||
## Migrating a validator to another machine | ||
|
||
:::tip NOTE | ||
Moving a validator to a new machine is a sensitive process that needs to be done carefully. If the transfer isn’t handled properly, it could result in double signing, which will permanently slash your validator, wipe out delegated tokens, and remove you from the active validator set. To avoid this, make sure to follow the steps closely and stop the old node completely before starting the migration. | ||
::: | ||
|
||
### Step 1: Set up a new full consensus node | ||
|
||
First, set up a new [full consensus node](./consensus-node.md) on the new server and make sure the node is fully synced with the chain. To check whether your node is synced, you can check the `catching_up` status using: | ||
|
||
```bash | ||
celestia-appd status | jq '{ "catching_up": .SyncInfo.catching_up }' | ||
``` | ||
|
||
If the node is synced, the output will look like this: | ||
|
||
```json | ||
{ | ||
"catching_up": false | ||
} | ||
``` | ||
|
||
### Step 2: Stop the old validator | ||
|
||
After your new full consensus node is synced, proceed to stop the current validator on the old machine. If you’re running it with [SystemD](./systemd.md), use the following command: | ||
|
||
```bash | ||
sudo systemctl stop <SERVICE_NAME> | ||
``` | ||
|
||
Additionally, it’s recommended to disable the service to prevent it from restarting automatically after a system reboot. You can do this with: | ||
|
||
```bash | ||
sudo systemctl disable <SERVICE_NAME> | ||
``` | ||
|
||
For extra safety, you may also delete the service file from the server: | ||
|
||
```bash | ||
sudo rm -rf /etc/systemd/system/<SERVICE_NAME>.service | ||
``` | ||
|
||
### Step 3: Backup and transfer `priv_validator_key.json` | ||
|
||
Once the old validator is stopped and the new node is synced, you’ll need to back up the `priv_validator_key.json` file from the old server (if it has not been backed up earlier). This file is located at: | ||
|
||
```plaintext | ||
~/.celestia-app/config/priv_validator_key.json | ||
``` | ||
|
||
Copy this file to the same location on the new server. To verify that the file has been transferred correctly, compare its contents on both servers using: | ||
|
||
```bash | ||
cat ~/.celestia-app/config/priv_validator_key.json | ||
``` | ||
|
||
### Step 4: Start the new validator | ||
|
||
If everything checks out, you can now restart the new node with the updated validator key: | ||
|
||
```bash | ||
sudo systemctl restart <SERVICE_NAME> | ||
``` | ||
Comment on lines
+307
to
+311
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add verification steps after migration Consider adding commands to verify the validator is operating correctly after migration:
Example verification commands to add: +# Check validator status
+celestia-appd query staking validator $(celestia-appd keys show $VALIDATOR_WALLET --bech val -a)
+
+# Monitor block signing
+celestia-appd query slashing signing-info $(celestia-appd tendermint show-validator)
|
||
|
||
After this, your validator will resume signing blocks on the new server, and the migration is complete. Validators operate within a 10,000 signed block window, and missing more than 2,500 blocks in this window will result in downtime jail. The faster you complete the transfer, the fewer blocks your validator will miss. | ||
|
||
## Additional resources | ||
|
||
For additional resources, refer to | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add explanation for the SERVICE_NAME placeholder
The
<SERVICE_NAME>
placeholder needs clarification for users:📝 Committable suggestion