Skip to content
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

feat: optimize pushbytes by removing unreachable minimal check #781

Merged

Conversation

ChrisCho-H
Copy link
Contributor

In rust-bitcoin, read_scriptint checks NonMinimalPush, which makes an additional minimal check needless and PushBytes inefficient.

@apoelstra
Copy link
Member

We should add a fuzztest which tries to decode scripts both with master and 0.12.

Can wait til after #780 gets in, since that already includes a similar fuzztest for parsing expression strings.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 84d1ad5; successfully ran local tests; yep, I think you are right

@sanket1729
Copy link
Member

Can wait til after #780 gets in, since that already includes a similar fuzztest for parsing expression strings.

Working on it this week

@apoelstra
Copy link
Member

I'm gonna go ahead and merge this. Will add the fuzztest in a later PR.

@apoelstra apoelstra merged commit ce42c66 into rust-bitcoin:master Dec 3, 2024
30 checks passed
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.

3 participants