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

Allow spending from segwit addresses created from uncompressed private keys (P2SH-P2WPKH) #20178

Closed
leventturksoy opened this issue Oct 17, 2020 · 14 comments
Labels

Comments

@leventturksoy
Copy link

leventturksoy commented Oct 17, 2020

Trying to create a transaction that is sent from a segwit addresses created from an uncompressed private key raises this error:
non-mandatory-script-verify-flag (Using non-compressed keys in segwit) (code 64)

This makes the transaction non-standard, which has resulted in stuck user funds. A small change is needed in the source code to allow for such segwit addresses in order to have their transactions not marked as non-standard.

Please enable relaying and mining of non-standard P2SH-P2WPKH transactions that use uncompressed public keys.

Additional context
One specific user has over 5.7 BTC that is unspendable due to all outgoing transactions being marked as non-standard.
Address with funds: 34dqaqvQNWMgbMJmmxVa8LeGz7St6ATT97
Please see: https://bitcointalk.org/index.php?topic=5278860.0

@ghost
Copy link

ghost commented Oct 18, 2020

Please enable relaying and mining of non-standard P2SH-P2WPKH transactions that use uncompressed public keys.

Mining of non-standard transactions should be possible IMO. Maybe you can contact few mining pools.

Relaying of non-standard transactions on mainnet is not a good idea from what I read in the below mentioned links:

https://github.com/bitcoin/bitcoin/pull/6329/files#r34223173

https://bitcoin.stackexchange.com/a/73731/

https://bitcoin.stackexchange.com/a/72479/

@leventturksoy
Copy link
Author

Please enable relaying and mining of non-standard P2SH-P2WPKH transactions that use uncompressed public keys.
Mining of non-standard transactions should be possible IMO. Maybe you can contact few mining pools.

Yes I understand, however all pools are either:

  • Having too big of a hierarchy in order to reach someone with authority to do so
  • Not interested in changing their code for such a risk
  • Too small to be able to mine their own block

I have been trying for almost a year to reach someone from a major mining pool to no luck.

@leventturksoy
Copy link
Author

@leventturksoy which wallet and version did you use when you had this issue?

BlueWallet for iOS. I used v4.0.2 to send the transaction. It was subsequently patched to disallow uncompressed private keys for segwit wallets in v4.0.3, the next update. That information is redundant in fixing this

@ghost
Copy link

ghost commented Oct 18, 2020

Thanks for sharing. I wanted to know the wallet and version so that others can avoid such issues. I found this transaction which involves spending of non-standard UTXOs : fac212a142cfeaaaa03fc32ec419e72c650b7f1878723eab72e50e6d60fb39eb

Its not a segwit transaction but still relevant because of the inputs being non-standard. It was included in block 473629 which was mined by BTCC mining pool. Not sure if the mining pool still works because I couldn't find the website for mining pool. This web archive link had one email address: https://web.archive.org/web/20181127190516/https://btccpool.com/ which you can use to contact them for help (I have tried sending test email and got no bounceback). Website for BTCC exchange: https://www.btcc.com/ I have also tagged all the mining pools that I know in a tweet: https://twitter.com/prayankgahlot/status/1317712084046508034

@maflcko
Copy link
Member

maflcko commented Oct 19, 2020

Something like #7533 could help here and also be generally useful to side step a specific policy check for a specific tx without having to restart the daemon and/or modify the source code to accept nonstandard txs by default on mainnet.

@leventturksoy
Copy link
Author

Something like #7533 could help here and also be generally useful to side step a specific policy check for a specific tx without having to restart the daemon and/or modify the source code to accept nonstandard txs by default on mainnet.

Thank you for that, however finding a pool has been near impossible for this, even though there is a 1.0 BTC bounty available.

@drnick30
Copy link

Is the offer still up? I could attempt to mine this and get back to you. can you send a raw transaction.

@leventturksoy
Copy link
Author

Is the offer still up? I could attempt to mine this and get back to you. can you send a raw transaction.

Hey, yes the offer is still available. Here is a signed raw tx with a 0.57 BTC fee:

