11

I have port 8333 open with 8 outbound and 2 inbound connections.

Is my node transmitting and receiving transactions and blocks from both types of connections? Or does the "inbound" flag mean I am just downloading from that peer, and not sending any information back?

If, for the sake of saving RAM, I set maxconnections to 8, will they all be outbound? Even if port 8333 is open? In this configuration, is my node still "helping" the network?

pinhead
  • 4,932
  • 2
  • 23
  • 38
  • 4
    To the best of my understanding: Inbound means the remote peer initiated the connection to you. Outbound means you made the connection to a remote peer. This is just diagnostic info and doesn't affect behavior. Transactions and blocks can flow in both directions with any peer - unless the peer has the [relay bit](https://en.bitcoin.it/wiki/Protocol_documentation#version) set to off. – Nayuki Jan 12 '16 at 01:08
  • @NayukiMinase: Feel free to post that as an answer! :) – Murch Jan 12 '16 at 19:12
  • I feel that what I wrote doesn't provide objective evidence to support the statements, and I haven't answered all parts of the OP's question... – Nayuki Jan 13 '16 at 04:22

1 Answers1

4

If your node initiated the connection, it's outbound, otherwise it's inbound. Nodes will send and receive data from both types of connections exactly the same way.

maxconnections sets a limit on the total number of connections, so if you set it to eight, your node will probably initiate connections to other eight nodes before any node can initiate a connection to it.

Keep in mind that according to this forum post, each open connection will take only a few kilobytes of RAM, so reducing the number of connections might not save all that much of memory.

EDIT: By running a full node that has no slots for incoming connections, you act as a leecher, and you do more bad than good for the Bitcoin network, as Gavin Andresen said on Reddit. You would help the network if you allowed a few inbound connections. As discussed earlier, that's unlikely to take up any significant amount of RAM.

  • 1
    `By running a full node, you still help the network, even if your node has no slot for incoming connections.` How? If nothing is using you're node as a trusted source of data, you're just relaying blocks and transactions. More peers, however, means more hops and more validation, which means slower propagation times for both transactions and blocks. – morsecoder Jan 25 '16 at 14:59
  • 1
    @StephenM347 you are correct. I did some extra research and confirmed what you said. Edited the answer, thanks. – Wladston Ferreira Filho Jan 25 '16 at 17:42
  • 1
    Why would you automatically be a leecher just because you don't accept inbound connections? Don't honest full nodes send and receive data regardless of who made the connection (outbound or inbound)? – B T Jun 03 '19 at 01:07