Skip to content

backport: Merge bitcoin#28172, 28649, 28464#7186

Draft
vijaydasmp wants to merge 3 commits intodashpay:developfrom
vijaydasmp:March_2026_4
Draft

backport: Merge bitcoin#28172, 28649, 28464#7186
vijaydasmp wants to merge 3 commits intodashpay:developfrom
vijaydasmp:March_2026_4

Conversation

@vijaydasmp
Copy link

Bitcoin Backporting work

@github-actions
Copy link

github-actions bot commented Feb 28, 2026

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

…erals to Parse{Hash,Hex}

bb91131 doc: remove out-of-date external link in src/util/strencodings.h (Jon Atack)
7d494a4 refactor: use string_view to pass string literals to Parse{Hash,Hex} (Jon Atack)

Pull request description:

  as `string_view` is optimized to be trivially copiable, whereas the current code creates a `std::string` copy at each call.

  These utility methods are called by quite a few RPCs and tests, as well as by each other.

  ```
  $ git grep "ParseHashV\|ParseHashO\|ParseHexV\|ParseHexO" | wc -l
  61
  ```

  Also remove an out-of-date external link.

ACKs for top commit:
  jonatack:
    Rebased per `git range-diff c9273f6 b94581a bb91131` for an include header from the merge of bitcoin#28230. Should be trivial to re-ACK.
  maflcko:
    lgtm ACK bb91131
  ns-xvrn:
    ACK bitcoin@bb91131
  achow101:
    ACK bb91131
  brunoerg:
    crACK bb91131

Tree-SHA512: 9734fe022c9e43fd93c23a917770d332dbbd3132c80a234059714c32faa6469391e59349954749fc86c4ef0b18d5fd99bf8f4b7b82d9f799943799c1253272ae
@vijaydasmp vijaydasmp force-pushed the March_2026_4 branch 5 times, most recently from a0ab1c7 to 8d656d4 Compare March 4, 2026 08:28
@vijaydasmp vijaydasmp changed the title backport: Merge bitcoin#28172, 28649, 25065, 28224, 28464 backport: Merge bitcoin#28172, 28649, 28464 Mar 6, 2026
achow101 added 2 commits March 6, 2026 23:01
af0fca5 netbase: use reliable send() during SOCKS5 handshake (Vasil Dimov)
1b19d11 sock: change Sock::SendComplete() to take Span (Vasil Dimov)

Pull request description:

  The `Socks5()` function which does the SOCKS5 handshake with the SOCKS5 proxy sends bytes to the socket without retrying partial writes.

  `send(2)` may write only part of the provided data and return. In this case the caller is responsible for retrying the operation with the remaining data. Change `Socks5()` to do that. There is already a method `Sock::SendComplete()` which does exactly that, so use it in `Socks5()`.

  A minor complication for this PR is that `Sock::SendComplete()` takes `std::string` argument whereas `Socks5()` has `std::vector<uint8_t>`. Thus the necessity for the first commit. It is possible to do also in other ways - convert the data in `Socks5()` to `std::string` or have just one `Sock::SendComplete()` that takes `void*` and change the callers to pass `str.data(), str.size()` or `vec.data(), vec.size()`.

  This came up while testing bitcoin#27375.

ACKs for top commit:
  achow101:
    ACK af0fca5
  jonatack:
    ACK af0fca5
  pinheadmz:
    ACK af0fca5

Tree-SHA512: 1d4a53d0628f7607378038ac56dc3b8624ce9322b034c9547a0c3ce052eafb4b18213f258aa3b57bcb4d990a5e0548a37ec70af2bd55f6e8e6399936f1ce047a
df69b22 doc: improve documentation around connection limit maximums (Amiti Uttarwar)
adc171e scripted-diff: Rename connection limit variables (Amiti Uttarwar)
e9fd9c0 net: add m_max_inbound to connman (Amiti Uttarwar)
c25e0e0 net, refactor: move calculations for connection type limits into connman (Amiti Uttarwar)

Pull request description:

  This is joint work with amitiuttarwar.

  This has the first few commits of bitcoin#28463. It is not strictly a prerequisite for that, but has changes that in our opinion make sense on their own.
  It improves the handling of maximum numbers for different connection types (that are set during init and don’t change after) by:
  * moving all calculations into one place, `CConnMan::Init()`. Before, they were dispersed between `Init`, `CConnman::Init` and other parts of `CConnman`, resulting in some duplicated test code.
  * removing the possibility of having a negative maximum of inbound connections, which is hard to argue about
  * renaming of variables and doc improvements

ACKs for top commit:
  amitiuttarwar:
    co-author review ACK df69b22
  naumenkogs:
    ACK df69b22
  achow101:
    ACK df69b22

Tree-SHA512: 913d56136bc1df739978de50db67302f88bac2a9d34748ae96763288d97093e998fc0f94f9b6eff12867712d7e86225af6128f4170bf2b5b8ab76f024870a22c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants