Hi there,
I was trying to sign a multisig rawtx using explicit privkey and encountered some problems.
Description below:
1. create multisig address from 2 addresses ("1MZNrRbGg8AD7rz8TLw451DByJF6e3CZDZ", "12oESJ63gKmf7EtqEdrV7Xnid8dmYTBKE3")
$ bitcoind addmultisigaddress 2 '["04e89a79651522201d756f14b1874ae49139cc984e5782afeca30ffe84e5e6b2cfadcfe9875c490c8a1a05a4debd715dd57471af8886ab5dfbb3959d97f087f77a","0455cf4a3ab68a011b18cb0a86aae2b8e9cad6c6355476de05247c57a9632d127084ac7630ad89893b43c486c5a9f7ec6158fb0feb708fa9255d5c4d44bc0858f8"]'
34y6HmY6zTH51KTC9vd36HasNL4kLKcisC
2. create tx of 1BTC to 1LCSzvp2xWHFt3x1qnz8JNGX1sXEfy48pJ. There are enough funds:
http://blockchain.info/unspent?address=34y6HmY6zTH51KTC9vd36HasNL4kLKcisC$ bitcoind createrawtransaction '[{"txid":"8e7068fcbad6059ef5add9615888606bf0c20b7be076c8e7f969ad8b0e056ecb","vout":1}]' '{"1LCSzvp2xWHFt3x1qnz8JNGX1sXEfy48pJ":1}'
0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000
3. try to sign with no explicit privkey and no privkey in my main wallet.
Not signed as expected.$ bitcoind signrawtransaction 0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000 '[{"scriptPubKey": "a91423f2ad603145e5ef55dec9ae4cd38a0bf37f5d9887", "vout": 1, "txid": "8e7068fcbad6059ef5add9615888606bf0c20b7be076c8e7f969ad8b0e056ecb"}]'
{
"hex" : "0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000",
"complete" : false
}
4. try to give explicit privkey (of first address).
Not signed. Not expected.$ bitcoind signrawtransaction 0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000 '[{"scriptPubKey": "a91423f2ad603145e5ef55dec9ae4cd38a0bf37f5d9887", "vout": 1, "txid": "8e7068fcbad6059ef5add9615888606bf0c20b7be076c8e7f969ad8b0e056ecb"}]' '["5KCqBSbPfaQtMaYgU1aZHqFoWqcJC1RrgCUr11M8sBX93K2UQR4"]'
{
"hex" : "0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000",
"complete" : false
}
5. import privkey and try to sign with no explicit privkey.
Signed as expected.$ bitcoind importprivkey 5KCqBSbPfaQtMaYgU1aZHqFoWqcJC1RrgCUr11M8sBX93K2UQR4
$ bitcoind addmultisigaddress 2 '["...","..."]' # signing doesn't work without re-running addmultisigaddress
34y6HmY6zTH51KTC9vd36HasNL4kLKcisC
$ bitcoind signrawtransaction 0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000 '[{"scriptPubKey": "a91423f2ad603145e5ef55dec9ae4cd38a0bf37f5d9887", "vout": 1, "txid": "8e7068fcbad6059ef5add9615888606bf0c20b7be076c8e7f969ad8b0e056ecb"}]'
{
"hex" : "0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e01000000d30048304502206c7723e081aacd17e3bf276626ac1d99779f43e046a2757d7a62107fce22c939022100bd02cdf74775e5ea94a4851acb3b89e2aa211b405a95940f5226d473612d871a014c87524104e89a79651522201d756f14b1874ae49139cc984e5782afeca30ffe84e5e6b2cfadcfe9875c490c8a1a05a4debd715dd57471af8886ab5dfbb3959d97f087f77a410455cf4a3ab68a011b18cb0a86aae2b8e9cad6c6355476de05247c57a9632d127084ac7630ad89893b43c486c5a9f7ec6158fb0feb708fa9255d5c4d44bc0858f852aeffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000",
"complete" : false
}
6. try to sign with explicit privkey, when privkey is present in main wallet.
Not signed. Already expected according to #4.$ bitcoind signrawtransaction 0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000 '[{"scriptPubKey": "a91423f2ad603145e5ef55dec9ae4cd38a0bf37f5d9887", "vout": 1, "txid": "8e7068fcbad6059ef5add9615888606bf0c20b7be076c8e7f969ad8b0e056ecb"}]' '["5KCqBSbPfaQtMaYgU1aZHqFoWqcJC1RrgCUr11M8sBX93K2UQR4"]'
{
"hex" : "0100000001cb6e050e8bad69f9e7c876e07b0bc2f06b60885861d9adf59e05d6bafc68708e0100000000ffffffff0100e1f505000000001976a914d294ab0b27d2cdd04a43f0a8c6105222a444e93b88ac00000000",
"complete" : false
}
More info:
I am running bitcoin-0.7.0rc1-linux (64bit)
What did I miss?
Grazcoin