Mining HASH256 dengan akselerasi GPU CUDA untuk performa maksimal.
Perbandingan kecepatan:
- CPU: ~100-500 KH/s (tergantung CPU)
- GPU (CUDA): ~50-500+ MH/s (tergantung GPU, 100-1000x lebih cepat)
- Mining GPU dengan CUDA (Keccak-256 native kernel)
- Dukungan Multi-GPU (semua GPU sekaligus)
- Fallback CPU multi-threaded
- Auto-detect GPU dan konfigurasi optimal
- Persistent GPU memory allocation (zero-copy overhead)
- Hashrate monitoring real-time
- NVIDIA GPU (Compute Capability 6.0+)
- GTX 1060 / 1070 / 1080 / Ti
- RTX 2060 / 2070 / 2080 / Ti
- RTX 3060 / 3070 / 3080 / 3090
- RTX 4060 / 4070 / 4080 / 4090
- Tesla V100 / A100 / H100
- Minimal 2GB VRAM
- Ubuntu 20.04+ / Windows 10+
- NVIDIA Driver 470+
- CUDA Toolkit 11.0+ (nvcc compiler)
- Node.js 18+
- npm
- node-gyp + build tools
# Install NVIDIA driver
sudo apt update
sudo apt install -y nvidia-driver-535
# Install CUDA Toolkit
sudo apt install -y nvidia-cuda-toolkit
# Verify
nvidia-smi
nvcc --versionAtau download CUDA dari: https://developer.nvidia.com/cuda-downloads
# Node.js 22
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt install -y nodejs
# Build tools untuk native addon
sudo apt install -y build-essential python3git clone https://github.com/mrfunntastiic/hash256-cli.git
cd hash256-cli
# Install dependencies
npm install
# Setup environment
cp .env.example .env
nano .envIsi .env:
RPC_URL=https://ethereum-rpc.publicnode.com
PRIVATE_KEY=0xPRIVATE_KEY_WALLET_KAMUchmod +x scripts/build-cuda.sh
./scripts/build-cuda.shOutput yang diharapkan:
=== HASH256 GPU Miner - CUDA Build ===
NVCC Version: 12.x
Detected GPU Compute Capability: 8.6
Compiling CUDA kernel...
CUDA kernel compiled: cuda/keccak256.o
Building Node.js native addon...
=== Build Complete ===
- NVIDIA Driver
- CUDA Toolkit
- Node.js 22
- Visual Studio Build Tools (C++ workload)
git clone https://github.com/mrfunntastiic/hash256-cli.git
cd hash256-cli
npm install
copy .env.example .env
notepad .env
scripts\build-cuda.batnpm start
# atau
node miner-gpu.jsnpm run start:multi
# atau
node miner-gpu-multi.jsnpm run start:cpu
# atau
node miner-cpu.jsnode miner-gpu.js [options]
Options:
--device, -d GPU device ID (default: 0)
--threads, -t Threads per block: 128/256/512/1024 (default: auto)
--blocks, -b Blocks per grid (default: auto)
--help, -h Tampilkan bantuannode miner-gpu-multi.js [options]
Options:
--devices, -d GPU device IDs, comma-separated (default: all)
--threads, -t Threads per block (default: auto)
--batches, -b Batches per work unit (default: 50)
--help, -h Tampilkan bantuan===========================================
HASH256 GPU Miner (CUDA)
===========================================
GPU Devices Found: 1
[GPU] Device: NVIDIA GeForce RTX 4090
[GPU] Compute Capability: 8.9
[GPU] Max Threads/Block: 1024
[GPU] Multiprocessors: 128
[GPU] Clock Rate: 2520 MHz
[GPU] Memory: 24564 MB
[GPU] Config: 256 threads/block, 16384 blocks, 4,194,304 nonces/launch
Initialized GPU Device 0
Threads/Block: 256
Blocks/Grid: 16384
Nonces/Launch: 4,194,304
-------------------------------------------
Wallet: 0x...
Contract: 0xAC7b5d06fa1e77D08aea40d46cB7C5923A87A0cc
-------------------------------------------
=== New Mining Round ===
Era: 1
Reward: 50.0 HASH
Difficulty: 115792089237...
Challenge: 0xabc123...
[GPU] Batch #30 | 285.47 MH/s | Tested: 125,829,120 | Session: 0.4min
*** NONCE FOUND! ***
Nonce: 8273649182
Hash: 0x000000...
Batches: 31
Time: 0.44s
Hashrate: 295.12 MH/s
Submitting transaction...
TX sent: 0x...
SUCCESS! Block: 19234567
Gas used: 52341
# RTX 3090/4090 - coba 512 threads
node miner-gpu.js --threads 512
# GPU lama (GTX 1060) - coba 128 threads
node miner-gpu.js --threads 128# Lebih banyak blocks = lebih banyak parallel work
node miner-gpu.js --blocks 32768# Hanya GPU 0 dan 2
node miner-gpu-multi.js --devices 0,2CUDA kernel belum di-build. Jalankan:
./scripts/build-cuda.shCUDA Toolkit belum terinstall:
sudo apt install nvidia-cuda-toolkit- Pastikan NVIDIA driver terinstall:
nvidia-smi - Pastikan GPU support CUDA (Compute Capability 6.0+)
- Kurangi blocks:
node miner-gpu.js --blocks 4096 - Tutup aplikasi lain yang pakai GPU
Wallet butuh ETH untuk gas. Transfer ETH ke wallet mining.
Nonce sudah tidak valid (difficulty berubah). Miner otomatis retry.
npm run checkhash256-cli/
├── miner-gpu.js # Single GPU miner (CUDA)
├── miner-gpu-multi.js # Multi-GPU miner
├── miner-cpu.js # CPU fallback (multi-threaded)
├── miner.js # Original CPU miner (legacy)
├── check-state.js # Cek state kontrak
├── cuda/
│ ├── keccak256.cu # CUDA kernel (Keccak-256)
│ └── addon.cpp # Node.js N-API binding
├── scripts/
│ ├── build-cuda.sh # Build script (Linux)
│ └── build-cuda.bat # Build script (Windows)
├── binding.gyp # node-gyp build config
├── package.json
├── .env.example
└── README.md
- Mining ini di Ethereum mainnet - butuh ETH untuk gas.
- Jangan pakai private key wallet utama.
- Jangan commit file
.env. - GPU mining = konsumsi listrik tinggi. Monitor suhu GPU.
- Verifikasi kontrak: https://etherscan.io/address/0xAC7b5d06fa1e77D08aea40d46cB7C5923A87A0cc
MIT