feat: add Docker router-based testbed#18
Conversation
|
does this work now? |
Add a Docker-based testbed mode (--docker) with a single router container that simulates realistic network conditions: - Router assigns virtual public IPs from scattered /8 ranges via iptables - Three node types: public (full DNAT), port-forwarded (DNAT on discv5 UDP port only), NATted (SNAT only, no inbound) - Per-node network latency via tc netem - Public IPs and latencies configurable from file or generated New config parameters: nattedNodes, portForwardedNodes, minLatencyMs, maxLatencyMs, publicIpFile, latencyFile. Replaces the old NetworkDocker class which used per-node bridge networks with private IPs (172.20.x.x) that bypassed IP diversity scoring. Closes #17.
i dont think so. it needs to be completed and tested |
|
Closing in favor of #51, which simplifies the Docker testbed by dropping NAT entirely. The router-based design here (single router container with iptables NAT classes for #51 keeps what mattered:
…and drops the rest:
Net change vs this PR: ~⅓ the testbed code. Easier to reason about, no privileged host setup beyond The testbed scope here drifted away from what's actually useful for protocol testing. #51 reflects the simpler scope. Will validate on a Linux host before marking #51 ready for review. |
Summary
--docker) with a single router container simulating diverse public IPs and NAT behaviors via iptablesNew files
testbed/docker/node/Dockerfile+entrypoint.sh— geth devp2p node containertestbed/docker/router/Dockerfile+entrypoint.sh— iptables NAT rules enginetestbed/discv5-docker-config.json— example config with NAT paramstestbed/testbed/network.pywithNetworkDockerRouterclasstestbed/README.mdwith full documentationTest plan
Closes #17