Witness Chain
  • Introduction to Witness Chain
  • Infinity Watch
    • Proof of Location (Mainnet)
      • Introduction
      • Process flow
      • Architecture
      • Run a watchtower!
        • For Partner node runners
          • Running on Akash Cloud
          • Running on SuperNoderz
        • EigenLayer operators
          • Running a PoL Watchtower
          • Witness Chain AVS opt-in guide
        • At-home watchtowers
        • For DePIN/Validator Node provider
      • Demos
      • PoL Research
    • APIs
      • Campaign APIs
        • Key Terminologies
        • Authentication
        • Create Campaign
        • Edit campaign
        • Get Photo feed from campaign
        • Get Campaigns
      • Challenge APIs
        • Overview
        • Getting Started
  • Resources
    • Blogs
      • How Proof of Location Works
      • Redefining Geolocation Compliance: Witness Chain & Predicate
    • 🗞️Research
    • 🎙️Talks and Podcasts
    • 🤝Community
    • ⚖️Smart Contracts
    • File a bug
  • Archive
    • Introduction
    • Proof of Diligence Watchtower Protocol
      • How it works
      • Diligence Watchtower Roadmap
      • Watchtower Architecture
      • Chains watched
      • Smart Contracts
      • Quick Links
      • FAQs
    • For the node operators
      • Node requirements
      • Watchtower setup
        • [ARCHIVE] Mainnet Setup
          • L2 Archive Node Setup guide
        • Holesky Setup
          • L2 Archive Node Setup guide
        • Migration from archive to full node
      • Monitoring
    • Research
    • Keys Management
    • Proof of Bandwidth
      • Introduction
      • Architecture
      • For the node operators
        • Running a PoB Challenger Client
        • Running a PoB Prover Client
      • Demos
      • Research
    • 🤝Watchtower Protocol (Architecture v1)
      • 🗼How it works
      • 📅Watchtower Roadmap
      • 🏦Watchtower Architecture
      • 🔗Chains supported
Powered by GitBook
On this page
  • Prerequisites
  • Running the Watchtower Client
  • Post-Setup
  1. Infinity Watch
  2. Proof of Location (Mainnet)
  3. Run a watchtower!

At-home watchtowers

Steps to run a Witness Chain watchtower client to validate location claims

PreviousWitness Chain AVS opt-in guideNextFor DePIN/Validator Node provider

Last updated 2 months ago

The PoL Watchtower Client Node participates in the Proof-of-Location (PoL) protocol by verifying location claims made by network nodes.

Watchtower nodes can run on community members' laptops, desktops, or cloud instances. Nodes are selected to participate in PoL watchtowers via a probabilistic algorithm.

Prerequisites

  • Docker: Version 23.0.0 or higher ().

  • Instance: Minimum t2.micro equivalent (1 vCPU, 1GB RAM, 5GB disk). Recommended: 2 cores, 4GB RAM, 10GB disk.

  • ECDSA KeyPair ( This demonstrates how you can use MetaMask to export one ). This will be used for registration & signing purposes.

  • Ports to Open (for public IP only)

    • Incoming (TCP & UDP): 11112, 22223, 33334-33336, 44445-44447, 55556

    • Outgoing: Allow all.

Witness Chain Explorer:

Our chain is gasless, so you do NOT have to fund watchtower account with tokens.

Running the Watchtower Client

1. Installing and registering the Watchtower Key

Download and install the witness CLI:

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

After the installation is completed, verify the cli is installed correctly and upto date ( WitnessChain version v0.0.12)

witness-cli --version

Then proceed to register your watchtower 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 --mainnet --watchtower-private-key <your-watchtower-private-key-without-0x-prefix>

Why should I register?

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

2. Configuring watchtower.env File

  • Create a watchtower.env configuration file with the following example entries.

  • If you are running this at home and DON'T have a public IP, you need to change the following entries only in the watchtower.env file

    • latitude, longitude, country, region, city, privateKey, walletPublicKey

latitude=37.0151
longitude=-79.0392
radius=1000
privateKey=<your_private_key>
walletPublicKey=<your_public_key>
saveResultsInDatabase=false
submitResultsToContract=false
rpcUrl=https://rpc.witnesschain.com

Latitude and Longitude are optional. If not provided, they will be automatically determined based on the approximate location of the IP address. However it's recommended to be set for better accuracy.

3. Running the Watchtower Client

Start the challenger client:

docker run -d \
  --network=host \
  --name pol-watchtower \
  --env-file ./watchtower.env \
  witnesschain/infinity-watch:1.0.2

Verify the client is running:

docker ps

If you see an error about "registration required on DCL contract," make sure to complete the watchtower key registration.

Post-Setup

Check logs using:

docker logs -f pol-watchtower

Once the client is ready, you're part of Witness Chain's Watchtower family!

Troubleshooting

FAQs

What do the parameters in watchtower.env mean ?

 
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=1000 // Optional. Accuracy in meters


privateKey= //  PoL signing key (Watchtower Key)
walletPublicKey= //  Ethereum Wallet addresses where your contributions go (Operator Key)

saveResultsInDatabase=true // Saves the login, session, and challenge related data in a .sqlite file within the container
rpcUrl=https://rpc.witnesschain.com // Witness chain's Layer 2 Chain which holds the proofs of location

What do the parameters in the docker run mean?

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'.
  • --env-file ./watchtower.env
    The container's environment is set using the attributes specified in 'watchtower.env' file
  • witnesschain/infinity-watch:1.0.2: The name of the Docker image to run.

You can get detailed explanation about these parameters

The days might be rainy or snowy, but we've got umbrellas and sweaters!. For support, join our or reach out on Telegram.

Install Docker
video
https://explorer.witnesschain.com
Discord
here