The Movement SDK is a collection of tools and libraries for building, deploying, and working with Movement Labs infrastructure. The SDK is designed to be modular and extensible, allowing developers to build custom tools and libraries on top of the core components as well as to interact with Movement Labs' own networks.
Note: unless otherwise specified assume all commands below are run after entering a nix shell with nix develop
.
scripts
: Scripts for running Movement Labs software. See the scripts README for more information about the organization of scripts.process-compose
: Process compose files for running Movement Labs software. These files are part of the standard flow for running and testing components in the Movement Network. See the scripts README for more information about the organization of scripts.docker
: Dockerfiles for building Movement Labs software and Docker compose files for orchestrating services. See the docker README for more information about the organization of Dockerfiles.protocol-units
: Protocol units for the Movement Network. These are the core building blocks of the Movement Network. See the protocol-units README for more information about the organization of protocol units.networks
: Network runner entry points for the Movement Network. These are the entry points for running the Movement Network. See the networks README for more information about the organization of network runners.util
: Utility crates for the Movement SDK. These crates provide useful functions, macros, and types for use in Movement SDK projects. See the util README for more information about the organization of utility crates.proto
: Protocol buffer definitions for the Movement Network. These definitions are used to generate code for interacting with the Movement Network. See the proto README for more information about the organization of protocol buffer definitions.
Because we are in early stages of the "movement" network we decided to version the network using formula one track names ("Monaco", "Monza", "Suzuka") instead of a more classical semantic versioning.
just
is a handy way to save and run project-specific commands. Please install it
following just install instructions. macOS
and debian
based systems instructions below.
brew install just
Check install
just --version
sudo apt update && sudo apt install --yes just
Check install
just --version
- Features:
build
: Build them1-da-light-node
binaries.setup
: Run setup for newm1-da-light-node
network with single node.local
: Run a local Celestia Data Availability service. (Default.)arabica
: Run an Arabica Celestia Data Availability service. (Overrides local.)test
: Run the test suite for them1-da-light-node
. (Can be combined withlocal
orarabica
. Exits on completion by default.)
# example test with local Celestia Data Availability service
just m1-da-light-node native build.setup.test.local
- Features:
build
: Build thesuzuka-full-node
binaries.setup
: Run setup for newsuzuka-full-node
network with single node.local
: Run a local Celesta Data Availability service.test
: run the test suite forsuzuka-full-node
. (Can be combined withlocal
. Exits on completion by default.)
# example test with local
just monza-full-node native build.setup.test.local
-
Make sure you have installed the
just
command on your system. If not check the "Prerequisites" section of this repo. -
When running with
docker compose
specify your revision in a file.env
at the root of the project. The file should look like this:
# /path/to/movement/.env
CONTAINER_REV=0fe2a4f28820c04ca0db07cdd44cafc98b792f3f
We recommend to use the latest commit of the "main" branch:
GIT_ROOT=$(git rev-parse --show-toplevel)
MOVEMENT_ENV_FILE="${GIT_ROOT}/.env"
[[ -n "${GIT_ROOT}" ]] \
&& echo "CONTAINER_REV=$(git rev-parse HEAD)" > "${MOVEMENT_ENV_FILE}"
echo "INFO: movement version is $(cat ${MOVEMENT_ENV_FILE})"
- Features:
setup
: Run setup for newsuzuka-full-node
network with single node.local
: Run a local Celesta Data Availability service.
Note: Currently, both setup
and local
must be used.
We only support running the suzuka-full-node
with a local Celesta Data Availability
service via Docker Compose.
# example setup with local
just suzuka-full-node docker-compose setup.local
Under the hood, just
runs
# working directory = GIT_ROOT
GIT_ROOT=$(git rev-parse --show-toplevel)
docker compose --env-file .env \
--file docker/compose/suzuka-full-node/docker-compose.yml \
--file docker/compose/suzuka-full-node/docker-compose.setup-local.yml \
--file docker/compose/suzuka-full-node/docker-compose.celestia-local.yml \
up
Note: if you want to recreate the network, but not rely on the just target above, please read through the scripts to identify the correct docker-compose
files to run.
Note For attesters in order to receive rewards you need to launch the node in
Attester
mode. To do this you will need to provide a private key at runtime.
This feature is not implemented yet, at this moment.
Both native
and docker-compose
runners will serve the following services listening on the specified default addresses:
Note: Only APIs intended for the end-user are listed here. For a full list of services, please refer to respective docker-compose
files.
- Aptos REST API:
0.0.0.0:30731
- Aptos Faucet API:
0.0.0.0:30732
cp: cannot stat '': No such file or directory
when running just suzuka-full-node native build.setup.test.local
Try the following nix.conf
:
build-users-group = nixbld
experimental-features = nix-command flakes repl-flake
bash-prompt-prefix = (nix:$name)\040
max-jobs = auto
extra-nix-path = nixpkgs=flake:nixpkgs
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal
The current revision does not support graceful restarts of the network from an existing config. For testing purposes, please delete you .movement
directory and run the setup again.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.