Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: chameleon123 on December 11, 2018, 06:47:51 AM



Title: Fee estimation failed. Fallbackfee is disabled....
Post by: chameleon123 on December 11, 2018, 06:47:51 AM
Hello
Recently I forked bitcoin and changed difficulty of PoW for some tests.Each node mines coins properly but when I want to send some coins from one to the other using bitcoin-qt, in transaction fee section I choose "recommended" option, and by the time I want to send them I get this error :

"Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee"

Does anyone know what should I do ?



Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: Pmalek on December 11, 2018, 11:50:59 AM
I am not sure why you are getting an error but this might be the reason for it.
Quote
Sometimes, it is not possible to give good estimates, or an estimate at all. Therefore, a fallback value can be set with `-fallbackfee=<f>` (default: `0.0002` BTC/kB).
Source: https://en.bitcoin.it/wiki/Miner_fees

Quote
fallbackfee
A fee rate (in BTC/kB) that will be used when fee estimation has insufficient data (default: 0.0002)
Source: https://manpages.debian.org/experimental/bitcoin-qt/bitcoin-qt.1.en.html


Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: darosior on December 11, 2018, 03:31:44 PM

Does anyone know what should I do ?

You have to pass the
Code:
-fallbackfee
option when running
Code:
bitcoin-qt
or
Code:
bitcoind
. Default being, as said above, 0.0002.


Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: ranochigo on December 11, 2018, 04:19:53 PM
Is there any transactions in the memory pool and/or did the previous blocks had any transactions in them (other than the coinbase transaction)? If there are no transactions that has ever been made, it is impossible for the client to recommend any fees to be used. The whole point of floating fee is for it to be based on the miner's preference on the previous blocks mined and the currently backlog of transaction. You can't use floating fee if that is the case.


Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: chameleon123 on December 12, 2018, 09:18:30 AM
Thanks for all the replies.

All coinbase transactions work fine and I can mine properly.

I enabled -fallbackfee as said but it seems my transaction is lost. Receiver doesn't receive anything. Transaction is still in memory pool but that shouln't take long because th difficulty is changed.

I have a speculation about my genesis block. About a month ago I faced a problem about "InitialBlockDownload()" function returns false but it shouldn't.@achow101 suggesteed that i comment that part that checks "InitialBlockDownload()" value.The discussion can be found here :
https://bitcointalk.org/index.php?topic=5057572.msg47423887#msg47423887 (https://bitcointalk.org/index.php?topic=5057572.msg47423887#msg47423887)

I guess some where in some checkings  InitialBlockDownload() returns false still. I have no idea what should I do :(
Here's a link to my repository :

https://github.com/chameleon1239/bitcoin (https://github.com/chameleon1239/bitcoin)




Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: darosior on December 12, 2018, 11:47:59 AM
Quote
Transaction is still in memory pool but that shouln't take long because th difficulty is changed.
What do you mean ? Transaction could stay in mempool for a very long time, especially on a new network.

Quote
Transaction is still in memory pool
Quote
I can mine properly.
Meaning that you mine empty blocks even if there is a tx in the mempool ? Maybe you should check your debug.log (/home/<yourusername>/.bitcoin/debug.log)


Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: darosior on December 12, 2018, 12:03:06 PM
So I've checked your code.

You should check the value stored by
Code:
IsInitialBlockDownload()
.
You should check if the function
Code:
IsInitialBlockDownload()
has an influence on other functions, especially ones which are related to your problem : https://github.com/chameleon1239/bitcoin/search?q=IsInitialBlockDownload&unscoped_q=IsInitialBlockDownload .
For instance : https://github.com/chameleon1239/bitcoin/blob/59ecacfc84af13e5a1608e7d970315d07dcb0269/src/validation.cpp#L460

You can use
Code:
LogPrintf("")
to debug and understand what's going wrong.


Title: Re: Fee estimation failed. Fallbackfee is disabled....
Post by: chameleon123 on December 12, 2018, 05:57:13 PM
So I've checked your code.

You should check the value stored by
Code:
IsInitialBlockDownload()
.
You should check if the function
Code:
IsInitialBlockDownload()
has an influence on other functions, especially ones which are related to your problem : https://github.com/chameleon1239/bitcoin/search?q=IsInitialBlockDownload&unscoped_q=IsInitialBlockDownload .
For instance : https://github.com/chameleon1239/bitcoin/blob/59ecacfc84af13e5a1608e7d970315d07dcb0269/src/validation.cpp#L460

You can use
Code:
LogPrintf("")
to debug and understand what's going wrong.

Yes, I did all that. The value returned when starting up the network is true but after a quick time it latches to false and remains false after that. I have no idea what caused the problem and I can't Log fields such as nMinimumChainWork and chainActive.Tip()->nChainWork purely. I gives me errors. I don't know how to do step by step debugging except gdb which is nightmare for me.

One one question when I run two nodes on same machine should they both be added to each other (dns is set 0 now) or it is ok to set one as server and add  the second node's ip and port to first node using -addnode command ?

Quote
What do you mean ? Transaction could stay in mempool for a very long time, especially on a new network.

I think it depends on hash limit.I increased hash limit bound, so it should mine faster and also add transaction to the blockchain faster.