⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@janos
Copy link
Member

@janos janos commented Jan 23, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

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):

gacevicljubisa and others added 4 commits January 23, 2026 18:01
…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)
Copy link
Member

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Base automatically changed from fix/bee260-semver-prerelease-comparison to master January 26, 2026 15:58
Copy link
Contributor

@akrem-chabchoub akrem-chabchoub left a 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

@janos janos requested a review from akrem-chabchoub January 26, 2026 19:49
janos added 2 commits January 26, 2026 23:16
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.
@janos janos merged commit 5ad0417 into master Jan 27, 2026
17 checks passed
@janos janos deleted the fix/bee260-semver-prerelease-comparison-hive branch January 27, 2026 11:58
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.

6 participants