Intermittent failure in feature_fee_estimation.py in sanity_check_rbf_estimates: est_feerate = node.estimatesmartfee(2)[“feerate”] (KeyError: ‘feerate’) #30640

issue maflcko openend 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

    0 test  2024-08-09T22:10:43.283000Z TestFramework (ERROR): Key error 
    1                                   Traceback (most recent call last):
    2                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 132, in main
    3                                       self.run_test()
    4                                     File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/feature_fee_estimation.py", line 468, in run_test
    5                                       self.sanity_check_rbf_estimates(self.confutxo + self.memutxo)
    6                                     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
    7                                       est_feerate = node.estimatesmartfee(2)["feerate"]
    8                                   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.

    0cmake -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:

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

    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

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: 2024-11-21 09:12 UTC

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