Skip to main content

Create a Follower Node Instance

The following guide will help you create a Movement follower node instance. To configure and run the node use the following guide (Follower Node Installation). Currently one can run a follower node on mainnet and testnet. 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

Creation

Clone Movement Repository

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

Configuration

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 }}"

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 line from the movement-full-follower.service.j2 file.

Environment="MOVEMENT_SYNC={{ movement_sync }}"

Fetching the Latest Container Revision

Please use the revision below:

0.3.4-amd64

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=d963665" \
--extra-vars "user=<user>" \
docs/movement-node/run/ansible/follower-node/mainnet/movement-full-follower.yml \
--private-key <instance_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 instance private key file.

Example using AWS:

Mainnet

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

Testnet

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

After installation

If the service doesn't start, often it's due to the config.json file not being properly created.

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

systemctl start movement-full-follower.service 

Verify Deployment

  • Connect to your instance (in the above example we ssh into the 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 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 install 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 Movement testnet. Comments are made on how to change the environment file for other networks.

CONTAINER_REV=0.3.4-amd64
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://testnet.bardock.movementnetwork.xyz/v1.