A decentralized peer-to-peer file storage system built on blockchain technology — ensuring file immutability, integrity, and confidentiality through cryptographic proof-of-work.
- About
-
- Features
-
- How It Works
-
- Tech Stack
-
- Getting Started
-
- Usage
-
- Research Background
-
-
This project addresses the security vulnerabilities of centralized file storage by implementing a blockchain-based decentralized alternative. Files stored in this system benefit from the immutability and tamper-proof nature of blockchain — unauthorized modifications require consensus from the entire peer network, making silent alterations effectively impossible.
Originally developed as an undergraduate research project exploring blockchain's potential beyond cryptocurrency.
- ⛓️ Blockchain Backbone — Each file storage operation forms a cryptographically linked block
-
- 🔨 Proof-of-Work (PoW) — Mining algorithm requiring hash values with 3 leading zeros (difficulty level 3)
- 🌐 P2P Network — Multiple peers participate in validating and storing data
-
🔒 Immutability — Once stored, files cannot be silently modified without full network consensus
- 🛡️ Data Integrity — Cryptographic hashes guarantee file authenticity
- Python 3.8+
-
All dependencies listed in
requirements.txt -
git clone https://github.com/grammerpro/BlockchainFileStorage.git cd BlockchainFileStorage pip install -r requirements.txt# Terminal 1 — Start the peer node python peer.py # Terminal 2 — Start the web application python run_app.py
Open the web interface in your browser and use it to upload, store, and retrieve files.
Once both processes are running, the Flask web interface allows you to:
- Upload a file — Triggers the PoW mining process
-
- View the blockchain — Inspect the chain of blocks and their hashes
-
-
Verify file integrity — Confirm a file hasn't been tampered with by checking its block hash
-
-
This project was built to explore the following research question:
-
How can blockchain technology be leveraged to develop a secure and efficient file storage system, considering data integrity, accessibility, and cost-effectiveness?
Key findings from user surveys and analysis:
- Users expressed significantly higher perceived security confidence with blockchain storage vs. centralized alternatives
The PoW mining mechanism successfully prevented unauthorized block insertions in testing
- The decentralized model eliminates single points of failure inherent in cloud-only storage
- Scalability — PoW consensus is computationally intensive at scale; production systems would require optimized consensus mechanisms (PoS, PBFT)
-
Network Size — Tested on a small peer group; real-world performance with large networks is untested
- Storage Efficiency — Full blockchain replication across peers increases storage footprint
Released under the MIT License.
Vardhan · vardhana1209@gmail.com · github.com/grammerpro
-
1. User uploads a file │ ▼ 2. File is hashed and packaged into a candidate block │ ▼ 3. Peer solves PoW puzzle (hash must start with "000") │ ▼ 4. Valid block is broadcast to all network peers │ ▼ 5. Peers validate and append to their local chains │ ▼ 6. File is now immutably stored across the network
Layer Technology Backend Python 3 · Flask P2P Communication peer.py— custom peer networkingFrontend HTML / CSS Consensus Proof-of-Work (custom implementation) Version Control Git