Darwinia Documentation
  • Home
  • Blog
  • Wiki
  • Crab Network
  • Developers
  • Languages iconEnglish
    • 中文

›Tutorials

Crab Network

  • Crab Network
  • Tools
  • Airdrop
  • Parameters
  • Tutorials

Tutorials

  • Create an Account
  • Get free cRing
  • Claim cRing
  • Become a nominator
  • Running a node
  • Become a validator
  • Become a relayer
  • Participate in governance
Edit

How to run a node

Initial Set-up

Choose one of the following two ways to obtain an executable file

1.Compile from source

  • Compiler environment configuration. Refer to sections 4.1 to 4.1.3 https://github.com/darwinia-network/darwinia#41-hacking-on-darwinia
  • Start command
  • Enter the darwinia root directory
  • cargo build --release
  • The compiled executable file darwinia (.exe) can be found under darwinia / target / release

2.Download the compiled executable file

  • macOS Catalina: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-catalina.tar.gz
  • ArchLinux: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-archlinux.tar.gz
  • Ubuntu: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-ubuntu.tar.gz
  • CentOS: https://github.com/darwinia-network/darwinia/releases/download/v0.6.7/darwinia-centos7.tar.gz
  • Docker: docker pull darwinianetwork/darwinia:release-v0.6.7

Start Parameters

Choose one of the following two starting methods

1.Read the configuration and start from the file (Not currently supported)

If not in the same folder, it is best to fill in the absolute path.

darwinia --conf=example.json

Example configuration file example.json:

{
    "validator": true,
    "base-path": "/tmp/example",
    "bootnodes": [
        "/ip4/0.0.0.0/tcp/0/p2p/aaa",
        "/ip4/0.0.0.1/tcp/0/p2p/bbb",
        "/ip4/0.0.0.2/tcp/0/p2p/ccc"
    ],
    "name": "Example"
}

2.Read the configuration from the command line and start

./darwinia \
    -d /tmp/example \
    --bootnodes /ip4/0.0.0.0/tcp/0/p2p/xxx \
    --name Example

Common parameters

parameterAnnotateSubparameterSubparameter type
validatorThe node type is the validator node//
rpc-externalTo monitor all rpc, the verifier node needs to use --unsafe-rpc-external but it is not recommended to enable the verifier node//
ws-externalTo monitor all ws, the verifier node needs to use --unsafe-ws-external but it is not recommended to enable the verifier node//
portp2p portport numbernumber
rpc-portrpc portport numbernumber
ws-portws portport numbernumber
base-pathAddress for storing various data used in the chainpathString
nameNode nameNode nameString
rpc-corsRequest header whitelistFilter typeenumerate
bootnodesThe seed node used to obtain startup data(/ip4/0.0.0.0/tcp/0/p2p/xxx)Node URLString array

View all parameter descriptions:

./darwinia --help

Start Node

Start Command

./darwinia \
    -d /tmp/example \
    --bootnodes /ip4/0.0.0.0/tcp/0/p2p/xxx \
    --name Example

It is recommended to use systemctl, pm2, screen and other tools to maintain the process.

Bootnodes

To avoid some seed nodes being fully connected, the following alternatives are provided, and you can choose to fill in bootnodes at will:

# maintain by @AurevoirXavier
/ip4/49.234.225.216/tcp/30333/p2p/12D3KooWFHNgAmrphmgcgukREKRrwWn6pZ6qQ8eFVXsRdnUQKZvL
/ip4/106.54.116.32/tcp/30333/p2p/12D3KooWKhcHAUCs2CUGA5NtRnRRarL4C5U7fVB4ycmHxDidZsrj
/ip4/35.234.33.88/tcp/30333/p2p/12D3KooWMCTzZVwJCafwPVQGxr8CkSK1VKmg5pbhjKjqgEwhywSe
# maintain by @clearloop
/ip4/122.152.213.162/tcp/30333/p2p/QmWfdcdFaiCr6gfJvh7jjmQ6hUGshA4BrGSLSDMuFBf823
# maintain by @HackFisher
/ip4/104.199.197.8/tcp/20222/p2p/Qmc9tW5xSVUH1EBdH8WEE5nYAuswGrRvtYZ93MAwH9fsZo
/ip4/104.199.197.8/tcp/30333/p2p/QmURDEZxHHVguYpfaDRAYfqYJSZT5LuBtK4mD7GXhfehtp
# maintain by @yanganto
/ip4/220.134.22.36/tcp/30333/p2p/Qme2VxbvZFxNbF3xKxWBQczRzbcudmny9n3eSube73ZmEw

Q&A

  • Q: Unable to start node

  • A:

    1. Confirm that the system supports the executable file
    2. Some dynamic link library dependencies are missing, installation dependencies
  • Q: Why does my node not synchronize blocks

  • A:

    1. Check if bootnodes are filled in incorrectly
    2. Poor network communication with the target node, try other bootnodes
    3. The number of target node connections is full, try other bootnodes
    4. Confirm that the version numbers are consistent (in most cases, they do not need to be identical)
  • If there are still problems, welcome [Submit issue](https://github.com/darwinia-network/darwinia/issues/new)

Last updated on 2020-8-27
← Become a nominatorBecome a validator →
  • Initial Set-up
    • Choose one of the following two ways to obtain an executable file
  • Start Parameters
    • Choose one of the following two starting methods
    • Common parameters
  • Start Node
    • Start Command
    • Bootnodes
    • Q&A
Links
BlogOfficial WebsiteDarwinia Wallet Apps
Darwinia Documentation
Follow @DarwiniaNetwork
Star
Copyright © 2021 Darwinia Network