fix: make hive bee 2.6.0 backward compatible#5329
Merged
Conversation
…y check The bee260BackwardCompatibility function was incorrectly treating pre-release versions (e.g., 2.7.0-rc12) as less than their stable counterparts (2.7.0) due to semver spec behavior. This caused nodes running 2.7.0-rc versions to incorrectly enable backward compatibility mode, stripping WSS addresses and limiting connections to TCP only. Changes: - Modified bee260BackwardCompatibility to compare only major.minor.patch by creating a clean version without pre-release metadata - Added debug logging for version compatibility decisions - Extracted bee260Compat variable in Connect and handleIncoming for clarity - Added comprehensive test coverage with 17 test cases including: * Legacy versions (< 2.7.0) requiring backward compat * Current/future versions (>= 2.7.0) not requiring backward compat * Pre-release versions (2.7.0-rcX) correctly treated as >= 2.7.0 * Edge cases (empty, malformed, non-bee user agents) Fixes browser node connectivity issues where they only received TCP addresses instead of both TCP and WSS addresses from peers running pre-release versions.
gacevicljubisa
approved these changes
Jan 24, 2026
| if !bee260compatibility { | ||
| return underlays | ||
| } | ||
| underlay := bzz.SelectBestAdvertisedAddress(underlays, nil) |
Member
There was a problem hiding this comment.
Here we could only return TCP. It is prefered, but 2.6 doesn't support other transports, so we can send TCP only.
Base automatically changed from
fix/bee260-semver-prerelease-comparison
to
master
January 26, 2026 15:58
Contributor
akrem-chabchoub
left a comment
There was a problem hiding this comment.
LGTM, just there are some git conflicts needed to be resolved
martinconic
approved these changes
Jan 26, 2026
akrem-chabchoub
approved these changes
Jan 26, 2026
This increase is needed for TestWithBlocklistStreams test that constantly fails on macos in GitHub CI https://github.com/ethersphere/bee/actions/runs/21368430575/job/61528145253#step:7:188 --- FAIL: TestWithBlocklistStreams (0.40s) connections_test.go:1175: expected error when connecting to blocklisted peer 2026/01/26 21:37:32 failed to sufficiently increase receive buffer size (was: 768 kiB, wanted: 7168 kiB, got: 6144 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
This reverts commit 399b772.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Description
Send only one undelray address in hive to bee 2.6.0 or earlier nodes.
This is a backward compatibility support similar to the one already added to the handshake protocol.
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):