-
Notifications
You must be signed in to change notification settings - Fork 7
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
Convert the inner PSBT v2 to a PSBT v0 (lossy) #31
Comments
I took 2 minutes looking and I cannot remember what hurdle I hit. I want to say that v0 doesn't map to v2, but that would be just from squinting my eyes hard and trying to remember. FTR I don't normally leave commented code lying around so my guess is I wrote that stuff then hit a problem trying to implement oooo, I just wrote that then looked at the issue title again, I bet it was because its lossy that I didn't do it. Again just guessing what Tobin six months ago did. |
It'd definitely be useful if we could use PSBTv2 internally in To be explicit for posterity: the conversion from PSBTv2 to PSBTv0 is lossy because PSBTv2 has new fields like the modification flags In order to support payjoin V2, we'd also to be able to take a PSBTv0 and serialize it into v2 for internal mutation after which it would be converted back into PSBTv0 |
If the conversion is lossy what do you propose we do about the lost information? |
I think dropping that info and documenting it is OK. That's what the PSBTv2 BIP 370 recommends. |
Ah nice, sounds reasonable then, thanks. |
It'd be nice to be able to convert between PSBTv2 and PSBTv0, but this code is commented out. @tcharding, what hurdles did you face when attempting to implement this function in the first place? Looks like it wasn't as straightforward as once imagined?
rust-psbt/src/v2/mod.rs
Line 407 in c32f754
The text was updated successfully, but these errors were encountered: