Running a PoL Watchtower

Steps to run a PoL Watchtower multi-client

The PoL Watchtower multi-client node is a DePIN watchtower node that participates in the PoL (Proof-of-Location) protocol and measures the location claims made by a DePIN Prover. It can also act as a Prover to prove it's own location claim when challenged.

Prerequisites

Before you begin, ensure you have the following

Running your Watchtower client

Key Points to consider before proceeding...

  1. We have 2 sets of keys - Operator Key and Watchtower Key.

    1. Operator Key is your EigenLayer Operator Key that you have been using with various AVSes including our Witness Chain AVS. Continue to use that here too. This key is used for registering the Watchtower Key(s).

    2. Watchtower Key - This is the signing key for the PoL Watchtower Client. Create a new Key for the same. Don't reuse the Operator Key for the Watchtower Key. It has to be a ECDSA Key.

  2. 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

0. Creating the Watchtower Key

Use ECDSA Keypairs

  1. Create a ECDSA private key using Metamask or other utilities that will be used as Watchtower Key.

  2. Store the watchtower's private key in the file (Make sure you keep track of the file name and its location, as it would be refered later)

echo "YOUR_WATCHTOWER_PRIVATE_KEY" > my_watchtower_private.key

1. Registering the Watchtower Key

You can register the watchtower key easily with the help of our registration cli, to do so

  1. Download our witness-cli

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

    After the installation is completed, register your watchtower key on WitnessChain's Layer 2 Chain: Use the KeyPair that you would have exported or created (watchtower key).

  2. Prepare the config (challenger registration config),

    1. The above command also downloads a template which you can refer to.

    2. Make sure you set the challenger_private_keys attribute in the json file with the key, that you provided in my_watchtower_private.key (watchtower private key)

  3. Run the following command for challenger registration of watchtower

    witness-cli registerChallenger --config-file <path-to-challenger-registration-config.json>
  4. Prepare the config (prover registration config),

    1. The above command also downloads a template which you can refer to

    2. make sure you set the prover_private_keys to the one you provided to the client in my_watchtower_private.key (watchtower private key)

  5. Run the following command for prover registration of watchtower

    witness-cli registerProver --config-file <path-to-prover-registration-config.json>

2. Setting up the watchtower

  1. Prepare a environment file watchtower.env with the following entries as example shown below:

latitude=37.01511676489697
longitude=-79.0392271449855
country=US
region=Virginia
city=Ashburn
radius=1000
privateKey=<my_super_secret_watchtower_private_key>
walletPublicKey=<my_open_operator_public_address>
keyType=ethereum
saveResultsInDatabase=false
submitResultsToContract=true
rpcUrl=https://blue-orangutan-rpc.eu-north-2.gateway.fm
projectName=eigenlayer-<my_operator_name>

Explanation:

  • 
        "latitude": 37.015, // Latitude of the machine running the challenger client
        "longitude": -79.039, // Longitude of the machine running the challenger client
        
        "country": "US", // Optional. Country in which the machine is located
        "region": "Virginia", // Optional. State/Region in which the machine is located
        "city": "Ashburn", // Optional. City in which the machine is located
        "radius": 1000 // Optional. Accuracy in meters
    
  • privateKey is your PoL signing key (Watchtower Key)

  • walletPublicKey is the wallet addresses where your contributions go (Operator 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

  1. Once you have the config.json ready, the challenger client can be started with

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

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

docker ps 

Explanation:

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

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

Post Setup

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

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