ewasm / testnet

Testnet planning & documentation
64 stars 19 forks source link

[WIP] Add Docker file for cpp-eth with hera and jsonrpcproxy #16

Closed jwasinger closed 6 years ago

jwasinger commented 6 years ago

It would be nice to use docker containers in the testnet for ease of deployment. This PR adds a docker file for cpp-ethereum with hera (and soon jsonrpcproxy).

Right now, I'm running into an issue where the IPC file that CPP-eth uses for RPC cannot be used externally from the host that is running the container.

Example:

docker run -v /tmp/ewasm-node/4201:/tmp/ewasm-node/4201 --ipc=host localhost/cpp-ethereum  > /dev/null 2>&1 &
python3 jsonrpcproxy.py /tmp/ewasm-node/4201/geth.ipc
curl -X POST --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendRawTransaction\",\"params\":[\"f8528085174876e80083100000800a8081a8a08183c7a0aef13ad8513f69a4dafbd48e8700dd228f0243d6290ca8275a0311ada01650bf69d3a8845f9ed91a21c71c1020c9161b96e70abbcd90ea87eaadbd5cbd\"],\"id\":1}" localhost:8545

Log output from jsonrpcproxy.py:

127.0.0.1 - - [19/Feb/2018 22:36:55] "POST / HTTP/1.1" 502 -
127.0.0.1 - - [19/Feb/2018 22:36:55] Backend Error: Unknown error when connecting to '/tmp/ewasm-node/4201/geth.ipc'
axic commented 6 years ago

Can you compare this against #17, comment there if anything is missing and close this if #17 is the successor?