Skip to content

Commit

Permalink
Validator Guide: add instructions for installing multiple binaries
Browse files Browse the repository at this point in the history
After extensive discussion (see
[here](paritytech/polkadot#7147) and
[here](https://forum.polkadot.network/t/ux-of-distributing-multiple-binaries-take-2/2854)),
it's been determined that we will be distributing multiple binaries along with
`polkadot`. I'm updating the Validator Guide to reflect this. To make it easier
for validators, this may be the basis for some script in the future if that is
desired.
  • Loading branch information
mrcnski committed May 31, 2023
1 parent 57e01a8 commit 0f9927b
Showing 1 changed file with 39 additions and 26 deletions.
65 changes: 39 additions & 26 deletions docs/maintain/maintain-guides-how-to-validate-polkadot.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ instead.

## Initial Set-up

:::

### Requirements

The most common way for a beginner to run a validator is on a cloud server running Linux. You may
choose whatever [VPS](#note-about-vps) provider that your prefer. As OS it is best to use a recent
choose whatever [VPS](#note-about-vps) provider that you prefer. As OS it is best to use a recent
Debian Linux. For this guide we will be using **Ubuntu 22.04**, but the instructions should be
similar for other platforms.

Expand Down Expand Up @@ -162,17 +160,19 @@ making it on chain.

:::

### Installing the `polkadot` binary
### Installing the Polkadot binaries

#### Installation from official releases

The official `polkadot` binaries can be downloaded from the
The official binaries can be downloaded from the
[Github Releases](https://github.com/paritytech/polkadot/releases). You should download the latest
available version. You can also download the binary by using the following direct link (replace
available version. You can also download the binaries by using the following direct links (replace
X.Y.Z by the appropriate version):

```sh
https://github.com/paritytech/polkadot/releases/download/vX.Y.Z/polkadot
https://github.com/paritytech/polkadot/releases/download/vX.Y.Z/polkadot-execute-worker
https://github.com/paritytech/polkadot/releases/download/vX.Y.Z/polkadot-prepare-worker
```

#### Optional: Installation with Package Managers
Expand Down Expand Up @@ -213,17 +213,7 @@ dnf config-manager --set-enabled polkadot
dnf install polkadot
```

After installing Polkadot, you can verify the installation by running

```bash
which polkadot
```

It should return

```bash
/usr/bin/polkadot
```
Make sure you verify the installation (see the "Verify the installation" section).

:::note By default, the Polkadot systemd service is disabled

Expand All @@ -233,6 +223,8 @@ To start the service, run:
sudo systemctl start polkadot.service
```

:::

#### Optional: Installation with Ansible

To manage Polkadot installation with Ansible, you can use the **Substrate node role** distributed on
Expand All @@ -248,9 +240,7 @@ Hub (replace X.Y.Z by the appropriate version):
docker.io/parity/polkadot:vX.Y.Z
```

:::

### Building the `polkadot` binary from sources
### Optional: Building the Polkadot binaries from sources

#### Prerequisites: Install Rust and Dependencies

Expand Down Expand Up @@ -302,16 +292,20 @@ Polkadot node software.
sudo apt install make clang pkg-config libssl-dev build-essential
```

Note - if you are using OSX and you have [Homebrew](https://brew.sh) installed, you can issue the
following equivalent command INSTEAD of the previous one:
:::note

If you are using OSX and you have [Homebrew](https://brew.sh) installed, you can issue the following
equivalent command INSTEAD of the previous one:

```sh
brew install cmake pkg-config openssl git llvm
```

### Build the Polkadot Binary from sources
:::

#### Building the binaries

You can build the `polkadot` binary from the
You can build the Polkadot binaries from the
[paritytech/polkadot](https://github.com/paritytech/polkadot) repository on GitHub.

You should generally use the latest **X.Y.Z** tag. You should either review the output from the "git
Expand Down Expand Up @@ -347,10 +341,11 @@ git checkout VERSION
./scripts/init.sh
```

Build native code with the production profile.
Build native code with the production profile. The following will make sure that the binaries are
all in your `$PATH`.

```sh
cargo build --profile production
cargo install --force --path . --profile production
```

**_This step will take a while (generally 10 - 40 minutes, depending on your hardware)._**
Expand Down Expand Up @@ -385,6 +380,24 @@ machine for extra security.
cargo install --force --git https://github.com/paritytech/substrate subkey
```

### Verify the installation

After installing Polkadot, you can verify the installation by running

```bash
which polkadot
which polkadot-execute-worker
which polkadot-prepare-worker
```

It should return:

```bash
/usr/bin/polkadot
/usr/bin/polkadot-execute-worker
/usr/bin/polkadot-prepare-worker
```

### Synchronize Chain Data

You can begin syncing your node by running the following command if you do not want to start in
Expand Down

0 comments on commit 0f9927b

Please sign in to comment.