- Move marketplace_gpu_optimizer.py from legacy to parallel_processing
- Update coordinator-api imports to use new dev/gpu_acceleration location
- Remove legacy folder as code has been refactored
- Fix marketplace_performance.py imports for gpu_acceleration
- Move GPU acceleration code from root to dev/gpu_acceleration/
- No active imports found in production apps, CLI, or scripts
- Contains GPU provider implementations, CUDA kernels, and research code
- Belongs in dev/ as development/research code, not production
- Move GPU ZK research project from gpu_acceleration/research to dev/gpu/
- This is research code, not production code, so it belongs in dev/
- Maintains active development status while separating from production
- Update transaction field mapping: tx.hash -> tx.tx_hash, tx.type -> tx.payload?.type
- Update sender/recipient fields: tx.from -> tx.sender, tx.to -> tx.recipient
- Update amount/fee fields to use tx.payload?.amount/fee with fallbacks
- This fixes the transaction detail rendering in the explorer modal
- Use tx_count instead of block.transactions.length in latest blocks table
- Fix block modal to show tx_count only and remove misleading transaction list rendering
- Add root-level pytest.ini with broader test paths including apps/*/tests and tests/
- This fixes the block-detail/rendering mismatch where UI expected transactions array but RPC returns tx_count
- Move blockchain scripts to apps/blockchain-node/scripts/
- Move marketplace scripts to apps/marketplace/scripts/
- Move agent daemon to apps/agent-coordinator/scripts/
- Move monitor to apps/monitor/
- Update systemd service files to point to new locations
- Update internal path references in moved scripts
- Remove empty /opt/aitbc/services directory
- Update aitbc-exchange-api.service ExecStart from /opt/aitbc/apps/coordinator-api/.venv/bin/python to /opt/aitbc/venv/bin/python
- Change SyslogIdentifier in aitbc-marketplace.service from aitbc-marketplace-production to aitbc-marketplace
- Change chmod permissions from 0600 (owner-only) to 0666 (read/write for all) for database file and WAL files in blockchain node database initialization
- Update comment to reflect permissive permissions for handling filesystem restrictions
- Update agent daemon service database path from /var/lib/aitbc/data/ait-mainnet/chain.db to /var/lib/aitbc/data/chain.db
- Update PRAGMA journal_mode from WAL to DELETE in set_sqlite_pragma
- Addresses filesystem permission issues with WAL mode in containerized environments
- Remove ProtectSystem=strict and ReadWritePaths from agent-daemon, gpu, learning, marketplace, modality-optimization, monitor, multimodal, and openclaw services
- Add ProtectSystem=no to coordinator-api, exchange-api, and explorer services to allow database writes for SQLite WAL mode
- Retain NoNewPrivileges and ProtectHome security settings across all services
- Update aitbc-blockchain-node.service ExecStart from blockchain_simple.py to aitbc_chain.combined_main module
- Update aitbc-blockchain-rpc.service ExecStart from /usr/bin/python3 to /opt/aitbc/venv/bin/python
- Ensures both services use virtual environment Python interpreter for consistency
- Update ExecStart to use /opt/aitbc/venv/bin/python instead of /usr/bin/python3
- Ensures service uses virtual environment Python interpreter for consistency
- Remove StartLimitBurst and StartLimitIntervalSec from aitbc-blockchain-node systemd service
- Change ReadWritePaths from /var/lib/aitbc/data/blockchain to /var/lib/aitbc/data to allow broader data directory access
- Add try-except blocks around os.chmod calls in init_db to ignore OSError exceptions
- Add comments noting permission errors are ignored for read-only filesystems in containers
- Wrap chmod for database file, WAL-shm, and WAL-wal files with error handling
- Remove StartLimitBurst and StartLimitIntervalSec from agent-coordinator systemd service
- Remove ProtectSystem, ProtectHome, and ReadWritePaths security
- Add ExecStartPre to create /var/lib/aitbc/data/agent-coordinator and /var/log/aitbc/agent-coordinator directories
- Ensures required directories exist before service starts
- Add hash conflict detection in import_block to delete existing blocks with same hash
- Add hash conflict cleanup in import_chain before importing blocks
- Add logging for hash conflict deletions showing affected chains
- Add WAL file permission setting in init_db for .db-shm and .db-wal files
- Add test_import_chain_clears_hash_conflicts_across_chains to verify cross-chain hash cleanup
- Add read_blockchain_env helper to parse /etc/aitbc/blockchain.env configuration
- Add normalize_rpc_url helper to parse and normalize RPC endpoint URLs
- Add probe_rpc_node to query /health and /rpc/head endpoints with latency tracking
- Add get_network_snapshot to probe local node and p2p_peers from config
- Update network status to show real connected node count and sync status
- Update network peers to show actual peer endpoints and connection
- Add p2p_node_id field to ChainSettings with empty string default
- Add p2p_node_id to .env.example configuration file
- Change --node-id argument from required to optional with default empty string
- Add node_id resolution with fallback chain: args.node_id -> settings.p2p_node_id -> settings.proposer_id
- Add validation to raise ValueError if no node_id can be resolved
- Update systemd service to use ${
- Add chain_id field to Block creation in import_block endpoint
- Remove await from synchronous session.commit in import_block
- Add _serialize_optional_timestamp helper to handle various timestamp formats
- Add _parse_datetime_value helper with proper datetime parsing and error handling
- Add _select_export_blocks to filter duplicate blocks by height during export
- Add _dedupe_import_blocks to filter
- Add DISTINCT clause to block query in export_chain to prevent duplicate blocks in export
- Add chain_id filter to all delete operations in import_chain (blocks, accounts, transactions)
- Add commit after deletions before starting imports to ensure clean state
- Add duplicate block filtering by height before import to prevent UNIQUE constraint violations
- Add logging for deletion operations showing chain_id being cleared
- Add info logs for gossip subscriber setup start and completion
- Add try-except blocks around transactions and blocks topic subscriptions
- Add success logs after each subscription
- Add error logs with exception details if subscription fails
- Add early return if subscription fails to prevent further processing
- Add logging for gossip backend initialization with backend type and URL
- Add success log after gossip backend initialization compl
- Comment out propose_only_if_mempool_not_empty check in _propose_block
- Add note that check is disabled for testing purposes
- Allows block proposal even when mempool is empty
- Enables continuous block creation regardless of transaction availability
- Add chain_id field to account export data
- Use account's chain_id from import data if available, fallback to root chain_id
- Only clear existing accounts if import data contains accounts to replace
- Prevents clearing accounts when importing chain data without account information
- Remove unused sqlalchemy.func import
- Replace select().delete() with delete() for proper SQLModel syntax in import_chain
- Add chain_id extraction from first block if not provided in import_data root
- Add chain_id field to Block creation during import to ensure consistency
- Remove redundant session.close() in export_chain finally block (session_scope handles cleanup)
- Replace manual session creation with session_scope() in export_chain
- Convert query results to lists to avoid lazy loading issues after session close
- Remove await from session.execute calls in import_chain (use synchronous queries)
- Change force_sync back to async and restore await on import_chain call
- Remove 69 lines of duplicate import_block implementation at end of file
- Replace async session_scope with synchronous SQLAlchemy session in export_chain
- Remove await from session.execute calls in export_chain (use synchronous queries)
- Remove await from session.commit in import_chain
- Change force_sync from async to sync function
- Remove await from import_chain call in force_sync
- Add proper session cleanup with try/finally block in export_chain
- Add /export-chain endpoint to export full blockchain state (blocks, accounts, transactions) as JSON
- Add /import-chain endpoint to import chain state with backup and data clearing
- Add /force-sync endpoint to trigger reorg by fetching and importing peer's chain state
- Fix duplicate import_block implementation (remove redundant async with _import_lock block)
- Fix wallet adapter to use chain_id=ait-testnet instead of ait
- Replace hardcoded nonce=0 in send_transaction with actual account nonce from blockchain
- Replace timestamp-based nonce in agent_operations with actual account nonce from blockchain
- Add RPC account endpoint query to fetch current nonce before transaction creation
- Add error handling with fallback to nonce=0 if RPC query fails
- Ensures transactions use correct sequential nonce values for proper ordering
- Remove duplicate `/marketplace/gpu/{gpu_id}` endpoint from marketplace_gpu.py
- Remove marketplace_gpu router inclusion from main.py (already included elsewhere)
- Fix staking service staker_count logic to check existing stakes before increment/decrement
- Add minimum stake amount validation (100 AITBC)
- Add proper error handling for stake not found cases
- Fix staking pool update to commit and refresh after modifications
- Update CLI send_transaction to use chain
- Wrap _compute_state_root in try/except to handle failures during genesis block creation
- Return None and log warning when state root computation fails (e.g., when accounts don't exist yet)
- Add error handling in init_db to ignore "already exists" errors when creating tables
- Improve robustness of database initialization for concurrent or repeated startup scenarios