<p>btccore won't list any incoming connections until it's synched. But the network config plays a large part in that. The log file will probably show if there are attempts to connect as incoming that are failing for some reason, but I've found the solution can be as simple as using my 5G phone instead of whatever you're using for a wan interface. btccore usually takes somewhat longer (&lt; an hour) after startup, and you have to have the &quot;allow incoming network connections&quot; flag on. Having trouble with this with LTC but I expect because LTC syncs so much faster than BTC.</p>

CC BY-SA 4.0
2024-11-02T01:56:04.587Z
2024-11-02T01:56:04.587Z
touristguy87
<p>There's a overlap with this <a href="https://bitcoin.stackexchange.com/questions/42286/what-is-the-difference-between-inbound-and-outbound-connections">post</a> and others but I'll try to directly correct a couple of things here.</p>
<blockquote>
<p>Why do we have two types of connections, outgoing and incoming?</p>
</blockquote>
<p>To risk stating the obvious sometimes our node will make a request to connect to another node (<strong>outbound</strong>) whilst other times a node will make a request to connect to our node (<strong>inbound</strong>). In a healthy peer to peer (P2P) protocol you can't really avoid having both outgoing and incoming requests. The extent to which outbound and inbound connections are treated differently by your full node is a more interesting question. These Bitcoin Core PR review club <a href="https://bitcoincore.reviews/22778" rel="nofollow noreferrer">notes</a> (June 8th 2022) on inbound block-relay-only connections stated:</p>
<blockquote>
<p>Once the connection is established, the relationship is largely symmetric (the protocol works the same in both directions), although we treat outbound peers with some preference.</p>
</blockquote>
<p>If you are concerned about malicious full nodes you might have some trusted or semi trusted full nodes you choose to connect to (outbound) whilst presumably all inbound connection requests are from nodes you know very little about.</p>
<blockquote>
<p>Are outgoing connections the ones where we notify of new blocks/transactions, while incoming connections are the ones where they notify us of new blocks/transactions?</p>
</blockquote>
<p>No, both outbound and inbound connections can notify your node of new blocks and transactions and vice versa. That PR review club I referred to does discuss block-relay-only peers which is where you decide to only relay blocks to certain peers and not transactions, IP addresses. Inbound connections can also indicate they don't want to receive transactions etc.</p>
<blockquote>
<p>When we do the initial synchronization (IBD) or completely randomly want to ask about a block or transaction or something third, is it done with outgoing connections or incoming connections?</p>
</blockquote>
<p>Both. If we aren't aware of any peers/connections (ie we have no connections at all) at the beginning of IBD we might need to utilize DNS seeds to learn of potential peers.</p>
<p>edit: Thanks to lightlike for pointing out this <a href="https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L5539-L5547" rel="nofollow noreferrer">comment</a> in the Bitcoin Core code on IBD usually only being done with outbound peers</p>
<blockquote>
<p>If we don't have any outbound
peers, or if we aren't downloading any blocks from such peers, then
allow block downloads from this peer, too. We prefer downloading
blocks from outbound peers to avoid putting undue load on (say) some
home user who is just making outbound connections to the network, but
if our only source of the latest blocks is from an inbound peer, we
have to be sure to eventually download it (and not just wait
indefinitely for an outbound peer to have it).</p>
</blockquote>

CC BY-SA 4.0
2023-12-17T05:17:46.540Z
I see you use the term "outbound" instead of "outgoing" and "inbound" instead of "incoming", are those actually the standard terms used in the Bitcoin world and not "incoming" and "outgoing"?
Cosmos
CC BY-SA 4.0
2023-12-17T10:43:25.613Z
@MudjaAdum there are no standards because there is no real standardizing body. Nor should there be. There are commonly used terms but I find there is a great deal of variation and ambiguity. The variations you ask about both seem common usage to me.
RedGrittyBrick
CC BY-SA 4.0
2023-12-19T01:12:57.590Z
IBD is usually only done with outbound peers, only in some rare situations (see https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L5539-L5547 for an explanation) inbound peers are used.
Lightlike
CC BY-SA 4.0
2023-12-19T14:56:51.327Z
A node will generally not get any inbound connections before it is fully synced. @Lightlike: Do I remember correctly that our node will announce new transactions from its own wallet only to outbound connections?
Murch
CC BY-SA 4.0
2023-12-19T15:41:11.533Z
@Murch: Yes, we don't actively advertise our address while in IBD, so inbound peers are less likely to happen. But if they do know about our address for some reason, we don't prevent them from connecting.
I don't think that we distinguish between in and outbounds when broadcasting wallet transactions.
Lightlike
CC BY-SA 4.0
2023-12-17T04:23:40.450Z
2023-12-19T14:32:08.990Z
2023-12-19T14:32:08.990Z
Michael Folkson
<p>Why do we have two types of connections, outgoing and incoming? What is the purpose of one and the other? Are outgoing connections the ones where <strong>we notify</strong> of new blocks/transactions, while incoming connections are the ones where <strong>they notify us</strong> of new blocks/transactions?</p>
<p>When we do the initial synchronization (IBD) or completely randomly want to ask about a block or transaction or something third, is it done with outgoing connections or incoming connections?</p>

