Languages
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 document. 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:
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.
For server requirements, please refer to AWS m5a.large or Alibaba Cloud ecs.t5
$ mkdir -p newchain && cd newchain
For Mainet
$ curl -L https://release.cloud.diynova.com/newton/newchain-deploy/mainnet/newchain.sh | sudo bash
For Testnet
$ curl -L https://release.cloud.diynova.com/newton/newchain-deploy/testnet/newchain.sh | sudo bash
3.1 Execute following command to check the synchronized block height
$ sudo supervisorctl tail -f newchain stderr
3.2 Make sure the synchronized block height is consistent with the NewExplorer latest block height (MainNet, Testnet)
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
$ 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
Set keystore password twice and keep keystore, password and miner address. The password shall not be void.
Run following code to get keystore and store it securely
For Mainet
$ cat /data/newchain/mainnet/nodedata/keystore/*
For Testnet
$ cat /data/newchain/testnet/nodedata/keystore/*
Run following code to get password and store it securely
For Mainet
$ cat /data/newchain/mainnet/password.txt
For Testnet
$ 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.
Apply for mainnet|testnet ledger node
/data/newchain/mainnet/bin/geth attach /data/newchain/mainnet/nodedata/geth.ipc --exec 'clique.propose("MinnerAddress", true)'
For Mainnet
$ /data/newchain/mainnet/bin/geth attach /data/newchain/mainnet/nodedata/geth.ipc --exec 'clique.getSigners()'
For Testnet
$ /data/newchain/testnet/bin/geth attach /data/newchain/testnet/nodedata/geth.ipc --exec 'clique.getSigners()'
NewChain JSON-RPC uses HTTP protocol port 8801, which you can use in NewSDK
$ sudo supervisorctl start newchain
$ sudo supervisorctl stop newchain