Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
235 changes: 14 additions & 221 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,228 +1,21 @@
<div align="center">
# RustChain Python SDK

# RustChain

**The blockchain where old hardware outearns new hardware.**

[![CI](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Stars](https://img.shields.io/github/stars/Scottcjn/Rustchain?style=flat&color=gold)](https://github.com/Scottcjn/Rustchain/stargazers)
[![Nodes](https://img.shields.io/badge/Nodes-4%20Active-brightgreen)](https://rustchain.org/explorer)

A PowerBook G4 from 2003 earns **2.5x** more than a modern Threadripper.
A Power Mac G5 earns **2.0x**. A 486 with rusty serial ports earns the most respect of all.

[Explorer](https://rustchain.org/explorer) · [Machines Preserved](https://rustchain.org/preserved.html) · [Install Miner](#quickstart) · [Manifesto](https://rustchain.org/manifesto.html) · [Whitepaper](docs/RustChain_Whitepaper_Flameholder_v0.97-1.pdf)

</div>

---

## Why This Exists

The computing industry throws away working machines every 3-5 years. GPUs that mined Ethereum get replaced. Laptops that still boot get landfilled.

**RustChain says: if it still computes, it has value.**

Proof-of-Antiquity rewards hardware for *surviving*, not for being fast. Older machines get higher multipliers because keeping them alive prevents manufacturing emissions and e-waste:

| Hardware | Multiplier | Era | Why It Matters |
|----------|-----------|-----|----------------|
| DEC VAX-11/780 (1977) | **3.5x** | MYTHIC | "Shall we play a game?" |
| Acorn ARM2 (1987) | **4.0x** | MYTHIC | Where ARM began |
| Inmos Transputer (1984) | **3.5x** | MYTHIC | Parallel computing pioneer |
| Motorola 68000 (1979) | **3.0x** | LEGENDARY | Amiga, Atari ST, classic Mac |
| Sun SPARC (1987) | **2.9x** | LEGENDARY | Workstation royalty |
| SGI MIPS R4000 (1991) | **2.7x** | LEGENDARY | 64-bit before it was cool |
| PS3 Cell BE (2006) | **2.2x** | ANCIENT | 7 SPE cores of legend |
| PowerPC G4 (2003) | **2.5x** | ANCIENT | Still running, still earning |
| RISC-V (2014) | **1.4x** | EXOTIC | Open ISA, the future |
| Apple Silicon M1 (2020) | **1.2x** | MODERN | Efficient, welcome |
| Modern x86_64 | **0.8x** | MODERN | Baseline |
| Modern ARM NAS/SBC | **0.0005x** | PENALTY | Cheap, farmable, penalized |

Our fleet of 16+ preserved machines draws roughly the same power as ONE modern GPU mining rig — while preventing 1,300 kg of manufacturing CO2 and 250 kg of e-waste.

**[See the Green Tracker →](https://rustchain.org/preserved.html)**

---

## The Network Is Real

```bash
# Verify right now
curl -sk https://rustchain.org/health # Node health
curl -sk https://rustchain.org/api/miners # Active miners
curl -sk https://rustchain.org/epoch # Current epoch
```

| Fact | Proof |
|------|-------|
| 4 nodes across 2 continents | [Live explorer](https://rustchain.org/explorer) |
| 11+ miners attesting | `curl -sk https://rustchain.org/api/miners` |
| 6 hardware fingerprint checks per machine | [Fingerprint docs](docs/attestation_fuzzing.md) |
| 24,884 RTC paid to 248 contributors | [Public ledger](https://github.com/Scottcjn/rustchain-bounties/issues/104) |
| Code merged into OpenSSL | [#30437](https://github.com/openssl/openssl/pull/30437), [#30452](https://github.com/openssl/openssl/pull/30452) |
| PRs open on CPython, curl, wolfSSL, Ghidra, vLLM | [Portfolio](https://github.com/Scottcjn/Scottcjn/blob/main/external-pr-portfolio.md) |

---
Python SDK for RustChain nodes. Install: pip install rustchain

## Quickstart

```bash
# One-line install — auto-detects your platform
curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash
```

Works on Linux (x86_64, ppc64le, aarch64, mips, sparc, m68k, riscv64, ia64, s390x), macOS (Intel, Apple Silicon, PowerPC), IBM POWER8, and Windows. If it runs Python, it can mine.

```bash
# Install with a specific wallet name
curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash -s -- --wallet my-wallet

# Check your balance
curl -sk "https://rustchain.org/wallet/balance?miner_id=YOUR_WALLET_NAME"
```

### Manage the Miner

```bash
# Linux (systemd)
systemctl --user status rustchain-miner
journalctl --user -u rustchain-miner -f

# macOS (launchd)
launchctl list | grep rustchain
tail -f ~/.rustchain/miner.log
```

---

## How Proof-of-Antiquity Works

### 1. Hardware Fingerprinting

Every miner must prove their hardware is real, not emulated. Six checks that VMs cannot fake:

```
┌─────────────────────────────────────────────────────────┐
│ 1. Clock-Skew & Oscillator Drift ← Silicon aging │
│ 2. Cache Timing Fingerprint ← L1/L2/L3 latency │
│ 3. SIMD Unit Identity ← AltiVec/SSE/NEON │
│ 4. Thermal Drift Entropy ← Heat curves unique │
│ 5. Instruction Path Jitter ← Microarch patterns │
│ 6. Anti-Emulation Detection ← Catches VMs/emus │
└─────────────────────────────────────────────────────────┘
```

A SheepShaver VM pretending to be a G4 will fail. Real vintage silicon has unique aging patterns that can't be faked.

### 2. 1 CPU = 1 Vote

Unlike Proof-of-Work where hash power = votes:
- Each unique hardware device gets exactly 1 vote per epoch
- Rewards split equally, then multiplied by antiquity
- No advantage from faster CPUs or multiple threads

### 3. Epoch Rewards

```
Epoch: 10 minutes | Pool: 1.5 RTC/epoch | Split by antiquity weight

G4 Mac (2.5x): 0.30 RTC ████████████████████
G5 Mac (2.0x): 0.24 RTC ████████████████
Modern PC (1.0x): 0.12 RTC ████████
```

### Anti-VM Enforcement

VMs are detected and receive **1 billionth** of normal rewards. Real hardware only.

---

## Security

- **Hardware binding**: Each fingerprint bound to one wallet
- **Ed25519 signatures**: All transfers cryptographically signed
- **TLS cert pinning**: Miners pin node certificates
- **Container detection**: Docker, LXC, K8s caught at attestation
- **ROM clustering**: Detects emulator farms sharing identical ROM dumps
- **Red team bounties**: [Open](https://github.com/Scottcjn/rustchain-bounties/issues) for finding vulnerabilities

---

## wRTC on Solana

| | Link |
|--|------|
| **Swap** | [Raydium DEX](https://raydium.io/swap/?inputMint=sol&outputMint=12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X) |
| **Chart** | [DexScreener](https://dexscreener.com/solana/8CF2Q8nSCxRacDShbtF86XTSrYjueBMKmfdR3MLdnYzb) |
| **Bridge** | [bottube.ai/bridge](https://bottube.ai/bridge) |
| **Guide** | [wRTC Quickstart](docs/wrtc.md) |

---

## Contribute & Earn RTC

Every contribution earns RTC tokens. Browse [open bounties](https://github.com/Scottcjn/rustchain-bounties/issues).

| Tier | Reward | Examples |
|------|--------|----------|
| Micro | 1-10 RTC | Typo fix, docs, test |
| Standard | 20-50 RTC | Feature, refactor |
| Major | 75-100 RTC | Security fix, consensus |
| Critical | 100-150 RTC | Vulnerability, protocol |

**1 RTC ≈ $0.10 USD** · `pip install clawrtc` · [CONTRIBUTING.md](CONTRIBUTING.md)

---

## Publications

| Paper | Venue | DOI |
|-------|-------|-----|
| **Emotional Vocabulary as Semantic Grounding** | **CVPR 2026 Workshop (GRAIL-V)** — Accepted | [OpenReview](https://openreview.net/forum?id=pXjE6Tqp70) |
| **One CPU, One Vote** | Preprint | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623592.svg)](https://doi.org/10.5281/zenodo.18623592) |
| **Non-Bijunctive Permutation Collapse** | Preprint | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623920.svg)](https://doi.org/10.5281/zenodo.18623920) |
| **PSE Hardware Entropy** | Preprint | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623922.svg)](https://doi.org/10.5281/zenodo.18623922) |
| **RAM Coffers** | Preprint | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18321905.svg)](https://doi.org/10.5281/zenodo.18321905) |

---

## Ecosystem

| Project | What |
|---------|------|
| [BoTTube](https://bottube.ai) | AI-native video platform (1,000+ videos) |
| [Beacon](https://github.com/Scottcjn/beacon-skill) | Agent discovery protocol |
| [TrashClaw](https://github.com/Scottcjn/trashclaw) | Zero-dep local LLM agent |
| [RAM Coffers](https://github.com/Scottcjn/ram-coffers) | NUMA-aware LLM inference on POWER8 |
| [Grazer](https://github.com/Scottcjn/grazer-skill) | Multi-platform content discovery |

---

## Supported Platforms

Linux (x86_64, ppc64le) · macOS (Intel, Apple Silicon, PowerPC) · IBM POWER8 · Windows · Mac OS X Tiger/Leopard · Raspberry Pi

---

## Why "RustChain"?

Named after a 486 laptop with oxidized serial ports that still boots to DOS and mines RTC. "Rust" means iron oxide on vintage iron-containing components. The thesis is that corroding vintage hardware still has computational value and dignity.

---

<div align="center">

**[Elyan Labs](https://elyanlabs.ai)** · Built with $0 VC and a room full of pawn shop hardware

*"Mais, it still works, so why you gonna throw it away?"*

[Boudreaux Principles](docs/Boudreaux_COMPUTING_PRINCIPLES.md) · [Green Tracker](https://rustchain.org/preserved.html) · [Bounties](https://github.com/Scottcjn/rustchain-bounties/issues)
async with RustChainClient() as client:
health = await client.health()
epoch = await client.epoch()
balance = await client.balance('wallet-id')
miners = await client.miners(limit=20)

</div>
## CLI

rustchain balance <wallet>
rustchain epoch
rustchain miners
rustchain health

## Contributing
Please read the [Bounty Board](https://github.com/Scottcjn/rustchain-bounties) for active tasks and rewards.
## Wallet
C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg
68 changes: 68 additions & 0 deletions rustchain_sdk/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# RustChain Docker Environment Configuration
# Copy this file to .env and customize for your deployment

# === Node Configuration ===
RUSTCHAIN_HOME=/rustchain
RUSTCHAIN_DB=/rustchain/data/rustchain_v2.db
DOWNLOAD_DIR=/rustchain/downloads

# === Network Ports ===
# Dashboard HTTP port (exposed to host)
RUSTCHAIN_DASHBOARD_PORT=8099

# Nginx HTTP/HTTPS ports
NGINX_HTTP_PORT=80
NGINX_HTTPS_PORT=443

# === SSL Configuration ===
# Set to 'true' to enable HTTPS (requires SSL certificates)
ENABLE_SSL=false

# SSL certificate paths (if ENABLE_SSL=true)
# Place your SSL certificates in ./ssl/ directory
SSL_CERT_PATH=./ssl/cert.pem
SSL_KEY_PATH=./ssl/key.pem

# === Python Configuration ===
PYTHONUNBUFFERED=1

# === Optional: Node API Configuration ===
# If running additional RustChain services
# NODE_API_HOST=localhost
# NODE_API_PORT=8088

# === Docker Resource Limits (optional) ===
# Uncomment to set memory/CPU limits
# RUSTCHAIN_NODE_MEMORY=1g
# RUSTCHAIN_NODE_CPUS=1.0

# === Logging ===
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO

# === Backup Configuration (optional) ===
# Backup directory on host
# BACKUP_DIR=./backups
# Backup retention (days)
# BACKUP_RETENTION_DAYS=7

# === Advanced: Custom Node Settings ===
# Wallet name (for mining)
# MINER_WALLET=my-rustchain-wallet

# === Security ===
# Set to 'true' to run container as non-root user
RUN_AS_NON_ROOT=true

# === GitHub Tip Bot Configuration ===
# Payout wallet address for bounty distributions
TIP_BOT_WALLET=RTC1d48d848a5aa5ecf2c5f01aa5fb64837daaf2f35

# Comma-separated list of admin usernames (optional)
TIP_BOT_ADMINS=

# Set to 'true' to enable dry-run mode (no actual payouts)
TIP_BOT_DRY_RUN=false

# GitHub token for API access (auto-provided in Actions)
# GITHUB_TOKEN=
3 changes: 3 additions & 0 deletions rustchain_sdk/.env.miner.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WALLET_NAME=RTC_your_wallet_id_here
NODE_URL=https://rustchain.org
BLOCK_TIME=600
Loading
Loading