Skip to content

Commit

Permalink
hotfix(operator): send only rpc host to telemetry service (#1316)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuArce authored Oct 24, 2024
1 parent 3845a1f commit 5f71bac
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OS := $(shell uname -s)
CONFIG_FILE?=config-files/config.yaml
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml

OPERATOR_VERSION=v0.10.0
OPERATOR_VERSION=v0.10.1

ifeq ($(OS),Linux)
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
Expand Down
2 changes: 1 addition & 1 deletion batcher/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion batcher/aligned/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aligned"
version = "0.9.2"
version = "0.10.1"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion docs/3_guides/1_SDK_how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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.10.0" }
aligned-sdk = { git = "https://github.com/yetanotherco/aligned_layer", tag="v0.10.1" }
```

To find the latest release tag go to [releases](https://github.com/yetanotherco/aligned_layer/releases) and copy the
Expand Down
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* [Operator FAQ](operator_guides/1_operator_FAQ.md)
* [Troubleshooting](operator_guides/2_troubleshooting.md)
* Upgrading Guides
* [Upgrading to v0.10.0](operator_guides/upgrading_guides/v0_10_0.md)
* [Upgrading to v0.10.1](operator_guides/upgrading_guides/v0_10_1.md)
* [Upgrading to v0.9.2](operator_guides/upgrading_guides/v0_9_2.md)

## Useful links
Expand Down
4 changes: 2 additions & 2 deletions docs/operator_guides/0_running_an_operator.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Register as an Aligned operator in testnet

> **CURRENT VERSION:**
> Aligned Operator [v0.10.0](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.10.0)
> Aligned Operator [v0.10.1](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.10.1)
> **IMPORTANT:**
> You must be [whitelisted](https://docs.google.com/forms/d/e/1FAIpQLSdH9sgfTz4v33lAvwj6BvYJGAeIshQia3FXz36PFfF-WQAWEQ/viewform) to become an Aligned operator.
Expand All @@ -26,7 +26,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 --branch v0.10.0
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.10.1
cd aligned_layer
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Upgrading to v0.10.0
# Upgrading to v0.10.1

This guide will walk you through the process of upgrading your Aligned Operator to v0.10.0.
This guide will walk you through the process of upgrading your Aligned Operator to v0.10.1.

## Changes

Expand Down Expand Up @@ -49,7 +49,7 @@ To see the operator version, run:
This will display the current version of the operator binary.

```
Aligned Layer Node Operator version v0.10.0
Aligned Layer Node Operator version v0.10.1
```

### Step 4 - Restart the Operator
Expand Down
13 changes: 1 addition & 12 deletions operator/pkg/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package operator

import (
"fmt"
"github.com/yetanotherco/aligned_layer/common"
"math/big"
"regexp"
"strings"

"github.com/yetanotherco/aligned_layer/common"
)

func IsVerifierDisabled(disabledVerifiersBitmap *big.Int, verifierId common.ProvingSystemId) bool {
Expand All @@ -31,15 +29,6 @@ func BaseUrlOnly(input string) (string, error) {
}

host := matches[2]
path := matches[3]

// If the path is not empty, append the path without the last segment (api_key)
if path != "" {
pathSegments := strings.Split(path, "/")
if len(pathSegments) > 1 {
return host + strings.Join(pathSegments[:len(pathSegments)-1], "/"), nil
}
}

return host, nil
}
8 changes: 7 additions & 1 deletion operator/pkg/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ func TestBaseUrlOnlyHappyPath(t *testing.T) {
{"http://localhost:8545/asdfoij2a7831has89%342jddav98j2748", "localhost:8545"},
{"ws://test.com/23r2f98hkjva0udhvi1j%342jddav98j2748", "test.com"},
{"http://localhost:8545", "localhost:8545"},
{"https://myservice.com/holesky/ApiKey", "myservice.com/holesky"},
{"https://myservice.com/holesky/ApiKey", "myservice.com"},
{"https://holesky.myservice.com/holesky", "holesky.myservice.com"},
{"https://eth-mainnet.blastapi.io/12345678-abcd-1234-abcd-123456789012", "eth-mainnet.blastapi.io"},
{"https://eth-holesky.g.alchemy.com/v2/1234567890_abcdefghijklmnopqrstuv/", "eth-holesky.g.alchemy.com"},
{"https://a.b.c.d/1234", "a.b.c.d"},
{"https://a.b.c.d/1234/5678", "a.b.c.d"},
{"https://a.b.c.d.e/1234/", "a.b.c.d.e"},
}

for _, pair := range urls {
Expand Down

0 comments on commit 5f71bac

Please sign in to comment.