Bitcoin Forum
May 08, 2024, 06:51:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: (solved) bitcoind settxfee() not taking effect?  (Read 3814 times)
SuperP (OP)
Sr. Member
****
Offline Offline

Activity: 658
Merit: 250



View Profile
November 13, 2012, 02:57:40 PM
Last edit: November 13, 2012, 03:12:27 PM by SuperP
 #1

I'm trying to set lower fees to 1 microbit (0.00000100) in bitcoind, but the change doesn't seem to be affecting transactions.  I used settxfee through the json rpc, and  and it returned True, and then getinfo() returns this:

Code:
{'testnet': False, 'version': 79900, 'walletversion': 60000, 'difficulty': Decimal('3368767.14053294'), 'protocolversion': 60002, 'connections': 18, 'proxy': '', 'balance': Decimal('0.15380000'), 'keypoolsize': 101, 'unlocked_until': 0, 'errors': '', 'paytxfee': Decimal('0.00000100'), 'keypoololdest': 1351653458, 'blocks': 207763}

I tried manually setting the fee in bitcoin.conf, but it already read

Code:
 # Pay an optional transaction fee every time you send bitcoins.  Transactions with fees
 # are more likely than free transactions to be included in generated blocks, so may
 # be validated sooner.
 paytxfee=0.000001

I tried restarting bitcoind and rebooting.

Here's a sample transaction I just tried with the lower fee: https://blockchain.info/tx/7afdd2eb4f8b8288a46e1606ef5bc1153df4eb8be3b54e8d189609f19de08349

It still shows a 0.0005 btc fee and it was taken from the address balance.  What's going on here?
1715151108
Hero Member
*
Offline Offline

Posts: 1715151108

View Profile Personal Message (Offline)

Ignore
1715151108
Reply with quote  #2

1715151108
Report to moderator
1715151108
Hero Member
*
Offline Offline

Posts: 1715151108

View Profile Personal Message (Offline)

Ignore
1715151108
Reply with quote  #2

1715151108
Report to moderator
1715151108
Hero Member
*
Offline Offline

Posts: 1715151108

View Profile Personal Message (Offline)

Ignore
1715151108
Reply with quote  #2

1715151108
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715151108
Hero Member
*
Offline Offline

Posts: 1715151108

View Profile Personal Message (Offline)

Ignore
1715151108
Reply with quote  #2

1715151108
Report to moderator
1715151108
Hero Member
*
Offline Offline

Posts: 1715151108

View Profile Personal Message (Offline)

Ignore
1715151108
Reply with quote  #2

1715151108
Report to moderator
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 13, 2012, 03:02:13 PM
Last edit: November 13, 2012, 03:12:23 PM by DeathAndTaxes
 #2

There are two types of fees in Bitcoin.

a) optional fees (which settxfee specifies) which can be used to make the tx higher priority.  A fee of 0.000001 BTC is essentially worthless you might as well leave it 0, no miner is going to give your tx a higher priority when it would take one million such tx to earn a single Bitcoin. Wink

b) mandatory fees.  if the tx is low priority (due to size or age) you MUST pay the min mandatory fee.  If you don't (i.e. modifying the client) then compliant nodes will refuse to forward your tx considering it spam.   This mandatory fee isn't intended to produce revenue, it is intended to protect the network from spam and DOS attacks.

https://en.bitcoin.it/wiki/Transaction_fees#Rules_for_calculating_minimum_fees

The simple rule of thumb on min tx fee is "one bitcoin day".  If you receive 1 BTC and wait 1 day before spending it then you can send it for free (or whatever you have specified as an optional fee).  If you receive 20 BTC you would need to wait 1/20th of a day (~8 blocks) before you can send it for free.  Note the amount you are spending doesn't matter.  What matters is the AGE and VALUE of the input.

bitcoind settxfee & the conf paytxfee both set the optional fee (can be set to zero).  You can't override the mandatory low priority fee in the default client without modifying it at the source code level.  WARNING: modifying the spam prevent rules in the source code can result in your tx getting "stuck" and rejected by miners and compliant nodes.

Here's a sample transaction I just tried with the lower fee: https://blockchain.info/tx/7afdd2eb4f8b8288a46e1606ef5bc1153df4eb8be3b54e8d189609f19de08349

It still shows a 0.0005 btc fee and it was taken from the address balance.  What's going on here?

Your transaction is low priority and thus is required to pay the min mandatory fee of 0.0005 REGARDLESS of what you specify as an optional fee.  If your tx was high priority (larger than one bitcoin day in coin age) then there would eb no min mandatory fee and your optional fee (even 0.0 BTC) would apply.

As above the rule of thumb is "1 bitcoin day" in coin age for the input but lets calculate the actual priority.

priority = sum(input_value_in_base_units * input_age)/size_in_bytes
priority = (5779899 * 78 ) / 278
priority = 1621698.281

The treshold for high priority is priority =  57,600,000
1,621,698.281 <  57,600,000 therefore tx is low priority and must pay the min mandatory fee to protect the network.   If you modified the client source code you could remove this restriction however each node and miner will also recalculate priority and they will see the tx as invalid (low priority without required min fee).
SuperP (OP)
Sr. Member
****
Offline Offline

Activity: 658
Merit: 250



View Profile
November 13, 2012, 03:11:23 PM
 #3

Thank you!  I had read the wiki page on transaction fees, but didn't realize the base fee per low priority transactions couldn't be changed.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!