<terminology><p2p><peers>
What are outgoing and incoming connections and what is the difference between them?
Cosmos
# What are outgoing and incoming connections and what is the difference between them?

(Asked by: username_0 on 2023-12-17)

Why do we have two types of connections, outgoing and incoming? What is the purpose of one and the other? Are outgoing connections the ones where **we notify** of new blocks/transactions, while incoming connections are the ones where **they notify us** of new blocks/transactions?

When we do the initial synchronization (IBD) or completely randomly want to ask about a block or transaction or something third, is it done with outgoing connections or incoming connections?

**Tags:** terminology, p2p, peers


---

## 2 answers

### Answer by username_2 on 2023-12-17. Score: 4 | Accepted answer

There's a overlap with this [post](https://bitcoin.stackexchange.com/questions/42286/what-is-the-difference-between-inbound-and-outbound-connections) and others but I'll try to directly correct a couple of things here.

> Why do we have two types of connections, outgoing and incoming?

To risk stating the obvious sometimes our node will make a request to connect to another node (**outbound**) whilst other times a node will make a request to connect to our node (**inbound**). In a healthy peer to peer (P2P) protocol you can't really avoid having both outgoing and incoming requests. The extent to which outbound and inbound connections are treated differently by your full node is a more interesting question. These Bitcoin Core PR review club [notes](https://bitcoincore.reviews/22778) (June 8th 2022) on inbound block-relay-only connections stated:

> Once the connection is established, the relationship is largely symmetric (the protocol works the same in both directions), although we treat outbound peers with some preference.

If you are concerned about malicious full nodes you might have some trusted or semi trusted full nodes you choose to connect to (outbound) whilst presumably all inbound connection requests are from nodes you know very little about.

> Are outgoing connections the ones where we notify of new blocks/transactions, while incoming connections are the ones where they notify us of new blocks/transactions?

No, both outbound and inbound connections can notify your node of new blocks and transactions and vice versa. That PR review club I referred to does discuss block-relay-only peers which is where you decide to only relay blocks to certain peers and not transactions, IP addresses. Inbound connections can also indicate they don't want to receive transactions etc.

> When we do the initial synchronization (IBD) or completely randomly want to ask about a block or transaction or something third, is it done with outgoing connections or incoming connections?

Both. If we aren't aware of any peers/connections (ie we have no connections at all) at the beginning of IBD we might need to utilize DNS seeds to learn of potential peers.

edit: Thanks to username_4 for pointing out this [comment](https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L5539-L5547) in the Bitcoin Core code on IBD usually only being done with outbound peers

> If we don't have any outbound
> peers, or if we aren't downloading any blocks from such peers, then
> allow block downloads from this peer, too. We prefer downloading
> blocks from outbound peers to avoid putting undue load on (say) some
> home user who is just making outbound connections to the network, but
> if our only source of the latest blocks is from an inbound peer, we
> have to be sure to eventually download it (and not just wait
> indefinitely for an outbound peer to have it).

> **Comments:**
> **username_0**: I see you use the term "outbound" instead of "outgoing" and "inbound" instead of "incoming", are those actually the standard terms used in the Bitcoin world and not "incoming" and "outgoing"?  
> **username_3**: @MudjaAdum there are no standards because there is no real standardizing body. Nor should there be. There are commonly used terms but I find there is a great deal of variation and ambiguity. The variations you ask about both seem common usage to me.  
> **username_4**: IBD is usually only done with outbound peers, only in some rare situations (see https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp#L5539-L5547 for an explanation) inbound peers are used.  
> **username_5**: A node will generally not get any inbound connections before it is fully synced. @username_4: Do I remember correctly that our node will announce new transactions from its own wallet only to outbound connections?  
> **username_4**: @username_5: Yes, we don't actively advertise our address while in IBD, so inbound peers are less likely to happen. But if they do know about our address for some reason, we don't prevent them from connecting. I don't think that we distinguish between in and outbounds when broadcasting wallet transactions.  

---

### Answer by username_1 on 2024-11-02. Score: 0

btccore won't list any incoming connections until it's synched. But the network config plays a large part in that. The log file will probably show if there are attempts to connect as incoming that are failing for some reason, but I've found the solution can be as simple as using my 5G phone instead of whatever you're using for a wan interface. btccore usually takes somewhat longer (< an hour) after startup, and you have to have the "allow incoming network connections" flag on. Having trouble with this with LTC but I expect because LTC syncs so much faster than BTC.


---

