Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: martok on May 31, 2011, 10:38:41 PM



Title: sendmany limits
Post by: martok on May 31, 2011, 10:38:41 PM
Hi,
My payout script generated a parse error on around 30 transactions in a sendmany call. All amounts were >= 1 BTC. So I manually had the script process one transaction at a time, still using sendmany and it worked though with many more transactions.

Is there a limit on sendmany recipients or perhaps the size of an RPC payload to bitcoind?


Title: Re: sendmany limits
Post by: arsenische on January 09, 2012, 07:11:58 PM
I couldn't find information about it either. Didn't notice any explicit limitations in Value sendmany(const Array& params, bool fHelp) function either. Is it supposed to work with any size of params[1]?


Title: Re: sendmany limits
Post by: Gavin Andresen on January 10, 2012, 06:53:20 PM
Are you communicating via JSON-RPC or by command-line (bitcoind sendmany ....) ?

There shouldn't be any limits if you're talking directly via JSON-RPC, but if you're calling it via the command-line then sh and bash and whatever Windows uses to launch processes all have length limits.


Title: Re: sendmany limits
Post by: arsenische on January 10, 2012, 08:10:19 PM
Are you communicating via JSON-RPC or by command-line (bitcoind sendmany ....) ?

There shouldn't be any limits if you're talking directly via JSON-RPC, but if you're calling it via the command-line then sh and bash and whatever Windows uses to launch processes all have length limits.


Thanks for your answer, Gavin.

I am communicating via JSON-RPC. So the only problem for me could be the increased fee if the transaction has many recipients. Btw, is there an easy & reliable way to estimate the upper bound of transaction fee for sendmany (given the number of recipients)?


Title: Re: sendmany limits
Post by: gmaxwell on January 10, 2012, 08:37:47 PM
I am communicating via JSON-RPC. So the only problem for me could be the increased fee if the transaction has many recipients. Btw, is there an easy & reliable way to estimate the upper bound of transaction fee for sendmany (given the number of recipients)?

I believe in current code the upper bound on the fee with default settings is 0.05 BTC— above that the transaction would have to be bigger then the client is willing to generate. (it would take a great number of ins/outs to hit that but I'm not sure how many— but since it depends on inputs too it's hard to give you a simple function)


Title: Re: sendmany limits
Post by: arsenische on January 10, 2012, 09:50:02 PM
I believe in current code the upper bound on the fee with default settings is 0.05 BTC— above that the transaction would have to be bigger then the client is willing to generate. (it would take a great number of ins/outs to hit that but I'm not sure how many— but since it depends on inputs too it's hard to give you a simple function)

Thanks for your answer, gmaxwell. I've read about 0.05BTC limitation on wiki faq, but I am not sure if this info is reliable and up to date.

Anyway, this logic seems mysterious to me. Even though Gavin said there should not be any limits, I assume there is some implicit limitation for amount of outputs (which could come from limitation on block size, or transaction size, or fee, or willingness of bitcoin software to generate the transaction).

I am curious if combining many send transactions into a single sendmany is always a preferable way of sending out money to many recipients, or if there is some point at which we should split the transaction into several sendmany transactions. If there is such a point, then how many recipients should be in each transaction? :)


Title: Re: sendmany limits
Post by: arsenische on July 20, 2012, 12:05:20 PM
or by command-line (bitcoind sendmany ....) ?

how would one formulate such a command exactly? i'm trying to follow this api calls list (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) but i keep getting a message box that says Type Mismatch.


Here is a real example for ubuntu:

Code:
./bitcoind sendmany anonymousads "{\"1999hiP3Duobup1pXNQ8S8xosHzcZfU47U\":1,\"1FWDAHaa13Nfa9U9dXBo8JvCVv754JCoZx\":0.1}"

Here is the one for windows:

Code:
bitcoind sendmany "" {"""1ELvnrA6PhUyDBS6iR25K1Xx4xXL6VMfJX""":1,"""1NX3R5Le4c1y9E316NPMze7aEmCXjpCY58""":0.75}
(from https://bitcointalk.org/index.php?topic=54879.0)


Title: Re: sendmany limits
Post by: arsenische on July 20, 2012, 12:40:09 PM
sorry, I don't have a windows version. Grue said that line worked for him, you could ask for details in his thread: https://bitcointalk.org/index.php?topic=54879.0