Author

Topic: Hash tree and hash algorithms: can a hash tree use multiple hash algorithms? (Read 3504 times)

legendary
Activity: 1484
Merit: 1005
Right, I guess I can just use the block hashes themselves then.  Reading up on it, it doesn't seem like multiple hash algorithms should be a problem, although I don't think it's been implemented before (PPC uses only SHA256 as a hash function; the proof of stake blocks are just very low difficulty apparently).
donator
Activity: 1218
Merit: 1079
Gerald Davis
As dree12 pointed out you don't want to use nonces.  Super easy to game.  Would just require a miner program which skips certain undesirable nonces.

You could simply use the block hashes which if blocks are "difficult" to construct should be relatively psuedo-random.  It would be possible to game the output but that would require throwing away undesirable blocks.  Unlike nonces they have real value.

So you have a couple options.  The simplest would be to just use the x least significant digits of the various block hashes in the algorithm which determines the algorithm for the next block.
legendary
Activity: 1246
Merit: 1077
Hi,

I'm working on a bitcoin fork right now and I'm trying to figure out something related to data structures.

I want to develop a blockchain (hash tree) whose algorithm for hashing subsequent blocks is determined as a function of the nonce of the 0th, 0th + c, 0th + 2c, ... , etc block (leaf) where c is a constant.  I assume that the nonce values are pseudorandom and non-predictable, but I don't know if that's actually true.

Which leads to the question: Can I compose a hash tree like this?  What kind of problems do you think I'll run into, and are they impossible to overcome?  I want to see if anyone knows the answer to this before I begin trying.

I don't know if this kind of hash tree has a name or not either, or if it's been implemented before.  I guess it might be called a polymorphic hash tree.
Nonce values may not necessarily be secure. Because the miner can selectively choose nonces without a significant impact on hash rate, intelligent miners will choose the most self-beneficial nonce values.

For example, I can write code to increase the nonce by 5 rather than simply incrementing it, to ensure that the nonce is divisible by 5. Nonce values are only non-predictable if there is no financial incentive to make them predictable.
legendary
Activity: 1792
Merit: 1111
I think PPC has multiple algorithms: PoW and PoS
legendary
Activity: 1484
Merit: 1005
Hi,

I'm working on a bitcoin fork right now and I'm trying to figure out something related to data structures.

I want to develop a blockchain (hash tree) whose algorithm for hashing subsequent blocks is determined as a function of the nonce of the 0th, 0th + c, 0th + 2c, ... , etc block (leaf) where c is a constant.  I assume that the nonce values are pseudorandom and non-predictable, but I don't know if that's actually true.

Which leads to the question: Can I compose a hash tree like this?  What kind of problems do you think I'll run into, and are they impossible to overcome?  I want to see if anyone knows the answer to this before I begin trying.

I don't know if this kind of hash tree has a name or not either, or if it's been implemented before.  I guess it might be called a polymorphic hash tree.
Jump to: