test: Avoid intermittent timeout in feature_assumevalid.py #26651

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2212-test-fix-assumevalid-🌞 changing 1 files +7 −11
  1. maflcko commented at 9:41 AM on December 7, 2022: member

    Currently the test will spin up p2p connections in the beginning, then announce the headers to all nodes, but only send the blocks sequentially. This takes a long time, so when getting to the last node, it will have already timed out, while node1 is busy eating blocks. Example:

     node2 2022-12-06T19:31:35.419291Z [msghand] [net_processing.cpp:5783] [SendMessages] [net] Requesting block 2cfdb317b3b901f79e2d4f96339d0c0dffd8ef2685d324f62ab0e2fa3402430e (1) peer=0
     node2 2022-12-06T19:31:35.424784Z [msghand] [net.cpp:2776] [PushMessage] [net] sending getdata (577 bytes) peer=0 
    [...]
     node2 2022-12-06T19:41:35.423257Z [msghand] [net_processing.cpp:5729] [SendMessages] Timeout downloading block 2cfdb317b3b901f79e2d4f96339d0c0dffd8ef2685d324f62ab0e2fa3402430e from peer=0, disconnecting  
     node1 2022-12-06T19:41:35.438706Z [msghand] [net_processing.cpp:5783] [SendMessages] [net] Requesting block 6575919043306ed309014d0bd79814b4fab8afaa281e026d8cc3a1c4c2336fbc (1748) peer=0
     node2 2022-12-06T19:41:35.521253Z [net] [net.cpp:573] [CloseSocketDisconnect] [net] disconnecting peer=0 
     node2 2022-12-06T19:41:35.630417Z [net] [net_processing.cpp:1532] [FinalizeNode] [net] Cleared nodestate for peer=0  
    

    Fix this by only spinning up the p2p connection right before they are needed.

  2. DrahtBot commented at 9:41 AM on December 7, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK jamesob

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Dec 7, 2022
  4. test: Avoid intermittent timeout in feature_assumevalid.py fa34e5f3d3
  5. maflcko force-pushed on Dec 8, 2022
  6. jamesob approved
  7. jamesob commented at 4:33 PM on December 14, 2022: member

    ACK fa34e5f3d35c81bb4376337f4f76c3d501bca742 (jamesob/ackr/26651.1.MarcoFalke.test_avoid_intermittent)

    Good fix; ran locally and verified equivalence with old test.

    <details><summary>Show signature data</summary> <p>

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK fa34e5f3d35c81bb4376337f4f76c3d501bca742 ([`jamesob/ackr/26651.1.MarcoFalke.test_avoid_intermittent`](https://github.com/jamesob/bitcoin/tree/ackr/26651.1.MarcoFalke.test_avoid_intermittent))
    
    Good fix; ran locally and verified equivalence with old test.
    -----BEGIN PGP SIGNATURE-----
    
    iQIzBAEBCgAdFiEEGNRVI1NPYuZCSIrGepNdrbLETwUFAmOZ+wUACgkQepNdrbLE
    TwWDwQ//fCfkMBumBkfTpk4crDNetVIa6sji77NUqbPfxi3xw2iBmT8rcg3C/4WM
    HWvbPkvvjGTIWxusppOeBWHrJfgfDvNcw0OEDCT+6lToYgZ56z/OkDaEvukORWb4
    ULGIFfMppYEeJP1NzFfyZR+EGrYzVgnZT/r6VLDWKop4JMS7dEJsJHVQODhoBoAa
    g2VQ+fCNy4Pm+wX/7Qj5Z//2jyjCdviAOiZ4KlSeeU0+M7L6RoA09X1cBDf5ye6J
    Fw6uWMCO0bEVZnlS30txC7tg64DwX1GfjoVXlSQr0SEtiv9lROTZ+2ZR9vc9jNDe
    j7kMg6ETLpfTABcGIDuumC54LzJoZFgvMchACDLbI5irTkmrnSNl4tyhhfdkZD4n
    CWpTFTTZlyoHRxVzf3321z79ImwWpwmfVTY8fjNaZSkvtuFy4Y4hQMhiNcBf5mCw
    ghmSU7yvTzL0QZ62mRlnD3kwfbJ5WUImHjTKxisLsiGTIt/qW3lar5RXQ+ccR+MS
    eDlbKA4AKOqv+gvsF+HYngc8QEEOEHvtHwK+rud2kgcBHeM2CwRZRYrxcjWo9+xf
    9rnNpMHLAw1jNo73SYPMxipeshLaxe3EDx98JiyF6/2qxplKXyf/DSVo9SOEkoMZ
    jBLfZu4/a/KoEZilMYR7v9VLGjkLLlUJKLnCB0hVTwjBJtSCS28=
    =uczt
    -----END PGP SIGNATURE-----
    
    

    </p></details>

    <details><summary>Show platform data</summary> <p>

    Tested on Linux-6.0.11-arch1-1-x86_64-with-glibc2.36
    
    Configured with ./configure --without-bdb 'CXXFLAGS=-fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare ' --disable-gui-tests --disable-fuzz-binary --enable-wallet --enable-debug --with-daemon --enable-natpmp-default CXX=/usr/bin/clang++ CC=/usr/bin/clang PYTHONPATH= --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --no-create --no-recursion
    
    Compiled with /usr/bin/ccache /usr/bin/clang++ -std=c++17 -mavx -mavx2 -mpclmul -fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare  -O0 -g3 -ftrapv -fdebug-prefix-map=$(abs_top_srcdir)=.  -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -msse4.1 -msse4.2 -msse4 -msha  i
    
    Compiler version: clang version 14.0.6
    

    </p></details>

  8. maflcko merged this on Dec 15, 2022
  9. maflcko closed this on Dec 15, 2022

  10. maflcko deleted the branch on Dec 15, 2022
  11. bitcoin locked this on Dec 15, 2023
Labels

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:14 UTC

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