Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: CalvinHobbes on May 31, 2017, 12:04:38 AM



Title: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: CalvinHobbes on May 31, 2017, 12:04:38 AM
I'm about to transfer my BTC to a hardware wallet, but Bitcoin-Core is telling me that my transaction size is 17.7kB and therefore the recommended normal transaction fee it's advising me is 0.048 BTC ($105 USD).

This came as a bit of a shock to me, especially since I read that the average transaction size is about 200-300bytes, and I did a little more reading. I'm beginning to suspect that my transaction size is so large due to a small amount of mining I did a few years back. When I look at my wallet transactions, the vast majority of those small transactions (a little more than 100 in all) show as "offline" (as opposed to confirmed).

  • Is my assumption correct that all those same small offline transactions are what's causing my transaction size to be so large?
  • Why exactly would those transactions show as offline, if my bitcoin-core wallet is is currently up to sync?  Is it become they are "unspent outputs"?
  • I believe the only way to consolidate these is to pay the fee and transfer to another wallet/address, is that correct?
  • If so I have no other options, what would be the smallest safe amount to set as a transaction fee, if I don't mind waiting a few days?  Would it be 151satoshies per byte (x 18,000bytes = 0.02718 BTC / $59 USD), if I'm reading this correctly https://bitcoinfees.21.co/#delay ?  Or could I go even smaller than that and still be safe?  

Thanks!
CH

PS.  One of the posts I got some of my assumptions from:  https://bitcointalk.org/index.php?topic=1773352.0


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: franky1 on May 31, 2017, 01:06:38 AM
why not just back up your wallet to a usb key and only use the funds when you really need them

there is no need to move funds on chain just to move them off your computer.



also the average unspend output is 148 bytes when used as an input.

so looking at the fee's of 330sat/byte
=0.00048840 per unspent

only look at the unspents that are way MORE than 0.00048840.
anything below that is just adding data bloat to a tx but not getting any 'returns'/change from having them there after fee
so no point including them as part of the tx

EG - analogy
imagine a penny weight 2.5grams..
imagine a 5pence piece weight 2grams..

but it costs 1penny to deliver 2.5grams

posting 100 penny's costs you 250grams or £1 postage..    giving you nothing in return.. you spent the contents on the postage of the contents

but if you post 5pence pieces of 2grams
you can post 5x 5pence pieces(10gram) and only pay 4penny fee  .. giving you 21pence change.

its about being smart with what you send.. sifting through your coins and dont include the small dust(coin/unspents) amounts that are less than the fee to send the dust..

but, with that said still easier to just back up the privatekey/seed on multiple devices and then you dont have to spend them onchain.



Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: pooya87 on May 31, 2017, 04:17:10 AM
~also the average unspend output is 148 bytes when used as an input.
~

only if he was mining after 2012 (release of bitcoin core v 0.6) and also was mining to an address with compressed private key. otherwise it is going to be ~179 bytes.
=59,070 sat per unspent


adding 150-180 s/b can get a confirmation within reasonable time or it can take weeks. you can also try ViaBtc accelerator with much less fee (10+ s/b) but it is crowded these days and it is tough to submit a tx there.
https://www.viabtc.com/tools/txaccelerator/

remember to mark your transaction to be replaceable by fee (RBF) so you can bump the fee if it was unsuccessful.


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: Wandering Soul~ on May 31, 2017, 06:53:49 AM
Since you have that many unspent outputs . Viabtc seems the only good option for you . The minimum fee for it is only 10K sats but for courtesy you shouldn't just pay exactly 10K sats considering that your transaction size is too big Everything about the fee was explained on the guy below me  ;D . Just make sure that your transaction has no unconfirmed parent, dust outputs any involvement on double spending cause they don't accept it .

To Avoid dust outputs, Use coin control in bitcoin core . Read this: https://bitcointalk.org/index.php?topic=144331.0

~Snip~
you can also try ViaBtc accelerator with much less fee (10+ s/b) but it is crowded these days and it is tough to submit a tx there.
https://www.viabtc.com/tools/txaccelerator/

remember to mark your transaction to be replaceable by fee (RBF) so you can bump the fee if it was unsuccessful.
OP should enter the TX at XX:00:00 or a minute after that . Alternatively, He can also post The TXID here so we can help him .

Worry not as you can do a full rbf on bitcoin core:

Bitcoin Core

Bitcoin Core makes making Full RBF transactions very easy. Simply go to the transactions list, right click the transaction that is stuck, and choose the "Abandon Transaction" option.

If that option is greyed out, then you must go to the Bitcoin Core datadir and delete the mempool.dat file. Then restart Bitcoin Core with the -walletbroadcast=0 option and then you should be able to use "Abandon Transaction".

If the above two options fail for some reason, then you can start Bitcoin Core with the -zapwallettxes option to clear all unconfirmed transactions from your wallet.

