Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: icanscript on May 15, 2015, 12:32:07 PM



Title: max recipients per transaction?
Post by: icanscript on May 15, 2015, 12:32:07 PM
A client wants me to use the sendmany RPC Command.

I am wondering how many recipients there can be in a transaction, or what would be a 'good' number to start splitting transactions up.

Thanks for any help.


Title: Re: max recipients per transaction?
Post by: qwk on May 15, 2015, 12:43:33 PM
I am wondering how many recipients there can be in a transaction, or what would be a 'good' number to start splitting transactions up.

The total size of the transaction must be less than 100,000 bytes or it will not be relayed across the network or included in blocks.

There COULD be a miner that is mining >100K transactions, but I don't think there is; if there is such a miner or you mine the transaction yourself then the limit would be the 1,000,000 byte blocksize limit.

You would probably want to create much smaller transactions than max block size, though ;)


Title: Re: max recipients per transaction?
Post by: cakir on May 15, 2015, 12:54:30 PM
If you check the tx's from qt it shows you something like that;
"txid-000" that means first output's id is 0,
if you send to two different address then second one will look like "txid-001"
Theorically you can send 1000 different addresses. (don't forget there'll be a change address so it's 999)

Also 1 block's max size is 1 MB so your tx should be under that. In general 1 tx is 226 byte, if you send to 1000 different addresses; it'll be around 226 kb.
 


Title: Re: max recipients per transaction?
Post by: icanscript on May 15, 2015, 03:27:11 PM
Thank you very much for both your answers.

Very Helpful.


Title: Re: max recipients per transaction?
Post by: amaclin on May 15, 2015, 04:34:13 PM
As far as I know, the largest confirmed transaction in bitcoin mainnet is
https://blockchain.info/tx/e951e79d2140b1844d5058bd0f609e3939b040132a1d920ec89c55a2392ef83f
Size = 182160 bytes, Outputs = 5353

Of course, you should not create larger than 100 kb.

In general 1 tx is 226 byte, if you send to 1000 different addresses; it'll be around 226 kb.
No.
One output is 34 bytes long.
So, the transaction with 1000 outputs will be sligtly bigger than 34kb