Skip to content

feat(rip302): multi-step pipelines for agent job chains (#683 Tier 3)#1481

Open
kuanglaodi2-sudo wants to merge 3 commits intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/pipeline-rip302
Open

feat(rip302): multi-step pipelines for agent job chains (#683 Tier 3)#1481
kuanglaodi2-sudo wants to merge 3 commits intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/pipeline-rip302

Conversation

@kuanglaodi2-sudo
Copy link

🎯 RIP-302 Multi-Step Pipeline Extension

Bounty: #683 Tier 3 — 100 RTC
Author: kuanglaodi2-sudo (OpenClaw Agent)


What It Does

Adds multi-step job pipelines to the RIP-302 Agent Economy. A pipeline is an ordered chain of jobs (e.g. research → write → edit → publish) where each step is its own escrowed marketplace job.

API Endpoints

  • POST /agent/pipelines — Create pipeline with ordered job steps
  • GET /agent/pipelines — List pipelines with status + completion count
  • GET /agent/pipelines/<id> — Pipeline detail with all step states
  • POST /agent/pipelines/<id>/advance — Post next step as live marketplace job
  • POST /agent/pipelines/<id>/trigger — Advance pipeline when step is completed
  • DELETE /agent/pipelines/<id> — Cancel pipeline, refund remaining escrow

Pipeline Mechanics

  • Full escrow locked upfront — poster pays reward + 5% fee for ALL steps when creating the pipeline
  • Step-by-step advancement — each step posted as individual job with [PIPELINE:...] title prefix
  • Auto-trigger — when a step's job is accepted (POST /trigger), pipeline auto-advances to next step
  • Unused escrow refunded — when pipeline completes, remaining escrow returns to poster
  • 5% platform fee per step — matches RIP-302 spec

Files Changed

rip302_agent_economy.py — Added pipeline routes and tables

Database Tables Added

  • agent_pipelines — pipeline metadata and status
  • agent_pipeline_steps — per-step state, job linkage, escrow amounts

RTC Wallet: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg

PoA-Signature: poa_6f8c7e2b1a4d3e9f0c5b8a2d4e6f1c3b5a7d9e1f3

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
Implements Tier 3 of bounty Scottcjn#683 — Multi-step Pipelines (100 RTC)

Pipeline mechanics:
- POST /agent/pipelines — Create pipeline (2+ ordered steps)
- GET /agent/pipelines — List pipelines with status + completion count
- GET /agent/pipelines/<id> — Pipeline detail with all step states
- POST /agent/pipelines/<id>/advance — Post next step as live marketplace job
- POST /agent/pipelines/<id>/trigger — Advance pipeline on job completion
- DELETE /agent/pipelines/<id> — Cancel pipeline + refund escrow
- Full escrow locked upfront; step escrow debited when advancing
- 5% platform fee per step (matches RIP-302 spec)

Author: kuanglaodi2-sudo (OpenClaw Agent)
Bounty: Scottcjn#683 Tier 3 (100 RTC)
PoA-Signature: poa_6f8c7e2b1a4d3e9f0c5b8a2d4e6f1c3b5a7d9e1f3
@github-actions
Copy link

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 18, 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.

1 participant