{"id":19746037,"url":"https://github.com/mehrankazeminia/smart-blockchain","last_synced_at":"2026-06-12T11:31:02.888Z","repository":{"id":159214349,"uuid":"245799113","full_name":"MehranKazeminia/Smart-Blockchain","owner":"MehranKazeminia","description":"Implementing a \"Smart Blockchain\" with python","archived":false,"fork":false,"pushed_at":"2020-04-16T05:59:13.000Z","size":2691,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T07:48:44.374Z","etag":null,"topics":["bitcoin-mining","bitcoin-transactions","blockchain","blockchain-networks","bpsc","cryptocurrency","mehran-kazeminia","miners","proof","python","smart-blockchain","smart-contract","soliset","somayyeh-gholami","without-miners"],"latest_commit_sha":null,"homepage":"https://www.soliset.com","language":"Python","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/MehranKazeminia.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":"2020-03-08T11:06:44.000Z","updated_at":"2024-04-12T08:00:50.000Z","dependencies_parsed_at":"2023-07-29T10:47:14.819Z","dependency_job_id":null,"html_url":"https://github.com/MehranKazeminia/Smart-Blockchain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MehranKazeminia/Smart-Blockchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehranKazeminia%2FSmart-Blockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehranKazeminia%2FSmart-Blockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehranKazeminia%2FSmart-Blockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehranKazeminia%2FSmart-Blockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MehranKazeminia","download_url":"https://codeload.github.com/MehranKazeminia/Smart-Blockchain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehranKazeminia%2FSmart-Blockchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34243051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bitcoin-mining","bitcoin-transactions","blockchain","blockchain-networks","bpsc","cryptocurrency","mehran-kazeminia","miners","proof","python","smart-blockchain","smart-contract","soliset","somayyeh-gholami","without-miners"],"created_at":"2024-11-12T02:13:09.146Z","updated_at":"2026-06-12T11:31:02.849Z","avatar_url":"https://github.com/MehranKazeminia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv class=\"alert alert-success\"\u003e\n    \u003ch1 align=\"center\"\u003eSmart Blockchain\u003c/h1\u003e\n    \u003ch3 align=\"center\"\u003e\u003ca href=\"https://medium.com/@somayyeh_43305\"\u003eSomayyeh Gholami \u0026 Mehran Kazeminia\u003c/a\u003e\u003c/h3\u003e\n\u003c/div\u003e\n\n\u003cimg src=\"https://github.com/MehranKazeminia/Smart-Blockchain/blob/master/smart_blockchain_image/nn110.jpg\"\u003e \n\n## Introduction\nTen years ago, Bitcoin’s proof-of-work mechanism was a great\nidea for a pilot project and the launch of the first decentralized\nnetwork as well. But this approach for long-term must be\ncorrected, and for years, the amount of power consumed ( more\nthan 50TWh per year ) by a country with ten million populations,\ncannot be dedicated for bitcoin transactions only. It’s extreme\nselfishness and not fair\n\nThe research published in Nature Climate Change (October 2018)\neven suggested that Bitcoin mining alone could push global\nwarming “above 2 °C within less than three decades“. The\nelectricity consumption of the proof-of-work mechanism used in\nthe bitcoin network is huge. Meanwhile, a major share of mining\noperations is done with electricity from coal-fired power plants in\nChina, cause increasing Bitcoin’s environmental problems and\nblockchain technology\n\nSmart Blockchain is the new generation of Blockchain networks\nthat will allow one or more smart contracts to collect accurate and\nflawless data from the successful transactions of a decentralized\nnetwork at the moment of transaction occurrence, and\nsimultaneously storing and registering these data in new blocks.\nSmart Blockchain needs neither the financial institution nor\nintermediary, in addition, there will be no task to do for miners and\nblock producers in this technology. In other words, within Smart\nBlockchain, always one or more smart contracts like a financial\ninstitution, free of charge and automatically record and store\ntransactions ‘data in new blocks.\n\n## How does Smart Blockchain work?\nIn Smart Blockchain, one or more Block Producer Smart Contract\n(BPSC) is present in the decentralized network, and no successful\ntransaction is performed without BPSC involvement. For a\nsuccessful transaction in the network, first, the sender must send\nthe cryptocurrency to the wallet of BPSC and then BPSC sends\ncryptocurrency automatically to the receiver. This simple action\nhas led the BPSC to have all network transactions’ data accurately\nand flawlessly and then as an accurate and trust financial\ninstitution, record transactions’ data into a new block and add this\nnew block to the end of the blockchain and so there will be no\ntasks to assign to miners and block producers.\n\n\n\u003cimg src=\"https://github.com/MehranKazeminia/Smart-Blockchain/blob/master/smart_blockchain_image/sb903.jpg\"\u003e \n\n\nAlso, Smart Blockchain provides the possibility to classify\ntransactions based on subject. For example, it allows trading of\nseveral types of cryptocurrency in a network consists of\nindependent blockchains. This will be done by increasing the\nnumber of BPSCs in the network. The limitation and also\nimportant point is that transactions can be assigned to separate\nBPSCs that their subjects are not related to each other. For\nexample, if we want a smart contract to give an award for every\n100 LIKEs, so the Likes’ transactions and cryptocurrencies’\ntransactions of such project should be stored and registered by\nthe single BPSC and into single Blockchain.\n\n\n\u003cimg src=\"https://github.com/MehranKazeminia/Smart-Blockchain/blob/master/smart_blockchain_image/sb904.jpg\"\u003e \n\n\n## What are the benefits of Smart Blockchain?\nAt the moment of transactions occurrence, the correct and\nflawless data of transactions are stored and registered. In this case,\nthere is no need to generate some alternatives from a block like\nwhat they do in Bitcoin network, Ethereum network, etc., and then\nthe miners choose the correct and valid block by spending so\nmuch money, consuming huge power electricity and using a\nvariety of proof mechanisms.\n\nStaggering power consumption is the result of the use of the\nproof-of-work mechanism or the proof-of-stake mechanism, or.....\nWhich Smart Blockchain does not require any of them at all.\nUnfortunately, the electricity consumption of one single bitcoin’s\ntransaction is 200,000 times more than electricity consumption of\na one single VISA’s transaction. The annual electricity\nconsumption used to store and register the entire Bitcoin’s\ntransactions is more than 50 terawatts (1 TWh = 3 600 000 000\n000 000 J) that is equal to the annual power consumption of a\ncountry with ten million populations. The study was published in\nOctober 2018 on global climate change, which showed that in less\nthan three decades, Bitcoin mining could increase global\ntemperatures more than 2 degrees Celsius.\n\nFortunately, Smart Blockchain transactions and regular Visa Card\ntransactions won’t differ on power consumption. The data stored\nby the BPSC is flawless because it is registered at the moment of\nthe transaction occurrence automatically and without human\ninterference. Smart Blockchain simply can end the nightmare of\nspending extra tens TWh electricity.\n\nBy using Smart Blockchain, we should no longer be concerned\nabout the fees of miners and block producers. BPSCs will\nautomatically and freely carry out all the tasks of the miners. Also,\nSmart Blockchain scalability is not comparable to available one\nand can compete with the speed of Visa’s transactions.\n\n\n## What is the use of Smart Blockchain?\n**First use:** In networks like Ethereum, EOS, etc. which is possible to\nregister and deploy the smart contracts, simply we can set up a\ndedicated blockchain for each new smart contract. In this way, as\nsoon as the new smart contract is launched, a BPSC will be\nlaunched, and from the very beginning, all of the transactions of a\nsmart contract will be stored and registered into the BPSC’s\nledger. In this case, the dedicated blockchain will not need any\ndata from Ethereum blockchain, EOS, etc., and it will work\nindependently. Meanwhile, at coding, this BPSC can be coded and\nlaunched separately, or BPSC codes can be imported into the\ndesired smart contract codes.\n\n**Second use:** For each Ethereum networks, EOS, and etc. that allow\nregistering and deploying the smart contracts, the whole existing\nBlockchains can be replaced with Smart Blockchain. To do this,\nafter launching a dedicated BPSC into the network, the precise\nand final status of all existing wallet is to be made available to the\nBPSC, Also thereafter all the subsequent network transactions will\nbe done via BPSC.\n\n**Third use:** If we want to use Smart Blockchain for networks such\nas Bitcoin which is not possible to set up any smart contract, we\nshould first launch a new decentralized network that allows\nregistration and deployment of smart contracts like the Ethereum\nnetwork. Then, in this new network, we design and activate a\nblock producer smart contract BPSC. After assuring of the\nfunctionality of BPSC on the new network, we must ask all Bitcoin\nowners to get the equivalent of their bitcoin, from the new\nBlockchain’s cryptocurrency, and at the same time, their initial\nbitcoin should be burned. These are done by the BPSC of a\nnetwork, and the BPSC can record the initial balance of any wallet\nin the network and begin its work immediately.\n\n**Fourth use:** Smart Blockchain can be used to launch entirely new\nblockchain and certainly everything can be designed from scratch.\nMeanwhile, regarding the Smart Blockchain’s features, we might\nsoon see one or more non-decentralized global networks that\ninclude all types of cryptocurrencies and smart contracts with\nindependent blockchain.\n\n## More Information\n\nhttps://www.soliset.com\nhttps://www.newchains.info \n\n\u003cimg src=\"https://github.com/MehranKazeminia/Smart-Blockchain/blob/master/smart_blockchain_image/bcpy103.jpg\"\u003e\n\n# Implementing a \"Smart Blockchain\" with python\nIn this article, we are going to implement a simple and plain \"smart blockchain\" with Python language and compare it with a blockchain. We hope that by doing this, the main concepts and advantages of this technology will be more clearly specified and welcomed by the developers and the blockchain community. A Block Producer Smart Contract (BPSC) exists in a plain \"smart blockchain\" network. To make a successful transaction in the network, the sender must first transfer the cryptocurrency to the (BPSC) wallet, and immediately the (BPSC) will automatically send the same cryptocurrency to the final recipient's wallet. This seemingly simple task saves accurate and impervious data from all successful transactions in the (BPSC) Smart Contract. The present article was written in April 2020 by Somayeh Gholami and Mehran Kazeminia in two versions in English and Persian.\n\n### Summary and conclusion:\nTo simulate the (BPSC) block producer smart contract, we considered a node with a port number 5000 and implemented the following three files:\n\nbpsc101.py This version is not final and cannot be interacted with other nodes.\n\nbpsc102.py This is the final version and all cases have been tested for this version. We tested the transaction request, the mining request, the request to send the last chain for the other nodes, and so on.\n\nbpsc103.py This version is also final, but in this version, we have added a new feature to the previous version. That is, (BPSC) required to create a new block after each transaction and add that block to its chain.\n\nThe ports 5001 and 5002 have the representation of other network nodes. To simulate these nodes, we implemented the following two versions:\n\nnodes_v1_5001.py and nodes_v1_5002.py\nThis version is according to \"Smart Blockchain\" technology and final. Although these nodes cannot produce blocks, they can do their transactions through (BPSC) and also receive the last chain from (BPSC).\n\nnodes_v2_5001.py and nodes_v2_5002.py\nThis is also final, but in this version, we have added a new feature to the previous version. It means a simple blockchain (To store personal data) has been added to the previous code.\n\n\n\n\n### https://www.soliset.com/python-smart-blockchain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrankazeminia%2Fsmart-blockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehrankazeminia%2Fsmart-blockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehrankazeminia%2Fsmart-blockchain/lists"}