Bitcoin Forum
December 11, 2016, 11:55:41 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: [Bounty] How-to Multi signature transactions  (Read 11449 times)
ripper234
Legendary
*
Offline Offline

Activity: 1260


Ron Gross


View Profile WWW
September 17, 2012, 08:21:37 PM
 #21

Is there currently a GUI that supports multisig? Is it a part of bitcoin-qt 0.7?

Please do not pm me, use ron@bitcoin.org.il instead
Mastercoin Executive Director
Co-founder of the Israeli Bitcoin Association
1481457341
Hero Member
*
Offline Offline

Posts: 1481457341

View Profile Personal Message (Offline)

Ignore
1481457341
Reply with quote  #2

1481457341
Report to moderator
1481457341
Hero Member
*
Offline Offline

Posts: 1481457341

View Profile Personal Message (Offline)

Ignore
1481457341
Reply with quote  #2

1481457341
Report to moderator
1481457341
Hero Member
*
Offline Offline

Posts: 1481457341

View Profile Personal Message (Offline)

Ignore
1481457341
Reply with quote  #2

1481457341
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481457341
Hero Member
*
Offline Offline

Posts: 1481457341

View Profile Personal Message (Offline)

Ignore
1481457341
Reply with quote  #2

1481457341
Report to moderator
1481457341
Hero Member
*
Offline Offline

Posts: 1481457341

View Profile Personal Message (Offline)

Ignore
1481457341
Reply with quote  #2

1481457341
Report to moderator
1481457341
Hero Member
*
Offline Offline

Posts: 1481457341

View Profile Personal Message (Offline)

Ignore
1481457341
Reply with quote  #2

1481457341
Report to moderator
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
September 18, 2012, 12:27:50 AM
 #22

But even after that, there's a big hurdle for client developers, because signature collection is going to be a pain in the ass.  That's why I created BIP 10 (and already use it for offline transactions), but it might need to be expanded or supplemented with more user-friendliness.  Ugh...

