{"id":18665248,"url":"https://github.com/avaprotocol/ap-operator-setup","last_synced_at":"2025-07-27T15:17:48.963Z","repository":{"id":246443782,"uuid":"820152720","full_name":"AvaProtocol/ap-operator-setup","owner":"AvaProtocol","description":"Ava Protocol Operator Setup","archived":false,"fork":false,"pushed_at":"2024-11-06T17:48:36.000Z","size":40,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T17:31:43.230Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvaProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-25T23:04:17.000Z","updated_at":"2024-07-24T11:52:37.000Z","dependencies_parsed_at":"2024-06-28T01:28:49.231Z","dependency_job_id":"f11c947a-0553-4821-a779-5310d3529ba9","html_url":"https://github.com/AvaProtocol/ap-operator-setup","commit_stats":null,"previous_names":["avaprotocol/ap-operator-setup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Fap-operator-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Fap-operator-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Fap-operator-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaProtocol%2Fap-operator-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvaProtocol","download_url":"https://codeload.github.com/AvaProtocol/ap-operator-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239492250,"owners_count":19647989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:26:56.643Z","updated_at":"2025-02-18T14:48:52.585Z","avatar_url":"https://github.com/AvaProtocol.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ava Protocol Operator setup\n\nThis guide will walk you through the process of registering as an operator to Ava OProtocol AVS and running the Ava Protocol software.\n\nThis guide focus on running everything with-in docker container. If you don't\nwant to use docker container, you can follow [other guide\ninstead](https://github.com/AvaProtocol/EigenLayer-AVS/blob/main/docs/operator.md#run-operators)\n\n## Prerequisite\n\nAn operator need to be onboard and setup their own operator with EigenLayer,\nfollowing the [official\ndocument](https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-introduction)\n\n## Software/Hardware Requirement\n\n- Operating System: Linux, MacOS\n- CPU: x64/arm. \n- vCPUs: 1\n- Memory: 1GiB\n- Storage: 100GB\n- EC2 Equivalent: c6gd.medium, m6g.medium, c7a.medium, c6g.large\n- Expected Network Utilization:\n    - Total download bandwidth usage: 1 Mbps\n    - Upload bandwidth usage: 1 Mbps\n\n- Incoming Ports:\n    - Mainnet: 9190, 9191.\n    - Holesky: 9290, 9291\n\n- Outgoing Ports: 2206\n\nIf your cloud providers support Arm CPU, we suggest to use Arm because it's more cost effective.\n\n# Operator Setup\n\n## 1. Clone this repository\n\n```\ngit clone git@github.com:AvaProtocol/ap-operator-setup.git\n\ncd ap-operator-setup\n```\n\nWe had two directory call `holesky` and `ethereum`. To setup testnet, you will do\neverything inside `hokesky` directory. For mainnet deployment, you would use\nfiles inside `ethereum` directory.\n\n\n## 2. Prepare config file and credential\n\nTo setup for holesky testnet, we would do everything inside `holesky` directory.\nTo setup for ethereum mainnet, we would do everything inside `ethereum` directory.\n\nInside `holesky` or `ethereum` directory, We will need to prepare 2 files: `.env` and `config.yaml`.\n\n1. Make sure you are under `ethereum` or `holesky` direction, and prepare `.env` file\n    ```\n    cp .env.example .env\n    ```\n\n2. Then, edit it and fill in 5 things:\n\n    Specify your operator’s keystore location and password. These are to be used to commit to your registered operator.\n    ```\n    - ECDSA_KEYSTORE_PATH=\n    - ECDSA_KEY_PASSWORD=\n    - BLS_KEYSTORE_PATH=\n    - BLS_KEY_PASSWORD=\n    ```\n\n    Besides, the DB_PATH is to specify the local path to store your operator’s data for our AVS.\n    ```\n    - DB_PATH=\n    ```\n\n    We don't use high io so you can store on a normal volume such as gp3 wih 3000\n    IOPS on EC2.\n\n    If the default ports of PUBLIC_NODEAPI_PORT and PUBLIC_METRICS_PORT were\n    used by different processes, you can also set them to any available ports in your\n    env file too. Make sure to also open firewall to allow traffic incoming to\n    these 2 ports. The default value is as following:\n\n\n3. Next, we will create `config.yaml` file for operator:\n\n    ```\n    cp config.yaml.example config.yaml\n    ```\n\n    Only change the value of `operator_address` to your own operator wallet address.\n\n\n## 2.b One-time task: Register your operator to Ava Protocol AVS\n\nThis step is only needed to be done once per operator. Also, recall that you\nwould need to `cd` into `holesky` for testnet and `ethereum` for mainnet before\nrunning anything.\n\n\n```\ndocker compose run ap-operator register --config=/app/config.yaml\n```\n\nTo check the registration status at any given time you can also do:\n\n```\ndocker compose run ap-operator status --config=/app/config.yaml\n```\n\nEnsure that you successfully register your operator before moving to step 3.\n\n\n## 2.c (Optinal) One-time task: Setting up alias key\n\nAt this moment, you're all set to run AP AVS and move to step 3.\nThe step described in 2.c involves security hardening. It's more\ncomplicated to set up and less convenient, but it improves key\nmanagement.\n\nThe operator ECDSA key allows access to funds under that key.\nOptionally, you can use a different ECDSA key pair from your\nEigenLayer operator ECDSA key and bind this new alias key to\nyour operator. This way, your operator can use the new alias\nkey to interact with the Ava Protocol, and we will still be\nable to identify your operator address. At the same time,\nthe AP AVS software will not have access to your operator\nECDSA key.\n\nThe process includes two steps:\n\n- Generate or import an existing ECDSA key to create an alias key.\n- Bind the alias key to your operator ECDSA key.\n\nWhile it's not necessary to perform these steps, doing so\nenhances security by ensuring that your operator ECDSA key\nremains protected.\n\nYou do need access to the operator ECDSA key to perform below steps.\n\n### Generate alias key\n\nWe will generate an alias key and temporarily put them in a folder call\n`keys`. You will move them to the right location later.\n\n```\n# create the temp directory to hold the generated keys\nmkdir keys\n\ndocker compose run -v `pwd`/keys:/app/keys/ ap-operator --config=/app/config.yaml create-alias-key --name=/app/keys/alias-ecdsa.key.json\n```\n\nA file call `alias-ecdsa.key.json` should be created inside the `keys` directory.\nYou can move it to the right place on your node. This will be your alias key\nmoving forward.\n\n### Declare the alias key for your operator\n\nNow, we will send an on-chain transaction from your operator ECDSA key to bind\nthe newly generated alias key to it.\n\nEnsure your operator ECDSA key has some fund in it to pay for the gas fee.\n\n```\ndocker compose run -v path-to-the-alias-ecdsa-key.json-above-on-your-node:/app/keys/alias-ecdsa.key.json ap-operator declare-alias --config=/app/config.yaml --name=/app/keys/alias-ecdsa.key.json\n```\n\nYou should see a message like this at the end \n\n```\nsuccesfully declared an alias for operator [your-operator-keys] alias address [your-alias-address-key] at tx [tx-hash]\n```\n\nNow, in your `.env` file, you can replace `ECDSA_KEYSTORE_PATH`, which is\npointed to your operator ECDSA key, to point to the path of the alias key\nwe just create in above step.\n\n```\nECDSA_KEYSTORE_PATH=\u003cpath-to-the-above-alias-ecdsa-key-file-above\u003e\n```\n\nYou're all set to move to step 3) to run your operator with the alias key.\nAt any given time, you can also just change the `ECDSA_KEYSTORE_PATH` to point\nto your original operator ECDSA key to perform operation that require the\noperator ECDSA key. Usually, only the registraion and deregistration require\nthat key.\n\n## 3. Start to run our AVS\n\n1. Make sure you are under `./ethereum` or `./holesky` directory.\n2. Run the following command to start the operator\n    ```\n    docker compose pull\n\n    docker compose up --force-recreate\n    ```\n\n    Once the operator is up and running, the output log will look like below.\n    ```\n    docker compose up --force-recreate -d\n    [+] Running 1/0\n    ✔ Container ap_operator  Created\n    ✔ Container ap_operator  Started\n    ```\n\n    To view the operator log itself, you can do:\n\n    ```\n    docker compose logs -f \n    ```\n\n    The log should appear similar to this:\n    \n    ```\n    ap_operator  | {\"level\":\"info\",\"ts\":1719529804.5644045,\"caller\":\"operator/operator.go:263\",\"msg\":\"Connect to aggregator aggregator-holesky.avaprotocol.org:2206\"}\n    ap_operator  | {\"level\":\"info\",\"ts\":1719529804.8751178,\"caller\":\"operator/operator.go:307\",\"msg\":\"Operator info\",\"operatorId\":[74,60,26,85,160,147,136,79,102,183,189,62,99,76,192,151,203,7,97,85,230,236,25,160,46,242,83,194,177,93,63,163],\"operatorAddr\":\"0x2273e70Ea0F159985a9312e875839CbF242f162e\",\"operatorG1Pubkey\":\"E([13980129839750270625587959504067205960106881892608925358182969477593110597180,2713793992502006479543294653290264953732656227600455037615150886215476630684])\",\"operatorG2Pubkey\":\"E([10006440951214432193970386287330007898372605552301114697229665952718363326438+2917899138783614023915162275072742305856792653861495716209344717215206657922*u,20465317265628248898772842070116958367267377808142334627836040792686631701030+11895853732396257221594908719294998059804388586884333547663795174064486592588*u])\"}\n    ap_operator  | {\"level\":\"info\",\"ts\":1719529805.3309655,\"caller\":\"operator/operator.go:330\",\"msg\":\"Starting operator.\"}\n    ap_operator  | {\"level\":\"info\",\"ts\":1719529805.3310997,\"caller\":\"nodeapi/nodeapi.go:104\",\"msg\":\"Starting node api server at address 0.0.0.0:9010\"}\n    ap_operator  | {\"level\":\"info\",\"ts\":1719529805.33198,\"caller\":\"metrics/eigenmetrics.go:81\",\"msg\":\"Starting metrics server at port 0.0.0.0:9090\"}\n    ap_operator  | {\"level\":\"info\",\"ts\":1719529805.3321455,\"caller\":\"nodeapi/nodeapi.go:238\",\"msg\":\"node api server running\",\"addr\":\"0.0.0.0:9010\"}\n    ```\n\n# FAQ\n\n## How to update\n\n```\n# pull the lastest change from our repository\ngit pull\n\n# cd into either mainnet or holesky directory depend on mainne or testnet\ncd ethereum\n\n# then issue a pull command to fetch latest image\ndocker compose pull\n\n# finally restart the container with the new image\ndocker compose up --force-recreate -d\n```\n\n## How to configure auto update\n\nIf you want to configure auto update, check our instruction in\n[watchtower](watchtower)\n\n\n## How to check that my operator is working\n\nWhen your operator connects to aggregator, it will reports telemetry which we\ncan check to ensure your operator is working properly. We're currently working\non prometheus metrics and dashboard to provide operator with visibility.\n\nBeside, you will see some log indicate that the operator is working and\nprocessing task that our aggregator asked it to do.\n\nYou can also visit the telemetry dashboard\n\n### Testnet Operator Status Page\n\nhttps://aggregator-holesky.avaprotocol.org/telemetry\n\n### Ethereum Operator Status Page\n\nhttps://aggregator.avaprotocol.org/telemetry\n\n## Monitoring your AVS.\n\nWe provide a prometheus and grafana stack in a completed docker compose setup\ninside [monitor](monitor) directory. This docker compose stack can be used to\nconfigure an end to end monitoring solution for your AVS.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaprotocol%2Fap-operator-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaprotocol%2Fap-operator-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaprotocol%2Fap-operator-setup/lists"}