Skip to content
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

TestHostIsResolved test fails if running with a public IPv6 #13436

Open
nalepae opened this issue Jan 9, 2024 · 0 comments · May be fixed by #13476
Open

TestHostIsResolved test fails if running with a public IPv6 #13436

nalepae opened this issue Jan 9, 2024 · 0 comments · May be fixed by #13476
Labels
Bug Something isn't working

Comments

@nalepae
Copy link
Contributor

nalepae commented Jan 9, 2024

Describe the bug

TestHostIsResolved test is failing if running with a public IPv6.

Has this worked before in a previous version?

Probably not.

Error

--- FAIL: TestHostIsResolved (0.01s)
    /Users/manu/OffchainLabs/prysm/beacon-chain/p2p/assertions.go:37: discovery_test.go:237 Did not resolve to expected IP, want: 93.184.216.34 (string), got: 192.168.1.30 (string)

Platform(s)

Mac (Apple Silicon)

What version of Prysm are you running? (Which release)

develop

Anything else relevant (validator index / public key)?

Probable root cause:

➜  ~ host example.org
example.org has address 93.184.216.34
example.org has IPv6 address 2606:2800:220:1:248:1893:25c8:1946

https://github.com/prysmaticlabs/prysm/blob/develop/beacon-chain/p2p/discovery.go#L191

ips, err := net.LookupIP(host)

When running with a public IPv6 returns the following ips:

image

  • The first one, once stringified, is equal to 2606:2800:220:1:248:1893:25c8:1946 (the public IPv6 address of example.org).
  • The second one, once stringified, is equal to 93.184.216.34 (the public IPv4 address of example.org).

==> ips contains two elements. The first one is IPv6, the second one is IPv4.

When running with a public IPv4, the order of ips is reversed. First IPv4, then IPv6.

@nalepae nalepae added the Bug Something isn't working label Jan 9, 2024
@psrvere psrvere linked a pull request Jan 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant