I stop one of my Bitcoin Core full nodes (v0.19.1) with 10 connections and then start it again. It needs to load IP addresses from DNS seeds. Why is this? Why doesn't it try the addresses of peers it was connected to prior to the shut down? Are they not persisted in addrman? It could then obtain more IP addresses through gossiping from those peers and not need to keep going back to the DNS seeds.
-
I found this github.com/bitcoin/bitcoin/pull/16939 and this github.com/bitcoin/bitcoin/issues/15434 but will look into more before attempting an answer.– Michael FolksonJan 19, 2021 at 14:43
-
And this Bitcoin Core PR review club: bitcoincore.reviews/16939– Michael FolksonJan 19, 2021 at 14:50
-
What do you see in the debug.log that indicates it is using the DNS seeds?– Andrew Chow ♦Jan 19, 2021 at 16:19
-
"Loading addresses from DNS seed dnsseed.emzy.de" etc followed by the other DNS seeds. Then "277 addresses found from DNS seeds" and "dnsseed thread exit"– Michael FolksonJan 19, 2021 at 16:44
-
Do you have the same problem with v0.21.0?– Pieter WuilleJan 28, 2021 at 1:18
1 Answer
This appears to be resolved for me in v0.21 with this merged PR 16939 and some additional context in this issue and this Bitcoin Core PR review club.
Falling back to load IP addresses from DNS seeds should be the last resort and as you say addresses of previous peers should be persisted in addrman after stopping bitcoind and restarting.