Configure and Run Public Full Node

You can run FullNodes to verify the state and synchronize to the Diem Blockchain. FullNodes can be run by anyone. FullNodes replicate the full state of the blockchain by querying each other, or by querying the validators directly.

This tutorial details how to configure a public FullNode to connect to testnet, the Diem Payment Network’s public test network.

Note: Your public FullNode will be connected to testnet with a JSON-RPC endpoint accessible on your computer at localhost:8080.


Before you get started with this tutorial, we recommend you familiarize yourself with the following:

Getting started#

You can configure a public FullNode in two ways: using the Diem Core source code or Docker.

Using Diem Core source code#

  1. Download and clone the Diem Core repository from GitHub and prepare your developer environment by running the following commands:

    git clone
    cd diem
    source ~/.cargo/env
  2. Checkout the branch for testnet using git checkout origin/testnet.

  3. To prepare your configuration file:

    • Copy config/src/config/test_data/public_full_node.yaml to your current working directory.

    • Download genesis and waypoint files for testnet.

    • Update the public_full_node.yaml file in your current working directory by:

      • Specifying the directory where you want testnet to store its database next to base:data_dir; for example, ./data.

      • Copying and pasting the contents of the waypoint file linked in step 2 next to waypoint field.

      • Adding the path where your Genesis file is located to genesis_file_location.

      • Adding the following under full_node_networks.

        - "/dns4/"
      • Reading through the config and making any other desired changes. You can see what configurations the public_full_node.yaml file should have by checking the following file as an example: docker/compose/public_full_node/public_full_node.yaml

  4. Run the libra-node using cargo run -p diem-node -- -f ./public_full_node.yaml

You have now successfully configured and started running a public FullNode in testnet.

Using Docker#

You can also use Docker to configure and run your PublicFullNode.

  1. Install Docker and Docker-Compose.
  2. Create a directory for your public FullNode composition.
  3. Download the public FullNode docker compose and libra configuration files into the directory created in step 2.
  4. Download genesis and waypoint files for testnet into that directory.
  5. Run docker-compose: docker-compose up.

Understand and verify the correctness of your FullNode#

Initial synchronization#

During the initial synchronization of your FullNode, there may be a lot of data to transfer.

  • The Executor component will update the output log by showing that 250 blocks are committed at a time:

    fullnode_1 | INFO 2020-09-28T23:16:04.425083Z execution/executor/src/ sync_request_received {"local_synced_version":633750,"name":"chunk_executor","first_version_in_request":633751,"num_txns_in_request":250}
    fullnode_1 | INFO 2020-09-28T23:16:04.508902Z execution/executor/src/ sync_finished {"committed_with_ledger_info":false,"name":"chunk_executor","synced_to_version":634000}
  • At the same time, the StateSync component will output similar information but show the destination.

  • The blockchain (testnet) ledger’s volume can be monitored by entering the container:

    # Obtain the container id:
    id=$(docker container ls | grep public_full_node_fullnode_1 | grep -oE "^[0-9a-zA-Z]+")
    # Enter the container:
    docker exec -it $id /bin/bash
    # Observe the volume (ledger) size:
    du -cs -BM /opt/diem/data
tags: node#
Ask the community for support