Skip to content

Run a validator node

A validator is an always-on ndsr node (NDSR = Necter Distributed State Runtime) running in committee mode. The same binary that runs modules on your laptop runs a validator; what makes a node a validator is that the network counts its key in the validator set.

Validators reach agreement through SecureWeave, NDSR’s BFT voting layer (quorum ⌊2n/3⌋+1, equivocation proofs, vote gossip and persistence).

  • Executes direct calls (/v1/execute) and keeps every module’s state, with state sync from peers.
  • Verifies committee votes, audits a random 10 % of rounds plus every contested one, and signs finality records.
  • Checks and signs miner-set snapshots against its own Sepolia RPC.
  • Proposes and attests per-project reward receipts; records slashing evidence.

Finality and audits · State sync

Minimum Recommended
OS Linux x86_64 or aarch64 (static binary, any distribution with systemd), or macOS for local testing Linux server
CPU 1 vCPU 2–4 vCPU (execution workers default to the CPU count, 2 to 16)
Memory 1 GB 4 GB
Disk 10 GB 40 GB SSD (module state, consensus votes, receipt ledger)
Network always-on, stable connection a public HTTPS URL (a domain and a TLS reverse proxy) and a static address
Chain access one Sepolia JSON-RPC endpoint two or more, from different providers
Payout an EVM address a dedicated address

The testnet validators run on the minimum size. The recommended figures leave headroom for heavier JavaScript and Python modules and for state growth; they are guidance, not network rules.

Terminal window
curl -fsSL https://necter.network/install.sh | sh -s -- validator
ndsr --version

This installs ndsr into ~/.necter/bin and writes three templates to ~/.necter/share/validator. It starts nothing.

File What it is
ndsr.env.example Example configuration: one environment variable per ndsr serve flag
ndsr.service systemd unit (runs /usr/local/bin/ndsr serve as user ndsr with EnvironmentFile=/etc/ndsr.env, hardened, writes only to /var/lib/ndsr)
network.necter.ndsr.plist launchd agent for macOS (~/.necter/bin/ndsr serve --data-dir ~/Library/Application Support/network.necter.ndsr --bind 127.0.0.1:7070, logs to ~/Library/Logs/ndsr.log)

You can also download ndsr by hand from the HiveKit release and verify it against SHA256SUMS (manual install).

Terminal window
ndsr keygen --data-dir ./ndsr-data # creates node.key; prints {"key_file","node_id","public_key"}
ndsr id --data-dir ./ndsr-data # prints the identity of the existing key

keygen creates node.key only if it is missing, so running it again is safe. The public_key (ed25519, 0x + 64 hex) is what a validator set lists; node_id (ndsr- + 16 hex) is derived from it. For a service, use the service’s data directory (/var/lib/ndsr with the systemd unit).

A self-run node runs standalone:

Terminal window
ndsr serve --data-dir ./ndsr-data # standalone local node on http://127.0.0.1:7070

It logs no --payout-address set: this node's work earns no compute units, which is expected for a local node. From another terminal:

Terminal window
curl -s http://127.0.0.1:7070/status # JSON: node_id, public_key, consensus, executions, peers, pool, capabilities...
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:7070/health # 200

Every ndsr serve flag has an environment variable, so a service is configured with one environment file. Start from the template:

ndsr.env.example
NDSR_DATA_DIR=/var/lib/ndsr
NDSR_BIND=127.0.0.1:7070
# Required when NDSR_BIND is not a loopback address:
# NDSR_API_TOKEN=<long random string>
# EVM address credited with this node's compute units:
# NDSR_PAYOUT_ADDRESS=0x<your payout address>
# Committee mode (settlement chain = Ethereum Sepolia on the testnet):
# NDSR_CHAIN_RPC=https://<your Sepolia JSON-RPC endpoint>
# NDSR_CHAIN_ID=11155111
# NDSR_HUB_URL=https://testnet-rpc.necter.network
# NDSR_NETWORK=necter-testnet
# NDSR_STATE_SYNC=true
# Public URL other nodes use to reach this one (behind your TLS reverse proxy):
# NDSR_NODE_URL=https://node.example.com

Setting NDSR_CHAIN_RPC (--chain-rpc) switches on committee mode: the node reads beacons, audit blocks and the Staking / ProjectRegistry events from the settlement chain.

