All Projects → louishenrifranc → Blockchain

louishenrifranc / Blockchain

Licence: other
Implementation of a Blockchain as a school project

Programming Languages

C++
36643 projects - #6 most used programming language
assembly
5116 projects
shell
77523 projects
c
50402 projects - #5 most used programming language
Makefile
30231 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Blockchain

PlasmaContract
More Viable Plasma (MoreVP) contract with Limbo Exits
Stars: ✭ 26 (+62.5%)
Mutual labels:  transaction
sargeras
基于Saga思想解决长事务(LLT,Long-Live-Transaction)的框架
Stars: ✭ 22 (+37.5%)
Mutual labels:  transaction
sesdashboard
Analytics and activity tracking dashboard for AWS Simple Email Service
Stars: ✭ 36 (+125%)
Mutual labels:  transaction
nebPay.js
Nebulas payment Javascript SDK
Stars: ✭ 81 (+406.25%)
Mutual labels:  transaction
Stack
A Type-Safe, Thread-Safe-ish approach to CoreData in Swift
Stars: ✭ 47 (+193.75%)
Mutual labels:  transaction
getboost
NuGet packages for Boost framework.
Stars: ✭ 49 (+206.25%)
Mutual labels:  boost-libraries
nimcrypto
Nim cryptographic library
Stars: ✭ 129 (+706.25%)
Mutual labels:  crypto-library
numerifides
A proposal for a system of decentralized trust, built on an open, public blockchain.
Stars: ✭ 14 (-12.5%)
Mutual labels:  transaction
hermes-core
Security framework for building multi-user end-to-end encrypted data storage and sharing/processing with zero leakage risks from storage and transport infrastructure.
Stars: ✭ 72 (+350%)
Mutual labels:  crypto-library
factomjs
Javascript library to build applications on the Factom blockchain.
Stars: ✭ 23 (+43.75%)
Mutual labels:  transaction
ts-mongodb-orm
Typescript Orm wrapper for Mongodb
Stars: ✭ 13 (-18.75%)
Mutual labels:  transaction
dtmcli-php
a php client for distributed transaction framework dtm.
Stars: ✭ 26 (+62.5%)
Mutual labels:  transaction
Cross-platform-AES-encryption-128bit
No description or website provided.
Stars: ✭ 19 (+18.75%)
Mutual labels:  crypto-library
bitcoincashjs
WARNING: This project is no longer maintained. Please, use bitcore-lib-cash instead.
Stars: ✭ 80 (+400%)
Mutual labels:  transaction
rawtx
A Golang module that helps you answer questions about raw Bitcoin transactions, their inputs, outputs and scripts.
Stars: ✭ 12 (-25%)
Mutual labels:  transaction
eth.rb
a straightforward library to build, sign, and broadcast ethereum transactions anywhere you can run ruby.
Stars: ✭ 111 (+593.75%)
Mutual labels:  transaction
Fog
Pharo Ethereum Driver
Stars: ✭ 19 (+18.75%)
Mutual labels:  transaction
k2hftfuse
File transaction by FUSE-based file system
Stars: ✭ 30 (+87.5%)
Mutual labels:  transaction
indyscan
Hyperldger Indy Transaction Explorer
Stars: ✭ 52 (+225%)
Mutual labels:  transaction
webpay rails
WebpayRails is an easy solution for integrate Transbank Webpay in Rails applications
Stars: ✭ 16 (+0%)
Mutual labels:  transaction

Blockchain

  • Implement a blockchain for a school project.
  • Simpler version of the blockchain: register domain name in the blockchain
  • Only CPP code

Requirements

  • cryptocpp
  • boost

Implementation

The project was to build a functionnal blockchain. I wasn't able to code the network part in the short period of time, so only the cores function of the blockchain works (some network class have been start, but nothing finished).
In this blockchain implementation, you can:

  • Identify as a new user, and create a transaction
Identite id("Franc Louis Henri", "Jerome");
cout << id.getNom() << " " << id.getPrenom() << endl;
KeyPair p = id.getKeyPair(); // Get key

string nomDeDomaine = "facebook.com";
string information = "69.63.176.13";
Transaction t(id, nomDeDomaine, information);
  • Add this transaction to the blockchain

BlockChain blockchain; // Create a blockchain
Block genesis(0); // Create first block
std::shared_ptr<Block> ptr0 = std::make_shared<Block>(genesis);
blockchain.push_back(genesis)

// create some transactions
vector<Transaction> transactions_block1{ t1,t,t2,t22,t3,t4 };

// create a new block referencing the previous one
Block block1(ptr0, transactions_block1);

// Compute the proof of work
block1.solveProofofWork();

// add it to the blockhain
blockchain.push_back(block1)
  • I also implemented a database from scratch, and not used any other implementation (because the goal was to understand and practise by coding). Probably not optimal, still cool to code. The database is used to save all traduction domaine name -> IP + informations.
DataBase database;

// Get all transaction of a block
vector all_transaction = std::get<2>(block1).get_Transactions_List()

// Get the entry of the last transaction in the database
database.get(all_transaction.back())

// push a transaction database.push_back(transaction)
// push a all block database.update(block)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].