Skip to content

Commit

Permalink
fix: run a node
Browse files Browse the repository at this point in the history
  • Loading branch information
liukeke-start committed Oct 13, 2022
1 parent 152748c commit 7caca48
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions newton-website/src/content/developers/docs/run-a-node/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 (<a href="https://explorer.newtonproject.org/">MainNet</a>, <a href="https://explorer.testnet.newtonproject.org/">Testnet</a>)

## Deploying a ledger node
### Deploying a ledger node

#### If you only want to run a read-only node, skip these steps.

Expand All @@ -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
Expand All @@ -94,7 +92,7 @@ For Mainet
$ cat /data/newchain/mainnet/nodedata/keystore/*
```

For testnet
For Testnet

```bash
$ cat /data/newchain/testnet/nodedata/keystore/*
Expand All @@ -110,19 +108,19 @@ For Mainet
$ cat /data/newchain/mainnet/password.txt
```

For testnet
For Testnet

```bash
$ 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

Expand All @@ -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

Expand Down

0 comments on commit 7caca48

Please sign in to comment.