◆ QUAI NODE keepers claim 1 claim status ← roll

quai-node / the keepers / claim

Claim your node

Every keeper on the roll is state-proven: we check its state against the chain with quai_getProof, every few minutes. And every one is claimed: a tag goes on the roll only once it is. The claim proves that whoever keeps the tag also holds the node's own p2p key, and it locks the tag to that node. It takes one command on the node, and the private key never leaves the machine.

on quai-node

quai-node keepers claim

You don't need to: the running node claims by itself once it has logged in, and says so in its log. The command does the same by hand: it reads the key from quai-node's home and your tag from quai-node.toml, signs, sends, and prints the answer with your node's page.

anywhere else: your command

Type your tag, choose where the key is, copy, and paste it into bash or zsh on the node. This page watches for the claim to land, and your terminal prints the answer too.

What you need

The command, line by line

Read it before you run it. It's short on purpose.

KEY="$HOME/.local/share/quai-node/config/private.key"
Where the node's p2p identity key lives. quai-node keeps it in config/ under its home (on macOS, ~/Library/Application Support/quai-node). Stock go-quai keeps it in ~/.config/go-quai, unless you start it with --node.private-key or --global.config-dir. In Docker, point it at the key inside your volume.
M="quainode.org keeper claim v1 tag=YourTag ts=$(date +%s)"
The exact text you sign: this site, your tag and the current time. Nothing else.
F=$(mktemp); printf %s "$M" > "$F"
Writes that one line to a fresh temporary file, because openssl's Ed25519 signing reads its input from a file. It's removed at the end.
xxd -p -s 36 -l 32 "$KEY"
Reads the node's public key, the last 32 bytes of private.key. Your node ID is derived from it.
(printf 302e…0420; xxd -p -s 4 -l 32 "$KEY") | xxd -r -p
Wraps the private key's 32-byte seed in the standard format openssl expects and hands it to openssl through a pipe. It's never written anywhere.
openssl pkeyutl -sign -rawin …
Signs the line with the node's key (Ed25519).
curl -s https://keepers.quainode.org/v1/claim …
Sends three things: the line, the public key and the signature. Prints our answer.
rm -f "$F"
Removes the temporary line.

What we check

  1. 01The line is ours and current. It must read exactly quainode.org keeper claim v1 tag=… ts=…, and the time must be within 10 minutes of now.
  2. 02The signature is real. We verify it against the public key you sent. A wrong or edited line fails here.
  3. 03It's fresh. Each claim must be newer than the last one accepted for the tag, so an old signature can't be replayed.
  4. 04We know the tag. It exists: its first login created it. There's no claiming ahead of time.
  5. 05The key is that node's. Your node ID comes from the public key. It must be the node we verify for your tag, or, for a tag not tied to a node yet, a node we're connected to directly at the address the tag reports from, and one that keeps no other tag. Nobody else can claim your node, and nobody can claim someone else's.

What leaves your machine

Locked to its node

Once a tag is claimed, it belongs to that node. Verification fails for any other node reporting under the tag, so the tag can't be pointed at another machine by whoever knows the secret.

If something goes wrong

Our answers, roughly as your terminal prints them, and what to do:

✗ We don't see node … at the address YourTag reports from
Your node hasn't logged in yet, or our census can't reach its p2p port (TCP 4002 by default) at that address. Open the port, let go-quai log in (quai-node keepers status, or the status page), then claim again.
✗ That key's node … already keeps the tag …
One node keeps one tag. Claim this tag from another node, or keep the one you have.
✗ YourTag is claimed by node … To move the tag, claim from the new node once the old one has been off the roll for 7 days, or run this on the old node.
The tag is locked to another node (section 6). If you moved the node, wait out the 7 days. If you meant the old node, run it there.
✗ That key belongs to node …, but the node reporting as YourTag is …
You ran it on a different machine, or KEY points at another node's key. Run it on the node that reports as your tag.
✗ Couldn't read your node's public key
KEY doesn't point at a go-quai private.key. Check the path, and pick the right one in the box above.
✗ openssl didn't produce an Ed25519 signature
You need OpenSSL 3 (openssl version). macOS ships LibreSSL: brew install openssl, then use $(brew --prefix openssl)/bin/openssl. Or use quai-node keepers claim.
✗ Your node's clock is … minutes off
Sync the clock (timedatectl set-ntp true) and run it again.
✗ Too many claim attempts
We limit claims per address. Wait 10 minutes.
bash: syntax error near unexpected token `('
You're in sh or dash. Run bash first, then paste the command.

Still stuck? Your node's status page shows every check we ran and where your claim stands.