Skip to content

Commit

Permalink
docs: improve operator guide (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce committed Jul 16, 2024
1 parent 52627ed commit a885386
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OS := $(shell uname -s)
CONFIG_FILE?=config-files/config.yaml
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml

OPERATOR_VERSION=v0.2.1
OPERATOR_VERSION=v0.3.0

ifeq ($(OS),Linux)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
Expand Down Expand Up @@ -101,6 +101,12 @@ build_operator: deps
@go build -ldflags "-X main.Version=$(OPERATOR_VERSION)" -o ./operator/build/aligned-operator ./operator/cmd/main.go
@echo "Operator built into /operator/build/aligned-operator"

update_operator:
@echo "Updating Operator..."
@./scripts/fetch_latest_release.sh
@make build_operator
@./operator/build/aligned-operator --version

bindings:
cd contracts && ./generate-go-bindings.sh

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/1_SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To use this SDK in your Rust project, add the following to your `Cargo.toml`:

```toml
[dependencies]
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.2.1" }
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.3.0" }
```

To find the latest release tag go to [releases](https://github.com/yetanotherco/aligned_layer/releases) and copy the version of the release that has the `latest` badge.
Expand Down
16 changes: 12 additions & 4 deletions docs/operator_guides/0_running_an_operator.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Register as an Aligned operator in testnet

> **CURRENT VERSION:**
> Aligned Operator [v0.3.0](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.3.0)
> **IMPORTANT:**
> You must be [whitelisted](https://docs.google.com/forms/d/e/1FAIpQLSdH9sgfTz4v33lAvwj6BvYJGAeIshQia3FXz36PFfF-WQAWEQ/viewform) to become an Aligned operator.
Expand Down Expand Up @@ -38,7 +41,7 @@ Minimum hardware requirements:
To start with, clone the Aligned repository and move inside it

```bash
git clone https://github.com/yetanotherco/aligned_layer.git
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.3.0
cd aligned_layer
```

Expand Down Expand Up @@ -70,15 +73,20 @@ To build the operator binary, run:
make build_operator
```

To update the operator, run:
### Upgrading the Operator

If you want to upgrade the operator, run:

```bash
git pull
make build_operator
make update_operator
```

This will recreate the binaries. You can then proceed to restart the operator.

You can find the latest version of the operator [here](https://github.com/yetanotherco/aligned_layer/releases).

### Checking the Operator Version

To see the operator version, run:

```bash
Expand Down
7 changes: 7 additions & 0 deletions scripts/fetch_latest_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# The script fetches the latest release tag from the repository and checks out that tag.
git fetch --tags
latesttag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo checking out ${latesttag}
git checkout ${latesttag}

0 comments on commit a885386

Please sign in to comment.