Skip to content

fuzz: add regression test for value encoding - #280

Merged
uncomputable merged 5 commits into
masterfrom
2025-03--fix-windows
Mar 27, 2025
Merged

uncomputable merged 5 commits into
masterfrom
2025-03--fix-windows

Conversation

@apoelstra

Copy link
Copy Markdown
Collaborator

Despite the branch name this does not fix the Windows build. It adds a regression test for value encoding, which after running 250 CPU-hours locally has failed to find any regressions. But I did find some unrelated issues, mainly around memory allocations.

Fixes #279

Fixes #278

@apoelstra
apoelstra force-pushed the 2025-03--fix-windows branch from 19661c5 to 10fc3c6 Compare March 21, 2025 20:39
@apoelstra

Copy link
Copy Markdown
Collaborator Author

Ok, I tweaked the fuzz test and now I think I have found a regression. Value::left(1, (1 + 1) + (1 + 1)) seems to have different behavior in 0.3.0 vs master.

Comment thread src/value.rs
Comment thread src/value.rs
uncomputable
uncomputable previously approved these changes Mar 22, 2025

@uncomputable uncomputable left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 10fc3c6

@apoelstra

Copy link
Copy Markdown
Collaborator Author

I broke my local CI with this -- I think because 0.3.0 is the same version in the git repo and on crates.io, so it struggles to include both of them.

Let's do #270 first, which includes a version bump to avoid this issue.

@uncomputable

Copy link
Copy Markdown
Collaborator

This PR can be rebased now

@apoelstra

Copy link
Copy Markdown
Collaborator Author

Rebased. Also rewrote the fuzz test -- the one I had PR'd before didn't find anything but this one found the issue you fixed in #281.

@apoelstra

Copy link
Copy Markdown
Collaborator Author

Lol. Ok lemme investigate the fuzz failure..

@apoelstra

Copy link
Copy Markdown
Collaborator Author

Oh, lol, it's crashing the released version of rust-simplictiy. Let me PR to backport the addition fixes.

@apoelstra

Copy link
Copy Markdown
Collaborator Author

Should be good to go now. Ran 50MM fuzz iterations on it without trouble.

@apoelstra
apoelstra force-pushed the 2025-03--fix-windows branch from 6ea5cfc to d3b240d Compare March 26, 2025 23:02

@apoelstra apoelstra left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On d3b240d successfully ran local tests

@uncomputable uncomputable left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d3b240d

@uncomputable
uncomputable merged commit 4c6a841 into master Mar 27, 2025
@uncomputable
uncomputable deleted the 2025-03--fix-windows branch March 27, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Value::from_padded_bits etc should have some sort of sanity check on the size of the type Cannot compile multiple versions of simplicity-sys at once

2 participants