{"id":21508025,"url":"https://github.com/metaphorical/quantum-blockchain","last_synced_at":"2025-04-09T15:52:07.482Z","repository":{"id":42427900,"uuid":"121976608","full_name":"metaphorical/quantum-blockchain","owner":"metaphorical","description":"General purpose blockchain","archived":false,"fork":false,"pushed_at":"2024-04-01T14:33:00.000Z","size":132,"stargazers_count":13,"open_issues_count":27,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-01T15:54:05.575Z","etag":null,"topics":["blockchain","blockchain-technology","general-purpose","opensource","project","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metaphorical.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-02-18T18:07:23.000Z","updated_at":"2024-04-14T20:32:17.709Z","dependencies_parsed_at":"2023-10-04T08:44:44.151Z","dependency_job_id":"2b96310e-7660-4e2e-9072-841b12db6a86","html_url":"https://github.com/metaphorical/quantum-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/metaphorical%2Fquantum-blockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaphorical%2Fquantum-blockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaphorical%2Fquantum-blockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaphorical%2Fquantum-blockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metaphorical","download_url":"https://codeload.github.com/metaphorical/quantum-blockchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248064249,"owners_count":21041854,"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","blockchain-technology","general-purpose","opensource","project","python"],"created_at":"2024-11-23T20:45:08.522Z","updated_at":"2025-04-09T15:52:07.457Z","avatar_url":"https://github.com/metaphorical.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![quantum blockchain](./misc/logo.png \"QBC\") [![Known Vulnerabilities](https://snyk.io/test/github/metaphorical/quantum-blockchain/badge.svg)](https://snyk.io/test/github/metaphorical/quantum-blockchain)\n\n# Quantum Blockchain (QBC)\n#### Basic general purpose blockchain in Python\n\n\nThis project grew out of my experiment of building something to get the full scope of what is needed to build general purpose blockchain. Current idea is to try and evolve it to project that can create BC solution which can seriously contribute to any microservice echosystem in need of safe, secure and distributed data storage.\n\n## Idea (look into Medium article for more in depth explanation)\n\nBuild general purpose blockchain system that can maintain and fork multiple blockchains for different purposes and accept different data for different blockchains. Build it as general purose solution that can be used as a service in multiservice system to provide blockchain functionality.\n\n## Documentation\n\n* [Medium article (Whitepaper?)](https://hackernoon.com/building-general-purpose-blockchain-71ffb8511ce)\n* [Blockchain Digest](documentation/blockchain-digest.md)\n* [Architecture](documentation/architecture.md)\n\n## How start contributing and future plans for a project\n\nYou can fork this repo and work on it. When you create pull requests, I will make sure to review it and merge it as soon as possible.\n\n**If this ever picks up as proper project, I want to give control over it ot group of people so it makes senese to contribute and work on it.**\n\nMore detailed documentation about contributing and rules will come later, but you can review whitepaper, outline of planed features etc, and you can also review trello board:\n\n[QBC trello](https://trello.com/b/IKDDvvC1/quantum-blockchain)\n\nIf you want to contribute, by either idea or doing some work in code (there is a need for lots of that), please ping me at rastko.vukasinovic@gmail.com so we can discuss and I can add you to board so we ca collect all the ideas and proposals and track any work.\n\nThank you!\n\nRead following part of docs for a way to run QBC and quickly start working on it.\n\n## QBC Node server\n\n\u003e **NOTE:** At this moment, for dev purposes, flask server will be running in debug mode.\n\n### Running for local development\nInstall dependencies from requirements.txt\n\nStart server by running\n\n```\npython run.py\n```\nThis runs server at port **5000**\n\nIf you want to run multiple instances you can add the port as the argument:\n\n```\npython run.py 3000\n```\n\nThis wouldn't fully work since all the instances look at same place on the disc and persist node network data and chain in the same file... this is not for tastinh networks of nodes - just for running it in different port if you want to do it without virtualization.\n\n### Running it using Docker - basic\n```\ndocker build -t qbc .\ndocker run -it -p 5000:5000 qbc\n```\n\n### Node network testing setup\n\nIn order to be able to test multi node network situation there is docker-compose setup provided for this case. To start it simply do:\n```\ndocker-compose build\ndocker-compose up\n```\nSetup is doing the following:\n* All three nodes will react toyour code changes\n* Internal app data is stored in **./test/test_storage/node\\***\n* Logs are stored in **./test/test_storage/logs\\***\n\n**NOTE:** please make sure to cleanup directories for storage persistance by just leaving main node in node list and removing everything else when you are running new clean test.\n\n### List of basic features\n\n* Accept transactions\n* broadcast transactions to known nodes\n* Create a block\n* Get full chain for comparison\n* Basic node registration on the network\n* Basic node discovery and distributed registration\n* Get chain stats\n* Persist blockchain on disc\n* Basic bootstrap of the node - when node boots up it reads from the disc and fetches chain stats from known nodes, getting longest chain, or keeping current if longest or same length\n* Broadcast new block to all nodes\n* [TODO] Check new block on all nodes (chain length check + all other checks)\n* [TODO] Make chain stats for comparison (configurable/parametrized) (POW)\n* [TODO] Network auth system\n\n\n### List of additional features:\n* [TODO] Multiple proof (consensus) systems\n* [TODO] Fork new blockchain\n* [TODO] Maintain multiple blockchains on network\n* [TODO] Strong validation system\n* [TODO] Zero knowledge proof access to data\n* [TODO] Other auth / data lock methods\n* [TODO] Denormalization to SQL DB / JSON\n\n### Support features\n* [TODO] Admin UI\n* [TODO] Analytics dashboard\n\n\n## Basic elements\n\n* **Quantum blockchain (QBC)** - this blockcahain\n* **Quant** - block in QBC\n* **Bang** - creation of new blockchain - genesis block.\n* **Transaction** - new data to be added to block\n* **Leap** - creating new Quant containing transactions from the pool\n\n### Routes available\n\n* **/inject**\n  * [POST] add transaction to transaction pool (transactions waiting ti be added to db)\n* **/leap**\n  * [GET] add the data to blockchain - mine a block putting all the transactions in transaction pool in.\n* **/json-chain**\n  * [GET] get whole chain in the node in JSON format\n* **/chain**\n  * [GET] get whole chain in the node serialized in pickle\n* **/discover**\n  * [POST] register one node on the system by sending it node host addres like host=address\n  * [GET] get currently up to date list of live nodes known to this node\n* **/stats**\n  * [GET] Get chain stats\n\n### To test server while running\n\nUsing [httpie](https://httpie.org/) :\n\nAdd transaction to node (put on waiting list aka transaction pool):\n\n```\nhttp -v POST localhost:5000/inject data=\"{\\\"test\\\":\\\"test2\\\"}\"\n```\n\nAdd block of data to blockchain:\n```\nhttp -v GET localhost:5000/leap\n```\n\nGet blockchain in JSON format:\n```\nhttp -v GET localhost:5000/json-chain\n```\n\n## Used third party dependencies\n\n* [Flask](http://flask.pocoo.org/docs/0.12/quickstart/)\n* [Requests](http://docs.python-requests.org/en/latest/user/quickstart/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaphorical%2Fquantum-blockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetaphorical%2Fquantum-blockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaphorical%2Fquantum-blockchain/lists"}