ethereum / go-ethereum

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
47.14k stars 19.95k forks source link

pi-hole shows over 10,000 hits for "all.mainnet.ethdisco.net". #20713

Closed Zaphod101010 closed 4 years ago

Zaphod101010 commented 4 years ago

Is this expected behavior? Or is this a bug?

They are all TXT query type.

System information

Geth version: 1.9.11 OS & Version: MacOS

Expected behavior

Fewer dns queries

Actual behavior

Over 10,000 dns queries in the last 24 hours.

karalabe commented 4 years ago

In 1.9.11 we've introduced a DNS discovery. A crawler is constantly mapping out the Ethereum network and is publishing its results in a Merkle tree on top of DNS (via TXT records). These trees are published on the ethdisco.net domain (mainnet, ropsten, rinkeby and goerli). Geth slowly downloads this tree as a secondary discovery protocol beside the DHT (or for people who don't have UDP connectivity). Although Geth does access a lot of "subdomains", these are immutable so the DNS infrastructure should be able to very very aggressively cache it and not have to do actual network lookups.

karalabe commented 4 years ago

Here's the protocol btw https://eips.ethereum.org/EIPS/eip-1459

Zaphod101010 commented 4 years ago

Does anyone have any idea for a way to have geth not use the pi-hole for it's dns?

pi-hole logs are over 130MB and growing. It's making a dozen requests per second.

The excessive logging of geth dns requests makes the pi-hole query log kind of unusable.

holiman commented 4 years ago

This is an issue with pi-hole, perhaps suggest to them a feature to whitelist/ignore certain domains? Nothing we can do here on our side.

MariusVanDerWijden commented 4 years ago

@Zaphod101010 Maybe you can take a look at this: https://discourse.pi-hole.net/t/option-to-ignore-hosts-from-appearing-in-the-query-log/6319/21

cleanunicorn commented 3 years ago

@holiman

Does anyone have any idea for a way to have geth not use the pi-hole for it's dns?

pi-hole logs are over 130MB and growing. It's making a dozen requests per second.

The excessive logging of geth dns requests makes the pi-hole query log kind of unusable.

DNS is set at machine level. That means if you are running geth on you own machine, it will be hard to change the DNS without any virtualization.

However, if you're running it in Docker, you can specify a DNS server with --dns.

Check the "DNS Services" section in https://docs.docker.com/config/containers/container-networking/