[meta] Collect time offset samples #24805

issue MarcoFalke opened this issue on April 8, 2022
  1. MarcoFalke commented at 10:14 AM on April 8, 2022: member

    To evaluate how useful/useless adjusted network time is, it could make sense to collect samples?

    Be aware that time offsets are expected to be off, as some peers will send the network time as their own time, see commit 14ba286556faad794f288ef38493c540382897cb. Also, offsets of 1sec (or a few secs) are expected due to second-precision rounding errors and network delays. Also, larger offsets are expected for some peers that did a -reindex, see commit 0ac42c49f7bfc1e158a83c6d98bc465b06894e8a.

  2. MarcoFalke added the label Brainstorming on Apr 8, 2022
  3. MarcoFalke added the label P2P on Apr 8, 2022
  4. jonatack commented at 2:24 PM on April 8, 2022: contributor

    A patch that adds getpeerinfo timeoffset to -netinfo, if helpful to anyone: https://github.com/jonatack/bitcoin/commits/netinfo-time-offset

    image

  5. MarcoFalke commented at 12:37 PM on April 21, 2022: member

    For the data to be meaningful, it would ideally also include the ua-string

  6. MarcoFalke cross-referenced this on Apr 21, 2022 from issue Change -maxtimeadjustment default from 70 minutes to 0 by jonatack
  7. MarcoFalke commented at 12:38 PM on April 21, 2022: member

    Going to close this, as this is not an actionable issue. Though, comments are still welcome.

  8. MarcoFalke closed this on Apr 21, 2022

  9. vasild commented at 1:01 PM on April 21, 2022: contributor
    $ bitcoin-cli getpeerinfo | jq .[].timeoffset | sort -n | uniq -c
       1 -43374
       2 -1879
       1 -9
       4 -4
       5 -3
       5 -2
      21 -1
      53 0
       1 1
       1 2
       1 57
       1 108
       1 166
    

    <details> <summary>with subver</summary>

    $ jq -r 'sort_by(.timeoffset) | map({timeoffset: .timeoffset | tostring, subver: .subver}) | map(.timeoffset + " " + .subver) | .[]'
    -43374 /Satoshi:0.16.3/
    -1879 /nodes.mom.market:0.2/
    -1879 /nodes.mom.market:0.2/
    -9 /Satoshi:22.0.0/
    -4 /Satoshi:0.21.0/
    -4 /dsn.tm.kit.edu/bitcoin:0.9.99/
    -4 /Satoshi:21.99.0/
    -4 /Satoshi:0.21.1/
    -3 /Satoshi:0.14.0/
    -3 /Satoshi:0.14.0/
    -3 /Satoshi:22.0.0/
    -3 /Satoshi:22.0.0/
    -3 /Satoshi:22.0.0/
    -2 /Satoshi:0.20.99/
    -2 /Satoshi:22.0.0/
    -2 /Satoshi:22.0.0/
    -2 /Satoshi:22.0.0/
    -2 /Satoshi:22.0.0/Knots:20211108/
    -1 /Satoshi:0.21.0/
    -1 /seeder:0.0001/
    -1 /Satoshi:22.0.0/
    -1 /bitnodes.io:0.2/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:0.17.0.1/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:22.0.0(Bitch)/
    -1 /Satoshi:23.99.0(@dunxen)/
    -1 /Satoshi:22.99.0/
    -1 /Satoshi:22.99.0/
    -1 /Satoshi:22.0.0/
    -1 /Satoshi:0.16.0/
    -1 /Satoshi:22.0.0/
    0 /Satoshi:0.18.0/
    0 /seeder:0.0001/
    0 /Satoshi:22.0.0/
    0 /bitnodes.io:0.2/
    0 /bitnodes.io:0.2/
    0 /Satoshi:0.21.1/
    0 /bitnodes.io:0.2/
    0 /Satoshi:0.21.0/
    0 /Satoshi:0.21.0/
    0 /Satoshi:0.21.0/
    0 /Satoshi:22.0.0/
    0 /dsn.tm.kit.edu/bitcoin:0.9.99/
    0 /bitnodes.earn.com:0.1/
    0 /bitnodes.earn.com:0.1/
    0 /dsn.tm.kit.edu/bitcoin:0.9.99/
    0 /bitnodes.io:0.2/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /dsn.tm.kit.edu/bitcoin:0.9.99/
    0 /dsn.tm.kit.edu/bitcoin:0.9.99/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /bitnodes.io:0.2/
    0 /Satoshi:0.16.1/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:23.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:0.19.0.1/
    0 /Satoshi:22.0.0/
    0 /btcwire:0.5.0/bitmarkd-payment-lightclient:0.1.0/
    0
    0 /Satoshi:22.0.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.99.0/
    0 /Satoshi:22.0.0/
    0 /Satoshi:23.99.0(@jon)/
    0 /Satoshi:22.0.0/
    0 /Satoshi:23.99.0(@jon)/
    0 /bitnodes.io:0.2/
    1 /Satoshi:22.0.0(Samourai Dojo 1.12.1)/
    2 /Satoshi:0.18.1/
    57 /Satoshi:22.0.0/
    108 /Satoshi:22.0.0/
    166 /Satoshi:0.19.0.1/
    

    </details>

  10. jonatack commented at 8:05 AM on April 23, 2022: contributor

    image

  11. MarcoFalke commented at 8:38 AM on April 23, 2022: member

    Looks like the data so far shows that all offsets are within 5 minutes, or they are so large (12 h for the 16.3 node) that time adjustment won't work, or they are from clients that likely do not use our time adjustment logic or code (mom.market), or we don't know whether adjusted time had an effect (all outbound nodes with user agent Satoshi:22.x or earlier)

  12. jonatack commented at 8:50 AM on April 23, 2022: contributor

    Looks like the data so far shows that all offsets are within 5 minutes, or they are so large (12 h for the 16.3 node) that time adjustment won't work, or they are from clients that likely do not use our time adjustment logic or code (mom.market), or we don't know whether adjusted time had an effect (all outbound nodes with user agent Satoshi:22.x or earlier)

    Yes, that's a good summary of what I've been seeing so far.

  13. bitcoin locked this on Apr 23, 2023

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