smartcontracts / simple-optimism-node

The easiest way to run an Optimism node
MIT License
318 stars 105 forks source link

Syncing stuck at the SafeHead #123

Open ipoomzakungi opened 4 months ago

ipoomzakungi commented 4 months ago

from the healthcheck its can see that the node is behind but its not syncing further more than the Safehead (checking from grafana)

and checking from the healthcheck its syncing just reach the minBlocknumber healthcheck-1 | {"level":30,"time":1707811268639,"targetHeight":115990268,"referenceHeight":116106245,"heightDifference":115977,"minBlockNumber":115990268,"msg":"latest block heights"} so its make the node far behind , is it have any thing that can help ?

###############################################################################
#                                ↓ REQUIRED ↓                                 #
###############################################################################

# Network to run the node on ("op-mainnet" or "op-sepolia")
NETWORK_NAME=op-mainnet

# Type of node to run ("full" or "archive"), note that "archive" is 10x bigger
NODE_TYPE=full

###############################################################################
#                            ↓ REQUIRED (LEGACY) ↓                            #
###############################################################################

# L1 node to get chain data from (L2 sync no longer supported)
DATA_TRANSPORT_LAYER__RPC_ENDPOINT=

###############################################################################
#                            ↓ REQUIRED (BEDROCK) ↓                           #
###############################################################################

# Where to get the Bedrock database ("download" or "migration"), see README
BEDROCK_SOURCE=download

# L1 node that the op-node (Bedrock) will get chain data from
OP_NODE__RPC_ENDPOINT=[alchemy-mainnet]

# Type of RPC that op-node is connected to, see README
OP_NODE__RPC_TYPE=alchemy

# Reference L2 node to run healthcheck against
HEALTHCHECK__REFERENCE_RPC_PROVIDER=https://mainnet.optimism.io

###############################################################################
#                            ↓ OPTIONAL (BEDROCK) ↓                           #
###############################################################################

# Optional provider to serve legacy RPC requests, see README
OP_GETH__HISTORICAL_RPC=https://mainnet.optimism.io

###############################################################################
#                                ↓ OPTIONAL ↓                                 #
###############################################################################

# Feel free to customize your image tag if you want, uses "latest" by default
# See here for all available images: https://hub.docker.com/u/ethereumoptimism
IMAGE_TAG__L2GETH=
IMAGE_TAG__DTL=
IMAGE_TAG__HEALTCHECK=
IMAGE_TAG__PROMETHEUS=
IMAGE_TAG__GRAFANA=
IMAGE_TAG__INFLUXDB=
IMAGE_TAG__OP_GETH=
IMAGE_TAG__OP_NODE=

# Exposed server ports (must be unique)
# See docker-compose.yml for default values
PORT__L2GETH_HTTP=9891
PORT__L2GETH_WS=9892
PORT__DTL=
PORT__HEALTHCHECK_METRICS=9893
PORT__PROMETHEUS=9897
PORT__GRAFANA=9898
PORT__INFLUXDB=9899
PORT__TORRENT_UI=
PORT__TORRENT=
PORT__OP_GETH_HTTP=9894
PORT__OP_GETH_WS=9895
PORT__OP_NODE_P2P=9896
Chomtana commented 4 months ago

It's still synced to head on my node. Can you check version of your node in docker-compose.yml?

cat docker-compose.yml

It should returns op-node version 1.5.0

  op-geth:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101305.3
    restart: unless-stopped
    stop_grace_period: 5m
    entrypoint: /scripts/start-op-geth.sh
    env_file:
      - ./envs/${NETWORK_NAME}/op-geth.env
      - .env
    volumes:
      - ./envs/${NETWORK_NAME}/config:/chainconfig
      - ./scripts/:/scripts
      - shared:/shared
      - op_geth:/geth
    ports:
      - ${PORT__OP_GETH_HTTP:-9993}:8545
      - ${PORT__OP_GETH_WS:-9994}:8546

  op-node:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.5.0
    restart: unless-stopped
    stop_grace_period: 5m
    entrypoint: /scripts/start-op-node.sh
    env_file:
      - ./envs/${NETWORK_NAME}/op-node.env
      - .env
    volumes:
      - ./envs/${NETWORK_NAME}/config:/chainconfig
      - ./scripts/:/scripts
      - shared:/shared
    ports:
      - ${PORT__OP_NODE_P2P:-9003}:9003/udp
      - ${PORT__OP_NODE_P2P:-9003}:9003/tcp
ipoomzakungi commented 4 months ago

the op-node is 1.5

i do fix some of the init-bedrock from saving the tar then extract to the stream extraction becase i have limit space which is around 2TB.

i don't think this make the problem because the node can run using the bedrock but its very very far behind the present block and just sync when have to sync (minBlockNumber)

  op-geth:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101305.3
    restart: unless-stopped
    stop_grace_period: 5m
    entrypoint: /scripts/start-op-geth.sh
    env_file:
      - ./envs/${NETWORK_NAME}/op-geth.env
      - .env
    volumes:
      - ./envs/${NETWORK_NAME}/config:/chainconfig
      - ./scripts/:/scripts
      - shared:/shared
      - op_geth:/geth
    ports:
      - ${PORT__OP_GETH_HTTP:-9993}:8545
      - ${PORT__OP_GETH_WS:-9994}:8546

  op-node:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.5.0
    restart: unless-stopped
    stop_grace_period: 5m
    entrypoint: /scripts/start-op-node.sh
    env_file:
      - ./envs/${NETWORK_NAME}/op-node.env
      - .env
    volumes:
      - ./envs/${NETWORK_NAME}/config:/chainconfig
      - ./scripts/:/scripts
      - shared:/shared
    ports:
      - ${PORT__OP_NODE_P2P:-9003}:9003/udp
      - ${PORT__OP_NODE_P2P:-9003}:9003/tcp
Chomtana commented 4 months ago

Maybe fixed in v1.5.1

https://github.com/ethereum-optimism/optimism/releases/tag/v1.5.1

https://github.com/ethereum-optimism/optimism/pull/9417

I have upgraded the latest code to v1.5.1 let's pull, rebuild and restart