fix: skip local genesis allocations for metadata to prevent double initialization
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 2s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Failing after 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Failing after 3s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 3s
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (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
P2P Network Verification / p2p-verification (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

This commit is contained in:
aitbc
2026-05-09 18:40:57 +02:00
parent c188d2a13f
commit f85fce3f47

View File

@@ -537,27 +537,8 @@ class PoAProposer:
def _load_genesis_allocations_for_metadata(self) -> list:
"""Load genesis allocations from file for embedding in genesis block metadata."""
genesis_paths = [
Path(f"/var/lib/aitbc/data/{self._config.chain_id}/genesis.json"), # Standard location
]
genesis_path = None
for path in genesis_paths:
if path.exists():
genesis_path = path
break
if not genesis_path:
self._logger.warning("Genesis allocations file not found; genesis block will not contain allocation metadata", extra={"paths": str(genesis_paths)})
return []
try:
with open(genesis_path) as f:
genesis_data = json.load(f)
return genesis_data.get("allocations", [])
except Exception as e:
self._logger.warning(f"Failed to load genesis allocations file: {e}")
return []
# Skip loading for metadata if we used RPC bootstrap
return []
async def _load_genesis_allocations_from_rpc(self) -> list:
"""Load genesis allocations from trusted peer via RPC."""