Skip to content

Hosting a Validator Node

LFS Rank allows the community to protect and verify the integrity of races by running Validator Nodes. These nodes ensure cryptographic consensus and approve ELO distribution.

How to setup your own node

  1. Requirements: Python 3.8+ and network permission to access HTTP APIs.
  2. Download the validator.py script.
  3. The validator will automatically initialize an empty local SQLite database named validator_node.db.
  4. Execution:
bash
python3 validator.py

What happens under the hood?

The validator runs a continuous loop making requests to /api/consensus.php?action=sync. When it detects a new race block, it performs three steps:

  1. Fetches the Public Key (public_key) of the reporting server.
  2. Verifies the Ed25519 signature of the JSON results block.
  3. Checks chain integrity by validating the previous_hash and the final SHA-256.

If the block is perfectly legitimate, it injects it into its SQLite ledger, allowing third-party apps or local APIs to read trustworthy data.

Released under the MIT License.