Early test network: unaudited, and nothing on it has real value. What this means

Run a node

Anyone can run a node. You post a bond, the node serves users who pay with tickets, and independent probers check that it works. On the test network the tokens have no value, so this is the time to learn it.

Kinds of node

KindWhat it doesSeesBond (draft)
Entry (tier 1)First hop. Can offer the disguise.Users' addresses, not where they go1,000 SNODE
Exit (tier 2)Second hop: traffic leaves to the internet from here.Where traffic goes, not who sent it5,000 SNODE
BridgeAn unlisted entry, reached only through the disguise.Like an entryAs an entry
Running an exit means other people's traffic leaves the internet from your address. Check your hosting provider's terms and your local law first. Running an entry or bridge carries less of this risk.

What you need

  • A Linux server with a public IPv4 address, root access, and the programs installed.
  • Open ports: the node's port (TCP and UDP, 51820 by default), and TCP 443 if you offer the disguise.
  • An account on the chain with enough SNODE for the bond, plus a little for fees.
  • Swap turned off, and the system log kept in memory, so nothing about users could reach the disk. The node warns you if not.

1. Make the node's key

sudo mkdir -p /etc/smartnode && cd /etc/smartnode
sudo sh -c 'umask 077; wg genkey > node.key'
sudo wg pubkey < node.key

The public key printed is what you register. The private key never leaves this machine.

2. Register on the chain

# an entry node: endpoint, public key, tier 1, bond
smartnodesd tx registry register-node 203.0.113.10:51820 NODE_PUBKEY 1 1000000000usnode \
  --from operator --gas auto --gas-prices 0.025usnode

# find its id
smartnodesd query registry list-node -o json | jq -r '.node[] | select(.endpoint=="203.0.113.10:51820") | (.id // "0")'

1 SNODE is 1,000,000 usnode. For an exit use tier 2 and the exit bond. The first node registered has id 0.

3. Give the machine a service key

Your operator key controls the bond, so it should not sit on the server. Make a separate key that can only redeem tickets, and register it. Payments still go to the operator.

smartnodesd keys add nodeservice           # on the server
smartnodesd tx registry set-service-key NODE_ID SERVICE_ADDRESS --from operator ...

Give the service account a little SNODE for fees.

4. Start the node

sudo smartnode -strict -key-file /etc/smartnode/node.key -node-id NODE_ID \
  -listen 0.0.0.0:51820 -iface sn0 -subnet 10.77.0.0/24 -session 1h \
  -from nodeservice -rpc tcp://CHAIN_RPC:26657
  • -strict refuses to start if session details could reach the disk, or if -from is the operator's own key.
  • -session is how long one ticket buys.
  • -subnet is the private range handed to users inside the tunnel. Give each node on one machine its own.
  • Exit nodes run a name server for their users; -dns-upstream picks where it forwards lookups.

Run it under systemd so it restarts after a reboot. It logs only totals: sessions open, tickets redeemed.

5. Add the disguise (entry nodes)

Add these options to offer the disguise on port 443:

  -reality-port 443 -xray /usr/local/bin/xray -reality-dir /var/lib/smartnode

The first time, the node makes its disguise keys and prints the exact set-reality command to publish them. Run that command with your operator key. By default the disguise passes visitors through to www.microsoft.com; -reality-cover picks another site.

Run a bridge

A bridge is an entry node whose address is on no public list. The chain holds only a fingerprint of its line.

# 1. make the line and see its fingerprint
sudo smartnode bridge-line -key-file /etc/smartnode/node.key -listen 127.0.0.1:51830 \
  -reality-port 443 -reality-dir /var/lib/smartnode -bridge-address 203.0.113.50

# 2. register by fingerprint alone
smartnodesd tx registry register-bridge FINGERPRINT 1000000000usnode --from operator ...

# 3. run it
sudo smartnode -strict -key-file /etc/smartnode/node.key -node-id BRIDGE_ID -listen 127.0.0.1:51830 \
  -iface sb0 -subnet 10.79.0.0/24 -from nodeservice -rpc tcp://CHAIN_RPC:26657 \
  -reality-port 443 -xray /usr/local/bin/xray -reality-dir /var/lib/smartnode -bridge-address 203.0.113.50
  • The node's own port is closed to everything except its disguise.
  • It answers paid requests for its line by itself, sealed to each buyer. You are paid after a waiting period in which buyers can prove a bad answer; a proven bad answer burns part of your bond.
  • When the line has been given out as often as allowed, or enough of the people given it report it dead, the node logs MOVE THIS BRIDGE. Change the port or address, make a new line, and publish its fingerprint with update-bridge. The new line is handed out again.
  • You can also give your line privately to people you choose with smartnode bridge-line ... -node-id BRIDGE_ID.

Earnings

  • Tickets: each redeemed ticket pays you its price, less a 5% protocol fee. The node redeems them by itself.
  • Availability: passing verification earns a share of the node reward pool. Claim it whenever you like: smartnodesd tx verify claim-node-reward NODE_ID --from operator ...

See the token page for how these are set. All figures are drafts.

Checks and jail

Probers test your node at random through real sessions. If it fails several rounds in a row it is jailed: hidden from users until you fix it and run smartnodesd tx verify unjail NODE_ID. Being offline costs income, never bond. Only proven tampering with traffic burns bond. On the test network penalties are recorded but not applied.

Leaving

smartnodesd tx registry deregister-node NODE_ID --from operator ...
# after the unbonding period (21 days, draft):
smartnodesd tx registry withdraw-bond NODE_ID --from operator ...

Run a prober

Probers are paid to test nodes. A prober posts its own bond, needs a ticket wallet to pay for test sessions, and runs on a machine that is not one of your nodes.

smartnodesd tx verify register-prober 1000000000usnode --from prober ...
sudo smartprobe run -from prober -home ~/.smartnodes -wallet prober-wallet.json -xray /usr/local/bin/xray

Each round it asks the chain which nodes it must test, tests each one through two hops in its own network space, seals its results, and reveals them the next round.