Running Prover: for DePIN/Validator Node provider

Steps to run a Witness Chain PoL Prover Client

Prerequisites

Before you begin, ensure you have the following

Running your Prover client

There are two aspects in setting up the prover,

  • Registration: so the challengers are aware of it

  • Running: so the challengers can engage with it

Here's how to get the provers successfully running

Key Points to consider before proceeding...

  1. Ports to be opened if using public IP:

Incoming ports to be opened (TCP & UDP ):

11112
22223
33334
33335
33336
44445
44446
44447
55556

Outgoing ports: Allow all

Setting up the Prover

You can provide the private key (for example, generated from Metamask) which will be used by the Witnesschain's PoL Prover client.

Use ECDSA Keypairs

Registering the Prover Key

Download and install the witness CLI:

curl -sSfL https://witnesschain-com.github.io/install-dcl-cli | bash

After the installation is completed, register your prover key on WitnessChain's Layer 2 Chain: Use the KeyPair that you would have exported or created using Metamask or any other wallet.

witness-cli registerWatchtower --testnet --watchtower-private-key <your-prover-private-key-without-0x-prefix>

Why should I register?

Registration helps with identification of your prover inside Witness Chain's watchtower network

Setting up the Prover keys and the config file

  1. You can pass the required configuration to the docker container env via a file or directly with -e flag in the run command (read more). Prepare a configuration file watchtower.env with the following entries as example shown below:

latitude=37.01511676489697
longitude=-79.0392271449855
radius=100
privateKey=<my_super_secret_private_key>
walletPublicKey=<my_open_public_address>
keyType=ethereum
saveResultsInDatabase=false
submitResultsToContract=true
rpcUrl=https://blue-orangutan-rpc.eu-north-2.gateway.fm
projectName=<my_DePIN_project_name/my_validator_network_name>

Explanation:

  •  
        "latitude": 37.015, // Required. Latitude of the machine running the challenger client
        "longitude": -79.039, // Required. Longitude of the machine running the challenger client
        "radius": 100 // Required. Range in KM
        
  • privateKey is your PoL signing key (Prover Key)

  • walletPublicKey is the PoL prover address (eth address)

  • havePublicIPv4Address (and havePublicIPv6Address) set them to true if you have a public IPv4 (or IPv6)

  • havePrivateIPv4Address (and havePrivateIPv6Address) set them to true if you want to force the use of private IP

  • saveResultsInDatabase saves the login, session, and challenge related data in a .sqlite file within the container

  • projectName tags the watchtower with the project - examples include "spheron", "akash", "pingpong", "eigenlayer", etc. This is an optional field

3. Running the watchtower

Once you have the watchtower.env ready, the watchtower client can be started with

docker run -d \
  --network=host \
  --name pol-prover \
  --env-file ./watchtower.env \
  witnesschain/pol-prover:0.4-alpha

you can verify that the challenger is running by looking at the container status

docker ps 

Explanation:

  • docker run -d: Runs the container in detached mode (in the background).

  • --network=host
    Uses the host's network stack.
  • --name pol-prover
    Names the container as 'pol-prover'.
  • witnesschain/pol-prover:0.4-alpha The name of the Docker image to run.

you can verify that the prover is running by looking at the container status

docker ps 

Now the prover is running successfully but not yet registered, you may find the logs stating the same. The prover will function as intended as soon as registration is done.

Post Setup

Once the setting up and registration is successful, you can check the logs from the prover client ready for challenges. (docker logs pol-prover). Congratulations, you are now a part of our DePIN family!

We publish images (x86 & arm64) with the tag latest and by the git tag, the latest will always point to the new and up to date image. In order to pull the latest image, make sure you don't have an older release of latest to avoid using cached images.

You can remove the older images by

docker rmi witnesschain/pol-prover

Troubleshooting

As the only prerequisite is docker, make sure you are running atleast version 23.0.0 or above for the commands mentioned in the doc to work. The days might be rainy or snowy, but we've got umbrellas and sweaters! Join our Discord or Telegram—we're happy to help. :D

Last updated