01000000000101c0ee957139541ad18cb3367a4dd0606bbc8c5bd1585ce64e813c5c21359e3f6e0000000017160014ef3247d77adecb1f22692e899931e75e1a5cbb26ffffffff01b664021f0000000017a914627fad0b2485dc664cbb2a87c341b09f2d8919948702473044022029f40f4207843b5b100eb420b085f62191b946aeff4fd46e3310fa6367c71e1402205a83c7a616a7b186359bd8cdb1de32ba3c4111ec37377dd2d535d4f749c53c0d0141044b8d17d6f5fae04c9213da069f4e9fdd25df5f567f867a6a957a850c45a602b788c4a699afacbca54cfc5ba0cd659f20575f2fb20eee6ed73cf8bb7dd95e3fd200000000

However, you may have trouble pushing that since the fee is absurdly high and there is an absurdly-high-fee error. So, here is a tx with a much lower fee (around 0.08 BTC):

01000000000101c0ee957139541ad18cb3367a4dd0606bbc8c5bd1585ce64e813c5c21359e3f6e0000000017160014ef3247d77adecb1f22692e899931e75e1a5cbb26ffffffff01f6c38c220000000017a914627fad0b2485dc664cbb2a87c341b09f2d8919948702483045022100987b0b0331762e2629b51c23897b2d9456a1632f9a6b84536b3d060df2c5da8e02201e777c966da5bdd5a41d6652e38267755ff6e8085d2e906e9718715af738ac4f0141044b8d17d6f5fae04c9213da069f4e9fdd25df5f567f867a6a957a850c45a602b788c4a699afacbca54cfc5ba0cd659f20575f2fb20eee6ed73cf8bb7dd95e3fd200000000

If the result is the second transaction being mined, I am willing to manually transfer the remaining bounty to your address. Good luck.

@drnick30
Copy link

Hi, I am still working on it. Just had to modify the node to accept non standard transaction, lets see how it goes. You can send the 1 btc reward here 3DWeyf3LvULT3qXpNRddYRydU581D1vRcG if all goes well. Fingers crossed.

@leventturksoy
Copy link
Author

Hi, I am still working on it. Just had to modify the node to accept non standard transaction, lets see how it goes. You can send the 1 btc reward here 3DWeyf3LvULT3qXpNRddYRydU581D1vRcG if all goes well. Fingers crossed.

Hey, please see: https://bitcointalk.org/index.php?topic=5192454.msg55523466#msg55523466

Myself and others have been continually broadcasting this specific non-standard transaction in hopes that someone mines it:

01000000000101c0ee957139541ad18cb3367a4dd0606bbc8c5bd1585ce64e813c5c21359e3f6e0 000000017160014ef3247d77adecb1f22692e899931e75e1a5cbb26ffffffff01e63d0423000000 0017a9146b4e110311345ba00ff2bb77d569e7f4a0651c6387024830450221008467643b0f6be6b 9c47020bbc824908b5b391a752e416fefcba597d2be1ad5db02200756619fe6db4bcd694dbee6e0 fdc332f06a7b187dd3de6e756c6f7c21d3bdde0141044b8d17d6f5fae04c9213da069f4e9fdd25d f5f567f867a6a957a850c45a602b788c4a699afacbca54cfc5ba0cd659f20575f2fb20eee6ed73c f8bb7dd95e3fd200000000

@drnick30
Copy link

drnick30 commented Nov 14, 2020 via email

@cklnk
Copy link

cklnk commented Dec 7, 2020

The segwit address I generated with a well-known wallet got stuck with the same problem

@drnick30
Copy link

drnick30 commented Dec 7, 2020 via email

@bitcoin bitcoin deleted a comment from leventturksoy Dec 18, 2020
@achow101
Copy link
Member

It is not scalable to change standardness rules to resolve issues stemming from isolated individual mistakes. If this is still an issue, work with a miner to get your nonstandard transaction included in a block.

@achow101 achow101 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants
@cklnk @achow101 @maflcko @drnick30 @leventturksoy and others