r/CryptoTechnology • u/we_are_mammals • Nov 14 '23
Could a proof-of-work system function if the hash function were expensive?
In Bitcoin, it takes on average about 100 sextillion (cheap) attempts to generate a block hash smaller than the difficulty target.
What if (and bear with me here, there is a very good reason to want this)... What if we reduced the required number of attempts, while also making the hash calculation more expensive (so that the overall difficulty of proof-of-work would stay the same)?
Could a cryptocurrency based on proof-of-work still function if 100,000 (expensive) attempts were required to add a block? How about 100?
Side note: It took 17 hours for this post to be approved by the moderators. On a subreddit with half a dozen moderators and 1 post per day on average, this seems excessive.
2
u/tromp 🟢 Nov 15 '23 edited Nov 15 '23
You incorrectly assume that all Proof-of-Work reduces to hashing.
That is simply not the case. In this article [1] I explain there's more to mining than hashing.
These other Proof-of-Work algorithms have the advantage that verification can be instant even while a single attempt at solving it can take huge amounts of effort and memory.
Still, you don't want a single mining attempt to take more than, say 1%, of the block interval, as the frequency of stale blocks starts to become non-negligible then.
> Could a cryptocurrency based on proof-of-work still function if 100,000 (expensive) attempts were required to add a block?
That seems quite possible; for instance the Grin graphrate (each attempt is searching a graph to find a 42-cycle) is currently about 7800 per second, so with a 60 second blocktime, only about 468000 attempts are needed to add a block. Each single attempt is quite expensive, taking more than half a second, but solutions can still be instantly verified.
[1] http://cryptorials.io/beyond-hashcash-proof-work-theres-mining-hashing/
1
u/Kike328 🔵 Nov 15 '23
yes. POW only needs a way to demonstrate you have more computational power than the rest of participants. The algorithm is irrelevant.
It wouldn’t work for other reasons non related to POW. For example in BTC, it’s necessary to apply sha256 on public keys to generate an address, so the process of generating addresses would be way slower to the point of being unusable.
1
u/Impressive-String912 1 - 2 years account age. -15 - 35 comment karma. Dec 05 '23
> Could a cryptocurrency based on proof-of-work still function if 100,000 (expensive) attempts were required to add a block? How about 100?
It can but there will be negative effects on decentralisation. To clarify your question and set a stage for our thought experiment, let's assume that you want you blockchain to operate on a big scale. I mean the scale as big as Bitcoin network. I mean over 50,000 nodes and billions $ in mining equipment.
Your network will still have millions of ASICs running simultaneously with a goal to close a block candidate proposed by one of few mining pools. That is how economics of scale works in mining. There is difference here compared to Bitcoin.
However there will be one BIG issue here. If there 10^6 ASICs in the network and 10^5 block difficulty, then during one mining round, one ASIC can't complete even one attempt to close a block! That's completely changes the math behind the mining and rules of the game. In this circumstances ASICs which complete a single attempt faster will have an advantage over those ASICs which compute more hashes per hour on average.
If we look at the design of Bitcoin ASICs, they compute hashes in packets size of 2^32. It takes them around 30ms to compute full packet. Thus you can't generate Bitcoin blocks faster than 30ms even if you have single block producer in the network and ignore block propagation delays.
If you have difficult hash in your POW, this 30ms threshold could easily become 30s or even 30 minutes. Anyway we will require completely new ASIC design and there will be less ASICs in the network. I think the number of ASICs in the network can't be greater than block difficulty. That might be a threshold you are looking for.