Commit Graph

214 Commits

Author SHA1 Message Date
aitbc
82f271cba3 debug: add logging for 'to' field in submit_transaction
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 7s
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Successful in 9s
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 13:48:08 +02:00
aitbc
0359a7c83f fix: add validation to require 'to' field for TRANSFER transactions
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Integration Tests / test-service-integration (push) Successful in 59s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 9s
Security Scanning / security-scan (push) Successful in 17s
2026-04-28 13:18:11 +02:00
aitbc
285209006f fix: use top-level 'to' and 'amount' fields in submit_transaction
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 9s
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Successful in 36s
2026-04-28 13:17:08 +02:00
aitbc
248de71724 fix: add missing 'to' and 'amount' fields to TransactionRequest model
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 9s
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 13:16:08 +02:00
aitbc
d61da16ae6 chore: remove debug logging for block production filtering
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 58s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 9s
Security Scanning / security-scan (push) Successful in 26s
2026-04-28 12:46:40 +02:00
aitbc
e7e0d533b0 feat: add block_production_chains setting to config
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has started running
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 12:46:00 +02:00
aitbc
865f21fb85 debug: add logging for block production chain filtering
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 6s
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has started running
2026-04-28 12:45:23 +02:00
aitbc
0029a16802 debug: add exception type to error logging
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 8s
Integration Tests / test-service-integration (push) Successful in 1m5s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 8s
Python Tests / test-python (push) Successful in 26s
Security Scanning / security-scan (push) Successful in 1m45s
2026-04-28 12:12:49 +02:00
aitbc
e8ac716383 debug: add decryption error logging to diagnose keystore decryption failure
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 8s
Integration Tests / test-service-integration (push) Has started running
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has started running
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 12:11:45 +02:00
aitbc
a1fe510a76 debug: add logging to keystore loading to diagnose key not found issue
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Integration Tests / test-service-integration (push) Successful in 1m0s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 9s
P2P Network Verification / p2p-verification (push) Successful in 11s
Python Tests / test-python (push) Successful in 27s
Security Scanning / security-scan (push) Successful in 59s
2026-04-28 12:08:29 +02:00
aitbc
941e2abce8 feat: add block_production_chains config for per-chain block production
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 4s
Integration Tests / test-service-integration (push) Successful in 1m14s
P2P Network Verification / p2p-verification (push) Successful in 9s
Python Tests / test-python (push) Successful in 1m32s
Security Scanning / security-scan (push) Successful in 23s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
Allow configuring which chains should produce blocks via block_production_chains
environment variable. If not specified, defaults to all supported chains.
This enables nodes to follow some chains while only producing blocks for their own chain.
2026-04-28 11:59:29 +02:00
aitbc
037a6204b5 fix: remove conflicting get_engine() function in database.py
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 8s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 9s
P2P Network Verification / p2p-verification (push) Successful in 8s
Python Tests / test-python (push) Successful in 23s
Security Scanning / security-scan (push) Successful in 1m19s
Integration Tests / test-service-integration (push) Failing after 12m6s
The old get_engine() function without parameters was overriding the new
chain-specific get_engine(chain_id) function, causing TypeError when
init_db() tried to call it with a positional argument.
2026-04-28 11:36:06 +02:00
aitbc
c7c9f44800 feat: implement multi-chain architecture for AITBC services
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 2s
Integration Tests / test-service-integration (push) Successful in 58s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 9s
Security Scanning / security-scan (push) Successful in 27s
- Add get_db_path() method to ChainSettings for chain-specific database paths
- Update database module to support chain-specific engines with registry
- Update multi-chain manager to use subdirectory structure (data/{chain_id}/chain.db)
- Add chain-based routing to RPC endpoints (/head, /blocks/{height}, /importBlock)
- Add chain_id to P2P network handshake messages for chain isolation
- Update blockchain node to initialize databases for all supported chains
- Add chain-specific gossip subscribers (blocks.{chain_id})
- Update chain sync service to support chain-specific sync operations

