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

Zero-Input transactions may fail to deserialize #197

Open
TheBlueMatt opened this issue Sep 4, 2021 · 0 comments
Open

Zero-Input transactions may fail to deserialize #197

TheBlueMatt opened this issue Sep 4, 2021 · 0 comments

Comments

@TheBlueMatt
Copy link
Member

I haven't tested this, just going off rust-bitcoin's deserialization code. rust-bitcoin seems to reject the segwit ambiguity cases around zero-input as otherwise you have to resort to some heuristic to determine how to de-serialize such transactions (and maybe Do The Wrong Thing). This is fine in most cases, and because rust-bitcoin does the sane thing of including the segwit magic byte for zero-input transactions this isn't an issue for other sane segwit-only implementations. Except that when Bitcoin Core is returning a 0-input transaction it doesn't do this for backwards compatibility reasons. I think rust-bitcoincore-rpc should work around this at a higher level, looking at calls like createrawtransaction and checking the input count to determine how the transaction should be deserialized.

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

No branches or pull requests

1 participant