docs: update CLI command syntax across workflow documentation
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Waiting to run
CLI Tests / test-cli (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Documentation Validation / validate-docs (push) Has been cancelled

- Updated marketplace commands: `marketplace --action` → `market` subcommands
- Updated wallet commands: direct flags → `wallet` subcommands
- Updated AI commands: `ai-submit`, `ai-status` → `ai submit`, `ai status`
- Updated blockchain commands: `chain` → `blockchain info`
- Standardized command structure across all workflow files
- Affected files: MULTI_NODE_MASTER_INDEX.md, TEST_MASTER_INDEX.md, multi-node-blockchain-marketplace
This commit is contained in:
aitbc
2026-04-08 12:10:21 +02:00
parent ef4a1c0e87
commit 40ddf89b9c
251 changed files with 3555 additions and 61407 deletions

View File

@@ -189,7 +189,7 @@ sudo systemctl start aitbc-blockchain-node-production.service
**Quick Start**:
```bash
# Create marketplace service
./aitbc-cli marketplace --action create --name "AI Service" --price 100 --wallet provider
./aitbc-cli market create --type ai-inference --price 100 --description "AI Service" --wallet provider
```
---
@@ -297,10 +297,10 @@ curl -s http://localhost:8006/health | jq .
curl -s http://localhost:8006/rpc/head | jq .height
# List wallets
./aitbc-cli list
./aitbc-cli wallet list
# Send transaction
./aitbc-cli send --from wallet1 --to wallet2 --amount 100 --password 123
./aitbc-cli wallet send wallet1 wallet2 100 123
```
### Operations Commands (From Operations Module)
@@ -342,10 +342,10 @@ curl -s http://localhost:9090/metrics
### Marketplace Commands (From Marketplace Module)
```bash
# Create service
./aitbc-cli marketplace --action create --name "Service" --price 100 --wallet provider
./aitbc-cli market create --type ai-inference --price 100 --description "Service" --wallet provider
# Submit AI job
./aitbc-cli ai-submit --wallet wallet --type inference --prompt "Generate image" --payment 100
./aitbc-cli ai submit --wallet wallet --type inference --prompt "Generate image" --payment 100
# Check resource status
./aitbc-cli resource status

View File

@@ -95,8 +95,8 @@ openclaw agent --agent FollowerAgent --session-id test --message "Test response"
**Quick Start**:
```bash
# Test AI operations
./aitbc-cli ai-submit --wallet genesis-ops --type inference --prompt "Test AI job" --payment 100
./aitbc-cli ai-ops --action status --job-id latest
./aitbc-cli ai submit --wallet genesis-ops --type inference --prompt "Test AI job" --payment 100
./aitbc-cli ai status --job-id latest
```
---
@@ -117,8 +117,8 @@ openclaw agent --agent FollowerAgent --session-id test --message "Test response"
**Quick Start**:
```bash
# Test advanced AI operations
./aitbc-cli ai-submit --wallet genesis-ops --type parallel --prompt "Complex pipeline test" --payment 500
./aitbc-cli ai-submit --wallet genesis-ops --type multimodal --prompt "Multi-modal test" --payment 1000
./aitbc-cli ai submit --wallet genesis-ops --type parallel --prompt "Complex pipeline test" --payment 500
./aitbc-cli ai submit --wallet genesis-ops --type multimodal --prompt "Multi-modal test" --payment 1000
```
---
@@ -139,7 +139,7 @@ openclaw agent --agent FollowerAgent --session-id test --message "Test response"
**Quick Start**:
```bash
# Test cross-node operations
ssh aitbc1 'cd /opt/aitbc && ./aitbc-cli chain'
ssh aitbc1 'cd /opt/aitbc && ./aitbc-cli blockchain info'
./aitbc-cli resource status
ssh aitbc1 'cd /opt/aitbc && ./aitbc-cli resource status'
```
@@ -223,16 +223,16 @@ test-basic.md (foundation)
### 🚀 Quick Test Commands
```bash
# Basic functionality test
./aitbc-cli --version && ./aitbc-cli chain
./aitbc-cli --version && ./aitbc-cli blockchain info
# OpenClaw agent test
openclaw agent --agent GenesisAgent --session-id quick-test --message "Quick test" --thinking low
# AI operations test
./aitbc-cli ai-submit --wallet genesis-ops --type inference --prompt "Quick test" --payment 50
./aitbc-cli ai submit --wallet genesis-ops --type inference --prompt "Quick test" --payment 50
# Cross-node test
ssh aitbc1 'cd /opt/aitbc && ./aitbc-cli chain'
ssh aitbc1 'cd /opt/aitbc && ./aitbc-cli blockchain info'
# Performance test
./aitbc-cli simulate blockchain --blocks 10 --transactions 50 --delay 0

View File

@@ -25,77 +25,69 @@ This module covers marketplace scenario testing, GPU provider testing, transacti
cd /opt/aitbc && source venv/bin/activate
# Create marketplace service provider wallet
./aitbc-cli create --name marketplace-provider --password 123
./aitbc-cli wallet create marketplace-provider 123
# Fund marketplace provider wallet
./aitbc-cli send --from genesis-ops --to $(./aitbc-cli list | grep "marketplace-provider:" | cut -d" " -f2) --amount 10000 --password 123
./aitbc-cli wallet send genesis-ops $(./aitbc-cli wallet list | grep "marketplace-provider:" | cut -d" " -f2) 10000 123
# Create AI service provider wallet
./aitbc-cli create --name ai-service-provider --password 123
./aitbc-cli wallet create ai-service-provider 123
# Fund AI service provider wallet
./aitbc-cli send --from genesis-ops --to $(./aitbc-cli list | grep "ai-service-provider:" | cut -d" " -f2) --amount 5000 --password 123
./aitbc-cli wallet send genesis-ops $(./aitbc-cli wallet list | grep "ai-service-provider:" | cut -d" " -f2) 5000 123
# Create GPU provider wallet
./aitbc-cli create --name gpu-provider --password 123
./aitbc-cli wallet create gpu-provider 123
# Fund GPU provider wallet
./aitbc-cli send --from genesis-ops --to $(./aitbc-cli list | grep "gpu-provider:" | cut -d" " -f2) --amount 5000 --password 123
./aitbc-cli wallet send genesis-ops $(./aitbc-cli wallet list | grep "gpu-provider:" | cut -d" " -f2) 5000 123
```
### Create Marketplace Services
```bash
# Create AI inference service
./aitbc-cli marketplace --action create \
--name "AI Image Generation Service" \
./aitbc-cli market create \
--type ai-inference \
--price 100 \
--wallet marketplace-provider \
--description "High-quality image generation using advanced AI models" \
--parameters "resolution:512x512,style:photorealistic,quality:high"
--description "High-quality image generation using advanced AI models"
# Create AI training service
./aitbc-cli marketplace --action create \
--name "Custom Model Training Service" \
./aitbc-cli market create \
--type ai-training \
--price 500 \
--wallet ai-service-provider \
--description "Custom AI model training on your datasets" \
--parameters "model_type:custom,epochs:100,batch_size:32"
--description "Custom AI model training on your datasets"
# Create GPU rental service
./aitbc-cli marketplace --action create \
--name "GPU Cloud Computing" \
./aitbc-cli market create \
--type gpu-rental \
--price 50 \
--wallet gpu-provider \
--description "High-performance GPU rental for AI workloads" \
--parameters "gpu_type:rtx4090,memory:24gb,bandwidth:high"
--description "High-performance GPU rental for AI workloads"
# Create data processing service
./aitbc-cli marketplace --action create \
--name "Data Analysis Pipeline" \
./aitbc-cli market create \
--type data-processing \
--price 25 \
--wallet marketplace-provider \
--description "Automated data analysis and processing" \
--parameters "data_format:csv,json,xml,output_format:reports"
--description "Automated data analysis and processing"
```
### Verify Marketplace Services
```bash
# List all marketplace services
./aitbc-cli marketplace --action list
./aitbc-cli market list
# Check service details
./aitbc-cli marketplace --action search --query "AI"
./aitbc-cli market search --query "AI"
# Verify provider listings
./aitbc-cli marketplace --action my-listings --wallet marketplace-provider
./aitbc-cli marketplace --action my-listings --wallet ai-service-provider
./aitbc-cli marketplace --action my-listings --wallet gpu-provider
./aitbc-cli market my-listings --wallet marketplace-provider
./aitbc-cli market my-listings --wallet ai-service-provider
./aitbc-cli market my-listings --wallet gpu-provider
```
## Scenario Testing
@@ -104,88 +96,88 @@ cd /opt/aitbc && source venv/bin/activate
```bash
# Customer creates wallet and funds it
./aitbc-cli create --name customer-1 --password 123
./aitbc-cli send --from genesis-ops --to $(./aitbc-cli list | grep "customer-1:" | cut -d" " -f2) --amount 1000 --password 123
./aitbc-cli wallet create customer-1 123
./aitbc-cli wallet send genesis-ops $(./aitbc-cli wallet list | grep "customer-1:" | cut -d" " -f2) 1000 123
# Customer browses marketplace
./aitbc-cli marketplace --action search --query "image generation"
./aitbc-cli market search --query "image generation"
# Customer bids on AI image generation service
SERVICE_ID=$(./aitbc-cli marketplace --action search --query "AI Image Generation" | grep "service_id" | head -1 | cut -d" " -f2)
./aitbc-cli marketplace --action bid --service-id $SERVICE_ID --amount 120 --wallet customer-1
SERVICE_ID=$(./aitbc-cli market search --query "AI Image Generation" | grep "service_id" | head -1 | cut -d" " -f2)
./aitbc-cli market bid --service-id $SERVICE_ID --amount 120 --wallet customer-1
# Service provider accepts bid
./aitbc-cli marketplace --action accept-bid --service-id $SERVICE_ID --bid-id "bid_123" --wallet marketplace-provider
./aitbc-cli market accept-bid --service-id $SERVICE_ID --bid-id "bid_123" --wallet marketplace-provider
# Customer submits AI job
./aitbc-cli ai-submit --wallet customer-1 --type inference \
./aitbc-cli ai submit --wallet customer-1 --type inference \
--prompt "Generate a futuristic cityscape with flying cars" \
--payment 120 --service-id $SERVICE_ID
# Monitor job completion
./aitbc-cli ai-status --job-id "ai_job_123"
./aitbc-cli ai status --job-id "ai_job_123"
# Customer receives results
./aitbc-cli ai-results --job-id "ai_job_123"
./aitbc-cli ai results --job-id "ai_job_123"
# Verify transaction completed
./aitbc-cli balance --name customer-1
./aitbc-cli balance --name marketplace-provider
./aitbc-cli wallet balance customer-1
./aitbc-cli wallet balance marketplace-provider
```
### Scenario 2: GPU Rental + AI Training
```bash
# Researcher creates wallet and funds it
./aitbc-cli create --name researcher-1 --password 123
./aitbc-cli send --from genesis-ops --to $(./aitbc-cli list | grep "researcher-1:" | cut -d" " -f2) --amount 2000 --password 123
./aitbc-cli wallet create researcher-1 123
./aitbc-cli wallet send genesis-ops $(./aitbc-cli wallet list | grep "researcher-1:" | cut -d" " -f2) 2000 123
# Researcher rents GPU for training
GPU_SERVICE_ID=$(./aitbc-cli marketplace --action search --query "GPU" | grep "service_id" | head -1 | cut -d" " -f2)
./aitbc-cli marketplace --action bid --service-id $GPU_SERVICE_ID --amount 60 --wallet researcher-1
GPU_SERVICE_ID=$(./aitbc-cli market search --query "GPU" | grep "service_id" | head -1 | cut -d" " -f2)
./aitbc-cli market bid --service-id $GPU_SERVICE_ID --amount 60 --wallet researcher-1
# GPU provider accepts and allocates GPU
./aitbc-cli marketplace --action accept-bid --service-id $GPU_SERVICE_ID --bid-id "bid_456" --wallet gpu-provider
./aitbc-cli market accept-bid --service-id $GPU_SERVICE_ID --bid-id "bid_456" --wallet gpu-provider
# Researcher submits training job with allocated GPU
./aitbc-cli ai-submit --wallet researcher-1 --type training \
./aitbc-cli ai submit --wallet researcher-1 --type training \
--model "custom-classifier" --dataset "/data/training_data.csv" \
--payment 500 --gpu-allocated 1 --memory 8192
# Monitor training progress
./aitbc-cli ai-status --job-id "ai_job_456"
./aitbc-cli ai status --job-id "ai_job_456"
# Verify GPU utilization
./aitbc-cli resource status --agent-id "gpu-worker-1"
# Training completes and researcher gets model
./aitbc-cli ai-results --job-id "ai_job_456"
./aitbc-cli ai results --job-id "ai_job_456"
```
### Scenario 3: Multi-Service Pipeline
```bash
# Enterprise creates wallet and funds it
./aitbc-cli create --name enterprise-1 --password 123
./aitbc-cli send --from genesis-ops --to $(./aitbc-cli list | grep "enterprise-1:" | cut -d" " -f2) --amount 5000 --password 123
./aitbc-cli wallet create enterprise-1 123
./aitbc-cli wallet send genesis-ops $(./aitbc-cli wallet list | grep "enterprise-1:" | cut -d" " -f2) 5000 123
# Enterprise creates data processing pipeline
DATA_SERVICE_ID=$(./aitbc-cli marketplace --action search --query "data processing" | grep "service_id" | head -1 | cut -d" " -f2)
./aitbc-cli marketplace --action bid --service-id $DATA_SERVICE_ID --amount 30 --wallet enterprise-1
DATA_SERVICE_ID=$(./aitbc-cli market search --query "data processing" | grep "service_id" | head -1 | cut -d" " -f2)
./aitbc-cli market bid --service-id $DATA_SERVICE_ID --amount 30 --wallet enterprise-1
# Data provider processes raw data
./aitbc-cli marketplace --action accept-bid --service-id $DATA_SERVICE_ID --bid-id "bid_789" --wallet marketplace-provider
./aitbc-cli market accept-bid --service-id $DATA_SERVICE_ID --bid-id "bid_789" --wallet marketplace-provider
# Enterprise submits AI analysis on processed data
./aitbc-cli ai-submit --wallet enterprise-1 --type inference \
./aitbc-cli ai submit --wallet enterprise-1 --type inference \
--prompt "Analyze processed data for trends and patterns" \
--payment 200 --input-data "/data/processed_data.csv"
# Results are delivered and verified
./aitbc-cli ai-results --job-id "ai_job_789"
./aitbc-cli ai results --job-id "ai_job_789"
# Enterprise pays for services
./aitbc-cli marketplace --action settle-payment --service-id $DATA_SERVICE_ID --amount 30 --wallet enterprise-1
./aitbc-cli market settle-payment --service-id $DATA_SERVICE_ID --amount 30 --wallet enterprise-1
```
## GPU Provider Testing
@@ -194,7 +186,7 @@ DATA_SERVICE_ID=$(./aitbc-cli marketplace --action search --query "data processi
```bash
# Test GPU allocation and deallocation
./aitbc-cli resource allocate --agent-id "gpu-worker-1" --gpu 1 --memory 8192 --duration 3600
./aitbc-cli resource allocate --agent-id "gpu-worker-1" --memory 8192 --duration 3600
# Verify GPU allocation
./aitbc-cli resource status --agent-id "gpu-worker-1"
@@ -207,7 +199,7 @@ DATA_SERVICE_ID=$(./aitbc-cli marketplace --action search --query "data processi
# Test concurrent GPU allocations
for i in {1..5}; do
./aitbc-cli resource allocate --agent-id "gpu-worker-$i" --gpu 1 --memory 8192 --duration 1800 &
./aitbc-cli resource allocate --agent-id "gpu-worker-$i" --memory 8192 --duration 1800 &
done
wait
@@ -219,16 +211,16 @@ wait
```bash
# Test GPU performance with different workloads
./aitbc-cli ai-submit --wallet gpu-provider --type inference \
./aitbc-cli ai submit --wallet gpu-provider --type inference \
--prompt "Generate high-resolution image" --payment 100 \
--gpu-allocated 1 --resolution "1024x1024"
./aitbc-cli ai-submit --wallet gpu-provider --type training \
./aitbc-cli ai submit --wallet gpu-provider --type training \
--model "large-model" --dataset "/data/large_dataset.csv" --payment 500 \
--gpu-allocated 1 --batch-size 64
# Monitor GPU performance metrics
./aitbc-cli ai-metrics --agent-id "gpu-worker-1" --period "1h"
./aitbc-cli ai metrics --agent-id "gpu-worker-1" --period "1h"
# Test GPU memory management
./aitbc-cli resource test --type gpu --memory-stress --duration 300
@@ -238,13 +230,13 @@ wait
```bash
# Test GPU provider revenue tracking
./aitbc-cli marketplace --action revenue --wallet gpu-provider --period "24h"
./aitbc-cli market revenue --wallet gpu-provider --period "24h"
# Test GPU utilization optimization
./aitbc-cli marketplace --action optimize --wallet gpu-provider --metric "utilization"
./aitbc-cli market optimize --wallet gpu-provider --metric "utilization"
# Test GPU pricing strategy
./aitbc-cli marketplace --action pricing --service-id $GPU_SERVICE_ID --strategy "dynamic"
./aitbc-cli market pricing --service-id $GPU_SERVICE_ID --strategy "dynamic"
```
## Transaction Tracking
@@ -253,45 +245,45 @@ wait
```bash
# Monitor all marketplace transactions
./aitbc-cli marketplace --action transactions --period "1h"
./aitbc-cli market transactions --period "1h"
# Track specific service transactions
./aitbc-cli marketplace --action transactions --service-id $SERVICE_ID
./aitbc-cli market transactions --service-id $SERVICE_ID
# Monitor customer transaction history
./aitbc-cli transactions --name customer-1 --limit 50
./aitbc-cli wallet transactions customer-1 --limit 50
# Track provider revenue
./aitbc-cli marketplace --action revenue --wallet marketplace-provider --period "24h"
./aitbc-cli market revenue --wallet marketplace-provider --period "24h"
```
### Transaction Verification
```bash
# Verify transaction integrity
./aitbc-cli transaction verify --tx-id "tx_123"
./aitbc-cli wallet transaction verify --tx-id "tx_123"
# Check transaction confirmation status
./aitbc-cli transaction status --tx-id "tx_123"
./aitbc-cli wallet transaction status --tx-id "tx_123"
# Verify marketplace settlement
./aitbc-cli marketplace --action verify-settlement --service-id $SERVICE_ID
./aitbc-cli market verify-settlement --service-id $SERVICE_ID
# Audit transaction trail
./aitbc-cli marketplace --action audit --period "24h"
./aitbc-cli market audit --period "24h"
```
### Cross-Node Transaction Tracking
```bash
# Monitor transactions across both nodes
./aitbc-cli transactions --cross-node --period "1h"
./aitbc-cli wallet transactions --cross-node --period "1h"
# Verify transaction propagation
./aitbc-cli transaction verify-propagation --tx-id "tx_123"
./aitbc-cli wallet transaction verify-propagation --tx-id "tx_123"
# Track cross-node marketplace activity
./aitbc-cli marketplace --action cross-node-stats --period "24h"
./aitbc-cli market cross-node-stats --period "24h"
```
## Verification Procedures
@@ -300,39 +292,39 @@ wait
```bash
# Verify service provider performance
./aitbc-cli marketplace --action verify-provider --wallet ai-service-provider
./aitbc-cli market verify-provider --wallet ai-service-provider
# Check service quality metrics
./aitbc-cli marketplace --action quality-metrics --service-id $SERVICE_ID
./aitbc-cli market quality-metrics --service-id $SERVICE_ID
# Verify customer satisfaction
./aitbc-cli marketplace --action satisfaction --wallet customer-1 --period "7d"
./aitbc-cli market satisfaction --wallet customer-1 --period "7d"
```
### Compliance Verification
```bash
# Verify marketplace compliance
./aitbc-cli marketplace --action compliance-check --period "24h"
./aitbc-cli market compliance-check --period "24h"
# Check regulatory compliance
./aitbc-cli marketplace --action regulatory-audit --period "30d"
./aitbc-cli market regulatory-audit --period "30d"
# Verify data privacy compliance
./aitbc-cli marketplace --action privacy-audit --service-id $SERVICE_ID
./aitbc-cli market privacy-audit --service-id $SERVICE_ID
```
### Financial Verification
```bash
# Verify financial transactions
./aitbc-cli marketplace --action financial-audit --period "24h"
./aitbc-cli market financial-audit --period "24h"
# Check payment processing
./aitbc-cli marketplace --action payment-verify --period "1h"
./aitbc-cli market payment-verify --period "1h"
# Reconcile marketplace accounts
./aitbc-cli marketplace --action reconcile --period "24h"
./aitbc-cli market reconcile --period "24h"
```
## Performance Testing
@@ -342,41 +334,41 @@ wait
```bash
# Simulate high transaction volume
for i in {1..100}; do
./aitbc-cli marketplace --action bid --service-id $SERVICE_ID --amount 100 --wallet test-wallet-$i &
./aitbc-cli market bid --service-id $SERVICE_ID --amount 100 --wallet test-wallet-$i &
done
wait
# Monitor system performance under load
./aitbc-cli marketplace --action performance-metrics --period "5m"
./aitbc-cli market performance-metrics --period "5m"
# Test marketplace scalability
./aitbc-cli marketplace --action stress-test --transactions 1000 --concurrent 50
./aitbc-cli market stress-test --transactions 1000 --concurrent 50
```
### Latency Testing
```bash
# Test transaction processing latency
time ./aitbc-cli marketplace --action bid --service-id $SERVICE_ID --amount 100 --wallet test-wallet
time ./aitbc-cli market bid --service-id $SERVICE_ID --amount 100 --wallet test-wallet
# Test AI job submission latency
time ./aitbc-cli ai-submit --wallet test-wallet --type inference --prompt "test" --payment 50
time ./aitbc-cli ai submit --wallet test-wallet --type inference --prompt "test" --payment 50
# Monitor overall system latency
./aitbc-cli marketplace --action latency-metrics --period "1h"
./aitbc-cli market latency-metrics --period "1h"
```
### Throughput Testing
```bash
# Test marketplace throughput
./aitbc-cli marketplace --action throughput-test --duration 300 --transactions-per-second 10
./aitbc-cli market throughput-test --duration 300 --transactions-per-second 10
# Test AI job throughput
./aitbc-cli marketplace --action ai-throughput-test --duration 300 --jobs-per-minute 5
./aitbc-cli market ai-throughput-test --duration 300 --jobs-per-minute 5
# Monitor system capacity
./aitbc-cli marketplace --action capacity-metrics --period "24h"
./aitbc-cli market capacity-metrics --period "24h"
```
## Troubleshooting Marketplace Issues
@@ -395,16 +387,16 @@ time ./aitbc-cli ai-submit --wallet test-wallet --type inference --prompt "test"
```bash
# Diagnose marketplace connectivity
./aitbc-cli marketplace --action connectivity-test
./aitbc-cli market connectivity-test
# Check marketplace service health
./aitbc-cli marketplace --action health-check
./aitbc-cli market health-check
# Verify marketplace data integrity
./aitbc-cli marketplace --action integrity-check
./aitbc-cli market integrity-check
# Debug marketplace transactions
./aitbc-cli marketplace --action debug --transaction-id "tx_123"
./aitbc-cli market debug --transaction-id "tx_123"
```
## Automation Scripts
@@ -418,31 +410,30 @@ time ./aitbc-cli ai-submit --wallet test-wallet --type inference --prompt "test"
echo "Starting automated marketplace testing..."
# Create test wallets
./aitbc-cli create --name test-customer --password 123
./aitbc-cli create --name test-provider --password 123
./aitbc-cli wallet create test-customer 123
./aitbc-cli wallet create test-provider 123
# Fund test wallets
CUSTOMER_ADDR=$(./aitbc-cli list | grep "test-customer:" | cut -d" " -f2)
PROVIDER_ADDR=$(./aitbc-cli list | grep "test-provider:" | cut -d" " -f2)
CUSTOMER_ADDR=$(./aitbc-cli wallet list | grep "test-customer:" | cut -d" " -f2)
PROVIDER_ADDR=$(./aitbc-cli wallet list | grep "test-provider:" | cut -d" " -f2)
./aitbc-cli send --from genesis-ops --to $CUSTOMER_ADDR --amount 1000 --password 123
./aitbc-cli send --from genesis-ops --to $PROVIDER_ADDR --amount 1000 --password 123
./aitbc-cli wallet send genesis-ops $CUSTOMER_ADDR 1000 123
./aitbc-cli wallet send genesis-ops $PROVIDER_ADDR 1000 123
# Create test service
./aitbc-cli marketplace --action create \
--name "Test AI Service" \
./aitbc-cli market create \
--type ai-inference \
--price 50 \
--wallet test-provider \
--description "Automated test service"
--description "Test AI Service"
# Test complete workflow
SERVICE_ID=$(./aitbc-cli marketplace --action list | grep "Test AI Service" | grep "service_id" | cut -d" " -f2)
SERVICE_ID=$(./aitbc-cli market list | grep "Test AI Service" | grep "service_id" | cut -d" " -f2)
./aitbc-cli marketplace --action bid --service-id $SERVICE_ID --amount 60 --wallet test-customer
./aitbc-cli marketplace --action accept-bid --service-id $SERVICE_ID --bid-id "test_bid" --wallet test-provider
./aitbc-cli market bid --service-id $SERVICE_ID --amount 60 --wallet test-customer
./aitbc-cli market accept-bid --service-id $SERVICE_ID --bid-id "test_bid" --wallet test-provider
./aitbc-cli ai-submit --wallet test-customer --type inference --prompt "test image" --payment 60
./aitbc-cli ai submit --wallet test-customer --type inference --prompt "test image" --payment 60
# Verify results
echo "Test completed successfully!"
@@ -458,9 +449,9 @@ while true; do
TIMESTAMP=$(date +%Y-%m-%d_%H:%M:%S)
# Collect metrics
ACTIVE_SERVICES=$(./aitbc-cli marketplace --action list | grep -c "service_id")
PENDING_BIDS=$(./aitbc-cli marketplace --action pending-bids | grep -c "bid_id")
TOTAL_VOLUME=$(./aitbc-cli marketplace --action volume --period "1h")
ACTIVE_SERVICES=$(./aitbc-cli market list | grep -c "service_id")
PENDING_BIDS=$(./aitbc-cli market pending-bids | grep -c "bid_id")
TOTAL_VOLUME=$(./aitbc-cli market volume --period "1h")
# Log metrics
echo "$TIMESTAMP,services:$ACTIVE_SERVICES,bids:$PENDING_BIDS,volume:$TOTAL_VOLUME" >> /var/log/aitbc/marketplace_performance.log

View File

@@ -53,18 +53,18 @@ watch -n 10 'curl -s http://localhost:8006/rpc/head | jq "{height: .height, time
```bash
# Check wallet balances
cd /opt/aitbc && source venv/bin/activate
./aitbc-cli balance --name genesis-ops
./aitbc-cli balance --name user-wallet
./aitbc-cli wallet balance genesis-ops
./aitbc-cli wallet balance user-wallet
# Send transactions
./aitbc-cli send --from genesis-ops --to user-wallet --amount 100 --password 123
./aitbc-cli wallet send genesis-ops user-wallet 100 123
# Check transaction history
./aitbc-cli transactions --name genesis-ops --limit 10
./aitbc-cli wallet transactions genesis-ops --limit 10
# Cross-node transaction
FOLLOWER_ADDR=$(ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli list | grep "follower-ops:" | cut -d" " -f2')
./aitbc-cli send --from genesis-ops --to $FOLLOWER_ADDR --amount 50 --password 123
FOLLOWER_ADDR=$(ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet list | grep "follower-ops:" | cut -d" " -f2')
./aitbc-cli wallet send genesis-ops $FOLLOWER_ADDR 50 123
```
## Health Monitoring
@@ -216,7 +216,7 @@ curl -s http://localhost:8006/rpc/head | jq .height
sudo grep "Failed password" /var/log/auth.log | tail -10
# Monitor blockchain for suspicious activity
./aitbc-cli transactions --name genesis-ops --limit 20 | grep -E "(large|unusual)"
./aitbc-cli wallet transactions genesis-ops --limit 20 | grep -E "(large|unusual)"
# Check file permissions
ls -la /var/lib/aitbc/

View File

@@ -111,17 +111,17 @@ echo "Height difference: $((FOLLOWER_HEIGHT - GENESIS_HEIGHT))"
```bash
# List all wallets
cd /opt/aitbc && source venv/bin/activate
./aitbc-cli list
./aitbc-cli wallet list
# Check specific wallet balance
./aitbc-cli balance --name genesis-ops
./aitbc-cli balance --name follower-ops
./aitbc-cli wallet balance genesis-ops
./aitbc-cli wallet balance follower-ops
# Verify wallet addresses
./aitbc-cli list | grep -E "(genesis-ops|follower-ops)"
./aitbc-cli wallet list | grep -E "(genesis-ops|follower-ops)"
# Test wallet operations
./aitbc-cli send --from genesis-ops --to follower-ops --amount 10 --password 123
./aitbc-cli wallet send genesis-ops follower-ops 10 123
```
### Network Verification
@@ -133,7 +133,7 @@ ssh aitbc1 'ping -c 3 localhost'
# Test RPC endpoints
curl -s http://localhost:8006/rpc/head > /dev/null && echo "Local RPC OK"
ssh aitbc1 'curl -s http://localhost:8006/rpc/head > /dev/null && echo "Remote RPC OK"'
ssh aitbc1 'curl -s http://localhost:8007/rpc/head > /dev/null && echo "Remote RPC OK"'
# Test P2P connectivity
telnet aitbc1 7070
@@ -146,16 +146,16 @@ ping -c 5 aitbc1 | tail -1
```bash
# Check AI services
./aitbc-cli marketplace --action list
./aitbc-cli market list
# Test AI job submission
./aitbc-cli ai-submit --wallet genesis-ops --type inference --prompt "test" --payment 10
./aitbc-cli ai submit --wallet genesis-ops --type inference --prompt "test" --payment 10
# Verify resource allocation
./aitbc-cli resource status
# Check AI job status
./aitbc-cli ai-status --job-id "latest"
./aitbc-cli ai status --job-id "latest"
```
### Smart Contract Verification
@@ -263,16 +263,16 @@ Redis Service (for gossip)
```bash
# Quick health check
./aitbc-cli chain && ./aitbc-cli network
./aitbc-cli blockchain info && ./aitbc-cli network status
# Service status
systemctl status aitbc-blockchain-node.service aitbc-blockchain-rpc.service
# Cross-node sync check
curl -s http://localhost:8006/rpc/head | jq .height && ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height'
curl -s http://localhost:8006/rpc/head | jq .height && ssh aitbc1 'curl -s http://localhost:8007/rpc/head | jq .height'
# Wallet balance check
./aitbc-cli balance --name genesis-ops
./aitbc-cli wallet balance genesis-ops
```
### Troubleshooting
@@ -347,20 +347,20 @@ SESSION_ID="task-$(date +%s)"
openclaw agent --agent main --session-id $SESSION_ID --message "Task description"
# Always verify transactions
./aitbc-cli transactions --name wallet-name --limit 5
./aitbc-cli wallet transactions wallet-name --limit 5
# Monitor cross-node synchronization
watch -n 10 'curl -s http://localhost:8006/rpc/head | jq .height && ssh aitbc1 "curl -s http://localhost:8006/rpc/head | jq .height"'
watch -n 10 'curl -s http://localhost:8006/rpc/head | jq .height && ssh aitbc1 "curl -s http://localhost:8007/rpc/head | jq .height"'
```
### Development Best Practices
```bash
# Test in development environment first
./aitbc-cli send --from test-wallet --to test-wallet --amount 1 --password test
./aitbc-cli wallet send test-wallet test-wallet 1 test
# Use meaningful wallet names
./aitbc-cli create --name "genesis-operations" --password "strong_password"
./aitbc-cli wallet create "genesis-operations" "strong_password"
# Document all configuration changes
git add /etc/aitbc/.env
@@ -424,14 +424,14 @@ sudo systemctl restart aitbc-blockchain-node.service
**Problem**: Wallet balance incorrect
```bash
# Check correct node
./aitbc-cli balance --name wallet-name
ssh aitbc1 './aitbc-cli balance --name wallet-name'
./aitbc-cli wallet balance wallet-name
ssh aitbc1 './aitbc-cli wallet balance wallet-name'
# Verify wallet address
./aitbc-cli list | grep "wallet-name"
./aitbc-cli wallet list | grep "wallet-name"
# Check transaction history
./aitbc-cli transactions --name wallet-name --limit 10
./aitbc-cli wallet transactions wallet-name --limit 10
```
#### AI Operations Issues
@@ -439,16 +439,16 @@ ssh aitbc1 './aitbc-cli balance --name wallet-name'
**Problem**: AI jobs not processing
```bash
# Check AI services
./aitbc-cli marketplace --action list
./aitbc-cli market list
# Check resource allocation
./aitbc-cli resource status
# Check job status
./aitbc-cli ai-status --job-id "job_id"
# Check AI job status
./aitbc-cli ai status --job-id "job_id"
# Verify wallet balance
./aitbc-cli balance --name wallet-name
./aitbc-cli wallet balance wallet-name
```
### Emergency Procedures

View File

@@ -103,7 +103,7 @@ ssh aitbc1 '/opt/aitbc/scripts/workflow/03_follower_node_setup.sh'
```bash
# Monitor sync progress on both nodes
watch -n 5 'echo "=== Genesis Node ===" && curl -s http://localhost:8006/rpc/head | jq .height && echo "=== Follower Node ===" && ssh aitbc1 "curl -s http://localhost:8006/rpc/head | jq .height"'
watch -n 5 'echo "=== Genesis Node ===" && curl -s http://localhost:8006/rpc/head | jq .height && echo "=== Follower Node ===" && ssh aitbc1 "curl -s http://localhost:8007/rpc/head | jq .height"'
```
### 5. Basic Wallet Operations
@@ -113,30 +113,30 @@ watch -n 5 'echo "=== Genesis Node ===" && curl -s http://localhost:8006/rpc/hea
cd /opt/aitbc && source venv/bin/activate
# Create genesis operations wallet
./aitbc-cli create --name genesis-ops --password 123
./aitbc-cli wallet create genesis-ops 123
# Create user wallet
./aitbc-cli create --name user-wallet --password 123
./aitbc-cli wallet create user-wallet 123
# List wallets
./aitbc-cli list
./aitbc-cli wallet list
# Check balances
./aitbc-cli balance --name genesis-ops
./aitbc-cli balance --name user-wallet
./aitbc-cli wallet balance genesis-ops
./aitbc-cli wallet balance user-wallet
```
### 6. Cross-Node Transaction Test
```bash
# Get follower node wallet address
FOLLOWER_WALLET_ADDR=$(ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli create --name follower-ops --password 123 | grep "Address:" | cut -d" " -f2')
FOLLOWER_WALLET_ADDR=$(ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet create follower-ops 123 | grep "Address:" | cut -d" " -f2')
# Send transaction from genesis to follower
./aitbc-cli send --from genesis-ops --to $FOLLOWER_WALLET_ADDR --amount 1000 --password 123
./aitbc-cli wallet send genesis-ops $FOLLOWER_WALLET_ADDR 1000 123
# Verify transaction on follower node
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli balance --name follower-ops'
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet balance follower-ops'
```
## Verification Commands
@@ -148,15 +148,15 @@ ssh aitbc1 'systemctl status aitbc-blockchain-node.service aitbc-blockchain-rpc.
# Check blockchain heights match
curl -s http://localhost:8006/rpc/head | jq .height
ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height'
ssh aitbc1 'curl -s http://localhost:8007/rpc/head | jq .height'
# Check network connectivity
ping -c 3 aitbc1
ssh aitbc1 'ping -c 3 localhost'
# Verify wallet creation
./aitbc-cli list
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli list'
./aitbc-cli wallet list
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet list'
```
## Troubleshooting Core Setup

View File

@@ -33,25 +33,25 @@ openclaw agent --agent main --session-id $SESSION_ID --message "Report progress"
# AITBC CLI — always from /opt/aitbc with venv
cd /opt/aitbc && source venv/bin/activate
./aitbc-cli create --name wallet-name
./aitbc-cli list
./aitbc-cli balance --name wallet-name
./aitbc-cli send --from wallet1 --to address --amount 100 --password pass
./aitbc-cli chain
./aitbc-cli network
./aitbc-cli wallet create wallet-name
./aitbc-cli wallet list
./aitbc-cli wallet balance wallet-name
./aitbc-cli wallet send wallet1 address 100 pass
./aitbc-cli blockchain info
./aitbc-cli network status
# AI Operations (NEW)
./aitbc-cli ai-submit --wallet wallet --type inference --prompt "Generate image" --payment 100
./aitbc-cli ai submit --wallet wallet --type inference --prompt "Generate image" --payment 100
./aitbc-cli agent create --name ai-agent --description "AI agent"
./aitbc-cli resource allocate --agent-id ai-agent --gpu 1 --memory 8192 --duration 3600
./aitbc-cli marketplace --action create --name "AI Service" --price 50 --wallet wallet
./aitbc-cli resource allocate --agent-id ai-agent --memory 8192 --duration 3600
./aitbc-cli market create --type ai-inference --price 50 --description "AI Service" --wallet wallet
# Cross-node — always activate venv on remote
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli list'
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet list'
# RPC checks
curl -s http://localhost:8006/rpc/head | jq '.height'
ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height'
ssh aitbc1 'curl -s http://localhost:8007/rpc/head | jq .height'
# Smart Contract Messaging (NEW)
curl -X POST http://localhost:8006/rpc/messaging/topics/create \
@@ -219,11 +219,11 @@ openclaw agent --agent main --message "Teach me AITBC Agent Messaging Contract f
```bash
# Blockchain height (both nodes)
curl -s http://localhost:8006/rpc/head | jq '.height'
ssh aitbc1 'curl -s http://localhost:8006/rpc/head | jq .height'
ssh aitbc1 'curl -s http://localhost:8007/rpc/head | jq .height'
# Wallets
cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli list
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli list'
cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet list
ssh aitbc1 'cd /opt/aitbc && source venv/bin/activate && ./aitbc-cli wallet list'
# Services
systemctl is-active aitbc-blockchain-{node,rpc}.service