Skip to content

feat(miner): Port RustChain Miner to Intel 386 (Bounty #435, 150 RTC) - #3

Closed
kuanglaodi2-sudo wants to merge 153 commits into
mainfrom
kuanglaodi2-sudo/feature/intel-386-miner
Closed

kuanglaodi2-sudo wants to merge 153 commits into
mainfrom
kuanglaodi2-sudo/feature/intel-386-miner

Conversation

@kuanglaodi2-sudo

Copy link
Copy Markdown
Owner

Summary

Implements Bounty Scottcjn#435: Port RustChain Miner to Intel 386 (150 RTC).

What was implemented

Architecture Detection (hardware.rs):

  • Intel 386 (1985): i386DX, i386SX, i386EX, AMD 386, Cyrix 386 variants
  • Intel 486 (1989): i486DX, i486SX
  • Intel Pentium (1993): Pentium, Pentium MMX
  • All classified as x86 family with appropriate architecture string

Cross-Compilation Support:

  • i686-unknown-linux-gnu target (with SIMD disabled for compatibility)
  • i586-unknown-linux-gnu target
  • i486-unknown-linux-gnu target
  • i386-unknown-linux-gnu target
  • .cargo/config.toml and cross.toml configured

Build Scripts:

  • scripts/build_386.sh - Main build script with Docker/native support
  • scripts/cross-pre-build-386.sh - Docker pre-build setup

Documentation:

  • rustchain-miner/README_386.md - Comprehensive Intel 386 port guide
  • rustchain-miner/README_I386.md - Alternative reference documentation
  • validate_i386_port.sh - Validation script

Tests (arch_tests.rs):

  • 10+ new tests for Intel 386/486/Pentium detection
  • Miner ID, wallet generation, and serialization tests

Hardware Profiles:

  • vintage_miner/hardware_profiles.py: intel_386 4.0x (MYTHIC), intel_486 3.5x (MYTHIC)
  • README.md: Added 386/486 to multiplier table

Systemd Service:

  • rustchain-miner/contrib/rustchain-miner-386.service - Optimized for 386 systems

Multipliers

Architecture Multiplier Tier
Intel 80386 4.0x MYTHIC
Intel 80486 3.5x MYTHIC
Intel Pentium 3.0x LEGENDARY

Bounty: Scottcjn#435
Reward: 150 RTC

Mavline and others added 30 commits March 21, 2026 14:01
…1734)

