mimblewimble / grin

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

Add test for duplicate rangeproof inflation bug #3630

Closed trevyn closed 3 years ago

trevyn commented 3 years ago

All credit to @snape479's work in https://github.com/mimblewimble/grin/pull/3621, cherry-picked on top of #3628.

First two commits are just cherry-picks of c4ab693 & 0354ed3:

git remote add snape479 https://github.com/snape479/grin.git
git fetch snape479
git cherry-pick c4ab693 0354ed3

Verify as failing on v5.0.1:

git remote add snape479 https://github.com/snape479/grin.git
git fetch snape479
git checkout v5.0.1
git cherry-pick c4ab693 0354ed3
cargo test --all -- test_overflow_cached_rangeproof

Completed:

phyro commented 3 years ago

can confirm the two cherry-picked commits fail on v5.0.1 with

test test_overflow_cached_rangeproof ... FAILED

failures:

---- test_overflow_cached_rangeproof stdout ----
thread 'test_overflow_cached_rangeproof' panicked at 'Negative output accepted into block!', chain/tests/mine_simple_chain.rs:918:17
antiochp commented 3 years ago

Just taking a look locally and will merge shortly. :+1: