Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/PROTOCOL_v1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# RustChain Protocol Specification v1.1 (RIP-200)

## 1. Overview
**RustChain** is a Proof-of-Antiquity blockchain designed to validate and reward real vintage hardware. Unlike traditional Proof-of-Work, RustChain does not use hash-based mining. Instead, it utilizes **RIP-200 (RustChain Iterative Protocol)**, a Proof-of-Attestation consensus mechanism where miners prove they are running on specific physical hardware (e.g., PowerPC G4, G5, SPARC) to earn **RTC** tokens.

Despite the name, the reference implementation is written in **Python** (Flask + SQLite), chosen for its ubiquity on vintage *nix platforms.

## 2. Consensus: RIP-200 (Proof-of-Attestation)
RIP-200 replaces hash power with hardware identity. The core principle is **1 CPU = 1 Vote**, weighted by the antiquity of the hardware.

### 2.1 The Attestation Cycle
The network operates in **Epochs** (approx. 24 hours).
1. **Fingerprinting**: A miner runs a client script that performs 6 hardware-level checks (see §3).
2. **Submission**: The miner submits this fingerprint + a signed payload to an Attestation Node (`POST /attest/submit`).
3. **Validation**: The node validates the signals against known hardware profiles (e.g., ensuring a G4 has the correct cache timing).
4. **Enrollment**: Valid miners are enrolled in the current Epoch.
5. **Settlement**: At the end of an Epoch, the "Epoch Pot" (1.5 RTC) is distributed among enrolled miners based on their weight.

## 3. Hardware Fingerprinting
To prevent emulation (VMs) and spoofing, RustChain employs 6 distinct hardware checks. All must pass for a valid attestation.

| Check | Description | Anti-Emulation Vector |
|-------|-------------|-----------------------|
| **1. Clock-Skew & Drift** | Measures microscopic crystal oscillator imperfections. | VMs use host clock (too perfect/uniform). |
| **2. Cache Timing** | Profiles L1/L2 cache latency curves. | Emulators often flatten cache hierarchy latency. |
| **3. SIMD Identity** | Tests AltiVec/SSE/NEON pipeline biases. | Emulated instructions have different timing profiles. |
| **4. Thermal Entropy** | Measures CPU temp changes under load. | VMs report static or host-passed temps. |
| **5. Instruction Jitter** | Measures execution time variance of specific opcodes. | Real silicon has nanosecond-scale jitter; VMs are cleaner. |
| **6. Behavioral Heuristics** | Checks for hypervisor signatures (MAC OUI, CPUID). | Detects known VM providers (VMware, QEMU). |

## 4. Token Economics (RTC)
* **Token Symbol**: RTC
* **Total Supply**: 8,000,000 RTC (Capped)
* **Premine**: 75,000 RTC (Dev fund/Bounties)
* **Epoch Pot**: 1.5 RTC distributed every ~24 hours.

### 4.1 Antiquity Multipliers
Older hardware is weighted heavier to incentivize preservation.

| Architecture | Multiplier | Example Hardware |
|--------------|------------|------------------|
| **PowerPC G4** | **2.5x** | PowerBook G4, iMac G4 |
| **PowerPC G5** | **2.0x** | PowerMac G5, iMac G5 |
| **PowerPC G3** | **1.8x** | iMac G3, iBook G3 |
| **Retro x86** | **1.4x** | Pentium III/4 (Pre-SSE3) |
| **Apple Silicon**| **1.2x** | M1/M2/M3 (ARM64) |
| **Modern x86** | **1.0x** | Intel Core / AMD Ryzen |
| **Generic ARM**| **0.0001x**| Raspberry Pi / VMs |

## 5. Network Architecture
### 5.1 Nodes
The network relies on trusted **Attestation Nodes** to validate fingerprints.
* **Primary Node**: `https://50.28.86.131`
* **Ergo Anchor Node**: `https://50.28.86.153`

### 5.2 Ergo Anchoring
RustChain anchors its state to the **Ergo** layer-1 blockchain for immutability.
* Every epoch settlement hash is written to an Ergo box register (R4-R9).
* This provides an external, tamper-proof timestamp and existence proof for the RustChain ledger.

## 6. API Reference
### Public Endpoints
* `GET /health`: Node status and version.
* `GET /api/miners`: List of currently active/enrolled miners.
* `GET /epoch`: Details on the current epoch (pot size, enrolled count).
* `GET /wallet/balance?miner_id=<id>`: Check RTC balance.
* `POST /wallet/transfer/signed`: Submit a signed Ed25519 transaction to move RTC.

---
*Generated by Shadow Protocol Auditor (EchoDrifter).*