Have you ever wanted to create a custom address for your TON wallet? It’s incredibly easy to do with vanitygen-plusplus. But what if you’re feeling lazy and just want a cool-looking address complete with statistics? Let me introduce you to TonHunter!
I don't have a powerful Nvidia graphics card, I'll be demonstrating everything using the Vast.ai website. I recommend it to you as well.
- Top up your Vast.ai account with $5, that will be more than enough.
- Generate an SSH key on your computer and add it to your Vast.ai account (Account → SSH Keys).
- Copy the
TonHunter.shfrom my repository and put it in~/Downloads.
Vast.ai → Templates → Create/Edit:
- Image Path:Tag:
nvidia/cuda - Version Tag:
12.6.2-devel-ubuntu22.04 - Docker Options:
-e NVIDIA_DRIVER_CAPABILITIES=all - Launch Mode: Interactive shell server, SSH (+ check "direct SSH")
- Disk: 20 GB
- On-start Script (at the bottom):
mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
echo 'export LANG=C.UTF-8 LC_ALL=C.UTF-8' >> /root/.bashrc
apt update && apt install -y build-essential git libssl-dev libpcre3-dev libcurl4-openssl-dev opencl-headers ocl-icd-opencl-dev clinfo gawk
cd /root && git clone https://github.com/10gic/vanitygen-plusplus && cd vanitygen-plusplus
sed -i 's|"-I %s", path_dirname(kernel_path)|"-cl-std=CL1.2 -I %s", path_dirname(kernel_path)|' ocled25519engine.c
make oclvanitygen++This bakes in everything you'd otherwise hit one by one: the NVIDIA OpenCL ICD registration, UTF-8 locale, gawk for stats parsing, and the -cl-std=CL1.2 patch that fixes kernel compilation on recent NVIDIA drivers.
Counter-intuitive but true: the CPU matters more than the GPU here. The ed25519 engine of the tool is CPU-fed, so a monster GPU next to an ancient Xeon will idle at 20–30% load.
- CPU: modern, many allocated cores. Best: EPYC 9xx4/9xx5, Ryzen 7950X/9950X. Good: EPYC 7xx2/7xx3 with 32+ cores. Avoid: Xeon E5 v3/v4.
- Cores: the listing shows a fraction like
32.0/128 CPU— the first number is what you get. Aim for 16+, ideally 32+. - GPU: a single RTX 4090 / 4080 / A6000 is plenty. Multiple GPUs won't help — the CPU is the bottleneck.
- Other: verified host, Reliability 99%+, Max CUDA 12.x+. Rough total speed you can expect: weak old CPU ≈ 2–3 Mkey/s, EPYC 7742 with 32 cores ≈ 5–6 Mkey/s, fresh EPYC with 48–64 cores ≈ 10–20 Mkey/s.
- Rent the machine using your template.
- Wait 3–5 minutes — the on-start script is installing packages and building the tool.
- Connect:
ssh -p <PORT> root@<IP>(Vast.ai shows the exact command under Connect). - Verify everything is ready:
cd /root/vanitygen-plusplus
clinfo | grep "Device Name" # must show your NVIDIA GPU
ls oclvanitygen++ # binary exists
grep -c "cl-std" ocled25519engine.c # must print 1 (patch applied)If any check fails, the on-start script is probably still running — wait a couple of minutes and retry. Still failing after 10 minutes? The machine is bad: Destroy it and rent another one.
scp -P <PORT> ~/Downloads/TonHunter.sh root@<IP>:/root/vanitygen-plusplus/Then on the server:
chmod +x /root/vanitygen-plusplus/TonHunter.shcd /root/vanitygen-plusplus
./TonHunter.sh <Name> [processes] [-i]Examples:
./TonHunter.sh Jasur # name at the END of the address, 32 processes
./TonHunter.sh Jasur 48 # 48 processes (if you have 32+ cores)
./TonHunter.sh Jasur 48 -i # case-insensitive (much faster)
./TonHunter.sh -m any Jasur 48 # name ANYWHERE in the address
./TonHunter.sh -m start ABcd 48 # at the start, right after UQ (note: the 3rd
# address char is constrained, usually A/B/C/D)
./TonHunter.sh -k Jasur 48 # keep going after a match, collect severalHow many processes: roughly equal to your allocated CPU cores (32 cores → 32–48 processes). If uptime shows load average way above your core count, reduce it.
Time to 50% probability at ~5.5 Mkey/s total:
| Pattern length | Case-sensitive | With -i |
With -m any -i |
|---|---|---|---|
| 4 chars | seconds | instant | instant |
| 5 chars | ~2 min | seconds | instant |
| 6 chars | ~2.5 h | ~5 min | seconds |
| 7 chars | ~6 days (don't) | ~1 h | ~2 min |
Every 10 seconds the script prints: live process count, total Mkey/s, keys tried, cumulative probability, and ETA to 50%. If probability passes 90% with no hit — that's just bad luck, not a bug; keep waiting, it keeps climbing.
Ctrl+C stops only the monitor; the search keeps running in the background. To kill everything manually: pkill -9 -f oclvanitygen.
On a hit the script automatically:
- prints the address + PrivKey,
- stops all workers,
- writes a report
hunt_stats_<Name>_<date>.txt(machine, GPU, CPU, timing, speed, keys tried, luck factor, and the result with the key), - prints a ready-to-run
scpcommand to download the report. Run that command on YOUR computer; it looks like:
scp -P <PORT> root@<IP>:/root/vanitygen-plusplus/hunt_stats_<Name>_<date>.txt ~/Downloads/- Import the PrivKey into a wallet (Tonkeeper: Add wallet → Import → by private key).
- Select contract version W5 (v5r1) — otherwise you'll get a different address!
- Check the address in the wallet matches the found one.
- Only after that: Vast.ai → Instances → Destroy (Stop is not enough — disk still bills).
- The key is generated on a rented machine — the host can theoretically see it. Don't keep serious money on such addresses.
- Store the PrivKey in a password manager / offline. Never share it.
- Destroy wipes the instance, but as a habit don't leave found/stats files lying around on servers.
| Symptom | Cause / fix |
|---|---|
clinfo shows nothing |
ICD not registered: mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd. If libnvidia-opencl.so doesn't exist at all — recreate the instance with -e NVIDIA_DRIVER_CAPABILITIES=all |
clinfo shows only CPU (pocl) |
Same as above: NVIDIA ICD missing |
changes address space of pointer kernel errors |
Patch not applied: run the sed line from Step 1, then make oclvanitygen++ |
awk: syntax error |
apt install -y gawk |
| Garbled text / underscores | export LANG=C.UTF-8 LC_ALL=C.UTF-8 |
| SSH keeps dropping | Workers survive (nohup). Use one-shot commands: ssh -p <PORT> root@<IP> "command" |
| Vast.ai dashboard shows 0% / 100% load | The dashboard lies in both directions. Trust nvidia-smi and uptime on the machine |
| tmux frozen, login kicks you out | ssh -p <PORT> root@<IP> "tmux kill-server" |
- Key search engine: vanitygen-plusplus by 10gic
- Wallet V5 contract: ton-blockchain/wallet-contract-v5