Required setup instructions
The local setup is only intended for testing or development purposes.
This is intended to show how you can run a validator on your local machine, which is only for testing and development purposes. This also means that signatures from local validators are only able to be accessed by locally ran relayers.
When running a validator locally, your validator will write its signatures to a local directory. This directory can be named whatever you like, just remember to use this directory when setting your Configuration.
# Pick an informative name specific to the chain you're validating
# Create the directory
For running a validator in a production environment, see the AWS setup guide.
Your validator takes arguments and environment variables as configuration. See below for both the general configurations and those that are specific to the setup instructions you followed.
The recommended installation method for a production environment is using a Docker image.
We encourage folks to validate on as many chains as they are interested in supporting. We recommend that resources are not shared between validator instances.
# These are example values to roughly illustrate
# what a .env file should look like
To run the validator binary with the environment variables specified in
--env-fileflag, we can pass in the environment variables to the validator:
docker run -it --env-file validator.env $DOCKER_IMAGE ./validator
For example, if your local validator is writing signatures to
/tmp/hyperlane-validator-signatures-ethereum, you should mount a directory for the Docker container. This is the same directory set in the
If the command below fails with
docker: invalid reference format, the whitespaces may have been malformed and you should remove them from the command.
docker run \
--env-file validator.env \
--mount type=bind,source="$(pwd)"/hyperlane-validator-signatures-ethereum,target=/tmp/hyperlane-validator-signatures-ethereum \
# you can pass multiple `--mount` flags to mount several directories
xargs, we can run the built binary from within the
hyperlane-monorepo/rustdirectory with the environment variables found in
env $(cat validator.env | grep -v "#" | xargs) ./target/release/validator
Relayers need to know where to find your validator's signatures. Your validator will automatically attempt to announce itself by writing to the
ValidatorAnnouncecontract on the chain that you're validating.
To do this, your validator must have a small amount of tokens to pay for the gas for this transaction.
If your validator has not yet announced itself, and does not have enough tokens to pay for gas, it will log a message specifying how many tokens are needed.