Run a watchtower
Check BrainChain's blocks and assertions yourself, from a machine of your own, with no bond, no key and the published node image.
A watchtower is a BrainChain node that re-executes every block from the batches on Robinhood Chain and checks every assertion the validator posts. It needs no bond and no key. If it ever sees an assertion it disagrees with, it logs the disagreement, and that is the signal to raise. Anyone can run one, and the more that run, the less the chain rests on BrainChain's own validator.
What you need
- A machine with 4 GB of memory and 20 GB of disk, with Docker.
- A Robinhood Chain RPC. The command below uses two public ones; the node moves to the next one in
PARENT_RPC_FALLBACKSwhen one stops answering.
Run it
- Download the watchtower config. It holds the chain's definition (also published alone as brainchain-mainnet.json), points the node at a Robinhood Chain RPC, and turns the staker on in
Watchtowerstrategy with the block validator. Change the RPC if you have a better one. - Start the published image with the config in
NODE_CONFIG_B64:
docker run -d --name brainchain-watchtower \
-v brainchain-data:/data \
-e CHAIN_ID=274663 \
-e STAKER_ENABLE=true \
-e NODE_CONFIG_B64="$(base64 < watchtower-config.json)" \
-e PARENT_RPC_FALLBACKS="https://robinhood.api.pocket.network,https://rpc.mainnet.chain.robinhood.com" \
-p 10000:10000 \
ghcr.io/brainchaindev/brainchain-node:v3.11.5-7
The image is the one BrainChain's own node runs. At start it prints the chain id, which roles run, and which parent RPC it chose. Expect staker true and, a little later, validated execution lines as it catches up; the chain is small, so that takes minutes.
- Read your own node at
http://localhost:10000:
cast block-number --rpc-url http://localhost:10000
It should match rpc.usebrainchain.com within a few blocks.
What to watch for
A watchtower that agrees with the chain logs nothing special. These lines mean something is wrong, and are worth sending to hello@usebrainchain.com or posting publicly:
found incorrect assertionor any line naming a challenge: your node computed a different state than the validator asserted.validation failedon a block that keeps failing after a restart: the batch data and your execution disagree.
A disagreement does not move funds by itself. Withdrawals wait the seven-day challenge period, and a bonded validator can challenge a wrong assertion during it. A watchtower is how an outsider notices in time.
Running it as a worker
A staked worker that also runs a watchtower will earn a mark on its public record. That part is planned; running one today needs nothing beyond the steps above.