{"id":16853152,"url":"https://github.com/devxoul/blockchain","last_synced_at":"2025-03-22T06:30:54.575Z","repository":{"id":141534303,"uuid":"117457880","full_name":"devxoul/Blockchain","owner":"devxoul","description":"A blockchain simulator written in Swift","archived":false,"fork":false,"pushed_at":"2018-01-14T19:19:33.000Z","size":20,"stargazers_count":67,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-18T08:53:34.004Z","etag":null,"topics":["blockchain","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/devxoul.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":"2018-01-14T18:59:28.000Z","updated_at":"2025-01-12T11:04:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"e51c8108-9177-4bac-b7da-47c0d033905e","html_url":"https://github.com/devxoul/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/devxoul%2FBlockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FBlockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FBlockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FBlockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devxoul","download_url":"https://codeload.github.com/devxoul/Blockchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918500,"owners_count":20531682,"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","swift"],"created_at":"2024-10-13T13:49:58.519Z","updated_at":"2025-03-22T06:30:54.570Z","avatar_url":"https://github.com/devxoul.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blockchain\n\nA blockchain simulator written in Swift. It simulates full nodes in a virtual network. The nodes mine blocks for about every 10 seconds and verify randomly created transactions.\n\n⚠️ This project is not an actual blockchain implementation. I am very new to the blockchain and the purpose of this repository is to share what I've learned. Note that there might be a lot of wrong implementations.\n\n## Getting Started\n\n```console\n$ git clone https://github.com/devxoul/Blockchain.git\n$ cd Blockchain\n$ swift run\n```\n\nThen you'll see:\n\n```\nRun server: Blockchain.Node on address 1.1.1.1\nRun server: Blockchain.Node on address 2.2.2.2\nRun server: Blockchain.Node on address 3.3.3.3\n[Node@2.2.2.2] Connect node 1.1.1.1\n[Node@3.3.3.3] Connect node 1.1.1.1\n[Node@1.1.1.1] Connect node 2.2.2.2\n[Node@3.3.3.3] Connect node 2.2.2.2\n[Node@2.2.2.2] Connect node 3.3.3.3\n[Node@1.1.1.1] Connect node 3.3.3.3\n[Node@2.2.2.2] Create transaction: \u003cTransaction (89.0) 7695f853dccd7c29 -\u003e ed99e0099751256d\u003e\n[Node@1.1.1.1] Create transaction: \u003cTransaction (89.0) 7695f853dccd7c29 -\u003e ed99e0099751256d\u003e\n[Node@3.3.3.3] Create transaction: \u003cTransaction (89.0) 7695f853dccd7c29 -\u003e ed99e0099751256d\u003e\n[Node@3.3.3.3] Create transaction: \u003cTransaction (5.0) 7695f853dccd7c29 -\u003e 715e3b2f5d0dea50\u003e\n[Node@1.1.1.1] Create transaction: \u003cTransaction (5.0) 7695f853dccd7c29 -\u003e 715e3b2f5d0dea50\u003e\n[Node@2.2.2.2] Create transaction: \u003cTransaction (5.0) 7695f853dccd7c29 -\u003e 715e3b2f5d0dea50\u003e\n[Node@3.3.3.3] Submit block: \u003cBlock height=1 bits=E600FFFF nonce=1159 transactions=2\u003e\n[Node@2.2.2.2] Submit block: \u003cBlock height=1 bits=E600FFFF nonce=1159 transactions=2\u003e\n[Node@1.1.1.1] Submit block: \u003cBlock height=1 bits=E600FFFF nonce=1159 transactions=2\u003e\n[Node@1.1.1.1] Submit block: \u003cBlock height=1 bits=E600FFFF nonce=1159 transactions=2\u003e\n[Node@1.1.1.1] Create transaction: \u003cTransaction (2.0) 8a7b4aa02b4169d3 -\u003e e341e6db66aff49d\u003e\n[Node@2.2.2.2] Create transaction: \u003cTransaction (2.0) 8a7b4aa02b4169d3 -\u003e e341e6db66aff49d\u003e\n[Node@3.3.3.3] Create transaction: \u003cTransaction (2.0) 8a7b4aa02b4169d3 -\u003e e341e6db66aff49d\u003e\n[Node@3.3.3.3] Submit block: \u003cBlock height=2 bits=E600FFFF nonce=162 transactions=1\u003e\n[Node@2.2.2.2] Submit block: \u003cBlock height=2 bits=E600FFFF nonce=162 transactions=1\u003e\n[Node@1.1.1.1] Submit block: \u003cBlock height=2 bits=E600FFFF nonce=162 transactions=1\u003e\n[Node@1.1.1.1] Submit block: \u003cBlock height=2 bits=E600FFFF nonce=162 transactions=1\u003e\n```\n\n## Development\n\n```console\n$ swift package generate-xcodeproj\n```\n\n## License\n\nBlockchain is under MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Fblockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevxoul%2Fblockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Fblockchain/lists"}