Skip to content

Commit

Permalink
feat(openoracle): register fix and chane docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xom4ek committed Jun 26, 2024
1 parent 5171ec2 commit aa941fe
Show file tree
Hide file tree
Showing 9 changed files with 462 additions and 34 deletions.
3 changes: 2 additions & 1 deletion charts/openoracle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ appVersion: 0.1.0
description: A Helm chart for Kubernetes
name: openoracle
type: application
version: 0.1.0
version: 0.1.1
maintainers:
- name: xom4ek
email: [email protected]
icon: https://storage.googleapis.com/stakingrewards-static/images/assets/production/openlayer_logo.png?v=1715247060260
82 changes: 82 additions & 0 deletions charts/openoracle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Openoracle Helm Chart

## Introduction
This repository contains a Helm chart for Kubernetes, specifically for the AVS named "openoracle".
More information about openoracle you can find here [openoracle-configs](https://github.com/0xJomo/openoracle-configs).

## Table of Contents
- [Openoracle Helm Chart](#openoracle-helm-chart)
- [Introduction](#introduction)
- [Table of Contents](#table-of-contents)
- [Usage](#usage)
- [Steps to Follow:](#steps-to-follow)
- [Configuration](#configuration)
- [Dependencies](#dependencies)
- [Troubleshooting](#troubleshooting)
- [Contributors](#contributors)
- [License](#license)

## Usage
To use this chart, you can override default values by providing your own `values.yaml` file:

```sh
helm install openoracle p2p-avs/openoracle -f values.yaml
```

### Steps to Follow:
1. Generate keys via the following URLs:
- [Eigenlayer Operator Installation Guide](https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation)
- [Openoracle Configs](https://github.com/0xJomo/openoracle-configs)

2. Create a secret in Kubernetes for any workflow you want. Example you can find in `./examples`

3. Fill the placeholders in your `values.yaml` file:
- `YOUR_OPERATOR_ADDRESS`
- `YOUR_ECDSA_SIGN_KEY_SECRET`
- `YOUR_BLS_KEY_SECRET`
- `YOUR_ECDSA_KEY_SECRET`

4. Run the following command to upgrade and install the chart:
```sh
helm upgrade -i openoracle p2p-avs/openoracle -f values.yaml
```

## Configuration
The following table lists the configurable parameters of the openoracle chart and their default values.

| Parameter | Description | Default |
|-----------------------------|---------------------------------------------------------------|------------------------------|
| `replicaCount` | Number of replicas | `1` |
| `service.type` | Type of Kubernetes service | `ClusterIP` |
| `service.ports` | Service ports | `{...}` |
| `ingress.enabled` | Enable ingress | `false` |
| `ingress.host` | Ingress host | `example.com` |
| `node.image.repository` | Node image repository | `openoracleofficial/openoracle-labs-avs-operator` |
| `node.image.tag` | Node image tag | `latest` |
| `node.image.pullPolicy` | Image pull policy | `Always` |
| `node.resources.requests` | CPU/Memory resource requests | `2 CPU / 8Gi Memory` |
| `node.resources.limits` | CPU/Memory resource limits | `4 CPU / 16Gi Memory` |
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.name` | Name of the service account | `""` |
| `vmPodScrape.enabled` | Enable VM Pod scraping | `true` |
| `register.enabled` | Enable register functionality | `true` |
| `register.image.repository` | Register image repository | `openoracleofficial/openoracle-labs-avs-operator` |
| `register.image.tag` | Register image tag | `latest` |
| `register.image.pullPolicy` | Register image pull policy | `Always` |
| `configs.operator.yaml` | Operator configuration | `empty` |

## Dependencies
This chart depends on several Kubernetes resources and should be used in a Kubernetes cluster. Ensure that you have Kubernetes and Helm installed and configured in your environment.

## Troubleshooting
If you encounter any issues during installation or usage, check the following:

- Ensure that all required Kubernetes resources are available.
- Validate your `values.yaml` file against the provided `values.schema.json`.
- Check the logs of the Helm deployment for any errors.

## Contributors
- xom4ek (Aleksei Lazarev) - [email protected]

## License
This project is licensed under the MIT License. See the LICENSE file for details.
4 changes: 3 additions & 1 deletion charts/openoracle/example/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Generate keys

For generate keys read this doc https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation
For generate keys read this docs
- https://docs.eigenlayer.xyz/eigenlayer/operator-guides/operator-installation
- https://github.com/0xJomo/openoracle-configs
41 changes: 40 additions & 1 deletion charts/openoracle/example/wallet-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,45 @@ stringData:
}
bls-private-key-hex: 'laksdnflkasldfnalknfpwjerpijqwpremawfmdsf'
bls-private-key-password: 'lkansdlfknaskldnfklasndfknasdpfmapfsm'
kind: Secret
metadata:
name: YOUR_BLS_KEY_SECRET
type: Opaque
---
apiVersion: v1
stringData:
ecdsa-private-key: |
{
"address": "sadflkasmdflkamsldfas;df",
"crypto": {
"cipher": "aes-128-ctr",
"ciphertext": "as;dmflaskmdflasmdlfkmalsdf",
"cipherparams": {
"iv": "lakmdslfkmalsdmflkasdmfl"
},
"kdf": "scrypt",
"kdfparams": {
"dklen": 123,
"n": 123123,
"p": 12,
"r": 823,
"salt": "daslkfmklasdmfklmasdlkfmlakdsf"
},
"mac": "alsdkmflkamsdlfkmasldfmlaksdmlf"
},
"id": "alsdfmlkasmdlfkmasldf",
"version": 3
}
ecdsa-private-key-password: anlNASLdnfaljksdnLANSDlnalsdkjnASLKJDNlwnqlo21n3lkASLDndalsd
kind: Secret
metadata:
name: YOUR_ECDSA_KEY_SECRET
type: Opaque
---
apiVersion: v1
stringData:
ecdsa-private-key: |
{
Expand All @@ -49,7 +87,8 @@ stringData:
}
ecdsa-private-key-password: anlNASLdnfaljksdnLANSDlnalsdkjnASLKJDNlwnqlo21n3lkASLDndalsd
ecdsa-public-key: 0xasklndiqwneo21oi3nlkasdflasdfml
kind: Secret
metadata:
name: YOUROPERATORADDRESS
name: YOUR_ECDSA_SIGN_KEY_SECRET
type: Opaque
5 changes: 2 additions & 3 deletions charts/openoracle/templates/register.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ spec:
{{- toYaml .Values.node.env | nindent 12 }}
volumeMounts:
{{- toYaml .Values.node.volumeMounts | nindent 12 }}
- name: config
mountPath: /app/config/operator.yaml
subPath: operator.yaml
restartPolicy: Never
volumes:
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
- name: config
configMap:
name: {{ include "openoracle.fullname" . }}-config
Expand Down
3 changes: 0 additions & 3 deletions charts/openoracle/templates/statefulset.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ spec:
{{- with .Values.node.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
- name: config
mountPath: /app/config/operator.yaml
subPath: operator.yaml
env:
{{- toYaml .Values.node.env | nindent 12 }}
volumes:
Expand Down
52 changes: 39 additions & 13 deletions charts/openoracle/values.holesky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,47 @@ node:
mountPath: /app/operator_keys/ecdsa_key.json
subPath: ecdsa_key.json
readOnly: true
- name: signer-ecdsa-key
mountPath: /app/operator_keys/signer_ecdsa_key.json
subPath: ecdsa_key.json
readOnly: true
- name: config
mountPath: /app/config/operator.yaml
subPath: operator.yaml

env:
- name: BLS_PRIVATE_KEY_PATH
value: "/app/operator_keys/bls_key.json"
- name: ECDSA_PRIVATE_KEY_PATH
value: "/app/operator_keys/ecdsa_key.json"
- name: ECDSA_SIGNER_PRIVATE_KEY_PATH
value: "/app/operator_keys/signer_ecdsa_key.json"
- name: OPERATOR_ADDRESS
value: "YOUROPERATORADDRESS"
# - name: OPERATOR_ADDRESS
# valueFrom:
# secretKeyRef:
# name: YOURSECREWITHWALLET
# key: ecdsa-public-key
value: "YOUR_OPERATOR_ADDRES"
- name: OPERATOR_SIGNATURE_ADDRESS
valueFrom:
secretKeyRef:
name: YOUR_ECDSA_SIGN_KEY_SECRET
key: ecdsa-public-key
- name: OPERATOR_SIGNER_ECDSA_KEY_PASSWORD
valueFrom:
secretKeyRef:
name: YOUR_ECDSA_SIGN_KEY_SECRET
key: ecdsa-private-key-password
- name: OPERATOR_BLS_KEY_PASSWORD
valueFrom:
secretKeyRef:
name: YOURWALLETSECRET
name: YOUR_BLS_KEY_SECRET
key: bls-private-key-password
- name: OPERATOR_ECDSA_KEY_PASSWORD
valueFrom:
secretKeyRef:
name: YOURSECREWITHWALLET
name: YOUR_ECDSA_KEY_SECRET
key: ecdsa-private-key-password
- name: HTTP_RPC_URL
value: https://lb.drpc.org/ogrpc?network=holesky
value: https://lb.drpc.org/ogrpc?network=holesky # Set your rpc
- name: WS_RPC_URL
value: wss://lb.drpc.org/ogrpc?network=holesky
value: wss://lb.drpc.org/ogrpc?network=holesky # Set your wss rpc

serviceAccount:
create: true
Expand All @@ -42,13 +57,19 @@ serviceAccount:
volumes:
- name: bls-key
secret:
secretName: YOURSECREWITHWALLET
secretName: YOUR_BLS_KEY_SECRET
items:
- key: bls-private-key
path: bls_key.json
- name: ecdsa-key
secret:
secretName: YOURSECREWITHWALLET
secretName: YOUR_ECDSA_KEY_SECRET
items:
- key: ecdsa-private-key
path: ecdsa_key.json
- name: signer-ecdsa-key
secret:
secretName: YOUR_ECDSA_SIGN_KEY_SECRET
items:
- key: ecdsa-private-key
path: ecdsa_key.json
Expand All @@ -67,18 +88,23 @@ configs:
operator_state_retriever_address: 0x12ddeDbB47340e6702529197cB593204A4aFa318
# address which the aggregator listens on for operator signed messages
aggregator_server_ip_port_address: https://us-central1-openoracle-de73b.cloudfunctions.net/backend_apis/api/report_result
aggregator_server_ip_port_address: https://us-central1-openoracle-de73b.cloudfunctions.net/backend_apis_holesky/api/report_result
price_config_server_ip_port_address: https://us-central1-openoracle-de73b.cloudfunctions.net/backend_apis/api/price_feed_config
chain_name: eth
# avs node spec compliance https://eigen.nethermind.io/docs/spec/intro
eigen_metrics_ip_port_address: 0.0.0.0:9091
enable_metrics: true
node_api_ip_port_address: 0.0.0.0:9010
enable_node_api: true
health_ws_url: ws://oracle.openlayer.tech:3030/
# we need to register the operator on startup when running the docker compose file
# because unfortunately we cannot register the operator previously and save it in the anvil json file
# This is because anvil only dumps the state, and not the receipt tree, so when we restart anvil with
# the registered operator, it's blspubkey registering event with the compendium is not present anymore,
# and so the aggregator can't find it.... very annoying
register_operator_on_startup: true
chain_urls:
holesky: wss://holesky.gateway.tenderly.co/3Wiu0rFTyBrOesBPrQnxOw # Set your rpc
plumetest: wss://plume-testnet.rpc.caldera.xyz/infra-partner-ws # Set your rpc
49 changes: 37 additions & 12 deletions charts/openoracle/values.mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,46 @@ node:
mountPath: /app/operator_keys/ecdsa_key.json
subPath: ecdsa_key.json
readOnly: true
- name: signer-ecdsa-key
mountPath: /app/operator_keys/signer_ecdsa_key.json
subPath: ecdsa_key.json
readOnly: true
- name: config
mountPath: /app/config/operator.yaml
subPath: operator.yaml
env:
- name: BLS_PRIVATE_KEY_PATH
value: "/app/operator_keys/bls_key.json"
- name: ECDSA_PRIVATE_KEY_PATH
value: "/app/operator_keys/ecdsa_key.json"
- name: ECDSA_SIGNER_PRIVATE_KEY_PATH
value: "/app/operator_keys/signer_ecdsa_key.json"
- name: OPERATOR_ADDRESS
value: "YOUROPERATORADDRES"
# - name: OPERATOR_ADDRESS
# valueFrom:
# secretKeyRef:
# name: YOURSECREWITHWALLET
# key: ecdsa-public-key
value: "YOUR_OPERATOR_ADDRES"
- name: OPERATOR_SIGNATURE_ADDRESS
valueFrom:
secretKeyRef:
name: YOUR_ECDSA_SIGN_KEY_SECRET
key: ecdsa-public-key
- name: OPERATOR_SIGNER_ECDSA_KEY_PASSWORD
valueFrom:
secretKeyRef:
name: YOUR_ECDSA_SIGN_KEY_SECRET
key: ecdsa-private-key-password
- name: OPERATOR_BLS_KEY_PASSWORD
valueFrom:
secretKeyRef:
name: YOURSECREWITHWALLET
name: YOUR_BLS_KEY_SECRET
key: bls-private-key-password
- name: OPERATOR_ECDSA_KEY_PASSWORD
valueFrom:
secretKeyRef:
name: YOURSECREWITHWALLET
name: YOUR_ECDSA_KEY_SECRET
key: ecdsa-private-key-password
- name: HTTP_RPC_URL
value: https://lb.drpc.org/ogrpc?network=ethereum
value: https://lb.drpc.org/ogrpc?network=ethereum # Your rpc
- name: WS_RPC_URL
value: wss://lb.drpc.org/ogrpc?network=holesky
value: wss://lb.drpc.org/ogrpc?network=ethereum # Your rpc

serviceAccount:
create: true
Expand All @@ -42,20 +56,27 @@ serviceAccount:
volumes:
- name: bls-key
secret:
secretName: YOURSECREWITHWALLET
secretName: YOUR_BLS_KEY_SECRET
items:
- key: bls-private-key
path: bls_key.json
- name: ecdsa-key
secret:
secretName: YOURSECREWITHWALLET
secretName: YOUR_ECDSA_KEY_SECRET
items:
- key: ecdsa-private-key
path: ecdsa_key.json
- name: signer-ecdsa-key
secret:
secretName: YOUR_ECDSA_SIGN_KEY_SECRET
items:
- key: ecdsa-private-key
path: ecdsa_key.json

configs:
operator.yaml: |
# this sets the logger level (true = info, false = debug)
production: true
# EigenLayer Slasher contract address
Expand All @@ -67,17 +88,21 @@ configs:
# address which the aggregator listens on for operator signed messages
aggregator_server_ip_port_address: https://us-central1-openoracle-de73b.cloudfunctions.net/backend_apis/api/report_result
price_config_server_ip_port_address: https://us-central1-openoracle-de73b.cloudfunctions.net/backend_apis/api/price_feed_config
chain_name: ethmainnet
# avs node spec compliance https://eigen.nethermind.io/docs/spec/intro
eigen_metrics_ip_port_address: 0.0.0.0:9091
enable_metrics: true
node_api_ip_port_address: 0.0.0.0:9010
enable_node_api: true
health_ws_url: ws://localhost:3030/
# we need to register the operator on startup when running the docker compose file
# because unfortunately we cannot register the operator previously and save it in the anvil json file
# This is because anvil only dumps the state, and not the receipt tree, so when we restart anvil with
# the registered operator, it's blspubkey registering event with the compendium is not present anymore,
# and so the aggregator can't find it.... very annoying
register_operator_on_startup: true
chain_urls:
ethmainnet: wss://lb.drpc.org/ogrpc?network=ethereum
Loading

0 comments on commit aa941fe

Please sign in to comment.