Verify a round
Every round is one public file. A small program with no dependencies downloads it, decides the whole map again, recomputes every amount, and checks every payout against Solana. You run it on your own machine, so the answer does not come from us.
On this pageThe round file
What a round file contains
When a round closes, the engine writes down everything it used and everything it decided, as one JSON file. The file is stored once and served byte for byte at /rounds/<round>.json. It holds:
- The rules of that round: round and blackout length, the minimum bag, the wallet cap, the star ladder, the Territory share, the yield of every district, fortify, the home defense and each gang's home district. A later rule change never rewrites an old round.
- The pot: the creator fees claimed, with the signatures of the claim transactions, and what was carried in from the round before.
- The map before and after: for each district, who held it and for how many rounds, the power every gang had there, the defense that was added, who holds it now, its share of the pot and what it paid.
- Every wallet that had power or was owed anything: its balance, the moment its stars count from, its stars and multiplier, its power, where it deployed, its Territory and Street cut, the credit it brought in, what was sent and what stays credited.
- The hash of the round before it, so the rounds form a chain and none can be removed or replaced quietly.
The SHA-256 hash of the file is written into the memo of every payout transaction of that round. A transaction on Solana cannot be edited, so once a round is paid its file is fixed.
The memo of a payout transaction
gtw:round=<round>:sha256=<hash of the round file>What the verifier checks
The verifier is one file of plain JavaScript. Its arithmetic is written out separately from the engine's own code, so it is a second opinion and not a copy. It does four things, in this order:
- It hashes the file. It downloads the round file, computes its SHA-256 and compares it with the hash the site publishes.
- It plays the round again. From the rules, the map and the wallet list in the file it recomputes every wallet's power, adds up the power each gang sent to each district, decides who holds every district with defense and ties applied, splits the Territory pot and the Street cut, and works out every payout and every credit. Any figure in the file that differs from its own result is printed.
- It checks the chain of hashes. It downloads the round before, hashes it, and confirms that this file names exactly that hash. The first round must name none.
- It reads the payouts from Solana. For every payout transaction it confirms that the transaction succeeded, that it carries this round's memo with this file's hash, that each wallet received exactly the amount in the file, once, and that nobody outside the file received anything.
It also prints the rules it found in the file, so you can compare them with the published rules and the changelog. The only thing it takes from the site besides the files is the list of transaction signatures, and those are checked against the chain.
Run it
You need Node.js 18 or newer and nothing else. Download the verifier once:
curl -O https://grandturfwars.xyz/verify-round.mjsThen give it a round number. Round numbers start at 1.
node verify-round.mjs 1Each check prints ok or FAIL with the figures that differ, and the last line says whether the round verifies. The program exits with status 0 when it does and 1 when it does not, so it can run in a script. The file is short enough to read before you run it.
Options
- --rpc <url>
- The Solana node the payout transactions are read from. Without it the verifier uses the public mainnet node, which is slow and limits how often it can be asked. Any node of your own choosing works, and using one means you trust neither ours nor the default.
- --site <url>
- Where round files are downloaded from. The default is https://grandturfwars.xyz. Point it at a mirror or a copy you host yourself and the result must be the same, because the hash is checked against the chain.
- --file <path>
- Check a round file you already have on disk instead of downloading one. Only the file itself is checked: its hash is printed and everything in it is recomputed. Nothing is fetched from the site or from Solana.
- --offline
- Download the file and recompute it, then stop. The comparison with the hash the site publishes, the hash of the round before and the payout transactions are skipped.
node verify-round.mjs 1 --rpc https://your-solana-nodenode verify-round.mjs 1 --site https://grandturfwars.xyzcurl -o 1.json https://grandturfwars.xyz/rounds/1.json
node verify-round.mjs --file ./1.jsonnode verify-round.mjs 1 --offlineWhat the verifier cannot prove
The verifier proves that the results follow from the inputs, that the file was not changed after it was paid, and that the SOL went where the file says. It cannot prove the inputs themselves from the file alone. Three of them are the engine's own snapshot:
- Balances. How much $GTW each wallet held when the round closed.
- The start of the hold. The moment each wallet's stars count from: when it reached the minimum bag, or its last sale, send or gang switch if that came later.
- Deployments. How each member had split power across districts when the round closed, including moves made during the blackout.
Each of these can be checked one wallet at a time. Your balance and your last outgoing transfer are public on Solana, and you know which deployment you signed. Find your address in the round file, or open your wallet page, and compare your row with your wallet. If a row is wrong for anyone, that person can show it, and the file cannot be changed to hide it.
Latest round files
No round file yet
The first file is published the moment the first round closes. It will be listed here with its hash, and at /rounds/1.json.