mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 991 forks source link

Fix leading zeroes bugs #3763

Closed tromp closed 11 months ago

tromp commented 12 months ago

Fixes https://github.com/mimblewimble/grin/issues/3762 in suggested way.

No consensus change; makes PoW verification work correctly on select 32-bit platforms. No new functionality / unit tests. No impact beyond 32-bit platform bugfix. Tested with cargo test -all and mainnet sync catching up a few weeks. No change to documentation.

ardocrat commented 12 months ago

Thank you very much, now it's syncing without problems at arm-v7a arch.

yeastplume commented 11 months ago

I don't have a 32 bit install of anything to test against, but it looks straightforward and if @ardocrat has tested it looks good to me :+1:. It feels like trying to bit shift against a usize should trigger some kind of Rust warning, it's an easy thing to overlook.