smartcontracts / simple-optimism-node

The easiest way to run an Optimism node
MIT License
324 stars 112 forks source link

node isn't getting new blocks #116

Closed sbvegan closed 8 months ago

sbvegan commented 8 months ago

Hey all, I got a request with the following issue. They said they used the snapshot-fastnode branch; however I don't see that branch in the repo.

 curl http://localhost:8545   -X POST   -H "Content-Type: application/json"   --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

 curl: (7) Failed to connect to localhost port 8545 after 0 ms: Connection refused

Additional Information

sudo netstat -ltnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      514934/systemd-reso 
tcp        0      0 0.0.0.0:8086            0.0.0.0:*               LISTEN      106037/docker-proxy 
tcp        0      0 0.0.0.0:9993            0.0.0.0:*               LISTEN      105883/docker-proxy 
tcp        0      0 0.0.0.0:9994            0.0.0.0:*               LISTEN      105859/docker-proxy 
tcp        0      0 0.0.0.0:9090            0.0.0.0:*               LISTEN      106329/docker-proxy 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      514888/sshd: /usr/s 
tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN      106293/docker-proxy 
tcp6       0      0 :::8086                 :::*                    LISTEN      106047/docker-proxy 
tcp6       0      0 :::9993                 :::*                    LISTEN      105890/docker-proxy 
tcp6       0      0 :::9994                 :::*                    LISTEN      105866/docker-proxy 
tcp6       0      0 :::9090                 :::*                    LISTEN      106339/docker-proxy 
tcp6       0      0 :::22                   :::*                    LISTEN      514888/sshd: /usr/s 
tcp6       0      0 :::3000                 :::*                    LISTEN      106305/docker-proxy`

logs

docker logs -f simple-optimism-node-op-geth-1 -n 33
INFO [01-16|20:11:25.202] --------------------------------------------------------------------------------------------------------------------------------------------------------- 
INFO [01-16|20:11:25.202]  
INFO [01-16|20:11:25.207] Loaded most recent local block           number=0 hash=7ca38a..3fa48b td=1 age=54y9mo4w
INFO [01-16|20:11:25.207] Genesis state is missing, wait state sync 
WARN [01-16|20:11:25.207] Failed to load snapshot                  err="missing or corrupted snapshot"
INFO [01-16|20:11:25.217] Rebuilding state snapshot 
INFO [01-16|20:11:25.221] Initialising Ethereum protocol           network=10         dbversion=<nil>
INFO [01-16|20:11:25.221] Resuming state snapshot generation       root=eddb4c..a568eb accounts=0 slots=0 storage=0.00B dangling=0 elapsed=3.727ms
INFO [01-16|20:11:25.221] Initialized transaction indexer          limit=2,350,000
INFO [01-16|20:11:25.221] Trie missing, state snapshotting paused  root=eddb4c..a568eb accounts=0 slots=0 storage=0.00B dangling=0 elapsed=3.929ms
INFO [01-16|20:11:25.224] Entered PoS stage 
INFO [01-16|20:11:25.224] Regenerated local transaction journal    transactions=0 accounts=0
WARN [01-16|20:11:25.243] Switch sync mode from full sync to snap sync reason="head state missing"
INFO [01-16|20:11:25.244] Chain post-merge, sync via beacon client 
INFO [01-16|20:11:25.245] Gasprice oracle is ignoring threshold set threshold=2
WARN [01-16|20:11:25.253] Engine API enabled                       protocol=eth
INFO [01-16|20:11:25.253] Starting peer-to-peer node               instance=Geth/v0.1.0-unstable-c6b416da/linux-amd64/go1.21.5
INFO [01-16|20:11:25.365] IPC endpoint opened                      url=/geth/geth.ipc
INFO [01-16|20:11:25.366] New local node record                    seq=1,705,435,885,365 id=fbfbf792bb012b23 ip=127.0.0.1 udp=0 tcp=30303
INFO [01-16|20:11:25.366] Started P2P networking                   self="enode://08913a7fc2bac198bcbf4fbb1ebb33e49350bc01c04dd35653b710bc5b55fe110d97d34319dbc71c10c4f80e7897bf7ca88bdf1e032511628612a4236372b988@127.0.0.1:30303?discport=0"
INFO [01-16|20:11:25.366] Loaded JWT secret file                   path=/shared/jwt.txt crc32=0xb77f1d58
INFO [01-16|20:11:25.366] HTTP server started                      endpoint=[::]:8545 auth=false prefix= cors=* vhosts=*
INFO [01-16|20:11:25.366] WebSocket enabled                        url=ws://[::]:8546
INFO [01-16|20:11:25.366] WebSocket enabled                        url=ws://[::]:8551
INFO [01-16|20:11:25.366] HTTP server started                      endpoint=[::]:8551 auth=true  prefix= cors=localhost vhosts=*
INFO [01-16|21:11:25.224] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-16|22:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-16|23:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-17|00:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-17|01:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-17|02:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-17|03:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0
INFO [01-17|04:11:25.225] Regenerated local transaction journal    transactions=0 accounts=0

docker ps

docker ps -a
CONTAINER ID   IMAGE                                                                 COMMAND                  CREATED      STATUS                                  PORTS                                                                                                        NAMES
9589ec7897d8   prom/prometheus:latest                                                "/bin/prometheus --c…"   2 days ago   Up 2 days                               0.0.0.0:9090->9090/tcp, :::9090->9090/tcp                                                                    simple-optimism-node-prometheus-1
4c77db0b111e   ethereumoptimism/replica-healthcheck:latest                           "pnpm run start"         2 days ago   Restarting (1) 53 seconds ago                                                                                                                        simple-optimism-node-healthcheck-1
19cddefd0ed6   grafana/grafana:9.3.0                                                 "/run.sh"                2 days ago   Up 2 days                               0.0.0.0:3000->3000/tcp, :::3000->3000/tcp                                                                    simple-optimism-node-grafana-1
c869be988a8e   influxdb:1.8                                                          "/entrypoint.sh infl…"   2 days ago   Up 2 days                               0.0.0.0:8086->8086/tcp, :::8086->8086/tcp                                                                    simple-optimism-node-influxdb-1
c5bdd640ac58   simple-optimism-node-bedrock-init                                     "/scripts/init-bedro…"   2 days ago   Exited (0) 2 days ago                                                                                                                                simple-optimism-node-bedrock-init-1
6b77e12f13c1   us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101304.2   "/scripts/start-op-g…"   2 days ago   Up 2 days                               30303/tcp, 30303/udp, 0.0.0.0:9993->8545/tcp, :::9993->8545/tcp, 0.0.0.0:9994->8546/tcp, :::9994->8546/tcp   simple-optimism-node-op-geth-1
152aada0cd3c   us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.4.1        "/scripts/start-op-n…"   2 days ago   Restarting (1) Less than a second ago                                                                                                                simple-optimism-node-op-node-1
sbvegan commented 8 months ago

Is this repository using fastnode.io's snapshots?

Chomtana commented 8 months ago

snapshot-fastnode branch should be on my own fork that use old snapshot (With incorrect structure)

Chomtana commented 8 months ago

@sbvegan can guide them to use this branch. However, I haven't fully synced the node yet so it's under testing.

https://github.com/Chomtana/simple-optimism-node/tree/simplify-profile

Remember to docker compose down -v to wipe old corrupted data first

sbvegan commented 8 months ago

IMAGE 2024-01-23 07:27:31

Moving our conversation in public as well:

Seem like I have forget to docker compose up -d —build Need —build to rebuild with lz4 dependency

What steps would I need to take to resolve this issue?

Chomtana commented 8 months ago
git pull
docker compose up -d —build

Should fix this as an old one doesn't have lz4 installed

If it's still not working then run docker compose pull then docker compose up -d —build

Chomtana commented 8 months ago

Merged #117 should fix this

sbvegan commented 8 months ago

Awesome, thanks!