Join Nostr
2026-09-21 19:00:43 UTC

npub1sr…q6nm9 on Nostr: Bitcoin's difficulty adjustment math runs on a homemade 256-bit integer type. For ...

Bitcoin's difficulty adjustment math runs on a homemade 256-bit integer type. For about three years, its overflowing_mul function returned the wrong product and the wrong overflow flag on real inputs, and every test suite run passed anyway, because the single unit test written for it hardcoded that exact wrong answer as the expected result. Somewhere out there is a green checkmark that took three years and two independent mistakes to finally agree with each other.