ethereum / node-crawler

Attempts to crawl the Ethereum network of valid Ethereum execution nodes and visualizes them in a nice web dashboard.
https://www.ethernets.io/
MIT License
114 stars 61 forks source link

synced status of nodes #59

Open crmbydlc opened 1 month ago

crmbydlc commented 1 month ago

Hey there. I'm wondering where and how to filter for the synced status of a node as you present this in your dashboard https://www.ethernets.io/ - Which field in the API DB is used for filtering against this? I cannot find something like that. Help is appreciated.

Thx Uwe

angaz commented 1 month ago

Hi.

The synced status is done at query time. It checks if the block time is within 1 minute of the crawl time.

One of the examples in the code: https://github.com/angaz/node-crawler/blob/main/pkg%2Fdatabase%2Fstats.go#L63

crmbydlc commented 1 month ago

Hi @angaz

thanks for the reply. That make sense. The repo you linked to is another one, isn't it? I tried to clone that and get it running. Im running into errors (see below) - is there anything to do in comparison of the original project to get this one up and running?

pkg/api/help.go:15:21: undefined: public.HelpPage pkg/api/help.go:17:18: undefined: public.Index pkg/api/help.go:17:31: undefined: public.URLFromReq pkg/api/history.go:90:19: undefined: public.URLFromReq pkg/api/history.go:92:18: undefined: public.Index pkg/api/history.go:94:10: undefined: public.HistoryList pkg/api/nodes.go:48:17: undefined: public.NodeTable pkg/api/nodes.go:50:17: undefined: public.NotFound pkg/api/nodes.go:53:18: undefined: public.Index pkg/api/nodes.go:53:31: undefined: public.URLFromReq pkg/api/nodes.go:53:31: too many errors

angaz commented 1 month ago

Yeah, the build docs are a bit out of date.

You will need to generate the front-end code first with https://github.com/a-h/templ

crmbydlc commented 1 month ago

alrighty. thanks. I did that and noticed timescale is needed as DB as well? I tried that and running then in other errors (e.g. database migration failed: migration (3) failed: exec: ERROR: view "node_view" does not exist (SQLSTATE 42P01)) - any chance you add / update the build docs from start to beginning? I'm keen in the project but struggling a bit getting it up and running. Cheers