Bitcoin Forum
May 05, 2024, 11:27:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multisig transactions with more than 2-of-3  (Read 1158 times)
matthis (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 13, 2014, 03:33:28 AM
 #1

Hey guys,

I saw that the network was supporting only 2-of-3 multisig transactions.
Is there a reason behind this choice? I think I read somewhere that the hard limit was 16.

Cheers.
1714951643
Hero Member
*
Offline Offline

Posts: 1714951643

View Profile Personal Message (Offline)

Ignore
1714951643
Reply with quote  #2

1714951643
Report to moderator
1714951643
Hero Member
*
Offline Offline

Posts: 1714951643

View Profile Personal Message (Offline)

Ignore
1714951643
Reply with quote  #2

1714951643
Report to moderator
1714951643
Hero Member
*
Offline Offline

Posts: 1714951643

View Profile Personal Message (Offline)

Ignore
1714951643
Reply with quote  #2

1714951643
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714951643
Hero Member
*
Offline Offline

Posts: 1714951643

View Profile Personal Message (Offline)

Ignore
1714951643
Reply with quote  #2

1714951643
Report to moderator
1714951643
Hero Member
*
Offline Offline

Posts: 1714951643

View Profile Personal Message (Offline)

Ignore
1714951643
Reply with quote  #2

1714951643
Report to moderator
1714951643
Hero Member
*
Offline Offline

Posts: 1714951643

View Profile Personal Message (Offline)

Ignore
1714951643
Reply with quote  #2

1714951643
Report to moderator
xeroc
Sr. Member
****
Offline Offline

Activity: 345
Merit: 250



View Profile
June 13, 2014, 07:22:27 AM
 #2

From:
https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki
Quote
For instance while the OP_CHECKMULTISIG opcode can itself accept up to 20 pubkeys, with 33-byte compressed pubkeys it is only possible to spend a P2SH output requiring a maximum of 15 pubkeys to redeem: 3 bytes + 15 pubkeys * 34 bytes/pubkey = 513 bytes.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
June 13, 2014, 07:31:13 AM
 #3

It is important to distinguish between "native multisig" (the output contains the actual script) and P2SH (the output contains a hash of the script).

The former is limited to 3 of 3 (and honestly even if you only need 2 of 3 there is very little reason to use it over P2SH).  The later as pointed out above is constrained by the 520 byte limit on the size of the redeemscript.  It is a max of 15 keys but only if all the keys are compressed.   If using uncompressed keys they are twice as big so you will be able to use less.   There is also a 500 byte soft ( IsStandard() ) limit on the scriptSig which means the m is going to be less or the tx will not be relayed by default (but it is still valid unlike the redeemScript being over 520 bytes).   
matthis (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 15, 2014, 10:56:01 PM
 #4

Thanks for your answers.

So if I understand correctly, I should currently be able to use... let's say a 4 of 7 address using P2SH right?

I just want to make sure I'm not going to start implementing something that's going to produce transactions that will end up being rejected by the network Smiley
edmundedgar
Sr. Member
****
Offline Offline

Activity: 352
Merit: 250


https://www.realitykeys.com


View Profile WWW
June 18, 2014, 10:15:34 AM
 #5

Thanks for your answers.

So if I understand correctly, I should currently be able to use... let's say a 4 of 7 address using P2SH right?

I just want to make sure I'm not going to start implementing something that's going to produce transactions that will end up being rejected by the network Smiley

Yes, you understand correctly. Implement away...

Make sure to use compressed keys, and watch out for those redeem script size limits if you go higher than 4/7, because since the network doesn't know what's in your redeem script until you try to redeem it, so it'll merrily let you fund a P2SH address that you'll never actually be able to spend...
kolinko
Full Member
***
Offline Offline

Activity: 518
Merit: 101



View Profile
June 23, 2014, 05:58:37 PM
 #6

Ah, we were going through exactly the same problem with our distributed oracles implementation. Ultimately we pushed 8 of 15 through Eligius pool two weeks ago. Still haven't implemented the compressed keys, which should bring the transaction size down - just like Edmund said.

You might want to check our github repo: http://github.com/orisi/orisi to see how it's all being implemented. (and http://orisi.org for details about the project)
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
June 23, 2014, 08:39:18 PM
 #7

Today I've written a small tool which dumps all P2SH addresses from blockchain
Something like this:

Code:
[...]
3CUgLbAQUoJV4Bea3gNUAprcg7rsMeejHN msig  1-of-1 { 1K7eMkbrNjbaiPWZjhKz9Nf5RAc8XvqHC3 }
3FH2jvRApWBaMckuuxJLrB2DwQmcrocMAe msig  1-of-2 { 1BNAjfnBV1y8vAwciekFM8KPxFph5mdzgv, 12rRqgQyw2rShyaTQtoj9FwUaFmuaiU3Pz }
3Hqy8mN46HcMo34z1DYMrXiKjPre181fQm msig  3-of-4 { 1GxLcaoRvhhDQkrntHCvarDkiNxBoyjTcC, 13rjSt92G4KXnmwi9z5zfp6dSieZ2eYeDU, 16GTkGJyQdi2QtLCkYmmYFpg2e82g7eaU8, 16ZMUYtAJF8sN91DHBtPDWSfpEvXvFoSyW }
3E3edFtWarsnztYDgTF5qoETE6WVkEr5Kg msig  5-of-10 { 1Ps6Mso99vgXAvhr6ZstojMhtnpJrCJ1Kt, 1L9jD3c8uU3B7Wx5bpRE2Y4DifgMRNz7Je, 16FPYkAXNTxcVsTWsjvYKMhmN2yXfJKuuQ, 1BnzzPAs35rE6sSFAgqbdUFFVDdZB3zi3s, 1827Jif4vLsoh34AK8RLiLZXCKkhdZUbhp, 1AvuyQ4qQEUA45hRuHyEbHm2ocRMrPKbPG, 1MH2JQazifaYWj7nu7Dy3mJd49oALdbC96, 1DLDdEc2B7E5T7zSdH95g2unKxdnCLwVb1, 1L6u2HEddyZSmZ2zWnAo1xtLkDvp6ZCLX9, 1N7uYBVL6ENAV2Xx1oLPgURZueD9QnDY4Q }
3QFAvLouP3Zpbzmx9pXSHZMfsZ9gq8yaB2 msig  6-of-10 { 1BsV7jWXsEHaAYSwtXPGjzUFN8rKP98ZWT, 1HK4Xdz9X2uX4eXi1DNRwz2keKGc3cJTkj, 15s8akPKrXoVahikp1cGrs48NQV1ygByVi, 1DuGR4aiVN7SWqcp1HXX8AYrH1XPegq7KA, 19oqXpZSd2DPwC81ZVCxhPVvKgSsv1X8x8, 1GtwFQVuP7mrNkEjdSMBvBFGbnBGcTPkUr, 1LVb6dgpyQvmdYc2vfVhW9QjQ92gJ1BQdf, 18TtEFkrho2PPt5a92QzicsW469skxv6Tv, 1HdKKeCNX7heUZ2yQ4W2CQezY6CvWkNmkT, 1NaixJe3Tkjc6Twr2qRUbdSMvp6nJfJaQu }
[...]
kolinko
Full Member
***
Offline Offline

Activity: 518
Merit: 101



View Profile
June 23, 2014, 10:43:58 PM
 #8

Care to share the tool?

By the way, why the interest in more than 2 of 3?
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
June 24, 2014, 06:32:23 AM
 #9

Care to share the tool?
Sorry, not for free.
My wife disallows me to write freeware.
PM me for more details if you want.
kolinko
Full Member
***
Offline Offline

Activity: 518
Merit: 101



View Profile
June 24, 2014, 10:41:09 AM
 #10

> My wife disallows me to write freeware.
> PM me for more details if you want.

And how well is it going so far?

There are various benefits to doing small open source tools. You gain publicity, you can meet other interesting programmers, get involved in cool projects, etc. Saying "I don't share my code for free" is a bit like saying "I don't share my thoughts for free".

I'd argue that you stand to gain far more by sharing small scripts like this, than you could by charging money. You'll be earning thousands of dollars on your scripts, and losing tens of thousands on opportunities you'd get otherwise.
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
June 24, 2014, 10:57:29 AM
 #11

Quote
There are various benefits to doing small open source tools.
Sorry, right now my code is not a "small tool" but piece of big bullshit project.
Yes, it is able to dump all P2SH addresses (~23200..23300) and decode some of them (not all addresses can be decoded)
I need time to separate this from all other code to do a really "small tool". But I do not want to spend time now.
Anyway, you can speak with my wife and tell her about benefits of open-source Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!