Skip to content
cccskills
FreePublished on GitHub

pump-rust-vanity

Production-grade multi-threaded Rust vanity address generator for Solana — 100K+ keys/sec using Rayon parallel iterators with solana-sdk, Base58 pattern matching, prefix/suffix support, security-hardened file output, and Criterion benchmarks.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md3.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Rust Vanity Generator — High-Performance Solana Address Mining

Production-grade Rust binary achieving 100K+ keys/sec using Rayon parallel iterators with security-hardened file output and Solana CLI compatibility.

Architecture

CLI Args ──► VanityConfig ──► VanityGenerator
                                    │
                              Rayon par_iter
                              ┌─────┼─────┐
                            Thread Thread Thread ...
                              │     │     │
                           Keypair::new() per iteration
                              │     │     │
                           Base58 encode + match
                              │     │     │
                              └─────┼─────┘
                                    │
                              AtomicBool found
                                    │
                              SecureOutput (0o600)

CLI Arguments

ArgumentDescription
--prefixRequired Base58 prefix to match
--suffixOptional Base58 suffix
--outputOutput file path (default: stdout)
--threadsNumber of threads (default: all CPUs)

Core Types

struct VanityConfig {
    prefix: String,
    suffix: Option<String>,
    output: Option<PathBuf>,
    threads: Option<usize>,
}

struct GeneratedAddress {
    keypair: Keypair,
    address: String,
    attempts: u64,
}

Generation Engine

fn generate(config: &VanityConfig) -> Result<GeneratedAddress> {
    let found = AtomicBool::new(false);
    let result = (0..num_cpus::get())
        .into_par_iter()
        .find_map_any(|_| {
            let mut attempts = 0u64;
            loop {
                if found.load(Ordering::Relaxed) { return None; }
                attempts += 1;
                let keypair = Keypair::new();
                let address = keypair.pubkey().to_string();
                if matches_pattern(&address, &config) {
                    found.store(true, Ordering::Relaxed);
                    return Some(GeneratedAddress { keypair, address, attempts });
                }
            }
        });
    result.ok_or_else(|| anyhow!("No match found"))
}

Security Features

FeatureImplementation
CSPRNGOsRng via solana-sdk
Memory cleanupZeroize trait on secret key bytes
File permissions0o600 via std::fs::set_permissions
No networkPure offline operation

Dependencies

CratePurpose
solana-sdkKeypair generation, Base58, signing
rayonData-parallel iteration
clapCLI argument parsing
anyhowError handling
criterionBenchmarking

Testing

cargo test                            # Unit + integration tests
cargo test --test security_tests      # Security-focused tests
cargo bench                           # Criterion benchmarks

Patterns to Follow

  • Only use solana-sdk for cryptographic operations
  • Use Zeroize on all key material
  • Set file permissions to 0o600 immediately after writing
  • Use AtomicBool for cross-thread termination signaling
  • Use find_map_any for early termination on first match

Common Pitfalls

  • Base58 is case-sensitive — pump ≠ Pump
  • Longer prefixes grow exponentially harder (~58× per character)
  • Keypair::new() uses OS entropy — do not seed with user input
  • rayon thread pool size should match CPU cores for optimal throughput

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks SolanaOS to add a note, list notes, search notes, or manage note folders.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Create, search, and manage Bear notes via grizzly CLI.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

blucli

Free

BluOS CLI (blu) for discovery, playback, grouping, and volume.

The English summary is being prepared. Showing the original description.

x402agent/SolanaOS9Updated Jul 23, 2026

See all skills by x402agent

Report a problem with this skill