Skip to content

feat: RIP-302 Tier 3 - Voting-based Dispute Resolution (100 RTC)#1485

Closed
kuanglaodi2-sudo wants to merge 3 commits intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/rip302-dispute-resolution
Closed

feat: RIP-302 Tier 3 - Voting-based Dispute Resolution (100 RTC)#1485
kuanglaodi2-sudo wants to merge 3 commits intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/rip302-dispute-resolution

Conversation

@kuanglaodi2-sudo
Copy link
Copy Markdown
Contributor

RIP-302 Tier 3: Voting-based Dispute Resolution (100 RTC)

Bounty: #683
Claim: Scottcjn/rustchain-bounties#683 (comment)
Author: kuanglaodi2-sudo
Wallet: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg


Implements a complete voting-based dispute resolution system for RIP-302 Agent Economy.

New API Endpoints

Method Endpoint Description
POST /agent/disputes Open a dispute on a job (5 RTC fee)
GET /agent/disputes List disputes (filter by status/job_id)
GET /agent/disputes/ Full dispute details + vote tallies
POST /agent/disputes//vote Cast a vote (10 RTC stake)
GET /agent/disputes//votes List all votes for a dispute
POST /agent/disputes//slash Admin slash malicious voter
POST /agent/disputes//resolve Admin manual resolution

Core Algorithms

  • Reputation-weighted voting — voting_power = reputation_score x balance_power
  • Auto-resolution at 60% supermajority (minimum 3 votes)
  • RTC stake (10 RTC) per vote; 50% slashed for malicious voting
  • Dispute fee (5 RTC) to discourage frivolous disputes
  • Admin override via founder_community wallet

Files

  • rip302_dispute_resolution.py (~33KB) — Full implementation
  • BOUNTY_683_DISPUTE_RESOLUTION.md — Full documentation

Integration

Wraps existing rip302_agent_economy.py:

from rip302_dispute_resolution import init_dispute_tables, register_dispute_endpoints
init_dispute_tables(db_path)
register_dispute_endpoints(app, db_path, require_auth=get_wallet)

kuanglaodi2-sudo and others added 3 commits March 14, 2026 22:42
- Implements GET /wallet/history?miner_id=X&limit=50&offset=0
- Returns transaction history including rewards and transfers
- Queries epoch_rewards table for mining rewards
- Queries ledger table for transfers
- Supports pagination with limit and offset parameters
… fingerprint checks

Adds arch_cross_validation.py - a comprehensive server-side module that cross-validates
a miner's claimed device_arch against their actual fingerprint data.

Features:
- Normalizes architecture names (g4, modern_x86, apple_silicon, etc.)
- Scores SIMD feature consistency (detects x86 SIMD on PowerPC claims, etc.)
- Scores cache timing profile consistency
- Scores clock drift magnitude consistency (vintage hardware has more drift)
- Scores thermal drift consistency
- Scores CPU brand consistency
- Returns weighted overall score (0.0-1.0) with detailed breakdown
- Handles the 'frozen profile' case (cv=0, VM/emulator fingerprint)

Includes unit tests covering:
- Real hardware validation (G4, modern_x86, apple_silicon)
- Spoofing detection (x86 claiming G4)
- Frozen/noisy profile detection
- Empty fingerprint handling
- CPU brand consistency

Fixes: Scottcjn/rustchain-bounties#17
Bounty: 50 RTC
…Scottcjn#683)

- Reputation-weighted voting (reputation score x RTC balance power)
- Auto-resolution at 60% supermajority
- RTC stake per vote with slashing for malicious voters
- Dispute fee (5 RTC) + vote stake (10 RTC)
- Admin override capability
- Full API: open, vote, resolve, slash
- Integration: register_dispute_endpoints() for Flask apps

Bounty: Scottcjn/rustchain-bounties#683
Claim: Scottcjn/rustchain-bounties#683 (comment)
Author: kuanglaodi2-sudo
@github-actions
Copy link
Copy Markdown
Contributor

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 added documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) wallet Wallet/transfer related node Node server related size/XL PR: 500+ lines labels Mar 19, 2026
@Scottcjn
Copy link
Copy Markdown
Owner

@kuanglaodi2-sudo — Same issue as PR #1475. 30K+ line diff that rewrites the entire repo. Please submit only the new dispute resolution module as a standalone file, without touching other files.

@Scottcjn Scottcjn closed this Mar 19, 2026
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) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) documentation Improvements or additions to documentation node Node server related size/XL PR: 500+ lines wallet Wallet/transfer related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants