Problems with fee estimation on testnet

12 replies 493 views
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#1Nov 29, 2020, 07:07 AM
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!
5 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#2Nov 29, 2020, 11:07 PM
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.
1 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#3Nov 30, 2020, 03:37 AM
Yes it is fully synced. Before I rebooted it a couple of hours ago it had been running for months. And the blockheight matches mempool.space/testnet
3 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#4Nov 30, 2020, 07:04 AM
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.
4 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#5Nov 30, 2020, 07:33 AM
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 }
3 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#6Nov 30, 2020, 08:56 AM
Sending a tx works just fine...
4 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#7Nov 30, 2020, 12:46 PM
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.
2 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#8Nov 30, 2020, 02:20 PM
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
4 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#9Dec 2, 2020, 03:14 PM
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?
1 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#10Dec 4, 2020, 05:34 AM
I believe this answer on Bitcoin StackExchange mostly answer your question.
3 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#11Dec 4, 2020, 10:54 AM
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".
3 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#12Dec 4, 2020, 05:00 PM
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?
3 Reply Quote Share
cipher_pixelSenior Member
Posts: 145 · Reputation: 915
#13Dec 4, 2020, 09:09 PM
Ok thanks I will definitely add this to my configuration file!
4 Reply Quote Share

Related topics