-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Proof-of-Work (PoW) algorithm #1
Copy link
Copy link
Open
Description
Implement a basic Proof-of-Work mechanism to simulate mining. Each block must compute a valid hash with a certain number of leading zeros.
Tasks
- Add a
Noncefield to theBlockstruct. - Implement a
MineBlock(difficulty int)function that updates the hash until the difficulty is satisfied. - Integrate mining into the
NewBlockfunction. - Make difficulty configurable via a global constant or config.
- Write unit tests to validate mining output.
Reference
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels