Skip to content

Commit 7ce4e87

Browse files
authored
Merge pull request #4 from optimism-java/readme
add shell command
2 parents 9eaa8b2 + a62ad74 commit 7ce4e87

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

.env.default

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ VERBOSE=3
88
# LOG_ROTATION=DAILY
99

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

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

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

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

39+
#S3_CLIENT
40+
S3_CLIENT=minio
41+
3742
# s3 storage endpoint
38-
S3_ENDPOINT=http://localhost:9000
43+
S3_ENDPOINT=http://${S3_CLIENT}:9000
3944

4045
# s3 storage bucket
41-
S3_BUCKET=
46+
S3_BUCKET=blobs
4247

4348
# s3 storage path
44-
S3_PATH=
49+
S3_PATH=/
4550

4651
# s3 storage compress
4752
S3_COMPRESS=true

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,27 @@ to your beacon client and storage backend of choice. Then you can run the projec
4141
docker compose up
4242
```
4343

44+
#### Get blobs
45+
After successfully starting the service, you can use the following command to obtain the blob:
46+
47+
- get blob by block id from api service:
48+
```shell
49+
# also there is support other type of block id, like: finalized,justified.
50+
curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/head' -H 'accept: application/json'
51+
```
52+
53+
- get blob by slot number from api service:
54+
```shell
55+
curl -X 'GET' 'http://localhost:8000/eth/v1/beacon/blob_sidecars/7111008' -H 'accept: application/json'
56+
```
57+
58+
#### Storage Dashboard
59+
MinIO has started the dashboard, allowing you to view the status of blob storage.
60+
By default, you can access it directly at:
61+
```http
62+
http://localhost:9999
63+
```
64+
4465
## Options
4566

4667
### `verbose`

docker-compose.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ services:
1212
depends_on:
1313
- minio
1414
- create-buckets
15+
entrypoint: >
16+
/bin/sh -c "
17+
sleep 2;
18+
api;
19+
"
1520
archiver:
1621
build:
1722
context: .
1823
dockerfile: archiver.Dockerfile
1924
env_file:
2025
- .env
26+
ports:
27+
- "8001:8000"
2128
depends_on:
2229
- minio
2330
- create-buckets
31+
entrypoint: >
32+
/bin/sh -c "
33+
sleep 2;
34+
archiver;
35+
"
2436
minio:
2537
restart: unless-stopped
2638
image: minio/minio:latest
@@ -37,6 +49,7 @@ services:
3749
- minio
3850
entrypoint: >
3951
/bin/sh -c "
52+
sleep 1;
4053
/usr/bin/mc alias set minio http://minio:9000 admin password;
4154
/usr/bin/mc mb minio/blobs;
4255
/usr/bin/mc anonymous set public minio/blobs;

0 commit comments

Comments
 (0)