A -seednode might get disconnected before receiving a full addr response #19694

issue sdaftuar openend this issue on August 10, 2020
  1. sdaftuar commented at 3:14 pm on August 10, 2020: member

    While testing #19316, I noticed some odd behavior around -seednode.

    As far as I understand, users can use the -seednode argument in order to get a set of addresses from a peer to seed their addrman.

    However, using another Bitcoin Core node as a -seednode seems to not work very well, because one of the first things we do with a new peer connection is send a single addr message to our peer, which in turn causes the peer to think we’ve satisfied their getaddr request – when all we’ve done is give them our own address, rather than a list of 1000 addresses to seed their addrman with.

    I’m not quite sure how to make this better in a robust way (there’s an ambiguity in our protocol as to whether an addr message is a response to a getaddr, or an unrequested announcement); perhaps this is a moot point if either (a) no one really uses this argument anyway, or (b) people who do use this are connecting to different software that doesn’t advertise itself the way Bitcoin Core does.

  2. sdaftuar added the label Bug on Aug 10, 2020
  3. sdaftuar commented at 3:53 pm on August 10, 2020: member
    An easy fix, if this is indeed a bug, might be to fix the server side of this so that we just schedule our initial local address send to a peer to be (say) 30 seconds after connection, rather than initialize the timer to 0 so that it gets sent immediately.
  4. fanquake added the label P2P on Aug 10, 2020
  5. mzumsande commented at 7:49 pm on September 6, 2021: member
    This was fixed by #22096 (I wasn’t aware of this issue when I opened that PR).
  6. sdaftuar closed this on Sep 6, 2021

  7. DrahtBot locked this on Sep 6, 2022

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-12-19 06:12 UTC

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