Reference
tod-node
--json for scripts; --version prints the version.Install
mkdir -p ~/.local/bin curl -fsSL https://raw.githubusercontent.com/LightCreator1007/ToD/main/docker/tod-node -o ~/.local/bin/tod-node chmod +x ~/.local/bin/tod-node tod-node init --network base-sepolia-demo --coordinator https://15-206-14-221.sslip.io tod-node selftest
Commands
| Command | What it does | Status |
|---|---|---|
| tod-node init--network <anvil|base-sepolia-demo> [--coordinator <url>] | Creates this node's operator key in the data volume (mode 0600), saves the network and coordinator, and prints its address. Later runs keep the existing key. | ships |
| tod-node config show | Prints the network and coordinator this node uses, and where each value came from: a flag, the environment, or config.toml. | ships |
| tod-node selftest | Trains the mlp-exact self-test vector and checks the result hash byte for byte. Exits 3 on a mismatch, so a drifted machine never joins. | ships |
| tod-node pair--owner <0x..> --chain-id <id> --registry <0x..> | Signs the owner's consent and prints a pairing code to paste into the web. The code expires after 30 minutes. | ships |
| tod-node status | Prints the data directory, whether the node is set up, its operator address, whether it is running, and its latest event. The local API's /v1/status returns the same object. | ships |
| tod-node doctor[--chain-id <id>] | Checks the key, the data folder, the self-test and the coordinator, and says which one needs fixing. | ships |
| tod-node run[--poll <s>] [--mode honest|fake:lazy] | Runs the node: watches the chain, trains, commits and reveals, and serves the local API on 127.0.0.1:7777. It asks the coordinator for gas when it starts low. fake:lazy cheats on purpose and only test chains allow it. | ships |
| tod-node logs[-f] [--since <seq>] | Prints the node's event log. With --json, one event per line. | ships |
| tod-node stop[--wait] | Asks the node to stop. It finishes any reveal it owes first, so stopping never costs stake. Stake stays in the registry until you withdraw it on the web. | ships |
| tod-node tui[--node <url>] [--demo] | Opens the terminal UI on this node, pointed at the coordinator it uses. Needs tod-tui, which `uv sync --all-packages` installs with the rest of the workspace. | in review |
Exit codes
- 0
- ok
- 1
- could not start for a reason other than the network, such as a broken install
- 2
- bad input, for example an address that is not 0x, or an RPC on the wrong chain
- 3
- not eligible: not initialized, or the self-test failed
- 4
- unreachable: the coordinator or the chain did not answer
- 6
- a node is already running on this machine
Errors
With --json, a failure prints one object: what went wrong, a stable code for scripts and agents to branch on, and a hint with the next step.
{"error": "not initialized", "code": "not_initialized", "hint": "run `tod-node init`"}Terminal UI
A three-tab screen for the same node: is it OK, what happened in this round, and who else is in the pool. Its Next step line always says which command to run, and c copies it. Pressing s twice stops the node after the reveals it owes.
tod-node tuiuv sync --all-packages
uv run tod-tuiuv run tod-tui --node http://127.0.0.1:7778 --coordinator http://127.0.0.1:8000uv run tod-tui --demoThe same node is in the browser at localhost:3100/node when the web app runs on that machine.
Where things live
The operator key, config.toml, the event log and the local API token sit in the data directory: ~/.tod natively, or the Docker volume tod-data. Set TOD_DATA to move it. While running, the node serves a local API on 127.0.0.1:7777, loopback only; TOD_API_BIND changes the address or turns it off. Set TOD_NODE_IMAGE to pin an image.