mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 00:27:38 +00:00
Docker rpc (#3868)
* move name before docker image; add info on how to start gRPC * updates on how to run beacon from docker
This commit is contained in:
parent
7d1633230d
commit
d4e7e15e50
22
README.md
22
README.md
@ -98,12 +98,26 @@ To understand the role that both the beacon node and validator play in Prysm, se
|
|||||||
To start your beacon node, issue the following command:
|
To start your beacon node, issue the following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -v $HOME/prysm-data:/data -p 4000:4000 --name beacon-node \
|
docker run -v $HOME/prysm-data:/data -p 4000:4000 \
|
||||||
|
--name beacon-node \
|
||||||
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
||||||
|
--no-genesis-delay \
|
||||||
--datadir=/data
|
--datadir=/data
|
||||||
```
|
```
|
||||||
|
|
||||||
The beacon node can be halted by either using `Ctrl+c` or with the command:
|
(Optional) If you want to enable gRPC, then run this command instead of the one above:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -v $HOME/prysm-data:/data -p 4000:4000 -p 7000:7000 \
|
||||||
|
--name beacon-node \
|
||||||
|
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
||||||
|
--datadir=/data \
|
||||||
|
--no-genesis-delay \
|
||||||
|
--grpc-gateway-port=7000
|
||||||
|
```
|
||||||
|
|
||||||
|
You can stop the beacon node using `Ctrl+c` or with the following command:
|
||||||
|
=======
|
||||||
|
|
||||||
```
|
```
|
||||||
docker stop beacon-node
|
docker stop beacon-node
|
||||||
@ -121,13 +135,13 @@ To delete a corrupted container, issue the command:
|
|||||||
docker rm beacon-node
|
docker rm beacon-node
|
||||||
```
|
```
|
||||||
|
|
||||||
To recreate a deleted container and refresh the chain database, issue the start command with an additional `--clear-db` parameter:
|
To recreate a deleted container and refresh the chain database, issue the start command with an additional `--force-clear-db` parameter:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -it -v $HOME/prysm-data:/data -p 4000:4000 --name beacon-node \
|
docker run -it -v $HOME/prysm-data:/data -p 4000:4000 --name beacon-node \
|
||||||
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
gcr.io/prysmaticlabs/prysm/beacon-chain:latest \
|
||||||
--datadir=/data \
|
--datadir=/data \
|
||||||
--clear-db
|
--force-clear-db
|
||||||
```
|
```
|
||||||
|
|
||||||
**Docker on Windows:**
|
**Docker on Windows:**
|
||||||
|
@ -17,6 +17,7 @@ IDENTITY="" # P2P private key
|
|||||||
PEERS="" # Comma separated list of peers
|
PEERS="" # Comma separated list of peers
|
||||||
GEN_STATE="" # filepath to ssz encoded state.
|
GEN_STATE="" # filepath to ssz encoded state.
|
||||||
PORT="8000" # port to serve p2p traffic
|
PORT="8000" # port to serve p2p traffic
|
||||||
|
RPCPORT="8001" # port to serve rpc traffic
|
||||||
YAML_KEY_FILE="" # Path to yaml keyfile as defined here: https://github.com/ethereum/eth2.0-pm/tree/master/interop/mocked_start
|
YAML_KEY_FILE="" # Path to yaml keyfile as defined here: https://github.com/ethereum/eth2.0-pm/tree/master/interop/mocked_start
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
@ -28,7 +29,8 @@ usage() {
|
|||||||
echo "--peer=<peer>"
|
echo "--peer=<peer>"
|
||||||
echo "--num-validators=<number>"
|
echo "--num-validators=<number>"
|
||||||
echo "--gen-state=<file path>"
|
echo "--gen-state=<file path>"
|
||||||
port "--port=<port number>"
|
echo "--port=<port number>"
|
||||||
|
echo "--rpcport=<port number>"
|
||||||
}
|
}
|
||||||
|
|
||||||
while [ "$1" != "" ];
|
while [ "$1" != "" ];
|
||||||
@ -53,6 +55,9 @@ do
|
|||||||
--port)
|
--port)
|
||||||
PORT=$VALUE
|
PORT=$VALUE
|
||||||
;;
|
;;
|
||||||
|
--rpcport)
|
||||||
|
RPCPORT=$VALUE
|
||||||
|
;;
|
||||||
--help)
|
--help)
|
||||||
usage
|
usage
|
||||||
exit
|
exit
|
||||||
@ -81,6 +86,7 @@ echo -n "$IDENTITY" > /tmp/id.key
|
|||||||
BEACON_FLAGS="--bootstrap-node= \
|
BEACON_FLAGS="--bootstrap-node= \
|
||||||
--deposit-contract=0xD775140349E6A5D12524C6ccc3d6A1d4519D4029 \
|
--deposit-contract=0xD775140349E6A5D12524C6ccc3d6A1d4519D4029 \
|
||||||
--p2p-port=$PORT \
|
--p2p-port=$PORT \
|
||||||
|
--grpc-gateway-port=$RPCPORT \
|
||||||
--peer=$PEERS \
|
--peer=$PEERS \
|
||||||
--interop-genesis-state=$GEN_STATE \
|
--interop-genesis-state=$GEN_STATE \
|
||||||
--p2p-priv-key=/tmp/id.key \
|
--p2p-priv-key=/tmp/id.key \
|
||||||
|
Loading…
Reference in New Issue
Block a user