-
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
Unable to sign raw hex tx generated by other software (www.coinb.in) #1811
Comments
There is no standard for storing / exchanging unsigned/partially signed transactions. Until the transactions are signed, anything is fair game, since they're not valid transactions anyways. |
probably related to 59d3910 |
@antonylewis can you check if that commit fixed your issue? |
closing, no answer from OP |
Sorry this was on my backlog but fell off. Will revisit when I can, On Tuesday, 2 August 2016, ThomasV notifications@github.com wrote:
Antony Lewis |
Not fixed - same issue here: creating tx on coinprism. Input address "unknown" and no sign button. |
@off-bank that's not the same issue. |
@ecdsa I believe it is the same issue, as the OP mentions "other software". If I create unsigned tx on coinprism, load raw to electrum (2.6.4), there would be no "sign" button. Input shows "unknown" for the (local) address. 01000000015392c1cbc8c58e8ab433aaeb7e7ee44c06d6d0ce55cb0c8b761de5cae8987328000000001976a9148042e14b00f08c83957c07b0318ae6d5b2e20fdd88acffffffff0280841e00000000001976a9145470ab7467a09b69afc52a63aa95d5734ea9932c88ac207b0400000000001976a9148042e14b00f08c83957c07b0318ae6d5b2e20fdd88ac00000000 |
Yo, I had the same problem. A wild solution appearsHere was my fix:
Here's the data: My bad sig: (notice the
Pre-signed tx from coinb.in
Now, In this case, immediately after that string (very early on) there are the bytes
I used my bad sig from electrum and replaced it:
And viola electrum recognised it as unsigned and allowed me to sign and send. I don't know if my bad-sig will work for you (try just pasting that in first) but this should help anyone down the line make this work. |
Changed my server's hostname
It seems that coinb.in and Electrum create different raw transactions and neither can sign each other's raw tx.
Steps to reproduce:
eg 1PrearGupCpnkFg3RGMTKrkwDDamuREpT3
Here's the privkey: 5Jvq1Wt7CRG6Wv7gKGp4T1CzPzCYHSiHQeHE61zS1h5NeyUzLnU
Here's the tx with the UTxO I was trying to spend:
9f559d397f8a2ed52fb44193dcc4300b023253511d9493dd2975e36cc9794a23
In Electrum create a new tx:
Send 0.0002825 coins to: 3Fr4pxhgR8tBfmUdyRgdKSfQr4j4dvAsmw
Mining fee: 0.0000895
(this spends the entire UTxO)
You get this raw unsigned tx:
0100000001234a79c96ce37529dd93941d515332020b30c4dc9341b42fd52e8a7f399d559f000000001901ff16fd00fab685c8865dd3161d90fa471cfd65c67c6574c6ffffffff015a6e00000000000017a9149b47edb5dfdc24da15f73273a18246ea4969ac528700000000
Which is:
{
"lock_time":0,
"size":108,
"inputs":[
{
"prev_out":{
"index":0,
"hash":"9f559d397f8a2ed52fb44193dcc4300b023253511d9493dd2975e36cc9794a23"
},
"script":"01ff16fd00fab685c8865dd3161d90fa471cfd65c67c6574c6"
}
],
"version":1,
"vin_sz":1,
"hash":"a7d7c7b33f6fd2607749e19bb8792fb0950b5242d02e2c72b3609985e3a66a85",
"vout_sz":1,
"out":[
{
"script_string":"OP_HASH160 9b47edb5dfdc24da15f73273a18246ea4969ac52 OP_EQUAL",
"address":"3Fr4pxhgR8tBfmUdyRgdKSfQr4j4dvAsmw",
"value":28250,
"script":"a9149b47edb5dfdc24da15f73273a18246ea4969ac5287"
}
]
}
However using the same details, coinb.in generated this different raw unsigned tx:
0100000001234a79c96ce37529dd93941d515332020b30c4dc9341b42fd52e8a7f399d559f000000001976a914fab685c8865dd3161d90fa471cfd65c67c6574c688acffffffff015a6e00000000000017a9149b47edb5dfdc24da15f73273a18246ea4969ac528700000000
I used https://coinb.in/#newTransaction, typed in 1PrearGupCpnkFg3RGMTKrkwDDamuREpT3 and selected the one UTxO that was available)
Which is this:
{
"lock_time":0,
"size":108,
"inputs":[
{
"prev_out":{
"index":0,
"hash":"9f559d397f8a2ed52fb44193dcc4300b023253511d9493dd2975e36cc9794a23"
},
"script":"76a914fab685c8865dd3161d90fa471cfd65c67c6574c688ac"
}
],
"version":1,
"vin_sz":1,
"hash":"4a353f6a7580dd7c4f19fb140328f4378c2ae382f2f65cb88a85ca0e99c7ef5b",
"vout_sz":1,
"out":[
{
"script_string":"OP_HASH160 9b47edb5dfdc24da15f73273a18246ea4969ac52 OP_EQUAL",
"address":"3Fr4pxhgR8tBfmUdyRgdKSfQr4j4dvAsmw",
"value":28250,
"script":"a9149b47edb5dfdc24da15f73273a18246ea4969ac5287"
}
]
}
When I paste the coinb.in raw unsigned tx into Electrum (Tools -> Load Transaction -> from text), I get this:
Transaction unrelated to your wallet
Inputs:
9f559d39...c9794a23:0 unknown
I notice that the "scripts" in the "inputs" section are different, and so of course are the "hash"es... Was wondering why?
Just for fun I pushed both unsigned tx out via https://blockchain.info/pushtx
For the electrum generated one I got: OP_EQUALVERIFY: non-equal data
For the coinb.in generated one I got: Attempted OP_DUP on an empty stack
When I signed each tx respectively, the signed tx were identical:
Electrum signed:
0100000001234a79c96ce37529dd93941d515332020b30c4dc9341b42fd52e8a7f399d559f000000008b483045022100d36e01ebf1d5087f797638347e67f80836e9e154f0536d88b321c9f1f56ff36302206cf382ac6c564e9bdbb1ce5f3c706c0dd69ab6d64521de3c2e57a32faac2a5bf014104a1da3734a1c2e67f418c134bee3399dba1f624dfd3d3c1925ca81b9597e110c2fe9106f206595b17a0c0decb7d24d8cc7c2db20ad8d7127ab1f598734fba6bccffffffff015a6e00000000000017a9149b47edb5dfdc24da15f73273a18246ea4969ac528700000000
(tx id = b0ba95ffaf23137bc954225ee6e6d3f16fd6f68901ff3aae2ae46773b09bf457)
coinb.in signed:
0100000001234a79c96ce37529dd93941d515332020b30c4dc9341b42fd52e8a7f399d559f000000008b483045022100d36e01ebf1d5087f797638347e67f80836e9e154f0536d88b321c9f1f56ff36302206cf382ac6c564e9bdbb1ce5f3c706c0dd69ab6d64521de3c2e57a32faac2a5bf014104a1da3734a1c2e67f418c134bee3399dba1f624dfd3d3c1925ca81b9597e110c2fe9106f206595b17a0c0decb7d24d8cc7c2db20ad8d7127ab1f598734fba6bccffffffff015a6e00000000000017a9149b47edb5dfdc24da15f73273a18246ea4969ac528700000000
(tx id = b0ba95ffaf23137bc954225ee6e6d3f16fd6f68901ff3aae2ae46773b09bf457)
Here's the private key:
I originally documented this as a bug, but I'm not sure any more due to the difference in the input/script.
_Original issue report follows_
There seems to be an issue in Electrum 2.6.4 on OS X 10.10.5 where Electrum can't sign a a message although other software can.
Steps to reproduce:
Add: 14HkryoBSjLn1mi97YzHZub1evykyn9BLq
Pub: 036219c7055cf78eefa1f1ff7cb70b7215800a508cf1619507f4ada06bd37e1b2e
Priv: L2DdzcBhTE6H2moZrzTzEXVPiWXxec3t9gXGNbWnKeqac317RCLY
(This is a compressed set, but the issue still exists for uncompressed)
Fund it:
I funded it with this tx:
https://blockchain.info/tx/4cf2d34e766e935ed8925621e88763d311a66b328a175b0ca1121172d0cbfa29
010000000129facbd0721112a10c5b178a326ba611d36387e8215692d85e936e764ed3f24c000000001976a9142413a58b05595ff4c135af2bf460096a49c3c4ca88acffffffff01409c00000000000017a9147dcdd7e6a2c9edebbd677dc48ea25e0de099809f8700000000
You can see by decoding it using https://blockchain.info/decode-tx that this uses the funding tx 4cf2d34e766e935ed8925621e88763d311a66b328a175b0ca1121172d0cbfa29 [0] as its input:
{
"lock_time":0,
"size":108,
"inputs":[
{
"prev_out":{
"index":0,
"hash":"4cf2d34e766e935ed8925621e88763d311a66b328a175b0ca1121172d0cbfa29"
},
"script":"76a9142413a58b05595ff4c135af2bf460096a49c3c4ca88ac"
}
],
"version":1,
"vin_sz":1,
"hash":"0ae4c39a05f6ebcc5973483146ae456bf2d8e17336b981a908c9608adbbc4881",
"vout_sz":1,
"out":[
{
"script_string":"OP_HASH160 7dcdd7e6a2c9edebbd677dc48ea25e0de099809f OP_EQUAL",
"address":"3DACymd3MVEmyrSbJwZpDVnGbPAeL4KquP",
"value":40000,
"script":"a9147dcdd7e6a2c9edebbd677dc48ea25e0de099809f87"
}
]
}
Bug: Electrum says "Transaction unrelated to your wallet" and in the Inputs box it says:
4cf2d34e...d0cbfa29:0 unknown
You can see that it has parsed the input tx hash, but it hasn't detected/calculated the address, and there is no "sign" button so the transaction can not be signed in Electrum.
I was expecting the Inputs box to have the correct address 14HkryoBSjLn1mi97YzHZub1evykyn9BLq
Paste in the private key L2DdzcBhTE6H2moZrzTzEXVPiWXxec3t9gXGNbWnKeqac317RCLY
Paste in the unsigned tx 010000000129facbd0721112a10c5b178a326ba611d36387e8215692d85e936e764ed3f24c000000001976a9142413a58b05595ff4c135af2bf460096a49c3c4ca88acffffffff01409c00000000000017a9147dcdd7e6a2c9edebbd677dc48ea25e0de099809f8700000000
Click "submit" and you can see it's signable. (try with a different private key and the signed tx is too small and invalid when you try to broadcast it)
You get this signed message: 010000000129facbd0721112a10c5b178a326ba611d36387e8215692d85e936e764ed3f24c000000006b483045022100bf2a1ff725e6891ef20d072f778b42da1b1590202560bcf0223696eda3fa6ae8022018a03399d9ff0cd68585802ab7b8a67d4af35d9bd3b537ec58c51055c69f18bb0121036219c7055cf78eefa1f1ff7cb70b7215800a508cf1619507f4ada06bd37e1b2effffffff01409c00000000000017a9147dcdd7e6a2c9edebbd677dc48ea25e0de099809f8700000000
Which decodes using https://blockchain.info/decode-tx to this:
{
"lock_time":0,
"size":190,
"inputs":[
{
"prev_out":{
"index":0,
"hash":"4cf2d34e766e935ed8925621e88763d311a66b328a175b0ca1121172d0cbfa29"
},
"script":"483045022100bf2a1ff725e6891ef20d072f778b42da1b1590202560bcf0223696eda3fa6ae8022018a03399d9ff0cd68585802ab7b8a67d4af35d9bd3b537ec58c51055c69f18bb0121036219c7055cf78eefa1f1ff7cb70b7215800a508cf1619507f4ada06bd37e1b2e"
}
],
"version":1,
"vin_sz":1,
"hash":"c0d29750bd418cee7d3595ebad0fddaa7fea38a7c202d3ec7af7ad76962518df",
"vout_sz":1,
"out":[
{
"script_string":"OP_HASH160 7dcdd7e6a2c9edebbd677dc48ea25e0de099809f OP_EQUAL",
"address":"3DACymd3MVEmyrSbJwZpDVnGbPAeL4KquP",
"value":40000,
"script":"a9147dcdd7e6a2c9edebbd677dc48ea25e0de099809f87"
}
]
}
This was accepted by the network:
https://tradeblock.com/bitcoin/tx/c0d29750bd418cee7d3595ebad0fddaa7fea38a7c202d3ec7af7ad76962518df
The text was updated successfully, but these errors were encountered: