{"id":13395370,"url":"https://github.com/anders94/blockchain-demo","last_synced_at":"2025-05-12T13:07:13.622Z","repository":{"id":37686684,"uuid":"72867492","full_name":"anders94/blockchain-demo","owner":"anders94","description":"A web-based demonstration of blockchain concepts.","archived":false,"fork":false,"pushed_at":"2024-12-16T17:50:57.000Z","size":518,"stargazers_count":5469,"open_issues_count":9,"forks_count":2720,"subscribers_count":253,"default_branch":"master","last_synced_at":"2025-05-11T06:04:12.589Z","etag":null,"topics":["bitcoin","blockchain","blockchain-technology"],"latest_commit_sha":null,"homepage":"","language":"Pug","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anders94.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,"publiccode":null,"codemeta":null}},"created_at":"2016-11-04T16:54:36.000Z","updated_at":"2025-05-10T20:15:07.000Z","dependencies_parsed_at":"2024-04-09T23:21:37.664Z","dependency_job_id":"7b22724a-748d-4089-ac18-8777f921ee0c","html_url":"https://github.com/anders94/blockchain-demo","commit_stats":{"total_commits":83,"total_committers":23,"mean_commits":3.608695652173913,"dds":0.5542168674698795,"last_synced_commit":"0b7119513711449a8f077035f1f3000536e21bfc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fblockchain-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fblockchain-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fblockchain-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders94%2Fblockchain-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders94","download_url":"https://codeload.github.com/anders94/blockchain-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745152,"owners_count":21957317,"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":["bitcoin","blockchain","blockchain-technology"],"created_at":"2024-07-30T17:01:54.407Z","updated_at":"2025-05-12T13:07:13.539Z","avatar_url":"https://github.com/anders94.png","language":"Pug","funding_links":[],"categories":["Pug","☤ Cool Coin/Blockchain Stuff","区块链、智能合约","HTML"],"sub_categories":["Physical Coin Wallets","网络服务_其他"],"readme":"# Blockchain Demo\nA web-based demonstration of blockchain concepts.\n\n[![Blockchain 101 - Demo](https://img.youtube.com/vi/_160oMzblY8/0.jpg)](https://www.youtube.com/watch?v=_160oMzblY8)\n\nThis is a very basic visual introduction to the concepts behind a blockchain. We introduce \nthe idea of an immutable ledger using an interactive web demo that is available here:\n\nhttp://andersbrownworth.com/blockchain/\n\n## Setup\nGet the code:\n\n```\ngit clone https://github.com/anders94/blockchain-demo.git\n```\n\nInstall dependencies:\n\n```\ncd blockchain-demo\nnpm install\n```\nRun the server:\n\n```\nnpm start\n```\n\nOR\n\n```\n./bin/www\n```\n#For windows: if the above command didn't work, use this (make sure you have Node.js installed in your system):\n```\nnode ./bin/www      \n```\n\nPoint a web browser at the demo:\n\n```\nhttp://localhost:3000\n```\n\n## Setup using Docker\n\nGet the code:\n\n```\ngit clone https://github.com/anders94/blockchain-demo.git\n```\n\nRun the Docker setup:\n\n```\ncd blockchain-demo\ndocker-compose up -d\n```\n\nPoint a web browser at the demo:\n\n```\nhttp://localhost:3000\n```\n\n## Optional Configuration\nYou can adjust the \"number of zeros\" required by the demo by editing the first two lines of\n`public/javascripts/blockchain.js`.\n\nBecause there are 16 possible characters in a hex value, each time you increment the difficulty\nby one you make the puzzle 16 times harder. In my testing, a difficulty of 6 requires a\nmaximumNonce well over 500,000,000.\n\nIf you adjust the difficulty above 4, blocks will show up as not mined because the demo data\nassumes 4 zeros for a signed block. For example, on the `http://localhost:3000/block` page\nwith a difficulty of 6, the first nonce that works is `8719932` yielding a hash of\n`000000669445c22167511857d8f3b822b331c3342f25dfdcb326e35c1a7aa267`. This gets out of hand fairly\nquickly though. Here's some time estimates at the various thresholds.\n\n|digits|nonce|time estimate|\n|------|-------|-------------|\n|4|500,000|15 minutes\n|5|8,000,000|4 hours\n|6|128,000,000|3 days\n|7|2,048,000,000|a month\n|8|32,768,000,000|2 years\n|9|524,288,000,000|30 years\n|10|8,388,608,000,000|481 years\n|11|134,217,728,000,000|7,690 years\n|12|2,147,483,648,000,000|123,036 years\n|13|34,359,738,368,000,000|1,968,581 years\n|14|549,755,813,888,000,000|31,497,291 years\n|15|8,796,093,022,208,000,000|503,956,662 years\n\nIn the production bitcoin blockchain, block `458,091` has the hash digest\n`00000000000000000000011246f099d94f91628d71c9d75ad2f9a06e2beb7e92`. That's 21 zeros in a row!\nThat one block would take this software approximately 8,454,989,768,407,765 years to mine.\n\n### Public Private Key Demo\n\nThe 2nd part of the 101 session:\n* https://github.com/anders94/public-private-key-demo\n\n## Send Thanks\n\n![](public/images/qr.png)\n\nBitcoin gratefully accepted: `1K3NvcuZzVTueHW1qhkG2Cm3viRkh2EXJp`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Fblockchain-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders94%2Fblockchain-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders94%2Fblockchain-demo/lists"}