Starcoin Wiki
MoveMove 社区Aptos WikiSui Wiki
English
English
  • 🎉Welcome
  • 💫Overview
    • Vision & Mission
    • White Paper
  • 📖Get Started
    • Wallet
      • StarMask
      • OneKey
    • Trading
    • Run Node
      • Windows
        • Run a node on Windows
        • Upgrade & Migrate a node on Windows
      • Docker
        • Run a node with Docker
        • Upgrade & Migrate a node with Docker
      • FAQ
    • Block Explorer
  • ⛏️Mining
    • GoldShell S1 Mini
    • GoldShell STC Box
    • Mining on CPU
    • Mining on GPU
  • 🏛️Governance
    • Poll
    • Airdrop
    • Grants
  • 🏞️Eco
    • Move
    • DeFi
      • BFly
      • WENWEN Protocol
    • Swap
      • Starswap
      • Kikoswap
      • Aswap
    • NFT
      • CyberRare
      • KikoVerse
    • GameFi
      • Arm Wrest War
Powered by GitBook
On this page
  • What happened to the node synchronization process? How long does it take to sync?
  • How to speed up the synchronization of block data?
  • Solution
  • Steps

Was this helpful?

Edit on GitHub
  1. 📖Get Started
  2. Run Node

FAQ

PreviousUpgrade & Migrate a node with DockerNextBlock Explorer

Last updated 2 years ago

Was this helpful?

What happened to the node synchronization process? How long does it take to sync?

Connect to the node console and execute the following command:

Not sure how to enter the console? You can refer to the following tutorials:

  • How to enter the console of the node with Docker,

  • How to enter the console of the node on Windows,

node sync status

Execute the above command to see the current block height:

node sync status

Sliding to the last line, there are two results:

  • Result 1: If the content in the screenshot below is returned, it means that during synchronization, the synchronization is completed when chain_status.head.number and state.Synchronizing.target.number are the same.

  • Result 2: Synchronization complete

Answer: Execute the above command to view the synchronization progress. The synchronization time can be estimated by yourself according to the command execution result.

How to speed up the synchronization of block data?

Solution

Download the mainnet block data of other nodes to the new node, and start the node with the downloaded block data.

Steps

2.1 Download the Starcoin Node Data Export Tool

Download the starcoin_db_exporter node data export tool, this is a must, and the synchronization script needs to be used.

$ wget https://github.com/starcoinorg/starcoin/releases/download/v1.11.9/starcoin-ubuntu-18.04.zip
$ unzip starcoin-ubuntu-18.04.zip
$ cp starcoin-artifacts/starcoin_db_exporter starcoin_db_exporter

Download block data

First download the official synchronization script tool:

$ wget https://raw.githubusercontent.com/starcoinorg/starcoin/master/scripts/import_block.sh

Grant the script execution permission and start downloading the mainnet block data to the /data/starcoin/main directory and import:

$ chmod 755 import_block.sh
$ ./import_block.sh main /data/starcoin/main

Hint:

  • main: main is the main network. You can replace it with testnet, such as: barnard, proxima, halley.

  • /data/starcoin/main: Custom block data directory;

Run a new node

Once the script has finished running, it's time to run the new node.

Let's use Docker to run the new node. If it is Windows, you can refer to the running command in the previous article.

$ sudo docker run --restart=always \
    --name starcoin-main \
    -d -p 9880:9880 \
    -v /data/starcoin/:/data/starcoin/ \
    starcoin/starcoin \
    /starcoin/starcoin \
    -n main \
    -d /data/starcoin \
    --disable-metrics true \
    --stratum-address 0.0.0.0 --stratum-port 9880 \
    --miner-thread 0

node synchronizing
node Synchronized
import db file
click here
click here