Commit Graph

42 Commits

Author SHA1 Message Date
aitbc
c966658f5d fix: update marketplace handler to use correct Exchange API port 8001
The marketplace handler was hardcoded to use port 8102, but the Exchange API
service runs on port 8001. Updated all marketplace_url default values from
http://localhost:8102 to http://localhost:8001 to fix connection errors
in Stage 4 training.
2026-05-04 12:43:42 +02:00
aitbc
bde0f6518f fix: correct blockchain RPC endpoint paths and chain_id handling
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Blockchain Synchronization Verification / sync-verification (push) Successful in 5s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 4s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 7s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 4s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
- Change /blocks/{number} to /rpc/blocks/{number} for block queries
- Fix chain_id fallback logic to use 'or' instead of getattr default
- Update all genesis block checks to use /rpc/blocks/0 endpoint

This aligns blockchain CLI commands with the actual RPC API paths.
2026-05-04 12:37:22 +02:00
aitbc
b2aa977197 feat: implement contract CLI commands for smart contract operations
- Add contract CLI handlers (list, deploy, call, verify) in cli/handlers/contract.py
- Register contract parser in cli/parsers/contract.py
- Add contract command handlers to unified_cli.py
- Add RPC endpoints for contract operations in blockchain RPC router
- Update Stage 2 training script to use correct contract CLI syntax
- Contract commands now work without warnings in Stage 2 training

Contract operations:
- contract list: List deployed contracts
- contract deploy: Deploy new smart contract (supports zk-verifier type)
- contract call: Call contract method
- contract verify: Verify ZK proof against contract
2026-05-04 12:37:03 +02:00
aitbc
df865c55b8 fix: resolve CLI regressions in wallet send and transactions
Fixed two CLI bugs exposed during training:

1. wallet send - Fixed 'name requests is not defined'
   - Added missing 'import requests' in cli/handlers/wallet.py
   - Command now reaches RPC correctly; failures are blockchain-level

2. wallet transactions - Fixed 'list object has no attribute get'
   - Updated get_transactions in cli/aitbc_cli.py to handle both list and dict responses
   - RPC /rpc/transactions returns a list, CLI expected dict with transactions key
   - Normalizes tx_hash to hash for display

3. Training self-transfer - Skip when wallet has 0 balance
   - Updated scripts/training/stage1_foundation.sh to check wallet balance before self-transfer
   - Avoids retrying guaranteed failures when wallet has no on-chain account

Validation:
- wallet transactions: No longer raises list.get error
- wallet send: Fails correctly at blockchain layer (sender account not found)
- Training script: Skips self-transfer when balance is 0
2026-05-04 11:10:40 +02:00
aitbc
6d8bcca6c9 revert: restore CLI and training script to use port 8006
Reverted previous changes that incorrectly changed RPC port from 8006 to 8005.
Investigation revealed:
- Port 8005 runs AI service (uvicorn src.ai_service.main:app)
- Port 8006 runs blockchain node HTTP RPC (uvicorn aitbc_chain.app:app)

The blockchain node HTTP RPC is actually on port 8006, not 8005.
The issue is that the blockchain node on port 8006 is not responding to HTTP requests.

Next step: Debug why blockchain node on port 8006 is not responding to HTTP.
2026-05-04 09:45:39 +02:00
aitbc
fdf203eb8b feat: add chain_id support to blockchain CLI and update training script
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
- Add chain_id parameter to blockchain block command for multi-chain support
- Update block query to pass chain_id as request parameter
- Update block output fields to match RPC response (tx_count, proposer)
- Add /health endpoint alias to exchange API (in addition to /api/health)
- Simplify genesis block initialization in training script (skip redundant checks)
2026-05-04 09:37:00 +02:00
aitbc
06f93900c5 fix: update blockchain CLI commands to use actual RPC endpoints
Updated blockchain CLI handlers to use real blockchain RPC endpoints instead of mock data:

- handle_blockchain_block(): Query /blocks/{number} endpoint instead of printing mock data
- handle_blockchain_init(): Check blockchain status via /blocks/0 instead of /rpc/init
- handle_blockchain_genesis(): Use /blocks/0 endpoint for genesis block operations
- Pass default_rpc_url to handle_blockchain_block() in unified_cli.py

Updated training
2026-05-04 09:24:09 +02:00
aitbc
13371bd2e8 fix: update CLI default RPC port from 8006 to 8005
Fixed CLI blockchain connection timeout errors by updating default RPC URL
from port 8006 to port 8005 across all CLI modules.

