Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 6 additions & 4 deletions docs/Developers/Guides/runChallengerK8s.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Running a challenger in kubernetes

<div class="artifacthub-widget" data-url="https://artifacthub.io/packages/helm/chronicle/challenger" data-theme="dark" data-header="true" data-stars="true" data-responsive="true"><blockquote><p lang="en" dir="ltr"><b>challenger</b>: A Helm chart for deploying the OpPoke Challenger Bot (go and rust) in Kubernetes</p>&mdash; Open in <a href="https://artifacthub.io/packages/helm/chronicle/challenger">Artifact Hub</a></blockquote></div><script async src="https://artifacthub.io/artifacthub-widget.js"></script>
Challenger chart version: **0.1.0**

Install exactly this version, not the latest version published to the Helm repository.

---

Expand All @@ -12,7 +14,7 @@ Challenger Implementations:
- [chronicleprotocol/challenger-rs](https://github.com/chronicleprotocol/challenger-rs)

Challenger helm chart:
- [challenger helm chart](https://github.com/chronicleprotocol/charts/blob/main/charts/challenger/)
- [challenger helm chart](https://github.com/chronicleprotocol/charts/tree/challenger-0.1.0/charts/challenger)

## Requirements
- A Kubernetes cluster (Managed cluster like EKS, GKE, AKS, or something like K3s, K0s, kind, etc.)
Expand Down Expand Up @@ -52,9 +54,9 @@ You will now have a kuberenetes secret called `my-eth-keys`. this secret will ha
The challenger has two different implemantations that can be run, in Go and Rust. Challengers all need a valid ethereum rpc node, and optionally a flashbots/mev protected rpc for submitting transactions to a private mempool.


You can view the [default values](https://github.com/chronicleprotocol/charts/blob/main/charts/challenger/values.yaml) to see what the helm chart expects.
You can view the [default values](https://github.com/chronicleprotocol/charts/blob/challenger-0.1.0/charts/challenger/values.yaml) to see what the helm chart expects.

Examples of minimal values needed can be viewed [here](https://github.com/chronicleprotocol/charts/tree/main/charts/challenger/ci)
Examples of minimal values needed can be viewed [here](https://github.com/chronicleprotocol/charts/tree/challenger-0.1.0/charts/challenger/ci)

You will want to create a values file containg your challenger bot's config like this:

Expand Down
6 changes: 3 additions & 3 deletions docs/validators/existing-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Deploying the validator into an existing kubernetes cluster.

### Helm Chart details:

![Dynamic YAML Badge](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fchronicleprotocol.github.io%2Fcharts%2Findex.yaml&query=%24.entries.validator%5B0%5D.version&label=Validator%20ChartVersion&color=green)
Validator chart version: **0.6.11**

<div class="artifacthub-widget" data-url="https://artifacthub.io/packages/helm/chronicle/validator" data-theme="light" data-header="true" data-stars="true" data-responsive="true"><blockquote><p lang="en" dir="ltr"><b>validator</b>: A Helm chart for deploying Chronicle Validator on Kubernetes</p>&mdash; Open in <a href="https://artifacthub.io/packages/helm/chronicle/validator">Artifact Hub</a></blockquote></div><script async src="https://artifacthub.io/artifacthub-widget.js"></script>
Operators must install exactly this version, not the latest version published to the Helm repository.

## Notable changes include:

Expand Down Expand Up @@ -86,7 +86,7 @@ vao:

You will need to generate a new encrypted keystore with Ethereum address matching a specific first byte identifier.

Please look at the script [here](https://github.com/chronicleprotocol/scripts/blob/main/feeds/keystore-generator.sh), which will help you do this
Please look at the script [here](https://github.com/chronicleprotocol/scripts/blob/5e1970c5a1dc476ba9c1d0db7b8cbf5659e92876/feeds/keystore-generator.sh), which will help you do this


#### Create Namespace
Expand Down
19 changes: 9 additions & 10 deletions docs/validators/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ A single script installation from baremetal to running validator, using k3s.

### Helm Chart details:

![Dynamic YAML Badge](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fchronicleprotocol.github.io%2Fcharts%2Findex.yaml&query=%24.entries.validator%5B0%5D.version&label=Validator%20ChartVersion&color=green)
Validator chart version: **0.6.11**

<div class="artifacthub-widget" data-url="https://artifacthub.io/packages/helm/chronicle/validator" data-theme="light" data-header="true" data-stars="true" data-responsive="true"><blockquote><p lang="en" dir="ltr"><b>validator</b>: A Helm chart for deploying Chronicle Validator on Kubernetes</p>&mdash; Open in <a href="https://artifacthub.io/packages/helm/chronicle/validator">Artifact Hub</a></blockquote></div><script async src="https://artifacthub.io/artifacthub-widget.js"></script>
Operators must install exactly this version, not the latest version published to the Helm repository.


This documentation covers how to run a validator as part of the Chronicle Protocol oracle network. Running a validator is a great way to contribute to the network.
Expand All @@ -33,7 +33,7 @@ It will attempt to install:

* [k3s](https://docs.k3s.io/installation)
* [Helm v3](https://helm.sh/docs/intro/install/)
* Generate `generated-values.yaml` needed to install the [`chronicle/validator`](https://github.com/chronicleprotocol/charts/tree/main/charts/validator) helm chart
* Generate `generated-values.yaml` needed to install the [`chronicle/validator`](https://github.com/chronicleprotocol/charts/tree/validator-0.6.11/charts/validator) helm chart


## Requirements:
Expand Down Expand Up @@ -114,7 +114,7 @@ Download the install bash script:

```bash
cd /tmp
wget -N https://raw.githubusercontent.com/chronicleprotocol/scripts/main/feeds/k3s-install/install.sh
wget -N https://raw.githubusercontent.com/chronicleprotocol/scripts/5e1970c5a1dc476ba9c1d0db7b8cbf5659e92876/feeds/k3s-install/install.sh
chmod a+x install.sh
```

Expand Down Expand Up @@ -201,10 +201,9 @@ This is your Feed address:
0x0000000111112222233333444444555556666677
-----------------------------------------------------------------------------------------------------
[INFO]:..........generate helm values file..........
You need to install the helm chart with the following command:
-------------------------------------------------------------------------------------------------------------------------------
| helm install "demo" -f "/home/ubuntu/demo/generated-values.yaml" chronicle/validator --namespace "demo" |
-------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Script will attempt to run ' helm install "demo" -f "/home/ubuntu/demo/generated-values.yaml" chronicle/validator --namespace "demo" --version "0.6.11"' |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO]:..........create helm release..........
"chronicle" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
Expand All @@ -225,7 +224,7 @@ NOTES:
> Please provide your `ETH_FROM` address to the Chronicle team so it can be whitelisted.

:::tip
The install script can be run multiple times with the same values. It will attempt to run `helm upgrade <feedname> -n <feedname> chronicle/validator` on your feed release, with any updated input variables. **Note**: it will delete secrets in an existing namespace, and recreate them as, secrets are generally immutable
The install script can be run multiple times with the same values. It will attempt to run `helm upgrade <feedname> -n <feedname> chronicle/validator --version 0.6.11` on your feed release, with any updated input variables. **Note**: it will delete secrets in an existing namespace, and recreate them as, secrets are generally immutable
:::

### Verify that the helm release has been successful:
Expand Down Expand Up @@ -363,7 +362,7 @@ vao:

```

You can view all values available for the [validator chart](https://github.com/chronicleprotocol/charts/blob/main/charts/validator/README.md#values), however the values provided with the installer are enough to get you going.
You can view all values available for the [validator chart](https://github.com/chronicleprotocol/charts/blob/validator-0.6.11/charts/validator/README.md#values), however the values provided with the installer are enough to get you going.

A useful value to add is `.Values.global.logLevel`as show above. setting `logLevel: debug`will provide more verbose logging and can help you identify issues with the services. Its advised to run the default values (`warning`) once you have your feed stable. Acceptable values are `debug, info, warning, error`

Expand Down
2 changes: 1 addition & 1 deletion docs/validators/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The user-provided configs are sufficient for interacting with the k3s cluster an

Make sure that you `$KUBECONFIG` is set to a file that is accessible by your system user with the correct permissions.

You can view the functions responsible for setting kubeconfig [here](https://github.com/chronicleprotocol/scripts/blob/main/feeds/k3s-install/install.sh#L144-L149)
You can view the functions responsible for setting kubeconfig [here](https://github.com/chronicleprotocol/scripts/blob/5e1970c5a1dc476ba9c1d0db7b8cbf5659e92876/feeds/k3s-install/install.sh#L154-L172)

### $KUBECONFIG file has expired

Expand Down
22 changes: 11 additions & 11 deletions docs/validators/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ How to perform an upgrade on a validator

Helm Chart details:

![Dynamic YAML Badge](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fchronicleprotocol.github.io%2Fcharts%2Findex.yaml&query=%24.entries.validator%5B0%5D.version&label=Validator%20ChartVersion&color=green)
Validator chart version: **0.6.11**

<div class="artifacthub-widget" data-url="https://artifacthub.io/packages/helm/chronicle/validator" data-theme="light" data-header="true" data-stars="true" data-responsive="true"><blockquote><p lang="en" dir="ltr"><b>validator</b>: A Helm chart for deploying Chronicle Validator on Kubernetes</p>&mdash; Open in <a href="https://artifacthub.io/packages/helm/chronicle/validator">Artifact Hub</a></blockquote></div><script async src="https://artifacthub.io/artifacthub-widget.js"></script>
Operators must install exactly this version, not the latest version published to the Helm repository.

<br/>

Expand Down Expand Up @@ -74,9 +74,9 @@ export FEED_NAME=my-feed
```
### Prepare values

The values.yaml file is used to configure the validator. The file is generated by the install script, and should be updated to reflect the latest version of the feed chart.
The values.yaml file is used to configure the validator. The file is generated by the install script, and should be updated to match the chart version pinned on this page (`0.6.11`).

With the latest version of the chart, there are a few changes that need to be made to the `values.yaml` / `generated-values.yaml` file:
With chart version `0.6.11`, there are a few changes that need to be made to the `values.yaml` / `generated-values.yaml` file:


Please structure your helm values like this:
Expand Down Expand Up @@ -108,7 +108,7 @@ vao:

```
:::danger
Please ensure your values yaml file is updated to reflect the latest requirements for the validator chart, with the correct values for `ethConfig`, `ethRpcUrl` and `rpcUrl`.
Please ensure your values yaml file is updated to reflect the requirements of validator chart version `0.6.11`, with the correct values for `ethConfig` and `rpcUrl`.
:::

```
Expand All @@ -122,9 +122,9 @@ helm upgrade $FEED_NAME -n $FEED_NAME -f $HOME/$FEED_NAME/generated-values.yaml

## Upgrading using `upgrade.sh`

To simplify the upgrade process, we have created a helper script that will upgrade your validator to the latest version.
To simplify the upgrade process, we have created a helper script that will upgrade your validator to the chart version pinned on this page (`0.6.11`).

This script will attempt to run `helm upgrade <feedname> -n <feedname> chronicle/validator` on your feed release, with any updated input variables.
This script will attempt to run `helm upgrade <feedname> -n <feedname> chronicle/validator --version 0.6.11` on your feed release, with any updated input variables.

:::caution
Please use the correct `FEED_NAME`, which should be the same as your helm release name, if deployed using the `install.sh` script previously
Expand All @@ -137,11 +137,11 @@ su - <FEED_USERNAME>
export FEED_NAME=my-feed
```

### Download the latest `upgrade.sh`
### Download `upgrade.sh`

Get the latest upgrade.sh script:
Get the `upgrade.sh` script pinned to a fixed commit. It upgrades to chart version `0.6.11`:
```
wget -N https://raw.githubusercontent.com/chronicleprotocol/scripts/main/feeds/k3s-install/upgrade.sh
wget -N https://raw.githubusercontent.com/chronicleprotocol/scripts/5e1970c5a1dc476ba9c1d0db7b8cbf5659e92876/feeds/k3s-install/upgrade.sh
chmod a+x upgrade.sh
./upgrade.sh
```
Expand All @@ -159,7 +159,7 @@ If `kubectl/helm` commands fail, please ensure you have `$KUBECONFIG` set correc

## Verify the helm release and version

Verify the chart version has changed and matches what the latest feed version:
Verify the chart version has changed and matches the chart version pinned on this page (`0.6.11`):

```
helm list -n $FEED_NAME
Expand Down