getaddrmaninfo RPC: add Transport v1/v2 to tried for ipv4 & ipv6 #28807

issue MarnixCroes openend this issue on November 7, 2023
  1. MarnixCroes commented at 1:10 am on November 7, 2023: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Would be nice if the transport version is added to getaddrmaninfo RPC for ipv4 and ipv6, so the user can see how many Transport v1/v2 one’s node has connected to. current:

    getaddrmaninfo

    { “ipv4”: { “new”: x, “tried”: x, “total”: x }, “ipv6”: { “new”: x, “tried”: x, “total”: x }, “onion”: { “new”: x, “tried”: x, “total”: x …

    Expected behaviour

    getaddrmaninfo

    { “ipv4”: { “new”: x, “tried”: x, { “transportv1”: x, “transportv2”: x, } “total”: x }, “ipv6”: { “new”: x, “tried”: x, { “transportv1”: x, “transportv2”: x, } “total”: x }, “onion”: { “new”: x, “tried”: x, “total”: x …

    or something like this

    Steps to reproduce

    .

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    v26.0.rc2

    Operating system and version

    .

    Machine specifications

    No response

  2. mzumsande commented at 2:15 am on November 7, 2023: contributor

    I think that this is not so straightforward because we don’t save historic connection details in addrman (and I’m not sure if we want to start doing that). What we do save is the service flags , which could be dumped with the debug-only getrawaddrman rpc.

    However, a BIP324 service flag for an addr in tried does not necessarily indicate that we connected to them via v2. The service flag may just be wrong (and we connected to them but downgraded the conection to v1), or maybe it is true now but either we or them did not run with -v2transport at the time the connection was made.

  3. MarnixCroes commented at 9:36 am on November 7, 2023: contributor
    @mzumsande OK. Yes I was thinking maybe adding something like gettransportinfo/getclearnettransportinfo might be a good addition/alternative to this one. Where detailed info, like you mentioned, could be shown.
  4. willcl-ark added the label RPC/REST/ZMQ on Jan 24, 2024
  5. brunoerg commented at 2:55 pm on April 12, 2024: contributor
    I agree with @mzumsande. Also, I’m not sure but I do believe you could use tracepoints to track it. See: https://github.com/bitcoin/bitcoin/blob/master/doc/tracing.md

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-09-28 22:12 UTC

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