Movement Labs LogoMovement Docs
Nodes/Full Node/Run a Full Node/Deploy a Full Node

Using Source Code

Deploy a public fullnode (PFN) by building from aptos-core source code with complete configuration and setup instructions.

To deploy a PFN using the aptos-core source code maintained by movement labs Follow the steps below:

  1. Clone the movement aptos-core repo : git clone https://github.com/movementlabsxyz/aptos-core.git.

  2. Go in aptos-core directory: cd aptos-core.

  3. Check out the l1-mgiration branch using git checkout --track origin/l1-migration

  4. Next, download the genesis.blob, waypoint.txt, genesis_waypoint.txt files for the network your PFN will connect to:

    • Run this command to download the genesis blob:

    • for testnet:

      curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/genesis.blob
    • for mainnet:

      curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/genesis.blob
    • Run this command to download the waypoint file:

    • for testnet:

      curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/waypoint.txt
    • for mainnet:

      curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/waypoint.txt
  • Run this command to download the genesis_waypoint file: for testnet:
    curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/testnet/genesis_waypoint.txt
    for mainnet:
    curl -O https://raw.githubusercontent.com/movementlabsxyz/movement-networks/main/mainnet/genesis_waypoint.txt

Genesis files repository
To connect to different networks (e.g., testnet, devnet and mainnet), you can find the genesis, waypoint and genesis_waypoint here ➜ https://github.com/movementlabsxyz/movement-networks. Be sure to download the genesis.blob, waypoint.txt and genesis_waypoint.txt for those networks.

  1. Next, run the command below to create a copy of the PFN configuration YAML template:
  • for testnet:
cp config/src/config/test_data/public_full_node_testnet.yaml fullnode.yaml
  • for mainnet:
cp config/src/config/test_data/public_full_node_mainnet.yaml fullnode.yaml
  1. Finally, edit the fullnode.yaml configuration file to ensure that your PFN: (i) contains the files you just downloaded; and (ii) saves the synchronized blockchain data to the location of your choice (on your local machine). To do this:

    1. Specify the correct path to the genesis.blob and genesis_waypoint.txt file you just downloaded by editing execution.genesis_file_location in the fullnode.yaml configuration. By default, it points to genesis.blob in the current working directory.

      execution:
        genesis_file_location: ./genesis.blob # update to your path
        genesis_waypoint: 
          from_file: ./genesis_waypoint.txt
    2. Specify the correct path to the waypoint.txt file you just downloaded by editing base.waypoint.from_file in the fullnode.yaml configuration. By default, it points to waypoint.txt in the current working directory. For example:

      base:
        waypoint:
          from_file: "./waypoint.txt"
    3. Specify the directory on your local machine that you want to store the blockchain database by editing the base.data_dir in the fullnode.yaml configuration. For example, you can create a directory my-full-node/data in your home directory and specify it as:

      base:
        data_dir: "</path/to/my/homedir/my-full-node/data>"
    4. Specify the upstream peer for your PFN. The upstream peer is the node from which your PFN will synchronize blockchain data. It is defined by the peer id and the network DNS_.

      • mainnet: for mainnet the entry point is 9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F and the DNS: consensus.mainnet.movementnetwork.xyz which gives:
      full_node_networks:
        - network_id: "public"
          discovery_method: "none"
          listen_address: "/ip4/0.0.0.0/tcp/6182"
          seeds:
            9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F:
              addresses:
              - "/dns/consensus.mainnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
              role: "Upstream"
      • testnet: for testnet the entry point is 9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F and the DNS: consensus.testnet.movementnetwork.xyz which gives:
      full_node_networks:
        - network_id: "public"
          discovery_method: "none"
          listen_address: "/ip4/0.0.0.0/tcp/6182"
          seeds:
            9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F:
              addresses:
              - "/dns/consensus.testnet.movementnetwork.xyz/tcp/6182/noise-ik/9967EBF40AC8C2CCB38709488952DA1826176584EA3067B63B1695362ECB3D1F/handshake/0"
              role: "Upstream"
      • You can also configure this to point to your own PFN if preferred by adjusting the peer id and DNS.
  2. Start your local public fullnode by running the below command:

cargo run -p aptos-node --release -- -f ./fullnode.yaml

Debugging?
The command above will build a release binary for aptos-node at: aptos-core/target/release/aptos-node. The release binaries tend to be substantially faster than debug binaries but lack debugging information useful for development. To build a debug binary, omit the --release flag from the command above.

On linux to get all the necessary packages run the commands:

sudo apt update
sudo apt install -y binutils build-essential lld pkg-config libdw-dev

You have now successfully configured and started running a PFN in the Movement testnet.

Verify your PFN
If you want to verify that your PFN is running correctly, you can follow the instructions in the Verify a PFN guide.