Documentation

Run a node

tintd is the validator program. This page covers a local test network, the commands, and how the public test node is set up.

Test network: the coins have no value

The commands

CommandWhat it does
tintd testnetCreates the files of a local test network.
tintd runRuns one validator.
tintd paySends coins from the wallet of a seed file.
tintd swapTrades one coin of a seed file's wallet for another through the pool.

A local test network on one machine

Create the files for four validators, then start each one in its own terminal.

bash
tintd testnet --dir net --addresses 127.0.0.1:4100,127.0.0.1:4101,127.0.0.1:4102,127.0.0.1:4103
bash · validator 0
tintd run --local \
  --genesis net/genesis.bin \
  --validators net/validators.txt \
  --key net/validator-0/key \
  --data net/validator-0/data \
  --rpc 127.0.0.1:4200

Repeat for validators 1 to 3 with their own --key, --data and, if you want their wallet interface too, a different --rpc port. --local accepts private addresses, which a network on one machine needs.

testnet writes genesis.bin, validators.txt, a folder with the key of each validator, and faucet.seed, the seed of the wallet that holds every test coin. Keep the seed private.

Send coins and swap from the command line

bash
tintd pay --node http://127.0.0.1:4200 --seed net/faucet.seed --to tint1... --amount 100
bash
tintd pay --node http://127.0.0.1:4200 --seed net/faucet.seed --to tint1... --amount 50 --coin TUSD
bash
tintd swap --node http://127.0.0.1:4200 --seed net/faucet.seed --amount 10 --buy TUSD

Without --coin, pay sends the native coin. swap pays with the native coin unless you name another with --pay; one of the two coins of a swap is always the native one.

Flags of tintd run

FlagMeaning
--genesisThe genesis block file.
--validatorsThe validator list file.
--keyThis validator's private key file.
--dataDirectory for this validator's blocks.
--listenAddress to listen on; by default the one in the validator list.
--metricsAddress to serve metrics on. Off unless you give it.
--rpcAddress to serve wallets on over HTTP. Off unless you give it.
--rpc-behind-proxyWallets reach --rpc through a reverse proxy on this machine: count clients by X-Forwarded-For.
--localAccept private addresses, for a network on one machine.
--log-jsonWrite logs as JSON lines.
--log-levelerror, warn, info (default), debug or trace.
--idle-block-msMilliseconds a chain with no waiting payments rests between blocks. Default 5000, at most 60000. Give every validator the same value.

How the public test node is set up

The public node at https://node.tint.top is one server running four validators, so it tests that the network works and proves nothing about decentralisation.

WhatWhere
Four validatorssystemd units tint-validator@0 to @3, talking over 127.0.0.1:4100 to 4103
Wallet interfaceValidator 0, on 127.0.0.1:4200, not reachable from outside
HTTPSCaddy on port 443, forwarding /v1/* to the wallet interface
Chain data/var/lib/tint/validator-N/data
  • The proxy keeps no access log: a record of who asked what from which address is what a privacy network should not keep.
  • There is no metrics port and no open validator port; the validators talk to each other on the loopback interface.
  • A validator keeps every block for good. Measure the disk with du -sh /var/lib/tint/validator-*/data.
  • On a 1 vCPU, 2 GB server each validator used about 92 MB of memory right after the first start; the service file caps one at 1 GB.

Looking at a running node

bash
curl -s http://127.0.0.1:4200/v1/status

On a server managed with systemd, systemctl status 'tint-validator@*' shows the units and journalctl -u 'tint-validator@*' -n 50 the latest log lines.

Pointing the wallet at your node

In the wallet's Settings you can replace the shared node with your own. The node must serve the wallet interface over HTTPS, and it must belong to the same network, meaning the same first block, as the wallet's other data. A wallet that meets a new first block reads the new chain from the start.