https://github.com/peterkrull/algo-vanity-rs
Algorand Vanity address generator. Fast, multi-threaded CLI utility
https://github.com/peterkrull/algo-vanity-rs
algorand cryptocurrency rust rust-cli vanity-address
Last synced: about 1 year ago
JSON representation
Algorand Vanity address generator. Fast, multi-threaded CLI utility
- Host: GitHub
- URL: https://github.com/peterkrull/algo-vanity-rs
- Owner: peterkrull
- License: gpl-3.0
- Created: 2023-06-08T15:02:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-17T17:28:48.000Z (over 2 years ago)
- Last Synced: 2023-12-17T18:25:13.089Z (over 2 years ago)
- Topics: algorand, cryptocurrency, rust, rust-cli, vanity-address
- Language: Rust
- Homepage:
- Size: 391 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Algorand Vanity Address Generator
This command-line interface (CLI) tool is *guaranteed* the fastest tool to get you exactly the Algorand vanity address you want, all while running securely on your local machine.
# Features
- Multi-threading, number of threads customizable by user
- Search for one or more patterns at minimal performance penalty
- Unlimited or once-per-pattern searching
- Load list of pattern strings from json file
- Simple terminal-based user interface
- Automatically saves matching addresses to `vanities.json` file
# Usage
As the name suggests, a CLI tool is executed from the command-line. On linux it may be necessary to set the binary as executable in its properties. Open a terminal (or command prompt) in the same folder as the binary and type `./algo-vanity-rs -h` on Linux or `algo-vanity-rs -h` on Windows, which will run the binary and show the help prompt. Otherwise the using the tool is as simple as writing which patterns you want to look for, such as `algo-vanity-rs algo rand rocks` which will look for addresses which begin with `ALGO`, `RAND` and `ROCKS`.
```bash
./algo-vanity-rs algo rand rocks
```
Alternatively, it is possible to create a json file, containing a list of strings to use as patterns. This may be more convenient for some uses cases. For example, if a file named `vanity_list.json` exists in the same directory as the binary, and it contains `["algo","rand","rocks"]`, then executing the following command will give the same result as the previous command.
```bash
./algo-vanity-rs vanity_list.json
```
## Build from source
To build from source you will need the [Rust toolchain](https://rustup.rs/). Clone this repository, and run `cargo build --release` to compile an executable binary file. This may take a few minutes. The binary `algo-vanity-rs` will be located in `./target/release/`.
## Download pre-compiled binaries
For safety-reasons, it is recommended to build from source. However, pre-build binaries for x64 Linux and Windows platforms are provided under the `Releases` section of the repository. These releases are not guaranteed to be up to date.
By default the tool will run indefinitely until interrupted by the user, automatically detect the number of available threads and only look for patterns in the beginning of the address. All of this can be configured, and is explained further in the `-h` prompt.
# How fast?
Thanks to a random number generator (rng) hack, we can get away with generating significantly fewer random seeds. Instead of generating 32 bytes each iteration, we can generate just 32+2 bytes *once* per 10000 iterations, and simply perturb a few of the seed indices. This hack alone doubles the number of addresses/second on my machine, allowing me to reach 215k addresses/second on a 10+ year old i5-3570k. I think that is impressive. The Rust language is also to thank for this speed, and for its easy multi-threading workflow.