Once the transaction is either Abandoned or cleared from the wallet, you can simply go to the Send tab and send the Bitcoin again but make sure that you include a sufficient transaction fee.



Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: HCP on May 31, 2017, 10:38:57 AM
Since you have that many unspent outputs . Viabtc seems the only good option for you . The minimum fee for it is only 10K sats but for courtesy you shouldn't just pay exactly 10K sats
This is wrong... the minimum fee is 10k sats PER KILOBYTE aka 10 sats/byte...

If you have a 17.7kb transaction and try and put a fee of 10K sats... your effective fee is 0.565 sats/byte... (10,000 / 17,700) :o Even if the network accepts your transaction, ViaBTC will not accelerate it, as it doesn't meet the minimum fee requirement.

To meet the minimum requirement, you'd need to include a fee of at least 177,000 sats... safer to go more in case your transaction is actually slightly larger than 17.7 kb and the numbers are being rounded ;)


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: DannyHamilton on May 31, 2017, 01:14:09 PM
You have a few options some of which have been laid out for you here in this thread.  You may even be able to use multiple options together to reduce your costs.

You could use the "coin control" feature of Bitcoin Core and ONLY send the high value outputs.  Leave all the very low value dust (the outputs that are worth less than it will cost to send them) sitting in the wallet to be moved some day in the future if the costs ever come back down.

You could pay lower than the recommended fee-per-byte and wait longer for confirmations.

You could use the ViaBTC transaction accelerator to get the transaction confirmed even if you pay too low of a fee for it to normally be confirmed.

Depending on how large your transaction is, you also may be able to pay no fee at all, and then pay someone separately to get the transaction confirmed for you.



My suggestion would be to start by turning on the "Coin Control" features of Bitcoin Core if you haven't already.
(Under the "Wallet" tab in "Preferences")

Next click the "Inputs" button in the "Send" tab of Bitcoin Core.

In the "Transaction Fee section, choose "Custom", and "per kilobyte".  Enter 0.00010001 BTC in the fee text box.

As you choose each unspent output from the list, take note of how many bytes it adds to the transaction (subtract the previous total bytes from the new total bytes).  Multiple the number of added bytes by 10 satoshis (0.00000010 BTC). If the value of the output is less than or equl to that result, then remove the checkmark and move on to the next available value.

After you have chosen all the inputs that provide more than 10 satoshis per byte in value, take note of how much is listed in the Amount, Fee, and After Fee fields.  "Amount" is the total amount that the transaction will remove from your wallet.  "Fee" is the total fee you will pay.  "After fee" is the amount that will arrive at your new wallet.

If you are happy that you have emptied sufficient value out of your wallet then click the "Ok" button on the Coin Control window and fill out the rest of the transaction using the "After Fee" amount as the "Amount" that you are sending to your new wallet, then you can could send the transaction and then use the ViaBTC accelerator to get the transaction confirmed.

Note, that if the total fee is greater than 0.0194 BTC, you have a second option. In that case, contact me. I have already pre-paid ViaBTC for 5 transaction accelerations.  Paid accelerations don't require a fee of at least 10 satoshis-per-byte.  I'd be happy to help you out and use one of my paid accelerations on your behalf.  I'd just ask that you reimburse me the 0.0194 BTC that it would cost me.  You could add me as a second recipient in the same transaction. You could then try sending the transaction with no fee at all, or perhaps just click the "total at least" checkbox and enter a fee of 0.00001 BTC.

There is some risk with this alternate option that peer-nodes on the network will refuse to relay your transaction due to the low (or missing) fee.  If that happens, then ViaBTC might not be aware of the transaction and therefore unable to accelerate it.  In that case, you'd want to abandon the transaction in Bitcoin Core, and replace it with a transaction that pays a high enough fee (in otherwords, go back to the original higher fee option since this cheaper option won't work).


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: CalvinHobbes on May 31, 2017, 10:54:46 PM
Thank you so much for your insights and advice on this and also thank you Danny for those step by step points, truly appreciated.  I'm currently on the road, but will be going over this info in depth within the next day or two and report back!

CH


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: CalvinHobbes on June 01, 2017, 06:28:10 PM

My suggestion would be to start by turning on the "Coin Control" features of Bitcoin Core if you haven't already.
(Under the "Wallet" tab in "Preferences")

Next click the "Inputs" button in the "Send" tab of Bitcoin Core.


I wasn't aware of this function!  Turned it on and here's what I'm basically seeing:

  • The vast majority of my holdings can be transferred at a reasonable fee of 0.0045 BTC (at the wallet recommended 0.0026 BTC/kB), at a transaction size of 1.7kB, as there are only 11 outputs
  • I have less than 2 BTC in two addresses that together comprise of 109 outputs; with a transaction size of 16.2kB, the fee would be 0.0433 BTC.
  • The smallest transaction is 0.0010 BTC. I do not have any dusty outputs.

