Blockchain Integration
Nawal integrates directly with the BelizeChain runtime, using Substrate pallets for participant identity, staking coordination, and reward settlement.
Integration Surface
┌───────────────────────────────────────────┐
│ BelizeChain runtime │
│ Identity · Staking · Payroll · Community │
│ Consensus (PoUW) · Quantum · StorageProof│
└────────────────────┬──────────────────────┘
│ Substrate JSON-RPC (ws:9944)
┌────────────────────▼──────────────────────┐
│ Nawal AI │
│ Federated rounds · Model registry │
│ Blockchain connector · Payment rails │
└───────────────────────────────────────────┘
Identity Pallet
Participation in federated rounds is tied to on-chain identity. The connector verifies accounts before accepting contributions:
from blockchain import IdentityVerifier
verifier = IdentityVerifier(blockchain_rpc="ws://localhost:9944")
result = await verifier.verify_identity(account_id="r1...")
print(result["is_verified"]) # KYC verification state
print(result["reputation_score"]) # 0–100
Identity records expose a display name, verification level, and reputation score used for participant weighting.
Staking Pallet
Validators that contribute AI work stake DALLA, and PoUW scoring (quality, timeliness, honesty) feeds into reward settlement by the staking and consensus pallets.
Mesh Network Coordination
For off-grid deployments, Nawal ships a mesh network client that announces federated rounds over the Mesh pallet:
from blockchain import MeshNetworkClient
mesh = MeshNetworkClient(peer_id="validator-01", listen_port=9090)
await mesh.start()
peers = await mesh.discover_peers()
await mesh.announce_fl_round(
round_id="round-42",
dataset_name="district-credit-data",
target_participants=5,
deadline=3600,
min_stake=1000,
reward_pool=50000,
)
Configuration
| Setting | Environment variable | Purpose |
|---|---|---|
| RPC endpoint | BLOCKCHAIN_RPC | Substrate WebSocket URL |
| Enabled | BLOCKCHAIN_ENABLED | Master switch for chain features |
| Mesh port | MESH_LISTEN_PORT | P2P mesh listener |