How to fix “Transaction too large” error when sending coins from wallet
When transferring large amount of coins from your wallet to exchange have you ever received this error? Transaction creation failed! Transaction too large.
Recently on our forum one of our users came with the following question:
“I have more than 1000 small transactions in my wallet that adds up a little over 0.8 Bitcoin. I’m trying to send all of the coins to Binance but I keep getting this error: “Transaction too large”. I even tried to set a large custom transaction fee but still unable to send the coins. I am using the latest version Bitcoin core wallet.”
First of all this is not a bug and this error is not specific to Bitcoin core wallet. This problem can be seen with almost any coins and with any wallet types.
So why your wallet gives error message stating transaction too large and how do you send large amounts from the wallet? The following guide will help you to understand and fix this error.
Transaction too large (in bytes) – What it means?
Transaction too large simply means the transaction is too big to fit in a block. This usually occurs when your wallet combines a large number of inputs into one transaction. This is not a matter of fees, but the size of your transaction. Whether you send or receive coins; every transaction that takes place on the blockchain has a size associated with it. To learn more check this article about Bitcoin mempool size.
For your transaction to be added to the blockchain it needs to be included in a newly mined block. For every block there is a limit on maximum size of data that it can contain and it depends from coin to coin. So essentially when there are more outputs involved in a transaction the transaction size becomes larger in bytes. Hence the wallet reject your transaction with error message “Transaction too large”.
But how did your wallet ended up having so many transaction in the first place?
Wallet contains too many transactions
Are you mining coins on the daily basis? Is your wallet unlocked for stacking? Are you running a masternode? Whether you are mining, stacking or receiving masternode rewards then chances are; your wallet contains too many transactions. It can be 100s or even thousands of tiny transactions which you attained over a period of time.
To understand this better; imagine that you are getting paid $1 in cash every day. Now after accumulating a large chunk you wish to spend them let’s say $1000. Do you think someone will be accepting 1000 $1 coins? You basically have to take them to a bank and swap it for bigger notes before you can spend them.
Likewise the balance that you see in your wallet are not stored as one total amount but as a collection of outputs.
If your wallet received lots of small payments then you cannot send all of them once in a single transaction. Trying to fit all of the outputs takes up too much space and as we said only so many inputs can fit in a single transaction. So what is the solution?
Solution for transaction too large error
There are two ways in which you can go through this error.
Fix 1: Consolidate transactions
Too many inputs won’t fit in a single transaction. So what you need to do is merge all the tiny inputs into few larger ones before sending them to the actual destination address.
So how do you consolidate inputs?
Open your core wallet. Go to settings >> options and then navigate to wallet tab. Now enable coin control features and then restart your wallet. If you are using electrum wallet then navigate to View >> Show coins and click on coins tab.
Once your wallet is opened go to send and click on inputs. Now select all inputs and send it to a new receiving address that you own. If you get transaction too large error then consolidate fewer inputs and send them.
Once you’ve consolidated all the tiny transactions into fewer large ones you can then send them to your exchange address.
Note: When consolidating inputs there is a transaction fee involved but that is negligible. If the fee still concerns you then try sending multiple transaction directly to your exchange address with smaller values. It will get successfully accepted by the network.
Fix 2: Pick the inputs yourself
Most wallet clients chooses inputs automatically when sending coins and it does the optimal selection. But sometimes you still end up getting transaction too large error.
Instead of allowing your wallet to choose inputs you pick the inputs yourself using coin control features. This is useful especially if you are sending specific amounts.
So how do you avoid this error in future?
Receive bigger payouts
The problem is your wallet receiving so many tiny transactions. There are certain ways to avoid this. If you are mining then set a payment value as high as possible. There are mining pools that allows you to set the payment amount.
If you are running masternodes or if you are receiving rewards through stacking then it can’t be helped. Your wallet will still receive large amount of transactions regularly. So from time to time open your wallet, sync it and consolidate smaller inputs yourself for future use.
There is also something called wallet groomer that does this automatically. However this is for advanced users and we’ll explain this in another tutorial.