Author: Thomas Hartman 2020-08-19 23:32:25
Published on: 2020-08-19T23:32:25+00:00
The author initially proposed using op_diff to take 2 packed targets, 1 known and 1 unknown at the time of contract, and return the ratio. However, upon further consideration, they decided against this idea. Instead, the 32-bit packed difficulty target should be pushed onto the stack with no need for division. This can be done using the arithmetic less than operator, which is already live in script. The author suggests that these contracts could be completed with the addition of a single op_diff opcode. Although it may be less human readable to use difficulty target instead of difficulty, as no one reads script, this is acceptable.Additionally, the author was concerned about difficulty being a floating point number and expressed their dislike for floats. They are pleased that they no longer have to think about them.
Updated on: 2023-06-14T15:10:12.979294+00:00