/solanity

Solanity - Solana GPU Address Grinder

Primary LanguageCOtherNOASSERTION

Find a Solana vanity address using GPUs

I originally copied this from here: https://github.com/ChorusOne/solanity

Then I made the following changes:

  1. Initialise the search using entropy from the OS (it was deterministic)
  2. Exact matches only (there was some weird lowercase thing going on)
  3. Exit criteria based on number of keys found or iterations
  4. Output Solana keypair in log

When it finds a match, it will log a line starting with MATCH, you will see the vanity address found and the secret (seed) in hex.

A Solana keypair file is a text file with one line, that has 64 bytes as decimal numbers in json format. The first 32 bytes are the (secret) seed, the last 32 bytes are the public key. This public key, when represented in base58 format, is the (vanity) address. The line you are looking for is immediatley after the match line, something like this:

[59,140,24,207,208,39,85,22,191,118,230,168,183,34,21,196,25,202,215,167,74,68,74,29,50,247,170,102,19,66,27,104,136,17,198,97,155,247,112,195,114,159,140,43,11,156,171,32,112,188,1,46,231,106,16,148,200,105,30,83,19,235,139,5]

Paste this one line into a file keypair.json for example, and test it by sending funds to and from it.

Using a single Tesla V100 searching for AAAA only, you should find a match under 10 seconds, for AAAAA average time is 12 minutes.

There is almost zero penalty for searching multiple prefix patterns, so you should.

nb: I changed the logging of 'attempts', the original author thought it should be multiplied by 64, but I have no idea why, so I removed that.

NO WARRANTY OR LIABILITY WHATSOEVER, IN THIS WORLD OR THE WORLD TO COME, YOUR SOUL IS YOUR OWN RESPONSIBILITY.

The original instructions are reproduced below and are correct for build:


# A CUDA based ed25519 vanity key finder (in Base58)

This is a GPU based vanity key finder. It does not currently use a CSPRNG and
any key generated by this tool is 100% not secure to use. Great fun for Tour de
Sol though.

## Configure
Open `src/config.h` and add any prefixes you want to scan for to the list.

## Building
Make sure your cuda binary are in your path, and build:

```bash
$ export PATH=/usr/local/cuda/bin:$PATH
$ make -j$(nproc)
```

## Running

```bash
LD_LIBRARY_PATH=./src/release ./src/release/cuda_ed25519_vanity
```