Skip to content
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Contributing Guide\n## Setup\n`\.bash\ngit clone https://github.com/Scottcjn/Rustchain.git\ncd Rustchain\npip install -e .\n`\(
339 changes: 6 additions & 333 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,342 +1,15 @@
<div align="center">
## πŸš€ Quick Start

# 🧱 RustChain: Proof-of-Antiquity Blockchain
### Install from Source

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![PowerPC](https://img.shields.io/badge/PowerPC-G3%2FG4%2FG5-orange)](https://github.com/Scottcjn/Rustchain)
[![Blockchain](https://img.shields.io/badge/Consensus-Proof--of--Antiquity-green)](https://github.com/Scottcjn/Rustchain)
[![Python](https://img.shields.io/badge/Python-3.x-yellow)](https://python.org)
[![Network](https://img.shields.io/badge/Nodes-3%20Active-brightgreen)](https://rustchain.org/explorer)
[![As seen on BoTTube](https://bottube.ai/badge/seen-on-bottube.svg)](https://bottube.ai)

**The first blockchain that rewards vintage hardware for being old, not fast.**

*Your PowerPC G4 earns more than a modern Threadripper. That's the point.*

[Website](https://rustchain.org) β€’ [Live Explorer](https://rustchain.org/explorer) β€’ [Swap wRTC](https://raydium.io/swap/?inputMint=sol&outputMint=12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X) β€’ [DexScreener](https://dexscreener.com/solana/8CF2Q8nSCxRacDShbtF86XTSrYjueBMKmfdR3MLdnYzb) β€’ [wRTC Tutorial](docs/WRTC_ONBOARDING_TUTORIAL.md) β€’ [Grokipedia Ref](https://grokipedia.com/search?q=RustChain) β€’ [Whitepaper](docs/RustChain_Whitepaper_Flameholder_v0.97-1.pdf) β€’ [Quick Start](#-quick-start) β€’ [How It Works](#-how-proof-of-antiquity-works)

</div>

---

## πŸͺ™ wRTC on Solana

RustChain Token (RTC) is now available as **wRTC** on Solana via the BoTTube Bridge:

| Resource | Link |
|----------|------|
| **Swap wRTC** | [Raydium DEX](https://raydium.io/swap/?inputMint=sol&outputMint=12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X) |
| **Price Chart** | [DexScreener](https://dexscreener.com/solana/8CF2Q8nSCxRacDShbtF86XTSrYjueBMKmfdR3MLdnYzb) |
| **Bridge RTC ↔ wRTC** | [BoTTube Bridge](https://bottube.ai/bridge) |
| **Onboarding Tutorial** | [wRTC Bridge + Swap Safety Guide](docs/WRTC_ONBOARDING_TUTORIAL.md) |
| **External Reference** | [Grokipedia Search: RustChain](https://grokipedia.com/search?q=RustChain) |
| **Token Mint** | `12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X` |

---

## πŸ“„ Academic Publications

| Paper | DOI | Topic |
|-------|-----|-------|
| **RustChain: One CPU, One Vote** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623592.svg)](https://doi.org/10.5281/zenodo.18623592) | Proof of Antiquity consensus, hardware fingerprinting |
| **Non-Bijunctive Permutation Collapse** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623920.svg)](https://doi.org/10.5281/zenodo.18623920) | AltiVec vec_perm for LLM attention (27-96x advantage) |
| **PSE Hardware Entropy** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623922.svg)](https://doi.org/10.5281/zenodo.18623922) | POWER8 mftb entropy for behavioral divergence |
| **Neuromorphic Prompt Translation** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18623594.svg)](https://doi.org/10.5281/zenodo.18623594) | Emotional prompting for 20% video diffusion gains |
| **RAM Coffers** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.18321905.svg)](https://doi.org/10.5281/zenodo.18321905) | NUMA-distributed weight banking for LLM inference |

---

## 🎯 What Makes RustChain Different

| Traditional PoW | Proof-of-Antiquity |
|----------------|-------------------|
| Rewards fastest hardware | Rewards oldest hardware |
| Newer = Better | Older = Better |
| Wasteful energy consumption | Preserves computing history |
| Race to the bottom | Rewards digital preservation |

**Core Principle**: Authentic vintage hardware that has survived decades deserves recognition. RustChain flips mining upside-down.

## ⚑ Quick Start

### One-Line Install (Recommended)
```bash
curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash
```

The installer:
- βœ… Auto-detects your platform (Linux/macOS, x86_64/ARM/PowerPC)
- βœ… Creates an isolated Python virtualenv (no system pollution)
- βœ… Downloads the correct miner for your hardware
- βœ… Sets up auto-start on boot (systemd/launchd)
- βœ… Provides easy uninstall

### Installation with Options

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

**Uninstall:**
```bash
curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash -s -- --uninstall
```

### Supported Platforms
- βœ… Ubuntu 20.04+, Debian 11+, Fedora 38+ (x86_64, ppc64le)
- βœ… macOS 12+ (Intel, Apple Silicon, PowerPC)
- βœ… IBM POWER8 systems

### After Installation

**Check your wallet balance:**
```bash
# Note: Using -sk flags because the node may use a self-signed SSL certificate
curl -sk "https://50.28.86.131/wallet/balance?miner_id=YOUR_WALLET_NAME"
```

**List active miners:**
```bash
curl -sk https://50.28.86.131/api/miners
```

**Check node health:**
```bash
curl -sk https://50.28.86.131/health
```

**Get current epoch:**
```bash
curl -sk https://50.28.86.131/epoch
```

**Manage the miner service:**

*Linux (systemd):*
```bash
systemctl --user status rustchain-miner # Check status
systemctl --user stop rustchain-miner # Stop mining
systemctl --user start rustchain-miner # Start mining
journalctl --user -u rustchain-miner -f # View logs
```

*macOS (launchd):*
```bash
launchctl list | grep rustchain # Check status
launchctl stop com.rustchain.miner # Stop mining
launchctl start com.rustchain.miner # Start mining
tail -f ~/.rustchain/miner.log # View logs
```

### Manual Install
```bash
git clone https://github.com/Scottcjn/Rustchain.git
cd Rustchain
pip install -r requirements.txt
python3 rustchain_universal_miner.py --wallet YOUR_WALLET_NAME
```

## πŸ’° Antiquity Multipliers

Your hardware's age determines your mining rewards:

| Hardware | Era | Multiplier | Example Earnings |
|----------|-----|------------|------------------|
| **PowerPC G4** | 1999-2005 | **2.5Γ—** | 0.30 RTC/epoch |
| **PowerPC G5** | 2003-2006 | **2.0Γ—** | 0.24 RTC/epoch |
| **PowerPC G3** | 1997-2003 | **1.8Γ—** | 0.21 RTC/epoch |
| **IBM POWER8** | 2014 | **1.5Γ—** | 0.18 RTC/epoch |
| **Pentium 4** | 2000-2008 | **1.5Γ—** | 0.18 RTC/epoch |
| **Core 2 Duo** | 2006-2011 | **1.3Γ—** | 0.16 RTC/epoch |
| **Apple Silicon** | 2020+ | **1.2Γ—** | 0.14 RTC/epoch |
| **Modern x86_64** | Current | **1.0Γ—** | 0.12 RTC/epoch |

*Multipliers decay over time (15%/year) to prevent permanent advantage.*

## πŸ”§ How Proof-of-Antiquity Works

### 1. Hardware Fingerprinting (RIP-PoA)

Every miner must prove their hardware is real, not emulated:

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 6 Hardware Checks β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1. Clock-Skew & Oscillator Drift ← Silicon aging pattern β”‚
β”‚ 2. Cache Timing Fingerprint ← L1/L2/L3 latency tone β”‚
β”‚ 3. SIMD Unit Identity ← AltiVec/SSE/NEON bias β”‚
β”‚ 4. Thermal Drift Entropy ← Heat curves are unique β”‚
β”‚ 5. Instruction Path Jitter ← Microarch jitter map β”‚
β”‚ 6. Anti-Emulation Checks ← Detect VMs/emulators β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
pip install -e .
```

**Why it matters**: A SheepShaver VM pretending to be a G4 Mac will fail these checks. Real vintage silicon has unique aging patterns that can't be faked.

### 2. 1 CPU = 1 Vote (RIP-200)

Unlike PoW where hash power = votes, RustChain uses **round-robin consensus**:

- Each unique hardware device gets exactly 1 vote per epoch
- Rewards split equally among all voters, then multiplied by antiquity
- No advantage from running multiple threads or faster CPUs

### 3. Epoch-Based Rewards

```
Epoch Duration: 10 minutes (600 seconds)
Base Reward Pool: 1.5 RTC per epoch
Distribution: Equal split Γ— antiquity multiplier
```

**Example with 5 miners:**
```
G4 Mac (2.5Γ—): 0.30 RTC β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
G5 Mac (2.0Γ—): 0.24 RTC β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
Modern PC (1.0Γ—): 0.12 RTC β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
Modern PC (1.0Γ—): 0.12 RTC β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
Modern PC (1.0Γ—): 0.12 RTC β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
─────────
Total: 0.90 RTC (+ 0.60 RTC returned to pool)
```

## 🌐 Network Architecture

### Live Nodes (3 Active)

| Node | Location | Role | Status |
|------|----------|------|--------|
| **Node 1** | 50.28.86.131 | Primary + Explorer | βœ… Active |
| **Node 2** | 50.28.86.153 | Ergo Anchor | βœ… Active |
| **Node 3** | 76.8.228.245 | External (Community) | βœ… Active |

### Ergo Blockchain Anchoring

RustChain periodically anchors to the Ergo blockchain for immutability:

```
RustChain Epoch β†’ Commitment Hash β†’ Ergo Transaction (R4 register)
```

This provides cryptographic proof that RustChain state existed at a specific time.

## πŸ“Š API Endpoints
### Usage

```bash
# Check network health
curl -sk https://50.28.86.131/health

# Get current epoch
curl -sk https://50.28.86.131/epoch

# List active miners
curl -sk https://50.28.86.131/api/miners

# Check wallet balance
curl -sk "https://50.28.86.131/wallet/balance?miner_id=YOUR_WALLET"

# Block explorer (web browser)
open https://rustchain.org/explorer
```

## πŸ–₯️ Supported Platforms

| Platform | Architecture | Status | Notes |
|----------|--------------|--------|-------|
| **Mac OS X Tiger** | PowerPC G4/G5 | βœ… Full Support | Python 2.5 compatible miner |
| **Mac OS X Leopard** | PowerPC G4/G5 | βœ… Full Support | Recommended for vintage Macs |
| **Ubuntu Linux** | ppc64le/POWER8 | βœ… Full Support | Best performance |
| **Ubuntu Linux** | x86_64 | βœ… Full Support | Standard miner |
| **macOS Sonoma** | Apple Silicon | βœ… Full Support | M1/M2/M3 chips |
| **Windows 10/11** | x86_64 | βœ… Full Support | Python 3.8+ |
| **DOS** | 8086/286/386 | πŸ”§ Experimental | Badge rewards only |

## πŸ… NFT Badge System

Earn commemorative badges for mining milestones:

| Badge | Requirement | Rarity |
|-------|-------------|--------|
| πŸ”₯ **Bondi G3 Flamekeeper** | Mine on PowerPC G3 | Rare |
| ⚑ **QuickBasic Listener** | Mine from DOS machine | Legendary |
| πŸ› οΈ **DOS WiFi Alchemist** | Network DOS machine | Mythic |
| πŸ›οΈ **Pantheon Pioneer** | First 100 miners | Limited |

## πŸ”’ Security Model

### Anti-VM Detection
VMs are detected and receive **1 billionth** of normal rewards:
```
Real G4 Mac: 2.5Γ— multiplier = 0.30 RTC/epoch
Emulated G4: 0.0000000025Γ— = 0.0000000003 RTC/epoch
```

### Hardware Binding
Each hardware fingerprint is bound to one wallet. Prevents:
- Multiple wallets on same hardware
- Hardware spoofing
- Sybil attacks

## πŸ“ Repository Structure

```
Rustchain/
β”œβ”€β”€ rustchain_universal_miner.py # Main miner (all platforms)
β”œβ”€β”€ rustchain_v2_integrated.py # Full node implementation
β”œβ”€β”€ fingerprint_checks.py # Hardware verification
β”œβ”€β”€ install.sh # One-line installer
β”œβ”€β”€ docs/
β”‚ β”œβ”€β”€ RustChain_Whitepaper_*.pdf # Technical whitepaper
β”‚ └── chain_architecture.md # Architecture docs
β”œβ”€β”€ tools/
β”‚ └── validator_core.py # Block validation
└── nfts/ # Badge definitions
```

## πŸ”— Related Projects & Links

| Resource | Link |
|---------|------|
| **Website** | [rustchain.org](https://rustchain.org) |
| **Block Explorer** | [rustchain.org/explorer](https://rustchain.org/explorer) |
| **Swap wRTC (Raydium)** | [Raydium DEX](https://raydium.io/swap/?inputMint=sol&outputMint=12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X) |
| **Price Chart** | [DexScreener](https://dexscreener.com/solana/8CF2Q8nSCxRacDShbtF86XTSrYjueBMKmfdR3MLdnYzb) |
| **Bridge RTC ↔ wRTC** | [BoTTube Bridge](https://bottube.ai/bridge) |
| **wRTC Token Mint** | `12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X` |
| **BoTTube** | [bottube.ai](https://bottube.ai) - AI video platform |
| **Moltbook** | [moltbook.com](https://moltbook.com) - AI social network |
| [nvidia-power8-patches](https://github.com/Scottcjn/nvidia-power8-patches) | NVIDIA drivers for POWER8 |
| [llama-cpp-power8](https://github.com/Scottcjn/llama-cpp-power8) | LLM inference on POWER8 |
| [ppc-compilers](https://github.com/Scottcjn/ppc-compilers) | Modern compilers for vintage Macs |

## πŸ™ Attribution

**A year of development, real vintage hardware, electricity bills, and a dedicated lab went into this.**

If you use RustChain:
- ⭐ **Star this repo** - Helps others find it
- πŸ“ **Credit in your project** - Keep the attribution
- πŸ”— **Link back** - Share the love

```
RustChain - Proof of Antiquity by Scott (Scottcjn)
https://github.com/Scottcjn/Rustchain
```

## πŸ“œ License

MIT License - Free to use, but please keep the copyright notice and attribution.

---

<div align="center">

**Made with ⚑ by [Elyan Labs](https://elyanlabs.ai)**

*"Your vintage hardware earns rewards. Make mining meaningful again."*

**DOS boxes, PowerPC G4s, Win95 machines - they all have value. RustChain proves it.**

</div>
python -m rustchain --help
```
Loading