quip-solver README

README проекта с github.com/QuipNetwork/quip-solver. Одним файлом markdown: README.md.

quip-solver

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

The v0.3 mining stack for the quip-validator 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-solver-{cpu,cuda,metal,dwave}. The quip-proto, quip-protocol, quip-solver-core, and ising-generators dependencies come from crates.io at v0.0.14. 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 kernels set the floor, because they use __nanosleep, an sm_70+ instruction. NVRTC 12.9, which the quip-solver-cuda image ships, sets the ceiling. The host needs an NVIDIA driver from a CUDA 12.9-supported branch (r535 or newer) and the NVIDIA container runtime (--gpus all). The miner compiles its kernels per card for the detected capability. A capability outside the range is clamped to the nearest supported target. A capability the toolkit lacks (for example 8.8) selects the next lower architecture, and the driver's forward-compatible PTX JIT loads it.

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 docs/COORDINATOR.md for the run model.

Testing

The workspace tests run offline by default:

cargo test --workspace

Toolchain image for the test jobs

The Linux test jobs rust, coordinator, and verify-fetch-miners run on a toolchain image that .gitlab/ci-toolchain.Dockerfile defines. The image holds Rust 1.97.1 with clippy and rustfmt, and shellcheck. The jobs pull the image by the digest in the TOOLCHAIN_IMAGE variable of .gitlab-ci.yml.

The build-toolchain-image job builds the image with kaniko and pushes it to $CI_REGISTRY_IMAGE/ci-toolchain:<short-sha>. The job runs automatically on a branch push that changes the Dockerfile. To rebuild from an unchanged Dockerfile, run the job by hand from the pipeline page. The job log ends with a TOOLCHAIN_IMAGE=... line. Copy that line into .gitlab-ci.yml in a new commit. The jobs use the old image until that commit.

When rust-toolchain.toml changes the Rust version, change the FROM line of the Dockerfile in the same merge request, and then update the digest.

Live devnet integration tests

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

Start a local devnet from the chain repo (quip-validator) 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

The URL accepts ws://, wss://, http://, and https://. The chain client uses jsonrpsee for every scheme.

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)

Ищем в базе…

Что это такое?Это стек майнинга для блокчейна quip-protocol: координатор, который следит за цепочкой, превращает задачи оптимизации Изинга в головоломки proof-of-work, и бинарные файлы майнеров, которые решают их с помощью имитированного отжига, сэмплирования Гиббса или настоящего квантового отжига на оборудовании D-Wave.
Это один общий бинарник или несколько частей?Это рабочее пространство Rust с бинарным файлом coordinator (quip-coordinator) и отдельными бинарниками майнеров, которые поставляются из собственных репозиториев (CPU, CUDA, Metal, D-Wave); сам протокол обмена с решателями находится в отдельном крейте quip-solver-core.
Как собрать и запустить coordinator?Соберите рабочее пространство Cargo из корня репозитория с помощью зафиксированного тулчейна, затем запустите coordinator с конфигом, в котором перечислены майнеры и валидаторы, к которым он должен подключаться.
Что нужно для майнинга на GPU?Для сборки координатора нужен зафиксированный тулчейн Rust, а для майнинга на CUDA — драйвер NVIDIA из ветки, поддерживаемой CUDA 12.9 (r535 или новее), плюс NVIDIA container runtime; сами бинарники майнеров для CPU/CUDA/Metal/D-Wave скачиваются отдельно с quip.network и в этот репозиторий не входят.
Безопасно ли запускать это с реальными деньгами или в боевой блокчейн-сети?Нет — в README прямо указано, что это экспериментальное ПО без каких-либо гарантий для продакшена, а поддержка CUDA ограничена compute capability от 7.0 до 12.1 (от Volta до потребительских карт Blackwell).
Что изменилось между v0.2 и v0.3 этого стека?v0.2 — это единый стек майнинга на Python; v0.3 разделяет его на координатор на Rust и интеграцию с цепочкой, при этом каждый майнер теперь представляет собой отдельный бинарник в собственном репозитории. Контракт решателя (proto, консенсусные примитивы, харнес) перенесён в отдельный крейт quip-solver-core, а в этом репозитории больше нет ни одной строки Python-кода.
Что здесь значит задача Изинга?Координатор превращает головоломки proof-of-work из цепочки в задачи оптимизации спинового стекла Изинга; майнеры пытаются решить их имитированным отжигом, сэмплированием Гиббса или квантовым отжигом, а затем отправляют принятое решение как экстринзик QuantumPow.submitproof.
Можно ли протестировать это без работающей ноды блокчейна?Да — стандартный запуск cargo test полностью офлайн. Интеграционные тесты для живого devnet, которые работают через настоящий клиент цепочки, помечены #[ignore] и запускаются только при заданной переменной окружения QUIPDEVNET.
Зачем здесь нужно оборудование D-Wave?Протокол поддерживает квантовый отжиг на настоящем оборудовании D-Wave как один из бэкендов решателей наряду с имитированным отжигом на CPU/CUDA/Metal, что делает этот стек одним из немногих, способных принимать доказательства, найденные настоящим квантовым оборудованием.
Какие есть похожие проекты?quip-node-manager, xquad, quip-validator, linten, InstinctFlash, canopy, stellar-pathfinder, magnitude
Автор
QuipNetwork
Размер
83.4 MB
Звёзды
11.6K
Возраст
10 мес
Коммиты · 90 дней