r/learnpython • u/h4rln • 2d ago
I built a mini blockchain in Python - Feedback welcome
I'm 19, studying computing in college. I built this to understand how blockchains work.
Repo https://github.com/h4rl0/mini-chain
What it does
-Genesis block, chain of blocks linked by SHA-256 hashes
-Proof of work with adjustable difficulty
-Chain validation
-Flask API with CORS enabled so a front end can talk to it
Built with
Python, Flask, flask-cors, requests, hashlib
What I'd like feedback on
-Is the code structure okay, or could it be improved
-Anything I may have gotten wrong
-What I could add next
0
Upvotes
1
u/mopslik 2d ago
Type hints (see PEP484) and docstrings (see PEP257 and PEP8).
-1
u/[deleted] 2d ago
[removed] — view removed comment