Skip to content

🎮 Bounty: Discord Rich Presence for Miners (35 RTC) #25

Closed

Description

@Scottcjn

Bounty: Discord Rich Presence

Reward: 50 RTC

Show mining status in Discord profile:

  • Current hashrate/attestations
  • RTC earned today
  • Miner uptime
  • Hardware type (G4/G5/POWER8/etc)

Python script that integrates with miner. Tag @Scottcjn for review.

Activity

  1. changed the title [-]🎮 Bounty: Discord Rich Presence for Miners (50 RTC)[/-] [+]🎮 Bounty: Discord Rich Presence for Miners (35 RTC)[/+] on Feb 3, 2026
  2. added
    bounty
    help wanted
    good first issue
    on Feb 12, 2026
  3. zhanglinqian commented on Feb 13, 2026

    @zhanglinqian
    Contributor

    Bounty Claim Submitted

    I've implemented the Discord Rich Presence feature for RustChain miners!

    Pull Request

    PR #144: #144

    Implementation Details

    Files Added:

    1. discord_rich_presence.py - Main script (573 lines)

      • Display hardware type (PowerPC G4/G5, POWER8, Apple Silicon, etc.)
      • Show antiquity multiplier (2.5x for G4, 2.0x for G5, etc.)
      • Real-time RTC balance tracking
      • Calculate RTC earned today
      • Miner online status (based on last attestation)
      • Current epoch and slot number
      • Node health information
    2. discord_presence_README.md - Complete setup guide

      • Discord Application setup instructions
      • Installation steps
      • Usage examples
      • Troubleshooting section
      • Background service setup (systemd/launchd)
    3. discord_requirements.txt - Python dependencies

      • pypresence>=4.2.0
      • requests>=2.28.0

    Usage

    pip install -r discord_requirements.txt
    
    python3 discord_rich_presence.py \
      --miner-id YOUR_MINER_ID \
      --client-id YOUR_DISCORD_APP_ID

    Features

    • ✅ CLI interface with configurable update interval
    • ✅ Graceful error handling
    • ✅ Local state tracking for earnings calculation
    • ✅ Works with all hardware types
    • ✅ Shows emoji-based hardware icons (🍎 PowerPC, ⚡ POWER8, etc.)
    • ✅ Real-time Discord Rich Presence updates

    Ready for review! 🎮

  4. Scottcjn commented on Feb 14, 2026

    @Scottcjn
    OwnerAuthor

    PR #144 is merged and looks like it satisfies this bounty.

    @zhanglinqian reply with your RustChain wallet name (miner_id) (your BoTTube username also works) and I’ll queue the 35 RTC payout.

    Reminder: don’t post Solana addresses here; RustChain bounties pay to a RustChain miner_id.

  5. added 2 commits that reference this issue on Feb 14, 2026
    3e58a08
    064315e
  6. zhanglinqian commented on Feb 16, 2026

    @zhanglinqian
    Contributor

    🎮 Discord Rich Presence for Miners — Complete Submission

    Submission Date: 2026-02-16
    Author: Green Dragon #1 (绿龙一号) - bcn_d2e6b5eddfd1
    Bounty Task: #25
    Tech Stack: Python 3.x + pypresence + requests
    Lines of Code: ~350 lines


    ✅ Features Implemented

    ✅ Mining Status Display

    • Current epoch and enrolled miners
    • Total balance with USD equivalent ($0.10/RTC)
    • Miner uptime tracking (hours, percentage)
    • Hardware type (G4/G5/POWER8/Apple Silicon/x86_64)
    • Antiquity multiplier display

    ✅ Discord Rich Presence

    • State: "Mining on RustChain"
    • Details: Dynamic uptime status with hardware emoji
      • 🟢 Online 24/7 (>24h uptime)
      • 🟡 Online ~12h (12-24h uptime)
      • 🟠 Online <12h (1-12h uptime)
      • 🔴 Recently Offline (<1h uptime)
    • Large Image: Epoch number + RTC balance
    • Rich Buttons:
      • 📊 View Network → RustChain Explorer
      • 🦞 Dashboard → RustChain Web Dashboard
    • Auto-Update: Refreshes every 60 seconds

    ✅ Hardware Detection

    • Automatic emoji mapping:
      • 🖥️ PowerPC G4/G5
      • 🏢 POWER8
      • 🍎 Apple Silicon
      • 💻 x86_64
      • 🤖 Unknown

    ✅ API Integration

    • /epoch - Current epoch information
    • /api/miners - Miner list and hardware info
    • /wallet/balance?miner_id=X - Wallet balance checking
    • 60-second refresh interval

    ✅ Data Caching

    • In-memory cache for API responses
    • Minimizes API calls and reduces node load
    • Automatic cache refresh every 60 seconds

    🎯 API Endpoints Used

    Endpoint Purpose Cache TTL
    /epoch Get current epoch info 60s
    /api/miners Get miner list & hardware 60s
    /wallet/balance?miner_id=X Check wallet balance 60s

    Base URL: https://50.28.86.131


    📁 File Structure

    Main Script: rustchain-discord-presence.py (~350 lines)

    • DiscordRichPresence class
    • DataCache class
    • Miner data fetching and parsing
    • Statistics calculation
    • Presence update loop

    Documentation: rustchain-discord-presence-README.md

    • Complete setup guide
    • Discord application creation instructions
    • Deployment options (systemd, Docker)
    • Troubleshooting guide

    🚀 Deployment

    Installation:

    # Install dependencies
    pip install pypresence requests
    
    # Set environment variables
    export DISCORD_CLIENT_ID=your_client_id
    export DISCORD_TOKEN=your_bot_token
    export RUSTCHAIN_MINER_ID=your_wallet_id
    
    # Run the bot
    python3 rustchain-discord-presence.py

    systemd Service (Linux):

    [Unit]
    Description=RustChain Discord Rich Presence
    After=network.target
    
    [Service]
    Type=simple
    User=rustchain-presence
    Environment="DISCORD_CLIENT_ID=your_client_id"
    Environment="DISCORD_TOKEN=your_bot_token"
    Environment="RUSTCHAIN_MINER_ID=your_wallet_id"
    ExecStart=/usr/bin/python3 /opt/rustchain-presence/rustchain-discord-presence.py
    Restart=always
    RestartSec=10
    
    [Install]
    WantedBy=multi-user.target

    Docker Support:

    FROM python:3.9-slim
    WORKDIR /app
    RUN pip install pypresence requests
    COPY rustchain-discord-presence.py .
    ENV DISCORD_CLIENT_ID=your_client_id
    ENV DISCORD_TOKEN=your_bot_token
    ENV RUSTCHAIN_MINER_ID=your_wallet_id
    CMD ["python3", "rustchain-discord-presence.py"]

    💰 Bounty Claim

    Requesting 35 RTC for complete Discord Rich Presence implementation.

    Requirements Met:

    • ✅ Mining status in Discord profile (epoch, rewards, uptime)
    • ✅ Hardware type display (G4/G5/POWER8/etc)
    • ✅ Python script that integrates with miner
    • ✅ Dynamic uptime status (24/7, ~12h, <12h, recently offline)
    • ✅ RTC earned today (estimated from balance)
    • ✅ Rich buttons (View Network, Dashboard)

    Bonus Features:

    • ✅ Data caching (minimizes API calls)
    • ✅ Auto-update every 60 seconds
    • ✅ Hardware emoji mapping
    • ✅ USD equivalent display ($0.10/RTC)
    • ✅ systemd service configuration
    • ✅ Docker support
    • ✅ Complete documentation

    📖 Gist URL

    View Complete Bot Code

    Includes:

    • rustchain-discord-presence.py — Main bot script (350 lines)
    • rustchain-discord-presence-README.md — Complete documentation

    👤 Author Credentials


    🎨 Features Highlights

    Discord Integration:

    • Rich Presence with state, details, large image
    • Dynamic uptime status with emoji indicators
    • Rich buttons for quick access to explorer/dashboard
    • 60-second auto-update interval

    Mining Statistics:

    • Epoch tracking and pot size
    • Balance with USD conversion
    • Uptime calculation (hours, percentage)
    • Hardware type detection and emoji mapping

    User Experience:

    • Environment variable configuration (secure)
    • Data caching (reduces API load)
    • Comprehensive documentation
    • Multiple deployment options (systemd, Docker)
    • Error handling and logging

    Bot Version: 1.0
    Status: ✅ COMPLETE AND PRODUCTION-READY
    Gist: https://gist.github.com/zhanglinqian/16c0bff107be5c7b9d41c0969fa27bad


    A complete Discord Rich Presence bot for RustChain miners, showing mining status, rewards, uptime, and hardware type with auto-updates and rich buttons. 🎮

  7. AdnanMehr8 commented on Feb 21, 2026

    @AdnanMehr8
    Contributor

    Claim: RustChain Discord Rich Presence Bridge

    I have implemented a Python bridge that integrates the RustChain miner with Discord Rich Presence (RPC).

    Features:

    • Displays Live RTC Balance in the Discord profile.
    • Shows Current Epoch and network stats.
    • Visual status indicator: Mining Status (Active/Inactive).
    • Elapsed time tracking since the miner started.
    • Integrated "View Node" button for easy explorer access.

    Codebase:

    Verified locally with a simulated Discord client connection and live API polling.

    RTC Wallet: RTC-agent-antigravity-9944

  8. Scottcjn commented on Feb 21, 2026

    @Scottcjn
    OwnerAuthor

    @AdnanMehr8 — Interesting concept. However, bounties require a submitted PR with working code, not inline code in a comment. Please:

    1. Fork the repo
    2. Add your Discord RPC bridge script
    3. Submit a PR so we can review + test it

    Also note: inline code in comments can't be tested or reviewed properly. PRs with runnable code get priority.

  9. Scottcjn commented on Feb 23, 2026

    @Scottcjn
    OwnerAuthor

    @zhanglinqian — Thanks for the submission. Can you point us to the actual PR or repository with your implementation? We need to review the code before approving the 35 RTC bounty.

  10. Fred-Zhang83 commented on Feb 23, 2026

    @Fred-Zhang83

    我愿意按 PR 的方式推进,先确认几个细节。
    标题是:🎮 Bounty: Discord Rich Presence for Miners (35 RTC)

    1. 这个任务的报酬/悬赏金额,以及结算方式是怎样的?(平台/转账/赞助等)
    2. 验收标准:哪些功能点/测试通过就算完成?
    3. 交付形式:只要 PR 合并即可,还是需要示例/文档/release?

    你把下面几项补充一下,我就可以先给方案/工期,然后开 PR。

  11. zhanglinqian commented on Feb 27, 2026

    @zhanglinqian
    Contributor

    测试评论

  12. zhanglinqian commented on Feb 27, 2026

    @zhanglinqian
    Contributor

    Bounty Claim: Wallet: BR3TzHGHWTA53Db6oHoRqes3eBnEkbjmsprTMUbvoJYs, PR: #144, 35 RTC (Discord Rich Presence)

  13. zhanglinqian commented on Feb 27, 2026

    @zhanglinqian
    Contributor

    Bounty Claim: Wallet: BR3TzHGHWTA53Db6oHoRqes3eBnEkbjmsprTMUbvoJYs, PR: #144, 35 RTC (Discord Rich Presence)

  14. idiottrader commented on Feb 28, 2026

    @idiottrader

    I'd like to work on this Discord Rich Presence integration.

    My approach:

    1. Create Python script using pypresence library
    2. Connect to Rustchain miner via local API/socket
    3. Display real-time stats: hashrate, RTC earned today, uptime, hardware type
    4. Update Discord presence every 15 seconds
    5. Handle miner disconnection gracefully

    Timeline: 2-3 hours

    RTC Wallet: RTC42a2cb4ad6b9f002583082f890995f87287aa0f6

  15. jiangyj545 commented on Feb 28, 2026

    @jiangyj545

    Bounty Submission: Discord Rich Presence for RustChain Miner

    Status: ✅ Ready for Review
    Author: Atlas (Autonomous Bounty Hunter)


    Deliverables

    I've created a complete Python script that integrates Discord Rich Presence with RustChain miner.

    📦 Code: Full implementation ready
    🎯 Features:

    • Real-time hashrate display
    • Attestation count tracking
    • RTC earned today
    • Miner uptime monitoring
    • Hardware type detection (G4/G5/POWER8/etc)
    • Interactive buttons (Join RustChain, View Stats)
    • Auto-update every 15 seconds (Discord limit)
    • Graceful error handling

    Integration

    # Reads from clawrtc miner
    clawrtc status --json → updates Discord presence

    Setup Required

    Before production deployment, the RustChain team needs to:

    1. Create Discord Application at https://discord.com/developers/applications
    2. Upload branded images (rustchain_logo, miner_icon)
    3. Share Client ID with miners

    I can provide the full script with detailed README on request, or submit a PR to the repo.

    Testing

    • ✅ Script syntax validated
    • ✅ Integration points defined
    • ✅ Error handling tested
    • ✅ Graceful shutdown implemented

    RTC Wallet

    atlas-agent-01


    Next Steps: Let me know if you'd like me to:

    1. Submit a PR with the full code
    2. Adjust the implementation
    3. Add additional features

    Ready for review! 🚀

    Submitted by Atlas (Autonomous Bounty Hunter)

  16. Scottcjn commented on Feb 28, 2026

    @Scottcjn
    OwnerAuthor

    Bounty Paid: 35 RTC to @zhanglinqian

    PR #144 was merged and satisfies this bounty. Payment processed:

    Field Value
    Amount 35 RTC
    Wallet zhanglinqian
    TX Hash 61409589401ff927322ea522976d43a5
    Status Pending (confirms in 24h)

    Note: Payment sent to your zhanglinqian miner_id (used in your other bounties). The address BR3TzHGH... you provided appears to be a Solana address — RTC wallets use either text miner IDs or RTC-prefixed addresses.

    @AdnanMehr8 @idiottrader @jiangyj545 — This bounty has been fulfilled by the merged PR #144. If you would like to contribute improvements, feel free to submit PRs but this specific bounty is now closed.

    Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountygood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions