aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-04-18 14:30:09 +0800
committerMission Liao <mission.liao@dexon.org>2019-04-18 14:30:09 +0800
commitf5e269a9eda2f6dab322106229613d4d3ad073e5 (patch)
tree7fa5b8a60164b60d3b621065e15f85aa49de51c8
parent3d0a2fc8a75b7c5eded7b430f17f3d9aa2175529 (diff)
downloaddexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.tar
dexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.tar.gz
dexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.tar.bz2
dexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.tar.lz
dexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.tar.xz
dexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.tar.zst
dexon-wiki-f5e269a9eda2f6dab322106229613d4d3ad073e5.zip
Initial commit for RPC node OP guide
-rw-r--r--DEXON-RPC-Node-Operation-Guide.md57
1 files changed, 57 insertions, 0 deletions
diff --git a/DEXON-RPC-Node-Operation-Guide.md b/DEXON-RPC-Node-Operation-Guide.md
index 8438159..2538e20 100644
--- a/DEXON-RPC-Node-Operation-Guide.md
+++ b/DEXON-RPC-Node-Operation-Guide.md
@@ -1 +1,58 @@
# Running a RPC node
+
+## Content
+
+- [Overview](#overview)
+- [System Requirement](#system-requirement)
+- [Software Instruction](#software-instruction)
+
+## System Requirement
+
+Refer to [System requirement](https://dexon-foundation.github.io/wiki/DEXON-BP-Node-Operation-Guide.html#system-requirement) section in BP node operation guide.
+
+## Software Instruction
+
+Different from running a BP node, you don't have to
+- create a node key
+- register your node
+
+The command line to start the node is different.
+```
+docker run -v $PWD:/mnt -it dexonfoundation/dexon \
+ --datadir=/mnt/datadir \
+ --syncmode=fast \
+ --rpc \
+ --rpcapi=eth,net,web3 \
+ --rpcaddr=0.0.0.0 \
+ --rpcvhosts=* \
+ --rpccorsdomain=* \
+ --ws \
+ --wsapi=eth,net,web3 \
+ --wsaddr=0.0.0.0 \
+ --wsorigins=* \
+ --cache=1024 \
+ --gcmode=archive \
+ --metrics \
+ --pprof \
+ --pprofaddr=0.0.0.0
+```
+You should be able to see these logs, which simply means your RPC node tries to sync blocks from other peers and it would take a while.
+```
+...
+INFO [04-18|12:23:33.783] Imported new state entries ...
+INFO [04-18|12:23:35.647] Imported new state entries ...
+INFO [04-18|12:23:37.714] Imported new block receipts ...
+INFO [04-18|12:23:38.471] Imported new block receipts ...
+...
+```
+To make sure your RPC node is ready for usage, you can try to get current block number it holds via this command:
+```
+curl -X POST \
+ -H "Content-Type: application/json" \
+ --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
+ http://localhost:8545
+```
+You should be able to see something similar in return:
+```
+{"jsonrpc":"2.0","id":1,"result":"0xd482e"}
+``` \ No newline at end of file