{"id":22938905,"url":"https://github.com/hardworking-toptal-dev/pos-rust","last_synced_at":"2025-04-01T19:45:00.649Z","repository":{"id":233078501,"uuid":"785955153","full_name":"hardworking-toptal-dev/POS-rust","owner":"hardworking-toptal-dev","description":"Proof of stake in rust","archived":false,"fork":false,"pushed_at":"2024-04-13T02:20:06.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T15:50:03.576Z","etag":null,"topics":["proof-of-stake","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardworking-toptal-dev.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}},"created_at":"2024-04-13T02:11:37.000Z","updated_at":"2024-09-10T13:27:09.000Z","dependencies_parsed_at":"2024-04-19T05:00:23.533Z","dependency_job_id":null,"html_url":"https://github.com/hardworking-toptal-dev/POS-rust","commit_stats":null,"previous_names":["eric-potter/pos-rust","hardworking-toptal-dev/pos-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FPOS-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FPOS-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FPOS-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardworking-toptal-dev%2FPOS-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardworking-toptal-dev","download_url":"https://codeload.github.com/hardworking-toptal-dev/POS-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246704777,"owners_count":20820614,"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":["proof-of-stake","rust"],"created_at":"2024-12-14T12:28:56.895Z","updated_at":"2025-04-01T19:45:00.629Z","avatar_url":"https://github.com/hardworking-toptal-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building Proof of Stake in Rust\n\nA tutorial for building a Proof of Stake blockchain in Rust: https://medium.com/emcthye/e76c51f593e9\n\nStart using\n\n```bash\nRUST_LOG=info cargo run\n```\n\nThis starts the client locally. The blockchain is not persisted anywhere.\n\nYou can start it in multiple terminals to get multiple connected peer-to-peer clients.\n\nIn each client, you can enter the following commands:\n\n* `ls p` - list peers\n* `ls c` - print local chain\n* `create b $data` - `$data` is just a string here - this creates (mines) a new block with the data entry `$data` and broadcasts it\n\nOnce a block is created by a node, it's broadcasted and the blockchain in all other nodes is updated (if it's a valid block).\n\nOn startup, a node asks another node on the network for their blockchain and, if it's valid and longer than the current local blockchain, it updates it's own chain to the longest one it receives.\n\n\nThis is a VERY overly simplified, offline-running, highly inefficient and insecure blockchain implementation. If a node gets out of sync, it's broken. This is an example for showing some of the concepts behind building a blockchain system in Rust, so it shouldn't be used anywhere near a production scenario, but you can have fun with it and learn something. :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Fpos-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardworking-toptal-dev%2Fpos-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardworking-toptal-dev%2Fpos-rust/lists"}