Add WS endpoint to devnode

This commit is contained in:
Leonid Logvinov 2019-02-14 16:41:24 -08:00
parent 4b52f8c823
commit 9a308e25a3
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
3 changed files with 11 additions and 2 deletions

View File

@ -20,6 +20,7 @@ COPY run.sh .
RUN /geth --datadir node0/ init genesis.json RUN /geth --datadir node0/ init genesis.json
EXPOSE 8501 EXPOSE 8501
EXPOSE 8546
EXPOSE 30310 EXPOSE 30310
ENTRYPOINT ./run.sh ENTRYPOINT ./run.sh

View File

@ -18,16 +18,19 @@ docker build -t 0x-devnet .
To start the network, run: To start the network, run:
``` ```
docker run -it --rm -p 8501:8501 0x-devnet docker run -it --rm -p 8501:8501 -p 8546:8546 0x-devnet
``` ```
Depending on your OS and how you installed docker, you may need to prefix any Depending on your OS and how you installed docker, you may need to prefix any
docker commands with `sudo`. docker commands with `sudo`.
The Docker container exposes the JSON RPC API at port 8501, and this is the The Docker container exposes the HTTP JSON RPC API at port 8501, and this is the
primary way you are expected to interact with the devnet. The following primary way you are expected to interact with the devnet. The following
endpoints are supported: `personal,db,eth,net,web3,txpool,miner,debug`. endpoints are supported: `personal,db,eth,net,web3,txpool,miner,debug`.
It also exposes the WS JSON RPC API at port 8546. The following
endpoints are supported: `personal,db,eth,net,web3,txpool,miner,debug`.
You can stop the network with `docker stop` and it will automatically clean up You can stop the network with `docker stop` and it will automatically clean up
after itself. (`docker stop` typically requires you to use `docker ps` to find after itself. (`docker stop` typically requires you to use `docker ps` to find
the name of the currently running container). the name of the currently running container).

View File

@ -17,6 +17,11 @@ mkdir -p /var/log
--rpcport 8501 \ --rpcport 8501 \
--rpcvhosts '*' \ --rpcvhosts '*' \
--rpcapi 'personal,db,eth,net,web3,txpool,miner,debug' \ --rpcapi 'personal,db,eth,net,web3,txpool,miner,debug' \
--ws \
--wsaddr 0.0.0.0 \
--wsport 8546 \
--wsorigins '*' \
--wsapi 'personal,db,eth,net,web3,txpool,miner,debug' \
--networkid 50 \ --networkid 50 \
--gasprice '2000000000' \ --gasprice '2000000000' \
--targetgaslimit '0x4c4b400000' \ --targetgaslimit '0x4c4b400000' \