-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pubkey OP_CHECKSIG inputs spending #764
Comments
What version are you using? 1.9.8? current master HEAD? |
I've cloned current master HEAD. |
Ok, you should try it with 1.9.8 under the "Releases." tab. It might work for you there if this is something you need urgently. Currently there is a lot of housekeeping going on in preparation for 2.0 release, so master HEAD is not always stable. Hopefully this will be addressed before the 2.0 release. |
I think I found a solution. We need to add output type in the result of tx.get_outputs and return this value from the get_unspent_coins function. This should make tx output type available for transaction serialize() method. Maybe I'll try this a bit later. :) |
1.9.8 doesn't work too. It's not something like a bug, client simply has no idea how to spend them. So applying dirty hacks to get_outputs/get_unspent_coins/serialize and pay_script is necessary to spend pubkey inputs. Well, these hacks are working for me. :) https://explorer.novaco.in/tx/dd6dd2f0d49a5d332c4642b8220b81dfb16697918d4d555215bf396480ca3ecf |
how did you generate the unsigned transaction? not in electrum I guess? |
@ecdsa |
how did you import the address? |
electrum addresses are never pay-to-pubkey addresses. so I don't see how the transaction could have been created in electrum, unless you somehow imported the address. please explain. |
after some googling, the transaction input that the OP is trying to spend is from NovaCoin. |
Modify translatable strings with "Electron Cash"
…s sets the flag back
Hi. It's strange but it seems that transaction signing code doesn't make any difference between pubkey and pubkey_hash type of inputs.
As the result, incorrect signatures are generated for pubkey inputs, and instead of this script
we're getting this one
Example is attached below.
Signed by Electrum (invalid signature):
Signed by daemon (valid signature):
You can see that electrum treats a pubkey input as pubkey_hash, and adds a public key to the end of scriptSig value.
The text was updated successfully, but these errors were encountered: