Skip to content
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

Update oracle #445

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/v3-oracle/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: v3-oracle
version: 3.2.1
appVersion: v0.1.0
version: 3.2.2
appVersion: v0.5.1
kubeVersion: "^1.14.0-0"
description: The StakeWise application for submitting off-chain data to smart contracts.
type: application
Expand Down
31 changes: 17 additions & 14 deletions charts/v3-oracle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@

Kubernetes Helm chart for deploying [v3-oracle](https://github.com/stakewise/v3-oracle).

## TL;DR;

```bash
$ helm repo add stakewise https://charts.stakewise.io
$ helm install my-release --set settings.executionEndpoints="ws://eth1-node.chain.svc.cluster.local:8546" --set settings.consensusEndpoints="eth2-beacon.chain.svc.cluster.local:4000" stakewise/v3-oracle
```

## Introduction

Can be used to deploy StakeWise oracles on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

- Kubernetes 1.20+
- Kubernetes 1.24+
- Helm 3

## Installing the Chart

To install the chart with the release name `my-release`:

```bash
$ helm repo add stakewise https://charts.stakewise.io
$ helm install my-release --set settings.executionEndpoints="XXXXXXXX" --set settings.consensusEndpoints="XXXXXXXX" stakewise/v3-oracle
helm repo add stakewise https://charts.stakewise.io
helm upgrade --install v3-oracle stakewise/v3-oracle \
--set settings.network="goerli" \
--set settings.executionGraphqlEndpoint="http://localhost:6001/graphql" \
--set settings.executionEndpoint="http://localhost:8545" \
--set settings.consensusEndpoint="http://localhost:6002" \
--set settings.ipfsLocalClientEndpoint="/dns/ipfs.example.com/tcp/443/https" \
--set settings.walletPrivateKey="0x0000000000000000000000000000000000000000" \
--set settings.ipfsInfuraClientUsername="username" \
--set settings.ipfsInfuraClientPassword="password" \
--set settings.ipfsWeb3StorageToken="token" \
--namespace v3-oracle
```

The command deploys oracle on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists various ways to override default configuration during deployment.
Expand All @@ -33,10 +36,10 @@ The command deploys oracle on the Kubernetes cluster in the default configuratio

## Uninstalling the Chart

To uninstall/delete the `my-release` deployment:
To uninstall/delete the `v3-operator` deployment:
antares-sw marked this conversation as resolved.
Show resolved Hide resolved

```bash
$ helm delete my-release
helm delete v3-operator
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
Expand All @@ -46,15 +49,15 @@ The command removes all the Kubernetes components associated with the chart and
See `values.yaml` for configuration notes. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```bash
$ helm install my-release stakewise/v3-oracle --set settings.executionEndpoints="XXXXXXXX" --set settings.awsSecretconsensusEndpointsAccessKey="XXXXXXXX"
helm install my-release stakewise/v3-oracle --set settings.executionEndpoints="XXXXXXXX" --set settings.consensusEndpoints="XXXXXXXX"
```

The above command specifies the web3 endpoint.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
$ helm install my-release stakewise/v3-oracle -f values.yaml
helm upgrade --install v3-operator stakewise/v3-oracle -f values.yaml
```

> **Tip**: You can override the default [values.yaml](values.yaml)
13 changes: 13 additions & 0 deletions charts/v3-oracle/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,27 @@ data:
LOG_LEVEL: {{ .Values.settings.logLevel | quote }}
NETWORK: {{ .Values.settings.network | quote }}
IPFS_LOCAL_CLIENT_ENDPOINT: {{ .Values.settings.ipfsLocalClientEndpoint | quote }}
{{- if or .Values.settings.ipfsLocalUsername .Values.settings.ipfsLocalPassword }}
IPFS_LOCAL_USERNAME: {{ .Values.settings.ipfsLocalUsername | quote}}
IPFS_LOCAL_PASSWORD: {{ .Values.settings.ipfsLocalPassword | quote}}
{{- end }}
EXECUTION_ENDPOINT: {{ .Values.settings.executionEndpoint | quote }}
CONSENSUS_ENDPOINT: {{ .Values.settings.consensusEndpoint | quote }}
CONSENSUS_CLIENT_TIMEOUT: {{ .Values.settings.consensusClientTimeout | quote }}
EXECUTION_CLIENT_TIMEOUT: {{ .Values.settings.executionClientTimeout | quote }}
MEV_RELAY_TIMEOUT: {{ .Values.settings.mevRelayTimeout | quote }}
IPFS_FETCH_ENDPOINTS: {{ .Values.settings.ipfsFetchEndpoints | quote }}
IPFS_DATA_FETCH_TIMEOUT: {{ .Values.settings.ipfsDataFetchTimeout | quote }}
DATABASE: "/data/oracle.db"
{{- if .Values.settings.executionGraphqlEndpoint }}
EXECUTION_GRAPHQL_ENDPOINT: {{ .Values.settings.executionGraphqlEndpoint | quote }}
{{- end }}
VALIDATORS_FETCH_CHUNK_SIZE: {{ .Values.settings.validatorsFetchChunkSize | quote }}
VALIDATORS_WITHDRAWALS_CHUNK_SIZE: {{ .Values.settings.validatorsWithdrawalsChunkSize | quote }}
VALIDATORS_WITHDRAWALS_CONCURRENCY: {{ .Values.settings.validatorsWithdrawalsConcurrency | quote }}
DEFAULT_RETRY_TIME: {{ .Values.settings.defaultRetryTime | quote }}
CONSENSUS_BLOCK_CHUNK_SIZE: {{ .Values.settings.consensusBlockChunkSize | quote }}
CONSENSUS_BLOCK_CONCURRENCY: {{ .Values.settings.consensusBlockConcurrency | quote }}
EVENTS_BLOCKS_RANGE_INTERVAL: {{ .Values.settings.eventsBlockRangeInterval | quote }}
METRICS_ENABLED: {{ .Values.settings.metricsEnabled | quote }}
HEALTHZ_ENABLED: {{ .Values.settings.healthzEnabled | quote }}
20 changes: 16 additions & 4 deletions charts/v3-oracle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ serviceAccount:
image:
registry: "europe-west4-docker.pkg.dev"
repository: "stakewiselabs/public/v3-oracle"
tag: "master"
tag: "v0.5.1"
pullPolicy: IfNotPresent
pullSecrets: [ ]

Expand Down Expand Up @@ -106,24 +106,36 @@ settings:
sentryDsn: ""

validatorsWithdrawalsConcurrency: "20"
validatorsFetchChunkSize: "100"
validatorsWithdrawalsChunkSize: "86400" # seconds
consensusBlockChunkSize: "100"
defaultRetryTime: "180"
eventsBlockRangeInterval: "43200"

metricsEnabled: "False"
healthzEnabled: "False"

## Ethereum / Gnosis Nodes
##
executionEndpoint: ""
consensusEndpoint: ""
# executionGraphqlEndpoint: ""
executionGraphqlEndpoint: ""
consensusClientTimeout: "30"
executionClientTimeout: "30"
mevRelayTimeout: "10"
consensusBlockConcurrency: "5"

## IPFS Settings
##
ipfsLocalClientEndpoint: ""
ipfsLocalUsername: ""
ipfsLocalPassword: ""
ipfsInfuraClientUsername: ""
ipfsInfuraClientPassword: ""
ipfsPinataApiKey: ""
ipfsPinataSecretKey: ""
ipfsWeb3StorageToken: ""
ipfsDataFetchTimeout: "300"
ipfsFetchEndpoints: "https://stakewise-v3.infura-ipfs.io,http://cloudflare-ipfs.com,https://gateway.pinata.cloud,https://ipfs.io"

## If false, data ownership will not be reset at startup
Expand All @@ -139,10 +151,10 @@ persistence:
storageClassName: ""
accessModes:
- ReadWriteOnce
size: 1Gi
size: 3Gi

ipfs:
enabled: true
enabled: false

## Prometheus Service Monitor
## ref: https://github.com/coreos/prometheus-operator
Expand Down