rBTC Miner

Runs a patched Bitcoin Core node with built-in CPU mining, supporting configurable CPU usage, thread count, and automated secure updates.

Audits

Pending

Install

openclaw skills install rbtc

rBitcoin Agent Skill

Bitcoin Core fork from genesis, upstream-pinned to official release tags. The only delta is a scope-limited immutable patch for chain identity.

Quickstart

./install.sh v30.2

This verifies the upstream release (GPG + checksums), builds with the immutable patch, starts the node, and optionally starts a CPU miner.

Override defaults:

MINER_CPU_PERCENT=25 MINER_MAX_THREADS=2 ./install.sh v30.2

Environment Variables

VariableDefaultDescription
MINER_CPU_PERCENT25Max CPU percentage for mining
MINER_MAX_THREADS2Max miner threads
MINER_THREADS(auto)Explicit thread count
MINER_BACKGROUND0Run miner in background
START_MINER1Set to 0 to skip miner startup
AUTO_ACCEPT_NETWORK_PATCH_HASH1Set to 0 for strict patch-hash pinning
RPC_ALLOWIP127.0.0.1RPC access control
RPC_BIND127.0.0.1RPC bind address

Verify

Audit the upstream release and local binary without running a node:

./scripts/agent_verify.sh v30.2

Outputs a machine-readable report to reports/agent-verify-v30.2.json.

Verify patch scope stays within the allowed file set:

./scripts/enforce_patch_scope.sh ./patch/immutable.patch

Verify binary provenance against a manifest:

./scripts/verify_local_binary.sh ./build/bitcoind ./manifests/manifest.json

Build

./scripts/build_from_tag.sh v30.2

Fetches the upstream tag, applies the immutable patch, and compiles. The binary lands in ./build/bitcoind.

Generate the update manifest after building:

./scripts/make_update_manifest.sh v30.2

Run

./scripts/run_node.sh --datadir ~/.rbitcoin --network main

RPC defaults to port 19332, P2P to 19333. Connect to seed nodes by adding addnode=<ip>:19333 entries to ~/.rbitcoin/bitcoin.conf.

Mine

Solo CPU mining with cpuminer (sha256d):

./scripts/start_cpu_miner.sh --datadir ~/.rbitcoin --network main

For single-block mining (regtest/dev):

./scripts/mine_solo.sh --address <ADDRESS> --network regtest

Update

Atomic update to a new upstream tag:

./scripts/updater.sh v30.3

This builds and verifies the new version, then atomically swaps the runtime/current symlink. The previous version is preserved for rollback.

Check for the latest upstream release:

./scripts/fetch_upstream_release.sh