Commit Graph

93 Commits

Author SHA1 Message Date
oib
15427c96c0 chore: update file permissions to executable across repository
- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency
2026-03-06 22:17:54 +01:00
oib
bb5363bebc refactor: consolidate blockchain explorer into single app and update backup ignore patterns
- Remove standalone explorer-web app (README, HTML, package files)
- Add /web endpoint to blockchain-explorer for web interface access
- Update .gitignore to exclude application backup archives (*.tar.gz, *.zip)
- Add backup documentation files to .gitignore (BACKUP_INDEX.md, README.md)
- Consolidate explorer functionality into main blockchain-explorer application
2026-03-06 18:14:49 +01:00
oib
c8ee2a3e6e feat: implement role-based configuration system for CLI with automatic API key management
- Add role detection to command groups (admin, client, miner, blockchain)
- Load role-specific config files (~/.aitbc/{role}-config.yaml)
- Add role field to Config class with environment variable support
- Implement automatic role detection from invoked subcommand
- Add development mode API key bypass for testing (APP_ENV=dev)
- Update CLI checklist with role-based configuration documentation
- Add configuration override priority and
2026-03-05 14:02:51 +01:00
oib
83b5152b40 fix: add debug logging to admin API key validation and re-enable all routers
- Add debug print statements to _validate_api_key and require_admin_key for troubleshooting
- Add /admin/debug-settings and /admin/test-key endpoints for API key validation testing
- Bypass require_admin_key dependency in /admin/stats endpoint for direct validation
- Fix database warmup to properly handle session generator lifecycle
- Re-enable all previously disabled routers in main.py
- Add custom OpenAPI security scheme
2026-03-05 13:44:37 +01:00
oib
0c090c96fa fix: temporarily disable routers to isolate Pydantic validation issue and add agent endpoints to working routers
- Comment out most routers in main.py to isolate Pydantic issue
- Keep only blockchain router enabled for testing
- Fix database warmup to use get_session() instead of SessionDep()
- Add blockchain router to __init__.py exports
- Add test endpoint to agent_router for verification
- Duplicate agent network and execution receipt endpoints in client and exchange routers as temporary workaround
2026-03-05 12:57:40 +01:00
oib
40cf275985 fix: add missing API endpoints for CLI compatibility
- Add /v1/admin/status endpoint for system status
- Add /v1/blockchain/status endpoint for blockchain status
- Add /v1/blockchain/sync-status endpoint for sync status
- Add /v1/monitor/dashboard endpoint for monitoring dashboard
- Fix router imports and missing dependencies
- Handle optional dependencies gracefully (torch, tenseal)
- Update admin router with comprehensive system status endpoint
- Fix blockchain router endpoint paths
- Improve error handling in monitoring dashboard

These endpoints resolve CLI 404/405 errors reported in testing.
2026-03-05 12:42:01 +01:00
oib
efd85060db fix: change miner authentication to use separate X-Miner-ID header instead of API key for miner identification
- Add get_miner_id() dependency to extract miner ID from X-Miner-ID header
- Update miner register and heartbeat endpoints to require both X-Miner-ID and X-Api-Key headers
- Remove miner_id from query parameters in favor of header-based extraction
- Fix miner heartbeat CLI to send proper JSON payload with inflight, status, and metadata fields
- Fix typo in MinerService: extra_metadata → extra_meta_data
2026-03-05 12:28:17 +01:00
oib
80b9ea4b25 feat: add miner management endpoints and standardize all API paths to /api/v1 prefix
- Add POST /api/v1/miners/{miner_id}/jobs endpoint for listing miner-assigned jobs with filtering
- Add POST /api/v1/miners/{miner_id}/earnings endpoint for miner earnings tracking (mock implementation)
- Add PUT /api/v1/miners/{miner_id}/capabilities endpoint for updating miner capabilities
- Add DELETE /api/v1/miners/{miner_id} endpoint for miner deregistration (sets OFFLINE status)
- Add JobService.fail_job()
2026-03-05 11:12:57 +01:00
oib
c2d4f39a36 feat: add blockchain info endpoints and client job filtering capabilities
- Add /rpc/info endpoint to blockchain node for comprehensive chain information
- Add /rpc/supply endpoint for token supply metrics with genesis parameters
- Add /rpc/validators endpoint to list PoA validators and consensus info
- Add /api/v1/agents/networks endpoint for creating collaborative agent networks
- Add /api/v1/agents/executions/{id}/receipt endpoint for verifiable execution receipts
- Add /api/v1/jobs and /api/v1/jobs/
2026-03-05 10:55:19 +01:00
oib
1f16a1c406 fix: resolve SQLModel migrations for .exec() -> .execute().scalars() and API schema issues 2026-03-05 08:28:40 +01:00
oib
4be6f8d5d9 Fix Concrete ML compatibility issue and improve FHE service logging
- Update requirements.txt to make concrete-ml optional with clear comment
- Enhance FHE service warning message to include Python version info
- Remove concrete-ml from mandatory dependencies due to Python 3.13 incompatibility
- Maintain full functionality with TenSEAL provider as default

