From 48aa14e6c55b84c0f6bd5f69af791e2e9543873b Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Tue, 4 Mar 2025 13:34:50 +0800 Subject: [PATCH 1/3] add shell command --- .env.default | 11 ++++++++--- README.md | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.env.default b/.env.default index 2ca8ab4..deb6737 100644 --- a/.env.default +++ b/.env.default @@ -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 @@ -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 @@ -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 diff --git a/README.md b/README.md index a3f8874..1cceaf1 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,20 @@ 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' +``` + ## Options ### `verbose` From cbc33fa894530f309173f58b2c07fd2b909bb5c1 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Tue, 4 Mar 2025 17:05:41 +0800 Subject: [PATCH 2/3] docker compose update --- docker-compose.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index acac179..591d975 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 @@ -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; From a62ad74f6b20b404bff21fa8285011ce27b049d9 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Tue, 4 Mar 2025 17:20:28 +0800 Subject: [PATCH 3/3] update readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 1cceaf1..f86cd2d 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,13 @@ curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/head' -H 'accep 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`