For the audience (I'm sure etotheipi already knows this) "pain in the ass" might be more specifically translated as:  it is an Out Of Band problem.

You definitely need to collect together the keys somehow.


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
September 18, 2012, 12:30:09 AM
 #23

Is there currently a GUI that supports multisig? Is it a part of bitcoin-qt 0.7?

It is only RPC at this point.


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Jan
Legendary
*
Offline Offline

Activity: 1042



View Profile
September 19, 2012, 11:14:36 AM
 #24

When sending to a multisig address is it done in exactly the same way as with standard addresses?

Right now, in BitcoinSpinner, it complains about multisig addresses as it tries to validate that it is an address for the prodnet (0x00 prefix before Base58 encoding, 0x6F for testnet)
I guess the only thing I need to do is patch the code that validates the bitcoin address, so it also allows prefix 0x05 for the prodnet and 0xC4 for testnet.

Mycelium let's you hold your private keys private.
molecular
Donator
Legendary
*
Offline Offline

Activity: 2142



View Profile
May 11, 2013, 09:48:54 AM
 #25

Quote
$ ./bitcoind addmultisigaddress 2 '["0446fc07bc99bef8e7a875249657c65e1f1793fd0bf45e2c39d539b6f8fcd44676acc552ab886c1 1eb08f4a275e7bb7dc4fdaf9c4b2228856f168a69df7d216fbc","04df70eb0107ed08e1ddcd4b4d85d26bf8cca301f5c98fd15f5efef12ba4de72bfef7287f964e30 4207164c003029449740aaae2d6af1ff7ae3f6bb27f3012296c","046003581a3ff5bc3dedaa6da4834ce7bcd49d3f114ce15791f6b5de8b0cec81a46db2eb8cf84d2 db845854c57788c7283ab4040aeb3595bc5c68303a17fdde7c8"]'
Works in a Terminal on my Mac, returns:
Quote
3EffXJKyYB9zWh2dhx2hcccqBK8DGC7x2x
... which validates as:
Quote
Code:
$ ./bitcoind validateaddress 3EffXJKyYB9zWh2dhx2hcccqBK8DGC7x2x
{
    "isvalid" : true,
    "address" : "3EffXJKyYB9zWh2dhx2hcccqBK8DGC7x2x",
    "isscript" : true,
    "ismine" : false,
    "script" : "multisig",
    "addresses" : [
        "1HEmNY7Lpsqc81nP6JAymjGuuvdFLaqt1e",
        "1Gpuy32bmhtn3KL6dBDHdTHfMosXRH6xV4",
        "1AbU2FDgJRKejuY4e4XGYEfzo6uAGQ1Kyy"
    ],
    "sigsrequired" : 2,
    "account" : ""
}
I don't know enough about Windows CLI quoting rules to get ["...","...","..."] passed un-modified to bitcoind.exe.  


That's all nice and dandy... but how can I construct a transaction to spend the money sent to that multisig address and how can I have the owners of the privkeys add (or give me) their signatures to do so?

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
dserrano5
Legendary
*
Offline Offline

Activity: 1638



View Profile
May 11, 2013, 10:12:12 AM
 #26

That's all nice and dandy... but how can I construct a transaction to spend the money sent to that multisig address

Gavin's TwoOfThree.sh was enough for me to play with it. You're interested in the "Create the spend-from-multisig transaction" part.

molecular
Donator
Legendary
*
Offline Offline

Activity: 2142



View Profile
May 11, 2013, 10:23:38 AM
 #27

That's all nice and dandy... but how can I construct a transaction to spend the money sent to that multisig address

Gavin's TwoOfThree.sh was enough for me to play with it. You're interested in the "Create the spend-from-multisig transaction" part.

Ah, this will greatly help. Thanks and also thanks Gavin for the script.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
benehsv
Newbie
*
Offline Offline

Activity: 5


View Profile
June 26, 2013, 12:15:48 PM
 #28

Hey

thanks for the help and the tutorial.
I have 2 questions though:

1. Is it possible to verify for an external person that the transaction is a multi-signature transaction?

2. How do I get the sciptpubkey and the reedem key?

Thanks
kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
June 27, 2013, 11:35:45 AM
 #29

I have 2 questions though:

1. Is it possible to verify for an external person that the transaction is a multi-signature transaction?

2. How do I get the sciptpubkey and the reedem key?

1.  No.  The can see that coins were sent to a P2SH address, which is the hash of a script, but they can't see what that script is until revealed.  It could be multisig, it could be pay-to-address, it could be something strange.  Of course, if you want people to see that it was multisig, you can publish the script through some other means, and people will be able to see that it really does hash to the P2SH address shown.

2.  You create them.  Or, if someone else is managing the address, they create them and then maybe give them to you.

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
benehsv
Newbie
*
Offline Offline

Activity: 5


View Profile
June 28, 2013, 01:17:59 PM
 #30

I have 2 questions though:

1. Is it possible to verify for an external person that the transaction is a multi-signature transaction?

2. How do I get the sciptpubkey and the reedem key?

1.  No.  The can see that coins were sent to a P2SH address, which is the hash of a script, but they can't see what that script is until revealed.  It could be multisig, it could be pay-to-address, it could be something strange.  Of course, if you want people to see that it was multisig, you can publish the script through some other means, and people will be able to see that it really does hash to the P2SH address shown.

2.  You create them.  Or, if someone else is managing the address, they create them and then maybe give them to you.

Sorry if I am being stupid but how do you "create" them?
dserrano5
Legendary
*
Offline Offline

Activity: 1638



View Profile
June 28, 2013, 06:15:07 PM
 #31

Sorry if I am being stupid but how do you "create" them?

Not stupid, just ignorant, which everyone of us were at some point.

Code:
bitcoind createmultisig

omnibrain
Newbie
*
Offline Offline

Activity: 27


View Profile
June 30, 2013, 09:36:57 AM
 #32

Sorry if I am being stupid but how do you "create" them?

Not stupid, just ignorant, which everyone of us were at some point.

Code:
bitcoind createmultisig

He wasn't asking how to create the multi-sig address, but how to create the scriptPubKey and redeemScript.

I've tried to follow Gavin's script to create a multi-sig address and spend the coins I sent to it, but I can't figure out how to create a transaction. Signing the raw transaction doesn't work for some reason. If someone could look at this and tell me what I did wrong, I'd be extremely grateful: http://pastebin.com/gkqF2Lh8 . Feel free to "steal" the 0.0095 BTC as long as you explain me how you created the transaction and what I did wrong.
kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
June 30, 2013, 12:12:30 PM
 #33

The order of the keys is important.

Code:
bitcoind createrawtransaction '[{"txid":"12af315cdba24e9fd070a7579135d5ade458b5e71008b0421dcc6bb8a795b3cb","vout":0,"scriptPubKey":"a9143d0277df5a51360d0b2d68bbbbf7ed784601f30587","redeemScript":"5221024e43b94cfcdc4c8bd4502d37c8745538f19972434d1c72cb23e9ca0454103ef62103f74a2c52d87c81c589775510ff1d6743f4ab2529a7206cc28762f1559d716ada2102b55624dd872a0b3db3cf053dacd2960cfe909db3a5405353f95631cfc297dda253ae"}]' '{"1Bjaewgk3bXujiJUqLcrkk7aKSS1f9kUV3":0.0095}'

bitcoind signrawtransaction '0100000001cbb395a7b86bcc1d42b00810e7b558e4add5359157a770d09f4ea2db5c31af120000000000ffffffff01f07e0e00000000001976a91475bed242e9b2cf5b4d45ef9f052be369067eae6888ac00000000' '[{"txid":"12af315cdba24e9fd070a7579135d5ade458b5e71008b0421dcc6bb8a795b3cb","vout":0,"scriptPubKey":"a9143d0277df5a51360d0b2d68bbbbf7ed784601f30587","redeemScript":"5221024e43b94cfcdc4c8bd4502d37c8745538f19972434d1c72cb23e9ca0454103ef62103f74a2c52d87c81c589775510ff1d6743f4ab2529a7206cc28762f1559d716ada2102b55624dd872a0b3db3cf053dacd2960cfe909db3a5405353f95631cfc297dda253ae"}]' '["KxfZ1HKs7PLxXo7gmjJVU3Chvcu6fPKzBt61MEGnNZCpG4LC6kQH"]'

Looks like someone already sent it back to you.

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
omnibrain
Newbie
*
Offline Offline

Activity: 27


View Profile
June 30, 2013, 12:47:08 PM
 #34

The order of the keys is important.

Code:
bitcoind createrawtransaction '[{"txid":"12af315cdba24e9fd070a7579135d5ade458b5e71008b0421dcc6bb8a795b3cb","vout":0,"scriptPubKey":"a9143d0277df5a51360d0b2d68bbbbf7ed784601f30587","redeemScript":"5221024e43b94cfcdc4c8bd4502d37c8745538f19972434d1c72cb23e9ca0454103ef62103f74a2c52d87c81c589775510ff1d6743f4ab2529a7206cc28762f1559d716ada2102b55624dd872a0b3db3cf053dacd2960cfe909db3a5405353f95631cfc297dda253ae"}]' '{"1Bjaewgk3bXujiJUqLcrkk7aKSS1f9kUV3":0.0095}'

bitcoind signrawtransaction '0100000001cbb395a7b86bcc1d42b00810e7b558e4add5359157a770d09f4ea2db5c31af120000000000ffffffff01f07e0e00000000001976a91475bed242e9b2cf5b4d45ef9f052be369067eae6888ac00000000' '[{"txid":"12af315cdba24e9fd070a7579135d5ade458b5e71008b0421dcc6bb8a795b3cb","vout":0,"scriptPubKey":"a9143d0277df5a51360d0b2d68bbbbf7ed784601f30587","redeemScript":"5221024e43b94cfcdc4c8bd4502d37c8745538f19972434d1c72cb23e9ca0454103ef62103f74a2c52d87c81c589775510ff1d6743f4ab2529a7206cc28762f1559d716ada2102b55624dd872a0b3db3cf053dacd2960cfe909db3a5405353f95631cfc297dda253ae"}]' '["KxfZ1HKs7PLxXo7gmjJVU3Chvcu6fPKzBt61MEGnNZCpG4LC6kQH"]'

Looks like someone already sent it back to you.

Yeah I just figured this out, thanks to the folks on #bitcoin-dev

Btw there's a tool to make this really easy: https://github.com/CodeShark/CoinClasses
And here's how to use it: http://pastebin.com/W0zCLB6i


clicknbuyit
Newbie
*
Offline Offline

Activity: 15


View Profile
July 03, 2013, 12:08:47 PM
 #35

I need help on how to sign a message on bitcoin wallet 0.8.2. 

Thankyou.
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
July 03, 2013, 04:16:41 PM
 #36

See txtool via https://bitcointalk.org/index.php?topic=249205.0 for a step-by-step multisig example.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
camponez
Member
**
Offline Offline

Activity: 63


View Profile WWW
February 01, 2014, 06:57:29 PM
 #37

Ok, I need to create multi signature transaction.. 2-of-3... What do I do?

Then create a 2-of-3 multisig address using addmultisigaddress; e.g.

Quote
bitcoind addmultisigaddress 2 '["044322868cb17d64dcc22185ae2d4493111d73244c3668f8ac79ecc79c0ba8d30a6756d0fa20157 709af3281cc721c7f53321a8cabda29b77900b7e4fe0174b114","..second pubkey..","..third pubkey.."]'
addmultisigaddress returns the multisignature address. Be a little careful, the public keys are raw hexadecimal and don't contain checksums like bitcoin addresses do.

You can then send funds into that 2-of-3 transaction using the normal sendtoaddress/sendmany RPC commands, or the GUI (or anything that's been updated to recognize multisig addresses).

That will create a multi signature transaction.


How do I get the hex pub key when I have just the wallet address and the "standard format" (1Kdjlj....)?

Cheers
ripper234
Legendary
*
Offline Offline

Activity: 1260


Ron Gross


View Profile WWW
March 23, 2014, 04:53:10 PM
 #38

https://bitcoin.stackexchange.com/questions/23893/what-are-the-limits-of-m-and-n-in-m-of-n-multisig-addresses

Quote
This method describes how to create a 2-of-3 multisig.

I heard that there was an inherent limit with the number of multisig parts, limiting them to 3.

Does the standard method described above of generating and spending multisig addresses work with more than 3 parts? What is the limit?

Please do not pm me, use ron@bitcoin.org.il instead
Mastercoin Executive Director
Co-founder of the Israeli Bitcoin Association
CIYAM
Legendary
*
Offline Offline

Activity: 1820


Ian Knowles - CIYAM Lead Developer


View Profile WWW
March 23, 2014, 04:57:17 PM
 #39

From what I read in the code only a 2 of 3 is *standard* currently.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
edmundedgar
Sr. Member
****
Offline Offline

Activity: 352


https://www.realitykeys.com


View Profile WWW
March 27, 2014, 03:26:42 AM
 #40

From what I read in the code only a 2 of 3 is *standard* currently.

The code's a bit tricky to follow when P2SH is involved because effectively script evaluation is happening twice, once when it checks that the script hash you're paying to matches the redeem script you've supplied, and once again when it actually runs the redeem script.

So when you see this it looks like only x/<=3 is standard, but in fact that only applies to a traditional, non-P2SH transaction. If you're doing P2SH, your script isn't TX_MULTISIG at the point where it's evaluating that. It's TX_SCRIPTHASH:
https://github.com/bitcoin/bitcoin/blob/0.9.0/src/script.cpp#L1414

To make the content of your P2SH script standard you just have to match one of the patterns in here:
https://github.com/bitcoin/bitcoin/blob/0.9.0/src/script.cpp#L1194

...which allows lots/lots, as long as you don't blow over the size limits.
Pages: « 1 [2] 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!