Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shell command #4

Merged
merged 3 commits into from
Mar 4, 2025
Merged
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
11 changes: 8 additions & 3 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ VERBOSE=3
# LOG_ROTATION=DAILY

# beacon chain endpoint url
# easily apply for a Beacon Chain endpoint on the quicknode.com platform.
BEACON_ENDPOINT=http://localhost:3500

# beacon client request timeout
Expand All @@ -17,6 +18,7 @@ BEACON_ENDPOINT=http://localhost:3500
#POLL_INTERVAL=6

# blob archiver api server listening address
# blob sidecars data is obtained from this endpoint.
LISTEN_ADDR=0.0.0.0:8000

# blob archiver origin block number
Expand All @@ -34,14 +36,17 @@ AWS_SECRET_ACCESS_KEY=password
# s3 storage region just use default value: us-east-1
AWS_REGION=us-east-1

#S3_CLIENT
S3_CLIENT=minio

# s3 storage endpoint
S3_ENDPOINT=http://localhost:9000
S3_ENDPOINT=http://${S3_CLIENT}:9000

# s3 storage bucket
S3_BUCKET=
S3_BUCKET=blobs

# s3 storage path
S3_PATH=
S3_PATH=/

# s3 storage compress
S3_COMPRESS=true
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ to your beacon client and storage backend of choice. Then you can run the projec
docker compose up
```

#### Get blobs
After successfully starting the service, you can use the following command to obtain the blob:

- get blob by block id from api service:
```shell
# also there is support other type of block id, like: finalized,justified.
curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/head' -H 'accept: application/json'
```

- get blob by slot number from api service:
```shell
curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/7111008' -H 'accept: application/json'
```

#### Storage Dashboard
MinIO has started the dashboard, allowing you to view the status of blob storage.
By default, you can access it directly at:
```http
http://localhost:9999
```

## Options

### `verbose`
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,27 @@ services:
depends_on:
- minio
- create-buckets
entrypoint: >
/bin/sh -c "
sleep 2;
api;
"
archiver:
build:
context: .
dockerfile: archiver.Dockerfile
env_file:
- .env
ports:
- "8001:8000"
depends_on:
- minio
- create-buckets
entrypoint: >
/bin/sh -c "
sleep 2;
archiver;
"
minio:
restart: unless-stopped
image: minio/minio:latest
Expand All @@ -37,6 +49,7 @@ services:
- minio
entrypoint: >
/bin/sh -c "
sleep 1;
/usr/bin/mc alias set minio http://minio:9000 admin password;
/usr/bin/mc mb minio/blobs;
/usr/bin/mc anonymous set public minio/blobs;
Expand Down