Update data directory paths from /opt/aitbc/data to /var/lib/aitbc/data across all components
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Waiting to run
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Waiting to run
Python Tests / test-python (push) Waiting to run
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Waiting to run
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Waiting to run
Python Tests / test-python (push) Waiting to run
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
This commit is contained in:
@@ -28,15 +28,15 @@ import json
|
||||
import time
|
||||
|
||||
# Load economic system
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
# Load agent registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
# Load job marketplace
|
||||
with open('/opt/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
print(f'Treasury Address: {economics[\"treasury_address\"]}')
|
||||
|
||||
@@ -69,17 +69,17 @@ echo ""
|
||||
echo -e "${CYAN}🤖 WORLDWIDE AGENT ECONOMY${NC}"
|
||||
echo "=========================="
|
||||
|
||||
if [[ -f "/opt/aitbc/data/agent_registry.json" ]]; then
|
||||
if [[ -f "/var/lib/aitbc/data/agent_registry.json" ]]; then
|
||||
economy_info=$("$PYTHON_CMD" -c "
|
||||
import json
|
||||
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
# Calculate global metrics
|
||||
@@ -121,7 +121,7 @@ cd "$AITBC_ROOT"
|
||||
"$PYTHON_CMD" -c "
|
||||
import json
|
||||
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
# Sort agents by earnings
|
||||
@@ -142,10 +142,10 @@ cd "$AITBC_ROOT"
|
||||
"$PYTHON_CMD" -c "
|
||||
import json
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
print(f'Treasury: {economics[\"treasury_address\"]}')
|
||||
|
||||
@@ -57,7 +57,7 @@ gpu_listing = {
|
||||
}
|
||||
|
||||
# Save GPU listing
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump({'gpu_listings': {gpu_listing['id']: gpu_listing}}, f, indent=2)
|
||||
|
||||
print(f'✅ GPU Listing Created:')
|
||||
@@ -80,11 +80,11 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Load agent registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
# Get first GPU listing and agent
|
||||
@@ -114,7 +114,7 @@ if 'bids' not in gpu_listing:
|
||||
gpu_listing['bids'][bid['id']] = bid
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print(f'✅ Agent Bid Created:')
|
||||
@@ -133,7 +133,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 3: Sync to aitbc1${NC}"
|
||||
echo "======================"
|
||||
|
||||
scp /opt/aitbc/data/gpu_marketplace.json aitbc1:/opt/aitbc/data/
|
||||
scp /var/lib/aitbc/data/gpu_marketplace.json aitbc1:/var/lib/aitbc/data/
|
||||
echo "✅ GPU marketplace synced to aitbc1"
|
||||
|
||||
echo ""
|
||||
@@ -147,7 +147,7 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Get the bid
|
||||
@@ -167,7 +167,7 @@ gpu_listing['reserved_by'] = bid['agent_id']
|
||||
gpu_listing['reservation_expires'] = time.time() + (bid['duration_hours'] * 3600)
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print(f'✅ Bid Confirmed by aitbc1:')
|
||||
@@ -185,7 +185,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 5: Sync Back to Server${NC}"
|
||||
echo "=========================="
|
||||
|
||||
scp aitbc1:/opt/aitbc/data/gpu_marketplace.json /opt/aitbc/data/
|
||||
scp aitbc1:/var/lib/aitbc/data/gpu_marketplace.json /var/lib/aitbc/data/
|
||||
echo "✅ Confirmed bid synced back to server"
|
||||
|
||||
echo ""
|
||||
@@ -200,7 +200,7 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Get the confirmed bid
|
||||
@@ -233,7 +233,7 @@ bid['task'] = task
|
||||
bid['status'] = 'task_sent'
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print(f'✅ Ollama Task Sent:')
|
||||
@@ -251,7 +251,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 7: Sync Task to aitbc1${NC}"
|
||||
echo "=========================="
|
||||
|
||||
scp /opt/aitbc/data/gpu_marketplace.json aitbc1:/opt/aitbc/data/
|
||||
scp /var/lib/aitbc/data/gpu_marketplace.json aitbc1:/var/lib/aitbc/data/
|
||||
echo "✅ Task synced to aitbc1"
|
||||
|
||||
echo ""
|
||||
@@ -265,7 +265,7 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Get the task
|
||||
@@ -293,7 +293,7 @@ del gpu_listing['reserved_by']
|
||||
del gpu_listing['reservation_expires']
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print(f'✅ Task Completed by aitbc1:')
|
||||
@@ -310,7 +310,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 9: Sync Completion to Server${NC}"
|
||||
echo "==========================="
|
||||
|
||||
scp aitbc1:/opt/aitbc/data/gpu_marketplace.json /opt/aitbc/data/
|
||||
scp aitbc1:/var/lib/aitbc/data/gpu_marketplace.json /var/lib/aitbc/data/
|
||||
echo "✅ Task completion synced to server"
|
||||
|
||||
echo ""
|
||||
@@ -325,15 +325,15 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Load economic system
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
# Load agent registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
# Get the completed bid
|
||||
@@ -379,13 +379,13 @@ bid['payment_status'] = 'paid'
|
||||
bid['paid_at'] = time.time()
|
||||
|
||||
# Save all updated files
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'w') as f:
|
||||
json.dump(economics, f, indent=2)
|
||||
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'w') as f:
|
||||
json.dump(registry, f, indent=2)
|
||||
|
||||
print(f'✅ Blockchain Payment Processed:')
|
||||
@@ -404,7 +404,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 11: Final Sync to aitbc1${NC}"
|
||||
echo "=========================="
|
||||
|
||||
scp /opt/aitbc/data/gpu_marketplace.json /opt/aitbc/data/economic_system.json /opt/aitbc/data/agent_registry.json aitbc1:/opt/aitbc/data/
|
||||
scp /var/lib/aitbc/data/gpu_marketplace.json /var/lib/aitbc/data/economic_system.json /var/lib/aitbc/data/agent_registry.json aitbc1:/var/lib/aitbc/data/
|
||||
echo "✅ Final payment data synced to aitbc1"
|
||||
|
||||
echo ""
|
||||
@@ -426,10 +426,10 @@ cd "$AITBC_ROOT"
|
||||
import json
|
||||
|
||||
# Load final data
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
gpu_id = list(marketplace['gpu_listings'].keys())[0]
|
||||
|
||||
@@ -103,9 +103,9 @@ agent_registry = {
|
||||
}
|
||||
|
||||
# Save agent registry
|
||||
registry_file = '/opt/aitbc/data/agent_registry.json'
|
||||
registry_file = '/var/lib/aitbc/data/agent_registry.json'
|
||||
import os
|
||||
os.makedirs('/opt/aitbc/data', exist_ok=True)
|
||||
os.makedirs('/var/lib/aitbc/data', exist_ok=True)
|
||||
|
||||
with open(registry_file, 'w') as f:
|
||||
json.dump(agent_registry, f, indent=2)
|
||||
@@ -152,9 +152,9 @@ job_marketplace = {
|
||||
}
|
||||
|
||||
# Save job marketplace
|
||||
marketplace_file = '/opt/aitbc/data/job_marketplace.json'
|
||||
marketplace_file = '/var/lib/aitbc/data/job_marketplace.json'
|
||||
import os
|
||||
os.makedirs('/opt/aitbc/data', exist_ok=True)
|
||||
os.makedirs('/var/lib/aitbc/data', exist_ok=True)
|
||||
|
||||
with open(marketplace_file, 'w') as f:
|
||||
json.dump(job_marketplace, f, indent=2)
|
||||
@@ -197,9 +197,9 @@ economic_system = {
|
||||
}
|
||||
|
||||
# Save economic system
|
||||
economic_file = '/opt/aitbc/data/economic_system.json'
|
||||
economic_file = '/var/lib/aitbc/data/economic_system.json'
|
||||
import os
|
||||
os.makedirs('/opt/aitbc/data', exist_ok=True)
|
||||
os.makedirs('/var/lib/aitbc/data', exist_ok=True)
|
||||
|
||||
with open(economic_file, 'w') as f:
|
||||
json.dump(economic_system, f, indent=2)
|
||||
@@ -224,7 +224,7 @@ import time
|
||||
import random
|
||||
|
||||
# Load agent registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
agent_registry = json.load(f)
|
||||
|
||||
# Create sample agents
|
||||
@@ -256,7 +256,7 @@ for agent in sample_agents:
|
||||
agent_registry['last_updated'] = time.time()
|
||||
|
||||
# Save updated registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'w') as f:
|
||||
json.dump(agent_registry, f, indent=2)
|
||||
|
||||
print('✅ Sample Agents Created')
|
||||
@@ -280,11 +280,11 @@ import time
|
||||
import random
|
||||
|
||||
# Load job marketplace
|
||||
with open('/opt/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/job_marketplace.json', 'r') as f:
|
||||
job_marketplace = json.load(f)
|
||||
|
||||
# Load agent registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
agent_registry = json.load(f)
|
||||
|
||||
# Create sample jobs
|
||||
@@ -317,7 +317,7 @@ for job in sample_jobs:
|
||||
job_marketplace['last_updated'] = time.time()
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/job_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/job_marketplace.json', 'w') as f:
|
||||
json.dump(job_marketplace, f, indent=2)
|
||||
|
||||
print('✅ Sample Jobs Created')
|
||||
@@ -342,9 +342,9 @@ echo " Jobs: 3 sample jobs posted"
|
||||
echo " Economy: Treasury and reward pool established"
|
||||
echo ""
|
||||
echo "🔗 System Components:"
|
||||
echo " Agent Registry: /opt/aitbc/data/agent_registry.json"
|
||||
echo " Job Marketplace: /opt/aitbc/data/job_marketplace.json"
|
||||
echo " Economic System: /opt/aitbc/data/economic_system.json"
|
||||
echo " Agent Registry: /var/lib/aitbc/data/agent_registry.json"
|
||||
echo " Job Marketplace: /var/lib/aitbc/data/job_marketplace.json"
|
||||
echo " Economic System: /var/lib/aitbc/data/economic_system.json"
|
||||
echo ""
|
||||
echo "🚀 Next Operations:"
|
||||
echo " 1. Monitor agent activity: ./scripts/agent-dashboard.sh"
|
||||
|
||||
@@ -61,11 +61,11 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Load agent registry
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
# Get the real GPU listing and agent
|
||||
@@ -95,7 +95,7 @@ if 'bids' not in gpu_listing:
|
||||
gpu_listing['bids'][bid['id']] = bid
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print(f'✅ Realistic Agent Bid Created:')
|
||||
@@ -115,7 +115,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 3: Sync to aitbc1${NC}"
|
||||
echo "======================"
|
||||
|
||||
scp /opt/aitbc/data/gpu_marketplace.json aitbc1:/opt/aitbc/data/
|
||||
scp /var/lib/aitbc/data/gpu_marketplace.json aitbc1:/var/lib/aitbc/data/
|
||||
echo "✅ Real GPU marketplace synced to aitbc1"
|
||||
|
||||
echo ""
|
||||
@@ -129,7 +129,7 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Get the bid
|
||||
@@ -149,7 +149,7 @@ gpu_listing['reserved_by'] = bid['agent_id']
|
||||
gpu_listing['reservation_expires'] = time.time() + (bid['duration_hours'] * 3600)
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print('✅ Real GPU Bid Confirmed by aitbc1:')
|
||||
@@ -172,7 +172,7 @@ echo ""
|
||||
echo -e "${CYAN}🚀 Step 5: Send Real AI Task${NC}"
|
||||
echo "=========================="
|
||||
|
||||
scp aitbc1:/opt/aitbc/data/gpu_marketplace.json /opt/aitbc/data/
|
||||
scp aitbc1:/var/lib/aitbc/data/gpu_marketplace.json /var/lib/aitbc/data/
|
||||
|
||||
cd "$AITBC_ROOT"
|
||||
"$PYTHON_CMD" -c "
|
||||
@@ -180,7 +180,7 @@ import json
|
||||
import time
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Get the confirmed bid
|
||||
@@ -214,7 +214,7 @@ bid['task'] = task
|
||||
bid['status'] = 'task_sent'
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print('✅ Real AI Task Sent:')
|
||||
@@ -232,7 +232,7 @@ echo ""
|
||||
echo -e "${CYAN}⚡ Step 6: Execute on Real GPU${NC}"
|
||||
echo "==========================="
|
||||
|
||||
scp /opt/aitbc/data/gpu_marketplace.json aitbc1:/opt/aitbc/data/
|
||||
scp /var/lib/aitbc/data/gpu_marketplace.json aitbc1:/var/lib/aitbc/data/
|
||||
|
||||
cat > /tmp/execute_real_task.py << 'EOF'
|
||||
import json
|
||||
@@ -240,7 +240,7 @@ import time
|
||||
import subprocess
|
||||
|
||||
# Load GPU marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
# Get the task
|
||||
@@ -282,7 +282,7 @@ del gpu_listing['reserved_by']
|
||||
del gpu_listing['reservation_expires']
|
||||
|
||||
# Save updated marketplace
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
print('✅ Real GPU Task Completed:')
|
||||
@@ -303,7 +303,7 @@ echo ""
|
||||
echo -e "${CYAN}💰 Step 7: Process Real Payment${NC}"
|
||||
echo "=========================="
|
||||
|
||||
scp aitbc1:/opt/aitbc/data/gpu_marketplace.json /opt/aitbc/data/
|
||||
scp aitbc1:/var/lib/aitbc/data/gpu_marketplace.json /var/lib/aitbc/data/
|
||||
|
||||
cd "$AITBC_ROOT"
|
||||
"$PYTHON_CMD" -c "
|
||||
@@ -311,13 +311,13 @@ import json
|
||||
import time
|
||||
|
||||
# Load data files
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'r') as f:
|
||||
registry = json.load(f)
|
||||
|
||||
# Get the completed bid
|
||||
@@ -365,13 +365,13 @@ bid['payment_status'] = 'paid'
|
||||
bid['paid_at'] = time.time()
|
||||
|
||||
# Save all updated files
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'w') as f:
|
||||
json.dump(marketplace, f, indent=2)
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'w') as f:
|
||||
json.dump(economics, f, indent=2)
|
||||
|
||||
with open('/opt/aitbc/data/agent_registry.json', 'w') as f:
|
||||
with open('/var/lib/aitbc/data/agent_registry.json', 'w') as f:
|
||||
json.dump(registry, f, indent=2)
|
||||
|
||||
print('✅ Real GPU Payment Processed:')
|
||||
@@ -392,7 +392,7 @@ echo ""
|
||||
echo -e "${CYAN}🔄 Step 8: Final Sync to aitbc1${NC}"
|
||||
echo "=========================="
|
||||
|
||||
scp /opt/aitbc/data/gpu_marketplace.json /opt/aitbc/data/economic_system.json /opt/aitbc/data/agent_registry.json aitbc1:/opt/aitbc/data/
|
||||
scp /var/lib/aitbc/data/gpu_marketplace.json /var/lib/aitbc/data/economic_system.json /var/lib/aitbc/data/agent_registry.json aitbc1:/var/lib/aitbc/data/
|
||||
echo "✅ Real GPU transaction data synced to aitbc1"
|
||||
|
||||
echo ""
|
||||
@@ -415,10 +415,10 @@ cd "$AITBC_ROOT"
|
||||
import json
|
||||
|
||||
# Load final data
|
||||
with open('/opt/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/gpu_marketplace.json', 'r') as f:
|
||||
marketplace = json.load(f)
|
||||
|
||||
with open('/opt/aitbc/data/economic_system.json', 'r') as f:
|
||||
with open('/var/lib/aitbc/data/economic_system.json', 'r') as f:
|
||||
economics = json.load(f)
|
||||
|
||||
gpu_id = list(marketplace['gpu_listings'].keys())[0]
|
||||
|
||||
Reference in New Issue
Block a user