I’m making an attempt generate a P2SH-P2WSH deal with after which spend an output despatched to this deal with, however after I try signing I obtain Invalid personal key error from bitcoind (v0.15.1.0). So the place am I going fallacious I’m not totally certain that I generate deal with appropriately or that bitcoind rpc strategies appropriately help segwit signing operation.
I might respect if somebody might affirm whether or not deal with is generated appropriately or if I’m one way or the other failing at signing stage from my finish. I can present technology code (written in Java) if wanted.
Here is what I got here up with:
Tackle technology 2 of two multisig:
Non-public hex Key c3accc350d70d1981c4366fd6fd86d9cc311048ae8620dac0b3dc9d18ce415fa
Public Key 320ce424c6d61f352ccfea60d209651672cfb03b2dc77d1d64d3ba519aec756ae
Non-public hex Key 1093e97f3c01bd766473cc51441d443e9325a59387421a9e2fb69b7f9587d915
Public Key 20b020e27e49f049eac10010506499a84e1d59a500cd3680e9ded580df9a107b0
Witness program=2 PUSHDATA(33)[020b020e27e49f049eac10010506499a84e1d59a500cd3680e9ded580df9a107b0] PUSHDATA(33)[0320ce424c6d61f352ccfea60d209651672cfb03b2dc77d1d64d3ba519aec756ae] 2 CHECKMULTISIG
Witness hex=5221020b020e27e49f049eac10010506499a84e1d59a500cd3680e9ded580df9a107b0210320ce424c6d61f352ccfea60d209651672cfb03b2dc77d1d64d3ba519aec756ae52ae
redeemScript program=0 PUSHDATA(32)[16a91e58e02069f95ea6defba7436199658573c34d384c69779779f4500d7cac]
redeemScript hex=002016a91e58e02069f95ea6defba7436199658573c34d384c69779779f4500d7cac
scriptPubKey program=HASH160 PUSHDATA(20)[035e0a0739eec3c195f9dc0d8b85e6e3f6ae1ece] EQUAL
scriptPubKey hex=a914035e0a0739eec3c195f9dc0d8b85e6e3f6ae1ece87
TestNetAddress=2MsZ2fpGKUydzY62v6trPHR8eCx5JTy1Dpa
I created these utilizing bitcoinj library I’m not totally certain that that is appropriate, however from the look of it appeared prefer it was described in segwit dev information by bitcoin core.
Fund deposit
I despatched to this deal with check cash (Testnet3) with this TX = 122831a5cc3d3875cadd89e2a2690c2e5bc9e703d177385e1a3318a44675b6d6
Creating uncooked transaction:
Created transaction hex (utilizing bitcoin rpc) =
{
"jsonrpc": "1.0",
"id": "reqId1",
"technique": "createrawtransaction",
"params": [
[
{
"txid": "122831a5cc3d3875cadd89e2a2690c2e5bc9e703d177385e1a3318a44675b6d6",
"vout": 1
}
],
{
"mmZFY7b7NArkrnri43RwxL58m6TZUqty4t": "0.09999"
},
0
]
}
Response hex = 0200000001d6b67546a418331a5e3877d103e7c95b2e0c69a2e289ddca75383dcca53128120100000000ffffffff0198929800000000001976a914423ffad905158d1d472f5fcd5fbc6916c2fb031f88ac00000000
Signing uncooked transaction:
SignRaw transaction request (utilizing bitcoin rpc) = {"jsonrpc":"1.0","id":"signrawtransaction_1510651375833","technique":"signrawtransaction","params":["0200000001d6b67546a418331a5e3877d103e7c95b2e0c69a2e289ddca75383dcca53128120100000000ffffffff0198929800000000001976a914423ffad905158d1d472f5fcd5fbc6916c2fb031f88ac00000000",[{"txid":"122831a5cc3d3875cadd89e2a2690c2e5bc9e703d177385e1a3318a44675b6d6","vout":1,"scriptPubKey":"a914035e0a0739eec3c195f9dc0d8b85e6e3f6ae1ece87","redeemScript":"002016a91e58e02069f95ea6defba7436199658573c34d384c69779779f4500d7cac","amount":"0.10000000"}],["c3accc350d70d1981c4366fd6fd86d9cc311048ae8620dac0b3dc9d18ce415fa","1093e97f3c01bd766473cc51441d443e9325a59387421a9e2fb69b7f9587d915"]]}
{
"jsonrpc": "1.0",
"id": "reqId2",
"technique": "signrawtransaction",
"params": [
"0200000001d6b67546a418331a5e3877d103e7c95b2e0c69a2e289ddca75383dcca53128120100000000ffffffff0198929800000000001976a914423ffad905158d1d472f5fcd5fbc6916c2fb031f88ac00000000",
[
{
"txid": "122831a5cc3d3875cadd89e2a2690c2e5bc9e703d177385e1a3318a44675b6d6",
"vout": 1,
"scriptPubKey": "a914035e0a0739eec3c195f9dc0d8b85e6e3f6ae1ece87",
"redeemScript": "002016a91e58e02069f95ea6defba7436199658573c34d384c69779779f4500d7cac",
"amount": "0.10000000"
}
],
[
"cN8vhcMrmcf3fUkWeTrRNt6mmiBoqnKmuce3yNcWkUjjNNskbjbg",
"cU94urfRuwnEpGtJiiKyGsBqbC7woGazxST1HbGYWMgfVdafKmgu"
]
]
}
Consequence = Error{code=-5, message="Invalid personal key", knowledge="null"}