Running a node
The Hyperbridge node can be obtained through a variety of ways. For now, only release artifacts for x86 linux environments are officially distributed. You can also build the node from source if you prefer.
System Requirements
Since Hyperbridge is a parachain which internally runs a Polkadot node, it also has the same hardware requirements as the Polkadot validator node.
Docker
Hyperbridge is available at the official docker repository polytopelabs/hyperbridge
docker pull polytopelabs/hyperbridge:latest
Prebuilt Binaries
You can install a prebuilt binary for the hyperbridge node with the following bash script
LATEST_TAG=$(curl -s https://hub.docker.com/v2/repositories/polytopelabs/hyperbridge/tags\?page_size\=1\&page\=2 | jq -r '.results[0].name')
wget -q --show-progress https://github.com/polytope-labs/hyperbridge/releases/download/hyperbridge-$LATEST_TAG/hyperbridge-x86_64-unknown-linux-gnu.tar.gz
tar -xvzf hyperbridge-x86_64-unknown-linux-gnu.tar.gz
# copy to $PATH
cp hyperbridge-x86_64-unknown-linux-gnu/hyperbridge $HOME/.local/bin/
or a 1-liner shell script
LATEST_TAG=$(curl -s https://hub.docker.com/v2/repositories/polytopelabs/hyperbridge/tags\?page_size\=1\&page\=2 | jq -r '.results[0].name')
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/polytope-labs/hyperbridge/releases/download/hyperbridge-$LATEST_TAG/hyperbridge-installer.sh | sh
Building from source
You can follow the steps below if you'd prefer to build the hyperbridge node from source:
Install dependencies
Building the hyperbridge node requires some dependencies
- git
- clang
- curl
- make
- build-essential
- libssl-dev
- llvm
- libudev-dev
- protobuf-compiler
sudo apt update
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
Install rust compiler
If you don't have an already existing rust installation, you can install it using the one-liner below. Follow the prompts displayed to proceed with a default installation.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Install webassembly target
Hyperbridge's blockchain runtime compiles to wasm which allows its code to be forklessly upgraded. In order to build hyperbridge we need the wasm toolchain installed.
rustup update nightly
rustup target add wasm32-unknown-unknown
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup component add rust-src
Clone the repo
Download a local copy of the repo and checkout the latest release tag
# fetch the latest tag from docker hub
LATEST_TAG=$(curl -s https://hub.docker.com/v2/repositories/polytopelabs/hyperbridge/tags\?page_size\=1\&page\=2 | jq -r '.results[0].name')
git clone https://github.com/polytope-labs/hyperbridge.git
cd ./hyperbridge
git checkout ${LATEST_TAG}
Build the node
cargo build --release -p hyperbridge
The hyperbridge node will now be available at target/release/hyperbridge
, You can move the binary to your $PATH
so you can run it directly.
Update your path to include ${HOME}/.local/bin
. If you are using Bash, run the following.
Alternatively, replace ${HOME}/.bashrc
with ${HOME}/.zshrc
if using Zsh.
Replace source
with .
if necessary.
export RC_PATH=${HOME}/.bashrc
echo 'export PATH="${HOME}/.local/bin:${PATH}"' >> ${RC_PATH}
source ${RC_PATH}
mkdir -p $HOME/.local/bin/
mv target/release/hyperbridge $HOME/.local/bin/
Running the node
Hyperbridge exists as a parachain on various networks including testnet and mainnet. You can run a node on the following networks:
Paseo
Hyperbridge is available on the Paseo testnet, with a chainId of gargantua
and paraId of 4009
. You can sync the paseo relay chain in a few minutes by appending a relay chain argument --sync=fast-unsafe
. This tells the relay chain node to simply download its blocks and not execute them. It'll also download the full latest state. This is fine because the paseo testnet has no economic value.
export PUBLIC_IP_ADDRESS=<your-node-public-ip-address>
hyperbridge \
--base-path=$HOME/.hyperbridge \
--pruning=archive \
--name="Your node name here" \
--rpc-cors=all \
--rpc-port=9944 \
--unsafe-rpc-external \
--rpc-methods=unsafe \
--chain=gargantua \
--no-mdns \
--listen-addr=/ip4/0.0.0.0/tcp/30333 \
--listen-addr=/ip6/::/tcp/30333 \
--public-addr=/ip4/$PUBLIC_IP_ADDRESS/tcp/30333 \
--out-peers=32 \
-- \
--sync=fast-unsafe
Polkadot
Hyperbridge is also live on Polkadot with a chainId of nexus
and ParaId of 3367
.
export PUBLIC_IP_ADDRESS=<your-node-public-ip-address>
hyperbridge \
--base-path=$HOME/.hyperbridge \
--pruning=archive \
--name="Your node name here" \
--rpc-cors=all \
--rpc-port=9944 \
--unsafe-rpc-external \
--rpc-methods=unsafe \
--chain=nexus \
--no-mdns \
--listen-addr=/ip4/0.0.0.0/tcp/30333 \
--listen-addr=/ip6/::/tcp/30333 \
--public-addr=/ip4/$PUBLIC_IP_ADDRESS/tcp/30333 \
--out-peers=32
Ansible Playbooks
A community member has graciously provided their ansible playbook for running the hyperbridge node. You can find it here:
Miscellaneous
Ensure that your firewall and NAT configuration allow incoming connections on port 30333
for optimal peering with other nodes on the network.
sudo ufw allow 30333