How nhudoannana/trustmebro-blockchain works
TrustProfile is an educational Streamlit application for issuing, revoking, and verifying credentials on an in-memory blockchain simulation. Its primary workflow runs from issuer wallet and signed credential transaction through node validation and mempool, mining into a Merkle-rooted block, and network consensus; a verifier then checks the credential, while the attack simulator demonstrates tamper detection. The graph includes the documented demo pages and core engine. Network internals and several page implementations were not sampled, so those relationships rely on README documentation rather than source-level inspection.
Main entry points: blockchain.py Credential ledger · transaction.py Credential transactions · node.py Three-node network · mempool.py Transaction mempool
Components 24
Streamlit experience
- Dashboard and navigation
app.py - Shared session state
state.py - Wallet demo
pages/2_Wallet.py - Transaction demo
pages/3_Transaction.py - Mempool demo
pages/4_Mempool.py - Merkle visualization
pages/5_Merkle.py - Blockchain explorer
pages/6_Explorer.py - Mining demo
pages/7_Mining.py - Network demo
pages/8_Network.py - Mining and consensus
pages/9_Mining_Flow.py - Credential verification
pages/10_Verify.py - Attack simulator
pages/11_Attacks.py
Credential security
- SHA-256
blockchain/hash.py - ECDSA wallet
blockchain/wallet.py - Credential transactions
blockchain/transaction.py - Transaction mempool
blockchain/mempool.py
Chain and mining
- Merkle tree and proofs
blockchain/merkle.py - Block and header
blockchain/block.py - Proof of Work
blockchain/mining.py - Credential ledger
blockchain/blockchain.py
Node network
- Three-node network
blockchain/node.py
Other components
- Issuer
- Holder
- Verifier
Connections 33
- Dashboard and navigation → Shared session state: initializes state
app.py - Shared session state → Three-node network: creates shared network
state.py - Issuer → Wallet demo: creates signing wallet
README.md - Holder → Transaction demo: receives credential
README.md - Wallet demo → ECDSA wallet: demonstrates keys
README.md - Transaction demo → Credential transactions: creates and signs
README.md - Credential transactions → ECDSA wallet: signs via
blockchain/transaction.py - Credential transactions → SHA-256: hashes canonical data
blockchain/transaction.py - ECDSA wallet → SHA-256: derives address
blockchain/wallet.py - Credential transactions → Transaction mempool: submitted for validation
README.md - Transaction mempool → Credential transactions: verifies transaction
blockchain/mempool.py - Mempool demo → Transaction mempool: demonstrates management
README.md - Three-node network → Transaction mempool: maintains per-node pools
README.md - Mining and consensus → Three-node network: submits and broadcasts
README.md - Network demo → Three-node network: shows node status
README.md - Three-node network → Credential ledger: maintains node chains
README.md - Mining and consensus → Credential ledger: demonstrates consensus flow
README.md - Credential ledger → Block and header: manages blocks
blockchain/blockchain.py - Credential ledger → Credential transactions: validates credentials
blockchain/blockchain.py - Credential ledger → Merkle tree and proofs: verifies Merkle proofs
blockchain/blockchain.py - Block and header → Merkle tree and proofs: calculates root
blockchain/block.py - Block and header → SHA-256: hashes header
blockchain/block.py - Credential ledger → Proof of Work: checks proof of work
blockchain/blockchain.py - Mining demo → Proof of Work: demonstrates mining
README.md - Merkle visualization → Merkle tree and proofs: visualizes proofs
pages/5_Merkle.py - Blockchain explorer → Credential ledger: explores and validates
pages/6_Explorer.py - Verifier → Credential verification: requests credential check
README.md - Credential verification → Credential ledger: runs 12-step verification
README.md - Attack simulator → Credential ledger: demonstrates tampering
pages/11_Attacks.py - Attack simulator → Transaction mempool: demonstrates validation attacks
pages/11_Attacks.py - Attack simulator → Proof of Work: demonstrates PoW tampering
pages/11_Attacks.py - Attack simulator → Merkle tree and proofs: demonstrates root tampering
pages/11_Attacks.py - SHA-256 → Merkle tree and proofs: hashes tree pairs
blockchain/merkle.py