This resolves the 'Concrete ML not installed' warning by providing clear
information about the version compatibility issue while preserving all
FHE functionality through the TenSEAL provider.
2026-03-05 08:13:45 +01:00
oib
51c1993410 fix: disable SQLModel Relationship() in domain models to prevent init errors 2026-03-05 07:16:48 +01:00
oib
5a09348ded fix: resolve sync and db query errors in Coordinator API jobs and db layers 2026-03-05 06:30:55 +01:00
oib
87591edfa0 fix: integrate missing routes and update CLI commands 2026-03-05 06:23:46 +01:00
oib
a200a50085 chore(config): simplify dependabot configuration and disable enhanced services for CPU-only deployment
- Simplify .github/dependabot.yml from 70 to 49 lines
  - Remove beta ecosystems, custom registries, and detailed ignore rules
  - Reduce open PR limits (npm: 10→5, github-actions: 5→3)
  - Remove custom labels and dependency-specific ignore rules
  - Consolidate npm configs from 2 directories to single root directory
  - Remove docker ecosystem configuration

- Add /health endpoint to coordinator
2026-03-04 16:43:37 +01:00
oib
5534226895 refactor(ports): standardize service ports to 8000-8017 range and update CORS configurations across all services
- Update CORS allow_origins in blockchain-node app.py and gossip relay.py to use new port logic (8000-8016)
- Update coordinator-api config.py and config_pg.py with standardized port ranges and service labels
- Update coordinator-api health check script from port 18000 to 8000
- Update geo_load_balancer.py to use configurable host/port (default 0.0.0.0:8017)
- Update agent_security.py sandbox
2026-03-04 15:43:17 +01:00
oib
50954a4b31 chore(systemd): remove obsolete systemd service files and update infrastructure documentation
- Remove 8 unused systemd service files from coordinator-api/systemd/
  - aitbc-adaptive-learning.service (port 8005)
  - aitbc-advanced-ai.service
  - aitbc-enterprise-api.service
  - aitbc-gpu-multimodal.service (port 8003)
  - aitbc-marketplace-enhanced.service (port 8006)
  - aitbc-modality-optimization.service (port 8004)
  - aitbc-multimodal.service (port 8002)
  - aitbc-openclaw-enhanced.service (port 8007
2026-03-04 12:16:50 +01:00
oib
0ebac91f45 fix(sync): resolve multi-chain gossip block propagation and sync across nodes 2026-03-03 19:39:52 +01:00
oib
abe13d065f fix(blockchain): fix database schema, migrations and add genesis script 2026-03-03 17:58:03 +01:00
oib
14d0ed3b44 fix(async): convert PoA proposer methods to async and update coordinator dependencies
- Convert _propose_block, _ensure_genesis_block to async methods in PoAProposer
- Add await to gossip_broker.publish calls in block broadcasting
- Add await to _ensure_genesis_block and _propose_block method calls
- Update coordinator-api Python version constraint to >=3.13,<3.15
- Add torch ^2.10.0 dependency to coordinator-api
- Add make_asgi_app import to prometheus_client in main.py
- Export new routers: global
2026-03-03 15:32:05 +01:00
oib
cabbd2d9b7 refactor(domain): standardize metadata field naming to meta_data across all models
- Rename metadata fields to meta_data for consistency across domain models
- Update agent_identity, agent_performance, agent_portfolio, amm, analytics, bounty, certification, community, cross_chain_bridge, cross_chain_reputation, decentralized_memory, miner, pricing_models, trading, and wallet models
- Rename chain_metadata to chain_meta_data in CrossChainMapping
- Rename verification_metadata to verification_meta_data
2026-03-03 15:01:48 +01:00
oib
f353e00172 chore(security): enhance environment configuration, CI workflows, and wallet daemon with security improvements
- Restructure .env.example with security-focused documentation, service-specific environment file references, and AWS Secrets Manager integration
- Update CLI tests workflow to single Python 3.13 version, add pytest-mock dependency, and consolidate test execution with coverage
- Add comprehensive security validation to package publishing workflow with manual approval gates, secret scanning, and release
2026-03-03 10:33:46 +01:00
oib
ccedbace53 chore: remove configuration files and enhance blockchain explorer with advanced search, analytics, and export features
- Delete .aitbc.yaml.example CLI configuration template
- Delete .lycheeignore link checker exclusion rules
- Delete .nvmrc Node.js version specification
- Add advanced search panel with filters for address, amount range, transaction type, time range, and validator
- Add analytics dashboard with transaction volume, active addresses, and block time metrics
- Add Chart.js integration
2026-03-02 15:38:25 +01:00
oib
c97e101727 docs(plan): update milestone planning to mark phase 6 complete and transition to Q4 2026 global expansion phase
- Update Q3 2026 from "CURRENT PHASE" to "COMPLETED PHASE" with all weeks 13-24 marked complete
- Mark Q4 2026 as "NEXT PHASE" with weeks 25-28 Global Expansion APIs as 🔄 NEXT
- Update priority focus areas from "Next Phase" to "Current Phase" with global expansion emphasis
- Mark Enterprise Integration APIs and Scalability Optimization as  COMPLETE
- Update Phase 4-6 success metrics to  ACHIEVED
2026-03-01 00:34:12 +01:00
oib
7e9ba75f6c feat(coordinator-api): enhance reinforcement learning service with PyTorch-based PPO, SAC, and Rainbow DQN implementations
- Add PyTorch neural network implementations for PPO, SAC, and Rainbow DQN agents with GPU acceleration
- Implement PPOAgent with actor-critic architecture, clip ratio, and entropy regularization
- Implement SACAgent with separate actor and dual Q-function networks for continuous action spaces
- Implement RainbowDQNAgent with dueling architecture and distributional RL (51 atoms
2026-03-01 00:18:14 +01:00
oib
768a0cf8fd feat(coordinator-api,docs): integrate developer platform and governance routers, complete phase 3 documentation
- Add developer_platform and governance_enhanced router imports to coordinator-api main.py
- Include developer_platform and governance_enhanced routers with /v1 prefix
- Refactor governance_service.py delegation logic to use delegatee_id directly and add logging
- Remove redundant session.add() calls, rely on session.refresh() after commit
- Update governance service docstring to reflect multi
2026-02-28 23:32:38 +01:00
oib
d8a432ce33 feat: complete phase 3 developer ecosystem and dao governance 2026-02-28 23:24:26 +01:00
oib
5bc18d684c feat: add phase 2 decentralized memory python services and tests 2026-02-28 23:19:02 +01:00
oib
c63259ef2c feat: finish phase 2 decentralized memory and storage tasks 2026-02-28 23:18:56 +01:00
oib
bf95cd0d9b feat: complete remaining phase 1 tasks - multi-chain wallet, atomic swaps, and multi-region deployment 2026-02-28 23:11:55 +01:00
oib
0e6c9eda72 feat(coordinator-api): integrate dynamic pricing engine with GPU marketplace and add agent identity router
- Add DynamicPricingEngine and MarketDataCollector dependencies to GPU marketplace endpoints
- Implement dynamic pricing calculation for GPU registration with market_balance strategy
- Calculate real-time dynamic prices at booking time with confidence scores and pricing factors
- Enhance /marketplace/pricing/{model} endpoint with comprehensive dynamic pricing analysis
  - Add static vs dynamic price
2026-02-28 22:57:10 +01:00
oib
85ae21a568 refactor(blockchain-explorer): add HTTPException import for error handling
- Import HTTPException from fastapi for proper exception handling in endpoints
- Prepare for enhanced error responses in blockchain explorer API routes
2026-02-28 22:04:46 +01:00
oib
12df88d196 fix(blockchain-explorer): fix template formatting and enhance health check endpoint
- Fix CSS animation syntax in HTML template by escaping curly braces for proper f-string formatting
- Replace .format() with .replace() for node_url substitution to avoid KeyError with unescaped braces
- Add blockchain node connectivity test to health check with 5s timeout
- Return degraded status when node is unreachable instead of error
- Add node_status field and API endpoints documentation to health response
2026-02-28 21:58:53 +01:00
oib
2d97783fb1 refactor(coordinator-api,blockchain-explorer): add response caching and fix timestamp handling
- Add cached decorator to admin stats, job status, payment status, and marketplace stats endpoints
- Configure cache TTLs using get_cache_config for different endpoint types (1min job_list, 30s user_balance, marketplace_stats)
- Import cache_management router and include it in main app with /v1 prefix
- Fix blockchain-explorer formatTimestamp to handle both ISO string and Unix numeric timestamps with type
2026-02-28 21:50:25 +01:00
oib
93ffaf53de feat(coordinator-api): add database connection pooling configuration and comprehensive payment validation
- Add configurable database connection pool settings (pool_size, max_overflow, pool_recycle, pool_pre_ping, echo)
- Replace hardcoded pool settings with environment-configurable values from settings
- Add QueuePool explicitly to both sync and async database engines
- Implement comprehensive Pydantic validators for payment schemas (JobPaymentCreate, PaymentRequest, ExchangePaymentRequest)
- Add regex
2026-02-28 21:35:58 +01:00
oib
57b12a882a refactor(coordinator-api): enhance startup/shutdown logging and add rate limit metrics endpoint
- Add database connection warmup during startup with connectivity test
- Expand startup logging with comprehensive configuration summary including all rate limits
- Implement graceful shutdown sequence with in-flight request handling and resource cleanup
- Add Prometheus metrics for rate limiting (hits counter and response time histogram)
- Create dedicated /rate-limit-metrics endpoint for rate limit monitoring
- Record
2026-02-28 21:29:08 +01:00
oib
2ec1ceb600 refactor(coordinator-api): make rate limits configurable via environment variables
- Add configurable rate limit settings for all endpoints (jobs, miner, admin, marketplace, exchange)
- Replace hardcoded rate limit decorators with lambda functions reading from settings
- Add rate limit configuration logging during startup
- Implement custom RateLimitExceeded exception handler with structured error responses
- Add enhanced shutdown logging for database cleanup and resource management
- Set default rate
2026-02-28 21:25:46 +01:00
oib
f05195749c feat(coordinator-api): add global exception handler and rate limiting to marketplace and exchange endpoints
- Add general exception handler to catch all unhandled exceptions with structured error responses
- Add structured logging to validation error handler with request context
- Implement slowapi rate limiting on marketplace endpoints (100/min list, 50/min stats, 30/min bid)
- Implement slowapi rate limiting on exchange payment creation (20/min)
- Add Request parameter to rate-limited endpoints for slow
2026-02-28 21:22:37 +01:00
oib
7cb0b30dae refactor: migrate all remaining modules to use shared aitbc.logging from aitbc-core package
- Replace `import logging` with `from aitbc.logging import get_logger` across blockchain-node scripts and coordinator-api modules
- Update logger initialization from `logging.getLogger(__name__)` to `get_logger(__name__)` in 30+ files
- Add production configuration validators for API keys, HMAC secret, and JWT secret in coordinator config
- Enhance coordinator startup with comprehensive initialization logging
2026-02-28 21:17:53 +01:00
oib
f6ee77f497 refactor: consolidate logging to shared aitbc-core package and upgrade database dependencies
- Upgrade SQLAlchemy to 2.0.47 with asyncio extras in blockchain-node and coordinator-api
- Add asyncpg >=0.29.0 for PostgreSQL async support
- Remove uvloop as optional dependency, make it required >=0.22.0
- Delete duplicate logger.py from blockchain-node (117 lines)
- Refactor coordinator-api logging to use shared aitbc.logging from aitbc-core package
- Add aitbc-core package dependency to coordinator
2026-02-28 21:09:14 +01:00
oib
d152044c6f chore: upgrade package.json engines to Node >=22.22.0 across all packages 2026-02-27 22:48:30 +01:00
oib
864ef4343e refactor(contracts): remove deprecated AIPowerRental contract in favor of bounty system
- Delete AIPowerRental.sol (566 lines) - replaced by AgentBounty.sol
- Remove rental agreement system with provider/consumer model
- Remove performance metrics and SLA tracking
- Remove dispute resolution mechanism
- Remove ZK-proof verification for performance
- Remove provider/consumer authorization system
- Bounty system provides superior developer incentive structure
2026-02-27 21:46:54 +01:00
oib
a477681c4b feat(developer-ecosystem): implement bounty and staking system with ZK-proof integration
Phase 1 Implementation Complete:
- AgentBounty.sol: Automated bounty board with ZK-proof verification
- AgentStaking.sol: Reputation-based yield farming with dynamic APY
- BountyIntegration.sol: Cross-contract event handling and auto-verification
- Database models: Complete bounty, staking, and ecosystem metrics schemas
- REST APIs: Full bounty and staking management endpoints
- Services: Business logic for bounty creation, verification, and staking operations
- Ecosystem dashboard: Analytics and metrics tracking system

Key Features:
- Multi-tier bounty system (Bronze, Silver, Gold, Platinum)
- Performance-based APY calculation with reputation multipliers
- ZK-proof integration with PerformanceVerifier.sol
- Automatic bounty completion detection
- Comprehensive analytics dashboard
- Risk assessment and leaderboards
- Real-time metrics and predictions

Security Features:
- Reentrancy protection on all contracts
- Role-based access control
- Dispute resolution mechanism
- Early unbonding penalties
- Platform fee collection

Economic Model:
- Creation fees: 0.5%
- Success fees: 2%
- Platform fees: 1%
- Staking APY: 5-20% based on performance
- Dispute fees: 0.1%
2026-02-27 17:51:23 +01:00
oib
27e836bf3f refactor(coordinator): standardize database path to follow blockchain-node pattern
- Change coordinator database from /opt/data/coordinator.db to ./data/coordinator.db
- Update config.py to use relative path consistent with blockchain-node
- Update deployment scripts to use /opt/coordinator-api/data/coordinator.db
- Add data directory creation in init_db() for consistency
- Update .env.example files to reflect new standard
- Maintain backward compatibility for production deployment
2026-02-27 17:32:00 +01:00
oib
d023654e74 refactor(theme): remove light theme and enforce dark mode across all apps 2026-02-27 14:00:33 +01:00
oib
e5092f2e83 fix(exchange): remove duplicate initializeTheme call and fix broken api route references 2026-02-27 12:55:26 +01:00
oib
e6094c9757 fix(website): inject font-awesome css to sub-apps to render the header cube logo 2026-02-27 12:42:10 +01:00
oib
9e70134494 fix(website): lock max-width to 1160px globally for header and containers 2026-02-27 12:36:51 +01:00
oib
37bdc7d034 fix(website): lock global header height to 90px and remove duplicate marketplace nav button 2026-02-27 12:25:21 +01:00
oib
2b6ac4a0bb fix(website): ensure data-theme='dark' is present on html tags across all apps for correct header rendering 2026-02-27 12:14:05 +01:00