Skip to main content

Run a Follower Node

This guide will help you set up and run a Movement follower node. The Bardock Testnet and Mainnet currently support this feature. Learn more about Node architecture here. For simplicity we have provided instructions for deploying using an Ansible script below.

Hardware Recommendations

  • 32 cores
  • 64 GB RAM
  • 2 TB SSD w/ 60K IOPS and 200 MiB/s throughput

Deployment

Clone Movement Repository


git clone https://github.com/movementlabsxyz/movement
cd movement

Configuration

To access to the leader DA to get blocks, the follower IP must be declared in the white access list. Contact Movement to add the access.

Update the variables below in the movement-full-follower.yml file for Mainnet. This is located in docs/movement-node/run/ansible/follower-node/mainnet or docs/movement-node/run/ansible/follower-node/ depending on if you are deploying to mainnet or testnet.

Mainnet Configuration


vars:
repo_url: "https://github.com/movementlabsxyz/movement"
destination_path: "/home/{{ user }}/movement"
movement_sync: 'follower::mainnet-l-sync-bucket-sync<=>{default_signer_address_whitelist,maptos,maptos-storage,suzuka-da-db}/**'
chain_id: "126"

movement_da_light_node_connection_protocol: "https"
movement_da_light_node_connection_hostname: "m1-da-light-node.mainnet"
movement_da_light_node_connection_port: "443"

aws_region: "us-west-1"
rev: "{{ movement_container_version }}"

Bardock Testnet Configuration


vars:
repo_url: "https://github.com/movementlabsxyz/movement"
destination_path: "/home/{{ user }}/movement"
movement_sync: "follower::mtnet-l-sync-bucket-sync<=>{maptos,maptos-storage,suzuka-da-db}/**"
chain_id: "250"

movement_da_light_node_connection_protocol: "https"
movement_da_light_node_connection_hostname: "m1-da-light-node.testnet.bardock.movementnetwork.xyz"
movement_da_light_node_connection_port: "443"

aws_region: "us-west-1"
rev: "{{ movement_container_version }}"

To synchronize from genesis you need to remove this variable from movement-full-follower.service.j2 file. Remove this line:

Environment="MOVEMENT_SYNC={{ movement_sync }}"

Fetching the Latest Container Revision

Please use the revision below:

6e00b778ee7d8139b153aa4eb80805aead07e252

Generally, you should be able to use the latest revision by running the following command:


CONTAINER_REV=$(git rev-parse HEAD)
echo "CONTAINER_REV=${CONTAINER_REV}"

Sample Deployment Scripts

Mainnet


ansible-playbook --inventory <inventory_url>, \
--user <user> \
--extra-vars "movement_container_version=6e00b778ee7d8139b153aa4eb80805aead07e252" \
--extra-vars "user=<user>" \
docs/movement-node/run/ansible/follower-node/mainnet/movement-full-follower.yml \
--private-key <pem_file>

info

Please generate a private key through your cloud provider. The example scripts use a PEM file generated by AWS.

Replace the following:

  • <inventory_url>: The URL or IP of your inventory.
  • <user>: Your username.
  • <pem_file>: Your private key file.

Example:


ansible-playbook --inventory ec2-18-144-5-233.us-west-1.compute.amazonaws.com, \
--user rahat \
--extra-vars "movement_container_version=6e00b778ee7d8139b153aa4eb80805aead07e252" \
--extra-vars "user=rahat" \
docs/movement-node/run/ansible/follower-node/mainnet/movement-full-follower.yml \
--private-key rahat_deployment_test.pem

Bardock Testnet

For Bardock Testnet, please use the following example:


ansible-playbook --inventory ec2-18-144-5-233.us-west-1.compute.amazonaws.com, \
--user rahat \
--extra-vars "movement_container_version=6e00b778ee7d8139b153aa4eb80805aead07e252" \
--extra-vars "user=rahat" \
docs/movement-node/run/ansible/follower-node/movement-full-follower.yml \
--private-key rahat_deployment_test.pem

After installation

If the service doesn't start, often it's because the config.json file hasn't been created correctly.

To solve the issue replace the provided config.json in the $HOME/.movement folder and start the service with the command:

systemctl start movement-full-follower.service 

Verify Deployment

  • Connect to your instance (in the above example I ssh into my instance)
  • run the command curl localhost:30731/v1
  • Output should be similar to this:

{"chain_id":126,"epoch":"1","ledger_version":"9","oldest_ledger_version":"0","ledger_timestamp":"1732636319660843","node_role":"validator","oldest_block_height":"0","block_height":"3","git_hash":"9dfc8e7a3d622597dfd81cc4ba480a5377f87a"}

Compare to:

Run Locally

It is easiest to gain quick familiarity with the Movement Follower Node by running it locally.

To do this, ensure you have nix installed. We recommend the Determinate Systems nix installation script. You can find it here.


curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

After installing nix, clone the Movement repository and open the nix-shell environment.


# if you have not cloned the repository yet
git clone https://github.com/movementlabsxyz/movement
cd movement
git checkout 6e00b778ee7d8139b153aa4eb80805aead07e252
nix develop

This should install all dependencies needed to work on the Movement Follower Node.

You can now either run the follower node natively or with our containers via the provided just commands.

First create, an environment file for the follower node. The example below is for the Movement Testnet Bardock. Comments are made on how to change the environment file for other networks.

CONTAINER_REV=6e00b778ee7d8139b153aa4eb80805aead07e252
DOT_MOVEMENT_PATH=./.movement
MAPTOS_CHAIN_ID=250 # change this to the chain id of the network you are running
MOVEMENT_DA_LIGHT_NODE_CONNECTION_PROTOCOL=https
MOVEMENT_DA_LIGHT_NODE_CONNECTION_HOSTNAME="m1-da-light-node.testnet.bardock.movementnetwork.xyz" # change this to the hostname of the Movement DA Light Node service on network you are running
MOVEMENT_DA_LIGHT_NODE_CONNECTION_PORT=443

To run natively you can use the following command:


source .env
just movement-full-node native build.setup.follower -t=false

To run with containers you can use the following command:


just movement-full-node docker-compose follower

To check on the status of the service under either runner, run:


curl localhost:30731/v1

You should see a ledger_version field CLOSE to the other values on the network, e.g., https://aptos.testnet.bardock.movementlabs.xyz/v1.