目录:https://blog.csdn.net/qq_40452317/article/details/89646633
工作量证明算法:https://blog.csdn.net/qq_40452317/article/details/90511706
我们在区块中看到难度目标,其被标为"难度位"或简称"bits"。在区块 277,316 中,它的值为0x1903a30c。 这个标记的值被存为系数/指数格式, 前两位十六进制数字为幂(exponent),接下来得六位为系数(coefficient)。在这个区块里,0x19 为幂,而 0x03a30c 为系数。
计算难度目标的公式为:
计算难度目标的公式为:
target = coefficient \* 2^\(8 \* \(exponent – 3\)\)
由此公式及难度位的值 0x1903a30c,可得:
target = 0x03a30c * 2^(0x08 * (0x19 - 0x03))^
=> target = 0x03a30c * 2^(0x08 * 0x16)^
=> target = 0x03a30c * 2^0xB0^
按十进制计算为:
=