Implement RECEIPT_CLAIM transaction type
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 4s
Documentation Validation / validate-docs (push) Successful in 12s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Failing after 12s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Successful in 31s

- Add status fields to Receipt model (status, claimed_at, claimed_by)
- Add RECEIPT_CLAIM handling to state_transition.py with validation and reward minting
- Add type field to Transaction model for reliable transaction type storage
- Update router to use TransactionRequest model to preserve type field
- Update poa.py to extract type from mempool transaction content and store only original payload
- Add RECEIPT_CLAIM to GasType enum with gas schedule
This commit is contained in:
aitbc
2026-04-22 13:35:31 +02:00
parent a6a840a930
commit f36fd45d28
40 changed files with 1194 additions and 349 deletions

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC AI operations testing with deterministic job submission and validation
title: aitbc-ai-operations-skill
version: 1.0
version: 1.1
---
# AITBC AI Operations Skill

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC AI job operations with deterministic monitoring and optimization
title: aitbc-ai-operator
version: 1.0
version: 1.1
---
# AITBC AI Operator
@@ -17,15 +17,21 @@ Trigger when user requests AI operations: job submission, status monitoring, res
{
"operation": "submit|status|results|list|optimize|cancel",
"wallet": "string (for submit/optimize)",
"job_type": "inference|parallel|ensemble|multimodal|resource-allocation|performance-tuning|economic-modeling|marketplace-strategy|investment-strategy",
"job_type": "inference|training|multimodal|ollama|streaming|monitoring",
"prompt": "string (for submit)",
"payment": "number (for submit)",
"job_id": "string (for status/results/cancel)",
"agent_id": "string (for optimize)",
"cpu": "number (for optimize)",
"memory": "number (for optimize)",
"gpu": "number (for optimize)",
"duration": "number (for optimize)",
"limit": "number (optional for list)"
"limit": "number (optional for list)",
"model": "string (optional for ollama jobs, e.g., llama2, mistral)",
"provider_id": "string (optional for GPU provider selection)",
"endpoint": "string (optional for custom Ollama endpoint)",
"batch_file": "string (optional for batch operations)",
"parallel": "number (optional for parallel job count)"
}
```
@@ -91,9 +97,13 @@ Trigger when user requests AI operations: job submission, status monitoring, res
## Environment Assumptions
- AITBC CLI accessible at `/opt/aitbc/aitbc-cli`
- AI services operational (Ollama, exchange, coordinator)
- Ollama endpoint accessible at `http://localhost:11434` or custom endpoint
- GPU provider marketplace operational for resource allocation
- Sufficient wallet balance for job payments
- Resource allocation system operational
- Job queue processing functional
- Ollama models available: llama2, mistral, codellama, etc.
- GPU providers registered with unique p2p_node_id for P2P connectivity
## Error Handling
- Insufficient balance → Return error with required amount

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC blockchain analytics and performance metrics with deterministic outputs
title: aitbc-analytics-analyzer
version: 1.0
version: 1.1
---
# AITBC Analytics Analyzer

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC basic operations testing with deterministic validation and health checks
title: aitbc-basic-operations-skill
version: 1.0
version: 1.1
---
# AITBC Basic Operations Skill

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC marketplace operations with deterministic pricing and listing management
title: aitbc-marketplace-participant
version: 1.0
version: 1.1
---
# AITBC Marketplace Participant
@@ -15,15 +15,19 @@ Trigger when user requests marketplace operations: listing creation, price optim
## Input
```json
{
"operation": "create|list|analyze|optimize|trade|status",
"service_type": "ai-inference|ai-training|resource-compute|resource-storage|data-processing",
"name": "string (for create)",
"operation": "create|list|analyze|optimize|trade|status|gpu-provider-register|gpu-provider-status",
"service_type": "ai-inference|ai-training|resource-compute|resource-storage|data-processing|gpu-provider",
"name": "string (for create/gpu-provider-register)",
"description": "string (for create)",
"price": "number (for create/optimize)",
"wallet": "string (for create/trade)",
"wallet": "string (for create/trade/gpu-provider-register)",
"listing_id": "string (for status/trade)",
"provider_id": "string (for gpu-provider-status)",
"quantity": "number (for create/trade)",
"duration": "number (for create, hours)",
"gpu_model": "string (for gpu-provider-register)",
"gpu_count": "number (for gpu-provider-register)",
"models": "array (optional for gpu-provider-register, e.g., [\"llama2\", \"mistral\"])",
"competitor_analysis": "boolean (optional for analyze)",
"market_trends": "boolean (optional for analyze)"
}
@@ -33,17 +37,22 @@ Trigger when user requests marketplace operations: listing creation, price optim
```json
{
"summary": "Marketplace operation completed successfully",
"operation": "create|list|analyze|optimize|trade|status",
"operation": "create|list|analyze|optimize|trade|status|gpu-provider-register|gpu-provider-status",
"listing_id": "string (for create/status/trade)",
"provider_id": "string (for gpu-provider-register/gpu-provider-status)",
"service_type": "string",
"name": "string (for create)",
"name": "string (for create/gpu-provider-register)",
"price": "number",
"wallet": "string (for create/trade)",
"wallet": "string (for create/trade/gpu-provider-register)",
"quantity": "number",
"gpu_model": "string (for gpu-provider-register/gpu-provider-status)",
"gpu_count": "number (for gpu-provider-register/gpu-provider-status)",
"models": "array (for gpu-provider-register/gpu-provider-status)",
"market_data": "object (for analyze)",
"competitor_analysis": "array (for analyze)",
"pricing_recommendations": "array (for optimize)",
"trade_details": "object (for trade)",
"provider_status": "object (for gpu-provider-status)",
"issues": [],
"recommendations": [],
"confidence": 1.0,
@@ -90,8 +99,11 @@ Trigger when user requests marketplace operations: listing creation, price optim
- AITBC CLI accessible at `/opt/aitbc/aitbc-cli`
- Marketplace service operational
- Exchange API accessible for pricing data
- GPU provider marketplace operational for resource allocation
- Ollama GPU providers can register with model specifications
- Sufficient wallet balance for listing fees
- Market data available for analysis
- GPU providers have unique p2p_node_id for P2P connectivity
## Error Handling
- Invalid service type → Return service type validation error

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC cross-node coordination and messaging operations with deterministic outputs
title: aitbc-node-coordinator
version: 1.0
version: 1.1
---
# AITBC Node Coordinator
@@ -134,14 +134,16 @@ Trigger when user requests cross-node operations: synchronization, coordination,
- SSH keys located at `/root/.ssh/` for passwordless access
- Blockchain nodes operational on both nodes via systemd services
- P2P mesh network active on port 7070 with peer configuration
- Unique node IDs configured: each node has unique `proposer_id` and `p2p_node_id` in `/etc/aitbc/.env` and `/etc/aitbc/node.env`
- Git synchronization configured between nodes at `/opt/aitbc/.git`
- CLI accessible on both nodes at `/opt/aitbc/aitbc-cli`
- Python venv activated at `/opt/aitbc/venv/bin/python` for CLI operations
- Systemd services: `aitbc-blockchain-node.service` on both nodes
- Node addresses: genesis (localhost/aitbc), follower (aitbc1)
- Systemd services: `aitbc-blockchain-node.service` and `aitbc-blockchain-p2p.service` on both nodes
- Node addresses: genesis (localhost/aitbc), follower (aitbc1), gitea-runner
- Git remote: `origin` at `http://gitea.bubuit.net:3000/oib/aitbc.git`
- Log directory: `/var/log/aitbc/` for service logs
- Data directory: `/var/lib/aitbc/` for blockchain data
- Node identity utility: `/opt/aitbc/scripts/utils/generate_unique_node_ids.py` for ID generation
## Error Handling
- SSH connectivity failures → Return connection error with affected node, attempt fallback node
@@ -150,7 +152,8 @@ Trigger when user requests cross-node operations: synchronization, coordination,
- Sync failures → Return partial sync with details, identify which sync type failed
- Timeout during operations → Return timeout error with operation details, suggest increasing timeout
- Git synchronization conflicts → Return conflict error, suggest manual resolution
- P2P network disconnection → Return network error, check mesh network status
- P2P network disconnection → Return network error, check mesh network status and node IDs
- P2P handshake rejection → Check for duplicate p2p_node_id, run `/opt/aitbc/scripts/utils/generate_unique_node_ids.py`
- Service restart failures → Return service error, check systemd logs
- Node unreachable → Return unreachable error, verify network connectivity
- Invalid target node → Return validation error, suggest valid node names

View File

@@ -2,7 +2,7 @@
name: aitbc-ripgrep-specialist
description: Expert ripgrep (rg) specialist for AITBC system with advanced search patterns, performance optimization, and codebase analysis techniques
author: AITBC System Architect
version: 1.0.0
version: 1.1
usage: Use this skill for advanced ripgrep operations, codebase analysis, pattern matching, and performance optimization in AITBC system
---

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC transaction processing with deterministic validation and tracking
title: aitbc-transaction-processor
version: 1.0
version: 1.1
---
# AITBC Transaction Processor

View File

@@ -1,7 +1,7 @@
---
description: Atomic AITBC wallet management operations with deterministic outputs
title: aitbc-wallet-manager
version: 1.0
version: 1.1
---
# AITBC Wallet Manager

View File

@@ -1,7 +1,7 @@
---
description: Autonomous AI skill for blockchain troubleshooting and recovery across multi-node AITBC setup
title: Blockchain Troubleshoot & Recovery
version: 1.0
version: 1.1
---
# Blockchain Troubleshoot & Recovery Skill
@@ -18,13 +18,15 @@ Activate this skill when:
- Git synchronization fails
- Network latency issues detected
- Service health checks fail
- P2P handshake rejections (duplicate node IDs)
- Nodes with identical p2p_node_id or proposer_id
## Input Schema
```json
{
"issue_type": {
"type": "string",
"enum": ["connectivity", "sync_lag", "transaction_timeout", "service_failure", "git_sync_failure", "network_latency", "unknown"],
"enum": ["connectivity", "sync_lag", "transaction_timeout", "service_failure", "git_sync_failure", "network_latency", "p2p_identity_conflict", "unknown"],
"description": "Type of blockchain communication issue"
},
"affected_nodes": {
@@ -133,6 +135,34 @@ Based on diagnostic data, identify:
### 3. Execute Recovery Actions
#### P2P Identity Conflict Recovery
```bash
# Check current node IDs on all nodes
echo "=== aitbc node IDs ==="
grep -E "^(proposer_id|p2p_node_id)=" /etc/aitbc/.env /etc/aitbc/node.env
echo "=== aitbc1 node IDs ==="
ssh aitbc1 'grep -E "^(proposer_id|p2p_node_id)=" /etc/aitbc/.env /etc/aitbc/node.env'
echo "=== gitea-runner node IDs ==="
ssh gitea-runner 'grep -E "^(proposer_id|p2p_node_id)=" /etc/aitbc/.env /etc/aitbc/node.env'
# Run unique ID generation on affected nodes
python3 /opt/aitbc/scripts/utils/generate_unique_node_ids.py
ssh aitbc1 'python3 /opt/aitbc/scripts/utils/generate_unique_node_ids.py'
ssh gitea-runner 'python3 /opt/aitbc/scripts/utils/generate_unique_node_ids.py'
# Restart P2P services on all nodes
systemctl restart aitbc-blockchain-p2p
ssh aitbc1 'systemctl restart aitbc-blockchain-p2p'
ssh gitea-runner 'systemctl restart aitbc-blockchain-p2p'
# Verify P2P connectivity
journalctl -u aitbc-blockchain-p2p -n 30 --no-pager
ssh aitbc1 'journalctl -u aitbc-blockchain-p2p -n 30 --no-pager'
ssh gitea-runner 'journalctl -u aitbc-blockchain-p2p -n 30 --no-pager'
```
#### Connectivity Recovery
```bash
# Restart network services

View File

@@ -1,7 +1,7 @@
---
description: Autonomous skill for SSH-based investigation of gitea-runner CI logs, runner health, and root-cause-oriented debug guidance
title: Gitea Runner Log Debugger
version: 1.0
version: 1.1
---
# Gitea Runner Log Debugger Skill

View File

@@ -1,7 +1,7 @@
---
description: Atomic Ollama GPU inference testing with deterministic performance validation and benchmarking
title: ollama-gpu-testing-skill
version: 1.0
version: 1.1
---
# Ollama GPU Testing Skill

View File

@@ -1,7 +1,7 @@
---
description: Atomic OpenClaw agent communication with deterministic message handling and response validation
title: openclaw-agent-communicator
version: 1.0
version: 1.1
---
# OpenClaw Agent Communicator

View File

@@ -1,7 +1,7 @@
---
description: Atomic OpenClaw agent testing with deterministic communication validation and performance metrics
title: openclaw-agent-testing-skill
version: 1.0
version: 1.1
---
# OpenClaw Agent Testing Skill

View File

@@ -1,7 +1,7 @@
---
description: Atomic OpenClaw multi-agent workflow coordination with deterministic outputs
title: openclaw-coordination-orchestrator
version: 1.0
version: 1.1
---
# OpenClaw Coordination Orchestrator

View File

@@ -1,7 +1,7 @@
---
description: Atomic OpenClaw error detection and recovery procedures with deterministic outputs
title: openclaw-error-handler
version: 1.0
version: 1.1
---
# OpenClaw Error Handler

View File

@@ -1,7 +1,7 @@
---
description: Atomic OpenClaw agent performance tuning and optimization with deterministic outputs
title: openclaw-performance-optimizer
version: 1.0
version: 1.1
---
# OpenClaw Performance Optimizer

View File

@@ -1,7 +1,7 @@
---
description: Atomic OpenClaw session management with deterministic context preservation and workflow coordination
title: openclaw-session-manager
version: 1.0
version: 1.1
---
# OpenClaw Session Manager