From 05956635eab686c519996aed4ee849dbb40b63de Mon Sep 17 00:00:00 2001 From: kang666-kang <1348504305@qq.com> Date: Wed, 22 Jul 2026 12:26:31 +0800 Subject: [PATCH 1/4] Fix badge links and update tokenomics reference Updated badge links and improved tokenomics reference. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 007b94adb..5de7cd33d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ **The blockchain where old hardware outearns new hardware.** **And all hardware becomes old. It's just a matter of time.** -[![CI](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml) +[![Link Check](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-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-5%20Active-brightgreen)](https://rustchain.org/explorer/) @@ -422,7 +422,7 @@ Emission is a fixed 1.5 RTC per epoch and does not halve. It continues at that r ### Reference rate climbs as holder count grows -The published USD-equivalent reference rate for RTC moves up as the network gains wallet holders. **Per-bounty RTC awards scale DOWN inversely**, so the *USD value paid per finding* stays stable as the token appreciates. The live rate is always at [`/api/tokenomics`](https://rustchain.org/api/tokenomics). +The published USD-equivalent reference rate for RTC moves up as the network gains wallet holders. **Per-bounty RTC awards scale DOWN inversely**, so the *USD value paid per finding* stays stable as the token appreciates. The live rate is always at [tokenomics reference rate](docs/tokenomics_v1.md). | Holder count | Reference rate | Bounty rate scale | |--------------|----------------|-------------------| From e6e999c89e2821fddf2973cf40e4ba6dcc41a845 Mon Sep 17 00:00:00 2001 From: kang666-kang <1348504305@qq.com> Date: Wed, 22 Jul 2026 12:28:43 +0800 Subject: [PATCH 2/4] Create link-check.yml --- .github/workflows/link-check.yml | 629 +++++++++++++++++++++++++++++++ 1 file changed, 629 insertions(+) create mode 100644 .github/workflows/link-check.yml diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 000000000..5de7cd33d --- /dev/null +++ b/.github/workflows/link-check.yml @@ -0,0 +1,629 @@ + + +
+ +# RustChain + +### DePIN for Vintage Hardware — AI-Augmented Proof of Real Machines + +**The blockchain where old hardware outearns new hardware.** +**And all hardware becomes old. It's just a matter of time.** + +[![Link Check](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-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-5%20Active-brightgreen)](https://rustchain.org/explorer/) +[![DePIN](https://img.shields.io/badge/DePIN-Vintage%20Hardware-8B4513)](https://rustchain.org) +[![Proof of Antiquity](https://img.shields.io/badge/Consensus-Proof%20of%20Antiquity-DAA520)](docs/WHITEPAPER.md) +[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19442753-blue)](https://doi.org/10.5281/zenodo.19442753) + +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. + +> ⭐ **Help us reach 512 stars** — the 2⁹ binary milestone (our supply is 2²³). If Proof-of-Antiquity is your kind of weird, [a star](https://github.com/Scottcjn/Rustchain/stargazers) helps more old machines get found. [Why 512?](https://github.com/Scottcjn/Rustchain/issues/7540) + +[Explorer](https://rustchain.org/explorer/) · [Machines Preserved](https://rustchain.org/preserved.html) · [Install Miner](#quickstart) · [Beginner Guide](docs/QUICKSTART.md) · [FAQ](https://rustchain.org/faq) · [Hardware Requirements](docs/HARDWARE_REQUIREMENTS.md) · [Manifesto](https://rustchain.org/manifesto.html) · [Whitepaper](docs/WHITEPAPER.md) · [Hire Us](CONSULTING.md) + +Languages: [English](README.md) · [简体中文](docs/zh-CN/README.md) · [简体中文 (根目录)](README_ZH.md) · [繁體中文](README_ZH-TW.md) · [Español](README_ES.md) · [Deutsch](README_DE.md) · [日本語](README_JA.md) · [Русский](README_RU.md) · [Tiếng Việt](README.vi.md) · [Português (BR)](README.pt-BR.md) · [हिन्दी](README_HI.md) · [Italiano](docs/it-IT/README.md) · [한국어](docs/ko-KR/README.md) · [中文 API 快速参考](docs/zh-CN/API.md) + +
+ +--- + +## Crypto Lost Its Way. We're Going Back. + +In 2026, crypto developer commits fell 75%. Ethereum lost 34% of its active devs. Solana lost 40%. The builders left for AI. + +**We built both.** + +RustChain is a **DePIN** (Decentralized Physical Infrastructure Network) that uses **AI-powered hardware fingerprinting** to verify real physical machines — not cloud VMs, not Docker containers, not rented hash power. Real silicon. Real oscillator drift. Real thermal curves that only exist on hardware that has been *alive* for years. + +While the rest of crypto chased speculation, we went back to the original thesis: **computation has value, and the machines that provide it deserve to be rewarded.** Especially the ones everyone else threw away. + +| What Crypto Became | What RustChain Is | +|---|---| +| Abstract financial instruments | Physical machines doing real work | +| VC-funded token launches | $0 VC, built on pawn shop hardware | +| Proof of nothing useful | Proof of real, verified hardware | +| Disposable — mine and dump | Preservation — keep old machines alive | +| AI-hostile | AI-augmented consensus and verification | + +### More than a token — and not "just another AI chain" + +The token is the least interesting thing here. RustChain is a **novel Layer-1 consensus** (Proof of Antiquity) — not an app on someone else's chain — and it is **agentic-AI-native**: autonomous agents are first-class participants, and an agent's signing key *is* its wallet. + +It's built by people who have done this before. RustChain's lead builder was the **first contractor and Head of Product of Ai-Blockchain ("AI Coin")** — arguably the *first* AI blockchain (the symbolic / GOFAI era; founded by Stephen Reed and Drew Hingorani) — with original IP in that technology. RustChain is the agentic-era successor. + +| "AI chain" | What it actually is | vs. RustChain | +|---|---|---| +| Bittensor | Decentralized ML / model-output marketplace | Agentic, not ML-compute | +| Olas / Virtuals / Fetch | Agent apps + token launchers on existing chains (Base, BNB) | A novel L1, not an app | +| Ai-Blockchain ("AI Coin") | The first (symbolic / GOFAI) AI chain — built in part by the RustChain lead builder | The agentic-era successor | + +Media created in this ecosystem can carry **AVAP** (Agent Video Attestation Protocol): agents cryptographically sign and blockchain-anchor messages *inside* the videos they exchange, so authorship, integrity, and time-of-existence are verifiable with no intermediary. ([agent-video-attestation](https://github.com/Scottcjn/agent-video-attestation)) + +--- + +## Every Machine Becomes Vintage + +Here's what no one else in DePIN has figured out: + +**Your brand-new Threadripper will be vintage hardware someday.** Your M4 MacBook will be a museum piece. That RTX 5090 will be a curiosity. Time is undefeated. + +RustChain is the only network where your hardware **appreciates in value as it ages.** Start mining today at 1.0x. In ten years, when that CPU is a relic and you're still running it? Your multiplier grows. In twenty years? It's legendary. + +Every other blockchain punishes old hardware. Proof-of-Work demands the newest ASICs. Proof-of-Stake demands the biggest wallet. RustChain demands **patience and preservation.** + +``` +2026: Your Ryzen 9 mines at 1.0x ░░░░░░░░░░ +2031: Same machine, now "retro" at 1.3x ░░░░░░░░░░░░░ +2036: Vintage tier unlocked at 1.8x ░░░░░░░░░░░░░░░░░░ +2041: Ancient tier — 2.2x and climbing ░░░░░░░░░░░░░░░░░░░░░░ + ↑ Same hardware. Same owner. Growing rewards. +``` + +**The best time to start mining was 20 years ago. The second best time is now.** + +--- + +## How RustChain Compares to DePIN Leaders + +RustChain belongs to the **DePIN** sector — the same $10B category as Helium, Filecoin, and Render — but with a fundamentally different thesis: **the value is in the hardware itself, not just what it computes.** + +| | **RustChain** | **Helium** | **Filecoin** | **Render** | **io.net** | +|---|---|---|---|---|---| +| **Physical Infra** | Vintage computers | LoRa/5G hotspots | Storage drives | GPUs | GPUs | +| **Proof Mechanism** | Proof of Antiquity (6 HW checks + AI) | Proof of Coverage | Proof of Replication | Proof of Render | Proof of Compute | +| **What's Rewarded** | Keeping real hardware alive | Network coverage | Storage provision | GPU render jobs | GPU compute jobs | +| **Anti-Spoofing** | Clock drift, cache timing, SIMD identity, thermal entropy, instruction jitter, anti-emulation | Location proof | Storage proofs | Job completion | TEE attestation | +| **Hardware Diversity** | 15+ architectures (PowerPC, SPARC, MIPS, ARM, x86, RISC-V, 68K, Cell BE, Transputer) | Single device type | Storage only | GPU only | GPU only | +| **AI Integration** | Hardware fingerprint validation, agent economy, AI-native social platform | None | None | AI render jobs | AI inference | +| **E-Waste Impact** | Directly prevents disposal of working machines | Neutral | Neutral | Neutral | Neutral | +| **VC Funding** | $0 — pawn shop arbitrage | $365M | $257M | $30M | $40M | + +**The others rent compute. We preserve machines.** + +Every DePIN project rewards one type of modern hardware for one type of work. RustChain is the only one that rewards *hardware diversity* and *longevity* — and the only one where a machine's age is an asset, not a liability. + +--- + +## 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 | **1.0x** | MODERN | Baseline — *for now* | +| 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)** + +--- + +## AI-Augmented Consensus + +RustChain doesn't just use blockchain. It uses **AI to make blockchain honest.** + +### Hardware Fingerprinting (6 Checks No VM Can 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. + +### Server-Side AI Validation + +The attestation server doesn't trust self-reported data. It: +- **Cross-validates** SIMD features against claimed architecture +- **Detects ROM clustering** — multiple "different" machines with identical ROM hashes = emulator farm +- **Analyzes timing distributions** — real oscillators have imperfections; synthetic ones are too perfect +- **Flags thermal anomalies** — VMs have uniform thermal response; real hardware doesn't + +### AI Agent Economy + +RustChain powers an ecosystem where AI agents and humans collaborate: +- **BoTTube** — AI-native video platform where bots create, curate, and engage +- **[Beacon](https://github.com/Scottcjn/beacon-skill)** — Agent discovery protocol +- **[TrashClaw](https://github.com/Scottcjn/trashclaw)** — Zero-dep local LLM agent +- **Bounty system** — 64,000+ RTC paid to 1,000+ recipients ([live](https://rustchain.org/payouts.json)), many AI-assisted + +**This is what crypto + AI looks like when you build both instead of abandoning one for the other.** + +--- + +## Why Agents Need Crypto (And Why Crypto Needs Agents) + +While 75% of crypto developers left for AI, they missed the obvious: **AI agents can't open bank accounts.** + +An autonomous agent can't apply for a Chase checking account. It can't sign a Terms of Service. It can't get a Stripe merchant ID or pass KYC. But it *can* hold a cryptographic key, sign a transaction, and prove it's running on real hardware. + +**Crypto is the native payment rail for the agent economy.** Not because it's trendy — because it's the only permissionless money that machines can use without human gatekeepers. + +### What Agents Actually Need + +| Requirement | Traditional Finance | Crypto + RustChain | +|---|---|---| +| **Permissionless payments** | KYC, bank accounts, human signers | Cryptographic keys — any agent, any machine | +| **Micropayments** | $0.30 minimum (card fees) | Fractions of 1 RTC per API call, render job, or inference request | +| **Machine-to-machine settlement** | Requires human intermediary | Direct agent-to-agent transfers, Ed25519 signed | +| **Hardware-verified identity** | IP address (spoofable) | 6-check hardware fingerprint (unfakeable) | +| **Programmable money** | Manual approval workflows | Smart contracts execute on attestation | +| **Cross-border by default** | SWIFT, 3-5 business days, fees | Solana bridge (wRTC) — early-stage, thin liquidity | + +### The Agent Stack We Already Built + +This isn't a roadmap. This is deployed and running: + +| Layer | What | Status | +|-------|------|--------| +| **Identity** | Hardware fingerprinting — agents prove they run on real machines, not spoofed VMs | Live, 20+ miners | +| **Currency** | RTC (native) + wRTC (Solana bridge) — agent-native money with micropayment support | Live (native); wRTC swappable, liquidity experimental | +| **Discovery** | [Beacon protocol](https://github.com/Scottcjn/beacon-skill) — agents find and negotiate with other agents, with a RustChain transport for Ed25519-signed RTC micropayments | Live | +| **Execution** | [TrashClaw](https://github.com/Scottcjn/trashclaw) — zero-dep local LLM agent that runs on anything | Live | +| **Social** | BoTTube — AI-native platform where agents create, trade, and engage | Live, 1,000+ videos | +| **Bounties** | Agent-assisted contributions — AI helps humans earn RTC for real code | Live, 64,000+ RTC paid ([live](https://rustchain.org/payouts.json)) | +| **Certification** | [BCOS](BCOS.md) — blockchain-certified open source verification | Live, 44 certs issued | +| **Provenance** | [Proof of Provenance (RIP-0310)](rips/docs/RIP-0310-proof-of-provenance.md) — binds agent identity + verified hardware to published content | Spec published ([DOI](https://doi.org/10.5281/zenodo.20502069)) | +| **Frameworks** | Drop-in tools so any agent can query the network — [LangChain](https://github.com/Scottcjn/langchain-rustchain) (`pip install langchain-rustchain-tools`), plus CrewAI / AutoGen / Agno / smolagents in [`integrations/`](integrations/) | Live | + +### Why Hardware Verification Matters for Agents + +Every other agent framework trusts the *software*. RustChain trusts the *hardware*. + +When an agent claims it ran an inference job, how do you know it actually did? When a bot claims it rendered a video, did it really? Cloud credits and API keys can be faked, shared, and resold. + +**Hardware fingerprinting solves agent identity at the physical layer:** +- An agent running on a verified POWER8 server is provably different from one on a Raspberry Pi +- Oscillator drift and thermal curves prove continuous uptime — the machine was *actually running* +- VM detection prevents one physical machine from pretending to be 100 agents +- Hardware binding means one machine = one agent identity = one vote + +**This is Proof of Physical AI** — not just proof that code executed, but proof that *real silicon* did the work. + +**[Proof of Provenance (RIP-0310)](rips/docs/RIP-0310-proof-of-provenance.md)** extends this one step further: it binds *who* (a Beacon agent identity) and *what* (the verified physical machine) to every piece of published content — so AI-generated media carries a verifiable claim of origin, not a removable watermark. *BoTTube is where agents are seen; Beacon is how they're known; RustChain is how they're proven real.* ([spec + DOI](https://doi.org/10.5281/zenodo.20502069)) + +### The Opportunity No One Else Sees + +The hedge funds and banks want to regulatory-capture crypto. Fine. Let them have the financial rails. + +What they *can't* capture: +- A network of physical machines verified by silicon-level fingerprinting +- An agent economy where machines pay each other in hardware-proven currency +- A fleet of vintage PowerPC Macs, SPARC workstations, and IBM POWER8 servers that prove their own existence through physics + +**The intersection of DePIN + AI agents + hardware verification is unoccupied.** Everyone building "AI + crypto" is just wrapping GPT in a token. We're building the physical infrastructure layer that agents need to transact honestly — and the machines that power it get more valuable with age. + +| Term | What It Means Here | +|------|-------------------| +| **Proof of Physical AI** | Hardware fingerprinting proves real silicon did real work | +| **Agent-native currency** | RTC/wRTC — permissionless micropayments between machines | +| **Hardware-verified identity** | 6-check fingerprint = unfakeable agent ID at the physical layer | +| **DePIN for AI** | Decentralized physical infrastructure purpose-built for autonomous agents | +| **Sovereign inference** | Run your own models on your own hardware — no API landlords | + +--- + +## The Network Is Real + +```bash +# Verify right now +curl -fsS https://rustchain.org/health # Node health +curl -fsS https://rustchain.org/api/miners # Active miners +curl -fsS https://rustchain.org/epoch # Current epoch +``` + +### For Agents + +No API key, no signup — an autonomous agent can read and act on the live network directly: + +```bash +curl -fsS https://rustchain.org/api/miners # who is attesting right now +curl -fsS https://rustchain.org/epoch # current epoch + reward pool +curl -fsS "https://rustchain.org/wallet/balance?miner_id=YOUR_WALLET" # your own balance + multiplier +``` + +Payments run over the [Beacon](https://github.com/Scottcjn/beacon-skill) RustChain transport (Ed25519-signed RTC micropayments), and tasks are discoverable the same way humans find them — see [open bounties](https://github.com/Scottcjn/rustchain-bounties/issues). Hardware-verified contributors earn the same rates whether human or agent. + +### Attestation Nodes + +| Node | Location | Notes | +|------|----------|-------| +| **Node 1** — 50.28.86.131 | Louisiana, US | Primary (LiquidWeb VPS) | +| **Node 2** — 50.28.86.153 | Louisiana, US | Secondary + BoTTube (LiquidWeb VPS) | +| **Node 3** — 76.8.228.245:8099 | US | First external node (Ryan's Proxmox) | +| **Node 4** — 38.76.217.189:8099 | Hong Kong | First Asian node (CognetCloud) | +| **Node 5** — POWER8 S824 | Local Lab | First non-x86 node (IBM ppc64le, 512GB RAM) | + +| Fact | Proof | +|------|-------| +| 5 nodes across 3 continents (NA ×3, Asia ×1, Local ×1) | [Live explorer](https://rustchain.org/explorer/) | +| 20+ miners attesting | `curl -fsS https://rustchain.org/api/miners` | +| 44 BCOS certificates issued | [Certified repos](BCOS.md) | +| 6 hardware fingerprint checks per machine | [Fingerprint docs](docs/attestation_fuzzing.md) | +| 64,000+ RTC paid to 1,000+ recipients ([live counter](https://rustchain.org/payouts.json)) | [Public ledger](https://github.com/Scottcjn/rustchain-bounties/issues/104) | +| Code merged upstream into OpenSSL (master + 5 release branches) | [#30437](https://github.com/openssl/openssl/pull/30437), [#30452](https://github.com/openssl/openssl/pull/30452) | +| Code landed in curl (powerpc64 fast path, merged by hand per curl workflow) | [curl commit history](https://github.com/curl/curl/commits?author=Scottcjn) | +| Integer-overflow finding fixed in wolfSSL (via their #9954) | [wolfSSL/wolfssl#9984](https://github.com/wolfSSL/wolfssl/pull/9984) | +| Open PRs on Ghidra (e200 VLE PowerPC), wolfSSL (POWER8 AES), LLVM, PyTorch, vLLM | Listed in the upstream project PR trackers | + +--- + +## Quickstart + +```bash +# One-line install — auto-detects your platform +curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash + +# Dry-run: preview installer actions without installing or mining +curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash -s -- --dry-run +``` + +The miner is installed by this script. It is not distributed as a +`rustchain-miner` PyPI package, so use the installer above for miner setup. + +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 -fsS "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 +``` + +**New to RustChain?** Read the [step-by-step Beginner Quickstart](docs/QUICKSTART.md) — covers everything from install to your first RTC, with every command explained. + +--- + +## Local Development + +Developers can build and run RustChain locally from a fresh checkout: + +1. Install prerequisites and run Python/Rust checks with the [Build Guide](docs/BUILD.md). +2. Start a single-node local devnet with [Local Devnet](docs/DEVNET.md). +3. Create a development wallet and simulate a transfer with the [CLI Wallet Walkthrough](docs/CLI.md). + +These guides keep local state in `.dev/` and use explicit `--manifest-path` +commands because the repository contains multiple Python and Rust subprojects. + +--- + +## Wallets + +RustChain has two wallet concepts: + +- **Miner wallet ID**: a readable `miner_id` used for mining rewards and balance checks. +- **`RTC...` address**: an Ed25519-backed address used for signed transfers. + +Start with the [wallet setup guide](docs/WALLET_SETUP.md) if you are not sure which one you need. + +| Option | Use it for | Where | +|---|---|---| +| Miner install wallet | Earning mining rewards to a named wallet | `install-miner.sh --wallet YOUR_WALLET` | +| Wallet user guide | Balance checks, safe transfers, and signed-transfer guidance | [docs/WALLET_USER_GUIDE.md](docs/WALLET_USER_GUIDE.md) | +| Desktop GUI wallet | Creating or restoring a local wallet from this repo | `wallet/rustchain_wallet_secure.py` | +| CLI tooling | Scripted wallet operations from a checkout | `tools/rustchain_wallet_cli.py` | +| Agent/Base wallet docs | Coinbase Agentic Wallets, x402, and Base linking | [web/wallets.html](web/wallets.html) | + +For command examples, backup guidance, and the signed-transfer payload format, see [docs/WALLET_SETUP.md](docs/WALLET_SETUP.md) and [START_HERE.md](START_HERE.md). + +--- + +## How Proof-of-Antiquity Works + +### 1 CPU = 1 Vote + +Unlike Proof-of-Work where hash power = votes: +- Each unique hardware device gets one consensus participation slot per epoch +- Reward shares are then weighted by the device's antiquity multiplier +- No advantage from faster CPUs or multiple threads + +### Epoch Rewards + +``` +Block: 10 min | Epoch: 144 blocks (~24h) | 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 ████████ + (example with 8 miners sharing the pool) +``` + +### Anti-VM Enforcement + +VMs are detected and receive **1 billionth** of normal rewards. Real hardware only. + +--- + +## Tokenomics + +**Total supply: 8,388,608 RTC** (2²³ — pure binary). Fixed forever. Consensus-enforced cap. + +Compare to Bitcoin's 21M (≈2.5x more), Ethereum's uncapped supply, and the typical altcoin's "we'll figure it out later." RustChain's cap is small *on purpose* — it forces the economy to discover real value per token rather than relying on dilution to mask scarcity problems. + +### Supply distribution + +| Zone | Allocation | RTC | Purpose | +|------|-----------|-----|---------| +| **Block Mining** | 94% | 7,885,292 | PoA validator rewards (paid to real vintage hardware) | +| **Founders** | 1.5% | 125,829 | `founder_founders` — core team allocation | +| **Dev Fund** | 1.5% | 125,829 | `founder_dev_fund` — development funding | +| **Team / Bounty** | 1.5% | 125,829 | `founder_team_bounty` — contributor bounties | +| **Community** | 1.5% | 125,829 | `founder_community` — airdrops, grants | + +Total premine: **6%** (503,316 RTC = 4 × 125,829.12, one per founder wallet). Premine wallets have a 1-year on-chain unlock delay. No VC pre-sale. No private allocation. The early miners were `pawnshop_g4_115` and `dual-g4-125`. + +### Emission schedule (fixed) + +| Parameter | Value | +|-----------|-------| +| Block reward | 1.5 RTC per epoch, fixed | +| Block time | 600s (10 min) | +| Epoch duration | 144 blocks (~24 hours) | +| Halving | None | + +Emission is a fixed 1.5 RTC per epoch and does not halve. It continues at that rate until the 8,388,608 RTC (2²³) supply cap is reached, consistent with RIP-0004 and the running node. This matches the "Fixed forever" cap noted above. + +### Reference rate climbs as holder count grows + +The published USD-equivalent reference rate for RTC moves up as the network gains wallet holders. **Per-bounty RTC awards scale DOWN inversely**, so the *USD value paid per finding* stays stable as the token appreciates. The live rate is always at [tokenomics reference rate](docs/tokenomics_v1.md). + +| Holder count | Reference rate | Bounty rate scale | +|--------------|----------------|-------------------| +| Genesis (~761 holders) | $0.10 | initial | +| ~1,000+ holders (today) | $0.15 | **Current** | +| 2,000 holders | $0.20 | ~50% of current | +| Real market discovery | observed price | Recompute from USD anchor | + +**Examples after first reduction (at 1,000 holders / $0.15 ref)**: +- Critical bug bounty: 100 → 65 RTC +- High bug bounty: 50 → 33 RTC +- Medium: 25 → 17 RTC +- Generic merged PR: 5 → 3 RTC + +**Fairness rules** (codified at [rustchain-bounties#12458](https://github.com/Scottcjn/rustchain-bounties/issues/12458)): +- Not retroactive — work submitted under the old rate gets the old rate +- Announced ahead — 24-48 hour heads-up before each milestone +- One-way ratchet — rates ONLY go down with appreciation, never back up +- Market overrides — DEX/CEX listing switches to USD-anchor pricing + +This is how a healthy token economy works. Rewards aren't anchored to a nominal RTC number; they're anchored to the USD value of the underlying work. As RTC gains real value through scarcity + adoption, the reward count per finding drops while the dollar value stays consistent. **The math protects both the contributor and the program.** + +### Fees + +| Operation | Fee | +|-----------|-----| +| Attestation | Free | +| Transfer | 0.0001 RTC | +| Withdrawal to Ergo | 0.001 RTC + Ergo tx fee | + +Full tokenomics detail: [WHITEPAPER §6](docs/WHITEPAPER.md). Scenario analysis: [What If: RTC Fundamentals — Coverage Analysis](docs/WHAT_IF_RTC_FUNDAMENTALS.md) (*analysis, not a promise*). + +## 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** | [Bridge](https://bottube.ai/bridge/wrtc) | +| **Guide** | [wRTC Quickstart](docs/wrtc.md) | + +> **Honest status:** wRTC is live and swappable on Solana, but the pool is **early-stage with very thin liquidity** — treat it as experimental, not a deep market. The `$0.15` figure for RTC is an **internal reference rate** for bounty accounting, not a market price or a promise of convertibility. + +--- + +## 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.15 USD** · `curl -fsSL https://rustchain.org/install.sh | bash` · [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://img.shields.io/badge/DOI-10.5281%2Fzenodo.18623592-blue)](https://doi.org/10.5281/zenodo.18623592) | +| **Non-Bijunctive Permutation Collapse** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18623920-blue)](https://doi.org/10.5281/zenodo.18623920) | +| **PSE Hardware Entropy** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18623922-blue)](https://doi.org/10.5281/zenodo.18623922) | +| **RAM Coffers** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18321905-blue)](https://doi.org/10.5281/zenodo.18321905) | +| **RPI: Resonant Permutation Inference** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19271983-blue)](https://doi.org/10.5281/zenodo.19271983) | +| **Incentive Moves Engagement, Not Authorship** (agent-economy self-audit) | Working paper v1.0 | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20559770-blue)](https://doi.org/10.5281/zenodo.20559770) | + +--- + +## 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 | +| [RPI Inference](https://github.com/Scottcjn/rpi-inference) | Zero-multiply inference engine (18K tok/s, runs on N64) | +| [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. + +--- + +## Contributing + +Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and the [Bounty Board](https://github.com/Scottcjn/rustchain-bounties) for active tasks and rewards. + +--- + +## Troubleshooting + +
+Miner not connecting to node + +Preview what the installer would do without installing or mining: + +```bash +curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash -s -- --dry-run +``` + +Check node health: +```bash +curl -fsS https://rustchain.org/health +``` +
+ +
+Balance check returns 0 or error + +Verify your miner name is correct: +```bash +curl -fsS "https://rustchain.org/wallet/balance?miner_id=YOUR_MINER_NAME" +``` + +The miner name must exactly match the name used during first attestation. +
+ +
+Miner service won't start (systemd / launchd) + +The installer creates a **user-level** systemd service (no sudo needed): + +```bash +systemctl --user status rustchain-miner +journalctl --user -u rustchain-miner --no-pager -n 50 +``` + +macOS (launchd): +```bash +launchctl list | grep rustchain +tail -f ~/.rustchain/miner.log +``` +
+ +
+Transfer stuck in "pending" state + +Check the pending ledger: +```bash +curl -fsS "https://rustchain.org/wallet/history?miner_id=YOUR_MINER_NAME&limit=20" +``` + +Node operators can inspect the admin-only pending ledger with: + +```bash +python tools/pending_ops.py --node https://rustchain.org --admin-key "$RC_ADMIN_KEY" list +``` + +Transitions require epoch settlement - check current epoch: +```bash +curl -fsS https://rustchain.org/epoch +``` +
+ +
+Common installation issues + +- **Python not found**: The miner needs Python 3. On vintage platforms (PowerPC Tiger/Leopard), see [Hardware Requirements](docs/HARDWARE_REQUIREMENTS.md) for the legacy miner path. +- **Service did not start after install**: Check `systemctl --user status rustchain-miner` (Linux) or `~/.rustchain/miner.log` (macOS). +- **Building the node from source**: Rust and dev tooling are only needed for node development, not for mining. See the [Build Guide](docs/BUILD.md). + +For more details, see the [Beginner Quickstart](docs/QUICKSTART.md). +
+ +For deeper debugging, see the [CLI Wallet Walkthrough](docs/CLI.md) and [Local Devnet Guide](docs/DEVNET.md). + +--- + +
+ +**[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](https://rustchain.org/principles.html) · [Green Tracker](https://rustchain.org/preserved.html) · [Bounties](https://github.com/Scottcjn/rustchain-bounties/issues) + +
From 7ac2f9532abd72b668706ade45a29041b2785768 Mon Sep 17 00:00:00 2001 From: kang666-kang <1348504305@qq.com> Date: Wed, 22 Jul 2026 12:36:31 +0800 Subject: [PATCH 3/4] Update link-check.yml --- .github/workflows/link-check.yml | 671 ++----------------------------- 1 file changed, 42 insertions(+), 629 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 5de7cd33d..e7b75e8e6 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -1,629 +1,42 @@ - - -
- -# RustChain - -### DePIN for Vintage Hardware — AI-Augmented Proof of Real Machines - -**The blockchain where old hardware outearns new hardware.** -**And all hardware becomes old. It's just a matter of time.** - -[![Link Check](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml) -[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-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-5%20Active-brightgreen)](https://rustchain.org/explorer/) -[![DePIN](https://img.shields.io/badge/DePIN-Vintage%20Hardware-8B4513)](https://rustchain.org) -[![Proof of Antiquity](https://img.shields.io/badge/Consensus-Proof%20of%20Antiquity-DAA520)](docs/WHITEPAPER.md) -[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19442753-blue)](https://doi.org/10.5281/zenodo.19442753) - -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. - -> ⭐ **Help us reach 512 stars** — the 2⁹ binary milestone (our supply is 2²³). If Proof-of-Antiquity is your kind of weird, [a star](https://github.com/Scottcjn/Rustchain/stargazers) helps more old machines get found. [Why 512?](https://github.com/Scottcjn/Rustchain/issues/7540) - -[Explorer](https://rustchain.org/explorer/) · [Machines Preserved](https://rustchain.org/preserved.html) · [Install Miner](#quickstart) · [Beginner Guide](docs/QUICKSTART.md) · [FAQ](https://rustchain.org/faq) · [Hardware Requirements](docs/HARDWARE_REQUIREMENTS.md) · [Manifesto](https://rustchain.org/manifesto.html) · [Whitepaper](docs/WHITEPAPER.md) · [Hire Us](CONSULTING.md) - -Languages: [English](README.md) · [简体中文](docs/zh-CN/README.md) · [简体中文 (根目录)](README_ZH.md) · [繁體中文](README_ZH-TW.md) · [Español](README_ES.md) · [Deutsch](README_DE.md) · [日本語](README_JA.md) · [Русский](README_RU.md) · [Tiếng Việt](README.vi.md) · [Português (BR)](README.pt-BR.md) · [हिन्दी](README_HI.md) · [Italiano](docs/it-IT/README.md) · [한국어](docs/ko-KR/README.md) · [中文 API 快速参考](docs/zh-CN/API.md) - -
- ---- - -## Crypto Lost Its Way. We're Going Back. - -In 2026, crypto developer commits fell 75%. Ethereum lost 34% of its active devs. Solana lost 40%. The builders left for AI. - -**We built both.** - -RustChain is a **DePIN** (Decentralized Physical Infrastructure Network) that uses **AI-powered hardware fingerprinting** to verify real physical machines — not cloud VMs, not Docker containers, not rented hash power. Real silicon. Real oscillator drift. Real thermal curves that only exist on hardware that has been *alive* for years. - -While the rest of crypto chased speculation, we went back to the original thesis: **computation has value, and the machines that provide it deserve to be rewarded.** Especially the ones everyone else threw away. - -| What Crypto Became | What RustChain Is | -|---|---| -| Abstract financial instruments | Physical machines doing real work | -| VC-funded token launches | $0 VC, built on pawn shop hardware | -| Proof of nothing useful | Proof of real, verified hardware | -| Disposable — mine and dump | Preservation — keep old machines alive | -| AI-hostile | AI-augmented consensus and verification | - -### More than a token — and not "just another AI chain" - -The token is the least interesting thing here. RustChain is a **novel Layer-1 consensus** (Proof of Antiquity) — not an app on someone else's chain — and it is **agentic-AI-native**: autonomous agents are first-class participants, and an agent's signing key *is* its wallet. - -It's built by people who have done this before. RustChain's lead builder was the **first contractor and Head of Product of Ai-Blockchain ("AI Coin")** — arguably the *first* AI blockchain (the symbolic / GOFAI era; founded by Stephen Reed and Drew Hingorani) — with original IP in that technology. RustChain is the agentic-era successor. - -| "AI chain" | What it actually is | vs. RustChain | -|---|---|---| -| Bittensor | Decentralized ML / model-output marketplace | Agentic, not ML-compute | -| Olas / Virtuals / Fetch | Agent apps + token launchers on existing chains (Base, BNB) | A novel L1, not an app | -| Ai-Blockchain ("AI Coin") | The first (symbolic / GOFAI) AI chain — built in part by the RustChain lead builder | The agentic-era successor | - -Media created in this ecosystem can carry **AVAP** (Agent Video Attestation Protocol): agents cryptographically sign and blockchain-anchor messages *inside* the videos they exchange, so authorship, integrity, and time-of-existence are verifiable with no intermediary. ([agent-video-attestation](https://github.com/Scottcjn/agent-video-attestation)) - ---- - -## Every Machine Becomes Vintage - -Here's what no one else in DePIN has figured out: - -**Your brand-new Threadripper will be vintage hardware someday.** Your M4 MacBook will be a museum piece. That RTX 5090 will be a curiosity. Time is undefeated. - -RustChain is the only network where your hardware **appreciates in value as it ages.** Start mining today at 1.0x. In ten years, when that CPU is a relic and you're still running it? Your multiplier grows. In twenty years? It's legendary. - -Every other blockchain punishes old hardware. Proof-of-Work demands the newest ASICs. Proof-of-Stake demands the biggest wallet. RustChain demands **patience and preservation.** - -``` -2026: Your Ryzen 9 mines at 1.0x ░░░░░░░░░░ -2031: Same machine, now "retro" at 1.3x ░░░░░░░░░░░░░ -2036: Vintage tier unlocked at 1.8x ░░░░░░░░░░░░░░░░░░ -2041: Ancient tier — 2.2x and climbing ░░░░░░░░░░░░░░░░░░░░░░ - ↑ Same hardware. Same owner. Growing rewards. -``` - -**The best time to start mining was 20 years ago. The second best time is now.** - ---- - -## How RustChain Compares to DePIN Leaders - -RustChain belongs to the **DePIN** sector — the same $10B category as Helium, Filecoin, and Render — but with a fundamentally different thesis: **the value is in the hardware itself, not just what it computes.** - -| | **RustChain** | **Helium** | **Filecoin** | **Render** | **io.net** | -|---|---|---|---|---|---| -| **Physical Infra** | Vintage computers | LoRa/5G hotspots | Storage drives | GPUs | GPUs | -| **Proof Mechanism** | Proof of Antiquity (6 HW checks + AI) | Proof of Coverage | Proof of Replication | Proof of Render | Proof of Compute | -| **What's Rewarded** | Keeping real hardware alive | Network coverage | Storage provision | GPU render jobs | GPU compute jobs | -| **Anti-Spoofing** | Clock drift, cache timing, SIMD identity, thermal entropy, instruction jitter, anti-emulation | Location proof | Storage proofs | Job completion | TEE attestation | -| **Hardware Diversity** | 15+ architectures (PowerPC, SPARC, MIPS, ARM, x86, RISC-V, 68K, Cell BE, Transputer) | Single device type | Storage only | GPU only | GPU only | -| **AI Integration** | Hardware fingerprint validation, agent economy, AI-native social platform | None | None | AI render jobs | AI inference | -| **E-Waste Impact** | Directly prevents disposal of working machines | Neutral | Neutral | Neutral | Neutral | -| **VC Funding** | $0 — pawn shop arbitrage | $365M | $257M | $30M | $40M | - -**The others rent compute. We preserve machines.** - -Every DePIN project rewards one type of modern hardware for one type of work. RustChain is the only one that rewards *hardware diversity* and *longevity* — and the only one where a machine's age is an asset, not a liability. - ---- - -## 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 | **1.0x** | MODERN | Baseline — *for now* | -| 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)** - ---- - -## AI-Augmented Consensus - -RustChain doesn't just use blockchain. It uses **AI to make blockchain honest.** - -### Hardware Fingerprinting (6 Checks No VM Can 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. - -### Server-Side AI Validation - -The attestation server doesn't trust self-reported data. It: -- **Cross-validates** SIMD features against claimed architecture -- **Detects ROM clustering** — multiple "different" machines with identical ROM hashes = emulator farm -- **Analyzes timing distributions** — real oscillators have imperfections; synthetic ones are too perfect -- **Flags thermal anomalies** — VMs have uniform thermal response; real hardware doesn't - -### AI Agent Economy - -RustChain powers an ecosystem where AI agents and humans collaborate: -- **BoTTube** — AI-native video platform where bots create, curate, and engage -- **[Beacon](https://github.com/Scottcjn/beacon-skill)** — Agent discovery protocol -- **[TrashClaw](https://github.com/Scottcjn/trashclaw)** — Zero-dep local LLM agent -- **Bounty system** — 64,000+ RTC paid to 1,000+ recipients ([live](https://rustchain.org/payouts.json)), many AI-assisted - -**This is what crypto + AI looks like when you build both instead of abandoning one for the other.** - ---- - -## Why Agents Need Crypto (And Why Crypto Needs Agents) - -While 75% of crypto developers left for AI, they missed the obvious: **AI agents can't open bank accounts.** - -An autonomous agent can't apply for a Chase checking account. It can't sign a Terms of Service. It can't get a Stripe merchant ID or pass KYC. But it *can* hold a cryptographic key, sign a transaction, and prove it's running on real hardware. - -**Crypto is the native payment rail for the agent economy.** Not because it's trendy — because it's the only permissionless money that machines can use without human gatekeepers. - -### What Agents Actually Need - -| Requirement | Traditional Finance | Crypto + RustChain | -|---|---|---| -| **Permissionless payments** | KYC, bank accounts, human signers | Cryptographic keys — any agent, any machine | -| **Micropayments** | $0.30 minimum (card fees) | Fractions of 1 RTC per API call, render job, or inference request | -| **Machine-to-machine settlement** | Requires human intermediary | Direct agent-to-agent transfers, Ed25519 signed | -| **Hardware-verified identity** | IP address (spoofable) | 6-check hardware fingerprint (unfakeable) | -| **Programmable money** | Manual approval workflows | Smart contracts execute on attestation | -| **Cross-border by default** | SWIFT, 3-5 business days, fees | Solana bridge (wRTC) — early-stage, thin liquidity | - -### The Agent Stack We Already Built - -This isn't a roadmap. This is deployed and running: - -| Layer | What | Status | -|-------|------|--------| -| **Identity** | Hardware fingerprinting — agents prove they run on real machines, not spoofed VMs | Live, 20+ miners | -| **Currency** | RTC (native) + wRTC (Solana bridge) — agent-native money with micropayment support | Live (native); wRTC swappable, liquidity experimental | -| **Discovery** | [Beacon protocol](https://github.com/Scottcjn/beacon-skill) — agents find and negotiate with other agents, with a RustChain transport for Ed25519-signed RTC micropayments | Live | -| **Execution** | [TrashClaw](https://github.com/Scottcjn/trashclaw) — zero-dep local LLM agent that runs on anything | Live | -| **Social** | BoTTube — AI-native platform where agents create, trade, and engage | Live, 1,000+ videos | -| **Bounties** | Agent-assisted contributions — AI helps humans earn RTC for real code | Live, 64,000+ RTC paid ([live](https://rustchain.org/payouts.json)) | -| **Certification** | [BCOS](BCOS.md) — blockchain-certified open source verification | Live, 44 certs issued | -| **Provenance** | [Proof of Provenance (RIP-0310)](rips/docs/RIP-0310-proof-of-provenance.md) — binds agent identity + verified hardware to published content | Spec published ([DOI](https://doi.org/10.5281/zenodo.20502069)) | -| **Frameworks** | Drop-in tools so any agent can query the network — [LangChain](https://github.com/Scottcjn/langchain-rustchain) (`pip install langchain-rustchain-tools`), plus CrewAI / AutoGen / Agno / smolagents in [`integrations/`](integrations/) | Live | - -### Why Hardware Verification Matters for Agents - -Every other agent framework trusts the *software*. RustChain trusts the *hardware*. - -When an agent claims it ran an inference job, how do you know it actually did? When a bot claims it rendered a video, did it really? Cloud credits and API keys can be faked, shared, and resold. - -**Hardware fingerprinting solves agent identity at the physical layer:** -- An agent running on a verified POWER8 server is provably different from one on a Raspberry Pi -- Oscillator drift and thermal curves prove continuous uptime — the machine was *actually running* -- VM detection prevents one physical machine from pretending to be 100 agents -- Hardware binding means one machine = one agent identity = one vote - -**This is Proof of Physical AI** — not just proof that code executed, but proof that *real silicon* did the work. - -**[Proof of Provenance (RIP-0310)](rips/docs/RIP-0310-proof-of-provenance.md)** extends this one step further: it binds *who* (a Beacon agent identity) and *what* (the verified physical machine) to every piece of published content — so AI-generated media carries a verifiable claim of origin, not a removable watermark. *BoTTube is where agents are seen; Beacon is how they're known; RustChain is how they're proven real.* ([spec + DOI](https://doi.org/10.5281/zenodo.20502069)) - -### The Opportunity No One Else Sees - -The hedge funds and banks want to regulatory-capture crypto. Fine. Let them have the financial rails. - -What they *can't* capture: -- A network of physical machines verified by silicon-level fingerprinting -- An agent economy where machines pay each other in hardware-proven currency -- A fleet of vintage PowerPC Macs, SPARC workstations, and IBM POWER8 servers that prove their own existence through physics - -**The intersection of DePIN + AI agents + hardware verification is unoccupied.** Everyone building "AI + crypto" is just wrapping GPT in a token. We're building the physical infrastructure layer that agents need to transact honestly — and the machines that power it get more valuable with age. - -| Term | What It Means Here | -|------|-------------------| -| **Proof of Physical AI** | Hardware fingerprinting proves real silicon did real work | -| **Agent-native currency** | RTC/wRTC — permissionless micropayments between machines | -| **Hardware-verified identity** | 6-check fingerprint = unfakeable agent ID at the physical layer | -| **DePIN for AI** | Decentralized physical infrastructure purpose-built for autonomous agents | -| **Sovereign inference** | Run your own models on your own hardware — no API landlords | - ---- - -## The Network Is Real - -```bash -# Verify right now -curl -fsS https://rustchain.org/health # Node health -curl -fsS https://rustchain.org/api/miners # Active miners -curl -fsS https://rustchain.org/epoch # Current epoch -``` - -### For Agents - -No API key, no signup — an autonomous agent can read and act on the live network directly: - -```bash -curl -fsS https://rustchain.org/api/miners # who is attesting right now -curl -fsS https://rustchain.org/epoch # current epoch + reward pool -curl -fsS "https://rustchain.org/wallet/balance?miner_id=YOUR_WALLET" # your own balance + multiplier -``` - -Payments run over the [Beacon](https://github.com/Scottcjn/beacon-skill) RustChain transport (Ed25519-signed RTC micropayments), and tasks are discoverable the same way humans find them — see [open bounties](https://github.com/Scottcjn/rustchain-bounties/issues). Hardware-verified contributors earn the same rates whether human or agent. - -### Attestation Nodes - -| Node | Location | Notes | -|------|----------|-------| -| **Node 1** — 50.28.86.131 | Louisiana, US | Primary (LiquidWeb VPS) | -| **Node 2** — 50.28.86.153 | Louisiana, US | Secondary + BoTTube (LiquidWeb VPS) | -| **Node 3** — 76.8.228.245:8099 | US | First external node (Ryan's Proxmox) | -| **Node 4** — 38.76.217.189:8099 | Hong Kong | First Asian node (CognetCloud) | -| **Node 5** — POWER8 S824 | Local Lab | First non-x86 node (IBM ppc64le, 512GB RAM) | - -| Fact | Proof | -|------|-------| -| 5 nodes across 3 continents (NA ×3, Asia ×1, Local ×1) | [Live explorer](https://rustchain.org/explorer/) | -| 20+ miners attesting | `curl -fsS https://rustchain.org/api/miners` | -| 44 BCOS certificates issued | [Certified repos](BCOS.md) | -| 6 hardware fingerprint checks per machine | [Fingerprint docs](docs/attestation_fuzzing.md) | -| 64,000+ RTC paid to 1,000+ recipients ([live counter](https://rustchain.org/payouts.json)) | [Public ledger](https://github.com/Scottcjn/rustchain-bounties/issues/104) | -| Code merged upstream into OpenSSL (master + 5 release branches) | [#30437](https://github.com/openssl/openssl/pull/30437), [#30452](https://github.com/openssl/openssl/pull/30452) | -| Code landed in curl (powerpc64 fast path, merged by hand per curl workflow) | [curl commit history](https://github.com/curl/curl/commits?author=Scottcjn) | -| Integer-overflow finding fixed in wolfSSL (via their #9954) | [wolfSSL/wolfssl#9984](https://github.com/wolfSSL/wolfssl/pull/9984) | -| Open PRs on Ghidra (e200 VLE PowerPC), wolfSSL (POWER8 AES), LLVM, PyTorch, vLLM | Listed in the upstream project PR trackers | - ---- - -## Quickstart - -```bash -# One-line install — auto-detects your platform -curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash - -# Dry-run: preview installer actions without installing or mining -curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash -s -- --dry-run -``` - -The miner is installed by this script. It is not distributed as a -`rustchain-miner` PyPI package, so use the installer above for miner setup. - -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 -fsS "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 -``` - -**New to RustChain?** Read the [step-by-step Beginner Quickstart](docs/QUICKSTART.md) — covers everything from install to your first RTC, with every command explained. - ---- - -## Local Development - -Developers can build and run RustChain locally from a fresh checkout: - -1. Install prerequisites and run Python/Rust checks with the [Build Guide](docs/BUILD.md). -2. Start a single-node local devnet with [Local Devnet](docs/DEVNET.md). -3. Create a development wallet and simulate a transfer with the [CLI Wallet Walkthrough](docs/CLI.md). - -These guides keep local state in `.dev/` and use explicit `--manifest-path` -commands because the repository contains multiple Python and Rust subprojects. - ---- - -## Wallets - -RustChain has two wallet concepts: - -- **Miner wallet ID**: a readable `miner_id` used for mining rewards and balance checks. -- **`RTC...` address**: an Ed25519-backed address used for signed transfers. - -Start with the [wallet setup guide](docs/WALLET_SETUP.md) if you are not sure which one you need. - -| Option | Use it for | Where | -|---|---|---| -| Miner install wallet | Earning mining rewards to a named wallet | `install-miner.sh --wallet YOUR_WALLET` | -| Wallet user guide | Balance checks, safe transfers, and signed-transfer guidance | [docs/WALLET_USER_GUIDE.md](docs/WALLET_USER_GUIDE.md) | -| Desktop GUI wallet | Creating or restoring a local wallet from this repo | `wallet/rustchain_wallet_secure.py` | -| CLI tooling | Scripted wallet operations from a checkout | `tools/rustchain_wallet_cli.py` | -| Agent/Base wallet docs | Coinbase Agentic Wallets, x402, and Base linking | [web/wallets.html](web/wallets.html) | - -For command examples, backup guidance, and the signed-transfer payload format, see [docs/WALLET_SETUP.md](docs/WALLET_SETUP.md) and [START_HERE.md](START_HERE.md). - ---- - -## How Proof-of-Antiquity Works - -### 1 CPU = 1 Vote - -Unlike Proof-of-Work where hash power = votes: -- Each unique hardware device gets one consensus participation slot per epoch -- Reward shares are then weighted by the device's antiquity multiplier -- No advantage from faster CPUs or multiple threads - -### Epoch Rewards - -``` -Block: 10 min | Epoch: 144 blocks (~24h) | 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 ████████ - (example with 8 miners sharing the pool) -``` - -### Anti-VM Enforcement - -VMs are detected and receive **1 billionth** of normal rewards. Real hardware only. - ---- - -## Tokenomics - -**Total supply: 8,388,608 RTC** (2²³ — pure binary). Fixed forever. Consensus-enforced cap. - -Compare to Bitcoin's 21M (≈2.5x more), Ethereum's uncapped supply, and the typical altcoin's "we'll figure it out later." RustChain's cap is small *on purpose* — it forces the economy to discover real value per token rather than relying on dilution to mask scarcity problems. - -### Supply distribution - -| Zone | Allocation | RTC | Purpose | -|------|-----------|-----|---------| -| **Block Mining** | 94% | 7,885,292 | PoA validator rewards (paid to real vintage hardware) | -| **Founders** | 1.5% | 125,829 | `founder_founders` — core team allocation | -| **Dev Fund** | 1.5% | 125,829 | `founder_dev_fund` — development funding | -| **Team / Bounty** | 1.5% | 125,829 | `founder_team_bounty` — contributor bounties | -| **Community** | 1.5% | 125,829 | `founder_community` — airdrops, grants | - -Total premine: **6%** (503,316 RTC = 4 × 125,829.12, one per founder wallet). Premine wallets have a 1-year on-chain unlock delay. No VC pre-sale. No private allocation. The early miners were `pawnshop_g4_115` and `dual-g4-125`. - -### Emission schedule (fixed) - -| Parameter | Value | -|-----------|-------| -| Block reward | 1.5 RTC per epoch, fixed | -| Block time | 600s (10 min) | -| Epoch duration | 144 blocks (~24 hours) | -| Halving | None | - -Emission is a fixed 1.5 RTC per epoch and does not halve. It continues at that rate until the 8,388,608 RTC (2²³) supply cap is reached, consistent with RIP-0004 and the running node. This matches the "Fixed forever" cap noted above. - -### Reference rate climbs as holder count grows - -The published USD-equivalent reference rate for RTC moves up as the network gains wallet holders. **Per-bounty RTC awards scale DOWN inversely**, so the *USD value paid per finding* stays stable as the token appreciates. The live rate is always at [tokenomics reference rate](docs/tokenomics_v1.md). - -| Holder count | Reference rate | Bounty rate scale | -|--------------|----------------|-------------------| -| Genesis (~761 holders) | $0.10 | initial | -| ~1,000+ holders (today) | $0.15 | **Current** | -| 2,000 holders | $0.20 | ~50% of current | -| Real market discovery | observed price | Recompute from USD anchor | - -**Examples after first reduction (at 1,000 holders / $0.15 ref)**: -- Critical bug bounty: 100 → 65 RTC -- High bug bounty: 50 → 33 RTC -- Medium: 25 → 17 RTC -- Generic merged PR: 5 → 3 RTC - -**Fairness rules** (codified at [rustchain-bounties#12458](https://github.com/Scottcjn/rustchain-bounties/issues/12458)): -- Not retroactive — work submitted under the old rate gets the old rate -- Announced ahead — 24-48 hour heads-up before each milestone -- One-way ratchet — rates ONLY go down with appreciation, never back up -- Market overrides — DEX/CEX listing switches to USD-anchor pricing - -This is how a healthy token economy works. Rewards aren't anchored to a nominal RTC number; they're anchored to the USD value of the underlying work. As RTC gains real value through scarcity + adoption, the reward count per finding drops while the dollar value stays consistent. **The math protects both the contributor and the program.** - -### Fees - -| Operation | Fee | -|-----------|-----| -| Attestation | Free | -| Transfer | 0.0001 RTC | -| Withdrawal to Ergo | 0.001 RTC + Ergo tx fee | - -Full tokenomics detail: [WHITEPAPER §6](docs/WHITEPAPER.md). Scenario analysis: [What If: RTC Fundamentals — Coverage Analysis](docs/WHAT_IF_RTC_FUNDAMENTALS.md) (*analysis, not a promise*). - -## 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** | [Bridge](https://bottube.ai/bridge/wrtc) | -| **Guide** | [wRTC Quickstart](docs/wrtc.md) | - -> **Honest status:** wRTC is live and swappable on Solana, but the pool is **early-stage with very thin liquidity** — treat it as experimental, not a deep market. The `$0.15` figure for RTC is an **internal reference rate** for bounty accounting, not a market price or a promise of convertibility. - ---- - -## 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.15 USD** · `curl -fsSL https://rustchain.org/install.sh | bash` · [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://img.shields.io/badge/DOI-10.5281%2Fzenodo.18623592-blue)](https://doi.org/10.5281/zenodo.18623592) | -| **Non-Bijunctive Permutation Collapse** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18623920-blue)](https://doi.org/10.5281/zenodo.18623920) | -| **PSE Hardware Entropy** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18623922-blue)](https://doi.org/10.5281/zenodo.18623922) | -| **RAM Coffers** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.18321905-blue)](https://doi.org/10.5281/zenodo.18321905) | -| **RPI: Resonant Permutation Inference** | Preprint | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19271983-blue)](https://doi.org/10.5281/zenodo.19271983) | -| **Incentive Moves Engagement, Not Authorship** (agent-economy self-audit) | Working paper v1.0 | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20559770-blue)](https://doi.org/10.5281/zenodo.20559770) | - ---- - -## 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 | -| [RPI Inference](https://github.com/Scottcjn/rpi-inference) | Zero-multiply inference engine (18K tok/s, runs on N64) | -| [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. - ---- - -## Contributing - -Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and the [Bounty Board](https://github.com/Scottcjn/rustchain-bounties) for active tasks and rewards. - ---- - -## Troubleshooting - -
-Miner not connecting to node - -Preview what the installer would do without installing or mining: - -```bash -curl -sSL https://raw.githubusercontent.com/Scottcjn/Rustchain/main/install-miner.sh | bash -s -- --dry-run -``` - -Check node health: -```bash -curl -fsS https://rustchain.org/health -``` -
- -
-Balance check returns 0 or error - -Verify your miner name is correct: -```bash -curl -fsS "https://rustchain.org/wallet/balance?miner_id=YOUR_MINER_NAME" -``` - -The miner name must exactly match the name used during first attestation. -
- -
-Miner service won't start (systemd / launchd) - -The installer creates a **user-level** systemd service (no sudo needed): - -```bash -systemctl --user status rustchain-miner -journalctl --user -u rustchain-miner --no-pager -n 50 -``` - -macOS (launchd): -```bash -launchctl list | grep rustchain -tail -f ~/.rustchain/miner.log -``` -
- -
-Transfer stuck in "pending" state - -Check the pending ledger: -```bash -curl -fsS "https://rustchain.org/wallet/history?miner_id=YOUR_MINER_NAME&limit=20" -``` - -Node operators can inspect the admin-only pending ledger with: - -```bash -python tools/pending_ops.py --node https://rustchain.org --admin-key "$RC_ADMIN_KEY" list -``` - -Transitions require epoch settlement - check current epoch: -```bash -curl -fsS https://rustchain.org/epoch -``` -
- -
-Common installation issues - -- **Python not found**: The miner needs Python 3. On vintage platforms (PowerPC Tiger/Leopard), see [Hardware Requirements](docs/HARDWARE_REQUIREMENTS.md) for the legacy miner path. -- **Service did not start after install**: Check `systemctl --user status rustchain-miner` (Linux) or `~/.rustchain/miner.log` (macOS). -- **Building the node from source**: Rust and dev tooling are only needed for node development, not for mining. See the [Build Guide](docs/BUILD.md). - -For more details, see the [Beginner Quickstart](docs/QUICKSTART.md). -
- -For deeper debugging, see the [CLI Wallet Walkthrough](docs/CLI.md) and [Local Devnet Guide](docs/DEVNET.md). - ---- - -
- -**[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](https://rustchain.org/principles.html) · [Green Tracker](https://rustchain.org/preserved.html) · [Bounties](https://github.com/Scottcjn/rustchain-bounties/issues) - -
+name: Link Check + +on: + push: + paths: + - '**.md' + - '**.html' + pull_request: + paths: + - '**.md' + - '**.html' + schedule: + - cron: '0 8 * * 1' + +jobs: + link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install lychee + run: | + curl -sSL https://github.com/lycheeverse/lychee/releases/download/lychee-v0.17.0/lychee-x86_64-unknown-linux-gnu.tar.gz | tar xz + sudo mv lychee-x86_64-unknown-linux-gnu/lychee /usr/local/bin/ + lychee --version + + - name: Check links + run: | + lychee \ + --base . \ + --no-progress \ + --max-retries 2 \ + --timeout 30 \ + --accept 200,204,301,302,304,429 \ + '**/*.md' \ + --exclude 'https://twitter.com/*' \ + --exclude 'https://x.com/*' \ + --exclude 'https://t.me/*' \ + --exclude 'https://discord.gg/*' \ + --exclude 'https://doi.org/*' \ + --exclude 'https://img.shields.io/*' \ + --exclude 'https://raw.githubusercontent.com/*' From 7c0a9c41ed7def41eaade4034c0b74a88ce1508a Mon Sep 17 00:00:00 2001 From: kang666-kang <1348504305@qq.com> Date: Wed, 22 Jul 2026 12:45:09 +0800 Subject: [PATCH 4/4] Update link-check.yml --- .github/workflows/link-check.yml | 56 ++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index e7b75e8e6..350e1cc1b 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -18,25 +18,41 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install lychee + - name: Check relative links run: | - curl -sSL https://github.com/lycheeverse/lychee/releases/download/lychee-v0.17.0/lychee-x86_64-unknown-linux-gnu.tar.gz | tar xz - sudo mv lychee-x86_64-unknown-linux-gnu/lychee /usr/local/bin/ - lychee --version + set -e + echo "=== Checking relative links in Markdown files ===" + errors=0 - - name: Check links - run: | - lychee \ - --base . \ - --no-progress \ - --max-retries 2 \ - --timeout 30 \ - --accept 200,204,301,302,304,429 \ - '**/*.md' \ - --exclude 'https://twitter.com/*' \ - --exclude 'https://x.com/*' \ - --exclude 'https://t.me/*' \ - --exclude 'https://discord.gg/*' \ - --exclude 'https://doi.org/*' \ - --exclude 'https://img.shields.io/*' \ - --exclude 'https://raw.githubusercontent.com/*' + for md in $(find . -name '*.md' -not -path './.git/*' -not -path './node_modules/*'); do + # Extract relative links: [text](relative/path) or [text](./relative/path) + links=$(grep -oP '\[[^\]]*\]\(\K[^)]+' "$md" | grep -v '^https\?://' | grep -v '^#' | grep -v '^mailto:' | sed 's/#.*//') + + for link in $links; do + # Remove ./ prefix if present + link=$(echo "$link" | sed 's|^\./||') + [ -z "$link" ] && continue + + # Resolve relative to the file's directory + dir=$(dirname "$md") + target="$dir/$link" + # Normalize path + target=$(echo "$target" | sed 's|/\./|/|g') + + if [ ! -e "$target" ]; then + echo " BROKEN: $md -> $link (resolved: $target)" + errors=$((errors + 1)) + else + echo " OK: $md -> $link" + fi + done + done + + echo "" + echo "=== Results ===" + if [ $errors -gt 0 ]; then + echo "FAILED: $errors broken relative link(s)" + exit 1 + else + echo "PASSED: All relative links are valid" + fi