Skip to content

Fix the length of the taproot output to 34 bytes in script_is_v1_tr #304

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

Closed

Conversation

JeremyRubin
Copy link
Contributor

@JeremyRubin JeremyRubin commented Mar 7, 2022

It's impossible to finalize a taproot PSBT with this line not fixed because the finalizer thinks the output is not TR and then tries to parse it as a legacy script.

@sanket1729
Copy link
Member

This is fixed in a cleaner way by using rust-bitcoin script.is_v1_p2tr()? I will keep this open as an issue while it is implemented in another PR.

@JeremyRubin
Copy link
Contributor Author

The PR is actually still wrong, updated...

@JeremyRubin
Copy link
Contributor Author

yes I agree the new API makes sense once 0.28 can be used, but I think this makes sense to merge as a hotfix so that at least people can work on PSBT stuff based on 0.27 still (hopefully, e.g., tests)

@apoelstra
Copy link
Member

The current state of the library already isn't usable with 0.27 because we depend on rust-bitcoin types from specific git commits. We're in no-mans-land until 0.28 is published.

@JeremyRubin
Copy link
Contributor Author

that's fair, i just mean to say that this is an obvious fix to accept so that at least more of the code is not buggy, and we have an explicit commit where we've labelled what the bug was.

it's OK if it is overwritten later.

@sanket1729
Copy link
Member

@JeremyRubin , this is now cleanly addressed in the first commit of #305. That also adds psbts APIs which would be of interest to you.

@JeremyRubin JeremyRubin closed this Mar 9, 2022
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