ignored getblocktxn takes longer to detect than is possible #22295

issue rebroad opened this issue on June 21, 2021
  1. rebroad commented at 1:44 PM on June 21, 2021: contributor

    In the below example, it became clear 17 seconds after the getblocktxn request that the node was ignoring the request (given it was responding to getdata tx requests that were sent after the getblocktxn request), yet it took 600 seconds before the current logic detects this, causing the node to be blind to the latest block for more than 10 minutes:-

    2021-06-21T11:52:02.935 recv best cmpctblock 000000000000000000029277b69abf07bdaff08037871b9da4079a0113a5c3bd (688382) age=3s size=17602 peer=6
    2021-06-21T11:52:02.943 send getblocktxn 000000000000000000029277b69abf07bdaff08037871b9da4079a0113a5c3bd (688382) indexes=55/2860 peer=6
    2021-06-21T11:52:08.878 tx accepted f1d416dff2842bd87e417c5b5e447861cc1a2ea5706b618cc583e4c53526ac2b (poolsz 6693, 16802kB) req:00 size=249 delta=1232 IF=16 peer=6
    2021-06-21T11:52:08.939 tx accepted 60237bf4e21d77e536c983b0f6df6815634f535f775f54b46515b51649156fa7 (poolsz 6694, 16804kB) req:20 size=484 delta=1568 IF=15 peer=6
    2021-06-21T11:52:08.955 tx accepted 0152b9073145e57671662bc592b95a8f9f81ae85075bf80c5129cb1e4028d846 (poolsz 6695, 16807kB) req:01 size=1085 delta=2944 IF=14 peer=6
    2021-06-21T11:52:08.970 tx accepted c843bb8705a0a188aebcb66fa010668488e86e97b5e8971506de3235d64fafa0 (poolsz 6696, 16810kB) req:01 size=1267 delta=3744 IF=13 peer=6
    2021-06-21T11:52:08.976 tx accepted 6d2417e313a7fed1a3d1414b2140c27c74a5297f83e48b494c3f548dfe642258 (poolsz 6697, 16811kB) req:01 size=224 delta=1104 IF=12 peer=6
    2021-06-21T11:52:08.983 tx accepted 592ca94513d2539f8eed699976fde8ed63f9813822deecd0e6439d3bf22f50ca (poolsz 6698, 16812kB) req:20 size=220 delta=1008 IF=11 peer=6
    2021-06-21T11:52:08.988 tx accepted 863f143e5f0f1bc190bb478b6e820dc69f6653840511f89e5090a35252616fd7 (poolsz 6699, 16814kB) req:01 size=326 delta=1488 IF=10 peer=6
    2021-06-21T11:52:08.996 tx accepted 90185ddc5a22aa91600f3a7a0de1ef6d9ad433c91e5bb2bab2ade280f351b2cc (poolsz 6700, 16815kB) req:01 size=413 delta=1424 IF=9 peer=6
    2021-06-21T11:52:09.001 tx accepted 5085c53130d3512d84e2b81b34f58fec7f10c8169273486bccdc312595e32e99 (poolsz 6701, 16817kB) req:01 size=376 delta=1328 IF=8 peer=6
    2021-06-21T11:52:09.006 tx accepted e5229b1445e686fc84660d636ffae923cf83b12525b2529be0aec4f41de2efbf (poolsz 6702, 16818kB) req:01 size=249 delta=1104 IF=7 peer=6
    2021-06-21T11:52:09.011 tx accepted 90ad168cfa82ae87d3c55d278bd100f6a23b8c752c4ee6d0e7807760a4d296b6 (poolsz 6703, 16819kB) req:20 size=225 delta=1008 IF=6 peer=6
    2021-06-21T11:52:09.017 tx accepted f773d83f68506f4ab8a0b4d2b1732cdab83b8aaab9e9b01505cc84eef61c5257 (poolsz 6704, 16820kB) req:01 size=224 delta=1104 IF=5 peer=6
    2021-06-21T11:52:11.333 tx accepted 1c5ac7e90c6a7af51023e55e41d90129bf373d4bd20670fff93fc518dc462e15 (poolsz 6711, 16827kB) req:00 size=249 delta=1104 IF=4 peer=6
    2021-06-21T11:52:11.341 tx accepted 789c709b65954df05d5b2015cd22fef0a93c37bbf9982f53333fc11d250f403d (poolsz 6712, 16828kB) req:00 size=222 delta=1104 IF=3 peer=6
    2021-06-21T11:52:11.394 tx accepted 948ae1d25b6a40e3dee26e9eef58b2f3759e8077a23f3792387198b83d6f2a7a (poolsz 6713, 16829kB) req:00 size=245 delta=1104 IF=2 peer=6
    2021-06-21T11:52:11.399 tx accepted 7f76c7ad0b128c9650f1d7e18a93f8311c62fbf4a6d18f187c833b4eea4bc28f (poolsz 6714, 16830kB) req:00 size=225 delta=1104 IF=1 peer=6
    2021-06-21T11:52:11.408 tx accepted 303029156352f039bd0c8d90e6372c38f9a0a1dd284f0d3a6a93f889123c7291 (poolsz 6715, 16832kB) req:00 size=247 delta=1104 IF=0 peer=6
    

    All TXs in flight now downlaoded, the next one is in response to a new getdata tx, sent after the getblocktxn:-

    2021-06-21T11:52:19.549 tx accepted d6e82f0a6845fcf3ad80f97d86f991948f3ff7d4830c6cf867355c658c386fdc (poolsz 6768, 16919kB) req:20 size=2307 delta=5344 IF=6 peer=6
    

    Finally, 10 minutes later the peer is disconnected:-

    2021-06-21T12:02:02.217 stored orphan tx ae861230b7d95cc435426a74b89000eda4629fa2c424ea58b863011cec574b9a (mapsz 91 outsz 370) peer=6
    2021-06-21T12:02:02.648 Timeout downloading block 000000000000000000029277b69abf07bdaff08037871b9da4079a0113a5c3bd from peer=6, disconnecting
    
  2. rebroad added the label Bug on Jun 21, 2021
  3. rebroad renamed this:
    stalled block download takes too long to detect
    ignored getblocktxn takes too long to detect
    on Jun 21, 2021
  4. rebroad renamed this:
    ignored getblocktxn takes too long to detect
    ignored getblocktxn takes too longer to detect than possible
    on Jun 21, 2021
  5. rebroad referenced this in commit ff6507ac87 on Jun 21, 2021
  6. rebroad referenced this in commit a685ac5341 on Jun 22, 2021
  7. rebroad referenced this in commit d9244f1e8d on Jun 22, 2021
  8. rebroad referenced this in commit bb65f79452 on Jun 23, 2021
  9. rebroad referenced this in commit 306c99718d on Jun 28, 2021
  10. rebroad renamed this:
    ignored getblocktxn takes too longer to detect than possible
    ignored getblocktxn takes longer to detect than is possible
    on Jun 28, 2021
  11. fanquake added the label P2P on Aug 13, 2022
  12. brunoerg commented at 2:00 PM on June 5, 2023: contributor

    Perhaps #27626 fixed it?

  13. willcl-ark commented at 3:04 PM on April 10, 2024: member

    We think this issue is now resolved, please feel free to comment here or open another issue if you disagree.

  14. willcl-ark closed this on Apr 10, 2024

  15. bitcoin locked this on Apr 10, 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-22 18:14 UTC

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