quip-solver README

The project's README from github.com/QuipNetwork/quip-solver. As one markdown file: README.md.

quip-protocol

Experimental software. Use at your own risk. No production warranties.

The v0.3 mining stack for the quip-protocol-rs Substrate chain. A coordinator follows the chain head and stages Ising problems for the miner subprocesses; when a solution clears the difficulty gate, the coordinator submits a QuantumPow.submit_proof extrinsic. The miners run simulated annealing and Gibbs sampling on CPU, CUDA, and Metal, and quantum annealing on D-Wave hardware.

This is a Rust workspace. The coordinator and the chain integration are Rust. The solver contract — the wire protocol, the consensus primitives, and the shared solver harness — lives in quip-solver-core and is consumed from crates.io. The miner binaries ship from their own repositories.

Repository layout

The miner binaries live in quip.network/quip-miner-{cpu,cuda,metal,dwave}. The quip-proto, quip-protocol, and quip-solver-core dependencies come from crates.io at v0.0.0; their source of truth is quip.network/quip-solver-core.

CUDA card support

The CUDA miner supports NVIDIA GPUs with compute capability 7.0 through 12.1 (Volta through consumer Blackwell). The floor is set by the kernels (they use __nanosleep, an sm_70+ instruction); the ceiling by NVRTC 12.9, which the quip-miner-cuda image ships. The host needs an NVIDIA driver from a CUDA 12.9-supported branch (r535 or newer) and the NVIDIA container runtime (--gpus all). Kernels are JIT-compiled per card for its detected capability; capabilities outside the range are clamped, and capabilities the toolkit lacks (for example 8.8) fall back to the next lower architecture via the driver's forward-compatible PTX JIT.

Documentation

The solver contract — the wire protocol, the Sampler trait, handshake, credits, cancel, and exit codes — is specified in the quip-solver-core repository (SPEC.md).

Build and run

The workspace builds from the repository root (toolchain pinned in rust-toolchain.toml):

cargo build --workspace

Run the coordinator against a config that lists the miners and the validators:

quip-coordinator --config ./docker/config.toml

See AGENTS.md for the full command set and COORDINATOR.md for the run model.

Testing

The workspace tests run offline by default:

cargo test --workspace

Live devnet integration tests

crates/quip-coordinator/tests/devnet_submit.rs drives the real chain client against a running node. The tests are #[ignore]d and gated on the QUIP_DEVNET environment variable, so the default cargo test run stays offline. Three milestones:

Start a local devnet from the chain repo (quip-protocol-rs) with make local-3-node or docker compose up. Both publish node RPC on ws://127.0.0.1:9944. Then run:

QUIP_DEVNET=ws://127.0.0.1:9944 \
  cargo test -p quip-coordinator --test devnet_submit -- --ignored --nocapture

One constraint: use a loopback URL (ws://127.0.0.1:…) or wss://. subxt rejects plain ws:// to a non-loopback host as insecure. To reach a remote node, tunnel its RPC port to localhost first.

M3 self-seeds — it proposes its own order against the canonical plain-ising-v1 spec the runtime seeds at genesis, so it runs on a fresh devnet with an empty mempool.

What changed from v0.2

In v0.2 this repository was a single Python mining stack that attached to the chain. v0.3 splits it apart:

License

AGPL-3.0-or-later. See LICENSE.

quip-solver (QuipNetwork/quip-solver)

Searching Database…

这是什么?这是 quip-protocol 区块链的挖矿软件栈:包括一个监视链上状态的协调器,它会把 Ising 优化问题作为工作量证明谜题发布出去;还有矿工可执行文件,负责用模拟退火、吉布斯采样,或在 D-Wave 硬件上进行真正的量子退火来求解这些问题。
这是一个统一的可执行程序,还是由几个部分组成?这是一个 Rust 工作区,包含协调器可执行文件(quip-coordinator),另外还有矿工可执行文件,它们分别放在各自的仓库中发布(CPU、CUDA、Metal、D-Wave);求解器的通信协议本身则位于独立的 quip-solver-core crate 中。
我该怎么构建并运行协调器?在仓库根目录下使用固定版本的工具链构建 Cargo 工作区,然后用一个配置文件运行协调器,该文件列出它应当连接的矿工和验证节点。
用 GPU 挖矿需要准备什么?构建协调器需要固定版本的 Rust 工具链;如果要用 CUDA 挖矿,还需要支持 CUDA 12.9 的 NVIDIA 驱动分支(r535 或更新版本),以及 NVIDIA 容器运行时。CPU/CUDA/Metal/D-Wave 的矿工可执行文件需要另外从 quip.network 下载,不包含在本仓库中。
用它跑真实资金或正式生产链安全吗?不安全。README 明确标注这是实验性软件,不提供任何生产环境保证;CUDA 支持仅限于计算能力 7.0 到 12.1(从 Volta 到消费级 Blackwell)。
这个软件栈从 v0.2 到 v0.3 有什么变化?v0.2 是一个单一的 Python 挖矿软件栈;v0.3 将其拆分为 Rust 协调器和链集成部分,每个矿工现在都是位于各自仓库中的独立可执行文件。求解器契约(proto、共识原语、测试框架)已迁移到独立的 quip-solver-core crate 中,本仓库不再包含任何 Python 代码。
在这里,Ising 问题是什么意思?协调器会把链上的工作量证明谜题转换为 Ising 自旋玻璃优化问题;矿工尝试用模拟退火、吉布斯采样或量子退火来求解,然后把被接受的解提交为 QuantumPow.submitproof 外部交易(extrinsic)。
没有运行中的区块链节点,我能测试它吗?可以。默认的 cargo test 运行完全离线。需要连接真实链客户端的在线 devnet 集成测试被标记为 #[ignore],只有在设置了 QUIPDEVNET 环境变量时才会运行。
D-Wave 硬件在这里有什么意义?该协议支持在真实的 D-Wave 硬件上进行量子退火,它是求解器后端之一,与 CPU/CUDA/Metal 上的模拟退火并列,这使得它成为少数能够接受由真实量子硬件找到的证明的挖矿软件栈之一。
Size
82.4 MB
Stars
11.6K
Updated
CommitOct 15
Age
9mo
Commits · 90 Days