8

What is the reason why OP_MUL and OP_DIV operators were removed from Bitcoin? Is this because someone could maliciously create a script that multiplies large numbers and thus blows the stack, or is there another reason (some network attack has already happened using these operators so they were thrown out)?

1 Answer 1

8

OP_MUL and OP_DIV were removed by Satoshi Nakamoto in commit 4bd188c4383d6e614e18f79dc337fbabe8464c82. As with most changes in early days of the development, little rationale was explicitly given by Satoshi Nakamoto for this change.

In light of the recent shortcomings with the Script interpreter (the 1 RETURN bug was fixed only 10 commits (and 15 days) before this change for instance and there is more), it is often assumed Satoshi Nakamoto disabled some of the opcodes out of precaution. OP_MUL and OP_DIV were some of them.

I'm not aware of any exploitable bugs using OP_MUL and OP_DIV at the time, but the implementation of OP_LSHIFT (disabled in the same batch) for instance could be remotely exploited to crash a node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.