Flag (env) Default
--data-dir (NDSR_DATA_DIR) ndsr-data node.key, state.db, consensus.db, ledger.db, modules/
--bind (NDSR_BIND) 127.0.0.1:7070 a non-loopback address requires NDSR_API_TOKEN
--api-token (NDSR_API_TOKEN) bearer token for /execute, module upload and chunk writes; at least 16 characters
--node-url (NDSR_NODE_URL) public URL the Hub and peers use to reach this node
--payout-address (NDSR_PAYOUT_ADDRESS) EVM address credited with this node’s compute units
--chain-rpc (NDSR_CHAIN_RPC) Sepolia JSON-RPC, repeatable or comma-separated, tried in order; enables committee mode
--chain-id (NDSR_CHAIN_ID) 11155111 checked against the RPC endpoints
--chain-confirmations 32 reorg depth used when the endpoint’s finalized block lags
--chain-start-block 0 first block of event replay (the testnet contracts were deployed at block 11870176)
--hub (NDSR_HUB_URL) the --ccs URL Hub base URL for /v1 calls
--network (NDSR_NETWORK) necter-testnet network id
--network-params FILE built-in testnet values network parameter file
--state-sync (NDSR_STATE_SYNC) true attest module state roots and catch lagging modules up from peers
--persist-ledger off keep a SQLite receipt log in DATA_DIR/ledger.db
--epoch-secs, --gas-per-unit 3600, 1000000 network parameters: must match every other validator
--max-gas 10^10 largest gas_limit accepted (must match the network)
--exec-workers, --exec-queue CPUs (2..16), 64 execution pool; /execute answers 503 beyond it

ndsr serve --help lists every flag.

Copy the example configuration and edit it:

Terminal window
cd ~/.necter/share/validator
cp ndsr.env.example ndsr.env

Then install it as root, following the steps in the header of ndsr.service:

Terminal window
sudo install -m 0755 ~/.necter/bin/ndsr /usr/local/bin/ndsr
sudo useradd --system --home-dir /var/lib/ndsr --create-home --shell /usr/sbin/nologin ndsr
sudo install -m 0640 -o root -g ndsr ndsr.env /etc/ndsr.env
sudo install -m 0644 ndsr.service /etc/systemd/system/ndsr.service
sudo systemctl daemon-reload && sudo systemctl enable --now ndsr

The unit runs /usr/local/bin/ndsr serve as the ndsr user with EnvironmentFile=/etc/ndsr.env, restarts on failure, and is hardened (NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp); the only writable path is /var/lib/ndsr. The node key is created there on first start.

Validators receive inbound requests from the Hub and from each other, so a validator needs a public HTTPS URL.

  • Keep NDSR_BIND=127.0.0.1:7070 and put a TLS-terminating reverse proxy (for example Caddy or nginx) in front of it, forwarding your domain to 127.0.0.1:7070.
  • Set NDSR_NODE_URL to the public https:// URL of that proxy: it is the address the Hub and peers use.
  • If you bind ndsr to a non-loopback address instead, it refuses to start without NDSR_API_TOKEN (at least 16 characters). The token is the bearer for /execute, module upload and chunk writes, and unlocks the full /status.
Check
GET /health 200 while the node is up
GET /status node_id, public_key, consensus, executions, peers, pool, state sync and capabilities (committee, receipt_v2, chain_rpc); redacted without the bearer token
GET /node identity
GET /consensus/rounds/{round_id} tally, finality, own vote
GET /consensus/evidence slashing evidence this node recorded
GET /ledger?module=&function=&limit= recent signed receipts (with --persist-ledger)

Logs: journalctl -u ndsr -f with systemd; ~/Library/Logs/ndsr.log with the launchd agent.

Watch capabilities.chain_rpc (your Sepolia endpoints), consensus.votes_rejected and the execution pool’s rejected count. Committee mode is switched on for the network only when every current validator reports capabilities.committee = true.

  1. Re-run the installer: curl -fsSL https://necter.network/install.sh | sh -s -- validator (a newer installer installs the newer release). Check with ndsr --version.
  2. With systemd, install the new binary to /usr/local/bin again (the first line of the systemd steps above) and restart the service. With launchd, the agent already runs ~/.necter/bin/ndsr; reload the agent.
  3. Network parameters (--epoch-secs, --gas-per-unit, --max-gas) change only in announced network upgrades, when every validator switches at the same epoch.
  • Protect node.key. It is the node’s identity: whoever has it can sign votes as your validator, and two conflicting votes from one key are equivocation, which is slashable. Never run two nodes with the same key. Back it up offline and keep the data directory readable only by the service user.
  • Run as a dedicated user. The systemd template runs as ndsr with a read-only system and one writable directory.
  • Firewall. Expose only your reverse proxy’s HTTPS port. Keep 7070 on loopback.
  • API token. Use a long random value (for example openssl rand -hex 24), keep it in /etc/ndsr.env (mode 0640, as installed above) and never in shell history or scripts you share.
  • Chain endpoints. Use more than one Sepolia RPC provider so one outage does not stall committee mode.
  • Keep it updated and watch the changelog.
  • Stake-based selection. Validators are planned to be stake-elected: a validator bonds NECTA in the Staking contract (which already holds miner collateral and has validator stake in its design), with a higher stake than miners.
  • Identity. A validator is identified by its node key (public_key from ndsr id) and its node_id, plus a payout address.
  • Accountability. Validators sign finality records and epoch receipts; equivocation proofs against a validator are already recorded today, and slashing of validator stake is part of the plan.
  • Economics. Project epochs pay miners, the developer and the treasury today, not validators. Validator economics are planned with stake-elected validators.

Until applications open, install and run a node locally with this guide, so your server, keys and monitoring are ready.