{"id":13641316,"url":"https://github.com/luckychain/lucky","last_synced_at":"2025-04-20T07:32:46.003Z","repository":{"id":66130399,"uuid":"62758084","full_name":"luckychain/lucky","owner":"luckychain","description":"Proof of luck Intel SGX and IPFS based blockchain.","archived":false,"fork":false,"pushed_at":"2020-09-12T20:28:44.000Z","size":457,"stargazers_count":73,"open_issues_count":5,"forks_count":14,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-04-14T08:47:57.015Z","etag":null,"topics":["blockchain","ipfs","proof-of-luck","sgx"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luckychain.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}},"created_at":"2016-07-06T22:43:28.000Z","updated_at":"2023-11-07T12:42:45.000Z","dependencies_parsed_at":"2024-01-14T11:13:18.124Z","dependency_job_id":"fcb42a69-150f-48be-af36-34a0377cd20d","html_url":"https://github.com/luckychain/lucky","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/luckychain%2Flucky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckychain%2Flucky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckychain%2Flucky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luckychain%2Flucky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luckychain","download_url":"https://codeload.github.com/luckychain/lucky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249864317,"owners_count":21336725,"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","ipfs","proof-of-luck","sgx"],"created_at":"2024-08-02T01:01:19.728Z","updated_at":"2025-04-20T07:32:45.719Z","avatar_url":"https://github.com/luckychain.png","language":"JavaScript","funding_links":[],"categories":["Blockchains","BlockChain","Codes \u0026 Repos"],"sub_categories":["Library OSes and SDKs"],"readme":"# Luckychain\n\nLuckychain is a blockchain [layered on top](http://mitar.tnode.com/post/146227562556/towards-layered-re-decentralized-web)\nof [IPFS](https://ipfs.io/). It uses [Intel SGX](https://software.intel.com/en-us/sgx)\ncapabilities of modern CPUs for Proof of Luck consensus algorithm which allows energy efficient mining.\nTransactions can reference arbitrary data of practically unlimited size. A new block is mined on\naverage every 13 seconds. It is written in JavaScript and uses a [NPM package which allows running JavaScript in SGX enclaves](https://github.com/luckychain/node-secureworker).\n\n**Warning: This is a prototype. Do not use it yet for anything important.**\n\nCurrent implementation uses mock SGX implementation without any of the security assurances of the SGX platform.\nHelp finalizing the [NPM package with full SGX support is welcome](https://github.com/luckychain/node-secureworker).\n\n## Build guide\n\nThis library has the following system dependencies:\n\n* [node.js](https://nodejs.org/) (tested with v6.10.0): \n  * You can install it from [nodejs.org](https://nodejs.org/en/),\n  * or use your system's package,\n  * or [Node Version Manager](https://github.com/creationix/nvm).\n* [IPFS](https://ipfs.io/)\n  * Download the [prebuilt package](https://ipfs.io/docs/install/),\n  * then untar the package `tar xvfz go-ipfs.tar.gz`\n  * and run `ln -s \"$(pwd)/go-ipfs/ipfs\" /usr/local/bin/ipfs`.\n\nAfter installing the aforementioned system dependencies, install the node dependencies in the root of this repository:\n\n```\n$ npm install\n```\n\n## Start\n\nInitialize IPFS the first time:\n\n```\n$ ipfs init\n```\n\nStart the IPFS daemon:\n\n```\n$ ipfs daemon --enable-pubsub-experiment\n```\n\nLastly, start the application:\n```\n$ npm start\n```\n\nOpen the web interface at [http://localhost:8000](http://localhost:8000).\n\n## Docker\n\nYou can use [Docker to run Luckychain](https://hub.docker.com/r/luckychain/luckychain/):\n\n```\ndocker run -d -p 4001:4001/tcp -p 4002:4002/udp -p 8000:8000/tcp --name luckychain luckychain/luckychain:master\n```\n\n## Whitepaper\n\nThe whitepaper describing Proof of luck consensus protocol and Luckychain blockchain was published in\nSysTEX '16 Proceedings of the 1st Workshop on System Software for Trusted Execution,\n[DOI 10.1145/3007788.3007790](http://dx.doi.org/10.1145/3007788.3007790).\n\nAvailable at:\n\n* https://dl.acm.org/citation.cfm?id=3007790\n* https://arxiv.org/abs/1703.05435\n* https://eprint.iacr.org/2017/249\n\nAbstract:\n\n\u003e In the paper, we present designs for multiple blockchain consensus primitives and a novel blockchain\n\u003e system, all based on the use of trusted execution environments (TEEs), such as Intel SGX-enabled CPUs.\n\u003e First, we show how using TEEs for existing proof of work schemes can make mining equitably distributed\n\u003e by preventing the use of ASICs. Next, we extend the design with proof of time and proof of ownership\n\u003e consensus primitives to make mining energy- and time-efficient. Further improving on these designs,\n\u003e we present a blockchain using a proof of luck consensus protocol. Our proof of luck blockchain uses\n\u003e a TEE platform's random number generation to choose a consensus leader, which offers low-latency\n\u003e transaction validation, deterministic confirmation time, negligible energy consumption, and equitably\n\u003e distributed mining. Lastly, we discuss a potential protection against up to a constant number of\n\u003e compromised TEEs.\n\nYou can cite it as:\n\n```\n@inproceedings{Milutinovic2016,\n author = {Milutinovic, Mitar and He, Warren and Wu, Howard and Kanwal, Maxinder},\n title = {Proof of Luck: An Efficient Blockchain Consensus Protocol},\n booktitle = {Proceedings of the 1st Workshop on System Software for Trusted Execution},\n series = {SysTEX '16},\n year = {2016},\n isbn = {978-1-4503-4670-2},\n location = {Trento, Italy},\n pages = {2:1--2:6},\n articleno = {2},\n numpages = {6},\n url = {http://doi.acm.org/10.1145/3007788.3007790},\n doi = {10.1145/3007788.3007790},\n acmid = {3007790},\n publisher = {ACM},\n address = {New York, NY, USA},\n keywords = {Blockchain, Consensus Protocol, Intel SGX, Trusted Execution Environments},\n} \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckychain%2Flucky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluckychain%2Flucky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluckychain%2Flucky/lists"}