{"id":15672491,"url":"https://github.com/louishenrifranc/blockchain","last_synced_at":"2025-05-06T21:24:23.367Z","repository":{"id":73399069,"uuid":"53616080","full_name":"louishenrifranc/Blockchain","owner":"louishenrifranc","description":"Implementation of a Blockchain as a school project","archived":false,"fork":false,"pushed_at":"2016-12-17T14:35:28.000Z","size":18243,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T03:06:04.877Z","etag":null,"topics":["blockchain","boost-libraries","cplusplus-14","crypto-library","database","transaction"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/louishenrifranc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-10T20:51:47.000Z","updated_at":"2023-03-02T02:35:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ad28b46-ef24-4e60-bd0f-c0590dc5a533","html_url":"https://github.com/louishenrifranc/Blockchain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishenrifranc%2FBlockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishenrifranc%2FBlockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishenrifranc%2FBlockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louishenrifranc%2FBlockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louishenrifranc","download_url":"https://codeload.github.com/louishenrifranc/Blockchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252770443,"owners_count":21801538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","boost-libraries","cplusplus-14","crypto-library","database","transaction"],"created_at":"2024-10-03T15:27:14.317Z","updated_at":"2025-05-06T21:24:23.323Z","avatar_url":"https://github.com/louishenrifranc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blockchain\n* Implement a blockchain for a school project. \n* Simpler version of the blockchain: register domain name in the blockchain  \n* Only CPP code\n\n# Requirements\n* ![cryptocpp](https://www.cryptopp.com/)\n* ![boost](http://www.boost.org/)\n\n# Implementation\nThe 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).  \nIn this blockchain implementation, you can: \n* Identify as a new user, and create a transaction\n```{cpp}\nIdentite id(\"Franc Louis Henri\", \"Jerome\");\ncout \u003c\u003c id.getNom() \u003c\u003c \" \" \u003c\u003c id.getPrenom() \u003c\u003c endl;\nKeyPair p = id.getKeyPair(); // Get key\n\nstring nomDeDomaine = \"facebook.com\";\nstring information = \"69.63.176.13\";\nTransaction t(id, nomDeDomaine, information);\n```\n* Add this transaction to the blockchain\n```{cpp}\n\nBlockChain blockchain; // Create a blockchain\nBlock genesis(0); // Create first block\nstd::shared_ptr\u003cBlock\u003e ptr0 = std::make_shared\u003cBlock\u003e(genesis);\nblockchain.push_back(genesis)\n\n// create some transactions\nvector\u003cTransaction\u003e transactions_block1{ t1,t,t2,t22,t3,t4 };\n\n// create a new block referencing the previous one\nBlock block1(ptr0, transactions_block1);\n\n// Compute the proof of work\nblock1.solveProofofWork();\n\n// add it to the blockhain\nblockchain.push_back(block1)\n```\n* 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 -\u003e IP + informations_.  \n```{cpp}\nDataBase database;\n\n// Get all transaction of a block\nvector all_transaction = std::get\u003c2\u003e(block1).get_Transactions_List()\n\n// Get the entry of the last transaction in the database\ndatabase.get(all_transaction.back())\n\n// push a transaction database.push_back(transaction)\n// push a all block database.update(block)\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouishenrifranc%2Fblockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouishenrifranc%2Fblockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouishenrifranc%2Fblockchain/lists"}