Closed chfast closed 6 years ago
The difficulty was changed to boundary hash, right?
Yes ! This approach is more efficient than the one implemented in 1.0.0 where the difficulty is passed as index-of-difficulty or, in absence, the miner must assume a boundary of "0x00000000ffff0000000000000000000000000000000000000000000000000000"
I too agree we should not pass the seed hash rather the epoch number. I will amend.
I also believe all hex - when related to numeric values (eg. the hash rate) - should be reduced to the lowest possible number of meaningful bytes instead of being fixed to 32 bytes.
Well, the hex encoding and 0x prefix is never ending story. The 0x is overused for indicating hex encoding of bytes. I would be ok with specifying the 0x values as integers then removing the leading zeros is ok by definition.
Currently the block number is only included in getWork packages produced by parity. Geth just sends the pow hash, seed hash & difficulty. If it is required to submit the block number with each mining.notify package it would make sense to create a PR for Geth to include the block number in the response (should be a trivial change) as well.
@chfast
Well, the hex encoding and 0x prefix is never ending story. The 0x is overused for indicating hex encoding of bytes. I would be ok with specifying the 0x values as integers then removing the leading zeros is ok by definition.
Totally agree. Please review last commit.
Closing. Please open issues on specific topics.
I like the
mining.set
approach. The difficulty was changed to boundary hash, right?However I think the epoch seed is useless there. We don't want to perform the epoch seed to epoch number search.
Instead the block number should be included in the
mining.notify
package.