Blockchain_CPP est une blockchain décentralisée en C++ qui allie P2P, API HTTP, économie intégrée (MTX) et visualisation en temps réel façon Matrix 📟💚.
✨ Nouvelles fonctionnalités :
✔️ 🌐 API RESTful HTTP : Interaction en temps réel avec la blockchain.
✔️ 💰 Système économique MTX : Envoi sécurisé de tokens entre utilisateurs.
✔️ 🟢 Proof of Matrix (PoM) : Récompense automatique des nœuds actifs.
✔️ 🛡️ Anti-Spam intégré : Les transactions abusives sont pénalisées.
✔️ ⚡ Synchronisation P2P avancée : Découverte et connexion automatique entre nœuds.
✔️ 🎥 Effet Matrix dynamique : Affichage en temps réel du trafic blockchain.
📌 Systèmes supportés : Ubuntu / Debian / Proxmox / Termux
📌 Dépendances : C++ (g++), Boost, OpenSSL, Python3, ncurses, Tor
sudo apt update
sudo apt install -y build-essential libboost-system-dev libssl-dev libboost-all-dev python3 libncurses5-dev torgit clone https://github.com/FoxtekTS/blockchain_cpp.git
cd blockchain_cppg++ -std=c++17 -o build/blockchain src/main.cpp src/block.cpp src/blockchain.cpp src/network.cpp src/transaction.cpp src/api.cpp -Iinclude -lssl -lcrypto -lboost_system -lpthread./build/blockchain🚀 L’API HTTP démarre sur http://localhost:8081
🚀 Le réseau P2P tourne sur port 8080
curl http://localhost:8081/blockscurl -X POST -d "Nouvelle transaction" http://localhost:8081/add_blockcurl http://localhost:8081/balance/AliceinitializeAccount("Alice");
initializeAccount("Bob");sendMTX("Alice", "Bob", 20);rewardActiveNode("Alice");penalizeSpammer("Bob");std::cout << "Alice : " << myBlockchain.tokenBalance["Alice"] << " MTX\n";
std::cout << "Bob   : " << myBlockchain.tokenBalance["Bob"] << " MTX\n";Lance l’effet Matrix :
python3 matrix_blockchain.py📌 Explication :
✅ Lettres & chiffres verts → Transactions blockchain.
✅ Flux descendant → Nouveaux blocs ajoutés.
✅ Vitesse variable → Plus d’activité = plus rapide.
🔥 Plus la blockchain est active, plus l’effet Matrix devient intense !
Tu peux mettre à jour tous les nœuds en une seule commande :
ansible-playbook -i inventory update_matrix.yml🔹 Tester la connexion entre nœuds :
ansible -i inventory blockchain_nodes -m ping🔹 Redémarrer un nœud blockchain :
ansible -i inventory blockchain_nodes -a "systemctl restart blockchain"Pour suivre l’évolution de la blockchain :
tail -f blockchain.log📌 Exemple de transaction :
Index: 5
Previous Hash: a4562b789e1c4a...
Data: Transaction 5 : Alice → Bob
Hash: 9f3b2c1e568fa...
Timestamp: 1742098882
---------------------------------
Connecté au pair 192.168.1.22:8080
🚀 FoxtekTS aka ZEROCOOL
💾 Version actuelle : v2.0 MTX Edition
📅 Dernière mise à jour : Mars 2025
🔗 GitHub : FoxtekTS/blockchain_cpp
🔥 Bienvenue dans le futur du P2P décentralisé avec API HTTP ! 🚀💾