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

Build and develop

SmartNodes is written in Go. The chain is built on the Cosmos SDK and CometBFT; the VPN uses kernel WireGuard, the Noise protocol for its control channel, and Xray for the disguise.

The code

x/registryNodes, bonds, tiers, service keys, disguises, bridges, sponsored bonds.
x/ticketsIssuer keys, blind-signed tickets, redemption, fees, bridge hand-out and reports.
x/verifyProbers, random assignment, sealed reports, tallies, jail, aimed probing, customer flags, availability rewards.
x/rewardsThe equal share for validators, the commission ceiling, non-voting stake in governance.
vpn/The VPN itself: control channel, node, WireGuard, kill switch, name server, disguise, bridge lines, wallet, chain client, probe.
cmd/The five programs: smartnodesd, smartnode, smartvpn, smartprobe, ticketctl.
proto/The chain's message definitions.
website/This website.

Build

git clone https://github.com/mspvantage/smartnodes.git
cd smartnodes
go build -o bin/ ./cmd/...

After changing anything in proto/, regenerate the Go code with Ignite CLI (ignite cosmos generate proto-go), or simply start the local chain below, which does it for you.

Tests

go test ./x/... ./vpn/... ./cmd/...

The chain modules' tests check their bookkeeping after every step: for example, that the tickets module holds exactly what its records say it should.

A local test chain

ignite cosmos chain serve --reset-once

This builds the chain, starts a single-machine network with test accounts alice and bob, and keeps it running. Its settings are in config.yml, including a short verification round so tests do not take hours. --reset-once starts from a clean state.

Live trials

Each feature of the VPN is tried end to end on one Linux server, using network namespaces to stand in for separate machines: a device, an entry, exits, bridges, and a censor that blocks addresses. Trials need root, a fresh local chain, and Xray. They clean up after themselves.

This website

The pages are in website/pages/; the shared header and footer are in website/build.py. To rebuild after an edit:

cd website
python3 build.py

The finished site is in website/site/, which is what gets published. It uses Tabler, kept in the site itself, so no page loads anything from another site.

Contributing

Reviews are especially welcome of the ticket cryptography (x/tickets/crypto), the control channel (vpn/control) and the bridge sealing (vpn/bridge). Please report security problems privately, as described on the security page, not in public issues.