Collect all the node found on Ethereum DISCV4 protocol (but not all them are Ethereum). The nodes IP are stored in a postgres database.
$ git clone https://github.com/cyber-coop/eth-node-finder.git
$ cp config.example.toml config.toml
$ docker compose up
Start postgres via docker compose.
$ docker compose up -d postgres
Create your config.toml from config.example.toml.
Start janus to see it running. It's a single binary/process that does discovery (DISCV4), accepts incoming connections, and dials out to check node status, all sharing one node identity.
$ RUST_LOG=info cargo run
Schema changes live under migrations/ (managed with sqlx). janus applies any pending migrations itself on startup, so this is optional — mainly useful if you want to bring the schema up to date without starting the whole app, or check what's pending:
$ cargo install sqlx-cli --no-default-features --features postgres
$ sqlx migrate run --database-url postgres://postgres:wow@localhost:5432/blockchains
$ docker exec -ti postgres bash
Once inside the container
$ psql -U postgres -d blockchains
> SELECT * FROM nodes;
> SELECT * FROM nodes WHERE network_id IS NOT NULL;