Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
Closed
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
27 changes: 27 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker

on:
push:
branches: [ main ]

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/blockprint:latest
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.9-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

CMD ["gunicorn", "api_server:app", "--bind", "0.0.0.0:8000", "--timeout", "1800"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ If you then want to use the classifier to build an sqlite database:
```
gunicorn api_server:app --timeout 1800
```
### Running with Docker

Build the Docker image:
```
docker build -t blockprint .
```

Run the container (mapping port 8000 to host):
```
docker run -p 8000:8000 blockprint
```

The API will be available at http://localhost:8000

It will take a few minutes to start-up while it loads all of the training data into memory.

Expand Down
10 changes: 10 additions & 0 deletions k8s/kustomize/lighthouse/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

helmCharts:
- name: lighthouse
repo: https://ethpandaops.github.io/ethereum-helm-charts
version: 1.1.5
releaseName: lighthouse
namespace: default
valuesFile: values-override.yaml
47 changes: 47 additions & 0 deletions k8s/kustomize/lighthouse/values-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Lighthouse configuration values
image:
repository: sigp/lighthouse
tag: latest
pullPolicy: IfNotPresent

mode: beacon

persistence:
enabled: true
size: 100Gi
storageClassName: null
accessModes: [ReadWriteOnce]

# Network ports
p2pPort: 9000
httpPort: 5052
metricsPort: 5054

# Security
jwt: "ecb22bc24e7d4061f7ed690ccd5846d7d73f5d2b9733267e12f56790398d908a"
containerSecurityContext:
runAsNonRoot: true
runAsUser: 1000
readOnlyRootFilesystem: true

# Resources
resources:
limits:
cpu: "4"
memory: "16Gi"
requests:
cpu: "2"
memory: "8Gi"

# Mainnet configuration
extraArgs:
- --network=mainnet
- --execution-endpoint=http://execution-client:8551
- --execution-jwt=/jwt.hex
- --checkpoint-sync-url=https://beaconstate.info
- --http-allow-origin=*

# Monitoring
serviceMonitor:
enabled: false
path: "/metrics"
10 changes: 10 additions & 0 deletions k8s/kustomize/nethermind/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

helmCharts:
- name: nethermind
repo: https://ethpandaops.github.io/ethereum-helm-charts
version: 1.0.14
releaseName: nethermind
namespace: default
valuesFile: values-override.yaml
29 changes: 29 additions & 0 deletions k8s/kustomize/nethermind/values-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Nethermind configuration values
image:
repository: nethermind/nethermind
tag: latest

persistence:
enabled: true
size: 20Gi

p2pPort: 30303
httpPort: 8545
wsPort: 8546
authPort: 8551
metricsPort: 9545
jwt: "ecb22bc24e7d4061f7ed690ccd5846d7d73f5d2b9733267e12f56790398d908a"

# Additional customizations
replicas: 1
resources:
limits:
cpu: "2"
memory: "8Gi"
requests:
cpu: "1"
memory: "4Gi"

extraArgs:
- --config=mainnet
- --Network.MaxActivePeers=100
10 changes: 10 additions & 0 deletions k8s/kustomize/reth/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

helmCharts:
- name: reth
repo: https://ethpandaops.github.io/ethereum-helm-charts
version: 0.0.15
releaseName: reth
namespace: default
valuesFile: values-override.yaml
47 changes: 47 additions & 0 deletions k8s/kustomize/reth/values-override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Reth configuration values
image:
repository: ethpandaops/reth
tag: main
pullPolicy: IfNotPresent

persistence:
enabled: true
size: 100Gi
storageClassName: null
accessModes: [ReadWriteOnce]

# Network ports
p2pPort: 30303
httpPort: 8545
wsPort: 8546
authPort: 8551
metricsPort: 9001

# Security
jwt: "ecb22bc24e7d4061f7ed690ccd5846d7d73f5d2b9733267e12f56790398d908a"
containerSecurityContext:
runAsNonRoot: true
runAsUser: 1000
readOnlyRootFilesystem: true

# Resources
resources:
limits:
cpu: "4"
memory: "16Gi"
requests:
cpu: "2"
memory: "8Gi"

# Mainnet configuration
extraArgs:
- --chain=mainnet
- --network.max-peers=100
- --rpc.http
- --rpc.ws
- --rpc.auth

# Monitoring
serviceMonitor:
enabled: false
path: "/debug/metrics/prometheus"