log: unify UpdateTip values #32996

pull l0rinc wants to merge 1 commits into bitcoin:master from l0rinc:l0rinc/UpdateTip-date-adjustment changing 1 files +1 −1
  1. l0rinc commented at 6:00 pm on July 16, 2025: contributor

    The most frequently seen log line prints tip-update data after each successful block connection. During IBD this produces ~900k lines (~250 characters per line), totaling ~220 MB so far.

    Most key=value pairs are written directly, but block time is emitted as date='ISO8601DateTime', adding unnecessary single quotes because the value contains no spaces.

    Removing those quotes shortens every line and reduces a full-IBD debug log by ~1% (about ~2MB).

    Before:

    2025-07-16T04:50:47Z UpdateTip: new best=00000000000000000001f49fb5fb37753c06d78f1a811d707aebf6194bb147e5 height=890000 version=0x25e9a000 log2_work=95.523053 tx=1172414692 date=‘2025-03-29T17:29:01Z’ progress=0.964378 cache=1578.9MiB(11964898txo)

    After:

    2025-07-16T04:50:47Z UpdateTip: new best=00000000000000000001f49fb5fb37753c06d78f1a811d707aebf6194bb147e5 height=890000 version=0x25e9a000 log2_work=95.523053 tx=1172414692 date=2025-03-29T17:29:01Z progress=0.964378 cache=1578.9MiB(11964898txo)

  2. log: unify `UpdateTip` values
    The most frequently seen log line prints tip-update data after each successful block connection.
    During IBD this produces ~900k lines (~250 characters per line), totaling ~220 MB so far.
    
    Most `key=value` pairs are written directly, but block time is emitted as `date='ISO8601DateTime'`, adding unnecessary single quotes because the value contains no spaces.
    
    Removing those quotes shortens every line and reduces a full-IBD debug log by ~1% (about ~2MB).
    
    Before:
    > 2025-07-16T04:50:47Z UpdateTip: new best=00000000000000000001f49fb5fb37753c06d78f1a811d707aebf6194bb147e5 height=890000 version=0x25e9a000 log2_work=95.523053 tx=1172414692 date='2025-03-29T17:29:01Z' progress=0.964378 cache=1578.9MiB(11964898txo)
    
    After:
    > 2025-07-16T04:50:47Z UpdateTip: new best=00000000000000000001f49fb5fb37753c06d78f1a811d707aebf6194bb147e5 height=890000 version=0x25e9a000 log2_work=95.523053 tx=1172414692 date=2025-03-29T17:29:01Z progress=0.964378 cache=1578.9MiB(11964898txo)
    b039305d35
  3. DrahtBot added the label Utils/log/libs on Jul 16, 2025
  4. DrahtBot commented at 6:00 pm on July 16, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32996.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK nervana21, yuvicc

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #30342 (kernel, logging: Pass Logger instances to kernel objects by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. nervana21 commented at 11:05 pm on July 16, 2025: contributor

    tACK b039305

    Before:

    2025-07-16T22:31:33Z UpdateTip: new best=000000000000000000022dabca47b7aabc24d93d0241536ca75dc528d08d5eba height=905352 version=0x20c26000 log2_work=95.713336 tx=1212933015 date=‘2025-07-13T11:06:38Z’ progress=0.998857 cache=8.8MiB(61209txo)

    After:

    2025-07-16T22:54:20Z UpdateTip: new best=0000000000000000000186eed935e4ad209e7aaa4ceeb2542851feaf4b8d426f height=905353 version=0x21624000 log2_work=95.713348 tx=1212936957 date=2025-07-13T11:25:43Z progress=0.998856 cache=2.1MiB(14143txo)

  6. yuvicc commented at 4:51 am on September 24, 2025: contributor

    ACK b039305d3590aaf84bfdf3b3547b9311897f52c7

    Before:

    02025-09-24T04:47:28Z UpdateTip: new best=00000000000000c19c69a5f5ef54d4565102a4e28a59a05ebbf0cb5efba4bac6 height=236928 version=0x00000002 log2_work=70.073757 tx=18088438 date='2013-05-19T14:48:37Z' progress=0.014517 cache=2.4MiB(17642txo)
    12025-09-24T04:47:28Z UpdateTip: new best=000000000000008c6591a7f59d653d83365426134522364a9bae323166efc3c8 height=236929 version=0x00000002 log2_work=70.073813 tx=18088613 date='2013-05-19T14:51:30Z' progress=0.014517 cache=2.4MiB(17903txo)
    

    After:

    02025-09-24T04:43:04Z UpdateTip: new best=00000000000000f54db6f6e86a75e2845c160d6601dae1961375aeac567df856 height=236911 version=0x00000002 log2_work=70.072808 tx=18083955 date=2013-05-19T12:06:50Z progress=0.014542 cache=3.8MiB(29753txo)
    12025-09-24T04:43:04Z UpdateTip: new best=000000000000008e0e466a8f12260faea894f2876d28d69b587b54be22ad7023 height=236912 version=0x00000002 log2_work=70.072864 tx=18084239 date=2013-05-19T12:18:23Z progress=0.014543 cache=4.1MiB(30586txo)
    
  7. l0rinc closed this on Oct 20, 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: 2025-10-31 06:13 UTC

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