Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1Reduce Traffic2==============4Some node operators need to deal with bandwidth caps imposed by their ISPs.6By default, Bitcoin Core allows up to 200 connections to different peers, 11 of7which are outbound. You can therefore, have at most 189 inbound connections, half of8which can only be taken up by low-traffic block-relay-only peers.9Of the 11 outbound peers, there can be 8 full-relay connections, 210block-relay-only ones and occasionally 1 short-lived feeler or an extra block-relay-only connection.12The default settings can result in relatively significant traffic consumption.14Ways to reduce traffic:16## 1. Use `-maxuploadtarget=<MiB per day>`18A major component of the traffic is caused by serving historic blocks to other nodes19during the initial blocks download phase (syncing up a new node).20This option can be specified in MiB per day and is turned off by default.21This is *not* a hard limit; only a threshold to minimize the outbound22traffic. When the limit is about to be reached, the uploaded data is cut by no23longer serving historic blocks (blocks older than one week).24Keep in mind that new nodes require other nodes that are willing to serve25historic blocks.27Peers with the `download` permission will never be disconnected, although their traffic counts for28calculating the target.30## 2. Disable "listening" (`-listen=0`)32Disabling listening will result in fewer nodes connected (remember the maximum of 1133outbound peers). Fewer nodes will result in less traffic usage as you are relaying34blocks and transactions to fewer nodes.36## 3. Reduce maximum connections (`-maxconnections=<num>`)38Reducing the maximum connected nodes to a minimum could be desirable if traffic39limits are tiny. Keep in mind that bitcoin's trustless model works best if you are40connected to a handful of nodes.42## 4. Turn off transaction relay (`-blocksonly`)44Forwarding transactions to peers increases the P2P traffic. To only sync blocks45with other peers, you can disable transaction relay.47Be reminded of the effects of this setting.49- Fee estimation will no longer work.50- It sets the flag "-walletbroadcast" to be "0", only if it is currently unset.51Doing so disables the automatic broadcasting of transactions from wallet. Not52relaying other's transactions could hurt your privacy if used while a wallet53is loaded or if you use the node to broadcast transactions.54- If a peer has the forcerelay permission, we will still receive and relay55their transactions.56- It makes block propagation slower because compact block relay can only be57used when transaction relay is enabled.
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.