One GPU miner for four kinds of Ethereum vanity address, with swappable compute backends and kernels.
| Mode | What it searches | What you get |
|---|---|---|
profanity |
private-key offsets from a seed public key | an offset to add to your seed private key |
create2 |
CREATE2 salts for a deployer and init code | a bytes32 salt |
create3 |
CREATE3 salts for a factory | a bytes32 salt |
1nft |
1inch Address NFT magics | a bytes16 magic for mint() / mintFor() |
Backends are chosen at run time: OpenCL by default, Metal on macOS, and a portable CPU fallback. All three cover every mode; only OpenCL spreads a search across several GPUs. CUDA is the intended next addition.
cargo build --release # OpenCL
cargo build --release --features metal # plus the macOS Metal backend
# Confirm the GPU agrees with the CPU reference before trusting a long run.
1miner self-test
# A CREATE3 address starting with as many zeros as possible.
1miner create3 --deployer 0x9fBB3DF7C40Da2e5A0dE984fFE2CCB7C47cd0ABf --leading 0
# A CREATE2 address matching a prefix.
1miner create2 --deployer 0xYourFactory --init-code 0x60806040... --matching dead
# A 1inch Address NFT magic for one account.
1miner 1nft --deployer 0xDeployer --mint-for 0xYourAccount --zero-bytes
# A vanity account address, without ever handing over a private key.
eval "$(scripts/profanity-keygen.sh)" # a seed keypair, made here and kept here
1miner profanity --public-key "$PROFANITY_PUBKEY" --leading 0
# Report every address matching a mask in full, instead of climbing to a best score.
1miner create3 --deployer 0xFactory --exact deadbeefEvery mode guide ends with how to turn the result into a deployed contract or a usable key. Start with docs/modes/.
profanity mode never accepts a private key. You generate a keypair offline, pass only the public key, and the miner reports an offset. Adding that offset to your seed private key gives the private key for the found address, so the search itself can run on a machine you do not control. scripts/profanity-keygen.sh makes the keypair and scripts/profanity-final-key.sh does the addition, checking the result against the address that was mined. See docs/modes/profanity.md.
Every reported hit is re-derived on the CPU before it is printed. If the kernel and the reference ever disagree, the hit is flagged and the process exits non-zero rather than handing you an address that does not exist. Disable with --no-verify only if you have a reason to.
No mode ever assumes a deployer address. A salt mined against the wrong deployer produces an address that looks perfectly valid and is unusable, so --deployer is always required outside --benchmark.
Measured on an Apple M4 Max (40-core GPU) with scripts/bench-variants.sh: 20-second windows after an 8-second warmup, two passes in alternating order.
| Mode | Backend | Speed |
|---|---|---|
| create2 | Metal | 724.4 MH/s |
| create2 | OpenCL | 721.8 MH/s |
| profanity | Metal | ~396 MH/s |
| profanity | OpenCL | 381.6 MH/s |
| create3 / 1nft | OpenCL | 356.1 MH/s |
| create3 / 1nft | Metal | 352.2 MH/s |
| create3 / 1nft | CPU (NEON, 16 threads) | 87.3 MH/s |
CREATE3 runs at about half of CREATE2 because it hashes twice: CREATE2 for the proxy, then CREATE for the contract. Rates are not comparable across modes for that reason. The profanity Metal figure is approximate because the two GPU backends sit closer together than a single pass varies; docs/benchmarking.md shows the passes behind it and why every figure here is worth re-measuring on your own hardware.
scripts/bench.sh does that re-measurement — every mode on one machine, which is also how to compare two rented GPUs — and scripts/bench-variants.sh races backends and kernels against each other on a machine you already have.
A prebuilt image with the OpenCL runtime is available, so nothing has to be installed on the machine that does the searching:
docker run --rm --gpus all ghcr.io/1inch/1miner:latest self-test
docker run --rm --gpus all ghcr.io/1inch/1miner:latest create3 --deployer 0xFactory --leading 0
# Every mode benchmarked on the machine in front of you, to decide whether to keep it.
docker run --rm --gpus all ghcr.io/1inch/1miner:latest benchKernels are embedded in the binary, so the image needs no files beside it. For rented GPUs see docs/vastai.md.
- Modes: profanity, create2, create3, 1nft
- How address derivation works
- Backends and kernels, benchmarking
- Building: Linux, macOS, Windows
- Docker, vast.ai
- Correctness, architecture, troubleshooting
The GPU kernels descend from profanity2 and from ERADICATE2 / ERADICATE3 by Johan Gustafsson. See LICENSE.
MIT.