Author

Topic: Problem with sending many transactions (Read 615 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
February 01, 2017, 12:32:33 AM
#4
May you tell me, which options should I use? On the wiki (https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments) I've found only spendzeroconfchange, but this option is default set as 1, so it shouldn't be a problem.
The options are a little hidden because they are technically debug options (i.e. you really shouldn't be using this in production). There are two options you need to set, -limitancestorcount= and -limitdescendantcount= where is the maximum number of unconfirmed transactions in a chain that you want. If your transactions are large or you are making large chains, you will also need to set -limitdescendantsize= and -limitancestorsize== where is the maximum total size of unconfirmed transactions in chain that you want.
newbie
Activity: 2
Merit: 0
February 01, 2017, 12:21:57 AM
#3
Thank you for the response Smiley

Quote
This happens because you are creating long chains of unconfirmed transactions. When you send a transaction, you create a change output for the change. When you send another one before the first confirms, you are spending from that change output. And so on and so forth. Bitcoin Core will not accept any transactions which are in a chain of 25 or more unconfirmed transactions. You will need to change some options to increase that limit.

May you tell me, which options should I use? On the wiki (https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments) I've found only spendzeroconfchange, but this option is default set as 1, so it shouldn't be a problem.


Quote
That is interesting. It probably has to do with the transactions getting rejected. This may be a bug.

Ok, I'll try to report this on the bitcoin's github page.
staff
Activity: 3458
Merit: 6793
Just writing some code
January 31, 2017, 08:56:01 AM
#2
Hello everyone Smiley
I've got a problem with sending transactions from my wallet, I'd like to ask you if there is any solution for that.
I'm running a bitcoin service, where users can deposit and withdraw funds.

To make a withdrawal I use sendtoaddress RPC method.
The problem is that sometimes (mainly when I'm trying to process more than 10 withdrwalas one after another), wallet is throwing an error:
"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
(Wallet will send the transaction after some time despite the error)
This happens because you are creating long chains of unconfirmed transactions. When you send a transaction, you create a change output for the change. When you send another one before the first confirms, you are spending from that change output. And so on and so forth. Bitcoin Core will not accept any transactions which are in a chain of 25 or more unconfirmed transactions. You will need to change some options to increase that limit.

After the error occurs, wallet stops tracking the rest of bitcoins it had.

Example:
I have 100 BTC on the wallet (which came to me in one TX).
I start sending, withdrawals are proceeding one after another.
Then, at some moment, the error occurs.
I've already transferred 10 BTCs, but the wallet balance is now 0.
Sometimes when transactions that are already sent receive confirmations, the wallet brings the "lost" amount back (I think that at this time the amount is "frozen" in unconfirmed TXs), but from time to time amount shows up only after a rescan command.
That is interesting. It probably has to do with the transactions getting rejected. This may be a bug.
newbie
Activity: 2
Merit: 0
January 31, 2017, 04:14:45 AM
#1
Hello everyone Smiley
I've got a problem with sending transactions from my wallet, I'd like to ask you if there is any solution for that.
I'm running a bitcoin service, where users can deposit and withdraw funds.

To make a withdrawal I use sendtoaddress RPC method.
The problem is that sometimes (mainly when I'm trying to process more than 10 withdrwalas one after another), wallet is throwing an error:
"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
(Wallet will send the transaction after some time despite the error)

After the error occurs, wallet stops tracking the rest of bitcoins it had.

Example:
I have 100 BTC on the wallet (which came to me in one TX).
I start sending, withdrawals are proceeding one after another.
Then, at some moment, the error occurs.
I've already transferred 10 BTCs, but the wallet balance is now 0.
Sometimes when transactions that are already sent receive confirmations, the wallet brings the "lost" amount back (I think that at this time the amount is "frozen" in unconfirmed TXs), but from time to time amount shows up only after a rescan command.

I'm currently using Bitcoin Core v. 1.12.1.

Am I doing something wrong? Is there any solution for transaction rejeted error? Is there any way to prevent "losing" balance?

I have done some research about that and I didn't found any useful informations.

Thank you in advance Smiley
Jump to: