What is Nostr?
aviv.b / Aviv B
npub1mk6…pf5q
2024-08-24 07:02:55

aviv.b on Nostr: TL;DR I've built a demo website to demonstrate mining and proof of work, and I would ...

TL;DR I've built a demo website to demonstrate mining and proof of work, and I would love to get your feedback, link below.

I'm creating a talk about proof of work for non technical audience.

I want to explain to people how it work without the prior knowledge about SHA256.

So during the talk I will build a hash function from scratch with the audience.

The hash function we will build is
f(x) = 500*sin(500x) +500

It looks like it generates random numbers between 0 and 1000, although not evenly distributed, there are more inputs that generate low / high outputs than inputs that generate values near 500, so for the talk we will be defining the proof of work slightly differently, instead of numbers that are smaller than the target. We will look for hashes between 500 and the target.

I have built an online "Miner" and calculator so people can feel what mining means.
They'll see that their phone can find nonces quickly but to get a nonce that generate outputs below 500.1 they'll need to wait much longer.

That's the link for the demo website
https://imaginative-biscochitos-a319df.netlify.app/

Please help me thinks of ways to improve it,
Will it be interesting to create similar site with sha256 or other hash functions?

Author Public Key
npub1mk6ht4a96tda4mzdkanjnzcznew3znv6tmmapwj3q0ne2ek8rj5q8vpf5q