ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.18k stars 290 forks source link

Unclear about checkpointSyncUrl post infura endpoint deprecation #4961

Closed hasjack closed 1 year ago

hasjack commented 1 year ago

Hello!

After the ethereum merge I followed these instructions: https://hackmd.io/@philknows/rJegZyH9q to run an eth node.

My particular issue recently has been around the --checkpointSyncUrl flag as infura has deprecated the endpoint as specified in the above article. I have attempted replacing it with one of the alternatives provided on this page: https://eth-clients.github.io/checkpoint-sync-endpoints/

However this results in these errors:

geth_docker    | WARN [12-30|13:21:43.615] Post-merge network, but no beacon client seen. Please launch one to follow the chain! 
beacon_node_1  | Dec-30 13:21:48.300[ETH1]            error: Error updating eth1 chain cache  request to http://127.0.0.1:8551/ failed, reason: connect ECONNREFUSED 127.0.0.1:8551
beacon_node_1  | FetchError: request to http://127.0.0.1:8551/ failed, reason: connect ECONNREFUSED 127.0.0.1:8551
beacon_node_1  |     at ClientRequest.<anonymous> (/usr/app/node_modules/node-fetch/lib/index.js:1461:11)
beacon_node_1  |     at ClientRequest.emit (node:events:513:28)
beacon_node_1  |     at Socket.socketErrorListener (node:_http_client:481:9)
beacon_node_1  |     at Socket.emit (node:events:513:28)
beacon_node_1  |     at emitErrorNT (node:internal/streams/destroy:157:8)
beacon_node_1  |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
beacon_node_1  |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
beacon_node_1  | Dec-30 13:21:48.349[METRICS]          info: Starting metrics HTTP server port=8008, address=127.0.0.1

I used a few of the different options but always saw the above error and not clear how to fix e.g. --checkpointSyncUrl https://beaconstate.ethstaker.cc - I also tried to use the lodestar endpoint but to no avail.

Apologies in advance for this "issue" not really being an issue as such - more a lack of understanding on my part. I am mainly a FE developer with some devops / BE experience running a few sites that report on CryptoKitties. Any help would be greatly appreciated.

dapplion commented 1 year ago

Hey @hasjack :wave: By seeing those logs I can confirm that the Lodestar node initialized, so --checkpointSyncUrl work correctly. However the issue here appears that your execution node is not reachable at http://127.0.0.1:8551 which is the default. If you are running dockerized with a bridge network you probably need to do

--execution.urls http://geth_docker:8551

let me know if that helps

hasjack commented 1 year ago

Many thanks for your response. It hasn't resolved the issue however. I am confused as to why I didn't see this issue using the infura endpoint and surprised changing the endpoint has caused this. Below are the logs using --execution.urls http://geth_docker:8551 - incidentally node appears to have synced by removing the --checkpointSyncUrl but am concerned this may cause issues ongoing?


beacon_node_1  | Dec-31 18:24:44.871[ETH1]            error: Error updating eth1 chain cache  request to http://geth_docker:8551/ failed, reason: getaddrinfo EAI_AGAIN geth_docker
beacon_node_1  | FetchError: request to http://geth_docker:8551/ failed, reason: getaddrinfo EAI_AGAIN geth_docker
beacon_node_1  |     at ClientRequest.<anonymous> (/usr/app/node_modules/node-fetch/lib/index.js:1461:11)
beacon_node_1  |     at ClientRequest.emit (node:events:513:28)
beacon_node_1  |     at Socket.socketErrorListener (node:_http_client:481:9)
beacon_node_1  |     at Socket.emit (node:events:513:28)
beacon_node_1  |     at emitErrorNT (node:internal/streams/destroy:157:8)
beacon_node_1  |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
beacon_node_1  |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
beacon_node_1  | Dec-31 18:24:44.926[METRICS]          info: Starting metrics HTTP server port=8008, address=127.0.0.1```
dapplion commented 1 year ago

To continue debugging your setup, please join our discord (Chainsafe invite https://discord.gg/MFYFN2d3) and share your error + the full docker-compose in the :star:-lodestar-general channel. Will be able to iterate faster there

philknows commented 1 year ago

I've also updated that guide with updated steps to use --checkpointSyncUrl under the "Add your weak subjectivity (checkpoint sync) provider" section. Though for your issue, it seems like it's related to not being able to connect to your execution node on 8551.

dapplion commented 1 year ago

Closing issues for specific incidents on old versions of Lodestar, please re-open if it happens with latest stable