BIP143 rejects uncompressed public keys in P2WPKH or P2WSH
See original GitHub issueNot sure if I am misunderstanding something here but does this not only check if the output is p2wpkh and not p2wsh as well?
i.e. is correct?
if (kpPubKey.length !== 33 &&
(input.signType === scriptTypes.P2WPKH || input.signType === scriptTypes.P2WSH)) throw new Error('BIP143 rejects uncompressed public keys in P2WPKH or P2WSH')
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Is there a way to recover those funds? Error is BIP143 rejects ...
I happened to have old WIF for the uncompressed public key. ... Im getting is BIP143 rejects uncompressed public keys in P2WPKH or...
Read more >bitcoinbook/ch07.asciidoc at develop
Multisignature scripts set a condition where N public keys are recorded in the ... uncompressed public key to a P2WPKH witness script.
Read more >Segregated Witness Wallet Development Guide - Bitcoin Core
P2SH-P2WPKH uses the same public key format as P2PKH, with a very important exception: the public key used in P2SH-P2WPKH MUST be compressed,...
Read more >Chapter 7: 'Advanced Transactions and Scripting' · GitBook
Uncompressed public keys are nonstandard in segwit and may be explicitly disabled by a future soft fork. If the hash used in the...
Read more >getting public key from any raw transaction - what to take care ...
i need to retrieve public key of transaction sender. now i know there are 03 compressed pubkeys and 04 uncompressed ones. but how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think what he means is:
Segwit enforces compressed public keys for ALL instances of pubkeys in the witness stack. Multisig and single sig.
His question is: It looks like this one line is only checking for single sig. allowing multisig segwit with uncompressed pubkeys to pass and make an invalid transaction. Is he right in his assessment that this is a bug, or are we checking somewhere else and he doesn’t notice it?
Closing in favour of https://github.com/bitcoinjs/bitcoinjs-lib/pull/987