-
Notifications
You must be signed in to change notification settings - Fork 23
Fix Value::prune corrupts sum tag bits when prepending Left (0) tag
#338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix Value::prune corrupts sum tag bits when prepending Left (0) tag
#338
Conversation
I’m currently unable to reproduce bug #333 except by using the full flow described in the issue above. Adding that script to a unit test is difficult, as it requires specific functionality from SimplicityHL |
|
Can you take the reproduction in #337, patch rust-simplicity to add some There's likely also some room to manually reduce the size of the test value. Alternately let me attempt to write a fuzz test about this.. |
a79edca to
cbd8cfb
Compare
Yes, I will reply here once I have obtained that info |
Here are the logs taken right before pruning in the https://gist.github.com/topologoanatom/c4288260d7406b69ecfe658c3a11ff62 The first is from before the final conversion (line 443), and the second is from just before the return (line 455). |
|
I would dump the padded bit-encoding of both values (using |
|
FYI I wrote a fuzz test that just tries pruning various values and then seeing if the pruned compact bit encodings were the same as the original bit-encodings except with bits deleted. I ran this for 1200 CPU hours and did not see any crashes. I will try to PR my fuzztest over the weekend. But I'm unconvinced there is a bug here. |
Related to #337. These changes fix behaviour described in #333.