Root cause:
- Port 8006 is for blockchain P2P protocol (not HTTP RPC)
- Port 8005 is the HTTP RPC API port
- CLI was trying to use HTTP on port 8006, causing timeouts

Updated files:
- cli/advanced_wallet.py: DEFAULT_RPC_URL
- cli/enterprise_cli.py: DEFAULT_RPC_URL
- cli/commands/blockchain.py: _get_node_endpoint()
- cli/core/main.py: default_rpc_url
- cli/commands/sync.py: source and import-url defaults
- cli/commands/marketplace.py: rpc_url config default
- cli/commands/blockchain_event_bridge.py: test mode config
- cli/handlers/bridge.py: test mode config
- cli/commands/deployment.py: service endpoints

This fixes the training script errors where CLI commands were timing out
when trying to connect to the blockchain node.
2026-05-04 09:14:46 +02:00
aitbc
8602732d46 Convert API gateway to old Poetry format and add service routing for new microservices
Some checks failed
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
API Endpoint Tests / test-api-endpoints (push) Successful in 1m55s
Blockchain Synchronization Verification / sync-verification (push) Failing after 11s
CLI Tests / test-cli (push) Failing after 8s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 12s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 13s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 13s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
P2P Network Verification / p2p-verification (push) Successful in 6s
Package Tests / Python package - aitbc-agent-sdk (push) Failing after 32s
Package Tests / Python package - aitbc-core (push) Successful in 15s
Package Tests / Python package - aitbc-crypto (push) Successful in 11s
Package Tests / Python package - aitbc-sdk (push) Successful in 11s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 26s
Package Tests / JavaScript package - aitbc-token (push) Successful in 25s
Production Tests / Production Integration Tests (push) Failing after 1m15s
Smart Contract Tests / test-solidity (map[name:aitbc-contracts path:contracts]) (push) Failing after 2m5s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 31s
Smart Contract Tests / test-foundry (push) Failing after 19s
Smart Contract Tests / lint-solidity (push) Successful in 17s
Smart Contract Tests / deploy-contracts (push) Successful in 1m24s
Staking Tests / test-staking-service (push) Failing after 14s
Staking Tests / test-staking-integration (push) Has been skipped
Staking Tests / test-staking-contract (push) Has been skipped
Staking Tests / run-staking-test-runner (push) Has been skipped
Systemd Sync / sync-systemd (push) Successful in 22s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 14m13s
- Convert api-gateway pyproject.toml to old Poetry format for workspace compatibility
- Add routing configuration for AI service (port 8106)
- Add routing configuration for Monitoring service (port 8107)
- Add routing configuration for OpenClaw service (port 8108)
- Add routing configuration for Plugin service (port 8109)
- Remove duplicate middleware implementations from coordinator-api (app_logging.py, error
2026-04-30 16:15:05 +02:00
aitbc
8781d15a5b Use existing book endpoint for marketplace buy instead of custom buy endpoint
Some checks failed
CLI Tests / test-cli (push) Failing after 2s
Security Scanning / security-scan (push) Successful in 22s
2026-04-28 18:32:50 +02:00
aitbc
97252911b3 Simplify handlers - remove wallet daemon integration due to import issues, use direct file-based operations
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 5s
CLI Tests / test-cli (push) Failing after 4s
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 2m29s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 11s
2026-04-28 18:31:59 +02:00
aitbc
36b1937fcb Fix import errors in handlers - use absolute imports instead of relative imports
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 13s
CLI Tests / test-cli (push) Failing after 2s
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 2m57s
Python Tests / test-python (push) Successful in 11s
2026-04-28 18:21:48 +02:00
aitbc
31df4d538f Simplify marketplace buy/sell endpoint paths to avoid conflicts
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 49s
CLI Tests / test-cli (push) Failing after 2s
Integration Tests / test-service-integration (push) Has started running
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has started running
2026-04-28 18:19:49 +02:00
aitbc
c725e71aeb Fix ai.py syntax error
Some checks failed
CLI Tests / test-cli (push) Failing after 4s
Security Scanning / security-scan (push) Successful in 15s
2026-04-28 18:18:13 +02:00
aitbc
1bacb0a3eb Update market buy handler to use dual-mode wallet adapter
Some checks failed
CLI Tests / test-cli (push) Failing after 2s
Security Scanning / security-scan (push) Successful in 39s
2026-04-28 18:15:30 +02:00
aitbc
0c995f7412 Change GPU buy/sell endpoints to avoid path conflicts
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 12s
CLI Tests / test-cli (push) Failing after 1s
Security Scanning / security-scan (push) Has been cancelled
Integration Tests / test-service-integration (push) Successful in 1m57s
Python Tests / test-python (push) Successful in 26s
2026-04-28 18:12:20 +02:00
aitbc
05e5d59b8c Update market buy handler to use new GPU buy endpoint
Some checks failed
Security Scanning / security-scan (push) Has been cancelled
CLI Tests / test-cli (push) Failing after 3s
2026-04-28 18:09:49 +02:00
aitbc
670a79f723 Remove dollar sign from GPU price display
Some checks failed
CLI Tests / test-cli (push) Failing after 4s
Security Scanning / security-scan (push) Successful in 49s
2026-04-28 18:03:58 +02:00
aitbc
43aa888d36 Fix GPU marketplace price display to use AIT coins
Some checks failed
CLI Tests / test-cli (push) Failing after 8s
Security Scanning / security-scan (push) Successful in 24s
2026-04-28 18:03:20 +02:00
aitbc
ed5dc40386 Update GPU marketplace prices to use AIT coins instead of USD
Some checks failed
CLI Tests / test-cli (push) Failing after 3s
Security Scanning / security-scan (push) Successful in 16s
2026-04-28 18:01:17 +02:00
aitbc
cac4c65aab Fix wallet handler to use importlib for decrypt_private_key
Some checks failed
CLI Tests / test-cli (push) Failing after 3s
Security Scanning / security-scan (push) Successful in 33s
P2P Network Verification / p2p-verification (push) Successful in 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
2026-04-28 17:57:59 +02:00
aitbc
2d73f51452 Fix wallet handler to import decrypt_private_key correctly 2026-04-28 17:53:55 +02:00
aitbc
5ea244c6b7 Simplify market buy to use coordinator API without blockchain transactions 2026-04-28 17:48:09 +02:00
aitbc
90535433dc Add market buy handler with blockchain transaction execution 2026-04-28 17:36:31 +02:00
aitbc
1a62d9ab75 Remove password requirement from AI handler
Some checks failed
CLI Tests / test-cli (push) Failing after 8s
Security Scanning / security-scan (push) Successful in 34s
2026-04-28 17:35:44 +02:00
aitbc
da1d8c4c77 Remove password requirement for AI job submission to Agent Coordinator
Some checks failed
CLI Tests / test-cli (push) Failing after 4s
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 17:34:53 +02:00
aitbc
d997ced044 Simplify AI handler to submit directly to Agent Coordinator without wallet signing
Some checks failed
CLI Tests / test-cli (push) Failing after 2s
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 17:34:38 +02:00
aitbc
565ca25e85 Fix AI job submission to use Agent Coordinator endpoint
Some checks failed
CLI Tests / test-cli (push) Failing after 2s
Security Scanning / security-scan (push) Successful in 16s
2026-04-28 17:33:21 +02:00
aitbc
ad06297593 Fix AI handler to use same decryption as wallet handler
Some checks failed
CLI Tests / test-cli (push) Failing after 8s
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 17:31:41 +02:00
aitbc
279517a53a Add detailed error logging to AI handler decryption
Some checks failed
CLI Tests / test-cli (push) Failing after 10s
Security Scanning / security-scan (push) Successful in 45s
2026-04-28 17:30:46 +02:00
aitbc
1cf46405f8 Fix AI handler with inline AES-256-GCM decryption
Some checks failed
CLI Tests / test-cli (push) Failing after 1s
Security Scanning / security-scan (push) Successful in 17s
2026-04-28 17:29:10 +02:00
aitbc
a009ba1192 Fix AI handler to import decrypt_private_key from correct module
Some checks failed
CLI Tests / test-cli (push) Failing after 10s
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 17:28:41 +02:00
aitbc
b1a6f89219 Fix AI handler import path for decrypt_private_key
Some checks failed
CLI Tests / test-cli (push) Failing after 7s
Security Scanning / security-scan (push) Has started running
2026-04-28 17:28:09 +02:00
aitbc
1555746fb8 Fix AI handler to use correct keystore decryption
Some checks failed
CLI Tests / test-cli (push) Failing after 1s
Security Scanning / security-scan (push) Successful in 53s
2026-04-28 17:27:08 +02:00
aitbc
1fedd8b9ee Fix AI job submission to use correct keystore decryption and modern transaction format
Some checks failed
CLI Tests / test-cli (push) Failing after 7s
Security Scanning / security-scan (push) Successful in 1m0s
2026-04-28 17:25:30 +02:00
aitbc
1c7192852f Fix agent action handler to handle message send results
Some checks failed
CLI Tests / test-cli (push) Failing after 6s
Security Scanning / security-scan (push) Successful in 16s
2026-04-28 17:22:13 +02:00
aitbc
3a2789a718 Fix CLI wallet send to decrypt private key and use modern payload 2026-04-28 17:19:10 +02:00
aitbc
5aa5038a76 Fix CLI wallet send to use modern transaction payload format
Some checks failed
CLI Tests / test-cli (push) Failing after 2s
Security Scanning / security-scan (push) Successful in 1m17s
2026-04-28 17:18:34 +02:00
aitbc
ad5c147789 Expand aitbc package with new utility modules and enhanced HTTP client
- Add new exception types: RetryError, CircuitBreakerOpenError, RateLimitError
- Enhance AITBCHTTPClient with retry logic, caching, circuit breaker, and rate limiting
- Add AsyncAITBCHTTPClient for async HTTP operations
- Add crypto module with Ethereum key derivation, signing, encryption, and hashing utilities
- Add web3_utils module with Web3Client and create_web3_client
- Add security module with token generation, API key management
2026-04-25 07:46:44 +02:00
aitbc
119d0f42c0 Migrate CLI and Python packages to centralized aitbc package utilities
CLI migration:
- Migrate 11 CLI files from old import pattern to centralized aitbc imports
- wallet.py, exchange.py, gpu_marketplace.py, exchange_island.py, monitor.py, cross_chain.py
- aitbc_cli.py, handlers (account.py, bridge.py, pool_hub.py), utils (wallet_daemon_client.py)
- Replace 'from aitbc.aitbc_logging import' with 'from aitbc import get_logger'
- Replace 'from aitbc.http_client import' with 'from aitbc import AITBCHTTPClient'
- Replace 'from aitbc.exceptions import' with 'from aitbc import NetworkError'

Packages migration:
- aitbc-sdk: receipts.py - migrate from httpx to AITBCHTTPClient
- aitbc-agent-sdk: 5 files - migrate logging to get_logger
  - agent.py, compute_provider.py, compute_consumer.py, swarm_coordinator.py, platform_builder.py
2026-04-25 07:04:57 +02:00
aitbc
cbd8700984 feat: migrate wallet daemon and CLI to use centralized aitbc package utilities
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 9s
CLI Tests / test-cli (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 41s
Python Tests / test-python (push) Failing after 18s
Security Scanning / security-scan (push) Failing after 2m0s
- Migrate simple_daemon.py from mock data to real keystore and blockchain RPC integration
- Add httpx for async HTTP client in wallet daemon
- Implement real wallet listing from keystore directory
- Implement blockchain balance queries via RPC
- Update CLI to use aitbc.AITBCHTTPClient instead of requests
- Add aitbc imports: constants, http_client, exceptions, logging, paths, validation
- Add address and amount validation in
2026-04-24 22:05:55 +02:00
aitbc
e60cc3226c Add sys import to test files and remove obsolete integration tests
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 9s
Blockchain Synchronization Verification / sync-verification (push) Failing after 1s
CLI Tests / test-cli (push) Failing after 3s
Documentation Validation / validate-docs (push) Successful in 6s
Documentation Validation / validate-policies-strict (push) Successful in 2s
Integration Tests / test-service-integration (push) Successful in 40s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 1s
P2P Network Verification / p2p-verification (push) Successful in 2s
Production Tests / Production Integration Tests (push) Successful in 21s
Python Tests / test-python (push) Successful in 13s
Security Scanning / security-scan (push) Failing after 46s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 17s
Smart Contract Tests / lint-solidity (push) Successful in 10s
- Add sys import to 29 test files across agent-coordinator, blockchain-event-bridge, blockchain-node, and coordinator-api
- Remove apps/blockchain-event-bridge/tests/test_integration.py (obsolete bridge integration tests)
- Remove apps/coordinator-api/tests/test_integration.py (obsolete API integration tests)
- Implement GPU registration in marketplace_gpu.py with GPURegistry model persistence
2026-04-23 16:43:17 +02:00