-
Notifications
You must be signed in to change notification settings - Fork 382
fix: make hive bee 2.6.0 backward compatible #5329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
| if !bee260compatibility { | ||
| return underlays | ||
| } | ||
| underlay := bzz.SelectBestAdvertisedAddress(underlays, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we could only return TCP. It is prefered, but 2.6 doesn't support other transports, so we can send TCP only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
akrem-chabchoub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just there are some git conflicts needed to be resolved
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.
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):