Files
aitbc/docs/archive/summaries/LEGACY_CLEANUP_SUMMARY.md
aitbc 617e59dd56
Some checks failed
Documentation Validation / validate-docs (push) Failing after 7s
Documentation Validation / validate-policies-strict (push) Failing after 3s
docs-validation: reorganize archive structure and update master index references
Relocate completed projects and summaries into archive subdirectories, update MASTER_INDEX.md to reflect new archive organization with 156+ documents across 10 categories. Add cli-technical and testing README validation targets, expand priority docs metadata checks to include about, project, apps, cli-technical, and testing hubs. Implement master index structure validation to verify required section markers for applications
2026-04-27 12:07:27 +02:00

2.0 KiB

Legacy Path Cleanup Summary

Legacy Path Issues Fixed

1. Genesis File Path Resolution

Before (Legacy):

genesis_paths = [
    Path(f"/opt/aitbc/apps/blockchain-node/data/{self._config.chain_id}/genesis.json"),  # Hardcoded
    Path(f"./data/{self._config.chain_id}/genesis.json"),  # Relative path
    Path(f"/var/lib/aitbc/data/{self._config.chain_id}/genesis.json"),  # Mixed
]

After (Clean):

genesis_paths = [
    Path(f"/var/lib/aitbc/data/{self._config.chain_id}/genesis.json"),  # Standard location only
]

2. File System Cleanup

  • Removed duplicate genesis file: /opt/aitbc/apps/blockchain-node/data/ait-mainnet/genesis.json
  • Single source of truth: /var/lib/aitbc/data/ait-mainnet/genesis.json
  • Uses standardized directory structure from configuration

3. Debug Logging Cleanup

  • Removed temporary debug logging added during troubleshooting
  • Clean, production-ready logging restored

🎯 Benefits Achieved

  • 🗂️ Consistent Paths: Uses standardized /var/lib/aitbc/data/ structure
  • 🔧 Maintainable: Single location for genesis file
  • 📱 Configuration-Driven: Follows established directory standards
  • 🚀 Production Ready: Clean code without legacy workarounds
  • 🛡️ Reliable: No more path resolution ambiguity

📁 Current Directory Structure

/var/lib/aitbc/
├── data/
│   └── ait-mainnet/
│       ├── chain.db          # Blockchain database
│       └── genesis.json       # ✅ Single genesis file
├── keystore/
│   ├── aitbc1genesis.json    # Genesis wallet
│   └── .password             # Wallet passwords
└── logs/                     # Service logs

🔍 Verification

  • Genesis account initialization working
  • Transaction processing functional
  • No hardcoded paths remaining
  • Uses configuration-driven paths
  • Clean, maintainable codebase

The PoA proposer now uses clean, standardized paths without any legacy workarounds!