zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Allow local peer connections on Regtest

Open arya2 opened this issue 11 months ago • 1 comments

Motivation

This will be needed for the RPC tests and to match zcashd's behaviour on Regtest as closely as possible.

Design

On Regtest:

  • Return the configured initial testnet peers without loading the peer cache in zebra_network::Config.initial_peers() instead of returning an empty set, and
  • Reject incoming connections and avoid attempting outbound connections with peers outside the local host domain.

arya2 avatar Jan 31 '25 01:01 arya2

How does this relate to #8361 ?

mpguerra avatar May 08 '25 10:05 mpguerra

Fixed by https://github.com/ZcashFoundation/zebra/pull/9580.

How does this relate to https://github.com/ZcashFoundation/zebra/issues/8361 ?

#8361 would be cleanup that also allows for disabling all peers on Regtest, or for disabling all or non-local peers on configured Testnets. It wouldn't change the behaviour much, originally we wanted to get rid of any calls to is_default_testnet() or is_regtest() and replace them with fields.

arya2 avatar Aug 13 '25 04:08 arya2