In 2010, there was an incident of worth overflow on Bitcoin.
I’m not a developer, however I need to know what the bug was in additional element. #1 is the one reply I discovered on-line, and #2-3 are my makes an attempt to various solutions.
Whole outputs had been better than 184,467,440,737.09551615, the utmost quantity that might be saved, by 50.51. And 50.51 was equal to the enter worth, so the tx was processed.
This was the tx, in response to the supply.
- from my handle which has 50.51 BTC
- ship 92233720368.54277039 to deal with A
- ship 92233720368.54277039 to deal with B
- ship 50.51 BTC to deal with C
However I’m not certain. Trying on the block on jgarzik’s unique put up, it appears to be like like 50.51 was a separate tx from the 2 92233720368.54277039 txs. And the enter worth for these 2 massive txs appears to be 0.5. It would not actually make sense. So, listed below are my various potential solutions.
The mixed outputs of two massive txs, 184,467,440,737(decimals minimize off for simplicity), is subtracted from the enter of 0.5, which leads to -184,467,440,736.5. However as a result of the variable was an unsigned quantity, it was wrapped (across the max variety of 184,467,440,737.09551615) to finish up as 0.5 (or smaller). This is the same as the enter worth, so the tx is included.
Just like #1, however I noticed someplace that adverse signal may erroneously be interpreted as one other quantity digit. So (quite than wrapped across the max quantity) -184,467,440,736.5 is seen as a bigger constructive quantity. I do not know what quantity it would develop into. 1,000,000,000,000 + 184,467,440,736.5? Or 2 x 184,467,440,736.5?
Perhaps one thing else? Please let me know what you suppose actually occurred. Thanks prematurely.