├── .gitignore ├── .dockerignore ├── chore.md ├── k8s ├── goerli │ ├── kustomization.yaml │ ├── pvc.yaml │ ├── service.yaml │ └── statefulset.yaml ├── holeksy │ ├── kustomization.yaml │ ├── pvc.yaml │ ├── service.yaml │ └── statefulset.yaml ├── mainnet │ ├── kustomization.yaml │ ├── pvc.yaml │ ├── service.yaml │ └── statefulset.yaml └── sepolia │ ├── kustomization.yaml │ ├── pvc.yaml │ ├── service.yaml │ └── statefulset.yaml ├── .github ├── dependabot.yml └── workflows │ └── docker-image.yml ├── Dockerfile ├── LICENSE ├── docker-compose ├── mainnet │ └── docker-compose.yml ├── sepolia │ └── docker-compose.yml ├── goerli │ └── docker-compose.yml └── holesky │ └── docker-compose.yml ├── README.md └── flags ├── prysm-beacon-chain └── geth /.gitignore: -------------------------------------------------------------------------------- 1 | chaindata 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | LICENSE 2 | .github 3 | k8s 4 | flags 5 | docker-compose 6 | README.md 7 | LICENSE 8 | -------------------------------------------------------------------------------- /chore.md: -------------------------------------------------------------------------------- 1 | Remove color in the output 2 | 3 | > ./somescript | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g" 4 | 5 | https://stackoverflow.com/questions/17998978/removing-colors-from-output 6 | -------------------------------------------------------------------------------- /k8s/goerli/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - pvc.yaml 5 | - service.yaml 6 | - statefulset.yaml 7 | images: 8 | - name: ethereum/go-client 9 | newTag: v1.13.15 10 | - name: gcr.io/prysmaticlabs/prysm/beacon-chain 11 | newTag: v5.0.3 12 | -------------------------------------------------------------------------------- /k8s/holeksy/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - pvc.yaml 5 | - service.yaml 6 | - statefulset.yaml 7 | images: 8 | - name: ethereum/go-client 9 | newTag: v1.13.15 10 | - name: gcr.io/prysmaticlabs/prysm/beacon-chain 11 | newTag: v5.0.3 12 | -------------------------------------------------------------------------------- /k8s/mainnet/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - pvc.yaml 5 | - service.yaml 6 | - statefulset.yaml 7 | images: 8 | - name: ethereum/go-client 9 | newTag: v1.13.15 10 | - name: gcr.io/prysmaticlabs/prysm/beacon-chain 11 | newTag: v5.0.3 12 | -------------------------------------------------------------------------------- /k8s/sepolia/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - pvc.yaml 5 | - service.yaml 6 | - statefulset.yaml 7 | images: 8 | - name: ethereum/go-client 9 | newTag: v1.13.15 10 | - name: gcr.io/prysmaticlabs/prysm/beacon-chain 11 | newTag: v5.0.3 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: weekly 7 | groups: 8 | actions: 9 | patterns: ["*"] 10 | 11 | - package-ecosystem: docker 12 | directory: / 13 | schedule: 14 | interval: weekly 15 | groups: 16 | docker: 17 | patterns: ["*"] 18 | -------------------------------------------------------------------------------- /k8s/goerli/pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: chaindata-geth 5 | spec: 6 | storageClassName: default # change it! 7 | resources: 8 | requests: 9 | storage: 500Gi 10 | volumeMode: Filesystem 11 | accessModes: 12 | - ReadWriteOnce 13 | --- 14 | apiVersion: v1 15 | kind: PersistentVolumeClaim 16 | metadata: 17 | name: chaindata-prysm 18 | spec: 19 | storageClassName: default # change it! 20 | resources: 21 | requests: 22 | storage: 300Gi 23 | volumeMode: Filesystem 24 | accessModes: 25 | - ReadWriteOnce 26 | -------------------------------------------------------------------------------- /k8s/holeksy/pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: chaindata-geth 5 | spec: 6 | storageClassName: default # change it! 7 | resources: 8 | requests: 9 | storage: 100Gi 10 | volumeMode: Filesystem 11 | accessModes: 12 | - ReadWriteOnce 13 | --- 14 | apiVersion: v1 15 | kind: PersistentVolumeClaim 16 | metadata: 17 | name: chaindata-prysm 18 | spec: 19 | storageClassName: default # change it! 20 | resources: 21 | requests: 22 | storage: 50Gi 23 | volumeMode: Filesystem 24 | accessModes: 25 | - ReadWriteOnce 26 | -------------------------------------------------------------------------------- /k8s/sepolia/pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: chaindata-geth 5 | spec: 6 | storageClassName: default # change it! 7 | resources: 8 | requests: 9 | storage: 500Gi 10 | volumeMode: Filesystem 11 | accessModes: 12 | - ReadWriteOnce 13 | --- 14 | apiVersion: v1 15 | kind: PersistentVolumeClaim 16 | metadata: 17 | name: chaindata-prysm 18 | spec: 19 | storageClassName: default # change it! 20 | resources: 21 | requests: 22 | storage: 200Gi 23 | volumeMode: Filesystem 24 | accessModes: 25 | - ReadWriteOnce 26 | -------------------------------------------------------------------------------- /k8s/mainnet/pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: chaindata-geth 5 | spec: 6 | storageClassName: default # change it! 7 | resources: 8 | requests: 9 | storage: 1500Gi 10 | volumeMode: Filesystem 11 | accessModes: 12 | - ReadWriteOnce 13 | --- 14 | apiVersion: v1 15 | kind: PersistentVolumeClaim 16 | metadata: 17 | name: chaindata-prysm 18 | spec: 19 | storageClassName: default # change it! 20 | resources: 21 | requests: 22 | storage: 500Gi 23 | volumeMode: Filesystem 24 | accessModes: 25 | - ReadWriteOnce 26 | -------------------------------------------------------------------------------- /k8s/goerli/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: geth 5 | spec: 6 | ports: 7 | - protocol: TCP 8 | targetPort: 8545 9 | port: 8545 10 | name: http 11 | - protocol: TCP 12 | targetPort: 8546 13 | port: 8546 14 | name: websocket 15 | selector: 16 | app: ethereum 17 | --- 18 | apiVersion: v1 19 | kind: Service 20 | metadata: 21 | name: prysm 22 | spec: 23 | ports: 24 | - protocol: TCP 25 | targetPort: 4000 26 | port: 4000 27 | name: grpc 28 | - protocol: TCP 29 | targetPort: 3500 30 | port: 3500 31 | name: jsonrpc 32 | selector: 33 | app: ethereum 34 | -------------------------------------------------------------------------------- /k8s/holeksy/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: geth 5 | spec: 6 | ports: 7 | - protocol: TCP 8 | targetPort: 8545 9 | port: 8545 10 | name: http 11 | - protocol: TCP 12 | targetPort: 8546 13 | port: 8546 14 | name: websocket 15 | selector: 16 | app: ethereum 17 | --- 18 | apiVersion: v1 19 | kind: Service 20 | metadata: 21 | name: prysm 22 | spec: 23 | ports: 24 | - protocol: TCP 25 | targetPort: 4000 26 | port: 4000 27 | name: grpc 28 | - protocol: TCP 29 | targetPort: 3500 30 | port: 3500 31 | name: jsonrpc 32 | selector: 33 | app: ethereum 34 | -------------------------------------------------------------------------------- /k8s/mainnet/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: geth 5 | spec: 6 | ports: 7 | - protocol: TCP 8 | targetPort: 8545 9 | port: 8545 10 | name: http 11 | - protocol: TCP 12 | targetPort: 8546 13 | port: 8546 14 | name: websocket 15 | selector: 16 | app: ethereum 17 | --- 18 | apiVersion: v1 19 | kind: Service 20 | metadata: 21 | name: prysm 22 | spec: 23 | ports: 24 | - protocol: TCP 25 | targetPort: 4000 26 | port: 4000 27 | name: grpc 28 | - protocol: TCP 29 | targetPort: 3500 30 | port: 3500 31 | name: jsonrpc 32 | selector: 33 | app: ethereum 34 | -------------------------------------------------------------------------------- /k8s/sepolia/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: geth 5 | spec: 6 | ports: 7 | - protocol: TCP 8 | targetPort: 8545 9 | port: 8545 10 | name: http 11 | - protocol: TCP 12 | targetPort: 8546 13 | port: 8546 14 | name: websocket 15 | selector: 16 | app: ethereum 17 | --- 18 | apiVersion: v1 19 | kind: Service 20 | metadata: 21 | name: prysm 22 | spec: 23 | ports: 24 | - protocol: TCP 25 | targetPort: 4000 26 | port: 4000 27 | name: grpc 28 | - protocol: TCP 29 | targetPort: 3500 30 | port: 3500 31 | name: jsonrpc 32 | selector: 33 | app: ethereum 34 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | FROM golang:1.22.2 as BUILDER 3 | RUN apt update && apt install -y build-essential git 4 | WORKDIR /geth 5 | ARG VERSION=v1.13.15 6 | RUN git clone --quiet --branch ${VERSION} --depth 1 https://github.com/ethereum/go-ethereum . 7 | RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build go run build/ci.go install -static ./cmd/geth 8 | 9 | FROM gcr.io/distroless/base-debian12:latest as latest 10 | COPY --from=BUILDER /geth/build/bin/geth /usr/local/bin/ 11 | EXPOSE 8545 8546 8551 30303 30303/udp 12 | USER 65532 13 | ENTRYPOINT ["geth"] 14 | 15 | FROM alpine:3.19.1 as debug 16 | COPY --from=BUILDER /geth/build/bin/geth /usr/local/bin/ 17 | ENTRYPOINT ["geth"] 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Shude Li 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docker-compose/mainnet/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | geth: 5 | image: ethereum/client-go:v1.13.15 6 | restart: unless-stopped 7 | ports: 8 | - 30303:30303 9 | - 30303:30303/udp 10 | - 8545:8545 11 | - 8546:8546 12 | volumes: 13 | - ${GETH_DATADIR:-/data/geth}:/root/.ethereum 14 | stop_signal: SIGINT 15 | stop_grace_period: 2m 16 | healthcheck: 17 | test: ["CMD-SHELL", "geth attach --exec eth.blockNumber"] 18 | interval: 10s 19 | timeout: 5s 20 | retries: 5 21 | command: 22 | - --http 23 | - --http.api=eth,net,web3 24 | - --http.addr=0.0.0.0 25 | - --http.vhosts=* 26 | - --http.corsdomain=* 27 | - --ws 28 | - --ws.origins=* 29 | - --ws.addr=0.0.0.0 30 | - --ws.api=eth,net,web3 31 | - --graphql 32 | - --graphql.corsdomain=* 33 | - --graphql.vhosts=* 34 | logging: 35 | driver: json-file 36 | options: 37 | max-size: "50m" 38 | max-file: "10" 39 | prysm: 40 | image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.0.3 41 | restart: unless-stopped 42 | stop_grace_period: 2m 43 | volumes: 44 | - ${PRYSM_DATADIR:-/data/prysm}:/data 45 | - ${GETH_DATADIR:-/data/geth}:/geth 46 | depends_on: 47 | geth: 48 | condition: service_healthy 49 | ports: 50 | - 4000:4000 51 | - 3500:3500 52 | command: 53 | - --accept-terms-of-use 54 | - --datadir=/data 55 | - --execution-endpoint=/geth/geth.ipc 56 | - --rpc-host=0.0.0.0 57 | - --rpc-port=4000 58 | - --grpc-gateway-corsdomain=* 59 | - --grpc-gateway-host=0.0.0.0 60 | - --grpc-gateway-port=3500 61 | logging: 62 | driver: json-file 63 | options: 64 | max-size: "50m" 65 | max-file: "10" 66 | -------------------------------------------------------------------------------- /docker-compose/sepolia/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | geth: 5 | image: ethereum/client-go:v1.13.15 6 | restart: unless-stopped 7 | ports: 8 | - 30303:30303 9 | - 30303:30303/udp 10 | - 8545:8545 11 | - 8546:8546 12 | volumes: 13 | - ${GETH_DATADIR:-/data/geth}:/data 14 | stop_grace_period: 2m 15 | healthcheck: 16 | test: ["CMD-SHELL", "geth attach --datadir /data --exec eth.blockNumber"] 17 | interval: 10s 18 | timeout: 5s 19 | retries: 5 20 | command: 21 | - --sepolia 22 | - --datadir=/data 23 | - --http 24 | - --http.api=eth,net,web3 25 | - --http.addr=0.0.0.0 26 | - --http.vhosts=* 27 | - --http.corsdomain=* 28 | - --ws 29 | - --ws.origins=* 30 | - --ws.addr=0.0.0.0 31 | - --ws.api=eth,net,web3 32 | - --graphql 33 | - --graphql.corsdomain=* 34 | - --graphql.vhosts=* 35 | logging: 36 | driver: json-file 37 | options: 38 | max-size: "50m" 39 | max-file: "10" 40 | genesis: 41 | image: alpine:latest 42 | restart: on-failure 43 | entrypoint: ["sh", "-c"] 44 | command: 45 | - "if [ ! -f genesis.ssz ]; then wget 'https://github.com/eth-clients/merge-testnets/raw/main/sepolia/genesis.ssz'; fi" 46 | working_dir: /genesis 47 | volumes: 48 | - ${PRYSM_DATADIR:-/data/prysm}:/genesis 49 | prysm: 50 | image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.0.3 51 | restart: unless-stopped 52 | stop_grace_period: 2m 53 | volumes: 54 | - ${PRYSM_DATADIR:-/data/prysm}:/data 55 | - ${GETH_DATADIR:-/data/geth}:/geth 56 | depends_on: 57 | geth: 58 | condition: service_healthy 59 | genesis: 60 | condition: service_completed_successfully 61 | command: 62 | - --accept-terms-of-use 63 | - --sepolia 64 | - --datadir=/data 65 | - --execution-endpoint=/geth/geth.ipc 66 | - --genesis-state=/data/genesis.ssz 67 | - --checkpoint-sync-url=https://sepolia.beaconstate.info 68 | - --genesis-beacon-api-url=https://sepolia.beaconstate.info 69 | logging: 70 | driver: json-file 71 | options: 72 | max-size: "50m" 73 | max-file: "10" 74 | -------------------------------------------------------------------------------- /docker-compose/goerli/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | geth: 5 | image: ethereum/client-go:v1.13.15 6 | restart: unless-stopped 7 | ports: 8 | - 30303:30303 9 | - 30303:30303/udp 10 | - 8545:8545 11 | - 8546:8546 12 | volumes: 13 | - ${GETH_DATADIR:-/data/geth}:/data 14 | stop_grace_period: 2m 15 | healthcheck: 16 | test: ["CMD-SHELL", "geth attach --datadir /data --exec eth.blockNumber"] 17 | interval: 10s 18 | timeout: 5s 19 | retries: 5 20 | command: 21 | - --goerli 22 | - --datadir=/data 23 | - --http 24 | - --http.api=eth,net,web3 25 | - --http.addr=0.0.0.0 26 | - --http.vhosts=* 27 | - --http.corsdomain=* 28 | - --ws 29 | - --ws.origins=* 30 | - --ws.addr=0.0.0.0 31 | - --ws.api=eth,net,web3 32 | - --graphql 33 | - --graphql.corsdomain=* 34 | - --graphql.vhosts=* 35 | logging: 36 | driver: json-file 37 | options: 38 | max-size: "50m" 39 | max-file: "10" 40 | genesis: 41 | image: alpine:latest 42 | restart: on-failure 43 | entrypoint: ["sh", "-c"] 44 | command: 45 | - "if [ ! -f genesis.ssz ]; then wget 'https://github.com/eth-clients/eth2-networks/raw/master/shared/prater/genesis.ssz'; fi" 46 | working_dir: /genesis 47 | volumes: 48 | - ${PRYSM_DATADIR:-/data/prysm}:/genesis 49 | prysm: 50 | image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.0.3 51 | restart: unless-stopped 52 | stop_grace_period: 2m 53 | volumes: 54 | - ${PRYSM_DATADIR:-/data/prysm}:/data 55 | - ${GETH_DATADIR:-/data/geth}:/geth 56 | depends_on: 57 | geth: 58 | condition: service_healthy 59 | genesis: 60 | condition: service_completed_successfully 61 | command: 62 | - --accept-terms-of-use 63 | - --goerli 64 | - --datadir=/data 65 | - --execution-endpoint=/geth/geth.ipc 66 | - --genesis-state=/data/genesis.ssz 67 | - --checkpoint-sync-url=https://goerli.beaconstate.info 68 | - --genesis-beacon-api-url=https://goerli.beaconstate.info 69 | logging: 70 | driver: json-file 71 | options: 72 | max-size: "50m" 73 | max-file: "10" 74 | -------------------------------------------------------------------------------- /docker-compose/holesky/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | geth: 5 | image: ethereum/client-go:v1.13.15 6 | restart: unless-stopped 7 | ports: 8 | - 30303:30303 9 | - 30303:30303/udp 10 | - 8545:8545 11 | - 8546:8546 12 | volumes: 13 | - ${GETH_DATADIR:-/data/geth}:/data 14 | stop_grace_period: 2m 15 | healthcheck: 16 | test: ["CMD-SHELL", "geth attach --datadir /data --exec eth.blockNumber"] 17 | interval: 10s 18 | timeout: 5s 19 | retries: 5 20 | command: 21 | - --holesky 22 | - --datadir=/data 23 | - --http 24 | - --http.api=eth,net,web3 25 | - --http.addr=0.0.0.0 26 | - --http.vhosts=* 27 | - --http.corsdomain=* 28 | - --ws 29 | - --ws.origins=* 30 | - --ws.addr=0.0.0.0 31 | - --ws.api=eth,net,web3 32 | - --graphql 33 | - --graphql.corsdomain=* 34 | - --graphql.vhosts=* 35 | logging: 36 | driver: json-file 37 | options: 38 | max-size: "50m" 39 | max-file: "10" 40 | genesis: 41 | image: alpine:latest 42 | restart: on-failure 43 | entrypoint: ["sh", "-c"] 44 | command: 45 | - "if [ ! -f genesis.ssz ]; then wget 'https://github.com/eth-clients/holesky/raw/main/custom_config_data/genesis.ssz'; fi" 46 | working_dir: /genesis 47 | volumes: 48 | - ${PRYSM_DATADIR:-/data/prysm}:/genesis 49 | prysm: 50 | image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.0.3 51 | restart: unless-stopped 52 | stop_grace_period: 2m 53 | volumes: 54 | - ${PRYSM_DATADIR:-/data/prysm}:/data 55 | - ${GETH_DATADIR:-/data/geth}:/geth 56 | depends_on: 57 | geth: 58 | condition: service_healthy 59 | genesis: 60 | condition: service_completed_successfully 61 | command: 62 | - --accept-terms-of-use 63 | - --holesky 64 | - --datadir=/data 65 | - --execution-endpoint=/geth/geth.ipc 66 | - --genesis-state=/data/genesis.ssz 67 | - --checkpoint-sync-url=https://holesky.beaconstate.info 68 | - --genesis-beacon-api-url=https://holesky.beaconstate.info 69 | logging: 70 | driver: json-file 71 | options: 72 | max-size: "50m" 73 | max-file: "10" 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Geth Docker 2 | 3 | - security by default, No root, No shell 4 | - minimal and static binary 5 | - multi-arch 6 | 7 | ## Use the docker image 8 | 9 | ``` 10 | docker pull ghcr.io/islishude/geth:latest 11 | docker pull ghcr.io/islishude/geth:1.13.12 12 | ``` 13 | 14 | **NOTE**: the default user id of the image is **65532** 15 | 16 | ## docker-compose 17 | 18 | - [mainnet](./docker-compose/mainnet) 19 | - [holesky](./docker-compose/holeksy) 20 | - [sepolia](./docker-compose/sepolia) 21 | - [goerli](./docker-compose/goerli) 22 | 23 | **Create the storage directories** 24 | 25 | ```console 26 | $ export GETH_DATADIR=/data/geth 27 | $ sudo mkdir -p $GETH_DATADIR 28 | $ export PRYSM_DATADIR=/data/prysm 29 | $ sudo mkdir -p $PRYSM_DATADIR 30 | ``` 31 | 32 | **Start** 33 | 34 | ``` 35 | $ docker-compose up -d 36 | ``` 37 | 38 | ## Kubernetes 39 | 40 | - [mainnet](./k8s/mainnet) 41 | - [holesky](./k8s/holeksy) 42 | - [sepolia](./k8s/sepolia) 43 | - [goerli](./k8s/goerli) 44 | 45 | **Create a storage class like following** 46 | 47 | ```yaml 48 | # an example for aws and ebs csi 49 | apiVersion: storage.k8s.io/v1 50 | kind: StorageClass 51 | metadata: 52 | name: my-ebs 53 | parameters: 54 | csi.storage.k8s.io/fstype: xfs 55 | encrypted: "false" 56 | iops: "3000" 57 | type: gp3 58 | provisioner: ebs.csi.aws.com 59 | reclaimPolicy: Delete 60 | volumeBindingMode: WaitForFirstConsumer 61 | allowVolumeExpansion: true 62 | ``` 63 | 64 | then update pvc.yaml file to change the storage class name to the above. 65 | 66 | the statefulsets are using official image(ethereum/client-go). 67 | 68 | if you want to use my image, then you need to add securityContext to the statefulset due to the default user is not root. 69 | 70 | ```yaml 71 | spec: 72 | template: 73 | spec: 74 | securityContext: 75 | runAsUser: 65532 76 | runAsGroup: 65532 77 | fsGroup: 65532 78 | fsGroupChangePolicy: OnRootMismatch 79 | ``` 80 | 81 | Start the statefulset in default namespace, you can add `-n` parameter to change it. 82 | 83 | ``` 84 | kubectl apply -n namespace -k k8s 85 | ``` 86 | 87 | ## For Development 88 | 89 | Refer to following link for the details 90 | 91 | https://github.com/islishude/eth-pos-devnet 92 | 93 | ## Command line help page 94 | 95 | - [geth](./flags/geth) 96 | - [prysm](./flags/prysm-beacon-chain) 97 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | tags: 8 | - "v*" 9 | pull_request: 10 | branches: 11 | - "main" 12 | 13 | env: 14 | REGISTRY: ghcr.io 15 | IMAGE_NAME: islishude/geth 16 | 17 | jobs: 18 | main: 19 | concurrency: "build" 20 | runs-on: ubuntu-latest 21 | permissions: 22 | contents: read 23 | packages: write 24 | id-token: write 25 | steps: 26 | - name: checkout repo 27 | uses: actions/checkout@v4 28 | 29 | - name: Login to Github Registry 30 | uses: docker/login-action@v3 31 | if: github.event_name != 'pull_request' 32 | with: 33 | registry: ${{ env.REGISTRY }} 34 | username: ${{ github.actor }} 35 | password: ${{ secrets.GITHUB_TOKEN }} 36 | 37 | - name: Set up QEMU 38 | uses: docker/setup-qemu-action@v3 39 | 40 | - name: Set up Docker Buildx 41 | uses: docker/setup-buildx-action@v3 42 | 43 | - name: Docker meta 44 | id: docker-meta 45 | uses: docker/metadata-action@v5 46 | with: 47 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 48 | tags: | 49 | type=semver,pattern={{version}} 50 | type=ref,event=branch 51 | 52 | - name: Build 53 | uses: docker/build-push-action@v5 54 | with: 55 | push: true 56 | pull: true 57 | platforms: linux/amd64,linux/arm64 58 | tags: ${{ steps.docker-meta.outputs.tags }} 59 | labels: ${{ steps.docker-meta.outputs.labels }} 60 | annotations: ${{ steps.docker-meta.outputs.annotations }} 61 | cache-from: type=gha 62 | cache-to: type=gha,mode=max 63 | target: latest 64 | 65 | - name: Docker meta for debug target 66 | id: docker-meta-debug 67 | uses: docker/metadata-action@v5 68 | with: 69 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 70 | tags: | 71 | type=semver,pattern={{version}},suffix=debug 72 | type=ref,event=branch,suffix=-debug 73 | 74 | - name: Build debug 75 | uses: docker/build-push-action@v5 76 | with: 77 | push: true 78 | pull: true 79 | platforms: linux/amd64,linux/arm64 80 | tags: ${{ steps.docker-meta-debug.outputs.tags }} 81 | labels: ${{ steps.docker-meta-debug.outputs.labels }} 82 | annotations: ${{ steps.docker-meta-debug.outputs.annotations }} 83 | cache-from: type=gha 84 | cache-to: type=gha,mode=max 85 | target: debug 86 | -------------------------------------------------------------------------------- /k8s/mainnet/statefulset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: StatefulSet 3 | metadata: 4 | name: ethereum 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: ethereum 9 | replicas: 1 10 | serviceName: ethereum 11 | updateStrategy: 12 | type: RollingUpdate 13 | template: 14 | metadata: 15 | labels: 16 | app: ethereum 17 | spec: 18 | terminationGracePeriodSeconds: 300 19 | enableServiceLinks: false 20 | containers: 21 | - name: geth 22 | image: ethereum/client-go 23 | ports: 24 | - containerPort: 8545 25 | - containerPort: 8546 26 | - { containerPort: 30303, protocol: TCP } 27 | - { containerPort: 30303, protocol: UDP } 28 | args: 29 | - --datadir=/data 30 | - --http 31 | - --http.api=eth,net,web3 32 | - --http.addr=0.0.0.0 33 | - --http.vhosts=* 34 | - --http.corsdomain=* 35 | - --ws 36 | - --ws.origins=* 37 | - --ws.addr=0.0.0.0 38 | - --ws.api=eth,net,web3 39 | - --graphql 40 | - --graphql.corsdomain=* 41 | - --graphql.vhosts=* 42 | resources: 43 | requests: 44 | memory: 2G 45 | cpu: 1000m 46 | limits: 47 | memory: 16G 48 | cpu: 8000m 49 | livenessProbe: 50 | httpGet: 51 | path: / 52 | port: 8545 53 | readinessProbe: 54 | httpGet: 55 | path: / 56 | port: 8545 57 | volumeMounts: 58 | - name: geth 59 | mountPath: /data 60 | - name: beacon 61 | image: gcr.io/prysmaticlabs/prysm/beacon-chain 62 | args: 63 | - --accept-terms-of-use 64 | - --datadir=/data 65 | - --execution-endpoint=/geth/geth.ipc 66 | - --rpc-host=0.0.0.0 67 | - --rpc-port=4000 68 | - --grpc-gateway-corsdomain=* 69 | - --grpc-gateway-host=0.0.0.0 70 | - --grpc-gateway-port=3500 71 | ports: 72 | - containerPort: 4000 73 | name: grpc 74 | - containerPort: 3500 75 | name: jsonrpc 76 | - containerPort: 13000 77 | name: p2ptcp 78 | - containerPort: 12000 79 | protocol: UDP 80 | name: p2pudp 81 | readinessProbe: 82 | tcpSocket: 83 | port: 4000 84 | livenessProbe: 85 | tcpSocket: 86 | port: 4000 87 | startupProbe: 88 | failureThreshold: 60 89 | tcpSocket: 90 | port: 4000 91 | resources: 92 | limits: 93 | cpu: 8000m 94 | memory: 16G 95 | requests: 96 | cpu: 1000m 97 | memory: 4G 98 | volumeMounts: 99 | - name: prysm 100 | mountPath: /data 101 | - name: geth 102 | mountPath: /geth 103 | volumes: 104 | - name: geth 105 | persistentVolumeClaim: 106 | claimName: chaindata-geth 107 | - name: prysm 108 | persistentVolumeClaim: 109 | claimName: chaindata-prysm 110 | -------------------------------------------------------------------------------- /k8s/sepolia/statefulset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: StatefulSet 3 | metadata: 4 | name: ethereum 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: ethereum 9 | replicas: 1 10 | serviceName: ethereum 11 | updateStrategy: 12 | type: RollingUpdate 13 | template: 14 | metadata: 15 | labels: 16 | app: ethereum 17 | spec: 18 | terminationGracePeriodSeconds: 300 19 | enableServiceLinks: false 20 | initContainers: 21 | - name: genesis 22 | image: alpine 23 | command: ["sh", "-c"] 24 | args: 25 | [ 26 | "if [ ! -f genesis.ssz ]; then wget 'https://github.com/eth-clients/merge-testnets/raw/main/sepolia/genesis.ssz'; fi", 27 | ] 28 | workingDir: "/data" 29 | volumeMounts: 30 | - name: prysm 31 | mountPath: /data 32 | containers: 33 | - name: geth 34 | image: ethereum/client-go 35 | ports: 36 | - containerPort: 8545 37 | - containerPort: 8546 38 | - { containerPort: 30303, protocol: TCP } 39 | - { containerPort: 30303, protocol: UDP } 40 | args: 41 | - --sepolia 42 | - --datadir=/data 43 | - --http 44 | - --http.api=eth,net,web3 45 | - --http.addr=0.0.0.0 46 | - --http.vhosts=* 47 | - --http.corsdomain=* 48 | - --ws 49 | - --ws.origins=* 50 | - --ws.addr=0.0.0.0 51 | - --ws.api=eth,net,web3 52 | - --graphql 53 | - --graphql.corsdomain=* 54 | - --graphql.vhosts=* 55 | resources: 56 | requests: 57 | memory: 2G 58 | cpu: 1000m 59 | limits: 60 | memory: 16G 61 | cpu: 8000m 62 | livenessProbe: 63 | httpGet: 64 | path: / 65 | port: 8545 66 | readinessProbe: 67 | httpGet: 68 | path: / 69 | port: 8545 70 | volumeMounts: 71 | - name: geth 72 | mountPath: /data 73 | - name: beacon 74 | image: gcr.io/prysmaticlabs/prysm/beacon-chain 75 | args: 76 | - --sepolia 77 | - --accept-terms-of-use 78 | - --datadir=/data 79 | - --execution-endpoint=/geth/geth.ipc 80 | - --genesis-state=/data/genesis.ssz 81 | - --checkpoint-sync-url=https://sepolia.beaconstate.info 82 | - --genesis-beacon-api-url=https://sepolia.beaconstate.info 83 | - --rpc-host=0.0.0.0 84 | - --rpc-port=4000 85 | - --grpc-gateway-corsdomain=* 86 | - --grpc-gateway-host=0.0.0.0 87 | - --grpc-gateway-port=3500 88 | ports: 89 | - containerPort: 4000 90 | name: grpc 91 | - containerPort: 3500 92 | name: jsonrpc 93 | - containerPort: 13000 94 | name: p2ptcp 95 | - containerPort: 12000 96 | protocol: UDP 97 | name: p2pudp 98 | readinessProbe: 99 | tcpSocket: 100 | port: 4000 101 | livenessProbe: 102 | tcpSocket: 103 | port: 4000 104 | startupProbe: 105 | failureThreshold: 60 106 | tcpSocket: 107 | port: 4000 108 | resources: 109 | limits: 110 | cpu: 8000m 111 | memory: 16G 112 | requests: 113 | cpu: 1000m 114 | memory: 4G 115 | volumeMounts: 116 | - name: prysm 117 | mountPath: /data 118 | - name: geth 119 | mountPath: /geth 120 | volumes: 121 | - name: geth 122 | persistentVolumeClaim: 123 | claimName: chaindata-geth 124 | - name: prysm 125 | persistentVolumeClaim: 126 | claimName: chaindata-prysm 127 | -------------------------------------------------------------------------------- /k8s/goerli/statefulset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: StatefulSet 3 | metadata: 4 | name: ethereum 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: ethereum 9 | replicas: 1 10 | serviceName: ethereum 11 | updateStrategy: 12 | type: RollingUpdate 13 | template: 14 | metadata: 15 | labels: 16 | app: ethereum 17 | spec: 18 | terminationGracePeriodSeconds: 300 19 | enableServiceLinks: false 20 | initContainers: 21 | - name: genesis 22 | image: alpine 23 | command: ["sh", "-c"] 24 | args: 25 | [ 26 | "if [ ! -f genesis.ssz ]; then wget 'https://github.com/eth-clients/eth2-networks/raw/master/shared/prater/genesis.ssz'; fi", 27 | ] 28 | workingDir: "/data" 29 | volumeMounts: 30 | - name: prysm 31 | mountPath: /data 32 | containers: 33 | - name: geth 34 | image: ethereum/client-go 35 | ports: 36 | - containerPort: 8545 37 | - containerPort: 8546 38 | - { containerPort: 30303, protocol: TCP } 39 | - { containerPort: 30303, protocol: UDP } 40 | args: 41 | - --goerli 42 | - --datadir=/data 43 | - --http 44 | - --http.api=eth,net,web3 45 | - --http.addr=0.0.0.0 46 | - --http.vhosts=* 47 | - --http.corsdomain=* 48 | - --ws 49 | - --ws.origins=* 50 | - --ws.addr=0.0.0.0 51 | - --ws.api=eth,net,web3 52 | - --graphql 53 | - --graphql.corsdomain=* 54 | - --graphql.vhosts=* 55 | resources: 56 | requests: 57 | memory: 2G 58 | cpu: 1000m 59 | limits: 60 | memory: 16G 61 | cpu: 8000m 62 | livenessProbe: 63 | httpGet: 64 | path: / 65 | port: 8545 66 | readinessProbe: 67 | httpGet: 68 | path: / 69 | port: 8545 70 | volumeMounts: 71 | - name: geth 72 | mountPath: /data 73 | - name: beacon 74 | image: gcr.io/prysmaticlabs/prysm/beacon-chain 75 | args: 76 | - --goerli 77 | - --accept-terms-of-use 78 | - --datadir=/data 79 | - --execution-endpoint=/geth/geth.ipc 80 | - --genesis-state=/data/genesis.ssz 81 | - --checkpoint-sync-url=https://goerli.beaconstate.info 82 | - --genesis-beacon-api-url=https://goerli.beaconstate.info 83 | - --rpc-host=0.0.0.0 84 | - --rpc-port=4000 85 | - --grpc-gateway-corsdomain=* 86 | - --grpc-gateway-host=0.0.0.0 87 | - --grpc-gateway-port=3500 88 | ports: 89 | - containerPort: 4000 90 | name: grpc 91 | - containerPort: 3500 92 | name: jsonrpc 93 | - containerPort: 13000 94 | name: p2ptcp 95 | - containerPort: 12000 96 | protocol: UDP 97 | name: p2pudp 98 | readinessProbe: 99 | tcpSocket: 100 | port: 4000 101 | livenessProbe: 102 | tcpSocket: 103 | port: 4000 104 | startupProbe: 105 | failureThreshold: 60 106 | tcpSocket: 107 | port: 4000 108 | resources: 109 | limits: 110 | cpu: 8000m 111 | memory: 16G 112 | requests: 113 | cpu: 1000m 114 | memory: 4G 115 | volumeMounts: 116 | - name: prysm 117 | mountPath: /data 118 | - name: geth 119 | mountPath: /geth 120 | volumes: 121 | - name: geth 122 | persistentVolumeClaim: 123 | claimName: chaindata-geth 124 | - name: prysm 125 | persistentVolumeClaim: 126 | claimName: chaindata-prysm 127 | -------------------------------------------------------------------------------- /k8s/holeksy/statefulset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: StatefulSet 3 | metadata: 4 | name: ethereum 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: ethereum 9 | replicas: 1 10 | serviceName: ethereum 11 | updateStrategy: 12 | type: RollingUpdate 13 | template: 14 | metadata: 15 | labels: 16 | app: ethereum 17 | spec: 18 | terminationGracePeriodSeconds: 300 19 | enableServiceLinks: false 20 | initContainers: 21 | - name: genesis 22 | image: alpine 23 | command: ["sh", "-c"] 24 | args: 25 | [ 26 | "if [ ! -f genesis.ssz ]; then wget 'https://github.com/eth-clients/holesky/raw/main/custom_config_data/genesis.ssz'; fi", 27 | ] 28 | workingDir: "/data" 29 | volumeMounts: 30 | - name: prysm 31 | mountPath: /data 32 | containers: 33 | - name: geth 34 | image: ethereum/client-go 35 | ports: 36 | - containerPort: 8545 37 | - containerPort: 8546 38 | - { containerPort: 30303, protocol: TCP } 39 | - { containerPort: 30303, protocol: UDP } 40 | args: 41 | - --holesky 42 | - --datadir=/data 43 | - --http 44 | - --http.api=eth,net,web3 45 | - --http.addr=0.0.0.0 46 | - --http.vhosts=* 47 | - --http.corsdomain=* 48 | - --ws 49 | - --ws.origins=* 50 | - --ws.addr=0.0.0.0 51 | - --ws.api=eth,net,web3 52 | - --graphql 53 | - --graphql.corsdomain=* 54 | - --graphql.vhosts=* 55 | resources: 56 | requests: 57 | memory: 2G 58 | cpu: 1000m 59 | limits: 60 | memory: 16G 61 | cpu: 8000m 62 | livenessProbe: 63 | httpGet: 64 | path: / 65 | port: 8545 66 | readinessProbe: 67 | httpGet: 68 | path: / 69 | port: 8545 70 | volumeMounts: 71 | - name: geth 72 | mountPath: /data 73 | - name: beacon 74 | image: gcr.io/prysmaticlabs/prysm/beacon-chain 75 | args: 76 | - --holesky 77 | - --accept-terms-of-use 78 | - --datadir=/data 79 | - --execution-endpoint=/geth/geth.ipc 80 | - --genesis-state=/data/genesis.ssz 81 | - --checkpoint-sync-url=https://holesky.beaconstate.info 82 | - --genesis-beacon-api-url=https://holesky.beaconstate.info 83 | - --rpc-host=0.0.0.0 84 | - --rpc-port=4000 85 | - --grpc-gateway-corsdomain=* 86 | - --grpc-gateway-host=0.0.0.0 87 | - --grpc-gateway-port=3500 88 | ports: 89 | - containerPort: 4000 90 | name: grpc 91 | - containerPort: 3500 92 | name: jsonrpc 93 | - containerPort: 13000 94 | name: p2ptcp 95 | - containerPort: 12000 96 | protocol: UDP 97 | name: p2pudp 98 | readinessProbe: 99 | tcpSocket: 100 | port: 4000 101 | livenessProbe: 102 | tcpSocket: 103 | port: 4000 104 | startupProbe: 105 | failureThreshold: 60 106 | tcpSocket: 107 | port: 4000 108 | resources: 109 | limits: 110 | cpu: 8000m 111 | memory: 16G 112 | requests: 113 | cpu: 1000m 114 | memory: 4G 115 | volumeMounts: 116 | - name: prysm 117 | mountPath: /data 118 | - name: geth 119 | mountPath: /geth 120 | volumes: 121 | - name: geth 122 | persistentVolumeClaim: 123 | claimName: chaindata-geth 124 | - name: prysm 125 | persistentVolumeClaim: 126 | claimName: chaindata-prysm 127 | -------------------------------------------------------------------------------- /flags/prysm-beacon-chain: -------------------------------------------------------------------------------- 1 | NAME: 2 | beacon-chain - this is a beacon chain implementation for Ethereum 3 | USAGE: 4 | beacon-chain [options] command [command options] [arguments...] 5 | 6 | AUTHOR: 7 | 8 | 9 | GLOBAL OPTIONS: 10 | db Defines commands for interacting with the Ethereum Beacon Node database 11 | generate-auth-secret creates a random, 32 byte hex string in a plaintext file to be used for authenticating JSON-RPC requests. If no --output-file flag is defined, the file will be created in the current working directory 12 | help, h Shows a list of commands or help for one command 13 | 14 | cmd OPTIONS: 15 | --accept-terms-of-use Accepts Terms and Conditions (for non-interactive environments). (default: false) 16 | --api-timeout value Specifies the timeout value for API requests in seconds. (default: 120) 17 | --bootstrap-node value [ --bootstrap-node value ] The address of bootstrap node. Beacon node will connect for peer discovery via DHT. Multiple nodes can be passed by using the flag multiple times but not comma-separated. You can also pass YAML files containing multiple nodes. (default: "enr:-KG4QNTx85fjxABbSq_Rta9wy56nQ1fHK0PewJbGjLm1M4bMGx5-3Qq4ZX2-iFJ0pys_O90sVXNNOxp2E7afBsGsBrgDhGV0aDKQu6TalgMAAAD__________4JpZIJ2NIJpcIQEnfA2iXNlY3AyNTZrMaECGXWQ-rQ2KZKRH1aOW4IlPDBkY4XDphxg9pxKytFCkayDdGNwgiMog3VkcIIjKA", "enr:-KG4QF4B5WrlFcRhUU6dZETwY5ZzAXnA0vGC__L1Kdw602nDZwXSTs5RFXFIFUnbQJmhNGVU6OIX7KVrCSTODsz1tK4DhGV0aDKQu6TalgMAAAD__________4JpZIJ2NIJpcIQExNYEiXNlY3AyNTZrMaECQmM9vp7KhaXhI-nqL_R0ovULLCFSFTa9CPPSdb1zPX6DdGNwgiMog3VkcIIjKA", "enr:-Ku4QImhMc1z8yCiNJ1TyUxdcfNucje3BGwEHzodEZUan8PherEo4sF7pPHPSIB1NNuSg5fZy7qFsjmUKs2ea1Whi0EBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpD1pf1CAAAAAP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQOVphkDqal4QzPMksc5wnpuC3gvSC8AfbFOnZY_On34wIN1ZHCCIyg", "enr:-Ku4QP2xDnEtUXIjzJ_DhlCRN9SN99RYQPJL92TMlSv7U5C1YnYLjwOQHgZIUXw6c-BvRg2Yc2QsZxxoS_pPRVe0yK8Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpD1pf1CAAAAAP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQMeFF5GrS7UZpAH2Ly84aLK-TyvH-dRo0JM1i8yygH50YN1ZHCCJxA", "enr:-Ku4QPp9z1W4tAO8Ber_NQierYaOStqhDqQdOPY3bB3jDgkjcbk6YrEnVYIiCBbTxuar3CzS528d2iE7TdJsrL-dEKoBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpD1pf1CAAAAAP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQMw5fqqkw2hHC4F5HZZDPsNmPdB1Gi8JPQK7pRc9XHh-oN1ZHCCKvg", "enr:-Jq4QItoFUuug_n_qbYbU0OY04-np2wT8rUCauOOXNi0H3BWbDj-zbfZb7otA7jZ6flbBpx1LNZK2TDebZ9dEKx84LYBhGV0aDKQtTA_KgEAAAD__________4JpZIJ2NIJpcISsaa0ZiXNlY3AyNTZrMaEDHAD2JKYevx89W0CcFJFiskdcEzkH_Wdv9iW42qLK79ODdWRwgiMo", "enr:-Jq4QN_YBsUOqQsty1OGvYv48PMaiEt1AzGD1NkYQHaxZoTyVGqMYXg0K9c0LPNWC9pkXmggApp8nygYLsQwScwAgfgBhGV0aDKQtTA_KgEAAAD__________4JpZIJ2NIJpcISLosQxiXNlY3AyNTZrMaEDBJj7_dLFACaxBfaI8KZTh_SSJUjhyAyfshimvSqo22WDdWRwgiMo", "enr:-Ku4QHqVeJ8PPICcWk1vSn_XcSkjOkNiTg6Fmii5j6vUQgvzMc9L1goFnLKgXqBJspJjIsB91LTOleFmyWWrFVATGngBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhAMRHkWJc2VjcDI1NmsxoQKLVXFOhp2uX6jeT0DvvDpPcU8FWMjQdR4wMuORMhpX24N1ZHCCIyg", "enr:-Ku4QG-2_Md3sZIAUebGYT6g0SMskIml77l6yR-M_JXc-UdNHCmHQeOiMLbylPejyJsdAPsTHJyjJB2sYGDLe0dn8uYBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhBLY-NyJc2VjcDI1NmsxoQORcM6e19T1T9gi7jxEZjk_sjVLGFscUNqAY9obgZaxbIN1ZHCCIyg", "enr:-Ku4QPn5eVhcoF1opaFEvg1b6JNFD2rqVkHQ8HApOKK61OIcIXD127bKWgAtbwI7pnxx6cDyk_nI88TrZKQaGMZj0q0Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhDayLMaJc2VjcDI1NmsxoQK2sBOLGcUb4AwuYzFuAVCaNHA-dy24UuEKkeFNgCVCsIN1ZHCCIyg", "enr:-Ku4QEWzdnVtXc2Q0ZVigfCGggOVB2Vc1ZCPEc6j21NIFLODSJbvNaef1g4PxhPwl_3kax86YPheFUSLXPRs98vvYsoBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhDZBrP2Jc2VjcDI1NmsxoQM6jr8Rb1ktLEsVcKAPa08wCsKUmvoQ8khiOl_SLozf9IN1ZHCCIyg", "enr:-LK4QA8FfhaAjlb_BXsXxSfiysR7R52Nhi9JBt4F8SPssu8hdE1BXQQEtVDC3qStCW60LSO7hEsVHv5zm8_6Vnjhcn0Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhAN4aBKJc2VjcDI1NmsxoQJerDhsJ-KxZ8sHySMOCmTO6sHM3iCFQ6VMvLTe948MyYN0Y3CCI4yDdWRwgiOM", "enr:-LK4QKWrXTpV9T78hNG6s8AM6IO4XH9kFT91uZtFg1GcsJ6dKovDOr1jtAAFPnS2lvNltkOGA9k29BUN7lFh_sjuc9QBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhANAdd-Jc2VjcDI1NmsxoQLQa6ai7y9PMN5hpLe5HmiJSlYzMuzP7ZhwRiwHvqNXdoN0Y3CCI4yDdWRwgiOM") 18 | --chain-config-file value Path to a YAML file with chain config values. 19 | --clear-db Prompt for clearing any previously stored data at the data directory. (default: false) 20 | --config-file value Filepath to a yaml file with flag values. 21 | --datadir value Data directory for the databases. (default: "/root/.eth2") 22 | --disable-monitoring Disables monitoring service. (default: false) 23 | --e2e-config Enables the E2E testing config, only for use within end-to-end testing. (default: false) 24 | --enable-tracing Enables request tracing. (default: false) 25 | --force-clear-db Clears any previously stored data at the data directory. (default: false) 26 | --grpc-max-msg-size value Integer to define max receive message call size (in bytes). 27 | If serving a public gRPC server, set this to a more reasonable size to avoid 28 | resource exhaustion from large messages. 29 | Validators with as many as 10000 keys can be run with a max message size of less than 30 | 50Mb. The default here is set to a very high value for local users. (default: 2147483647) 31 | --max-goroutines value Specifies the upper limit of goroutines running before a status check fails (default: 5000) 32 | --minimal-config Uses minimal config with parameters as defined in the spec. (default: false) 33 | --monitor-indices value [ --monitor-indices value ] List of validator indices to track performance 34 | --monitoring-host value Host used for listening and responding metrics for prometheus. (default: "127.0.0.1") 35 | --monitoring-port value Port used to listening and respond metrics for Prometheus. (default: 8080) 36 | --no-discovery Enable only local network p2p and do not connect to cloud bootstrap nodes (default: false) 37 | --p2p-tcp-port value The port used by libp2p. (default: 13000) 38 | --p2p-udp-port value The port used by discv5. (default: 12000) 39 | --relay-node value The address of relay node. The beacon node will connect to the relay node and advertise their address via the relay node to other peers 40 | --restore-source-file value Filepath to the backed-up database file which will be used to restore the database 41 | --restore-target-dir value Target directory of the restored database (default: "/root/.eth2") 42 | --rpc-max-page-size value Max number of items returned per page in RPC responses for paginated endpoints. (default: 0) 43 | --trace-sample-fraction value Indicates what fraction of p2p messages are sampled for tracing. (default: 0.2) 44 | --tracing-endpoint value Tracing endpoint defines where beacon chain traces are exposed to Jaeger. (default: "http://127.0.0.1:14268/api/traces") 45 | --tracing-process-name process_name Name to apply to tracing tag process_name. 46 | --verbosity value Logging verbosity. (trace, debug, info, warn, error, fatal, panic) (default: "info") 47 | 48 | debug OPTIONS: 49 | --blockprofilerate value Turns on block profiling with the given rate. (default: 0) 50 | --cpuprofile value Writes CPU profile to the given file. 51 | --memprofilerate value Turns on memory profiling with the given rate. (default: 524288) 52 | --mutexprofilefraction value Turns on mutex profiling with the given rate. (default: 0) 53 | --pprof Enables the pprof HTTP server. (default: false) 54 | --pprofaddr value pprof HTTP server listening interface. (default: "127.0.0.1") 55 | --pprofport value pprof HTTP server listening port. (default: 6060) 56 | --trace value Writes execution trace to the given file. 57 | 58 | beacon-chain OPTIONS: 59 | --backfill-batch-size value Number of blocks per backfill batch. A larger number will request more blocks at once from peers, but also consume more system memory to hold batches in memory during processing. This has a multiplicative effect with backfill-worker-count (default: 64) 60 | --backfill-worker-count value Number of concurrent backfill batch requests. A larger number will better utilize network resources, up to a system-dependent limit, but will also consume more system memory to hold batches in memory during processing. Multiply by backfill-batch-size and average block size (~2MB before deneb) to find the right number for your system. This has a multiplicatice effect with backfill-batch-size (default: 2) 61 | --blob-batch-limit value The amount of blobs the local peer is bounded to request and respond to in a batch. (default: 64) 62 | --blob-batch-limit-burst-factor value The factor by which blob batch limit may increase on burst. (default: 2) 63 | --blob-path value Location for blob storage. Default location will be a 'blobs' directory next to the beacon db. 64 | --blob-retention-epochs value, --extend-blob-retention-epoch value Override the default blob retention period (measured in epochs). The node will exit with an error at startup if the value is less than the default of 4096 epochs. (default: 4096) 65 | --block-batch-limit value The amount of blocks the local peer is bounded to request and respond to in a batch. Maximum 128 (default: 64) 66 | --block-batch-limit-burst-factor value The factor by which block batch limit may increase on burst. (default: 2) 67 | --chain-id value Sets the chain id of the beacon chain (default: 0) 68 | --checkpoint-block value Rather than syncing from genesis, you can start processing from a ssz-serialized BeaconState+Block. This flag allows you to specify a local file containing the checkpoint Block to load. 69 | --checkpoint-state value Rather than syncing from genesis, you can start processing from a ssz-serialized BeaconState+Block. This flag allows you to specify a local file containing the checkpoint BeaconState to load. 70 | --checkpoint-sync-url value URL of a synced beacon node to trust in obtaining checkpoint sync data. As an additional safety measure, it is strongly recommended to only use this option in conjunction with --weak-subjectivity-checkpoint flag 71 | --contract-deployment-block value The eth1 block in which the deposit contract was deployed. (default: 11184524) 72 | --deposit-contract value Deposit contract address. Beacon chain node will listen logs coming from the deposit contract to determine when validator is eligible to participate. (default: "0x00000000219ab540356cBB839Cbe05303d7705Fa") 73 | --disable-grpc-gateway Disable the gRPC gateway for JSON-HTTP requests (default: false) 74 | --enable-debug-rpc-endpoints Enables the debug rpc service, containing utility endpoints such as /eth/v1alpha1/beacon/state. (default: false) 75 | --enable-experimental-backfill Backfill is still experimental at this time.It will only be enabled if this flag is specified and the node was started using checkpoint sync. (default: false) 76 | --engine-endpoint-timeout-seconds value Sets the execution engine timeout (seconds) for execution payload semantics (forkchoiceUpdated, newPayload) (default: 0) 77 | --eth1-header-req-limit value Sets the maximum number of headers that a deposit log query can fetch. (default: 1000) 78 | --execution-endpoint value An execution client http endpoint. Can contain auth header as well in the format (default: "http://localhost:8551") 79 | --execution-headers value A comma separated list of key value pairs to pass as HTTP headers for all execution client calls. Example: --execution-headers=key1=value1,key2=value2 80 | --gc-percent value The percentage of freshly allocated data to live data on which the gc will be run again. (default: 100) 81 | --genesis-beacon-api-url value URL of a synced beacon node to trust for obtaining genesis state. As an additional safety measure, it is strongly recommended to only use this option in conjunction with --weak-subjectivity-checkpoint flag 82 | --genesis-state value Load a genesis state from ssz file. Testnet genesis files can be found in the eth2-clients/eth2-testnets repository on github. 83 | --grpc-gateway-corsdomain value Comma separated list of domains from which to accept cross origin requests (browser enforced). This flag has no effect if not used with --grpc-gateway-port. (default: "http://localhost:4200,http://localhost:7500,http://127.0.0.1:4200,http://127.0.0.1:7500,http://0.0.0.0:4200,http://0.0.0.0:7500,http://localhost:3000,http://0.0.0.0:3000,http://127.0.0.1:3000") 84 | --grpc-gateway-host value The host on which the gateway server runs on (default: "127.0.0.1") 85 | --grpc-gateway-port value The port on which the gateway server runs on (default: 3500) 86 | --historical-slasher-node Enables required flags for serving historical data to a slasher client. Results in additional storage usage (default: false) 87 | --http-mev-relay value A MEV builder relay string http endpoint, this will be used to interact MEV builder network using API defined in: https://ethereum.github.io/builder-specs/#/Builder 88 | --http-modules prysm,eth Comma-separated list of API module names. Possible values: prysm,eth. (default: "prysm,eth") 89 | --interop-eth1data-votes Enable mocking of eth1 data votes for proposers to package into blocks (default: false) 90 | --jwt-id value JWT claims id. Could be used to identify the client 91 | --jwt-secret value REQUIRED if connecting to an execution node via HTTP. Provides a path to a file containing a hex-encoded string representing a 32 byte secret used for authentication with an execution node via HTTP. If this is not set, all requests to execution nodes via HTTP for consensus-related calls will fail, which will prevent your validators from performing their duties. This is not required if using an IPC connection. 92 | --local-block-value-boost value A percentage boost for local block construction as a Uint64. This is used to prioritize local block construction over relay/builder block constructionBoost is an additional percentage to multiple local block value. Use builder block if: builder_bid_value * 100 > local_block_value * (local-block-value-boost + 100) (default: 0) 93 | --max-builder-consecutive-missed-slots value Number of consecutive skip slot to fallback from using relay/builder to local execution engine for block construction (default: 3) 94 | --max-builder-epoch-missed-slots value Number of total skip slot to fallback from using relay/builder to local execution engine for block construction in last epoch rolling window (default: 0) 95 | --minimum-peers-per-subnet value Sets the minimum number of peers that a node will attempt to peer with that are subscribed to a subnet. (default: 6) 96 | --network-id value Sets the network id of the beacon chain. (default: 0) 97 | --rpc-host value Host on which the RPC server should listen (default: "127.0.0.1") 98 | --rpc-port value RPC port exposed by a beacon node (default: 4000) 99 | --slasher-datadir value Directory for the slasher database (default: "/root/.eth2") 100 | --slots-per-archive-point value The slot durations of when an archived state gets saved in the beaconDB. (default: 2048) 101 | --subscribe-all-subnets Subscribe to all possible attestation and sync subnets. (default: false) 102 | --tls-cert value Certificate for secure gRPC. Pass this and the tls-key flag in order to use gRPC securely. 103 | --tls-key value Key for secure gRPC. Pass this and the tls-cert flag in order to use gRPC securely. 104 | --weak-subjectivity-checkpoint block_root:epoch_number Input in block_root:epoch_number format. This guarantees that syncing leads to the given Weak Subjectivity Checkpoint along the canonical chain. If such a sync is not possible, the node will treat it as a critical and irrecoverable failure 105 | 106 | merge OPTIONS: 107 | --suggested-fee-recipient value Post bellatrix, this address will receive the transaction fees produced by any blocks from this node. Default to junk whilst bellatrix is in development state. Validator client can override this value through the preparebeaconproposer api. (default: "0x0000000000000000000000000000000000000000") 108 | --terminal-block-hash-epoch-override value Sets the block hash epoch to manual overrides the default TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH value. WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal block hash activation epoch. Incorrect usage will result in your node experience consensus failure. (default: 0) 109 | --terminal-block-hash-override value Sets the block hash to manual overrides the default TERMINAL_BLOCK_HASH value. WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal block hash. Incorrect usage will result in your node experience consensus failure. 110 | --terminal-total-difficulty-override value Sets the total difficulty to manual overrides the default TERMINAL_TOTAL_DIFFICULTY value. WARNING: This flag should be used only if you have a clear understanding that community has decided to override the terminal difficulty. Incorrect usage will result in your node experience consensus failure. 111 | 112 | p2p OPTIONS: 113 | --enable-upnp Enable the service (Beacon chain or Validator) to use UPnP when possible. (default: false) 114 | --min-sync-peers value The required number of valid peers to connect with before syncing. (default: 3) 115 | --p2p-allowlist value The CIDR subnet for allowing only certain peer connections. Using "public" would allow only public subnets. Example: 192.168.0.0/16 would permit connections to peers on your local network only. The default is to accept all connections. 116 | --p2p-denylist value [ --p2p-denylist value ] The CIDR subnets for denying certainty peer connections. Using "private" would deny all private subnets. Example: 192.168.0.0/16 would deny connections from peers on your local network only. The default is to accept all connections. 117 | --p2p-host-dns value The DNS address advertised by libp2p. This may be used to advertise an external DNS. 118 | --p2p-host-ip value The IP address advertised by libp2p. This may be used to advertise an external IP. 119 | --p2p-local-ip value The local ip address to listen for incoming data. 120 | --p2p-max-peers value The max number of p2p peers to maintain. (default: 70) 121 | --p2p-metadata value The file containing the metadata to communicate with other peers. 122 | --p2p-priv-key value The file containing the private key to use in communications with other peers. 123 | --p2p-static-id Enables the peer id of the node to be fixed by saving the generated network key to the default key path. (default: false) 124 | --peer value [ --peer value ] Connect with this peer, this flag may be used multiple times. This peer is recognized as a trusted peer. 125 | --pubsub-queue-size value The size of the pubsub validation and outbound queue for the node. (default: 1000) 126 | 127 | log OPTIONS: 128 | --log-file value Specifies log file name, relative or absolute. 129 | --log-format value Specifies log formatting. Supports: text, json, fluentd, journald. (default: "text") 130 | 131 | features OPTIONS: 132 | --blob-save-fsync Forces new blob files to be fysnc'd before continuing, ensuring durable blob writes. (default: false) 133 | --dev Enables experimental features still in development. These features may not be stable. (default: false) 134 | --disable-broadcast-slashings Disables broadcasting slashings submitted to the beacon node. (default: false) 135 | --disable-eip-4881 Disables the deposit tree specified in EIP-4881. (default: false) 136 | --disable-grpc-connection-logging Disables displaying logs for newly connected grpc clients. (default: false) 137 | --disable-peer-scorer (Danger): Disables P2P peer scorer. Do NOT use this in production! (default: false) 138 | --disable-registration-cache Temporary flag for disabling the validator registration cache instead of using the DB. Note: registrations do not clear on restart while using the DB. (default: false) 139 | --disable-resource-manager Disables running the libp2p resource manager. (default: false) 140 | --disable-staking-contract-check Disables checking of staking contract deposits when proposing blocks, useful for devnets. (default: false) 141 | --disable-verbose-sig-verification Disables identifying invalid signatures if batch verification fails when processing block. (default: false) 142 | --enable-experimental-state Turns on the latest and greatest (but potentially unstable) changes to the beacon state. (default: false) 143 | --enable-full-ssz-data-logging Enables displaying logs for full ssz data on rejected gossip messages. (default: false) 144 | --enable-historical-state-representation Enables the beacon chain to save historical states in a space efficient manner. (Warning): Once enabled, this feature migrates your database in to a new schema and there is no going back. At worst, your entire database might get corrupted. (default: false) 145 | --enable-lightclient Enables the light client support in the beacon node (default: false) 146 | --holesky Runs Prysm configured for the Holesky test network. (default: false) 147 | --interop-write-ssz-state-transitions Writes SSZ states to disk after attempted state transitio. (default: false) 148 | --mainnet Runs on Ethereum main network. This is the default and can be omitted. (default: true) 149 | --prater, --goerli Runs Prysm configured for the Prater / Goerli test network. (default: false) 150 | --prepare-all-payloads Informs the engine to prepare all local payloads. Useful for relayers and builders. (default: false) 151 | --save-full-execution-payloads Saves beacon blocks with full execution payloads instead of execution payload headers in the database. (default: false) 152 | --sepolia Runs Prysm configured for the Sepolia test network. (default: false) 153 | --slasher Enables a slasher in the beacon node for detecting slashable offenses. (default: false) 154 | 155 | interop OPTIONS: 156 | --genesis-state value Load a genesis state from ssz file. Testnet genesis files can be found in the eth2-clients/eth2-testnets repository on github. 157 | --interop-genesis-time value Specify the genesis time for interop genesis state generation. Must be used with --interop-num-validators (default: 0) 158 | --interop-num-validators value Specify number of genesis validators to generate for interop. Must be used with --interop-genesis-time (default: 0) 159 | 160 | deprecated OPTIONS: 161 | --db-backup-output-dir value Output directory for db backups. 162 | 163 | 164 | -------------------------------------------------------------------------------- /flags/geth: -------------------------------------------------------------------------------- 1 | NAME: 2 | geth - the go-ethereum command line interface 3 | 4 | USAGE: 5 | geth [global options] command [command options] [arguments...] 6 | 7 | VERSION: 8 | 1.13.15-stable-2bd6bd01 9 | 10 | COMMANDS: 11 | account Manage accounts 12 | attach Start an interactive JavaScript environment (connect to node) 13 | console Start an interactive JavaScript environment 14 | db Low level database operations 15 | dump Dump a specific block from storage 16 | dumpconfig Export configuration values in a TOML format 17 | dumpgenesis Dumps genesis block JSON configuration to stdout 18 | export Export blockchain into file 19 | export-history Export blockchain history to Era archives 20 | import Import a blockchain file 21 | import-history Import an Era archive 22 | import-preimages Import the preimage database from an RLP stream 23 | init Bootstrap and initialize a new genesis block 24 | js (DEPRECATED) Execute the specified JavaScript files 25 | license Display license information 26 | removedb Remove blockchain and state databases 27 | show-deprecated-flags Show flags that have been deprecated 28 | snapshot A set of commands based on the snapshot 29 | verkle A set of experimental verkle tree management commands 30 | version Print version numbers 31 | version-check Checks (online) for known Geth security vulnerabilities 32 | wallet Manage Ethereum presale wallets 33 | help, h Shows a list of commands or help for one command 34 | 35 | GLOBAL OPTIONS: 36 | ACCOUNT 37 | 38 | 39 | --allow-insecure-unlock (default: false) ($GETH_ALLOW_INSECURE_UNLOCK) 40 | Allow insecure account unlocking when account-related RPCs are exposed by http 41 | 42 | --keystore value ($GETH_KEYSTORE) 43 | Directory for the keystore (default = inside the datadir) 44 | 45 | --lightkdf (default: false) ($GETH_LIGHTKDF) 46 | Reduce key-derivation RAM & CPU usage at some expense of KDF strength 47 | 48 | --password value ($GETH_PASSWORD) 49 | Password file to use for non-interactive password input 50 | 51 | --pcscdpath value (default: "/run/pcscd/pcscd.comm") ($GETH_PCSCDPATH) 52 | Path to the smartcard daemon (pcscd) socket file 53 | 54 | --signer value ($GETH_SIGNER) 55 | External signer (url or path to ipc file) 56 | 57 | --unlock value ($GETH_UNLOCK) 58 | Comma separated list of accounts to unlock 59 | 60 | --usb (default: false) ($GETH_USB) 61 | Enable monitoring and management of USB hardware wallets 62 | 63 | ALIASED (deprecated) 64 | 65 | 66 | --cache.trie.journal value ($GETH_CACHE_TRIE_JOURNAL) 67 | Disk journal directory for trie cache to survive node restarts 68 | 69 | --cache.trie.rejournal value (default: 0s) ($GETH_CACHE_TRIE_REJOURNAL) 70 | Time interval to regenerate the trie cache journal 71 | 72 | --log.backtrace value ($GETH_LOG_BACKTRACE) 73 | Request a stack trace at a specific logging statement (deprecated) 74 | 75 | --log.debug (default: false) ($GETH_LOG_DEBUG) 76 | Prepends log messages with call-site location (deprecated) 77 | 78 | --nousb (default: false) ($GETH_NOUSB) 79 | Disables monitoring for and managing USB hardware wallets (deprecated) 80 | 81 | --txlookuplimit value (default: 2350000) ($GETH_TXLOOKUPLIMIT) 82 | Number of recent blocks to maintain transactions index for (default = about one 83 | year, 0 = entire chain) (deprecated, use history.transactions instead) 84 | 85 | --v5disc (default: false) ($GETH_V5DISC) 86 | Enables the experimental RLPx V5 (Topic Discovery) mechanism (deprecated, use 87 | --discv5 instead) 88 | 89 | --whitelist value ($GETH_WHITELIST) 90 | Comma separated block number-to-hash mappings to enforce (=) 91 | (deprecated in favor of --eth.requiredblocks) 92 | 93 | API AND CONSOLE 94 | 95 | 96 | --authrpc.addr value (default: "localhost") ($GETH_AUTHRPC_ADDR) 97 | Listening address for authenticated APIs 98 | 99 | --authrpc.jwtsecret value ($GETH_AUTHRPC_JWTSECRET) 100 | Path to a JWT secret to use for authenticated RPC endpoints 101 | 102 | --authrpc.port value (default: 8551) ($GETH_AUTHRPC_PORT) 103 | Listening port for authenticated APIs 104 | 105 | --authrpc.vhosts value (default: "localhost") ($GETH_AUTHRPC_VHOSTS) 106 | Comma separated list of virtual hostnames from which to accept requests (server 107 | enforced). Accepts '*' wildcard. 108 | 109 | --exec value ($GETH_EXEC) 110 | Execute JavaScript statement 111 | 112 | --graphql (default: false) ($GETH_GRAPHQL) 113 | Enable GraphQL on the HTTP-RPC server. Note that GraphQL can only be started if 114 | an HTTP server is started as well. 115 | 116 | --graphql.corsdomain value ($GETH_GRAPHQL_CORSDOMAIN) 117 | Comma separated list of domains from which to accept cross origin requests 118 | (browser enforced) 119 | 120 | --graphql.vhosts value (default: "localhost") ($GETH_GRAPHQL_VHOSTS) 121 | Comma separated list of virtual hostnames from which to accept requests (server 122 | enforced). Accepts '*' wildcard. 123 | 124 | --header value, -H value ($GETH_HEADER) 125 | Pass custom headers to the RPC server when using --remotedb or the geth attach 126 | console. This flag can be given multiple times. 127 | 128 | --http (default: false) ($GETH_HTTP) 129 | Enable the HTTP-RPC server 130 | 131 | --http.addr value (default: "localhost") ($GETH_HTTP_ADDR) 132 | HTTP-RPC server listening interface 133 | 134 | --http.api value ($GETH_HTTP_API) 135 | API's offered over the HTTP-RPC interface 136 | 137 | --http.corsdomain value ($GETH_HTTP_CORSDOMAIN) 138 | Comma separated list of domains from which to accept cross origin requests 139 | (browser enforced) 140 | 141 | --http.port value (default: 8545) ($GETH_HTTP_PORT) 142 | HTTP-RPC server listening port 143 | 144 | --http.rpcprefix value ($GETH_HTTP_RPCPREFIX) 145 | HTTP path path prefix on which JSON-RPC is served. Use '/' to serve on all 146 | paths. 147 | 148 | --http.vhosts value (default: "localhost") ($GETH_HTTP_VHOSTS) 149 | Comma separated list of virtual hostnames from which to accept requests (server 150 | enforced). Accepts '*' wildcard. 151 | 152 | --ipcdisable (default: false) ($GETH_IPCDISABLE) 153 | Disable the IPC-RPC server 154 | 155 | --ipcpath value ($GETH_IPCPATH) 156 | Filename for IPC socket/pipe within the datadir (explicit paths escape it) 157 | 158 | --jspath value (default: .) ($GETH_JSPATH) 159 | JavaScript root path for `loadScript` 160 | 161 | --preload value ($GETH_PRELOAD) 162 | Comma separated list of JavaScript files to preload into the console 163 | 164 | --rpc.allow-unprotected-txs (default: false) ($GETH_RPC_ALLOW_UNPROTECTED_TXS) 165 | Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC 166 | 167 | --rpc.batch-request-limit value (default: 1000) ($GETH_RPC_BATCH_REQUEST_LIMIT) 168 | Maximum number of requests in a batch 169 | 170 | --rpc.batch-response-max-size value (default: 25000000) ($GETH_RPC_BATCH_RESPONSE_MAX_SIZE) 171 | Maximum number of bytes returned from a batched call 172 | 173 | --rpc.enabledeprecatedpersonal (default: false) ($GETH_RPC_ENABLEDEPRECATEDPERSONAL) 174 | Enables the (deprecated) personal namespace 175 | 176 | --rpc.evmtimeout value (default: 5s) ($GETH_RPC_EVMTIMEOUT) 177 | Sets a timeout used for eth_call (0=infinite) 178 | 179 | --rpc.gascap value (default: 50000000) ($GETH_RPC_GASCAP) 180 | Sets a cap on gas that can be used in eth_call/estimateGas (0=infinite) 181 | 182 | --rpc.txfeecap value (default: 1) ($GETH_RPC_TXFEECAP) 183 | Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = 184 | no cap) 185 | 186 | --ws (default: false) ($GETH_WS) 187 | Enable the WS-RPC server 188 | 189 | --ws.addr value (default: "localhost") ($GETH_WS_ADDR) 190 | WS-RPC server listening interface 191 | 192 | --ws.api value ($GETH_WS_API) 193 | API's offered over the WS-RPC interface 194 | 195 | --ws.origins value ($GETH_WS_ORIGINS) 196 | Origins from which to accept websockets requests 197 | 198 | --ws.port value (default: 8546) ($GETH_WS_PORT) 199 | WS-RPC server listening port 200 | 201 | --ws.rpcprefix value ($GETH_WS_RPCPREFIX) 202 | HTTP path prefix on which JSON-RPC is served. Use '/' to serve on all paths. 203 | 204 | DEVELOPER CHAIN 205 | 206 | 207 | --dev (default: false) ($GETH_DEV) 208 | Ephemeral proof-of-authority network with a pre-funded developer account, mining 209 | enabled 210 | 211 | --dev.gaslimit value (default: 11500000) ($GETH_DEV_GASLIMIT) 212 | Initial block gas limit 213 | 214 | --dev.period value (default: 0) ($GETH_DEV_PERIOD) 215 | Block period to use in developer mode (0 = mine only if transaction pending) 216 | 217 | ETHEREUM 218 | 219 | 220 | --bloomfilter.size value (default: 2048) ($GETH_BLOOMFILTER_SIZE) 221 | Megabytes of memory allocated to bloom-filter for pruning 222 | 223 | --config value ($GETH_CONFIG) 224 | TOML configuration file 225 | 226 | --datadir value (default: /root/.ethereum) ($GETH_DATADIR) 227 | Data directory for the databases and keystore 228 | 229 | --datadir.ancient value ($GETH_DATADIR_ANCIENT) 230 | Root directory for ancient data (default = inside chaindata) 231 | 232 | --datadir.minfreedisk value ($GETH_DATADIR_MINFREEDISK) 233 | Minimum free disk space in MB, once reached triggers auto shut down (default = 234 | --cache.gc converted to MB, 0 = disabled) 235 | 236 | --db.engine value ($GETH_DB_ENGINE) 237 | Backing database implementation to use ('pebble' or 'leveldb') 238 | 239 | --eth.requiredblocks value ($GETH_ETH_REQUIREDBLOCKS) 240 | Comma separated block number-to-hash mappings to require for peering 241 | (=) 242 | 243 | --exitwhensynced (default: false) ($GETH_EXITWHENSYNCED) 244 | Exits after block synchronisation completes 245 | 246 | --goerli (default: false) ($GETH_GOERLI) 247 | Görli network: pre-configured proof-of-authority test network 248 | 249 | --holesky (default: false) ($GETH_HOLESKY) 250 | Holesky network: pre-configured proof-of-stake test network 251 | 252 | --mainnet (default: false) ($GETH_MAINNET) 253 | Ethereum mainnet 254 | 255 | --networkid value (default: 0) ($GETH_NETWORKID) 256 | Explicitly set network id (integer)(For testnets: use --goerli, --sepolia, 257 | --holesky instead) 258 | 259 | --override.cancun value (default: 0) ($GETH_OVERRIDE_CANCUN) 260 | Manually specify the Cancun fork timestamp, overriding the bundled setting 261 | 262 | --override.verkle value (default: 0) ($GETH_OVERRIDE_VERKLE) 263 | Manually specify the Verkle fork timestamp, overriding the bundled setting 264 | 265 | --sepolia (default: false) ($GETH_SEPOLIA) 266 | Sepolia network: pre-configured proof-of-work test network 267 | 268 | --snapshot (default: true) ($GETH_SNAPSHOT) 269 | Enables snapshot-database mode (default = enable) 270 | 271 | GAS PRICE ORACLE 272 | 273 | 274 | --gpo.blocks value (default: 20) ($GETH_GPO_BLOCKS) 275 | Number of recent blocks to check for gas prices 276 | 277 | --gpo.ignoreprice value (default: 2) ($GETH_GPO_IGNOREPRICE) 278 | Gas price below which gpo will ignore transactions 279 | 280 | --gpo.maxprice value (default: 500000000000) ($GETH_GPO_MAXPRICE) 281 | Maximum transaction priority fee (or gasprice before London fork) to be 282 | recommended by gpo 283 | 284 | --gpo.percentile value (default: 60) ($GETH_GPO_PERCENTILE) 285 | Suggested gas price is the given percentile of a set of recent transaction gas 286 | prices 287 | 288 | LIGHT CLIENT 289 | 290 | 291 | --light.egress value (default: 0) ($GETH_LIGHT_EGRESS) 292 | Outgoing bandwidth limit for serving light clients (deprecated) 293 | 294 | --light.ingress value (default: 0) ($GETH_LIGHT_INGRESS) 295 | Incoming bandwidth limit for serving light clients (deprecated) 296 | 297 | --light.maxpeers value (default: 100) ($GETH_LIGHT_MAXPEERS) 298 | Maximum number of light clients to serve, or light servers to attach to 299 | (deprecated) 300 | 301 | --light.nopruning (default: false) ($GETH_LIGHT_NOPRUNING) 302 | Disable ancient light chain data pruning (deprecated) 303 | 304 | --light.nosyncserve (default: false) ($GETH_LIGHT_NOSYNCSERVE) 305 | Enables serving light clients before syncing (deprecated) 306 | 307 | --light.serve value (default: 0) ($GETH_LIGHT_SERVE) 308 | Maximum percentage of time allowed for serving LES requests (deprecated) 309 | 310 | LOGGING AND DEBUGGING 311 | 312 | 313 | --log.compress (default: false) ($GETH_LOG_COMPRESS) 314 | Compress the log files 315 | 316 | --log.file value ($GETH_LOG_FILE) 317 | Write logs to a file 318 | 319 | --log.format value ($GETH_LOG_FORMAT) 320 | Log format to use (json|logfmt|terminal) 321 | 322 | --log.maxage value (default: 30) ($GETH_LOG_MAXAGE) 323 | Maximum number of days to retain a log file 324 | 325 | --log.maxbackups value (default: 10) ($GETH_LOG_MAXBACKUPS) 326 | Maximum number of log files to retain 327 | 328 | --log.maxsize value (default: 100) ($GETH_LOG_MAXSIZE) 329 | Maximum size in MBs of a single log file 330 | 331 | --log.rotate (default: false) ($GETH_LOG_ROTATE) 332 | Enables log file rotation 333 | 334 | --log.vmodule value ($GETH_LOG_VMODULE) 335 | Per-module verbosity: comma-separated list of = (e.g. 336 | eth/*=5,p2p=4) 337 | 338 | --nocompaction (default: false) ($GETH_NOCOMPACTION) 339 | Disables db compaction after import 340 | 341 | --pprof (default: false) ($GETH_PPROF) 342 | Enable the pprof HTTP server 343 | 344 | --pprof.addr value (default: "127.0.0.1") ($GETH_PPROF_ADDR) 345 | pprof HTTP server listening interface 346 | 347 | --pprof.blockprofilerate value (default: 0) ($GETH_PPROF_BLOCKPROFILERATE) 348 | Turn on block profiling with the given rate 349 | 350 | --pprof.cpuprofile value ($GETH_PPROF_CPUPROFILE) 351 | Write CPU profile to the given file 352 | 353 | --pprof.memprofilerate value (default: 524288) ($GETH_PPROF_MEMPROFILERATE) 354 | Turn on memory profiling with the given rate 355 | 356 | --pprof.port value (default: 6060) ($GETH_PPROF_PORT) 357 | pprof HTTP server listening port 358 | 359 | --remotedb value ($GETH_REMOTEDB) 360 | URL for remote database 361 | 362 | --trace value ($GETH_TRACE) 363 | Write execution trace to the given file 364 | 365 | --verbosity value (default: 3) ($GETH_VERBOSITY) 366 | Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail 367 | 368 | METRICS AND STATS 369 | 370 | 371 | --ethstats value ($GETH_ETHSTATS) 372 | Reporting URL of a ethstats service (nodename:secret@host:port) 373 | 374 | --metrics (default: false) ($GETH_METRICS) 375 | Enable metrics collection and reporting 376 | 377 | --metrics.addr value ($GETH_METRICS_ADDR) 378 | Enable stand-alone metrics HTTP server listening interface. 379 | 380 | --metrics.expensive (default: false) ($GETH_METRICS_EXPENSIVE) 381 | Enable expensive metrics collection and reporting 382 | 383 | --metrics.influxdb (default: false) ($GETH_METRICS_INFLUXDB) 384 | Enable metrics export/push to an external InfluxDB database 385 | 386 | --metrics.influxdb.bucket value (default: "geth") ($GETH_METRICS_INFLUXDB_BUCKET) 387 | InfluxDB bucket name to push reported metrics to (v2 only) 388 | 389 | --metrics.influxdb.database value (default: "geth") ($GETH_METRICS_INFLUXDB_DATABASE) 390 | InfluxDB database name to push reported metrics to 391 | 392 | --metrics.influxdb.endpoint value (default: "http://localhost:8086") ($GETH_METRICS_INFLUXDB_ENDPOINT) 393 | InfluxDB API endpoint to report metrics to 394 | 395 | --metrics.influxdb.organization value (default: "geth") ($GETH_METRICS_INFLUXDB_ORGANIZATION) 396 | InfluxDB organization name (v2 only) 397 | 398 | --metrics.influxdb.password value (default: "test") ($GETH_METRICS_INFLUXDB_PASSWORD) 399 | Password to authorize access to the database 400 | 401 | --metrics.influxdb.tags value (default: "host=localhost") ($GETH_METRICS_INFLUXDB_TAGS) 402 | Comma-separated InfluxDB tags (key/values) attached to all measurements 403 | 404 | --metrics.influxdb.token value (default: "test") ($GETH_METRICS_INFLUXDB_TOKEN) 405 | Token to authorize access to the database (v2 only) 406 | 407 | --metrics.influxdb.username value (default: "test") ($GETH_METRICS_INFLUXDB_USERNAME) 408 | Username to authorize access to the database 409 | 410 | --metrics.influxdbv2 (default: false) ($GETH_METRICS_INFLUXDBV2) 411 | Enable metrics export/push to an external InfluxDB v2 database 412 | 413 | --metrics.port value (default: 6060) ($GETH_METRICS_PORT) 414 | Metrics HTTP server listening port. 415 | Please note that --metrics.addr must be set 416 | to start the server. 417 | 418 | MINER 419 | 420 | 421 | --mine (default: false) ($GETH_MINE) 422 | Enable mining 423 | 424 | --miner.etherbase value ($GETH_MINER_ETHERBASE) 425 | 0x prefixed public address for block mining rewards 426 | 427 | --miner.extradata value ($GETH_MINER_EXTRADATA) 428 | Block extra data set by the miner (default = client version) 429 | 430 | --miner.gaslimit value (default: 30000000) ($GETH_MINER_GASLIMIT) 431 | Target gas ceiling for mined blocks 432 | 433 | --miner.gasprice value (default: 1000000000) ($GETH_MINER_GASPRICE) 434 | Minimum gas price for mining a transaction 435 | 436 | --miner.newpayload-timeout value (default: 2s) ($GETH_MINER_NEWPAYLOAD_TIMEOUT) 437 | Specify the maximum time allowance for creating a new payload 438 | 439 | --miner.recommit value (default: 2s) ($GETH_MINER_RECOMMIT) 440 | Time interval to recreate the block being mined 441 | 442 | MISC 443 | 444 | 445 | --help, -h (default: false) 446 | show help 447 | 448 | --synctarget value ($GETH_SYNCTARGET) 449 | Hash of the block to full sync to (dev testing feature) 450 | 451 | --version, -v (default: false) 452 | print the version 453 | 454 | NETWORKING 455 | 456 | 457 | --bootnodes value ($GETH_BOOTNODES) 458 | Comma separated enode URLs for P2P discovery bootstrap 459 | 460 | --discovery.dns value ($GETH_DISCOVERY_DNS) 461 | Sets DNS discovery entry points (use "" to disable DNS) 462 | 463 | --discovery.port value (default: 30303) ($GETH_DISCOVERY_PORT) 464 | Use a custom UDP port for P2P discovery 465 | 466 | --discovery.v4, --discv4 (default: true) ($GETH_DISCOVERY_V4) 467 | Enables the V4 discovery mechanism 468 | 469 | --discovery.v5, --discv5 (default: false) ($GETH_DISCOVERY_V5) 470 | Enables the experimental RLPx V5 (Topic Discovery) mechanism 471 | 472 | --identity value ($GETH_IDENTITY) 473 | Custom node name 474 | 475 | --maxpeers value (default: 50) ($GETH_MAXPEERS) 476 | Maximum number of network peers (network disabled if set to 0) 477 | 478 | --maxpendpeers value (default: 0) ($GETH_MAXPENDPEERS) 479 | Maximum number of pending connection attempts (defaults used if set to 0) 480 | 481 | --nat value (default: "any") ($GETH_NAT) 482 | NAT port mapping mechanism (any|none|upnp|pmp|pmp:|extip:) 483 | 484 | --netrestrict value ($GETH_NETRESTRICT) 485 | Restricts network communication to the given IP networks (CIDR masks) 486 | 487 | --nodekey value ($GETH_NODEKEY) 488 | P2P node key file 489 | 490 | --nodekeyhex value ($GETH_NODEKEYHEX) 491 | P2P node key as hex (for testing) 492 | 493 | --nodiscover (default: false) ($GETH_NODISCOVER) 494 | Disables the peer discovery mechanism (manual peer addition) 495 | 496 | --port value (default: 30303) ($GETH_PORT) 497 | Network listening port 498 | 499 | PERFORMANCE TUNING 500 | 501 | 502 | --cache value (default: 1024) ($GETH_CACHE) 503 | Megabytes of memory allocated to internal caching (default = 4096 mainnet full 504 | node, 128 light mode) 505 | 506 | --cache.blocklogs value (default: 32) ($GETH_CACHE_BLOCKLOGS) 507 | Size (in number of blocks) of the log cache for filtering 508 | 509 | --cache.database value (default: 50) ($GETH_CACHE_DATABASE) 510 | Percentage of cache memory allowance to use for database io 511 | 512 | --cache.gc value (default: 25) ($GETH_CACHE_GC) 513 | Percentage of cache memory allowance to use for trie pruning (default = 25% full 514 | mode, 0% archive mode) 515 | 516 | --cache.noprefetch (default: false) ($GETH_CACHE_NOPREFETCH) 517 | Disable heuristic state prefetch during block import (less CPU and disk IO, more 518 | time waiting for data) 519 | 520 | --cache.preimages (default: false) ($GETH_CACHE_PREIMAGES) 521 | Enable recording the SHA3/keccak preimages of trie keys 522 | 523 | --cache.snapshot value (default: 10) ($GETH_CACHE_SNAPSHOT) 524 | Percentage of cache memory allowance to use for snapshot caching (default = 10% 525 | full mode, 20% archive mode) 526 | 527 | --cache.trie value (default: 15) ($GETH_CACHE_TRIE) 528 | Percentage of cache memory allowance to use for trie caching (default = 15% full 529 | mode, 30% archive mode) 530 | 531 | --crypto.kzg value (default: "gokzg") ($GETH_CRYPTO_KZG) 532 | KZG library implementation to use; gokzg (recommended) or ckzg 533 | 534 | --fdlimit value (default: 0) ($GETH_FDLIMIT) 535 | Raise the open file descriptor resource limit (default = system fd limit) 536 | 537 | STATE HISTORY MANAGEMENT 538 | 539 | 540 | --gcmode value (default: "full") ($GETH_GCMODE) 541 | Blockchain garbage collection mode, only relevant in state.scheme=hash ("full", 542 | "archive") 543 | 544 | --history.state value (default: 90000) ($GETH_HISTORY_STATE) 545 | Number of recent blocks to retain state history for (default = 90,000 blocks, 0 546 | = entire chain) 547 | 548 | --history.transactions value (default: 2350000) ($GETH_HISTORY_TRANSACTIONS) 549 | Number of recent blocks to maintain transactions index for (default = about one 550 | year, 0 = entire chain) 551 | 552 | --state.scheme value ($GETH_STATE_SCHEME) 553 | Scheme to use for storing ethereum state ('hash' or 'path') 554 | 555 | --syncmode value (default: snap) ($GETH_SYNCMODE) 556 | Blockchain sync mode ("snap" or "full") 557 | 558 | TRANSACTION POOL (BLOB) 559 | 560 | 561 | --blobpool.datacap value (default: 2684354560) ($GETH_BLOBPOOL_DATACAP) 562 | Disk space to allocate for pending blob transactions (soft limit) 563 | 564 | --blobpool.datadir value (default: "blobpool") ($GETH_BLOBPOOL_DATADIR) 565 | Data directory to store blob transactions in 566 | 567 | --blobpool.pricebump value (default: 100) ($GETH_BLOBPOOL_PRICEBUMP) 568 | Price bump percentage to replace an already existing blob transaction 569 | 570 | TRANSACTION POOL (EVM) 571 | 572 | 573 | --txpool.accountqueue value (default: 64) ($GETH_TXPOOL_ACCOUNTQUEUE) 574 | Maximum number of non-executable transaction slots permitted per account 575 | 576 | --txpool.accountslots value (default: 16) ($GETH_TXPOOL_ACCOUNTSLOTS) 577 | Minimum number of executable transaction slots guaranteed per account 578 | 579 | --txpool.globalqueue value (default: 1024) ($GETH_TXPOOL_GLOBALQUEUE) 580 | Maximum number of non-executable transaction slots for all accounts 581 | 582 | --txpool.globalslots value (default: 5120) ($GETH_TXPOOL_GLOBALSLOTS) 583 | Maximum number of executable transaction slots for all accounts 584 | 585 | --txpool.journal value (default: "transactions.rlp") ($GETH_TXPOOL_JOURNAL) 586 | Disk journal for local transaction to survive node restarts 587 | 588 | --txpool.lifetime value (default: 3h0m0s) ($GETH_TXPOOL_LIFETIME) 589 | Maximum amount of time non-executable transaction are queued 590 | 591 | --txpool.locals value ($GETH_TXPOOL_LOCALS) 592 | Comma separated accounts to treat as locals (no flush, priority inclusion) 593 | 594 | --txpool.nolocals (default: false) ($GETH_TXPOOL_NOLOCALS) 595 | Disables price exemptions for locally submitted transactions 596 | 597 | --txpool.pricebump value (default: 10) ($GETH_TXPOOL_PRICEBUMP) 598 | Price bump percentage to replace an already existing transaction 599 | 600 | --txpool.pricelimit value (default: 1) ($GETH_TXPOOL_PRICELIMIT) 601 | Minimum gas price tip to enforce for acceptance into the pool 602 | 603 | --txpool.rejournal value (default: 1h0m0s) ($GETH_TXPOOL_REJOURNAL) 604 | Time interval to regenerate the local transaction journal 605 | 606 | VIRTUAL MACHINE 607 | 608 | 609 | --vmdebug (default: false) ($GETH_VMDEBUG) 610 | Record information useful for VM and contract debugging 611 | 612 | 613 | COPYRIGHT: 614 | Copyright 2013-2024 The go-ethereum Authors 615 | --------------------------------------------------------------------------------