> For the complete documentation index, see [llms.txt](https://bavo.gitbook.io/bavo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bavo.gitbook.io/bavo/build-with-bavo/for-workers/eigenlayer-guides.md).

# EigenLayer Guides

## Software/Hardware Requirements:

* **vCPUs**: 2+
* **Memory**: 4GiB+
* **Storage**: 100GiB+

## Installation:

1. Follow the official documentation to install Docker Engine.
2. Pull the latest BAVO image:

   ```bash
   bashCopy codedocker pull bavo-labs/bavo-network:latest
   ```
3. Clone the worker setup repository:

   ```bash
   bashCopy codegit clone https://github.com/bavo-labs/bavo-worker-setup.git
   cd bavo-worker-setup/bavo-node
   ```

## Register on EigenLayer:

* If you're already registered on the EigenLayer testnet/mainnet, you can skip this step.
* This step involves generating ECDSA and BLS keys and registering as an operator.

Steps:

1. Install EigenLayer CLI.
2. Generate or import your ECDSA and BLS keypair.
3. Fund the ECDSA address with ETH to cover gas costs for registration and tasks.
4. Register as an operator on EigenLayer.

## Basic Configurations:

* For **Ethereum Testnet (Holesky)**, copy the configuration file:

  ```bash
  bashCopy codecp ./config-files/.env.holesky ./.env
  ```

  Edit `.env` with your own settings.
* For **Mainnet**, copy `.env.mainnet` instead of `.env.holesky`.

#### Node Info:

* Set a name and description for your node:

  ```bash
  bashCopy codeNODE_NAME="Your Node Name"
  NODE_DESCRIPTION="Your Node Description"
  ```

## ECDSA and BLS Keys:

* Specify the paths and passwords for your ECDSA and BLS keys:

  ```bash
  bashCopy codeECDSA_KEY_FILE=/path/to/keyname.ecdsa.key.json
  ECDSA_KEY_PASSWORD=''

  BLS_KEY_FILE=/path/to/keyname.bls.key.json
  BLS_KEY_PASSWORD=''
  ```

## LHE Key:

* Generate the LHE key used for data sharing:

  ```bash
  bashCopy codebash ./run.sh generate-lhe-key [--key-name <NAME>]
  ```

  The default output is `./keys/default.lhe.key.json`. Specify the key path in the configuration:

  ```bash
  bashCopy codeLHE_KEY_PATH='/path/to/your/lhe.key.json'
  ```

## Storage:

* Data is stored on **Arweave** by default, but to avoid potential issues, **Arseeding** is recommended.
* Transfer ETH to **everPay** using:

  ```bash
  bashCopy codeexport WALLET_PATH=/path/to/your/ethereum/wallet.json
  bash ./utils.sh everpay:deposit --chain ethereum --symbol ETH --amount 0.00001
  ```
* Check your everPay balance:

  ```bash
  bashCopy codebash ./utils.sh everpay:balance --account <ACCOUNT_ADDRESS> [--symbol <SYMBOL>]
  ```

## Register to BAVO AVS:

* If you're an EigenLayer operator, you can register to the AVS of BAVO. Ensure your wallet is whitelisted by contacting BAVO Labs.
* Set the relevant parameters (default values provided):

  ```bash
  bashCopy codeOPERATOR_SIGNATURE_EXPIRY_SECONDS=3600
  OPERATOR_SOCKET_IP_PORT=""
  ```
* Register your operator to AVS:

  ```bash
  bashCopy codebash ./run.sh el:register [--quorum-id-list <ID>]
  ```

## Metrics (Optional):

* Enable metrics by setting `NODE_ENABLE_METRICS=true` and defining a port using `NODE_METRICS_PORT` (default: 9094).

#### Run Task:

* Start the task program:

  ```bash
  bashCopy codebash ./run.sh task [<name>]
  ```

  This will launch a container named `bavo-network[-name]` in the background. Logs will be stored in `./logs/*.log`.
* To manage the container, use:

  ```bash
  bashCopy codedocker stop/start/restart/rm bavo-network[-name]
  ```

## Monitoring (Optional):

1. Switch to the `bavo-worker-setup/monitoring` folder.
2. Configure `prometheus.yml` with the container and port details:

   ```yaml
   yamlCopy code- job_name: "bavo-node"
     scrape_interval: 5s
     static_configs:
       - targets: ["bavo-network:9094"]
   ```

## Add New Workers (Optional):

* If you want to handle tasks on both Ethereum and AO simultaneously, configure additional workers.

Steps:

1. Switch to the `bavo-worker-setup/bavo-node` folder.
2. Append values from `./config-files/.env.ao` to `.env` and set your `AR_WALLET_PATH`.
3. Register to the BAVO AO Process and re-run the task.

#### Utilities:

* **Worker Withdraw**: To withdraw tokens earned from completing tasks:

  ```bash
  bashCopy codebash ./run.sh worker:balance
  bash ./run.sh worker:withdraw [--amount <AMOUNT>]
  ```
