bitcoin: estimatesmartfee always returns "Insufficient data or no feerate found"
Describe the issue
My bitcoind 0.15.0 node is fully sync-ed.
$ bitcoin-cli getinfo
{
"deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16",
"version": 150000,
"protocolversion": 70015,
"walletversion": 60000,
"balance": 0.00000000,
"blocks": 489885,
"timeoffset": 0,
"connections": 15,
"proxy": "",
"difficulty": 1123863285132.967,
"testnet": false,
"keypoololdest": 1492149683,
"keypoolsize": 1000,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": ""
}
Now attempt estimatefee
$ bitcoin-cli estimatefee 2
0.00004999
Now attempt estimatesmartfee
$ bitcoin-cli estimatesmartfee 2
{
"errors": [
"Insufficient data or no feerate found"
],
"blocks": 0
}
Can you reliably reproduce the issue?
Yes, getting this every time running the command.
Expected behaviour
estimatesmartfee to returns the estimation
Actual behaviour
Return error
What version of bitcoin-core are you using?
“version”: 150000, “protocolversion”: 70015, “walletversion”: 60000,
Machine specs:
- OS: Ubuntu
- CPU: Amazon EC2
- RAM: 16GB
- Disk size: 1TB
- Disk Type (HD/SDD): HDD
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 26 (9 by maintainers)
+1 for mocking on RegTest. It resulted in some minor inconvenience for me during development multiple times.
For anyone interested, I had a go at the creation of transactions from
./test/functional/feature_fee_estimation.py
to bootstrap the estimatesmartfee in a regtest environment using javascript. It uses the bitcoin-core package (https://www.npmjs.com/package/bitcoin-core) In the code belowbitcoind
is the initialized bitcoin-core client.I think the number of transactions is overkill, because while this was running, the estimatesmartfee started to return results, if queried. But the overkill doesn’t hurt, so it didn’t bother me.
@knoxcard No, not at all.
@toddmo See
./test/functional/feature_fee_estimation.py
for an example on how to generate transactions for fee estimation.You’re free to simulate data yourself (by creating transactions). Perhaps it would be useful to have a script to do so.
But
estimatesmartfee
should not report data that isn’t actually in the chain - that would defeat the ability to use regtest to testestimatesmartfee
.@MarcoFalke This is a bug.
It always returns this in regtest:
What it should do is return something, even if just valid test data, for completeness, and so developers won’t have to write special code to handle an environment (regtest). Environments in and of themselves shouldn’t introduce code complexity beyond configuration settings for the environment.
So maybe the cause is elsewhere, say peers, but whatever is missing in regtest should be mocked IMO.
Wait until you get estimates with
bitcoin-cli estimatesmartfee 2
. For more details, see https://github.com/bitcoin/bitcoin/pull/10199Maybe check your connected peers.
getpeerinfo
. But you mempool is pretty small (looks like your not getting enough transactions to estimate fees)It looks like you haven’t run your peer long enough to collect the required information:
Keep you peer running and check your mempool content with
getmempoolinfo
.