Backward compatibility maintained: single-chain deployments work without configuration changes.
2026-04-28 10:44:01 +02:00
aitbc
724d27f0ba refactor: replace hardcoded IPs with DNS resolution in P2P IP check
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 2s
Integration Tests / test-service-integration (push) Successful in 58s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Successful in 29s
- Removed hardcoded IP mappings for aitbc, aitbc1, gitea-runner
- Added proper DNS resolution using socket.gethostbyname()
- More maintainable and works with any hostname/IP configuration
2026-04-28 10:05:45 +02:00
aitbc
82d2861272 debug: add logging to P2P IP check to understand duplicate dialing issue
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 58s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Security Scanning / security-scan (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
2026-04-28 10:03:32 +02:00
aitbc
e94fb58b7b fix: prevent P2P duplicate dialing for aitbc and gitea-runner hostnames
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 4s
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
- Fixed IP check logic in _dial_peers_loop to handle aitbc and gitea-runner hostnames
- aitbc1 was dialing aitbc every 10 seconds even when already connected
- Added explicit IP mappings for aitbc (10.1.223.93) and gitea-runner (10.1.223.98)
- Prevents endless redialing between nodes
2026-04-28 10:01:51 +02:00
aitbc
3b37a217ae Add logging to subscribe method
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 59s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 7s
Python Tests / test-python (push) Successful in 24s
Security Scanning / security-scan (push) Successful in 26s
2026-04-28 09:04:48 +02:00
aitbc
c14aa70698 Add logging to broadcast subscription task
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 9s
Integration Tests / test-service-integration (push) Has started running
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has started running
2026-04-28 09:02:42 +02:00
aitbc
2c03752e67 Add logging for gossip block processing
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 5s
Integration Tests / test-service-integration (push) Successful in 59s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Has been cancelled
2026-04-28 09:00:08 +02:00
aitbc
04852fc480 security: enforce required API_KEY_HASH_SECRET and migrate keystore password to credential system
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 19s
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Integration Tests / test-service-integration (push) Successful in 3m1s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 7s
P2P Network Verification / p2p-verification (push) Successful in 9s
Python Tests / test-python (push) Successful in 28s
Security Scanning / security-scan (push) Successful in 55s
Systemd Sync / sync-systemd (push) Successful in 17s
Remove default fallback for API_KEY_HASH_SECRET in tenant context middleware and management service, requiring explicit environment variable configuration. Migrate keystore password handling from /etc/aitbc/keystore_password to /etc/aitbc/credentials/keystore_password with 600 permissions. Add load-keystore-secrets.sh pre-start hook and /run/aitbc/secrets/.env environment file to blockchain-node, blockchain
2026-04-28 07:29:51 +02:00
aitbc
b77a6ce007 ci: add daily failover simulation schedule and standardize service configurations
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 16s
CLI Tests / test-cli (push) Failing after 3s
Documentation Validation / validate-docs (push) Failing after 10s
Documentation Validation / validate-policies-strict (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 3m0s
Python Tests / test-python (push) Successful in 17s
Security Scanning / security-scan (push) Failing after 23s
Blockchain Synchronization Verification / sync-verification (push) Failing after 10s
Node Failover Simulation / failover-test (push) Failing after 5s
P2P Network Verification / p2p-verification (push) Successful in 5s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
Systemd Sync / sync-systemd (push) Failing after 14m56s
Add daily 2 AM cron schedule for node failover simulation workflow. Relax AITBC address validation to support variable-length addresses. Add missing logging import to chain_sync. Make coordinator database initialization non-fatal to allow startup even if init_db fails. Replace Ethereum address validation with AITBC-specific format checks in multisig transactions. Standardize PYTHONPATH across all systemd services to include
2026-04-27 16:51:13 +02:00
aitbc
963910c787 docs: update GPU service references to reflect marketplace unification
Some checks failed
Documentation Validation / validate-docs (push) Failing after 9s
Documentation Validation / validate-policies-strict (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 1m59s
Python Tests / test-python (push) Successful in 23s
Security Scanning / security-scan (push) Successful in 1m48s
P2P Network Verification / p2p-verification (push) Successful in 3s
Blockchain Synchronization Verification / sync-verification (push) Failing after 9s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
Remove obsolete aitbc-gpu.service references across documentation, scripts, and deployment files. GPU functionality is now unified into aitbc-marketplace.service (port 8007). Update blockchain health check to use gitea-runner hostname for aitbc2. Clarify WAL mode comment in database.py to reference btrfs raid instead of generic disk I/O errors. Mark cross-link validation checks as complete in compliance audit.
2026-04-27 12:42:42 +02:00
aitbc
e9a1b33a8a service wrappers and bind hosts: include pending updates
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 5s
Integration Tests / test-service-integration (push) Successful in 38s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Production Tests / Production Integration Tests (push) Failing after 15s
Python Tests / test-python (push) Successful in 25s
Security Scanning / security-scan (push) Successful in 1m34s
2026-04-27 09:27:20 +02:00
aitbc
cdf953c5cb p2p: remove hardcoded bind-all host from argparse default
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 5s
Integration Tests / test-service-integration (push) Successful in 1m12s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Successful in 11s
Security Scanning / security-scan (push) Successful in 23s
2026-04-27 09:14:27 +02:00
aitbc
2e744861cd Replace print statements with logging in p2p_network.py for consistent error handling
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 1m10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 6s
P2P Network Verification / p2p-verification (push) Successful in 4s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Failing after 33s
2026-04-27 09:06:12 +02:00
aitbc
ac275065e0 Move password clearing to immediately after password file write in setup_production.py scripts
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 1m9s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 6s
Python Tests / test-python (push) Successful in 23s
Security Scanning / security-scan (push) Successful in 1m45s
2026-04-27 08:43:40 +02:00
aitbc
240260a69d Fix clear-text password storage in setup_production.py files 2026-04-25 21:05:27 +02:00
aitbc
ba52ecfc79 Add logging to router to diagnose transaction value issue
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 21s
Integration Tests / test-service-integration (push) Successful in 1m24s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 9s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Failing after 31s
Security Scanning / security-scan (push) Successful in 1m1s
2026-04-25 20:22:29 +02:00
aitbc
df50b14b04 fix: prioritize top-level value field over payload.amount in transaction submission
Some checks failed
Integration Tests / test-service-integration (push) Waiting to run
Blockchain Synchronization Verification / sync-verification (push) Failing after 10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 6s
P2P Network Verification / p2p-verification (push) Successful in 1s
Python Tests / test-python (push) Failing after 9s
Security Scanning / security-scan (push) Successful in 1m48s
Added logic to use tx_data.value when present instead of payload.amount for transaction amount field. Updated comment to clarify payload.amount is a fallback value.
2026-04-25 20:09:26 +02:00
aitbc
e4df4caaeb fix: use explicit SQL UPDATE for balance changes and add value field mapping
Changed transaction failure logging from error to warning level in PoA proposer.
Removed immediate session.commit() after state transition as balance changes are now persisted via explicit SQL UPDATE statements.
Added "value" field mapping from "amount" in transaction normalization and PoA proposer to ensure state transition compatibility.
Replaced SQLAlchemy ORM balance updates with explicit SQL UPDATE statements using
2026-04-25 20:08:09 +02:00
aitbc
8d69dd6685 fix: commit balance changes immediately after state transition and remove sender fallback for 'to' field
Some checks failed
P2P Network Verification / p2p-verification (push) Successful in 8s
Python Tests / test-python (push) Failing after 27s
Security Scanning / security-scan (push) Successful in 1m57s
Integration Tests / test-service-integration (push) Failing after 14m32s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 13s
Blockchain Synchronization Verification / sync-verification (push) Failing after 7s
Changed transaction failure logging from warning to error level in PoA proposer.
Added immediate session.commit() after successful state transition to persist balance changes.
Removed fallback to sender address for 'to' field in submit_transaction as it should be required.
2026-04-25 19:24:02 +02:00
aitbc
4f4fde985e refactor: replace SQLAlchemy with sqlite3 in genesis initialization and add genesis CLI commands
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 1s
CLI Tests / test-cli (push) Failing after 2s
Integration Tests / test-service-integration (push) Successful in 1m9s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 7s
P2P Network Verification / p2p-verification (push) Successful in 10s
Python Tests / test-python (push) Failing after 27s
Security Scanning / security-scan (push) Successful in 2m28s
Replaced SQLAlchemy ORM with direct sqlite3 queries in unified_genesis.py initialize_genesis_database function to simplify database operations and remove dependency on SQLModel Session.

Added genesis command group to CLI with init, verify, and info subcommands for genesis block and wallet management. Implemented handlers for genesis operations including initialization, verification, and information display
2026-04-25 18:58:20 +02:00
aitbc
ca228163ea add genesis command to CLI
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
CLI Tests / test-cli (push) Failing after 3s
Documentation Validation / validate-docs (push) Successful in 5s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 1m10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 1s
Python Tests / test-python (push) Failing after 10s
Security Scanning / security-scan (push) Successful in 1m10s
Imported genesis command module and registered it with the CLI command group.
2026-04-25 18:04:54 +02:00
aitbc
7d3fe5891c fix: add ClassVar annotation to genesis_candidates in ChainSettings
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 10s
Integration Tests / test-service-integration (push) Has started running
Python Tests / test-python (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 14s
Security Scanning / security-scan (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Successful in 7s
Pydantic v2 requires all class attributes to be annotated. genesis_candidates
is a class-level constant, not a field, so it should be annotated as ClassVar.
2026-04-25 08:13:33 +02:00
aitbc
3030a3720f Implement all 6 phases of missing functionality
Phase 1: Agent SDK Marketplace Integration
- Implement _submit_to_marketplace() with HTTP client to coordinator API
- Implement _update_marketplace_offer() with HTTP client
- Implement assess_capabilities() with GPU detection using nvidia-smi
- Add coordinator_url parameter and AITBCHTTPClient integration

Phase 2: Agent SDK Network Registration
- Implement register_with_network() with HTTP client to coordinator API
- Implement get_reputation() with HTTP client to fetch from API
- Implement get_earnings() with HTTP client to fetch from API
- Implement signature verification in send_message() and receive_message()
- Add coordinator_url parameter and AITBCHTTPClient integration

Phase 3: Coordinator API Enterprise Integration
- Implement generic ERPIntegration base class methods with mock implementations
- Implement generic CRMIntegration base class methods with mock implementations
- Add BillingIntegration base class with generic mock implementations
- Add ComplianceIntegration base class with generic mock implementations
- No third-party integration as requested

Phase 4: Coordinator API Key Management
- Add MockHSMStorage class with in-memory key storage
- Add HSMProviderInterface with mock HSM connection methods
- FileKeyStorage already had all abstract methods implemented

Phase 5: Blockchain Node Multi-Chain Operations
- Implement start_chain() with Ethereum-specific chain startup
- Implement stop_chain() with Ethereum-specific chain shutdown
- Implement sync_chain() with Ethereum consensus (longest-chain rule)
- Add database, RPC server, P2P service, and consensus initialization

Phase 6: Settlement Bridge
- Implement EthereumBridge class extending BridgeAdapter
- Implement _encode_payload() with Ethereum transaction encoding
- Implement _get_gas_estimate() with Web3 client integration
- Add Web3 client initialization and gas estimation with safety buffer
2026-04-25 08:00:40 +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
a567f49df3 Migrate blockchain-node scripts to centralized aitbc package utilities
- Migrate scripts/blockchain_simple.py from logging to aitbc.get_logger
- Migrate hardcoded paths in blockchain_simple.py to use DATA_DIR, CONFIG_DIR, LOG_DIR
- Migrate scripts/blockchain_http_launcher.py from logging to aitbc.get_logger
- Remove logging.basicConfig() calls
2026-04-25 07:24:29 +02:00
aitbc
4972fa6935 Migrate blockchain-node app to centralized aitbc package utilities
- Migrate 10 files from logging to aitbc.get_logger
- combined_main.py, p2p_network.py, chain_sync.py
- network/bridge_manager.py, network/island_manager.py, network/nat_traversal.py
- network/multi_chain_manager.py, network/hub_manager.py, network/hub_discovery.py
- Remove logging.basicConfig() from combined_main.py
- Migrate hardcoded paths in config.py and hub_manager.py to use DATA_DIR and KEYSTORE_DIR constants
2026-04-25 07:08:16 +02:00
aitbc
337c143e25 fix: add nosec B104 comment to suppress Bandit warning
Some checks failed
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 1s
Python Tests / test-python (push) Successful in 8s
Security Scanning / security-scan (push) Successful in 58s
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Integration Tests / test-service-integration (push) Failing after 9s
- Add # nosec B104 comment for host="0.0.0.0" in combined_main.py
- Binding to all interfaces is intentional for blockchain node service
- Resolves security-scanning CI failure
2026-04-24 12:13:38 +02:00
aitbc
b2fa1099c2 fix: change blockchain-node RPC port from 8006 to 8005
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Integration Tests / test-service-integration (push) Failing after 11s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 15s
Security Scanning / security-scan (push) Failing after 34s
- Update combined_main.py to use port 8005 for blockchain-node RPC
- blockchain-rpc service remains on port 8006
- Resolves port conflict causing blockchain-node service failures
2026-04-24 11:45:25 +02:00
aitbc
2c2c2df585 feat: comprehensive security remediation - CodeQL fixes and best practices
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 11s
Blockchain Synchronization Verification / sync-verification (push) Failing after 1s
Documentation Validation / validate-docs (push) Successful in 11s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 39s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 3s
Production Tests / Production Integration Tests (push) Failing after 6s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Failing after 10s
Phase 1: Dependency Vulnerabilities
- Resolved 72/72 GitHub Dependabot vulnerabilities (100%)
- Updated cryptography, ecdsa, black, orjson, python-multipart

Phase 2: CodeQL Static Analysis (25+ categories)
- Fixed 100+ information exposure instances (str(e) → generic messages)
- Fixed 9 clear-text logging/storage instances
- Fixed 9 log injection instances (user data removed from logs)
- Fixed 2 hardcoded credential instances
- Fixed 15 print statements (replaced with logger)
- Added SSRF and path validation (18 alerts with robust validation)
- 20+ additional categories scanned (0 issues found)

Phase 3: CodeQL Infrastructure
- Created GitHub Actions CodeQL workflow
- Created CodeQL suppression file for false positives
- Moved CodeQL database to /var/lib/aitbc/codeql-db

Phase 4: Security Documentation
- Updated SECURITY_FIXES_SUMMARY.md with comprehensive details
- Documented security best practices for developers

Files modified: 48 files across coordinator-api, agent-services, blockchain-node, exchange, wallet, scripts, and infrastructure
2026-04-24 10:42:29 +02:00
aitbc
3c4762e51d security: fix clear-text storage and path traversal CodeQL alerts
- scripts/utils/setup_production.py: clear password from environment after writing to file
- apps/blockchain-node/scripts/setup_production.py: clear password from memory after writing to file

Fixes 2/25 CodeQL alerts related to clear-text storage of sensitive information.
2026-04-23 17:25:45 +02:00
aitbc
91bba69653 security: update poetry.lock files for blockchain-node and wallet
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 8s
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Integration Tests / test-service-integration (push) Successful in 38s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 3s
Security Scanning / security-scan (push) Failing after 7s
Ran poetry lock to update lock files with new dependency versions:
- pytest: 8.2.0 → 8.3.0 (fixes tmpdir handling vulnerability)
- python-multipart: updated to latest version (fixes DoS vulnerability)

This resolves the final 2 moderate vulnerabilities in poetry.lock files.
2026-04-23 17:12:51 +02:00
aitbc
3c2cfcb67a fix: revert cryptography version from 47.0.0 to 46.0.0 in pyproject.toml files
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Package Tests / Python package - aitbc-agent-sdk (push) Successful in 16s
Package Tests / Python package - aitbc-core (push) Failing after 12s
Package Tests / Python package - aitbc-crypto (push) Successful in 7s
Package Tests / Python package - aitbc-sdk (push) Successful in 11s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 4s
Package Tests / JavaScript package - aitbc-token (push) Successful in 12s
Python Tests / test-python (push) Successful in 7s
Version 47.0.0 does not exist in PyPI. Reverted to 46.0.0 which is the latest
available version and still provides security fixes for the reported vulnerabilities.
2026-04-23 17:12:09 +02:00
aitbc
213c288cac security: update pyproject.toml files for Phase 2 vulnerability fixes
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 13s
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 38s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 4s
P2P Network Verification / p2p-verification (push) Successful in 7s
Package Tests / Python package - aitbc-agent-sdk (push) Has been cancelled
Package Tests / Python package - aitbc-core (push) Has been cancelled
Package Tests / Python package - aitbc-crypto (push) Has been cancelled
Package Tests / Python package - aitbc-sdk (push) Has been cancelled
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 9s
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Package Tests / JavaScript package - aitbc-token (push) Successful in 16s
- cryptography: 41.0.0 → 47.0.0 in aitbc-sdk, aitbc-crypto, aitbc-core
- cryptography: added >=47.0.0 to blockchain-node dependencies
- pytest: 8.2.0 → 8.3.0 in blockchain-node, coordinator-api, wallet, pool-hub
- pytest: ^8.3.0 → >=8.3.0 in blockchain-event-bridge

This addresses remaining cryptography buffer overflow and pytest tmpdir vulnerabilities
in poetry.lock files. Lock files will be regenerated with poetry lock.
2026-04-23 17:10:54 +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
aitbc
522655ef92 Move blockchain app READMEs to centralized documentation
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 10s
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
CLI Tests / test-cli (push) Failing after 4s
Documentation Validation / validate-docs (push) Successful in 8s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 38s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 3s
Security Scanning / security-scan (push) Successful in 40s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 15s
Smart Contract Tests / lint-solidity (push) Successful in 8s
- Relocate blockchain-event-bridge README content to docs/apps/blockchain/blockchain-event-bridge.md
- Relocate blockchain-explorer README content to docs/apps/blockchain/blockchain-explorer.md
- Replace app READMEs with redirect notices pointing to new documentation location
- Consolidate documentation in central docs/ directory for better organization
2026-04-23 12:24:48 +02:00
aitbc
cd240485c6 Fix RPC server startup in blockchain node service
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Failing after 9s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 26s
Security Scanning / security-scan (push) Failing after 44s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 10s
- Modify combined_main.py to start HTTP RPC server alongside blockchain node
- Use uvicorn.Server with asyncio to run both services concurrently
- Fix shutdown code to properly stop HTTP server
- eth_getLogs endpoint now accessible at http://localhost:8006/rpc/eth_getLogs
2026-04-23 11:17:14 +02:00
aitbc
6a7258941a Fix: Initialize _last_block_timestamp from head block on startup
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 5s
Integration Tests / test-service-integration (push) Failing after 10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 4s
P2P Network Verification / p2p-verification (push) Successful in 4s
Python Tests / test-python (push) Successful in 12s
Security Scanning / security-scan (push) Successful in 30s
This fixes the hybrid mode heartbeat logic which was unable to
calculate time since last block after service restart because
_last_block_timestamp was None.
2026-04-23 11:02:03 +02:00
aitbc
4b001a95d2 Implement adaptive sync and hybrid block generation
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Failing after 10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 3s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Successful in 11s
Security Scanning / security-scan (push) Successful in 28s
- Add adaptive sync with tiered batch sizing for initial sync
  - Initial sync (>10K blocks): 500-1000 batch size, 2s poll, 10s bulk interval
  - Large gap (1K-10K blocks): 200-500 batch size, 3s poll, 30s bulk interval
  - Medium gap (500-1K blocks): 100-200 batch size, 5s poll, 60s bulk interval
  - Reduces 2.9M block sync from 10 days to ~8 hours

- Add hybrid block generation with heartbeat
  - Modes: always, mempool-only, hybrid (default)
  - Skip empty blocks in hybrid/mempool-only modes
  - Force heartbeat block after 60s idle for consensus safety
  - Adaptive loop timing: hybrid checks every 2.5s for heartbeat detection

- Add metrics for sync and block generation behavior
  - sync_empty_blocks_skipped_total
  - sync_heartbeat_blocks_forced_total
  - sync_time_since_last_block_seconds
  - sync_mode, sync_gap_size, sync_batch_size
  - sync_bulk_duration_seconds, sync_blocks_per_second
2026-04-23 10:59:24 +02:00