10
1
Bitcoin's static proof-of-work function SHA256(SHA256(data)) was apparently easy enough to be implement as ASIC which lead to the re-centralization we see today.
But what if the PoW function changes for every new block based on the hash of the last block mined? One could generate a new hash chain by seeding a commonly known PRNG with the hash of the last block and use it to generate a chain of hash functions from a (large) pool of commonly known hash functions.
Steps:
- RIPEMD(SHA2(SHA3(MD5(RIPEMD(SHA2(data)))))) => digest (i.e. old block header hash)
- PRNG(digest) => SHA2(MD5(SHA3(SHA3(RIPEMD(RIPEMD(data))))))
- digest (i.e. new block header hash)
This way every miner would know how to generate the new chain of hash functions which has to be used to generate a digest with certain criteria (leading zeros) for the next block but nobody could calculate the subsequently hash chains and nobody could implement static hash chain circuits but has to use FPGAs which have to be reprogrammed every block and have to be able to host every possible hash chain constellation. If the hash chains are complex enough it might even lead to a decrease in FPGA efficiency which would favour general computing hardware and reinstate the "one-CPU-one-vote" principle.
What do you think of this approach? Why might it be flawed?
1Isn't this essentially the premise of X11? – Nick ODell – 2015-01-22T15:44:02.017
1I believe X11 is just a chain of hashes. I think flyMaster is proposing having a battery of hash functions and using a different one depending on some characteristic of the previous block solved. – morsecoder – 2015-01-22T20:12:58.947
I have looked up the DarkCoin PDF and as far as I read they just use a static chain of 11 different algorithms. Do you have a link to an more in depth X11 description or a good readable implementation?
My approach is to generate a new hash chain for each block based on the prev block.
4How would you handle difficulty readjusting when the algorithm changes? – morsecoder – 2015-01-26T18:54:30.567
The hash chain needs a predefined runtime which we call then 1 round. The chain generation algorithm has to stop adding new rounds of hash functions after the limit is reached. For this to work we have to measure the mean runtime of every algorithm used and assign runtime factors to them.
Assumed SHA3 is two times slower than SHA2 on an average general computing device in store today the chain SHA2(SHA2(SHA2(SHA2(data)))) and SHA3(SHA3(data)) and SHA3(SHA2(SHA2(data))) are equal in terms of runtime.
Based on this measure we can speak about difficulty adjustments of multiples of that. – ToBe – 2015-01-28T12:36:10.300