cpu_pearl
cpu_pearl
¶
CPU-based Pearl mining provider (decoupled from inference).
See spec docs/design/2026-05-05-apple-silicon-pearl-mining-design.md §13
for the full v1 design.
The provider runs Pearl's pure-Rust mine() function via py-pearl-mining
and runs Pearl's pearl-gateway as a sibling subprocess. Engine-independent:
this provider does not plug into the user's inference stack. The user keeps
using whatever engine they want; mining runs alongside on the CPU.
Classes¶
CpuPearlProvider
¶
Bases: MiningProvider
v1 cpu-pearl: decoupled CPU mining via py-pearl-mining + pearl-gateway.
Source code in src/openjarvis/mining/cpu_pearl.py
Functions¶
start
async
¶
start(config: MiningConfig) -> None
Spawn pearl-gateway and miner-loop subprocesses; write sidecar.
Source code in src/openjarvis/mining/cpu_pearl.py
stop
async
¶
SIGTERM both subprocesses; remove sidecar.
Source code in src/openjarvis/mining/cpu_pearl.py
Functions¶
ensure_registered
¶
Idempotently register CpuPearlProvider in MinerRegistry.
Called once at import time from openjarvis.mining.__init__. Tests that
rely on the autouse registry-clear fixture in tests/conftest.py must
call this from a fixture or test body to re-register after the clear.