rpc, net: remove `startingheight` field of `getpeerinfo` RPC and from node state #34796

pull theStack wants to merge 2 commits into bitcoin:master from theStack:2026-remove-starting_height_field changing 6 files +12 −21
  1. theStack commented at 2:44 AM on March 11, 2026: contributor

    This PR completely removes the startingheight field in the getpeerinfo RPC, previously deprecated in v31.0 (see #34197). The second commit goes one step further: the only remaining usage for a Peers m_starting_height field is for printing P2P debug messages. Considering that the information is untrusted and not deemed useful (see discussion #33990), remove the field and only print the starting height information once at reception of the VERSION message (suggested by ajtowns in #33990 (comment)), without saving it.

  2. DrahtBot commented at 2:44 AM on March 11, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK w0xlt, sedited, stickies-v
    Stale ACK paseco-qu, maflcko, rkrux

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34588 (refactor: decompose Peer struct into focused sub-components by w0xlt)
    • #34389 (net/log: standardize peer+addr log formatting via LogPeer by l0rinc)

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. theStack force-pushed on Mar 11, 2026
  4. DrahtBot added the label CI failed on Mar 11, 2026
  5. stickies-v approved
  6. stickies-v commented at 6:45 AM on March 11, 2026: contributor

    ACK e0425924291020a4cc9498d686410ea09d704889

    I agree with the deprecation rationale in the predecessor PR, and thus also with this removal.

    The start_height field is now only still used to produce a Debug log message. We also still advertise our own m_best_height to peers, which is fine because it's free and we continue to adhere to the network protocol, even if the field seems to offer little benefit.

  7. maflcko added this to the milestone 32.0 on Mar 11, 2026
  8. maflcko commented at 7:17 AM on March 11, 2026: member

    review ACK e0425924291020a4cc9498d686410ea09d704889 🚍

    <details><summary>Show signature</summary>

    Signature:

    untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    trusted comment: review ACK e0425924291020a4cc9498d686410ea09d704889 🚍
    hifMtQ8VwzmwmuWnmHrQELhcYUzQVnMGF1FEww2Qb3x+gNInpdLlyG9TI8i24AoJxhn3f7misRTrV+bo4WQ2DA==
    

    </details>

  9. DrahtBot removed the label CI failed on Mar 11, 2026
  10. rkrux commented at 8:03 AM on March 11, 2026: contributor

    code review ACK e0425924291020a4cc9498d686410ea09d704889

    Follow up to the previous deprecation PR gone in v31.

  11. sedited approved
  12. sedited commented at 9:48 AM on March 11, 2026: contributor

    ACK e0425924291020a4cc9498d686410ea09d704889

    Seems fine to remove the starting height from the debug log too.

  13. DrahtBot added the label Needs rebase on Mar 11, 2026
  14. rpc, net: completely remove `startingheight` field of `getpeerinfo` RPC b267efcdaf
  15. p2p: remove m_starting_height field from node state (only show once in debug log) 745ad941de
  16. theStack force-pushed on Mar 11, 2026
  17. theStack commented at 3:17 PM on March 11, 2026: contributor

    Rebased on master (due to conflict after #34389). Thanks for the quick reviews!

  18. DrahtBot removed the label Needs rebase on Mar 11, 2026
  19. w0xlt commented at 7:40 PM on March 11, 2026: contributor

    ACK 745ad941dedaa0f4e2a5fdda58a3bf683d672196

  20. DrahtBot requested review from maflcko on Mar 11, 2026
  21. DrahtBot requested review from stickies-v on Mar 11, 2026
  22. DrahtBot requested review from sedited on Mar 11, 2026
  23. DrahtBot requested review from rkrux on Mar 11, 2026
  24. sedited approved
  25. sedited commented at 7:41 PM on March 11, 2026: contributor

    Re-ACK 745ad941dedaa0f4e2a5fdda58a3bf683d672196

  26. stickies-v commented at 3:25 AM on March 12, 2026: contributor

    re-ACK 745ad941dedaa0f4e2a5fdda58a3bf683d672196, no changes except for addressing minor merge conflict

  27. sedited merged this on Mar 12, 2026
  28. sedited closed this on Mar 12, 2026

  29. theStack deleted the branch on Mar 12, 2026
  30. sedited referenced this in commit 75f2bf1011 on Apr 25, 2026
  31. yuvicc referenced this in commit 9df13f29ba on May 26, 2026

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-06-04 10:51 UTC

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