Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 399
docs: add guide to run operator using systemd#1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
entropidelic
merged 4 commits into
testnet
from
1074-docs-add-guide-to-run-operators-using-systemdSep 30, 2024
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -92,17 +92,27 @@ Update the following placeholders in `./config-files/config-operator.yaml`: | ||
| `"<ecdsa_key_store_location_path>"` and `"<bls_key_store_location_path>"` are the paths to your keys generated with the EigenLayer CLI, `"<operator_address>"` and `"<earnings_receiver_address>"` can be found in the `operator.yaml` file created in the EigenLayer registration process. | ||
| The keys are stored by default in the `~/.eigenlayer/operator_keys/` directory, so for example `<ecdsa_key_store_location_path>` could be `/path/to/home/.eigenlayer/operator_keys/some_key.ecdsa.key.json` and for `<bls_key_store_location_path>` it could be `/path/to/home/.eigenlayer/operator_keys/some_key.bls.key.json`. | ||
| The default configuration uses the public nodes RPC, but we suggest you use your own nodes for better performance and reliability. | ||
| Also, from v0.5.2 there is a fallback mechanism to have two RPCs, so you can add a second RPC for redundancy. | ||
| Two RPCs are used, one as the main one, and the other one as a fallback in case one node is working unreliably. | ||
| Default configurations is set up to use the same public node in both scenarios. | ||
| {% hint style="danger" %} | ||
| PUBLIC NODES SHOULDN'T BE USED AS THE MAIN RPC. We recommend not using public nodes at all. | ||
| FALLBACK AND MAIN RPCs SHOULD BE DIFFERENT. | ||
| {% endhint %} | ||
| Most of the actions will pass through the main RPC unless there is a problem with it. Events are fetched from both nodes. | ||
| ```yaml | ||
| eth_rpc_url: "https://ethereum-holesky-rpc.publicnode.com" | ||
| eth_rpc_url_fallback: "https://ethereum-holesky-rpc.publicnode.com" | ||
| eth_ws_url: "wss://ethereum-holesky-rpc.publicnode.com" | ||
| eth_ws_url_fallback: "wss://ethereum-holesky-rpc.publicnode.com" | ||
| eth_rpc_url: "https://<RPC_1>" | ||
| eth_rpc_url_fallback: "https://<RPC_2>" | ||
| eth_ws_url: "wss://<RPC_1>" | ||
| eth_ws_url_fallback: "wss://<RPC_2>" | ||
| ``` | ||
| ## Step 4 - Deposit Strategy Tokens | ||
| We are using [WETH](https://holesky.eigenlayer.xyz/restake/WETH) as the strategy token. | ||
| @@ -152,6 +162,66 @@ If you don't have Holesky ETH, these are some useful faucets: | ||
| ./operator/build/aligned-operator start --config ./config-files/config-operator.yaml | ||
| ``` | ||
| ### Run Operator using Systemd | ||
| To manage the Operator process on Linux systems, we recommend use systemd with the following configuration: | ||
| You should create a user and a group in order to run the Operator and set the service unit to use that. In the provided service unit, we assume you have already created a user called `aligned` | ||
| ```toml | ||
| # aligned-operator.service | ||
| [Unit] | ||
| Description=Aligned Operator | ||
| After=network.target | ||
| [Service] | ||
| Type=simple | ||
| User=aligned | ||
| ExecStart=<path_to_aligned_layer_repository>/operator/build/aligned-operator start --config <path_to_operator_config> | ||
| Restart=always | ||
| RestartSec=1 | ||
| StartLimitBurst=100 | ||
| [Install] | ||
| WantedBy=multi-user.target | ||
| ``` | ||
| {% hint style="info" %} | ||
| `aligned-operator.service` is just an arbitrary name. You can name your service as you wish, following the format `<service-name>.service`. | ||
| {% endhint %} | ||
JuArce marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| Once you have configured the `aligned-operator.service` file, you need to run the following commands: | ||
| ```shell | ||
| sudo cp aligned-operator.service /etc/systemd/system/aligned-operator.service | ||
| sudo systemctl enable --now aligned-operator.service | ||
| ``` | ||
| {% hint style="warning" %} | ||
| All paths must be absolute. | ||
| {% endhint %} | ||
JuArce marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| Those commands will link the service to systemd directory and then, will start the Operator service. | ||
| Also, if the server running the operator goes down, systemd will start automatically the Operator on server startup. | ||
| #### Restart operator | ||
| If you want to restart the operator, you can use the following command: | ||
| ```shell | ||
| sudo systemctl restart aligned-operator.service | ||
| ``` | ||
| #### Get Operators logs | ||
| Once you are running your operator using systemd, you can get its logs using journalctl as follows: | ||
| ```shell | ||
| journalctl -xfeu aligned-operator.service | ||
| ``` | ||
| ## Unregistering the operator | ||
| To unregister the Aligned operator, run: | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.