* Add formal verification test suite for epoch settlement (Bounty Scottcjn#2275)

* Add Bounty Scottcjn#2275 formal verification summary
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add Flask-based backend server with 60s polling interval
- Monitor all 4 RustChain attestation nodes (LiquidWeb US x2, Proxmox, Hong Kong)
- Track metrics: status, response time, version, uptime, active miners, epoch
- SQLite database for 24-hour historical data retention
- REST API endpoints: /api/status, /api/history/<node>, /api/incidents
- Responsive HTML/CSS/JS dashboard with Chart.js visualizations
- Geographic map showing node locations
- Incident detection and logging (node down/recovery)
- RSS/Atom feed for incidents (/feed/incidents.xml)
- Discord/Telegram webhook notifications (bonus)
- Docker and docker-compose deployment support
- Nginx configuration example for rustchain.org/status
- Comprehensive test suite (24 tests, 100% coverage of core logic)
- Full documentation in README.md

Bounty Scottcjn#2300 - Multi-Node Health Dashboard

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Complete SDK package structure with proper module organization
- Export all public types: agents, payments, reputation, analytics, bounties
- Update pyproject.toml with comprehensive metadata for PyPI publish
- Add PEP 561 py.typed marker for type checking support
- Include 56 unit tests with comprehensive coverage
- Provide extensive documentation and examples
- Package ready for pip install rustchain-sdk

SDK Components:
- Core blockchain client (RustChainClient)
- RIP-302 Agent Economy SDK (AgentEconomyClient)
- x402 payment protocol implementation
- Beacon Atlas reputation system
- BoTTube analytics integration
- Bounty system automation

Tests: 56 passed, 0 failed

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ense

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add comprehensive exploit matrix testing 16 bypass vectors
- Demonstrate real cross-node replay exploit (100% success rate)
- Create minimal patch with distributed nonce tracking
- Add patch verification tests (6/6 passing)
- Document root cause analysis and recommendations

Exploit Results:
- Cross-node replay: VULNERABILITY CONFIRMED
- Same-node replay: BLOCKED
- Nonce canonicalization: BLOCKED
- Clock skew attacks: BLOCKED
- Race conditions: PARTIALLY VULNERABLE

Patch Verification:
- Cross-node replay blocked: PASS
- Same-node replay blocked: PASS
- Fresh nonce accepted: PASS
- Expired nonce reuse: PASS
- Nonce theft detection: PASS
- Audit logging: PASS

Security Score: 0% (exploits succeed without patch)
Patch Security Score: 100% (all tests pass)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add replay_attack_poc.py: Proof of concept demonstrating 4 attack scenarios
- Add replay_defense.py: Main entry point wrapper for replay defense
- Add tests/test_replay_bounty.py: Tests proving all 3 bounty requirements:
  (1) replayed fingerprint rejected
  (2) fresh fingerprint accepted
  (3) modified replay (changed nonce but old data) rejected
- Update BOUNTY_2276_REPLAY_DEFENSE.md: Map requirements to evidence
- All evidence references actual /attest/submit behavior
- Tests: 4/4 passing (requirements 1-3 + integration verified)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…rements

- Change package name from 'rustchain-sdk' to 'rustchain' (PyPI)
- Add async support with AsyncRustChainClient (aiohttp)
- Add 24 async unit tests (total 86 tests, >=20 requirement met)
- Update docs with pip install rustchain
- Add RELEASE_CHECKLIST.md with build + twine upload commands
- Include TestPyPI verification steps
- Maintain typed exceptions and required methods

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add bcos-engine.rb Homebrew formula for BCOS v2 Engine
- Add homebrew.mxcl.bcos-engine.plist for launchd service
- Add BCOS-ENGINE-INSTALL.md with comprehensive installation guide
- Add BOUNTY_2293_BCOS_HOMEBREW.md validation report
- Install bcos-engine and bcos-spdx CLI commands
- Include recommended dependencies: semgrep, pip-audit, cyclonedx-bom
- Document trust score formula (100 pts) and tier thresholds (L0/L1/L2)

Bounty: Scottcjn#2293
Scope: BCOS v2 Homebrew formula for bcos-engine standalone

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add tools/bcos_badge_generator.py: Flask web app for generating BCOS badges
- Add tests/test_bcos_badge_generator.py: 34 unit tests (100% pass)
- Add tools/BCOS_BADGE_GENERATOR.md: Comprehensive documentation

Features:
- Dynamic SVG badge generation with tier-based styling (L0/L1/L2)
- Trust score visualization with color coding
- QR code support for verification
- RESTful API for programmatic access
- SQLite database for badge tracking and analytics
- Certificate verification endpoint

API Endpoints:
- GET / - Badge generator UI
- POST /api/badge/generate - Generate badge
- GET /api/badge/verify/<id> - Verify certificate
- GET /api/badge/stats - Get statistics
- GET /badge/<id>.svg - Download badge SVG
- GET /health - Health check

Test Results: 34/34 tests passing

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Rename formula from bcos-engine.rb to bcos.rb
- Install bcos_engine.py as 'bcos' command (not 'bcos-engine')
- Keep bcos-spdx helper command unchanged
- Update launchd plist to homebrew.mxcl.bcos
- Update documentation to reflect 'bcos' command usage
- Use stable SHA256 checksum approach with curl | sha256sum
- Keep optional dependencies: semgrep, pip-audit
- Document checksum acquisition in installation guide

Bounty: Scottcjn#2293

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add simple/detailed toggle view for comparison table
- Add evidence footnotes with source links per key metric
- Improve mobile table UX (horizontal scroll + sticky first column)
- Add page metadata footer with version and generated timestamp
- Preserve vintage terminal styling throughout

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add interactive stratigraphy visualization (fossils/index.html)
- Implement data export API and sample data generator
- Include comprehensive documentation and deployment script
- D3.js-based visualization with architecture color coding
- Hover tooltips showing miner details, RTC earned, fingerprint quality
- Epoch settlement markers and first appearance indicators
- Deployable at rustchain.org/fossils

Bounty: Scottcjn#2311 — The Fossil Record (75 RTC)
Wallet: [RTC wallet address to be added]

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add bridge-dashboard/index.html: Real-time monitoring dashboard
- Add bridge/dashboard_api.py: Dashboard API endpoints
- Add bridge/test_dashboard_api.py: API test suite (18 tests)
- Add bridge-dashboard/README.md: Comprehensive documentation
- Add validate_bounty_2303.py: Automated validation script
- Add BOUNTY_2303_IMPLEMENTATION.md: Implementation summary

Features:
- Total RTC locked display with 24h change
- wRTC circulating supply on Solana
- Bridge fee revenue tracking (0.1%)
- Wrap/unwrap transaction tables
- wRTC price chart (Raydium/DexScreener)
- Bridge health monitoring (4 components)
- Auto-refresh every 30 seconds

Tests: 49 passed (31 bridge + 18 dashboard)
Validation: All checks passed

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
— Give Every Relic a Biography

Core Implementation (70 RTC):
- Machine passport data structure with hardware fingerprint, name, architecture, provenance
- Repair history tracking with parts, technician, cost in RTC
- Attestation history with epochs, RTC earned, entropy scores
- Benchmark signatures (cache timing, SIMD, thermal, performance)
- Lineage notes for ownership transfers and acquisition stories
- RESTful API with full CRUD endpoints
- Web viewer with CRT/vintage computer aesthetic at /passport/<id>
- CLI tool for passport management
- Database schema with 5 tables and indexes
- Migration script for existing nodes

Bonus Features (20 RTC):
- PDF generation with vintage computer styling
- QR code generation linking to on-chain passport

Files:
- node/machine_passport.py (974 lines) — Core data model and ledger
- node/machine_passport_api.py (623 lines) — REST API endpoints
- node/machine_passport_viewer.py (680 lines) — Web viewer with CRT aesthetic
- node/migrate_machine_passport.py (194 lines) — Migration script
- node/tests/test_machine_passport.py (657 lines) — 24 comprehensive tests
- bounties/issue-2309/README.md (555 lines) — Complete documentation
- bounties/issue-2309/IMPLEMENTATION_SUMMARY.md (367 lines) — Implementation summary

Total: 4,050 lines of code + documentation

Validation:
- 24/24 tests passing
- All acceptance criteria met
- Ready for production deployment

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
root and others added 15 commits March 26, 2026 11:34
)

