Timeline for Native P2WSH over P2SH | P2SH-P2WSH
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 12, 2023 at 15:33 | vote | accept | Deepanshu | ||
Sep 12, 2023 at 7:33 | comment | added | karask | Let us continue this discussion in chat. | |
Sep 12, 2023 at 7:33 | history | bounty ended | Deepanshu | ||
Sep 12, 2023 at 7:32 | comment | added | Deepanshu | This is the notebook, that is the same code as yours however uses the different Private Key. github.com/Deepanshu2017/bitcoingist/blob/main/P2WSH%20Ka.ipynb Basic trimmed down version. | |
Sep 12, 2023 at 7:28 | comment | added | Deepanshu |
Okay so the error must be either the way I am creating transaction or Private Key. To generate Private Key I have used PrivateKey class from bitcoinutils.keys To generate the transaction, I copied the from address (which was in this case 2MuxtgnkyrUSudv99YbeApZQtfQmtuw7e8p ), went to coinfaucet.eu/en/btc-testnet and sent some funds. That gave me the transaction ID which I am using in the code.
|
|
Sep 12, 2023 at 7:28 | comment | added | karask | You are welcome. I would suggest compare the raw hex of the txs to see how they differ to pinpoint what changes. You will need to get acquainted with the structure of the bitcoin transaction to do that properly. e.g. bitcoin.stackexchange.com/questions/113697/… | |
Sep 12, 2023 at 7:18 | comment | added | Deepanshu | Hi @karask, Thank you so much for the response. I tried running the example from GitHub, cloned the repo, ran both the examples and did mempool accept test by providing both the hex. It worked. I tried individual hex as well and it worked. Thank you so much. One last question, When I tried running it from Notebook it failed. Let me try again. github.com/Deepanshu2017/bitcoingist/blob/main/… Again thank you so much for the help! | |
Sep 12, 2023 at 7:13 | comment | added | karask | By directly running them I mean your either use your own keys instead of the ones I used in the example or you need to import the keys in the example to your bitcoin node. Not sure which one you tried. I am also not sure if you got the above error running the two examples I provided or by trying to fix your code. | |
Sep 12, 2023 at 6:59 | comment | added | karask | Just to be certain try the examples directly from the github repo (don't copy/paste from here). I just tried the examples and they worked. You can try them yourself, even with regtest by directly running them and then do a: bitcoin-cli testmempoolaccept ["first tx raw hex", "second tx raw hex"] (this way you also test the 2nd tx that depends on the first without broadcasting them) | |
Sep 12, 2023 at 6:55 | comment | added | karask | You cannot see the transactions with a testnet explorer because I have not broadcasted them. I am testing them with my local node with testmempoolaccept. This way I don't need to be sending funds back and forth all the time for the tests. | |
Sep 12, 2023 at 5:27 | comment | added | Deepanshu | I have tried these transactions as well live.blockcypher.com/btc-testnet/tx/… However I can replicate the error while pushing to blockstream blockstream.info/testnet/tx/push | |
Sep 11, 2023 at 22:19 | comment | added | Deepanshu |
I would like to point out 1 thing though, the way I am creating transaction (to get the transaction id for code in regtest) is by passing the to address in sendtoaddress command ./bitcoin-cli -regtest sendtoaddress "mhZ7PvZZp5dafdGdds37m5AbZzArtqFsgT" 0.1 After running the above command, I am getting the transaction id which I have used in code. This is the only command that I am running on bitcoin cli. My regtest Private Keys are correct (hence the address generated must be correct) however there could be an issue with the way I am generating the transaction.
|
|
Sep 11, 2023 at 22:15 | comment | added | Deepanshu |
I want to express my gratitude for providing the examples, but it seems they aren't functioning correctly. I attempted to perform a transaction from a P2SH(P2WSH(P2PK)) to P2PKH , and it resulted in an error bad-witness-nonstandard. To investigate further, I decided to verify the UTXOs mentioned in the code on Bitcoin Explorer. Unfortunately, I couldn't locate these UTXOs on Bitcoin Explorer. The specific UTXO in question is 217f123726bd8ace101afd705ae31384fd818fce17c8e00ce6fc0d24c0364355 github.com/Deepanshu2017/bitcoingist/blob/main/…
|
|
Sep 11, 2023 at 14:15 | history | answered | karask | CC BY-SA 4.0 |