Re-enable state root computation in blockchain node
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 4s
Integration Tests / test-service-integration (push) Failing after 10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Successful in 20s
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Successful in 4s
Integration Tests / test-service-integration (push) Failing after 10s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 5s
P2P Network Verification / p2p-verification (push) Successful in 3s
Python Tests / test-python (push) Successful in 10s
Security Scanning / security-scan (push) Successful in 20s
- Fix chain_id mismatch (ait-devnet -> ait-mainnet) - Add logger definition to poa.py for state root computation - Recompute state_root after genesis account initialization - Create genesis.json with account allocations for ait-mainnet - Update config.py supported_chains to ait-mainnet
This commit is contained in:
@@ -394,6 +394,14 @@ class PoAProposer:
|
||||
# Initialize accounts from genesis allocations file (if present)
|
||||
await self._initialize_genesis_allocations(session)
|
||||
|
||||
# Recompute state root after accounts are initialized
|
||||
new_state_root = _compute_state_root(session, self._config.chain_id)
|
||||
if new_state_root:
|
||||
genesis.state_root = new_state_root
|
||||
session.add(genesis)
|
||||
session.commit()
|
||||
self._logger.info(f"Updated genesis block state_root: {new_state_root}")
|
||||
|
||||
# Broadcast genesis block for initial sync
|
||||
await gossip_broker.publish(
|
||||
"blocks",
|
||||
|
||||
Reference in New Issue
Block a user