docker sepolia chain does not work
Summary:
Access to mainnet node works on both localhost (Mac) and from inside docker. Access to sepolia, only works from localhost.
On my Macintosh, I can do:
curl -H "Content-Type: application/json" -d '{"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}' http://localhost:30305
and get block 12 from Sepolia. I can also do
curl -H "Content-Type: application/json" -d '{"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}' http://localhost:23456
To get block 12 from mainnet.
If I log into the docker image, I can do:
curl -H "Content-Type: application/json" -d '{"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}' http://host.docker.internal:23456
And I get block 12 from mainnet.
If I try:
curl -H "Content-Type: application/json" -d '{"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}' http://host.docker.internal:30305
from the same docker image, I get invalid host specified.
Hm, I was able to reach Sepolia RPC running on localhost (Erigon). Maybe there are some additional checks/firewall between you and your endpoint? Could you try starting Sepolia locally with ./build/bin/erigon --http.api=eth,debug,net,trace,web3,erigon --chain=sepolia --datadir /tmp/datadir and reaching it as host.docker.internal:8545?
Let's review this tomorrow (Monday, Jan 2). It's still not working for me.