Skip to content

feat: Add bounty claim verification bot (#747) - #671

Merged
Scottcjn merged 218 commits into
Scottcjn:mainfrom
createkr:feat/issue747-verification-bot
Mar 7, 2026
Merged

Scottcjn merged 218 commits into
Scottcjn:mainfrom
createkr:feat/issue747-verification-bot

Conversation

@createkr

@createkr createkr commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Bounty #747 - Automated Verification Bot

Summary

This PR implements a production-ready bounty claim verification bot that automates the verification of bounty claims from issue comments.

Features

  • Parse claim comments: Extract wallet addresses and proof URLs from claim comments
  • GitHub follow verification: Verify users follow @Scottcjn via GitHub API
  • Star count verification: Count starred repos on Scottcjn organization (minimum 3 required)
  • Wallet check (optional): Verify wallet existence via RustChain node balance endpoint
  • URL liveness (optional): Check if proof URLs are live
  • Duplicate detection: Detect duplicate claims from prior PAID comments
  • Structured comments: Post verification results with payout calculation
  • Configuration: YAML config for rules and payout coefficients
  • Dry-run mode: Test without posting comments
  • Rate limiting: GitHub API rate-limit aware with caching

Files Changed

  • tools/bounty_verifier/ - Main verification module
  • tests/test_bounty_verifier.py - 39 comprehensive tests
  • .github/workflows/bounty-verifier.yml - GitHub Actions workflow
  • tools/bounty_verifier/config.yaml - Configuration file

Testing

All 39 tests pass:

tests/test_bounty_verifier.py::TestClaimComment - PASSED
tests/test_bounty_verifier.py::TestVerificationResult - PASSED
tests/test_bounty_verifier.py::TestConfig - PASSED
tests/test_bounty_verifier.py::TestGitHubClient - PASSED
tests/test_bounty_verifier.py::TestBountyVerifier - PASSED
tests/test_bounty_verifier.py::TestIntegration - PASSED

Linting: All checks passed with ruff.

Usage

The bot automatically runs on issue comments containing 'claim' keyword.
Manual trigger available via workflow_dispatch.

Payout Wallet

RTC1d48d848a5aa5ecf2c5f01aa5fb64837daaf2f35 (split createkr-wallet)

Closes #747

Scottcjn and others added 30 commits April 21, 2025 10:19
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
…separate)

Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
…assets

Signed-off-by: Scott <scott@elyanlabs.ai>
…tory

Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
…l files

Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
… folders

Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
Signed-off-by: Scott <scott@elyanlabs.ai>
autonomy414941 and others added 21 commits February 21, 2026 22:43
Merging — real vulnerability fix. NaN/Infinity could bypass balance checks on withdrawal endpoint.
Scottcjn#333)

Merging — useful docs quality checklist for CONTRIBUTING.md.
Co-authored-by: autonomy <autonomous@localhost>
…tatus badge

Adds a shields.io-compatible JSON badge endpoint inline to the main
server (rustchain_v2_integrated_v2.2.1_rip200.py), not as a separate
Flask app. The endpoint queries miner_attest_recent to determine real
mining status based on last attestation timestamp.

Endpoint: GET /api/badge/<miner_id>

Returns:
  {schemaVersion: 1, label: '⛏ <miner_id>', message: 'Active (2.5x)', color: 'brightgreen'}

Status logic:
  - Active: attested within 20 minutes (green)
  - Idle: attested within 1 hour (yellow)
  - Inactive: no recent attestation (grey)

Shows antiquity multiplier for active miners with vintage hardware.

GitHub Action (.github/workflows/mining-status.yml):
  - Runs every 15 minutes
  - Verifies badge endpoint health
  - Ensures badge markdown is present in README
  - Uses shields.io/endpoint for live rendering (no SVG generation)

Usage in any README:
  ![Mining](https://img.shields.io/endpoint?url=https://rustchain.org/api/badge/MINER_ID)

Refs: Scottcjn#256
… issue templates

- Welcome bot greets first-time contributors with bounty info
- Auto-labeler tags PRs by file path (security, consensus, miner, wallet, etc.)
- PR size labeler (XS/S/M/L/XL) with XL warning message
- Stale bot cleans abandoned PRs (14d) and issues (30d), exempts bounty/security
- Issue templates: Bounty Claim, Bug Report, Feature Request (all YAML forms)
- CODEOWNERS: auto-request @Scottcjn for security-critical paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace static badges with live shields.io counters (stars, contributors, last commit, issues)
- Add Bounties and Discussions badges
- Add "Contribute & Earn RTC" section with bounty tiers and getting started steps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GitHub Action for dynamic RustChain mining badge. Bounty Scottcjn#304 — @nicepopo86-lang
Example Python client for BoTTube API. Bounty Scottcjn#303 — @nicepopo86-lang
…erprint-fstring-syntax-origin

fix: resolve SyntaxError in node/hardware_fingerprint.py __main__ output
…e-fail-closed

security: fail closed on mock-signature mode outside test runtime
…-disclosure-409-origin

security: harden public endpoints against sensitive disclosure
…n#372)

* fix: validate limit query params to avoid 500s

* fix: resolve upstream main conflict for limit validation PR

* refactor: move query-int helper to shared utility section

---------

Co-authored-by: autonomy <autonomous@localhost>
Implement automated bounty claim verification system:

- Parse claim comments to extract wallet addresses and proof URLs
- Verify GitHub follow status to @Scottcjn via API
- Count starred repos on Scottcjn organization
- Optional wallet balance check via RustChain node API
- Optional URL liveness verification
- Duplicate claim detection from prior PAID comments
- Post structured verification comments with payout calculation
- Configuration file for rules and payout coefficients
- Dry-run mode for testing
- Rate-limit aware GitHub API client with caching
- GitHub Actions workflow for automatic verification
- Comprehensive test suite (39 tests)

Config: tools/bounty_verifier/config.yaml
Module: tools/bounty_verifier/
Tests: tests/test_bounty_verifier.py
Workflow: .github/workflows/bounty-verifier.yml

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@createkr
createkr requested a review from Scottcjn as a code owner March 7, 2026 20:13
@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) tests Test suite changes ci size/XL PR: 500+ lines labels Mar 7, 2026
@Scottcjn
Scottcjn merged commit dfd064e into Scottcjn:main Mar 7, 2026
6 checks passed
@Scottcjn

Scottcjn commented Apr 2, 2026

Copy link
Copy Markdown
Owner

Transfer confirmed — this was included in the batch settlement of 1,091 RTC to @createkr's wallet.

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

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) ci size/XL PR: 500+ lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.