zig gpu vanity grinder
Last updated Apr 19, 2026
23
Stars
11
Forks
3
Issues
0
Stars/day
Attention Score
17
Language breakdown
Zig 86.9%
Metal 8.6%
Dockerfile 3.4%
Shell 1.1%
โธ Files
click to expand
README
๐ Grincel - GPU Vanity Address Generator
A blazing-fast GPU-accelerated Solana vanity address generator written in Zig.
โจ Features
- ๐ฎ GPU acceleration using Vulkan/Metal compute shaders
- ๐ Parallel processing across multiple workgroups
- ๐ Ed25519 key generation on GPU
- ๐ฏ Flexible pattern matching with wildcards
- ๐ Case-sensitive and case-insensitive matching
- ๐พ Multiple storage options (HTTP, PostgreSQL, ClickHouse, SQLite)
- ๐ค Telegram bot integration
- ๐ฅ๏ธ Cross-platform support (Linux, macOS)
๐ ๏ธ Building
zig build
๐ฆ Docker
# Build the image
docker build -t grincel .
Run with NVIDIA GPU support
docker-compose up
๐ฏ Usage
Basic Usage
# Fixed pattern
export VANITY_PATTERN="cafe"
./zig-out/bin/grincel
Pattern with wildcards (? matches any character)
export VANITY_PATTERN="???cafe" # Matches any address ending with "cafe"
./zig-out/bin/grincel
Case-insensitive matching
export VANITY_PATTERN="CAFE"
export IGNORE_CASE=true
./zig-out/bin/grincel # Will match "cafe", "CAFE", "CaFe", etc.
Storage Integration
HTTP Webhook
export STORAGE_TYPE="http"
export STORAGE_URL="https://api.example.com/webhook"
./zig-out/bin/grincel
PostgreSQL
export STORAGE_TYPE="postgresql"
export STORAGE_URL="postgresql://user:pass@localhost:5432/vanity"
export STORAGE_TABLE="keypairs"
./zig-out/bin/grincel
ClickHouse
export STORAGE_TYPE="clickhouse"
export STORAGE_URL="http://localhost:8123"
export STORAGE_DATABASE="vanity"
export STORAGE_TABLE="keypairs"
./zig-out/bin/grincel
SQLite
export STORAGE_TYPE="sqlite"
export STORAGE_DATABASE="keypairs.db"
./zig-out/bin/grincel
Telegram Bot
export STORAGE_TYPE="telegram"
export STORAGETOKEN="yourbot_token"
export STORAGECHATID="yourchatid"
./zig-out/bin/grincel
๐ Benchmarking
Run the built-in benchmark:
./zig-out/bin/grincel --benchmark
Sample output:
Benchmark Results:
Pattern: cafe Attempts per second: 1,234,567 Total attempts: 6,172,835 Duration: 5000 ms
๐จ Pattern Syntax
- Use regular characters for exact matches
- Use
?for any character - Set
IGNORE_CASE=truefor case-insensitive matching
cafe- Matches addresses starting with "cafe"???cafe- Matches addresses with "cafe" at positions 4-7ca?e- Matches "cafe", "cake", etc.CAFEwithIGNORE_CASE=true- Matches any case variation
๐๏ธ Architecture
graph TD
A[Main] --> B[GPU Manager]
B --> C[Vulkan Backend]
B --> D[Metal Backend]
A --> E[Pattern Matcher]
A --> F[Storage Manager]
F --> G[HTTP]
F --> H[PostgreSQL]
F --> I[ClickHouse]
F --> J[SQLite]
F --> K[Telegram]
๐ Performance
This implementation utilizes GPU compute shaders for parallel key generation and pattern matching, achieving significantly higher throughput compared to CPU-based solutions.
Key optimizations:
- Parallel key generation in GPU workgroups
- Efficient pattern matching on GPU
- Zero-copy memory transfers
- Batched storage operations
๐ License
This project is released into the public domain. See LICENSE file for details.
๐ More in this category