lightninglabs / neutrino

Privacy-Preserving Bitcoin Light Client
MIT License
907 stars 182 forks source link

server: Actively prevent regnet network discovery #231

Closed chappjc closed 2 years ago

chappjc commented 3 years ago

This treats regnet like simnet with respect to node discovery and outbound connections.

Without this change, using regnet without --connect/ConnectPeers results in peer connection errors being logged ad nauseum. e.g. tons of logs like Failed to connect to reqid 78: no valid connect address, eventually giving up., The workaround is to always use ConnectPeers on regnet, but peer discovery is really best disabled for regnet as well as simnet.

A similar change was made in dcrd in https://github.com/decred/dcrd/commit/f5fdd95eb578a485b414331836f9731fcd0f2756

Would like to test a bit more to be sure nothing unexpected happens on our regnet harness, so in draft for the moment.

chappjc commented 3 years ago

I'm setting this as ready for review since it probably needs eyes that are more familiar with neutrino than myself. However, please note that I have not yet taken this change to testnet or mainnet to verify nothing is busted. It's working fine with regnet though.

lightninglabs-deploy commented 2 years ago

@chappjc, remember to re-request review from reviewers for your latest update

chappjc commented 2 years ago

Thanks, @lightninglabs-deploy, it's already approved. :stuck_out_tongue_winking_eye:

ellemouton commented 2 years ago

@chappjc , it needs 2 approvals :) so just need to re-request review from the other reviewer

lightninglabs-deploy commented 2 years ago

@roasbeef: review reminder