-
Notifications
You must be signed in to change notification settings - Fork 147
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
added tutorial for multikey #918
Draft
katunopolis
wants to merge
6
commits into
development
Choose a base branch
from
development-branch-multikey-docs
base: development
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.
Draft
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
97e6b13
added tutorial for multikey
katunopolis d2d33c3
removed # comments in a few sections
katunopolis 49887a2
corected some mistakes
katunopolis 73ad3c7
added bash view
katunopolis 9f04fcd
ubuntu user
katunopolis 5ba30bd
resolved comments from Iulian
katunopolis 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 |
---|---|---|
|
@@ -315,12 +315,6 @@ The BLS keys' identities, on the other hand will have the following names & iden | |
|
||
### Migration guide from single-key operation to multikey | ||
|
||
:::warning | ||
This guide can lead to potential node jailing if done incorrectly. Make sure that you understand completely all the steps involved. | ||
|
||
We strongly suggest to practice this process first on the public testnet. You should gather invaluable experience and know how. | ||
::: | ||
|
||
Whenever deciding to switch from single-key operation to multikey, the following steps on how to execute this process can be considered: | ||
1. Create your `allValidatorsKeys.pem` by manually (or through a text tool) concatenate all your `validatorKey.pem` files; | ||
2. Start a multikey group, **configure it as a backup group**, provide the `allValidatorsKeys.pem` file to all the nodes forming the group; | ||
|
@@ -332,6 +326,12 @@ Whenever deciding to switch from single-key operation to multikey, the following | |
|
||
Make sure that all operations from step 6 are made as quickly as possible. In case this step takes a long time, the backup multikey group should take over. | ||
|
||
:::warning | ||
This guide can lead to potential node jailing if done incorrectly. Make sure that you understand completely all the steps involved. | ||
|
||
We strongly suggest to practice this process first on the public testnet. You should gather invaluable experience and know how. | ||
::: | ||
|
||
:::caution | ||
Always attempt this process while closely monitor your nodes. If done correctly, your nodes might experience a brief rating drop (until the backup group takes over - if necessary) | ||
::: | ||
|
@@ -340,22 +340,21 @@ Always attempt this process while closely monitor your nodes. If done correctly, | |
|
||
**1. Login as root & update/upgrade the machine** | ||
katunopolis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
bash | ||
```bash | ||
apt-get update | ||
apt-get upgrade | ||
apt autoremove | ||
``` | ||
|
||
**2. Add and configure the ubuntu user** | ||
**2. Add and configure the `ubuntu` user** | ||
|
||
``` | ||
```bash | ||
adduser ubuntu | ||
``` | ||
|
||
Set a long password | ||
|
||
``` | ||
```bash | ||
usermod -aG sudo ubuntu | ||
echo 'StrictHostKeyChecking=no' >> /etc/ssh/ssh_config | ||
visudo | ||
|
@@ -369,7 +368,7 @@ ubuntu ALL=(ALL) NOPASSWD:ALL | |
|
||
Save & exit | ||
|
||
``` | ||
```bash | ||
sudo su ubuntu | ||
sudo visudo -f /etc/sudoers.d/myOverrides | ||
``` | ||
|
@@ -384,42 +383,42 @@ Save & exit | |
|
||
**3. Configure ssh service:** | ||
|
||
``` | ||
```bash | ||
cd | ||
mkdir .ssh && chmod 700 .ssh && cd .ssh/ | ||
nano authorized_keys | ||
``` | ||
|
||
Paste your pubkey & save & exit | ||
The pubkey can be obtained by typing `cat ~/.ssh/id_rsa.pub` (or the name of your key) | ||
Paste your pubkey, save & exit | ||
The pubkey can be obtained by typing `cat ~/.ssh/id_rsa.pub` (or the name of your key) on the machine that will be used to connect to this host | ||
|
||
``` | ||
```bash | ||
chmod 600 authorized_keys | ||
``` | ||
|
||
ssh config | ||
|
||
``` | ||
```bash | ||
sudo nano /etc/ssh/sshd_config | ||
``` | ||
|
||
Uncomment & change this line to match your desired port: | ||
Uncomment and change this line to match your desired port: | ||
|
||
``` | ||
Port <any port value > 1024> # example: 7728 | ||
``` | ||
|
||
Set the following fields to their respective values: | ||
Uncomment and set the following fields to their respective values: | ||
|
||
``` | ||
# PermitRootLogin -> no | ||
# PubkeyAuthentication -> yes | ||
# PasswordAuthentication -> no | ||
PermitRootLogin -> no | ||
PubkeyAuthentication -> yes | ||
PasswordAuthentication -> no | ||
``` | ||
|
||
Save & exit | ||
|
||
``` | ||
```bash | ||
sudo systemctl restart sshd | ||
``` | ||
|
||
|
@@ -428,7 +427,7 @@ At this time a snapshot/image of the host could be generated using the provider | |
|
||
**4. Configure your local ssh config file** | ||
|
||
``` | ||
```bash | ||
nano ~/.ssh/config | ||
``` | ||
|
||
|
@@ -447,14 +446,14 @@ Save & exit | |
|
||
**5. Keys Setup** | ||
|
||
``` | ||
```bash | ||
cd ~ | ||
mkdir VALIDATOR_KEYS | ||
``` | ||
|
||
Copy your validator(s) .pem file either by using scp: | ||
|
||
``` | ||
```bash | ||
scp allValidatorsKeys.pem [email protected]:/home/ubuntu/VALIDATOR_KEYS | ||
``` | ||
|
||
|
@@ -467,7 +466,7 @@ sftp://host-0 | |
|
||
**6. Node Setup** | ||
|
||
``` | ||
```bash | ||
git clone https://github.com/multiversx/mx-chain-scripts | ||
cd mx-chain-scripts/config/ | ||
nano variables.cfg | ||
|
@@ -476,49 +475,49 @@ nano variables.cfg | |
Set the following: | ||
|
||
``` | ||
# ENVIRONMENT="mainnet" | ||
# GITHUBTOKEN="<your github token>" | ||
# NODE_EXTRA_FLAGS="" # optional for extra flags (example: `-log-save -profile-mode`) | ||
# OVERRIDE_CONFIGVER="" # optional for a particulare release (example: `rc-v1.6.0`) | ||
ENVIRONMENT="mainnet" | ||
GITHUBTOKEN="<your github token>" | ||
NODE_EXTRA_FLAGS="" # optional for extra flags (example: `-log-save -profile-mode`) | ||
OVERRIDE_CONFIGVER="" # optional for a particulare release (example: `rc-v1.6.0`) | ||
``` | ||
|
||
Save & exit | ||
|
||
``` | ||
```bash | ||
cd .. | ||
./script.sh install | ||
``` | ||
|
||
Install your node(s) | ||
You can tweak several binary flags settings by typing | ||
|
||
``` | ||
```bash | ||
sudo nano /etc/systemd/system/elrond-node-0.service | ||
``` | ||
|
||
Save & exit | ||
Reload the service file: | ||
|
||
``` | ||
```bash | ||
sudo systemctl daemon-reload | ||
``` | ||
|
||
For additional `prefs.toml` file settings adjustments, can use this: | ||
|
||
``` | ||
```bash | ||
nano ~/elrond-nodes/node-0/config/prefs.toml | ||
``` | ||
|
||
Set the following: | ||
|
||
``` | ||
# DestinationShardAsObserver = "<shard ID>" | ||
# NodeDisplayName = "node" | ||
# Identity = "identity" | ||
# RedundancyLevel = <redundancy level: 0 for main, 1 for first backup...> | ||
```toml | ||
DestinationShardAsObserver = "<shard ID>" | ||
NodeDisplayName = "node" | ||
Identity = "identity" | ||
RedundancyLevel = <redundancy level: 0 for main, 1 for first backup...> | ||
``` | ||
|
||
``` | ||
```bash | ||
cp ~/VALIDATOR_KEYS/allValidatorsKeys.pem ~/elrond-nodes/node-0/config/ | ||
cd ~/mx-chain-scripts | ||
./script.sh start | ||
|
@@ -529,12 +528,12 @@ cd ~/mx-chain-scripts | |
|
||
The running node can be monitored using the termui console | ||
|
||
``` | ||
```bash | ||
~/elrond-utils/termui -address 127.0.0.1:8080 | ||
``` | ||
|
||
If the node does not start in a reasonable time frame (5 minutes), we can check the log output by using this command: | ||
|
||
``` | ||
```bash | ||
sudo journalctl -f -u elrond-node-0.service | ||
``` |
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.
why this change? I think the warning should be put before the script