Skip to content

pragdave/pow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pow

Implement a really simple proof-of-work algorithm.

iterations_needed = Pow.count(value, difficulty)

The implementation is similar to HashCash and BitCoin.

  1. Set a counter to 1.

  2. Do value = SHA256(value). If the first difficulty bits of the result are zero, return the counter.

  3. Otherwise increment the counter and go back to 2.

This is simply to provide a slightly real world synthetic CPU load.

About

Trivial proof-of-work implementation for benchmarking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages