Skip to content

Fix ipv6 discovery#202

Merged
gfukushima merged 8 commits intomasterfrom
support-ipv6-discovery
Apr 1, 2026
Merged

Fix ipv6 discovery#202
gfukushima merged 8 commits intomasterfrom
support-ipv6-discovery

Conversation

@gfukushima
Copy link
Copy Markdown
Contributor

@gfukushima gfukushima commented Mar 20, 2026

PR Description

Vibe coded fix for the external address selection "bug" that was preventing teku from obtaining the ipv6 from discovery.

Fixed Issue(s)

Part of #10305


Note

Medium Risk
Changes external address auto-selection to update IPv4 and IPv6 ENR fields independently, which can affect how nodes advertise reachable endpoints. Main risk is incorrect ENR updates (e.g., flapping or missing one family) impacting peer connectivity in dual-stack environments.

Overview
Fixes dual-stack external address auto-discovery by selecting the best IPv4 and IPv6 external addresses independently instead of letting one IP family dominate and prevent the other from being published.

DefaultExternalAddressSelector now runs separate vote-based selection for IPv4/IPv6 and updates the corresponding ENR field via a shared maybeUpdateAddress path.

Test utilities and coverage are extended to support IPv6 ENR fields: SimpleIdentitySchemaInterpreter can now create/read udp6 records and preserves the other family when updating an address, and new DefaultExternalAddressSelectorTest cases validate both families can be discovered and that IPv6 selection is independent of IPv4 vote volume.

Written by Cursor Bugbot for commit 7db7228. This will update automatically on new commits. Configure here.

@gfukushima gfukushima marked this pull request as ready for review March 23, 2026 01:44
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread src/test/java/org/ethereum/beacon/discovery/SimpleIdentitySchemaInterpreter.java Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@gfukushima
Copy link
Copy Markdown
Contributor Author

gfukushima commented Mar 24, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Mar 24, 2026
Copy link
Copy Markdown
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM

@gfukushima gfukushima enabled auto-merge (squash) April 1, 2026 01:11
@gfukushima gfukushima merged commit 973e8e0 into master Apr 1, 2026
7 of 8 checks passed
@gfukushima gfukushima deleted the support-ipv6-discovery branch April 1, 2026 01:23
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants