doc: add comments clarifying how local services are advertised #16847

pull jamesob wants to merge 1 commits into bitcoin:master from jamesob:2019-09-localservices-doc changing 2 files +38 −2
  1. jamesob commented at 5:16 pm on September 10, 2019: member

    Recent questions have come up regarding dynamic service registration (see #16442 (review) and the assumeutxo project which needs to dynamically flip NODE_NETWORK).

    While investigating how dynamic service registration might work, I was confused about how we convey local services to peers. This adds some documentation that hopefully clarifies this process.

  2. DrahtBot added the label Docs on Sep 10, 2019
  3. DrahtBot added the label P2P on Sep 10, 2019
  4. dongcarl commented at 6:49 pm on September 10, 2019: member
    Could you format the comments in a Doxygen-friendly way? For example, it’d be nice for those clicking through Doxygen to have the automatic link generation work: http://www.doxygen.nl/manual/autolink.html
  5. jamesob commented at 8:25 pm on September 10, 2019: member

    Could you format the comments in a Doxygen-friendly way?

    To my knowledge, these are already formatted for Doxygen… both /** ... */ and //! are recognized, and the class/method references should autolink properly.

  6. dongcarl commented at 8:42 pm on September 10, 2019: member

    @jamesob Here’s what I see right now

    2019-09-10T16:38:49,502080516-04:00 2019-09-10T16:39:21,760197630-04:00

  7. doc: add comments clarifying how local services are advertised
    Recent questions have come up regarding dynamic service registration
    (see https://github.com/bitcoin/bitcoin/pull/16442#discussion_r308702676
    and the assumeutxo project, which needs to dynamically flip NODE_NETWORK).
    
    While investigating how dynamic service registration might work, I was
    confused about how we convey local services to peers. This adds some
    documentation that hopefully clarifies this process.
    82e53f37e1
  8. in src/net.h:804 in 1d08108437 outdated
    797@@ -786,8 +798,12 @@ class CNode
    798 private:
    799     const NodeId id;
    800     const uint64_t nLocalHostNonce;
    801-    // Services offered to this peer
    802+
    803+    //! Services offered to this peer.
    804+    //! This is supplied by the parent CConman during peer connection
    805+    //! (CConman::ConectNode()) from its attribute of the same name.
    


    MarcoFalke commented at 9:03 am on September 11, 2019:
    Could explain why this is const, i.e. impossible to change after the connection. And maybe also how this interacts with IBD or background indexes that are turned on when the chain is already synced.

    jamesob commented at 2:25 pm on September 11, 2019:
    Good suggestion, done.
  9. jamesob force-pushed on Sep 11, 2019
  10. jamesob commented at 2:26 pm on September 11, 2019: member

    Thanks for the reviews. Have fleshed out some explanatory doc around why local services don’t change and have fixed the Doxygen autolinking.

    Selection_160

  11. darosior approved
  12. darosior commented at 3:35 pm on September 11, 2019: member
    ACK 82e53f37e1bfa6e34eac16b33329d70c3c0127da
  13. laanwj commented at 11:14 am on September 16, 2019: member
    ACK 82e53f37e1bfa6e34eac16b33329d70c3c0127da
  14. laanwj referenced this in commit eb812257a3 on Sep 16, 2019
  15. laanwj merged this on Sep 16, 2019
  16. laanwj closed this on Sep 16, 2019

  17. sidhujag referenced this in commit 6208e34cd0 on Sep 16, 2019
  18. deadalnix referenced this in commit fbda81eaa4 on Oct 20, 2020
  19. vijaydasmp referenced this in commit 6e2e4ce09e on Oct 29, 2021
  20. vijaydasmp referenced this in commit 7e47d328e7 on Oct 30, 2021
  21. vijaydasmp referenced this in commit e87bd6335c on Nov 2, 2021
  22. vijaydasmp referenced this in commit bc29631666 on Nov 7, 2021
  23. vijaydasmp referenced this in commit 295d642365 on Nov 7, 2021
  24. vijaydasmp referenced this in commit 12ab004e7e on Nov 11, 2021
  25. vijaydasmp referenced this in commit a478350315 on Nov 12, 2021
  26. vijaydasmp referenced this in commit 228fa42768 on Nov 13, 2021
  27. vijaydasmp referenced this in commit fb20b4e82e on Nov 14, 2021
  28. vijaydasmp referenced this in commit 72beaa63b6 on Nov 14, 2021
  29. vijaydasmp referenced this in commit 47714ab3b7 on Nov 16, 2021
  30. DrahtBot locked this on Dec 16, 2021

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-07-05 22:12 UTC

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