ergoplatform / ergo

Ergo protocol description & reference client implementation
https://ergoplatform.org/
Creative Commons Zero v1.0 Universal
504 stars 170 forks source link

fix proofHash related sporadic concurrency bug #2109

Closed stenolog closed 9 months ago

stenolog commented 10 months ago

Testing

This needs a long-running stress-test outside of the CI.

See branch:

https://github.com/stenolog/ergo/tree/i1387-i1023-repro-and-fix

for the fix incl. the reproducer and documentation.

Quick Examples

# with fix
cd ~
mkdir proofhash
cd proofhash
git clone -b i1387-i1023-repro-and-fix https://github.com/stenolog/ergo.git
cd ergo
sbt compile && time while [ $? -eq 0 ]; do sbt "testOnly *UtxoStateSpecification -- -z looper"; done

in another window

# without fix, should fail in around 10 min.
cd ~/proofhash
git clone -b i1387-i1023-repro-and-fix https://github.com/stenolog/ergo.git ergofail
cd ergofail
git checkout HEAD~1 # disable fix (last commit)
sbt compile && time while [ $? -eq 0 ]; do sbt "testOnly *UtxoStateSpecification -- -z looper"; done
kushti commented 9 months ago

awesome work!

Please send me your reward address to kushti@protonmail.ch or PM over Discord to get attached bounty paid!

stenolog commented 9 months ago

awesome work!

Thank you. Email send!