So clearly, moving everything to my hardware wallet, with the exception of those 2 BTC (for now), won't be an issue in terms of fees.

For the 2BTC in those multiple outputs, is my best bet still paying with the minimum fee and then accelerating with viaBTC, in view of the above details I just shared, if I want to absolutely move them now?  

I think I read that I could sweep these in a new wallet, but that it would make no difference in terms of getting hit with large transaction size/fees once I'm ready to move/spend them (regardless if its a local wallet, online wallet/exchange, etc), is that correct?

One last thing I'm considering is leaving those 2BTC in my wallet as someone recommended in this thread and hoping that there are more reasonable alternatives in the future.



Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: DannyHamilton on June 01, 2017, 06:54:13 PM
For the 2BTC in those multiple outputs, is my best bet still paying with the minimum fee and then accelerating with viaBTC, in view of the above details I just shared, if I want to absolutely move them now?  

Yes,

If you are willing to deal with the inconvenience of trying to use the ViaBTC accelerator, then you can probably get that transaction confirmed with a fee as little as 0.00163 BTC.

I think I read that I could sweep these in a new wallet, but that it would make no difference in terms of getting hit with large transaction size/fees once I'm ready to move/spend them (regardless if its a local wallet, online wallet/exchange, etc), is that correct?

That depends on how you get them into the new wallet.

If you import the private keys, then you'll have to pay the transaction fee later when you use the funds, AND you'll lose some of the benefits that led you to chose a hardware wallet in the first place (such as only needing to backup the seed once, or having all your keys permanently offline).

If you sweep the funds, then you just using an automated process that creates a transaction with all those inputs and would need to pay the fee now.

One last thing I'm considering is leaving those 2BTC in my wallet as someone recommended in this thread and hoping that there are more reasonable alternatives in the future.

The future is difficult to predict.  It is possible that fees (relative to the amount of bitcoins you have) will be smaller in the future, and waiting could be a good solution.  It is also possible that fees will be higher in the future, and you could be left wishing you had consolidated the inputs while it was still cheap to do so.


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: CalvinHobbes on June 01, 2017, 07:53:09 PM
\
Yes,

If you are willing to deal with the inconvenience of trying to use the ViaBTC accelerator, then you can probably get that transaction confirmed with a fee as little as 0.00163 BTC.


Ok, so it does appear I misunderstood... I definitely don't mind using viaBTC if it allows me to transfer those couple of BTCs for as little as 0.00163 BTC.  :)

Is it just a matter of choosing the option to "pay only the required fee of 0.00001 BTC/kB" in bitcoin-core and then going to www.viabtc.com/tools/txaccelerator/ (after signing up) and accelerating the transaction by specifying a total fee of 0.00163 BTC or higher?

CH

PS.  Thanks for also clarifying the import vs sweep difference in terms of fees.


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: DannyHamilton on June 01, 2017, 09:06:52 PM
Ok, so it does appear I misunderstood... I definitely don't mind using viaBTC if it allows me to transfer those couple of BTCs for as little as 0.00163 BTC.  :)

Is it just a matter of choosing the option to "pay only the required fee of 0.00001 BTC/kB" in bitcoin-core

You said the transaction size is 16.2kB, right?

To use the free ViaBTC acceleration service, they require that you pay a fee of at least 0.0001 BTC per kilobyte.  I suggest adding in an extra 0.00000001 BTC per kilobyte just to avoid any rounding discrepancies.

In the "Transaction Fee section, choose "Custom", and "per kilobyte".  Enter 0.00010001 BTC in the fee text box.

0.00010001 BTC per kilobyte X 16.2 kB = 0.001620162 BTC total fee calculated by your Bitcoin Core wallet.

and then going to www.viabtc.com/tools/txaccelerator/ (after signing up) and accelerating the transaction by specifying a total fee of 0.00163 BTC or higher?

There is no need to sign up if you want to use their free acceleration service.  You just need to click the "x" in the top right corner of their public service announcement (or propaganda depending on which side of the SegWit vs. Emergent Consensus argument you prefer).  Then enter the transaction_ID of your transaction and prove that you aren't an automated process by solving the Captcha puzzle.

The issue you'll run into is that they only allow a total of 100 free accelerations per hour.  They seem to reset that 100 count at the top of every hour, but the service is popular so if you wait too long into the hour you'll get a message indicating "Submissions are beyond limit. Please try later".  It is best to try within the first minute or so of the hour.  Since your clock may not be perfectly in sync with theirs, you may want to start trying a minute or two before the top of the hour and try every 15 seconds or so until you either succeed or it is a few minutes into the new hour.  If you are a few minutes into the new hour and haven't succeeded yet, then you'll probably need to wait an hour and try again.  They don't seem to have a limit to the number of times you can try.

If you are successful, you'll get a message, "Acceleration Succeeded".  Once you see that message you no longer need to try to submit the transaction ID.  Your transaction will be confirmed in the next block that the ViaBTC pool solves.  They will receive the 0.001620162 BTC fee that your wallet created when it created the transaction, so there is no need to pay them separately. They typically solve a few blocks per day, so you shouldn't need to wait more than 24 hours for a confirmation once you succeed in submitting it.

Once your transaction is confirmed, all those small outputs will have been combined into a new single output. Therefore, the next time you try to use those bitcoins, you will no longer have the excessively large fee (as compared to the rest of your bitcoins).

Be aware that by using this service, you are taking advantage of the generosity and charity of ViaBTC.  This is a free service they provide to the community for when users accidentally pay too low of a fee and want to get their transaction confirmed.  By using the service intentionally you are taking an acceleration slot that someone else could have used.  ViaBTC is agreeing to include your transaction instead of a transaction that pays a higher fee-per-byte.  As such, they are choosing to reduce their revenue to provide this service.

On the other hand, they are also providing this service to take advantage of those that don't understand how bitcoin works and as a result pay too low of a fee.  By offering this service, they drive Bitcoin users to their website where they put up a message that encourages these less knowledgeable users to take a stand against the developers that support SegWit.

With that knowledge, you'll have to decide for yourself how you feel about using the acceleration service.


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: HCP on June 01, 2017, 09:51:46 PM
Just to add to what Danny has already covered... you'll probably find that the peers will reject your transaction if you use the "pay only required fee" option is used. That effectively sets a fee of 1 satoshi/byte. :o  Additionally this means that you won't be able to use the accelerator, as their min fee is 10 satoshis/byte.

So don't set the per kilobyte value to anything less than "0.00010000" BTC. Recently, I did something similar and I ended up having to use "custom" -> "per kilobyte" -> "0.00040000 BTC" before my transaction was actually accepted by the network. Not entirely sure why that was... ??? Guess the peers I'm connected to have jacked up the minimum relay fee?

But use "custom" -> "per kilobyte" -> and enter your "fee in BTC/kb". You will be able to see the "total" fee being used displayed at the top in the "coin control" section. Do the math and make sure that the total Fee/Size > 0.00000010 BTC!!

You also need to make sure that you are not using any unconfirmed outputs and you are not generating any dust outputs. I'd recommend putting the Full amount available in the send amount box and ticking the "subtract fee from amount" and making sure that the "change" value at the top is 0.00000000. Otherwise, you might end up creating a dust amount of change which ViaBTC will reject.

I think Danny has covered the rest of ViaBTC quite well ;)


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: cyyap95 on June 02, 2017, 01:56:11 AM
If you tried all the above suggestions, or you think it's hard to follow through them, you may as well as consider my paid service,
for transaction with huge bytes like yours I can provide a much lower charge, at least a few times lower than paying the TX fee.
(We don't have minimum requirement about fees, I've successfully pushed TX with 0 fees)

https://bitcointalk.org/index.php?topic=1934749

====
I'm not force selling here, but just provide you another option, as I have customer satisfied for avoiding hassle with affordable price.


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: CalvinHobbes on June 02, 2017, 05:10:05 PM

In the "Transaction Fee section, choose "Custom", and "per kilobyte".  Enter 0.00010001 BTC in the fee text box.

0.00010001 BTC per kilobyte X 16.2 kB = 0.001620162 BTC total fee calculated by your Bitcoin Core wallet.



I entered 0.00010001 BTC/kB as a custom fee and then went to viaBTC to accelerate it.  As you said, I got the "Submissions are beyond limit.  Please try later" message, as it was 15 minutes past the hour.  I was going to try again on the next hour, but ended up stepping out for a few hours... and when I got back, I noticed the transaction ended up getting my first confirmation only 50 minutes after being sent, so I didn't have to take advantage of any acceleration services, at least this particular time.  Transaction fee was only 10.041 sat/B (0.00161776 BTC as you calculated for the 16kB transaction size).

Thank you so much for taking the time to help out and post all of those details!  (PM'ing you to find out how I can send you a beer tip!)

Also a big thanks to everyone else who posted, really great community.  :)

CH


Title: Re: Large transaction size/fee. Due to multiple small transactions? Any options?
Post by: DannyHamilton on June 02, 2017, 05:36:28 PM
(PM'ing you to find out how I can send you a beer tip!)

Also a big thanks to everyone else who posted, really great community.  :)

Don't send a tip.

Instead, become a great part of this great community.

I, and everyone else, will benefit much more if you acquire bitcoins, use bitcoins, and help others to do the same.