-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paul Balaji <[email protected]>
- Loading branch information
1 parent
86cdb78
commit bb12493
Showing
1 changed file
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,7 @@ Make sure the validator key corresponds to the address provided when setting up | |
|
||
**Update agent config** | ||
|
||
Unless you are running on Linux, you will also need to update the agent configuration for your network. This is because Docker does not support the [`host` network mode](https://docs.docker.com/network/drivers/host/) on Mac, Windows or Windows Server. | ||
Unless you are running Docker on Linux, you will also need to update the agent configuration for your network. This is because Docker does not support the [`host` network mode](https://docs.docker.com/network/drivers/host/) on Mac, Windows or Windows Server. | ||
|
||
To do this, navigate to the agent-configuration at `$CONFIG_FILES` and replace all instances of "localhost" or "127.0.0.1" in to `host.docker.internal`. For example: | ||
|
||
|
@@ -157,7 +157,25 @@ Hardcoding these paths deduplucates the configuration, making it easier to pass | |
|
||
</TabItem> | ||
<TabItem value="from-source" label="Building from source"> | ||
**** | ||
|
||
**Clone and setup** | ||
|
||
First, clone the Hyperlane monorepo: | ||
|
||
```sh | ||
git clone [email protected]:hyperlane-xyz/hyperlane-monorepo.git | ||
``` | ||
|
||
Then follow the [setup instructions](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md) in the `rust` directory. This should setup `rustup` as well as Rosetta 2 if you are on Apple Silicon. | ||
|
||
```sh | ||
# install rustup | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
|
||
# (apple silicon only) install rosetta 2 | ||
softwareupdate --install-rosetta --agree-to-license | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -171,7 +189,7 @@ Now that you understand more about configuring validator arguments, pull the lat | |
docker pull gcr.io/abacus-labs-dev/hyperlane-agent:main | ||
``` | ||
|
||
Finally, run the container: | ||
Finally, run the validator: | ||
|
||
```sh | ||
docker run \ | ||
|
@@ -193,6 +211,8 @@ docker run \ | |
|
||
<TabItem value="from-source" label="Building from source"> | ||
|
||
After following the setup instructions, you should now be able to use `cargo` to run the Validator: | ||
|
||
```sh | ||
cargo run --bin validator -- \ | ||
--db ./hyperlane_db_validator_<your_chain_name> \ | ||
|
@@ -202,6 +222,27 @@ cargo run --bin validator -- \ | |
--validator.key <your_validator_key> | ||
``` | ||
|
||
:::note (optional) Run the binary directly | ||
|
||
You can alternatively build out the agent: | ||
|
||
```sh | ||
cargo build --release bin validator | ||
``` | ||
|
||
And run the binary directly: | ||
|
||
```sh | ||
./target/release/validator \ | ||
--db ./hyperlane_db_validator_<your_chain_name> \ | ||
--originChainName <your_chain_name> \ | ||
--checkpointSyncer.type localStorage \ | ||
--checkpointSyncer.path $VALIDATOR_SIGNATURES_DIR \ | ||
--validator.key <your_validator_key> | ||
``` | ||
|
||
::: | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -227,6 +268,7 @@ There are numerous parameters that validators can be configured with. For this g | |
| `--relayChains` | Comma separates names of the origin chain and destination chains to relay messages between. E.g. `ethereum,polygon,avalanche`. | | ||
| `--allowLocalCheckpointSyncers` | Allows the relayer to look for validator signatures on the local filesystem. | | ||
| `--defaultSigner.key` | A hexadecimal private key used to sign transactions for all chains. | | ||
| `--metrics-port` | Optional. The port to expose prometheus metrics on, defaults to `9090`. | | ||
|
||
<Tabs groupId="docker"> | ||
<TabItem value="docker" label="Using Docker"> | ||
|
@@ -253,6 +295,22 @@ Hardcoding these paths deduplucates the configuration, making it easier to pass | |
|
||
</TabItem> | ||
<TabItem value="from-source" label="Building from source"> | ||
|
||
**Clone and setup** | ||
|
||
If you haven't already done so when setting up the validator, clone the Hyperlane monorepo and follow the [setup instructions](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md) in the `rust` directory. | ||
|
||
```sh | ||
# clone hyperlane monorepo | ||
git clone [email protected]:hyperlane-xyz/hyperlane-monorepo.git | ||
|
||
# install rustup | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
|
||
# (apple silicon only) install rosetta 2 | ||
softwareupdate --install-rosetta --agree-to-license | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|
@@ -291,6 +349,8 @@ docker run \ | |
</TabItem> | ||
<TabItem value="from-source" label="Building from source"> | ||
|
||
After following the setup instructions, you should now be able to use `cargo` to run the Relayer: | ||
|
||
```sh | ||
cargo run --bin relayer -- \ | ||
--db ./hyperlane_db_relayer \ | ||
|
@@ -300,6 +360,29 @@ cargo run --bin relayer -- \ | |
--metrics-port 9091 | ||
``` | ||
|
||
The metrics port is overriden to avoid clashing with the validator. | ||
|
||
:::note (optional) Run the binary directly | ||
|
||
You can alternatively build out the agent: | ||
|
||
```sh | ||
cargo build --release bin relayer | ||
``` | ||
|
||
And run the binary directly: | ||
|
||
```sh | ||
./target/release/relayer \ | ||
--db ./hyperlane_db_relayer \ | ||
--relayChains <your_chain_name>,<remote_chain_name> \ | ||
--allowLocalCheckpointSyncers true \ | ||
--defaultSigner.key <your_validator_key> \ | ||
--metrics-port 9091 | ||
``` | ||
|
||
::: | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
|