StabilityNexus/MiniChain · 25 Jul 2026 16:55 · 3 PR(s)
Walkthrough
Adds a filesystem-backed genesis.json and refactors minichain/chain.py to load and apply genesis metadata and allocations; persistence now recomputes/verifies the genesis hash; tests updated to assert the computed genesis hash.
Changes
**Genesis Block Configurability** |Layer / File(s)|Summary| |---|---| |genesis.json|Defines chain_id, timestamp, difficulty, and alloc balances.| |minichain/chain.py|Loads JSON, applies alloc to State, sets timestamp/difficulty.| |minichain/persistence.py|Recomputes and verifies genesis hash.|
Walkthrough
Implements Merkle Patricia Trie structure with trie root calculation integrated directly into state updates.
Changes
**Merkle Patricia Trie Integration** |Layer / File(s)|Summary| |---|---| |minichain/trie.py|Implements MPT branch, extension, and leaf nodes.| |minichain/state.py|Calculates state root hash after transaction execution.|
Walkthrough
Upgrades P2P networking to async websockets with heartbeat mechanisms and broadcast queues.
Changes
**Async WebSocket P2P** |Layer / File(s)|Summary| |---|---| |minichain/p2p.py|Migrated P2PNetwork to async websockets protocol.| |minichain/network.py|Implemented peer discovery and gossip relay.|