Upgrade a collator node

Instructions on how to upgrade your node version

Please join the OAK Discord server to be notified of new node versions. This will be announced in technical updates channels. If are not diligent about upgrading to the lastest node version, your node may stop producing blocks and you will likely get less rewards (if you are part of the candidate pool).

The steps below should only cause 3-5 minutes of downtime for your node, if done properly.

How to upgrade your node

Step 1: Get to your node

SSH to your target node, and make sure it’s functioning properly by vetting Polkadot Telemetry, and your monitoring/dashboards.

Step 2: Get the new binary ready

Option 1: Download a compiled binary from OAK’s Github

If you are using Ubuntu (20.04+ LTS x64), you can run the binary compiled by OAK that can be found here. Below commands will help you download the binary via command line.

First, get the latest version number and store it in $version variable.

latest_url=$(curl -Lsf -w %{url_effective} https://github.com/OAK-Foundation/OAK-blockchain/releases/latest/download/)
version=${latest_url##*/}
echo $version

Then, compose the binary’s URL and download it a local ./tmp folder. In addition, run chmod 700 command to make sure the downloaded file is executable by the current linux user.

mkdir tmp
curl -L https://github.com/OAK-Foundation/OAK-blockchain/releases/download/$version/oak-collator -o ./tmp/oak-collator

chmod 700 ./tmp/oak-collator

Option 2: Compile the binary

If you are using another machine, or are struggling with errors from the above, you may need to compile the binary within your node. If you’re running a different OS, please compile the binary first and follow the instructions in the OAK-blockchain README. For example, for the v1.8.0 binary, you can run the following command on your node.

git clone git@github.com:OAK-Foundation/OAK-blockchain.git
git fetch --all --tags
git checkout tags/v1.8.0 -b branch-1.8.0

Switched to a new branch 'branch-1.8.0'

Then build your executable for Turing Network.

cargo build --release --features turing-node

Option 3: Grab the latest image from Docker

Note regarding Docker: while we do support Docker images, we generally do not recommend this option unless you’re testing. Docker builds are less performant when running nodes than using the binary paths above.

If you choose to run the collator via Docker, you can find the Docker repository linked in the helpful resources above. You can grab the latest image (tagged latest), or the specific version. Create a volume for your data and check that the volume exists by inspecting. The following commands help you to do so.

docker pull oaknetwork/turing:latest
docker volume create turing-data
docker volume inspect turing-data

Step 3: Replace your old binary

Options 1 & 2

Linux binaries can be safely replaced while running if you perform an unlink() before placing the new file:

  1. Navigate to the root of the project, or parent of the oak-collator folder.
  2. Remove the existing binary with rm oak-collator
  3. Move the new binary into position (ie. mv ./tmp/oak-collator oak-collator)

If you are not comfortable replacing the running binary, you can stop the service (ie. systemctl stop oak-collator) and follow the same steps.

Option 3

docker pull oaknetwork/turing:latest

Step 4: Restart your service

Options 1 & 2

Restart the oak-collator service

sudo systemctl restart oak-collator

Option 3

docker stop EXISTING_CONTAINER_ID
docker run -d -p 30333:30333 -p 9944:9944 -p 9933:9933  -v turing-data:/data
oaknetwork/turing:latest \
  --name=YOUR_COLLATOR_NAME \
  --base-path=/data \
  --chain=turing \
  --node-key=NODE_KEY \
  --collator \
  --force-authoring \
  --execution=wasm \
  -- \
  --execution=wasm \
  --no-telemetry

Step 5: Monitor your node

Please make sure to monitor your node for a few minutes to ensure that it continues to produce blocks.


Run a node using a service
Proxy collating permissions