Skip to content

fix: fix pruning not using max sharing - #379

Open
stringhandler wants to merge 2 commits into
BlockstreamResearch:masterfrom
stringhandler:st-fix-pruning-twins
Open

fix: fix pruning not using max sharing#379
stringhandler wants to merge 2 commits into
BlockstreamResearch:masterfrom
stringhandler:st-fix-pruning-twins

Conversation

@stringhandler

Copy link
Copy Markdown
Contributor

Fix for BlockstreamResearch/SimplicityHL#391

As described in the issue, there are cases when a pruned program still contains some unpruned nodes.

The test included fails when the pruning uses Internal sharing rather than MaxSharing.

@apoelstra

Copy link
Copy Markdown
Collaborator

Can you run cargo fmt on this?

@stringhandler

Copy link
Copy Markdown
Contributor Author

done.

@apoelstra

apoelstra commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Can you also split the unit test into a separate commit (fix first, then test, so that all commits pass, but locally I'll delete the fix to see if the test fails)?

@stringhandler

Copy link
Copy Markdown
Contributor Author

done.

@apoelstra

Copy link
Copy Markdown
Collaborator

Nice, thanks! Okay, this is definitely a bug (I wasn't sure it was possible to construct an unshared RedeemNode from the public API, but clearly it is). Hopefully it fixes the downstream issue.

@apoelstra apoelstra 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 35a4913; successfully ran local tests

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.

2 participants