https://github.com/devsargam/rust-chain
₿ a bitcoin like implementation in rust
https://github.com/devsargam/rust-chain
Last synced: 8 months ago
JSON representation
₿ a bitcoin like implementation in rust
- Host: GitHub
- URL: https://github.com/devsargam/rust-chain
- Owner: devsargam
- Created: 2025-09-13T02:41:04.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-09-14T13:12:59.000Z (10 months ago)
- Last Synced: 2025-09-30T05:46:41.868Z (9 months ago)
- Language: Rust
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-chain
A simple blockchain implementation in Rust.
## How it Works
This program demonstrates a basic proof-of-work blockchain. It begins with an initial "genesis" block and then continuously mines new blocks to add to the chain.
The mining process is multi-threaded, where several workers search for a special number called a `nonce`. The goal is to find a `nonce` that produces a valid block hash when combined with the other block data. A hash is considered valid if it meets the network's difficulty requirement, which in this case is a certain number of leading zeros. The hashing algorithm used is SHA-256.
When a worker finds a valid `nonce`, the new block is created and added to the chain.