An effective dialing system should involve the inclusion of a Confidence system for Multiaddrs. This enables ranking of Multiaddrs so that a prioritized list can be passed to DialRequests to maximize usage of Dialer Tokens, and minimize connection times.
* A DialRequest SHOULD fail if no dial tokens are available. The DialRequest MAY proceed without tokens, but this should be reserved for High Priority actions and should be rare.
* A DialRequest MUST NOT request more tokens than it has addresses to dial. Example: If the MAX_PER_PEER_DIALS is 4 and a DialRequest has 1 address, it should only request 1 token.
* A DialRequest SHOULD execute parallel dials for each of its addresses up the total number of tokens it has.
* On a successful dial, the DialRequest MUST abort any other in progress dials, return the successful connection and release all tokens.
* A new DialRequest SHOULD be given a descending list of prioritized Multiaddrs, based on their confidence. Having higher confidence Multiaddrs first can help minimize the time a DialRequest is active.
* A failed dial to a Multiaddr SHOULD add that Multiaddr to a temporary denyList.
* A failed dial to a Multiaddr SHOULD lower the confidence of that Multiaddr.
* A successful dial to a Multiaddr SHOULD increase the confidence of that Multiaddr.