Solana Vanity Address using GPUs

What even is an address?

Solana uses public/private keys to enforce ownership of funds. If you have the private key for an address, you can sign a transaction proving you own the funds at that address, and so transfer them to another address. And an address is just a string derived transparently from the public key. There are various schemes for different crypto currency networks, but in Solana an address is simply the public key encoded in base58.

Solana CPU Vanity Gen

A computer can try many private keys a second, matching the output address against various prefixes to find a match. The traditional name for a program that does this is a “vanity gen”. There is a vanity gen that comes with the Solana CLI tools. You can run like this:

solana-keygen grind --starts-with AAA:1 --starts-with BBB:1

Solana GPU Vanity Gen

It is also possible to do the process on a GPU rather than the CPU. These things are not exclusive, you could do both at the same time. For this experiment I used to get a machine with 8 x 2080Ti GPUs.

export PATH=/usr/local/cuda/bin:$PATH
. mk
. run
export LD_LIBRARY_PATH=./src/release
nohup ./src/release/cuda_ed25519_vanity > log.out &

How much time?

If you play with it a bit, you will quickly realise longer prefixes take much longer to find. This is because the difficult is not linear.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store