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

- 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:
aitbc
2026-04-22 14:32:30 +02:00
parent 607ad2d434
commit fb15b5c1cb
6 changed files with 30 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ import hashlib
import requests
BASE_URL = "https://aitbc.bubuit.net/rpc"
CHAIN_ID = "ait-devnet"
CHAIN_ID = "ait-mainnet"
def compute_block_hash(height, parent_hash, timestamp):
"""Compute block hash using the same algorithm as PoA proposer"""
@@ -40,7 +40,7 @@ def test_minimal():
}
print("Testing with empty transactions list...")
response = requests.post(f"{BASE_URL}/blocks/import", json=test_block)
response = requests.post(f"{BASE_URL}/importBlock", json=test_block)
print(f"Status: {response.status_code}")
print(f"Response: {response.json()}")
@@ -57,7 +57,7 @@ def test_minimal():
test_block["transactions"] = [{"tx_hash": "0xtest", "sender": "0xtest", "recipient": "0xtest", "payload": {}}]
print("\nTesting with one transaction...")
response = requests.post(f"{BASE_URL}/blocks/import", json=test_block)
response = requests.post(f"{BASE_URL}/importBlock", json=test_block)
print(f"Status: {response.status_code}")
print(f"Response: {response.json()}")