Start validating
Run your validator
1 CPU + 1GiB RAM is sufficient. Validators are very lightweight.
Validators expose metrics on the port number specified in the environment variable
HYP_BASE_METRICS
. Port 9090
is recommended, though any valid port can be chosen.We also provide a mostly-ready-to-go Grafana dashboard to get you started, you can find the source and instructions for importing it under tools/grafana. If you want to use your own, the
hyperlane_latest_checkpoint
is the most critical metric in both the phase="validator_observed"
and phase="validator_processed"
dimension. It should gradually increase and the two should never really be out of sync.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.
validator.env
# These are example values to roughly illustrate
# what a .env file should look like
HYP_VALIDATOR_ORIGINCHAINNAME=ethereum
HYP_VALIDATOR_REORGPERIOD=20
# ...
# ...
To run the validator binary with the environment variables specified in
validator.env
:Using Docker
Building from source
Using the
--env-file
flag, we can pass in the environment variables to the validator:docker run -it --env-file validator.env $DOCKER_IMAGE ./validator
If you're supporting your own chain that you permissionlessly deployed and are specifying a path to your own config file in the
CONFIG_FILES
environment variable, check out the config files with Docker section.If you're running a locally set up validator on the same machine, which requires a locally ran relayer to be able to access these validator signatures, be sure to mount your local validator's signature directory on your host machine into your Docker container.
For example, if your local validator is writing signatures to
/tmp/hyperlane-validator-signatures-ethereum
, you should mount that directory to the same path in the Docker container:docker run -it --env-file validator.env --mount type=bind,source=/tmp/hyperlane-validator-signatures-ethereum,target=/tmp/hyperlane-validator-signatures-ethereum $DOCKER_IMAGE ./validator
Using
env
and xargs
, we can run the built binary from within the hyperlane-monorepo/rust
directory with the environment variables found in validator.env
:env $(cat validator.env | grep -v "#" | xargs) ./target/release/validator
If everything is configured correctly, you should see json files being written to your S3 bucket (if you followed the AWS setup) or to your local signatures directory (if you followed the Local setup).
You're not done yet! The final step is to announce your validator, which involves posting some information about your validator on chain.
Last modified 9d ago