{"id":16724517,"url":"https://github.com/yunwei37/blockchain-rust","last_synced_at":"2025-04-07T08:17:34.928Z","repository":{"id":37179241,"uuid":"291728163","full_name":"yunwei37/blockchain-rust","owner":"yunwei37","description":"blockchain_go in rust: A simplified blockchain implementation in rust for leaning / 用 rust 从零开始构建区块链(Bitcoin)","archived":false,"fork":false,"pushed_at":"2022-06-20T12:48:59.000Z","size":160,"stargazers_count":152,"open_issues_count":0,"forks_count":33,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T07:04:55.504Z","etag":null,"topics":["blockchain","blockchain-demo","blockchain-network","blockchain-wallet","reimplement-blockchain","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/yunwei37.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}},"created_at":"2020-08-31T13:50:15.000Z","updated_at":"2025-03-19T02:47:46.000Z","dependencies_parsed_at":"2022-08-02T13:01:50.678Z","dependency_job_id":null,"html_url":"https://github.com/yunwei37/blockchain-rust","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/yunwei37%2Fblockchain-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fblockchain-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fblockchain-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fblockchain-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunwei37","download_url":"https://codeload.github.com/yunwei37/blockchain-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615383,"owners_count":20967184,"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-demo","blockchain-network","blockchain-wallet","reimplement-blockchain","rust"],"created_at":"2024-10-12T22:45:35.130Z","updated_at":"2025-04-07T08:17:34.909Z","avatar_url":"https://github.com/yunwei37.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blockchain-rust - 用 rust 从零开始构建区块链(Bitcoin)系列\n\n[![Actions Status](https://github.com/yunwei37/blockchain-demo/workflows/CI/badge.svg)](https://github.com/yunwei37/blockchain-demo/actions)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nreimplement `blockchain_go` in rust, and not only blockchain_go;\n\na simple blockchain demo for learning\n\n## the code for each article\n\n1. part1: Basic Prototype     `基本原型`              [commit bd0efe7](https://github.com/yunwei37/blockchain-rust/tree/bd0efe7f4105a3daafd9311d3dd643482b63cb84)\n2. part2: Proof-of-Work       `工作量证明`            [commit 9d9370a](https://github.com/yunwei37/blockchain-rust/tree/9d9370aa22af34244659034918f2aad4a2cb96d2)\n3. part3: Persistence and CLI` 持久化、命令行、日志`  [commit e2094c0](https://github.com/yunwei37/blockchain-rust/tree/e2094c0ef94fadc4e01030312a1ad890ec633d6f)\n4. part4: Transactions 1      `交易（1）`  [commit bdbdcec](https://github.com/yunwei37/blockchain-rust/tree/bdbdcec8b79d5ff701d207f67a1b68849a35d865)\n5. part5: Addresses           `地址和签名`  [commit 440cba2](https://github.com/yunwei37/blockchain-rust/tree/440cba230cbd81957c3285b21c705a5708ed2b5b)\n6. part6: Transactions 2      `交易（2）`  [commit 4912743](https://github.com/yunwei37/blockchain-rust/tree/4912743daa2699cb8c0c4ba5bf136534b272cecd)\n7. part7: Network      `网络和分布式一致性算法` master\n\n## Chinese Documents\n\n- 基本原型和工作量证明算法: [part1.md](document/part1.md)\n\n## usage\n\n- Create wallet: \n  ```sh\n  cargo run createwallet\n  ```\n- Create blockchain:\n  ```\n  cargo run createblockchain \u003caddress\u003e\n  ```\n- send coins (if `-m` is specified, the block will be mined immediately in the same node):\n  ```\n  cargo run send \u003cfrom\u003e \u003cto\u003e \u003camount\u003e -m \n  ```\n- start server:\n  ```\n  cargo run startnode \u003cport\u003e\n  ```\n  or start miner node:\n  ```\n  cargo run startminer \u003cport\u003e \u003caddress\u003e\n  ```\n- get balance:\n  ```\n  cargo run getbalance \u003caddress\u003e\n  ```\n\nYou can use the `RUST_LOG=info` to print the log.\n\n## reference\n\n- `blockchain_go` code: [https://github.com/Jeiwan/blockchain_go](https://github.com/Jeiwan/blockchain_go)\n- Build a cryptocurrency! - Blockchain in Rust: [https://github.com/GeekLaunch/blockchain-rust](https://github.com/GeekLaunch/blockchain-rust)\n- 中文版文档：[https://liuchengxu.gitbook.io/blockchain/](https://liuchengxu.gitbook.io/blockchain/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunwei37%2Fblockchain-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunwei37%2Fblockchain-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunwei37%2Fblockchain-rust/lists"}