feat: implement AITBC mesh network deployment infrastructure
✅ Phase 0: Pre-implementation checklist completed - Environment configurations (dev/staging/production) - Directory structure setup (logs, backups, monitoring) - Virtual environment with dependencies ✅ Master deployment script created - Single command deployment with validation - Progress tracking and rollback capability - Health checks and deployment reporting ✅ Validation script created - Module import validation - Basic functionality testing - Configuration and script verification ✅ Implementation fixes - Fixed dataclass import in consensus keys - Fixed async function syntax in tests - Updated deployment script for virtual environment 🚀 Ready for deployment: ./scripts/deploy-mesh-network.sh dev
This commit is contained in:
43
config/consensus_test.json
Normal file
43
config/consensus_test.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"network_name": "consensus-test",
|
||||
"chain_id": "consensus-test",
|
||||
"validators": [
|
||||
{
|
||||
"address": "0x1234567890123456789012345678901234567890",
|
||||
"stake": 1000.0,
|
||||
"role": "proposer"
|
||||
},
|
||||
{
|
||||
"address": "0x2345678901234567890123456789012345678901",
|
||||
"stake": 1000.0,
|
||||
"role": "validator"
|
||||
},
|
||||
{
|
||||
"address": "0x3456789012345678901234567890123456789012",
|
||||
"stake": 1000.0,
|
||||
"role": "validator"
|
||||
},
|
||||
{
|
||||
"address": "0x4567890123456789012345678901234567890123",
|
||||
"stake": 1000.0,
|
||||
"role": "validator"
|
||||
},
|
||||
{
|
||||
"address": "0x5678901234567890123456789012345678901234",
|
||||
"stake": 1000.0,
|
||||
"role": "validator"
|
||||
}
|
||||
],
|
||||
"consensus": {
|
||||
"type": "multi_validator_poa",
|
||||
"block_time": 5,
|
||||
"rotation_interval": 10,
|
||||
"fault_tolerance": 1
|
||||
},
|
||||
"slashing": {
|
||||
"double_sign_slash": 0.5,
|
||||
"unavailable_slash": 0.1,
|
||||
"invalid_block_slash": 0.3,
|
||||
"slow_response_slash": 0.05
|
||||
}
|
||||
}
|
||||
26
config/economics_test.json
Normal file
26
config/economics_test.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"staking": {
|
||||
"min_stake_amount": 1000.0,
|
||||
"unstaking_period": 21,
|
||||
"max_delegators_per_validator": 100,
|
||||
"commission_range": [0.01, 0.10]
|
||||
},
|
||||
"rewards": {
|
||||
"base_reward_rate": 0.05,
|
||||
"distribution_interval": 86400,
|
||||
"min_reward_amount": 0.001,
|
||||
"delegation_reward_split": 0.9
|
||||
},
|
||||
"gas": {
|
||||
"base_gas_price": 0.001,
|
||||
"max_gas_price": 0.1,
|
||||
"min_gas_price": 0.0001,
|
||||
"congestion_threshold": 0.8,
|
||||
"price_adjustment_factor": 1.1
|
||||
},
|
||||
"security": {
|
||||
"monitoring_interval": 60,
|
||||
"detection_history_window": 3600,
|
||||
"max_false_positive_rate": 0.05
|
||||
}
|
||||
}
|
||||
49
config/network_test.json
Normal file
49
config/network_test.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"network_name": "network-test",
|
||||
"discovery": {
|
||||
"bootstrap_nodes": [
|
||||
"10.1.223.93:8000",
|
||||
"10.1.223.40:8000",
|
||||
"10.1.223.93:8001"
|
||||
],
|
||||
"discovery_interval": 30,
|
||||
"peer_timeout": 300,
|
||||
"max_peers": 50
|
||||
},
|
||||
"health_monitoring": {
|
||||
"check_interval": 60,
|
||||
"max_latency_ms": 1000,
|
||||
"min_availability_percent": 90.0,
|
||||
"min_health_score": 0.5,
|
||||
"max_consecutive_failures": 3
|
||||
},
|
||||
"peer_management": {
|
||||
"max_connections": 50,
|
||||
"min_connections": 8,
|
||||
"connection_retry_interval": 300,
|
||||
"ban_threshold": 0.1,
|
||||
"auto_reconnect": true,
|
||||
"auto_ban_malicious": true,
|
||||
"load_balance": true
|
||||
},
|
||||
"topology": {
|
||||
"strategy": "hybrid",
|
||||
"optimization_interval": 300,
|
||||
"max_degree": 8,
|
||||
"min_degree": 3
|
||||
},
|
||||
"partition_handling": {
|
||||
"detection_interval": 30,
|
||||
"recovery_timeout": 300,
|
||||
"max_partition_size": 0.4,
|
||||
"min_connected_nodes": 3,
|
||||
"partition_detection_threshold": 0.3
|
||||
},
|
||||
"recovery": {
|
||||
"strategy": "adaptive",
|
||||
"recovery_interval": 60,
|
||||
"max_recovery_attempts": 3,
|
||||
"recovery_timeout": 300,
|
||||
"emergency_threshold": 0.1
|
||||
}
|
||||
}
|
||||
35
config/smart_contracts_test.json
Normal file
35
config/smart_contracts_test.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"escrow": {
|
||||
"default_fee_rate": 0.025,
|
||||
"max_contract_duration": 2592000,
|
||||
"dispute_timeout": 604800,
|
||||
"min_dispute_evidence": 1,
|
||||
"max_dispute_evidence": 10,
|
||||
"min_milestone_amount": 0.01,
|
||||
"max_milestones": 10,
|
||||
"verification_timeout": 86400
|
||||
},
|
||||
"disputes": {
|
||||
"automated_resolution_threshold": 0.8,
|
||||
"mediation_timeout": 259200,
|
||||
"arbitration_timeout": 604800,
|
||||
"voting_timeout": 172800,
|
||||
"min_arbitrators": 3,
|
||||
"max_arbitrators": 5,
|
||||
"community_vote_threshold": 0.6
|
||||
},
|
||||
"upgrades": {
|
||||
"min_voting_period": 259200,
|
||||
"max_voting_period": 604800,
|
||||
"required_approval_rate": 0.6,
|
||||
"min_participation_rate": 0.3,
|
||||
"emergency_upgrade_threshold": 0.8,
|
||||
"rollback_timeout": 604800
|
||||
},
|
||||
"optimization": {
|
||||
"min_optimization_threshold": 1000,
|
||||
"optimization_target_savings": 0.1,
|
||||
"max_optimization_cost": 0.01,
|
||||
"metric_retention_period": 604800
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user