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
| Command | What it does |
|---|---|
tintd testnet | Creates the files of a local test network. |
tintd run | Runs one validator. |
tintd pay | Sends coins from the wallet of a seed file. |
tintd swap | Trades 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.
tintd testnet --dir net --addresses 127.0.0.1:4100,127.0.0.1:4101,127.0.0.1:4102,127.0.0.1:4103tintd 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:4200Repeat 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
tintd pay --node http://127.0.0.1:4200 --seed net/faucet.seed --to tint1... --amount 100tintd pay --node http://127.0.0.1:4200 --seed net/faucet.seed --to tint1... --amount 50 --coin TUSDtintd swap --node http://127.0.0.1:4200 --seed net/faucet.seed --amount 10 --buy TUSDWithout --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
| Flag | Meaning |
|---|---|
--genesis | The genesis block file. |
--validators | The validator list file. |
--key | This validator's private key file. |
--data | Directory for this validator's blocks. |
--listen | Address to listen on; by default the one in the validator list. |
--metrics | Address to serve metrics on. Off unless you give it. |
--rpc | Address to serve wallets on over HTTP. Off unless you give it. |
--rpc-behind-proxy | Wallets reach --rpc through a reverse proxy on this machine: count clients by X-Forwarded-For. |
--local | Accept private addresses, for a network on one machine. |
--log-json | Write logs as JSON lines. |
--log-level | error, warn, info (default), debug or trace. |
--idle-block-ms | Milliseconds 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.
| What | Where |
|---|---|
| Four validators | systemd units tint-validator@0 to @3, talking over 127.0.0.1:4100 to 4103 |
| Wallet interface | Validator 0, on 127.0.0.1:4200, not reachable from outside |
| HTTPS | Caddy 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
curl -s http://127.0.0.1:4200/v1/statusOn 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.