Skip to content

Commit 621e86e

Browse files
committed
Update -blocksonly documentation
When -blocksonly is set to 1, it interacts with the -walletbroadcast parameter and sets it to 0 if it has not been set already.This behavior is not captured by the current documentation, which claims that -blocksonly does not impact any wallet transactions. Update the max number of outgoing peers from 8 to 10, due to the addition of two -blocksonly peers.
1 parent 3a8d250 commit 621e86e

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

doc/reduce-memory.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ The size of some in-memory caches can be reduced. As caches trade off memory usa
2424

2525
## Number of peers
2626

27-
- `-maxconnections=<n>` - the maximum number of connections, this defaults to `125`. Each active connection takes up some memory. Only significant if incoming
28-
connections are enabled, otherwise the number of connections will never be more than `8`.
27+
- `-maxconnections=<n>` - the maximum number of connections, this defaults to `125`. Each active connection takes up some memory. Only significant if incoming connections are enabled, otherwise the number of connections will never be more than `10`. Of the 10 outbound peers, there can be 8 full outgoing connections and 2 -blocksonly peers, in which case they are block/addr peers, but not tx peers.
2928

3029
## Thread configuration
3130

doc/reduce-traffic.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ Reduce Traffic
33

44
Some node operators need to deal with bandwidth caps imposed by their ISPs.
55

6-
By default, Bitcoin Core allows up to 125 connections to different peers, 8 of
7-
which are outbound. You can therefore, have at most 117 inbound connections.
6+
By default, Bitcoin Core allows up to 125 connections to different peers, 10 of
7+
which are outbound. You can therefore, have at most 115 inbound connections.
8+
Of the 10 outbound peers, there can be 8 full outgoing connections and 2 with
9+
the -blocksonly mode turned on. You can therefore, have at most 115 inbound connections.
810

911
The default settings can result in relatively significant traffic consumption.
1012

@@ -26,7 +28,7 @@ calculating the target.
2628

2729
## 2. Disable "listening" (`-listen=0`)
2830

29-
Disabling listening will result in fewer nodes connected (remember the maximum of 8
31+
Disabling listening will result in fewer nodes connected (remember the maximum of 10
3032
outbound peers). Fewer nodes will result in less traffic usage as you are relaying
3133
blocks and transactions to fewer nodes.
3234

@@ -44,7 +46,11 @@ with other peers, you can disable transaction relay.
4446
Be reminded of the effects of this setting.
4547

4648
- Fee estimation will no longer work.
47-
- Not relaying other's transactions could hurt your privacy if used while a
48-
wallet is loaded or if you use the node to broadcast transactions.
49+
- It sets the flag "-walletbroadcast" to be "0", only if it is currently unset.
50+
Doing so disables the automatic broadcasting of transactions from wallet. Not
51+
relaying other's transactions could hurt your privacy if used while a wallet
52+
is loaded or if you use the node to broadcast transactions.
53+
- If a peer is whitelisted and "-whitelistforcerelay" is set to "1" (which will
54+
also set "whitelistrelay" to "1"), we will still receive and relay their transactions.
4955
- It makes block propagation slower because compact block relay can only be
5056
used when transaction relay is enabled.

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void SetupServerArgs()
371371
gArgs.AddArg("-blocknotify=<cmd>", "Execute command when the best block changes (%s in cmd is replaced by block hash)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
372372
#endif
373373
gArgs.AddArg("-blockreconstructionextratxn=<n>", strprintf("Extra transactions to keep in memory for compact block reconstructions (default: %u)", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
374-
gArgs.AddArg("-blocksonly", strprintf("Whether to reject transactions from network peers. Transactions from the wallet, RPC and relay whitelisted inbound peers are not affected. (default: %u)", DEFAULT_BLOCKSONLY), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
374+
gArgs.AddArg("-blocksonly", strprintf("Whether to reject transactions from network peers. Automatic broadcast and rebroadcast of any transactions from inbound peers is disabled, unless '-whitelistforcerelay' is '1', in which case whitelisted peers' transactions will be relayed. RPC transactions are not affected. (default: %u)", DEFAULT_BLOCKSONLY), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
375375
gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
376376
gArgs.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
377377
gArgs.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);

0 commit comments

Comments
 (0)