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

Get local docker network running again. #2030

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

shawn-zil
Copy link
Contributor

@shawn-zil shawn-zil commented Dec 17, 2024

Took a while to debug this issue - but I observed a lot of TCP retransmissions occurring in the present local docker network using wireshark, which hinted at an underlying networking issue.

Turns out that the nodes were communicating with each other over the gateway acting as a NAT-router. So, they were seeing the gateway IP/port as the remote IP/port. This is fine if it was used for responses (aka NAT) but would have problems if a client tried to initiate a connection to this ephemeral IP/port that isn't listening on the gateway.

This PR does two things:

  • It makes node3 a dependency for all other nodes, as it is the bootstrap node.
  • It manually adds the remote IP/ports to the list of known peers exploiting Identify.
  • It manually adds the external IP/port (as observed from the remote node) to the list of external addresses.

Local docker cluster is starting up again.

I will be working on my #1878 changes on top of this branch. Would be good to get this fix into main.

@shawn-zil shawn-zil force-pushed the 2028-docker-network-misconfig branch from 82e78ca to 4495ac5 Compare December 17, 2024 13:41
@shawn-zil shawn-zil marked this pull request as ready for review December 17, 2024 13:42
@shawn-zil shawn-zil linked an issue Dec 17, 2024 that may be closed by this pull request
@shawn-zil shawn-zil enabled auto-merge December 17, 2024 13:54
Copy link
Contributor

github-actions bot commented Dec 17, 2024

🐰 Bencher Report

Branch2028-docker-network-misconfig
Testbedself-hosted
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
process-empty/process-empty📈 view plot
🚷 view threshold
8,312,800.00
(-9.00%)
10,432,499.46
(79.68%)
produce-full/produce-full📈 view plot
🚷 view threshold
1,739,700,000.00
(-16.98%)
2,803,994,289.61
(62.04%)
🐰 View full continuous benchmarking report in Bencher

@shawn-zil shawn-zil force-pushed the 2028-docker-network-misconfig branch 2 times, most recently from 55dedab to 6050023 Compare December 18, 2024 04:05
@shawn-zil shawn-zil requested a review from 86667 December 18, 2024 09:20
@shawn-zil shawn-zil force-pushed the 2028-docker-network-misconfig branch 3 times, most recently from 378d9b7 to 6e1d1ac Compare December 20, 2024 08:05
@shawn-zil shawn-zil force-pushed the 2028-docker-network-misconfig branch from 6e1d1ac to 36fef87 Compare December 20, 2024 09:46
@shawn-zil shawn-zil added this pull request to the merge queue Dec 20, 2024
Merged via the queue into main with commit 4fc6c61 Dec 20, 2024
6 checks passed
@shawn-zil shawn-zil deleted the 2028-docker-network-misconfig branch December 20, 2024 10:56
@shawn-zil
Copy link
Contributor Author

Just stashing it here that Rust's libp2p implementation implies that Kademlia needs to be hooked up to Identify, manually, which is largely what got added here.
https://docs.rs/libp2p-kad/latest/libp2p_kad/#important-discrepancies

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.

Swarm connectivity seems to be broken
2 participants