🔗 Mining Integration: • Connect mining RPC endpoints to PoA proposer for real block production • Initialize PoA proposer in app lifespan for mining integration • Add mining status, start, stop, and stats endpoints with blockchain data • Track actual block production rate and mining statistics • Support 1-8 mining threads with proper validation 🔧 PoA Consensus Integration: • Set global PoA proposer reference for mining operations • Start
57 lines
2.4 KiB
Bash
Executable File
57 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# AITBC Enterprise Automation Script
|
|
# This script demonstrates advanced enterprise features
|
|
|
|
set -e
|
|
|
|
echo "=== AITBC Enterprise Automation Demo ==="
|
|
|
|
# 1. Batch Transaction Processing
|
|
echo "1. Batch Transaction Processing"
|
|
echo "Creating sample batch file..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py sample
|
|
|
|
echo "Processing batch transactions (demo mode)..."
|
|
# Note: This would normally require actual wallet passwords
|
|
echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py batch --file sample_batch.json --password-file /var/lib/aitbc/keystore/.password"
|
|
|
|
# 2. Mining Operations
|
|
echo -e "\n2. Mining Operations"
|
|
echo "Starting mining with genesis wallet..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py mine start --wallet aitbc1genesis --threads 2
|
|
|
|
echo "Checking mining status..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py mine status
|
|
|
|
echo "Stopping mining..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py mine stop
|
|
|
|
# 3. Marketplace Operations
|
|
echo -e "\n3. Marketplace Operations"
|
|
echo "Listing marketplace items..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py market list
|
|
|
|
echo "Creating marketplace listing (demo)..."
|
|
# Note: This would normally require actual wallet details
|
|
echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py market create --wallet seller --type 'Digital Art' --price 1000 --description 'Beautiful NFT artwork' --password-file /var/lib/aitbc/keystore/.password"
|
|
|
|
# 4. AI Service Operations
|
|
echo -e "\n4. AI Service Operations"
|
|
echo "Submitting AI compute job (demo)..."
|
|
# Note: This would normally require actual wallet details
|
|
echo "/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py ai submit --wallet client --type 'text-generation' --prompt 'Generate a poem about blockchain' --payment 50 --password-file /var/lib/aitbc/keystore/.password"
|
|
|
|
# 5. Cross-Node Operations
|
|
echo -e "\n5. Cross-Node Operations"
|
|
echo "Checking network status on aitbc1..."
|
|
/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py network
|
|
|
|
echo "Checking network status on aitbc..."
|
|
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/simple_wallet.py network'
|
|
|
|
echo "Running batch operations on aitbc..."
|
|
ssh aitbc '/opt/aitbc/venv/bin/python /opt/aitbc/cli/enterprise_cli.py sample'
|
|
|
|
echo -e "\n✅ Enterprise Automation Demo Completed!"
|
|
echo "All advanced features are ready for production use."
|