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
- Requirements: Python 3.8+ and network permission to access HTTP APIs.
- Download the
validator.pyscript. - The validator will automatically initialize an empty local SQLite database named
validator_node.db. - Execution:
bash
python3 validator.pyWhat 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:
- Fetches the Public Key (
public_key) of the reporting server. - Verifies the Ed25519 signature of the JSON results block.
- Checks chain integrity by validating the
previous_hashand 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.
