RustChain

repository·main·Indexed 19 days ago

https://github.com/scottcjn/rustchain

A DePIN blockchain utilizing a 'Proof of Antiquity' consensus mechanism to incentivize the preservation of vintage and retro hardware. Version 2.2.1 includes features such as the RIP-305 Airdrop Protocol with anti-Sybil checks, Boot Chime acoustic attestation for hardware verification, and the POWER8 PSE Benchmark Suite for llama.cpp inference optimization on ppc64le architectures.

Tokens
760.1K
Snippets
2.2K
Records
3.3K
Agent score
66%

What's inside rustchain

  1. Overview of RustChain API endpoints for load testing

    main

    The RustChain load test suite benchmarks five core API endpoints. These endpoints are targeted by Locust, k6, and Artillery to ensure comparable performance results.

    EndpointMethodDescription
    /healthGETNode health / version
    /epochGETCurrent epoch, slot, height
    /headers/tipGETChain tip header
    /api/minersGETActive miner list
    /wallet/balance?miner_id=<id>GETWallet balance lookup
  2. Overview of the Vintage AI Video Pipeline

    main

    The Vintage AI Video Pipeline is a four-stage automated system designed to generate and upload videos of vintage hardware mining cryptocurrency.

    Pipeline Workflow:

    1. RustChain API Client: Fetches miner data.
    2. Prompt Generator: Creates descriptive prompts based on miner data.
    3. Video Generator: Generates video content using a backend (e.g., LTX-Video, CogVideo, or Mochi).
    4. BoTTube Uploader: Uploads the final video to BoTTube.

    Production Requirements:

    • RustChain API access: https://rustchain.org
    • Video generation backend: LTX-Video, CogVideo, or Mochi
    • BoTTube API key: Required for video uploads
    • Runtime: Python 3.8+
  3. Overview of RustChain

    main

    RustChain is a Decentralized Physical Infrastructure Network (DePIN) designed for vintage and retro hardware. Unlike traditional blockchains that reward the newest, fastest hardware, RustChain uses a consensus mechanism called Proof of Antiquity (PoA) to reward the preservation and continued use of older machines.

    Key features include:

    • Hardware Fingerprinting: Uses AI-augmented checks (such as oscillator drift, cache timing, and thermal entropy) to verify real physical silicon and prevent emulation or VM spoofing.
    • Appreciating Value: Hardware rewards increase as a machine ages, moving through tiers like MODERN, EXOTIC, ANCIENT, LEGENDARY, and MYTHIC.
    • AI-Agent Native: Designed for the agentic economy where autonomous agents use their signing keys as wallets.
    • E-Waste Reduction: Incentivizes keeping working machines in service rather than disposing of them.
  4. Overview of wRTC ERC-20 on Base L2

    main

    Wrapped RTC (wRTC) is an ERC-20 token implementing RIP-305 on the Base L2 network. It allows for cross-chain interaction between RustChain and Base.

    Contract Specifications

    • Networks: Base Mainnet (chainId 8453) and Base Sepolia Testnet (chainId 84532).
    • Standard: ERC-20 with mint/burn capabilities (built using OpenZeppelin v5).
    • Decimals: 6 (aligned with native RTC precision).
    • Max Supply: 20,000 wRTC (represented as 20,000,000,000 in 6-decimal units).
    • Access Control: Managed via Owner and Bridge roles.
  5. Overview of RustChain: DePIN for Vintage Hardware

    main

    RustChain is a Decentralized Physical Infrastructure Network (DePIN) designed to reward the use of vintage and retro hardware. Unlike traditional blockchains that favor the newest hardware, RustChain uses a Proof of Antiquity (PoA) consensus mechanism where the value of hardware increases as it ages.

    Key features include:

    • Hardware Fingerprinting: Uses 6 specific checks (Clock-Skew, Cache Timing, SIMD Identity, Thermal Drift, Instruction Jitter, and Anti-Emulation) to verify physical silicon and prevent Virtual Machine (VM) or emulator spoofing.
    • AI-Augmented Consensus: Employs server-side AI to validate hardware attestation by analyzing timing distributions, SIMD features, and thermal patterns.
    • E-waste Reduction: Encourages the preservation and continued use of older machines (e.g., PowerPC, SPARC, MIPS, 68K, RISC-V) rather than discarding them.
    • AI Agent Economy: Integrates with AI-native platforms like BoTTube and Beacon to create a symbiotic ecosystem between agents and crypto.
  6. Overview of the wRTC Solana Bridge Dashboard

    main

    The wRTC Solana Bridge Dashboard provides real-time monitoring for the cross-chain bridge between RustChain and Solana. It tracks the movement of RTC tokens as they are wrapped into wRTC on Solana.

    Monitored Metrics:

    • Total RTC Locked: Amount of RTC tokens currently held in the bridge.
    • wRTC Circulating: Total wRTC token supply on Solana.
    • Wrap/Unwrap Volume: Transaction volume for both directions.
    • Price Chart: Real-time wRTC price data sourced from DexScreener.
    • Bridge Health: Status monitoring of all bridge components.
    • Fee Revenue: Statistics on collected bridge fees.
    • Transaction History: A log of recent wrap and unwrap transactions.

    Core Files:

    • dashboard.html: The main, comprehensive dashboard interface.
    • index.html: A legacy, simplified monitor.
    • update_stats.py: A script used for stats generation.
  7. Overview of RustChain Node components

    main

    The RustChain Node implementation consists of several specialized modules that handle consensus, hardware security, and data management:

    • Consensus & Rewards:
      • rip_200_round_robin_1cpu1vote.py: Implements the 1 CPU = 1 Vote consensus mechanism.
      • rewards_implementation_rip200.py: Manages time-aged rewards.
    • Hardware Security (Anti-Spoofing):
      • hardware_binding_v2.py: Handles serial and entropy binding.
      • fingerprint_checks.py: Executes a 6-point hardware fingerprinting check to prevent VM/emulation.
    • Data Management:
      • state_pruning.py: Manages SQLite pruning for spent UTXO history and expired mempool rows.
    • Production Node:
      • rustchain_v2_integrated_v2.2.1_rip200.py: The main production-ready node script featuring RIP-200 consensus.
  8. Overview of RustChain Miner components for Windows

    main

    The Windows miner implementation consists of several components depending on your needs:

    • Legacy GUI Miner: rustchain_windows_miner.py can be run directly from source.
    • Hardware Fingerprinting: fingerprint_checks.py provides the hardware fingerprinting helpers required by the miners to perform Proof of Antiquity (PoA) checks.
    • Packaged Installer: The installer/ directory contains the pipeline to generate a professional Windows installer, including:
      • A packaged version of the miner (GUI + PoA loop).
      • PyInstaller configuration (installer/build_miner.py and installer/RustChainMiner.spec).
      • An Inno Setup script (installer/rustchain_setup.iss).
      • Helper batch scripts (installer/scripts/*.bat) for starting, stopping, and viewing logs.
  9. Project Structure of Proof-of-Iron

    main

    The Proof-of-Iron implementation is organized as follows:

    • src/: Core logic including acoustic_fingerprint.py (feature extraction), boot_chime_capture.py (audio capture), proof_of_iron.py (protocol), and spectral_analysis.py (spectral tools).
    • tests/: Test suite located in test_boot_chime.py.
    • audio_samples/: Sample audio files for testing.
    • boot_chime_api.py: The REST API server entrypoint.
    • requirements.txt: Dependency definitions.
  10. RustChain Network Architecture and Ergo Anchoring

    main

    The network relies on Attestation Nodes to validate hardware fingerprints.

    Primary Node: https://rustchain.org
    Ergo Anchor Node: https://50.28.86.153

    To ensure immutability, RustChain uses Ergo Anchoring. Every epoch settlement hash is written to an Ergo layer-1 blockchain box register (R4-R9). This provides a tamper-proof timestamp and existence proof for the RustChain ledger on an external blockchain.

  11. Explore the NUMA Sharding file structure

    main

    The numa_sharding project is organized into the following directory structure:

    • src/: Contains the core logic. The main deliverable is the header-only API ggml-numa-shard.h. An optional extended implementation ggml-numa-shard.c is also provided.
    • benchmarks/: Includes benchmark_numa.sh for automated testing, compare_results.py for analysis, and expected_results.json for baseline comparisons.
    • presets/: Contains JSON tuning presets for different hardware configurations, such as power8_s824.json, power8_default.json, and dual_socket_x86.json.
    • reports/: Stores validation_report.md and performance_analysis.md.
    • docs/: Contains documentation including ARCHITECTURE.md, INTEGRATION.md, and TROUBLESHOOTING.md.
  12. Supported Hardware and Multipliers for Intel Mac Miners

    main

    The Intel Mac miner is designed for specific Intel-based Apple hardware. Note that mining rewards are subject to a multiplier based on architecture.

    Supported Hardware

    • Mac Pro 2013 (Trashcan) - Intel Xeon E5
    • MacBook Pro (Intel)
    • iMac (Intel)
    • Mac mini (Intel)

    Mining Multipliers

    • Intel Mac (modern architecture): 0.8x
    • Mac Pro 2013: May qualify for a retro bonus in future RIPs.