Some checks failed
CLI Tests / test-cli (push) Failing after 4s
Deploy to Testnet / deploy-testnet (push) Successful in 1m40s
Documentation Validation / validate-docs (push) Failing after 12s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 2m42s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 34s
Package Tests / Python package - aitbc-core (push) Successful in 27s
Package Tests / Python package - aitbc-crypto (push) Successful in 13s
Package Tests / Python package - aitbc-sdk (push) Successful in 16s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 8s
Package Tests / JavaScript package - aitbc-token (push) Successful in 18s
Python Tests / test-python (push) Failing after 50s
Security Scanning / security-scan (push) Failing after 43s
Multi-Node Stress Testing / stress-test (push) Successful in 12s
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
- Created aitbc/_version.py with centralized version definition - Updated aitbc/__init__.py to import __version__ from _version module - Updated constants.py to use __version__ for PACKAGE_VERSION - Replaced print() calls with logger in decorators.py, events.py, queue_manager.py, and state.py - Added logger initialization using get_logger(__name__) in config.py, decorators.py, events.py, queue_manager.py, and state.py - Added cli/commands
37 lines
1017 B
Bash
Executable File
37 lines
1017 B
Bash
Executable File
#!/bin/bash
|
|
# Blockchain RPC Startup Optimization Script
|
|
# Optimizes database and reduces restart time
|
|
|
|
echo "=== Blockchain RPC Startup Optimization ==="
|
|
|
|
# Database path
|
|
DB_PATH="/var/lib/aitbc/data/ait-mainnet/chain.db"
|
|
|
|
if [ -f "$DB_PATH" ]; then
|
|
echo "1. Optimizing database WAL checkpoint..."
|
|
sqlite3 "$DB_PATH" "PRAGMA wal_checkpoint(TRUNCATE);" 2>/dev/null
|
|
echo "✅ WAL checkpoint completed"
|
|
|
|
echo "2. Checking database size..."
|
|
ls -lh "$DB_PATH"*
|
|
|
|
echo "3. Restarting blockchain RPC service..."
|
|
systemctl restart aitbc-blockchain-rpc
|
|
|
|
echo "4. Waiting for startup completion..."
|
|
sleep 3
|
|
|
|
echo "5. Verifying service status..."
|
|
if systemctl is-active --quiet aitbc-blockchain-rpc; then
|
|
echo "✅ Blockchain RPC service is running"
|
|
else
|
|
echo "❌ Blockchain RPC service failed to start"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Optimization completed successfully"
|
|
else
|
|
echo "❌ Database not found at $DB_PATH"
|
|
exit 1
|
|
fi
|