Thank you for all the suggestions. I think I pulled together those that work best for. Here is how I am setting up my bitcoin.conf:
maxconnections=8 // no more than the 8 outbound connections my node will attempt
addnode=123.123.123.123 // my external node that I am sure it will always be up
addnode-122.122.122.122 // some node geographically close to me with an up-to-date block height (maybe repeat this step)
peerbloomfilters=0 // disable SPV clients from doing block filtering
blockfilterindex=0 // I think this is unnecessary because it's the default, but just making sure
Setting a low with -maxuploadtarget won't work for me because my application will broadcast many transactions (possibly new to the network), so it's very important that these broadcasts are done properly.
I also don't want to prune because I need the whole tx history.
@JuleAdka suggestion seems interesting. I took a look at BIP 159 (
https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki) which introduced NODE_NETWORK_LIMITED. Disabling NODE_NETWORK might be a good way to make sure nobody tries to download historical blocks from my node. Is there a way to disable this service flag? Searched through the options and didn't find a way to do it (bitcoind --help | grep "service").
You have way to compile the code? If yes, you can open the "init.cpp" file, and change the line 878 (Core-0.20.0)
from:
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED);
to:
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK_LIMITED);
But, you probably had seen in BIP159 that your node still will send the most recent blocks (the BIP says 288)
Edit: Newbie question, how add code in the wiki's markdown?