From 7caca48ca340c6ed0641e1ed156ccaaf03e3dbd9 Mon Sep 17 00:00:00 2001 From: liukeke Date: Thu, 13 Oct 2022 15:09:23 +0800 Subject: [PATCH] fix: run a node --- .../developers/docs/run-a-node/index.md | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/newton-website/src/content/developers/docs/run-a-node/index.md b/newton-website/src/content/developers/docs/run-a-node/index.md index 485abd1..9925df7 100644 --- a/newton-website/src/content/developers/docs/run-a-node/index.md +++ b/newton-website/src/content/developers/docs/run-a-node/index.md @@ -8,29 +8,27 @@ sidebar: true NewChain nodes are the key co-constructers of Newton infrastructure. Newton NewChain Testnet and Mainnet are opened to the community, individual can deploy Testnet and Mainnet according to the instructions specified in this repo. Afer deploying the NewChai Mainnet, the Mainnet ledger nodes can produce blocks and get NEW as the transaction fees from every transaction. -In current stage, NewChain MainNet still run with PoA (Proof-of-Authority) consensus mechanism for producing blocks. There are two prerequisites for running a Mainnet ledger node: +In current stage, NewChain MainNet still run with PoA (Proof-of-Authority) consensus mechanism for producing blocks. There are two prerequisites for running a Mainnet ledger node: -1. NewChain Mainnet ledger nodes shall run a NewChain Testnet node first, ensuring the stability of the network. -2. NewChain Mainnet ledger nodes shall stake 10 million NEW in NewPay, avoiding any harm from the potential dishonest participant. +**1. NewChain Mainnet ledger nodes shall run a NewChain Testnet node first, ensuring the stability of the network.** -## Requirements +**2. NewChain Mainnet ledger nodes shall stake 10 million NEW in NewPay, avoiding any harm from the potential dishonest participant.** -#### 1. Recommended specifications - -- System OS: Ubuntu 18.04 LTS 64-bit or Ubuntu 16.04 LTS 64-bit -- Processor: 2-core CPU -- Memory: 8GB RAM -- Storage: 150GB available space SSD for mainnet and 150GB for testnet -- Internet: Public IP +### Requirements -For server requirements, please refer to AWS m5a.large or Alibaba Cloud ecs.t5 +#### 1. Recommended specifications + - System OS: Ubuntu 18.04 LTS 64-bit or Ubuntu 16.04 LTS 64-bit + - Processor: 2-core CPU + - Memory: 8GB RAM + - Storage: 150GB available space SSD for Mainnet and 150GB for Testnet + - Internet: Public IP + For server requirements, please refer to AWS m5a.large or Alibaba Cloud ecs.t5 #### 2. System configuration -- System data disk: /data directory is the mount point of the system data disk -- Firewall: The firewall needs to open port 38311 of UDP and TCP and port 8801(8808 for testnet) of TCP - -## Deploying a read-only node + - System data disk: /data directory is the mount point of the system data disk + - Firewall: The firewall needs to open port 38311 of UDP and TCP and port 8801(8808 for Testnet) of TCP +### Deploying a read-only node #### 1. Create a working directory and enter it @@ -60,9 +58,9 @@ $ curl -L https://release.cloud.diynova.com/newton/newchain-deploy/testnet/newch $ sudo supervisorctl tail -f newchain stderr ``` -3.2 Make sure the synchronized block height is consistent with the NewExplorer([Mainnet](https://explorer.newtonproject.org/), [testnet](https://explorer.testnet.newtonproject.org/)) latest block height +3.2 Make sure the synchronized block height is consistent with the NewExplorer latest block height (MainNet, Testnet) -## Deploying a ledger node +### Deploying a ledger node #### If you only want to run a read-only node, skip these steps. @@ -74,7 +72,7 @@ For Mainnet $ cd /data/newchain/mainnet/ && curl -L https://release.cloud.diynova.com/newton/newchain-deploy/mainnet/newchain-mine.sh -o newchain-mine.sh && chmod +x newchain-mine.sh && ./newchain-mine.sh ``` -For testnet +For Testnet ```bash $ cd /data/newchain/testnet/ && curl -L https://release.cloud.diynova.com/newton/newchain-deploy/testnet/newchain-mine.sh -o newchain-mine.sh && chmod +x newchain-mine.sh && ./newchain-mine.sh @@ -94,7 +92,7 @@ For Mainet $ cat /data/newchain/mainnet/nodedata/keystore/* ``` -For testnet +For Testnet ```bash $ cat /data/newchain/testnet/nodedata/keystore/* @@ -110,7 +108,7 @@ For Mainet $ cat /data/newchain/mainnet/password.txt ``` -For testnet +For Testnet ```bash $ cat /data/newchain/testnet/password.txt @@ -118,11 +116,11 @@ $ cat /data/newchain/testnet/password.txt You are responsible for storing your keystore and password safely. It’s important to keep your digital assets safe, just like you would your physical assets. -#### 3.Click the blow link to submit a issue, fill the required information and wait for the existing ledger node to be approved +#### 3. Click the blow link to submit a issue, fill the required information and wait for the existing ledger node to be approved [Apply for mainnet|testnet ledger node](https://github.com/newtonproject/newchain-nodes/issues/new/choose) -#### You can also apply to become a testnet node in the following ways +#### You can also apply to become a Testnet node in the following ways ##### 3.1 Replace MinnerAddress in the following command with your miner address @@ -138,23 +136,23 @@ You are responsible for storing your keystore and password safely. It’s import #### 4. Verify if your own node has become a ledger node -For mainnet +For Mainnet ```bash $ /data/newchain/mainnet/bin/geth attach /data/newchain/mainnet/nodedata/geth.ipc --exec 'clique.getSigners()' ``` -For testnet +For Testnet ```bash $ /data/newchain/testnet/bin/geth attach /data/newchain/testnet/nodedata/geth.ipc --exec 'clique.getSigners()' ``` -## Use NewChain +### Use NewChain -NewChain's JSON RPC uses HTTP protocol port 8801(8808 for testnet), which you can use in [NewSDK](https://github.com/newtonproject/newchain-sdk-example) +NewChain's JSON RPC uses HTTP protocol port 8801(8808 for Testnet), which you can use in [NewSDK](https://github.com/newtonproject/newchain-sdk-example) -## Operations and maintenance +### Operations and maintenance #### 1. Start NewChain