Hey everyone,
I'm trying to run some lightning tests on testnet3, but I'm hitting a wall trying to open a channel with a node. My testnet bitcoind keeps throwing a "Cannot estimate fees" error, no matter if it's been running for a few hours or several months. Is this something that happens often? What's the workaround that folks usually do for this kind of issue?
Appreciate any help!
Did you check your node if it's fully sync?
Better check the node first by using "bitcoin-cli getblockchaininfo" and compare the block with the current block height of 4,075,142
If the block info is below that height, it is not fully synced yet, and you need to wait for your node to be fully synced.
Are you running a prune node? I suggest disable it if it is set to prune.
Are you able to send tBTC on-chain? I mean normally send testnet coins, not by opening channels. Test it first and let's see if this is only by opening the channel or even on-chain doesn't work.
What is your current node system specs? Are you in Ubuntu?
Can you try to edit the bitcoin.conf and add this "maxmempool=500" without qoutes or change it to 1000 then test make sure to restart bitcoind.
If you still having issue try adding this on the Bitcoin.conf file "mempoolexpiry=72" then restart it again and test.
No it is not a pruned node:
./bin/bitcoin-cli -testnet getblockchaininfo
{
"chain": "test",
"blocks": 4075162,
"headers": 4075162,
"bestblockhash": "000000000ff380e4ddabeaef62b63a23a29b57fe0c93257a2aaf5a6420c66ffd",
"difficulty": 1,
"time": 1742866878,
"mediantime": 1742865677,
"verificationprogress": 1,
"initialblockdownload": false,
"chainwork": "0000000000000000000000000000000000000000000016426f159b1301805f97",
"size_on_disk": 189685877847,
"pruned": false,
"warnings": "Unknown new rules activated (versionbit 28)"
}
I am using FreeBSD on arm64. I have bitcoind running in another jail with mainnet and I don't have any issue. I had maxmempool set to 300, I just increased it to 1000 and set mempoolexpiry to 72:
2025-03-24T23:56:36Z * Using 37.2 MiB for transaction index database
2025-03-24T23:56:36Z * Using 32.6 MiB for basic block filter index database
2025-03-24T23:56:36Z * Using 8.0 MiB for chain state database
2025-03-24T23:56:36Z * Using 220.2 MiB for in-memory UTXO set (plus up to 953.7 MiB of unused mempool space)
./bin/bitcoin-cli -testnet estimatesmartfee 1 economical
{
"errors": [
"Insufficient data or no feerate found"
],
"blocks": 2
}
Is not fully synced yet look at the blocks under "getblockchaininfo" and compared it to the current block height from https://mempool.space/testnet
The current block is 4075204 but yours is currently 4075162
I don't see any other reasons, but this current block height in your node seems to be the issue the node should be fully synced.
The weird part is "verificationprogress": 1 it indicates a fully synced.
If the normal transaction works just fine would you mind to add more info if what lightning software or wallet you use to open a channel? If the issue only comes up when opening a channel, then maybe the issue is only in your lightning software or wallet.
Again getblockchaininfo returns me the same height as mempool.space, and estimatesmartfee returns "Insufficient data or no feerate found". I am using CLN to open a channel
Hmm, estimatesmartfee just started working without me changing anything...
Changed the settings back to the original ones I had, restarted bitcoind, and fee estimation still works. Not sure what happened?
Not surprising since it's been a while since you've experienced the issue, it's just given enough time to work.
If that happened again and you're in a hurry, you can try to set a "fallbackfee" so its value will be set instead if the estimate isn't available yet.
Set it to your bitcoin.conf file like: fallbackfee=0.0001
The value's unit is in "BTC/kB".
Ok, it is strange that there was no fee estimation after bitcoind had been running for months, then no fee estimate for 24 hours after restarting, then now it works regardless of if I restart it or not. Was it due to a lack of txs in the testnet mempool?