12 findings (2 critical, 3 high, 4 medium, 3 low):
- CRIT-01: SSL verification disabled by default (MITM)
- CRIT-02: Private key transmitted in plaintext
- HIGH-01: No input validation on /balance (SSRF)
- HIGH-02: Retry amplification (DoS)
- HIGH-03: Bot token exposure risk
- MED-01-04: Rate limiting, negative amounts, race conditions, memory growth
- LOW-01-03: Logging, error leaks, price validation

Includes patches and 23 unit tests (all passing).

Closes Scottcjn/rustchain-bounties#69
RTC Wallet: RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff
…tcjn#310)

New .github/scripts/generate_dynamic_badges.py with:
- Weekly growth badge
- Top 3 hunters summary badge
- Category badges (docs/outreach/bugs/security/feature)
- Per-hunter badges with collision-safe slugs (sha256 suffix)
- JSON schema validation for all generated badges
- CONTRIBUTORS.md parser for auto-populating hunter data
- Deterministic generation (CI-safe)

Includes:
- 34 unit tests (all passing)
- docs/DYNAMIC_BADGES_V2.md with copy-paste embed snippets
- .github/badges/ with generated badge JSON files
- manifest.json for badge discovery

Closes Scottcjn/rustchain-bounties#310
RTC Wallet: RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff
…nty Scottcjn#1854)

