Allow Private nodes to be discoverable
/nomos/circuit/relay/0.2.0/hop/nomos/circuit/relay/0.2.0/stopIf enabled via config, run a Circuit Relay v2 server and advertise, via Identify, support for the following protocols:
/nomos/circuit/relay/0.2.0/hop/nomos/circuit/relay/0.2.0/stopAdd a Private node to its discovered nodes set, if the Private node has secured a Circuit Relay reservation at the Public node’s Circuit Relay server. The Private node should be added with the following relayed multiaddress:
/{public_relay_ip}/udp/{port}/quic-v1/p2p/public_relay_peer_id/p2p-circuit/p2p/{private_peer_id}
If the Private node loses its reservation at the Circuit Relay server, the above relayed address should be removed from the discovered nodes set.
Dialing Private peers
A Private peer can only be dialed by other peers if it has at least one valid reservation at a Circuit Relay server. Its addresses then have the following relayed multiaddress form:
/{public_relay_ip}/udp/{port}/quic-v1/p2p/{public_relay_peer_id}/p2p-circuit/p2p/{private_peer_id}
The peer discovery protocol must provide information about publicly reachable addresses of peers. When dialing a peer, the libp2p stack will automatically determine if the connection should be direct or relayed, depending on the address of the dialed peer. If the dialed peer is a Private peer and both peers advertise support for the DCUtR protocol via Identify (/nomos/dcutr), NAT hole punching will be automatically attempted by the libp2p stack.
When transaction hashes are evicted from the mempool, the corresponding transaction bodies are removed from storage to prevent unbounded growth.