Skip to content

feat: Add P2P network connectivity tests for EVM testnets#20

Open
kingofthebongo2008 wants to merge 3 commits intomainfrom
feature/p2p-network-connectivity-tests
Open

feat: Add P2P network connectivity tests for EVM testnets#20
kingofthebongo2008 wants to merge 3 commits intomainfrom
feature/p2p-network-connectivity-tests

Conversation

@kingofthebongo2008
Copy link
Contributor

Summary

Implements Phase 1 network connectivity validation for P2P message passing across 3 EVM test networks (Sepolia, Polygon Amoy, Base Sepolia).

This PR adds infrastructure to test TCP/UDP connectivity to public bootnode endpoints, validating that network communication is possible before implementing full RLPx protocol handshakes.

Changes

  • ✅ Add TCP/UDP connectivity tests for 6 bootnode endpoints
  • ✅ Add network diagnostics utility for troubleshooting firewall issues
  • ✅ Create automated test scripts for Windows/Linux/macOS
  • ✅ Add comprehensive P2P testing documentation
  • ✅ Configure CMake integration with ENABLE_INTEGRATION_TESTS option

Test Coverage

Ethereum Sepolia (3 bootnodes):

  • 138.197.51.181:30303 (NYC)
  • 146.190.1.103:30303 (SFO)
  • 170.64.250.88:30303 (Sydney)

Polygon Amoy (2 bootnodes):

  • 35.197.249.21:30303 (GCP-1)
  • 34.89.39.114:30303 (GCP-2)

Base Sepolia (1 bootnode):

  • op-sepolia-bootnode-1.optimism.io:9222

Features

  • 🔥 GitHub Actions compatible with graceful UDP degradation
  • 🛡️ TCP-only fallback for restrictive firewalls
  • 🌍 Cross-platform support (Windows/Linux/macOS)
  • ⚡ Fast execution (<60s) suitable for CI pipelines

Test Results (Local)

Overall: 11/13 tests passed (83% success rate)

  • TCP: 5/6 connections successful
  • UDP: 5/6 sends successful
  • Known Issue: Base Sepolia DNS resolution failure (needs alternative bootnode)

Building and Running

# Build integration tests
cmake -DENABLE_INTEGRATION_TESTS=ON ..
cmake --build . --target network_port_test

# Or use standalone build script
scripts/build_integration_tests.bat  # Windows
./scripts/build_integration_tests.sh # Linux/macOS

# Run tests
./build/test/network_port_test
./build/test/network_diagnostics  # Diagnostic utility

Next Steps (Phase 2)

  • Implement full RLPx HELLO message exchange
  • Add DevP2P handshake validation
  • Test peer discovery protocol (Discv4)

Test Plan

[x] Phase 1: Network connectivity validation (this PR)
[ ] Phase 2: RLPx protocol handshake
[ ] Phase 3: Message passing validation
[ ] Phase 4: GitHub Actions CI integration

🤖 Generated with Claude Code

kingofthebongo2008 and others added 3 commits December 7, 2025 09:17
Implements Phase 1 network connectivity validation for P2P message
passing across 3 EVM test networks (Sepolia, Polygon Amoy, Base Sepolia).

Changes:
- Add TCP/UDP connectivity tests for 6 bootnode endpoints
- Add network diagnostics utility for troubleshooting
- Create automated test scripts for Windows/Linux/macOS
- Add comprehensive P2P testing documentation
- Configure CMake integration with ENABLE_INTEGRATION_TESTS option

Test Coverage:
- Ethereum Sepolia (3 bootnodes): 138.197.51.181, 146.190.1.103, 170.64.250.88
- Polygon Amoy (2 bootnodes): 35.197.249.21, 34.89.39.114
- Base Sepolia (1 bootnode): op-sepolia-bootnode-1.optimism.io

Features:
- GitHub Actions compatible with graceful UDP degradation
- TCP-only fallback for restrictive firewalls
- Cross-platform support (Windows/Linux/macOS)
- Fast execution (<60s) suitable for CI pipelines

Test results: 11/13 tests passed locally (83% success rate)
- 5/6 TCP connections successful
- 5/6 UDP sends successful
- Base Sepolia DNS resolution issue identified

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

1 participant