Red team audit of Beacon agent trust network:

CRITICAL:
- Identity Takeover via unauthenticated pubkey re-registration
- Trust Score Inflation via unauthenticated bounty completion

HIGH:
- Sybil Army via unrestricted mass agent registration

MEDIUM:
- Agent Directory information disclosure (pubkeys, wallets)
- Nonce collision denial-of-service (global UNIQUE constraint)

Each attack includes: threat model, PoC code, proposed mitigation.
Mitigations include: challenge-response auth, rate limiting, attestation
requirement, admin-only completion, per-agent nonce uniqueness.

22 unit tests for all mitigations (all passing).

Closes Scottcjn#1854
RTC Wallet: RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff
…s-2.33.0

deps(deps): bump requests from 2.32.5 to 2.33.0
…acy-schema-compat

fix: wallet balance endpoints support legacy balances schema
…es-v2

feat: Dynamic Shields Badges v2 — Generator, Tests, Docs (Bounty Scottcjn#310)
…m-audit

security: 🔴 Red Team — Python SDK & Telegram Bot Security Audit (Bounty Scottcjn#69)
feat: Beacon Dashboard v1.1 — Live Transport Traffic Monitor (Bounty Scottcjn#321)
Implement Intel 80386 support for the RustChain miner, enabling
the 40+ year old CPU to participate in Proof-of-Antiquity mining
with the maximum 4.0x antiquity multiplier.

Changes:
- Add Intel 386 detection in hardware.rs (i386DX, i386SX variants)
- Add i386/i686 cross-compile configuration in cross.toml
- Add .cargo/config.toml entries for i686 targets
- Add i386-specific tests in arch_tests.rs
- Create build_i386.sh script with Docker support
- Create pre-build scripts for glibc and musl targets
- Add README_I386.md documentation
- Add validate_i386_port.sh validation script

The existing rustchain-miner-i386/ directory provides the DOS/Lua
implementation for native 386 hardware, while this commit adds
Rust cross-compilation support.

Bounty: Scottcjn#435
Reward: 150 RTC
Issue: Scottcjn/rustchain-bounties#435
Remove duplicate setup.py (pyproject.toml is authoritative), fix
deprecated license table format, remove invalid Topic::Blockchain
classifier, add Python 3.13 support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…pypi

fix: clean up SDK pyproject.toml for PyPI publishing
Implements bounty Scottcjn#435: Port RustChain Miner to Intel 386 (150 RTC)

## Changes

### Architecture Detection (hardware.rs)
- Added Intel 386/486/Pentium detection in detect_cpu_family_arch()
- Detects i386DX, i386SX, i386EX variants
- Detects AMD 386 and Cyrix 386 clones
- Detects i486DX, i486SX variants
- Detects Intel Pentium and Pentium MMX
- All 386 variants classified as 'x86' family with 'i386' arch string

### Cross-Compilation Support
- Added i686-unknown-linux-gnu target in cross.toml
- Added i586-unknown-linux-gnu target in cross.toml
- Added i386/i486/i586/i686 targets in .cargo/config.toml
- Added build aliases: build-386, build-386-musl

### Build Scripts
- scripts/build_386.sh: Main build script for 386/486/Pentium
  - Supports i386/i486/i586/i686 targets
  - Docker and native cross-compile modes
  - Release/debug builds, static musl builds
- scripts/cross-pre-build-386.sh: Docker container pre-build setup

### Tests (arch_tests.rs)
- Added 10+ new tests for Intel 386/486/Pentium detection
- i386DX, i386SX, i386EX detection tests
- i486DX, i486SX detection tests
- Pentium, Pentium MMX detection tests
- AMD 386, Cyrix 386 clone tests
- Miner ID and wallet generation tests
- Serialization tests

### Hardware Profiles
- Updated intel_386 base_multiplier to 4.0x (MYTHIC tier)
- Updated intel_486 base_multiplier to 3.5x (MYTHIC tier)
- Added fingerprint_patterns for AMD/Cyrix 386 variants
- Updated timing_variance and stability_window for 386/486

### Documentation
- rustchain-miner/README_386.md: Comprehensive Intel 386 port guide
  - Hardware requirements and ideal systems
  - Build instructions for all targets
  - Installation on vintage hardware
  - Deployment systemd service file
  - Fingerprint adaptation for 386 (no rdtsc, ISA bus timing)
  - Expected rewards table with 4.0x multiplier

### README
- Added Intel 80386 (4.0x) to multiplier table
- Added Intel 80486 (3.5x) to multiplier table

### Systemd Service
- contrib/rustchain-miner-386.service: Optimized for 386 systems
  - Memory limits (64M max, 32M high)
  - Single-core CPU limits
  - Security hardening for old systems

## Multipliers
- Intel 80386: 4.0x (MYTHIC - highest in system)
- Intel 80486: 3.5x (MYTHIC)
- Intel Pentium: 3.0x (LEGENDARY)

Closes Scottcjn#435
…conflict

Combined local enhancements with remote implementation:
- Keep i386/i486/i586 targets from local
- Apply i686 SIMD-disabling (-mmx,-sse,-sse2) from remote
- Keep all build aliases (both build-386 and build-i386)
- Add both sets of README files (README_I386.md and README_386.md)
- Combine hardware detection from both (386/486/Pentium + variants)
@github-actions

Copy link
Copy Markdown

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions

github-actions Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

⚠️ BCOS v2 Scan Results

Metric Value
Trust Score 58/100
Certificate ID BCOS-ef1b3c56
Tier L1 (not met)

BCOS Badge

What does this mean?

The BCOS (Beacon Certified Open Source) engine scans for:

  • SPDX license header compliance
  • Known CVE vulnerabilities (OSV database)
  • Static analysis findings (Semgrep)
  • SBOM completeness
  • Dependency freshness
  • Test infrastructure evidence
  • Review attestation tier

Full report | What is BCOS?


BCOS v2 Engine - Free & Open Source (MIT) - Elyan Labs

@github-actions

Copy link
Copy Markdown

🛡️ BCOS v2 Scan Results

Metric Value
Trust Score Trust Score
Tier L1 ✅
Cert ID BCOS-bf629c2c
Commit b7cbaa16
Score Breakdown
Component Score
License Compliance 20
Vulnerability Scan 10
Static Analysis 5
SBOM Completeness 5
Dependency Freshness 5
Test Evidence 10
Review Attestation 5
Attestation
  • Commitment: bf629c2ca6300098e9b40dfce0a52c68c1020605367ab064c3978fe5292eb2f9
  • Timestamp: 2026-03-26T14:21:41.754385Z
  • Schema: bcos-attestation/v2

Generated by BCOS v2 Action

@github-actions

Copy link
Copy Markdown

This PR has been inactive for 14 days. It will be closed in 7 days unless updated.
Need help finishing? Ask in the PR comments — we're happy to assist!

@github-actions github-actions Bot added the stale label Apr 13, 2026
@github-actions

Copy link
Copy Markdown

Closed due to inactivity. Feel free to reopen with updates.

@github-actions github-actions Bot closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants