Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: cshelswell on September 16, 2013, 05:22:04 AM



Title: High Transaction fees
Post by: cshelswell on September 16, 2013, 05:22:04 AM
Hi - I'm trying to make a website that will allow you to withdraw your BTC funds. I've got the bitcoind running great but I'm a bit confused about transaction fees. I just did a test transaction of 0.0001 BTC to another address of mine and the transaction fee was 0.01552000 which seems really high? Is there a way to a: reduce this b: workout what the fee will be before making the withdrawal?

Thanks for any advice


Title: Re: High Transaction fees
Post by: Kluge on September 16, 2013, 05:27:25 AM
Check the Wiki on transaction fees for the formula.

What you want for low fees:
1) Old (by date) inputs
2) Few inputs (you don't want a bunch of .000005BTC inputs)

There are other rules I can't remember off the top of my head.


Title: Re: High Transaction fees
Post by: gmaxwell on September 16, 2013, 05:31:16 AM
Hi - I'm trying to make a website that will allow you to withdraw your BTC funds. I've got the bitcoind running great but I'm a bit confused about transaction fees. I just did a test transaction of 0.0001 BTC to another address of mine and the transaction fee was 0.01552000 which seems really high? Is there a way to a: reduce this b: workout what the fee will be before making the withdrawal?
This fee would not be possible with the reference software unless you've set your fees per kb higher than 0.0001. ... What did you _set_ your fees to?

The normal procedure for websites that allow withdraw is to simply charge a static withdraw fee which is somewhat higher than your typical one, as exact fees depend on the data size of the transaction, which depends on the denominations of the coins in your wallet at the moment. The worst case size transaction that the reference software will build is 100k, so if your fee is set to 0.0001/kb then the _most_ (in the should never happen, wallet attacked and full of only dust case) would be 0.01 BTC.

With setting your withdraw fee to some small increment above the typical you make a small profit and give users a very regular interface.


Title: Re: High Transaction fees
Post by: cshelswell on September 16, 2013, 05:34:30 AM
Ah ok my bad I didn't realise you had to set the transaction fee. So if i edit my bitcoin.conf and add paytxfee=0.0001 that should be ok?

Cheers


Title: Re: High Transaction fees
Post by: gmaxwell on September 16, 2013, 05:55:11 AM
Ah ok my bad I didn't realise you had to set the transaction fee. So if i edit my bitcoin.conf and add paytxfee=0.0001 that should be ok?
The default is zero, or— if your transaction doesn't meet the network's relay rules as a free txn, which yours wouldn't because you had an output value >0.01— 0.0001.  Are you potentially running really old software?  Either that or you've already got a setting in there for something greater than 0.0001.


Title: Re: High Transaction fees
Post by: cshelswell on September 16, 2013, 06:08:44 AM
I'm on the most up to date I think. This is bitcoind getinfo's output:

Code:
{
    "version" : 80500,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.02038000,
    "blocks" : 258278,
    "timeoffset" : 0,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 112628548.66634709,
    "testnet" : false,
    "keypoololdest" : 1379297610,
    "keypoolsize" : 101,
    "paytxfee" : 0.00010000,
    "errors" : ""
}

I am only doing small transactions as I'm just testing so don't want to risk losing my BTC. I've now set my bitcoin.conf to look like:

Code:
rpcuser=username
rpcpassword=password
rpcallowip=127.0.0.1
rpcport=8332
daemon=1
server=1
gen=0
paytxfee=0

Does that look about right?

Thanks for your help - it's really appreciated


Title: Re: High Transaction fees
Post by: BitKoot on September 16, 2013, 06:48:26 AM
I am only doing small transactions as I'm just testing so don't want to risk losing my BTC. I've now set my bitcoin.conf to look like:

If you want to test something, it might be a good idea to use testnet for this. Testnet bitcoins are easier to mine, and that way you don't have to use real bitcoins to try things out.

You can also use test-net-in-a-box: https://github.com/freewil/bitcoin-testnet-box (https://github.com/freewil/bitcoin-testnet-box). With that you can set up your own little bitcoin network with just 2 nodes. You can mine a couple 1000 bitcoins in a few hours (even with slow hardware).


Title: Re: High Transaction fees
Post by: cshelswell on September 16, 2013, 07:21:46 AM
Awesome thank you for that!! That's a great idea. I'll do exactly that. Thanks again!

Cheers
Chris


Title: Re: High Transaction fees
Post by: Kupsi on September 16, 2013, 01:04:25 PM
Here you can get testnet coins without mining:

http://tpfaucet.appspot.com/
http://testnet.mojocoin.com/


Title: Re: High Transaction fees
Post by: cshelswell on September 16, 2013, 07:07:53 PM
great thanks for that. I managed to get 150 mining in not much time. That should do great for everything I need. Wish it was as easy to get BTC :)