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
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user