Skip to content

Commit 5e762ef

Browse files
feat: add EigenLayer Onchain Exporter (#3)
* feat: Add initial version of code * chore: Add requirements.txt * feat: Add Dockerfile * ci: Add workflow to build and push Docker image * feat: Serve original requested_at instead of time_difference * feat: Sort blobs by requested_at * feat: Stop updating redundant metrics * fix: Cast FETCH_INTERVAL to int * feat: Add docker-compose for testing purposes * feat: implement eigenlayer onchain exporter * chore: add gh cli to the devcontainer * refactor: remove python files * fix: Rename module * doc: Update root command short description * fix: Update README.md Co-authored-by: Miguel Tenorio <46824157+AntiD2ta@users.noreply.github.com> * doc: Add Labels section * fix: Update README references * fix: Update command usage * feat: Update CI/CD workflow * fix: Prometheus metric labels * refactor: Log errors instead of stop the exporter * feat: Add eigenda_exporter_up metric * refactor: Remove RPC mutex * feat: Use backoff for RPC calls * feat: Add docker compose containers' names * refactor: Configure log level as string * refactor: Update config path default value * feat: Update Viper configuration * refactor: Update exprters shutting down process * fix: Init the EigenDA exporter up metric at the creation time * fix: Update docker compose volume * doc: Update README * refactor: Update confirmBatchInput TODO comment * feat: Check RPC ChainID * fix: Log Prometheus server error * fix: Typo * chore: Add checks and linters * fix: Ethereum Mainnet chain id * refactor: Update project structure and graceful exit * test: Init E2E tests * test: Add test cases --------- Co-authored-by: AntiD2ta <mtpotro41@gmail.com> Co-authored-by: Miguel Tenorio <46824157+AntiD2ta@users.noreply.github.com>
1 parent 5242819 commit 5e762ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5714
-422
lines changed

.config/dictionary.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Apks
2+
avsexporter
3+
Buildx
4+
cenkalti
5+
CODEOWNERS
6+
codespell
7+
Confirmer
8+
devcontainer
9+
Eigen
10+
eigenda
11+
eigenlayer
12+
ethclient
13+
ethcommon
14+
golangci
15+
Holeksy
16+
holesky
17+
IBLS
18+
markdownlint
19+
Nethermind
20+
promauto
21+
promhttp
22+
Pubkeys
23+
Rpcs
24+
stretchr
25+
twinstake

.config/markdownlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
line_length: false

.devcontainer/devcontainer.json

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,29 @@
33
"build": {
44
"dockerfile": "Dockerfile"
55
},
6-
76
// 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
8-
// "features": {},
9-
7+
"features": {
8+
"ghcr.io/devcontainers/features/go:1": {
9+
"version": "1.23.1"
10+
},
11+
"ghcr.io/devcontainers/features/github-cli:1": {},
12+
"ghcr.io/gvatsal60/dev-container-features/pre-commit:1": {}
13+
},
1014
// 👇 Use 'forwardPorts' to make a list of ports inside the container available locally.
1115
// "forwardPorts": [],
12-
1316
// 👇 Use 'postCreateCommand' to run commands after the container is created.
1417
// "postCreateCommand": "sudo apt install -y graphviz",
15-
1618
// 👇 Configure tool-specific properties.
1719
"customizations": {
18-
"vscode": {
19-
"extensions":[
20-
"ms-python.python",
21-
"njpwerner.autodocstring",
22-
"ms-python.vscode-pylance",
23-
"amazonwebservices.aws-toolkit-vscode",
20+
"vscode": {
21+
"extensions": [
22+
"golang.go",
23+
"Gruntfuggly.todo-tree",
2424
"streetsidesoftware.code-spell-checker",
25-
"GitHub.copilot",
26-
"ms-python.isort",
27-
"redhat.vscode-yaml",
28-
"hashicorp.terraform",
29-
"yzhang.markdown-all-in-one",
30-
"DavidAnson.vscode-markdownlint",
31-
"eamodio.gitlens",
32-
"github.vscode-github-actions"
25+
"DavidAnson.vscode-markdownlint"
3326
]
34-
}
35-
},
36-
"features": {
3727
}
38-
28+
}
3929
// 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
4030
// "remoteUser": "root"
41-
}
31+
}

.github/workflows/golangci-lint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: golangci-lint
2+
on:
3+
pull_request:
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
golangci:
10+
name: lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: stable
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v6
19+
with:
20+
version: v1.61.0

.github/workflows/publish-docker.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/publish-image.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI/CD pipeline
2+
3+
env:
4+
DOCKER_REGISTRY: nethermind.jfrog.io
5+
6+
REPO_DEV: angkor-oci-local-dev
7+
REPO_STAGING: angkor-oci-local-staging
8+
REPO_PROD: angkor-oci-local-prod
9+
IMAGE_NAME: eigenlayer-onchain-exporter
10+
11+
12+
on:
13+
push:
14+
branches: [main]
15+
workflow_dispatch:
16+
17+
permissions:
18+
id-token: write
19+
contents: write
20+
21+
jobs:
22+
build_docker_image:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
DOCKER_IMAGE_NAME: ${{ env.IMAGE_NAME }}
26+
DOCKER_IMAGE_TAG: ${{ steps.set_tag.outputs.DOCKER_IMAGE_TAG }}
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Define image tag
35+
id: set_tag
36+
run: |
37+
export DOCKER_IMAGE_TAG=$(git describe --tags)
38+
# This one is to be able to use the image tag in the next steps in this job
39+
echo "DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG" >> $GITHUB_ENV
40+
# This one is to be able to use the image tag in the next jobs
41+
echo "DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG" >> $GITHUB_OUTPUT
42+
43+
- name: Setup Docker Buildx
44+
uses: docker/setup-buildx-action@v3
45+
46+
- name: Login to registry
47+
run: |
48+
docker login ${{ env.DOCKER_REGISTRY }} -u ${{ secrets.ARTIFACTORY_ANGKOR_USERNAME }} -p ${{ secrets.ARTIFACTORY_ANGKOR_TOKEN_CONTRIBUTOR }}
49+
- name: Build and Push
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
platforms: "linux/amd64"
54+
push: true
55+
tags: |
56+
${{ env.DOCKER_REGISTRY }}/${{ env.REPO_DEV }}/${{ env.IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)