fake-rig-fixtures

Simulate miner hardware and APIs for deterministic test doubles.

49|15|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/block/proto-fleet --skill fake-rig-fixtures
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fake-rig-fixtures
Source: https://github.com/block/proto-fleet/tree/main/.claude/skills/fake-rig-fixtures
Command: npx skills add https://github.com/block/proto-fleet --skill fake-rig-fixtures

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when editing server/fake-antminer/ or server/fake-proto-rig/. These are test doubles consumed by tests/plugin-contract/, the E2E suites, and the local just dev stack — behavior changes here ripple silently into all three surfaces.

Core Features & Use Cases

  • Simulated Antminer cgminer API (port 4028) and Antminer Web API (port 80) in server/fake-antminer/.
  • Simulated Proto miner REST API in server/fake-proto-rig/.
  • Tightly integrated with plugin-contract tests, E2E suites, and local development stacks to ensure consistent behavior across surfaces.

Quick Start

Load the fake-rig fixtures into the dev/test environment to initialize the simulated miners across all test surfaces.

Frequently Asked Questions about fake-rig-fixtures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate Antminer cgminer API for deterministic testing?▼

You can simulate the Antminer cgminer API by loading the fake-antminer fixtures, which provide a simulated cgminer API on port 4028 for deterministic test doubles across plugin-contract tests and E2E suites.

What is the best way to set up reproducible miner hardware fixtures for E2E tests?▼

Reproducible miner hardware fixtures are set up by loading the fake-rig fixtures into your dev or test environment, initializing simulated miners to ensure consistent behavior across local dev stacks and E2E fleets.

Do I need specific in-repo directories to use simulated miner test doubles?▼

Yes, you need the in-repo fixtures located under server/fake-antminer and server/fake-proto-rig to be present and kept in sync with consumers for the simulated miner test doubles to function correctly.

Can I use these simulated miner fixtures with a local development stack?▼

Yes, the simulated miner fixtures are tightly integrated with the local just dev stack, allowing you to load the fake-rig fixtures to initialize simulated miners for consistent local development behavior.

Why does changing fake-antminer fixtures affect plugin-contract tests?▼

Changing fake-antminer fixtures affects plugin-contract tests because these test doubles are consumed by the tests/plugin-contract directory, meaning behavior changes ripple silently into plugin-contract, E2E, and local dev surfaces.

Does the Proto miner simulation provide a REST API for testing?▼

Yes, the Proto miner simulation provides a simulated REST API located in server/fake-proto-rig, which is consumed by plugin-contract tests, E2E suites, and local development stacks for consistent testing behavior.