WikifitaGitHub live67e8de5
outro · compute-optimization/hashfita

hashfita — Chronobreaker Project

Bitcoin hash analysis system: RingTransformer neural network on MLX, OpenCL SHA-256 feature extraction, QUIC distributed workers, .NET/C# compute layer.

Baixar raw

hashfita — Chronobreaker

A Bitcoin hash analysis system that attempts to predict nonce locations using a custom transformer neural network (RingTransformer) trained via reinforcement on SHA-256 ring features extracted by OpenCL GPU kernels. Targets Apple Silicon (M3 Pro) as primary compute platform.

Repository: /Users/alefita/workdir/hashfita/ Version: v0.1.0 Python: 3.13 Package Manager: uv (pyproject.toml)


Architecture

LayerTechnologyPurpose
ModelMLX (mlx.nn)RingTransformer — 272k params, 4D RoPE
TrainingMLX autograd + MuonClipCustom optimizer with Newton-Schulz ortho
Feature extractionPyOpenCLSHA-256 carrier/ring/trace extraction on GPU
Nonce validationPyOpenCLDouble SHA-256 batch validation
Networkingaioquic (QUIC)Distributed scheduler-worker protocol
Workers.NET/C# + Python IPCHardware-adaptive compute (NVIDIA/AMD/Apple)

Compute Stack

  • MLX ≥ 0.31.1 — Primary framework (model, training, autograd, optimizers)
  • PyOpenCL ≥ 2024.1 — GPU kernel execution for SHA-256 operations
  • NumPy ≥ 1.26 — Bridge for PyOpenCL buffer transfer only
  • No PyTorch — Zero imports, zero references

Key Components

ComponentFilePurpose
RingTransformersrc/chronobreaker/model/transformer.pyNeural network: 17 rings → nonce prediction
AttentionBlock4Dsrc/chronobreaker/model/attention.pyMulti-head attention with 4D RoPE
MuonClipsrc/chronobreaker/train/muonclip_mlx.pyNewton-Schulz + QK-Clip optimizer
ReinforcementTrainersrc/chronobreaker/train/trainer.py3-pass training: forward → GPU validation → autograd
OpenCL Contextsrc/chronobreaker/core/opencl_context.pyKernel loading, buffer management, GPU dispatch
Holographic Projectorsrc/chronobreaker/holographic/projector.pyPHIN Scatter candidate generation

Related Pages

Status

  • ✅ RingTransformer training functional
  • ✅ OpenCL feature extraction pipeline
  • ✅ QUIC distributed protocol
  • ⚠️ 3-copy buffer chain (OpenCL→numpy→MLX) — known bottleneck
  • ⚠️ No TDR recovery
  • ⚠️ float32 exclusively — bfloat16 opportunity
  • 🔜 .NET Silk.NET.OpenCL migration pending