lodestar
lodestar copied to clipboard
Sim test cannot be run locally on Mac and Windows
Describe the bug
Currently with how sim test is set up with ethereumjsdocker
, gethdocker
and netherminddocker
, it requires docker to use host network to run.
eg. In gethdocker/post-merge.sh: docker run ... --network host ... $EL_BINARY_DIR ...
Host network driver is not available on Mac and Windows as per https://docs.docker.com/network/network-tutorial-host/#prerequisites . So we can either
- Mention in the contribution doc that
yarn test:sim
is not available in the aforementioned platforms. Which should be fine as contributors rarely need to run sim tests locally but to pass the CI. - Deploy a workaround suggested by the official docker docs which forwards the necessary ports to the host ie.
-p $ETH_PORT:$ETH_PORT -p $ENGINE_PORT:$ENGINE_PORT
. Note this way we will also need to update the address the EL client listens to. For example--http.addr 0.0.0.0 --authrpc.addr 0.0.0.0
for geth.
Expected behavior
To run sim tests yarn test:sim
locally on Macs and Windows without error
Steps to reproduce
No response
Additional context
No response
Operating system
macOS
Lodestar version or commit hash
v1.14.0
I think we should get this fixed (Option 1 or 2) as a lot of contributors likely use Mac for development also. But, I've also never been asked by a community member how to run sim tests locally for development, nor do we require them to for contributions. Is it a worth doing Option 2? Any unintended side effects we can think of for this solution? Or should we just go with Option 1 until somebody asks for this ability in the future?