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

Poor handling of non-bech32 P2WSH and P2WPKH #19

Open
prestwich opened this issue May 6, 2018 · 1 comment
Open

Poor handling of non-bech32 P2WSH and P2WPKH #19

prestwich opened this issue May 6, 2018 · 1 comment
Labels
bitcoin knowledge required Needs knowledge of tx serialization of validation enhancement New feature or request

Comments

@prestwich
Copy link
Member

prestwich commented May 6, 2018

Affects chains which support SegWit, but not bech32 address encoding. Right now the default behavior is b58 encoding the Segwit pk_script. This is just wrong. Instead, we should have it make nested P2W-via-P2SH.

@prestwich prestwich added bug Something isn't working good first issue Good for newcomers bitcoin knowledge required Needs knowledge of tx serialization of validation labels May 6, 2018
@prestwich prestwich changed the title Poor handling of non-bech32 P2WSH and P2PKH Poor handling of non-bech32 P2WSH and P2WPKH May 10, 2018
@prestwich prestwich added enhancement New feature or request and removed bug Something isn't working labels May 16, 2018
@prestwich prestwich removed the good first issue Good for newcomers label May 24, 2018
@prestwich
Copy link
Member Author

This is a bit more in-depth than I had previously considered.

  • Convenience function to create nested witness addresses and output scripts (this can be done with normal p2sh functions right now)
  • Convenience functions for spending from these (create nested input and witness?)
  • Detect whether a given network supports witness and not bech32. Enforce nesting if so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitcoin knowledge required Needs knowledge of tx serialization of validation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant