Running a Node in the Witnet Testnet¶
The Witnet Testnet is open for anyone to join and test it by running their own full node. Running a node on the Witnet Mainnet is not possible before Mainnet is launched.
You do not need to run a Witnet node to use Witnet from your Ethereum smart contracts. If you are a smart contracts developer, what you probably want is to connect your Ethereum contracts to external APIs using Witnet.
Hardware requirements are listed in the node operators docs.
Up and running in 1 minute, using Docker¶
The most convenient method for running a Witnet node is through the
witnet/witnet-rust Docker image. For alternate installation methods or
more complex setups, take a look at the docker-compose and systemd integrations.
The Witnet docker image downloads and runs a Witnet node in the latest Testnet in just a matter on seconds. To start a node, use:
docker run -d \ --name witnet_node \ --volume ~/.witnet:/.witnet \ --publish 21337:21337 \ --restart always \ witnet/witnet-rust
docker run -d --name witnet_node --volume ~/.witnet:/.witnet --publish 21337:21337 --restart always witnet/witnet-rust
Raspberry Pi users
For some reason, Raspbian on Raspberry Pi (all versions) requires your containers to operate
in privileged mode. When running the command above, simply add the
docker run -d --privileged --name witnet_node --volume ~/.witnet:/.witnet --publish 21337:21337 --restart always witnet/witnet-rust
There are two important things you should do now to make the most of your Witnet node:
- Open ports as explained below.
- Follow the Next Steps guide to learn how to check the node status, progress and statistics.
Open your ports!¶
The best way to contribute to the growth and sustainability of the Witnet network is by opening up the listening port of your node, so that other nodes in the network can download block chain data from you and your transactions can be broadcasted more quickly.
For this feature to be effective, you will also need your IP address to be public (and ideally, static). If you are operating a node in your home network, you can request your ISP to assign you a static IP address or at least disable CGN on it.
Depending on your setup, this will normally imply changing the settings
on your router or firewall so as to forward all incoming connections
21337 from your external IP into the IP of the device or
interface where the node is running.
You can find out how to verify that your ports are open in the Next Steps guide.
What about Witnet data requests?¶
As soon as your node is synced, it will be able to start resolving data requests from others. You can learn how to produce Witnet requests by following the tutorial on how to create a Bitcoin price feed using Ethereum and Witnet. In addition, we will be soon releasing a user-friendly editor in the Sheikah desktop app that will enable to compose data requests and RADON scripts visually. In the meantime, you can play around with this community-built request editor.