Tous les Projets
Backend
Blockchain de Zéro — Spring Boot
Une blockchain pédagogique en Java/Spring Boot : blocs, pool de transactions (mempool), hachage SHA-256, minage Proof-of-Work et validation complète de la chaîne — le tout piloté par une API REST, avec des démos crypto AES et chiffrement asymétrique.
Proof of Work
Consensus
SHA-256
Hashing
6
REST endpoints
AES + RSA
Crypto demos
Approche
Implémenter blocs + mempool + minage PoW + validation de chaîne, le tout exposé et testable via REST
Stack Technique
Java 17Spring Boot 3.0SHA-256AES / asymmetric cryptoMaven
Mots-clés
BlockchainProof of WorkSHA-256CryptographySpring BootRESTAES
Analyse Approfondie
Une implémentation de blockchain de zéro qui rend les mécanismes fondamentaux visibles et testables via une API REST.
Composants principaux
| Composant | Rôle |
|---|---|
Block | index, timestamp, hash précédent/courant, nonce, données |
Blockchain | addBlock, mineBlock, validateChain |
Transaction / TransactionPool | transactions en attente (mempool) |
HashUtil | hachage SHA-256 |
examples/ | démos hachage, chiffrement symétrique (AES) & asymétrique |
API REST
GET /blockchain → chaîne complète
POST /blockchain/transaction → ajoute une tx au pool
POST /blockchain/mine → mine un bloc (Proof of Work)
GET /blockchain/block/{index} → bloc à l'index
GET /blockchain/transaction-pool→ transactions en attente
GET /blockchain/validate → vérifie l'intégrité de la chaîne
Concepts démontrés
- ▸Blocs chaînés par hash (chaque bloc stocke le hash précédent)
- ▸SHA-256 pour l'intégrité cryptographique
- ▸Proof of Work — recherche de nonce jusqu'à atteindre la difficulté
- ▸Mempool de transactions consommées au minage
- ▸Validation de chaîne détectant toute altération par re-hachage complet
Tourne sur :9999 via ./mvnw spring-boot:run ; WORKSHOP.md est un guide pas-à-pas.