Intermittent failure in feature_fee_estimation.py in sanity_check_rbf_estimates: est_feerate = node.estimatesmartfee(2)["feerate"] (KeyError: 'feerate') #30640

issue maflcko opened this issue on August 12, 2024
  1. maflcko commented at 5:36 PM on August 12, 2024: member

    https://cirrus-ci.com/task/5165357323780096?logs=ci#L2840

     test  2024-08-09T22:10:43.283000Z TestFramework (ERROR): Key error 
                                       Traceback (most recent call last):
                                         File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 132, in main
                                           self.run_test()
                                         File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_fee_estimation.py", line 468, in run_test
                                           self.sanity_check_rbf_estimates(self.confutxo + self.memutxo)
                                         File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_fee_estimation.py", line 302, in sanity_check_rbf_estimates
                                           est_feerate = node.estimatesmartfee(2)["feerate"]
                                       KeyError: 'feerate'
    
  2. maflcko renamed this:
    Intermittent failure in feature_fee_estimation.py" in sanity_check_rbf_estimates: est_feerate = node.estimatesmartfee(2)["feerate"] (KeyError: 'feerate')
    Intermittent failure in feature_fee_estimation.py in sanity_check_rbf_estimates: est_feerate = node.estimatesmartfee(2)["feerate"] (KeyError: 'feerate')
    on Aug 12, 2024
  3. maflcko added the label CI failed on Aug 12, 2024
  4. maflcko added the label TX fees and policy on Aug 12, 2024
  5. ismaelsadeeq commented at 3:44 PM on September 14, 2024: member

    I read the log from https://api.cirrus-ci.com/v1/task/5165357323780096/logs/ci.log and tried to recreate this intermittent failure.

    cmake -B build -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON -DCMAKE_C_FLAGS="-g0 -O2 -funsigned-char" -DCMAKE_CXX_FLAGS="-g0 -O2 -funsigned-char -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"
    

    I used the seed where the failure occurred was but it passes locally:

    <details> <summary>logs</summary>

    build/test/functional/feature_fee_estimation.py  --randomseed=7115946170308495203 --timeout-factor=40
    2024-09-14T12:50:36.417000Z TestFramework (INFO): User supplied random seed 7115946170308495203
    2024-09-14T12:50:36.417000Z TestFramework (INFO): PRNG seed is: 7115946170308495203
    2024-09-14T12:50:36.417000Z TestFramework (INFO): Initializing test directory /var/folders/dj/d8p8jhd172n7wnq81ryfl6rc0000gn/T/bitcoin_func_test_hnob35wg
    2024-09-14T12:50:36.455000Z TestFramework (INFO): This test is time-consuming, please be patient.
    2024-09-14T12:50:36.455000Z TestFramework (INFO): Splitting inputs so we can generate transactions
    2024-09-14T12:50:38.091000Z TestFramework (INFO): Finished splitting
    2024-09-14T12:50:38.906000Z TestFramework (INFO): Testing estimates with single transactions.
    2024-09-14T12:50:38.907000Z TestFramework (INFO): Will output estimates for 1/2/3/6/15/25 blocks
    2024-09-14T12:50:38.907000Z TestFramework (INFO): Creating transactions and mining them with a block size that can't keep up
    2024-09-14T12:50:42.144000Z TestFramework (INFO): Creating transactions and mining them at a block size that is just big enough
    2024-09-14T12:50:47.583000Z TestFramework (INFO): Creating transactions and mining them with a block size that can't keep up
    2024-09-14T12:50:51.960000Z TestFramework (INFO): Creating transactions and mining them at a block size that is just big enough
    2024-09-14T12:50:57.870000Z TestFramework (INFO): Final estimates after emptying mempools
    2024-09-14T12:50:57.891000Z TestFramework (INFO): Test fee_estimates.dat is flushed periodically
    2024-09-14T12:50:58.739000Z TestFramework (INFO): Testing fee rate estimation after restarting the node with high `MempoolMinFee`
    2024-09-14T12:50:59.555000Z TestFramework (INFO): Testing the `acceptstalefeeestimates` option
    2024-09-14T12:50:59.920000Z TestFramework (INFO): Testing reading old fee_estimates.dat
    2024-09-14T12:51:00.657000Z TestFramework (INFO): Restarting node with fresh estimation
    2024-09-14T12:51:01.312000Z TestFramework (INFO): Testing estimates with RBF.
    2024-09-14T12:51:03.329000Z TestFramework (INFO): Restarting node with fresh estimation
    2024-09-14T12:51:03.868000Z TestFramework (INFO): Testing `estimatesmartfee` modes
    2024-09-14T12:51:22.243000Z TestFramework (INFO): Testing that fee estimation is disabled in `blocksonly`
    2024-09-14T12:51:22.720000Z TestFramework (INFO): Stopping nodes
    2024-09-14T12:51:22.830000Z TestFramework (INFO): Cleaning up /var/folders/dj/d8p8jhd172n7wnq81ryfl6rc0000gn/T/bitcoin_func_test_hnob35wg on exit
    2024-09-14T12:51:22.830000Z TestFramework (INFO): Tests successful
    

    </details>

    My initial guess was that the sync_mempools wait time in sanity_check_rbf_estimates was too short, and the miner node didn't finish syncing. But this was not the case because the test still passes after commenting the syncs out.

  6. fanquake closed this on Oct 2, 2024

  7. fanquake referenced this in commit 70910eb2ec on Oct 2, 2024
  8. bitcoin deleted a comment on Oct 3, 2024
  9. bitcoin locked this on Oct 3, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me