dash/src
Wladimir J. van der Laan 56545f2cfd
Merge #19670: Protect localhost and block-relay-only peers from eviction
752e6ad5336d5af0db9fe16d24c0c6aa25b74a3f Protect localhost and block-relay-only peers from eviction (Suhas Daftuar)

Pull request description:

  Onion peers are disadvantaged under our eviction criteria, so prevent eventual
  eviction of them in the presence of contention for inbound slots by reserving
  some slots for localhost peers (sorted by longest uptime).

  Block-relay-only connections exist as a protection against eclipse attacks, by
  creating a path for block propagation that may be unknown to adversaries.
  Protect against inbound peer connection slot attacks from disconnecting such
  peers by attempting to protect up to 8 peers that are not relaying transactions
  but have provided us with blocks.

  Thanks to gmaxwell for suggesting these strategies.

ACKs for top commit:
  laanwj:
    Code review ACK 752e6ad5336d5af0db9fe16d24c0c6aa25b74a3f

Tree-SHA512: dbf089c77c1f747aa1dbbbc2e9c2799c628028b0918d0c336d8d0e5338acedd573b530eb3b689c7f603a17221e557268a9f5c3f585f204bfb12e5d2e76de39a3
2024-01-22 19:44:37 -06:00
..
bench Merge #19710: bench: Prevent thread oversubscription and decreases the variance of result values 2024-01-22 19:44:36 -06:00
bls chore: Post v19 cleanup (#5622) 2023-10-19 11:33:44 -05:00
coinjoin refactor: split llmq/utils to Quorum Calculation and llmq/options (#5790) 2024-01-17 19:56:41 -06:00
compat Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
config
consensus Merge #19620: Add txids with non-standard inputs to reject filter 2024-01-19 10:34:32 -06:00
crc32c
crypto Merge #19403: build: improve __builtin_clz* detection 2024-01-16 15:05:08 -06:00
dashbls
evo refactor: split llmq/utils to Quorum Calculation and llmq/options (#5790) 2024-01-17 19:56:41 -06:00
governance refactor: split llmq/utils to Quorum Calculation and llmq/options (#5790) 2024-01-17 19:56:41 -06:00
gsl refactor: re-order headers and forward declarations to improve compile time (#5693) 2023-11-17 10:04:18 -06:00
immer
index Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00
interfaces Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00
leveldb Merge bitcoin/bitcoin#24461: build: Minor leveldb subtree update 2023-12-07 09:14:57 -06:00
llmq fix: make llmq_test_instantsend great again (#5832) 2024-01-19 09:14:04 -06:00
logging
masternode Merge #19331: build: Do not include server symbols in wallet 2024-01-10 12:06:05 -06:00
node Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00
policy Merge #20787: Use C++17 std::array deduction for OUTPUT_TYPES, ALL_FEE_ESTIMATE_HORIZONS 2024-01-16 07:57:34 -06:00
primitives Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
qt Merge bitcoin-core/gui#609: wallet, refactor: Drop unused WalletModel::PaymentRequestExpired 2024-01-19 11:02:22 -06:00
rpc feat: new rpc getrawtransactionmulti (#5839) 2024-01-22 19:33:24 -06:00
script Merge #17938: Disallow automatic conversion between disparate hash types 2024-01-16 15:05:08 -06:00
secp256k1 merge bitcoin#27479: BIP324: ElligatorSwift integrations 2023-11-21 07:59:03 -06:00
support Merge #15704: Move Win32 defines to configure.ac to ensure they are globally defined 2024-01-10 19:22:58 -06:00
test Merge bitcoin#18044: Use wtxid for transaction relay 2024-01-22 19:44:33 -06:00
univalue
util Merge bitcoin/bitcoin#24871: refactor: Simplify GetTime 2024-01-19 11:02:21 -06:00
wallet Merge #18244: rpc: fundrawtransaction and walletcreatefundedpsbt also lock manually selected coins 2024-01-22 19:44:36 -06:00
zmq refactor: drop circular dependency validationinterface <-> governance/object 2023-12-21 23:04:43 -06:00
.clang-format
addrdb.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
addrdb.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
addressindex.cpp refactor: consolidate P2PK{H} types to P2PK_OR_P2PKH 2023-09-25 22:57:42 +05:30
addressindex.h refactor: consolidate P2PK{H} types to P2PK_OR_P2PKH 2023-09-25 22:57:42 +05:30
addrman.cpp Merge bitcoin/bitcoin#25303: refactor: Remove redundant addrman time checks 2024-01-19 11:02:23 -06:00
addrman.h Merge bitcoin/bitcoin#21129: fuzz: check that ser+unser produces the same AddrMan 2024-01-01 17:48:13 -06:00
amount.h Merge #15054: Update copyright headers to 2018 2023-12-06 11:40:14 -06:00
arith_uint256.cpp Merge bitcoin/bitcoin#24077: util: Make base_uint::GetHex() and base_uint::SetHex() not depend on uint256 2024-01-02 11:17:48 -06:00
arith_uint256.h Merge bitcoin/bitcoin#24854: Remove not needed ArithToUint256 roundtrips in tests 2024-01-13 19:32:31 -06:00
attributes.h
banman.cpp Merge bitcoin/bitcoin#24168: Fix some race conditions in BanMan::DumpBanlist() 2024-01-13 19:32:30 -06:00
banman.h merge bitcoin#22570: Ignore banlist.dat 2023-09-24 09:50:50 -05:00
base58.cpp Merge #19739: refactor: remove c-string interfaces for DecodeBase58{Check} 2024-01-10 19:22:58 -06:00
base58.h Merge #19739: refactor: remove c-string interfaces for DecodeBase58{Check} 2024-01-10 19:22:58 -06:00
batchedlogger.cpp
batchedlogger.h
bech32.cpp
bech32.h
bip39_english.h
bip39.cpp
bip39.h
bitcoin-cli.cpp Merge #19004: refactor: Replace const char* to std::string 2024-01-09 08:13:04 -06:00
bitcoin-tx.cpp partial bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-11-21 07:59:03 -06:00
bitcoin-wallet.cpp partial bitcoin#26691: Update secp256k1 subtree to libsecp256k1 version 0.2.0 2023-11-21 07:59:03 -06:00
bitcoind.cpp Merge #19331: build: Do not include server symbols in wallet 2024-01-10 12:06:05 -06:00
blockencodings.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
blockencodings.h
blockfilter.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
blockfilter.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
bloom.cpp refactor: make GetTxPayload return an Optional T instead of taking in a T& return (#5733) 2024-01-11 21:43:01 -06:00
bloom.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
cachemap.h
cachemultimap.h
chain.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
chain.h Merge bitcoin/bitcoin#13875: [doc] nChainTx needs to become a 64-bit earlier due to SegWit 2023-12-26 22:26:19 -06:00
chainparams.cpp Merge #19316: [net] Cleanup logic around connection types 2024-01-09 08:15:35 -06:00
chainparams.h refactor: split llmq/utils to Quorum Calculation and llmq/options (#5790) 2024-01-17 19:56:41 -06:00
chainparamsbase.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
chainparamsbase.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
chainparamsseeds.h chore: update mainnet seeds 2023-11-13 10:13:12 -06:00
checkqueue.h
clientversion.cpp feat: Set client version for non-release binaries and version in guix based on git tags (#5653) 2024-01-11 21:43:42 -06:00
clientversion.h
coins.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
coins.h Merge bitcoin/bitcoin#22263: refactor: wrap CCoinsViewCursor in unique_ptr 2023-12-03 20:45:01 -06:00
compat.h Merge #15704: Move Win32 defines to configure.ac to ensure they are globally defined 2024-01-10 19:22:58 -06:00
compressor.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
compressor.h merge bitcoin#23413: Replace MakeSpan helper with Span deduction guide 2023-09-24 09:50:50 -05:00
context.h
core_io.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
core_memusage.h
core_read.cpp Merge #19004: refactor: Replace const char* to std::string 2024-01-09 08:13:04 -06:00
core_write.cpp refactor: make GetTxPayload return an Optional T instead of taking in a T& return (#5733) 2024-01-11 21:43:01 -06:00
ctpl_stl.h
cuckoocache.h
cxxtimer.hpp
dash-cli-res.rc
dash-tx-res.rc
dash-wallet-res.rc
dashd-res.rc
dbwrapper.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
dbwrapper.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
deploymentinfo.cpp Merge bitcoin/bitcoin#19438: Introduce deploymentstatus 2023-12-01 09:08:50 -06:00
deploymentinfo.h Merge bitcoin/bitcoin#19438: Introduce deploymentstatus 2023-12-01 09:08:50 -06:00
deploymentstatus.cpp Merge bitcoin/bitcoin#19438: Introduce deploymentstatus 2023-12-01 09:08:50 -06:00
deploymentstatus.h refactor: move out helper IsDIP3Enforced from deterministicmns 2023-12-21 23:02:31 -06:00
dsnotificationinterface.cpp refactor: rename CJClientManager 2024-01-10 12:06:01 -06:00
dsnotificationinterface.h fix: should not notify about mnlist changes while ConnectBlock isn't done yet (#5711) 2023-11-16 12:36:46 -06:00
dummywallet.cpp refactor: rename CJClientManager 2024-01-10 12:06:01 -06:00
flat-database.h merge bitcoin#19326: Simplify hash.h interface using Spans 2023-09-24 09:50:50 -05:00
flatfile.cpp Merge #21041: log: Move "Pre-allocating up to position 0x[…] in […].dat" log message to debug category 2023-12-03 20:44:56 -06:00
flatfile.h
fs.cpp Merge #20932: refactor: Replace fs::absolute calls with AbsPathJoin calls 2023-12-08 21:16:00 +03:00
fs.h Merge #20932: refactor: Replace fs::absolute calls with AbsPathJoin calls 2023-12-08 21:16:00 +03:00
hash.cpp merge bitcoin#23115: use Span instead of std::vector for insert and contains 2023-09-24 09:50:50 -05:00
hash.h merge bitcoin#19326: Simplify hash.h interface using Spans 2023-09-24 09:50:50 -05:00
hdchain.cpp merge bitcoin#23409: Take Span in SetSeed 2023-09-24 09:50:50 -05:00
hdchain.h Merge bitcoin/bitcoin#25017: validation: make CScriptCheck and prevector swap members noexcept 2024-01-13 19:32:32 -06:00
httprpc.cpp
httprpc.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
httpserver.cpp Merge bitcoin/bitcoin#23607: rpc: Pass const char* to evhttp_connection_get_peer for new libevent 2024-01-13 19:32:29 -06:00
httpserver.h
i2p.cpp
i2p.h
indirectmap.h
init.cpp refactor: split llmq/utils to Quorum Calculation and llmq/options (#5790) 2024-01-17 19:56:41 -06:00
init.h partial Merge bitcoin/bitcoin#25233: compat: remove glibcxx sanity checks 2023-11-07 07:44:05 -06:00
key_io.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
key_io.h
key.cpp Merge bitcoin/bitcoin#22836: Stricter BIP32 decoding and test vector 5 2023-12-26 22:26:18 -06:00
key.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
limitedmap.h
logging.cpp Merge bitcoin/bitcoin#22530: log: sort logging categories alphabetically 2023-12-03 20:25:16 -06:00
logging.h Merge bitcoin/bitcoin#22530: log: sort logging categories alphabetically 2023-12-03 20:25:16 -06:00
Makefile.am refactor: split llmq/utils to Quorum Calculation and llmq/options (#5790) 2024-01-17 19:56:41 -06:00
Makefile.bench.include merge bitcoin#27479: BIP324: ElligatorSwift integrations 2023-11-21 07:59:03 -06:00
Makefile.crc32c.include Merge bitcoin/bitcoin#23082: build: improve gexauxval() detection, remove getauxval() weak linking 2023-10-31 08:40:25 -05:00
Makefile.leveldb.include
Makefile.qt_locale.include
Makefile.qt.include Merge bitcoin-core/gui#14: scripted-diff: rename movie folder to animation 2024-01-19 10:34:31 -06:00
Makefile.qttest.include
Makefile.test_fuzz.include
Makefile.test_util.include Merge bitcoin/bitcoin#26153: Reduce wasted pseudorandom bytes in ChaCha20 + various improvements 2023-11-19 10:20:12 -06:00
Makefile.test.include Merge bitcoin/bitcoin#24715: build, test: Fix test logfile name 2024-01-01 17:48:20 -06:00
Makefile.univalue.include
mapport.cpp
mapport.h Merge bitcoin/bitcoin#26896: build: Remove port-forwarding runtime setting options from configure 2023-12-03 20:01:26 -06:00
memusage.h
merkleblock.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
merkleblock.h
messagesigner.cpp
messagesigner.h
miner.cpp Merge bitcoin/bitcoin#24934: refactor, miner: Delete call to UpdatePackagesForAdded at beginning of addPackageTxs 2024-01-19 11:02:22 -06:00
miner.h refactor: drop global variable fDIP0001ActiveAtTip - partial implementation 2023-12-21 23:02:31 -06:00
net_permissions.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
net_permissions.h Merge bitcoin/bitcoin#21644: p2p, bugfix: use NetPermissions::HasFlag() in CConnman::Bind() 2023-12-03 20:44:58 -06:00
net_processing.cpp Merge #19569: Enable fetching of orphan parents from wtxid peers 2024-01-22 19:44:36 -06:00
net_processing.h refactor: moved net Object's helpers from net_processing to net.h 2024-01-10 15:12:06 -06:00
net_types.h refactor: new helpers in net_processing for external handlers 2024-01-10 15:12:05 -06:00
net.cpp Merge #19670: Protect localhost and block-relay-only peers from eviction 2024-01-22 19:44:37 -06:00
net.h Merge bitcoin#18044: Use wtxid for transaction relay 2024-01-22 19:44:33 -06:00
netaddress.cpp merge bitcoin#23413: Replace MakeSpan helper with Span deduction guide 2023-09-24 09:50:50 -05:00
netaddress.h Merge bitcoin/bitcoin#22881: doc: provide context for CNetAddr::UnserializeV1Array() and span.h with lifetimebound 2023-12-26 22:26:19 -06:00
netbase.cpp Merge bitcoin/bitcoin#22052: net: remove non-blocking bool from interface 2024-01-02 11:17:48 -06:00
netbase.h Merge bitcoin/bitcoin#22052: net: remove non-blocking bool from interface 2024-01-02 11:17:48 -06:00
netfulfilledman.cpp refactor: decouple db hooks from CFlatDB-based C*Manager objects, migrate to *Store structs (#5555) 2023-09-24 09:50:21 -05:00
netfulfilledman.h refactor: decouple db hooks from CFlatDB-based C*Manager objects, migrate to *Store structs (#5555) 2023-09-24 09:50:21 -05:00
netmessagemaker.h
noui.cpp Merge #19331: build: Do not include server symbols in wallet 2024-01-10 12:06:05 -06:00
noui.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
outputtype.cpp
outputtype.h
pow.cpp
pow.h
prevector.h Merge bitcoin/bitcoin#24962: prevector: enforce is_trivially_copyable_v 2024-01-14 11:05:36 -06:00
protocol.cpp refactor: deprecate non-deterministic IS support (#5553) 2023-11-20 10:17:04 -06:00
protocol.h Merge #19569: Enable fetching of orphan parents from wtxid peers 2024-01-22 19:44:36 -06:00
psbt.cpp fix: follow-up bitcoin#15638 to move AnalyzePSBT related code 2024-01-10 12:05:57 -06:00
psbt.h fix: follow-up bitcoin#15638 to move AnalyzePSBT related code 2024-01-10 12:05:57 -06:00
pubkey.cpp Merge bitcoin/bitcoin#22836: Stricter BIP32 decoding and test vector 5 2023-12-26 22:26:18 -06:00
pubkey.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
random.cpp Merge #18781: Add templated GetRandDuration<> 2023-12-05 12:47:47 -06:00
random.h Merge #18781: Add templated GetRandDuration<> 2023-12-05 12:47:47 -06:00
randomenv.cpp Merge bitcoin/bitcoin#23082: build: improve gexauxval() detection, remove getauxval() weak linking 2023-10-31 08:40:25 -05:00
randomenv.h
rest.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
reverse_iterator.h
saltedhasher.cpp
saltedhasher.h
scheduler.cpp Merge bitcoin/bitcoin#25040: refactor: Pass lifetimebound reference to SingleThreadedSchedulerClient 2024-01-13 23:09:41 -06:00
scheduler.h Merge bitcoin/bitcoin#25040: refactor: Pass lifetimebound reference to SingleThreadedSchedulerClient 2024-01-13 23:09:41 -06:00
serialize.h
shutdown.cpp Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00
shutdown.h
source_location.h refactor: add gsl::not_null to get compile time / run time pointer guarantees (#5595) 2023-10-22 09:14:30 -05:00
span.h Merge bitcoin/bitcoin#22881: doc: provide context for CNetAddr::UnserializeV1Array() and span.h with lifetimebound 2023-12-26 22:26:19 -06:00
spentindex.h refactor: make AddressType a strong enum, remove uint8_t for address_type 2023-09-25 22:57:42 +05:30
spork.cpp refactor: spork no more depends on net_processing 2024-01-10 15:12:06 -06:00
spork.h refactor: spork no more depends on net_processing 2024-01-10 15:12:06 -06:00
stacktraces.cpp
stacktraces.h
statsd_client.cpp
statsd_client.h
streams.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
sync.cpp
sync.h Merge #20495: sync: Use decltype(auto) return type for WITH_LOCK 2024-01-16 07:57:35 -06:00
threadinterrupt.cpp Merge bitcoin/bitcoin#24974: refactor: Make FEELER_SLEEP_WINDOW type safe (std::chrono) 2023-10-31 08:40:25 -05:00
threadinterrupt.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
threadsafety.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
timedata.cpp Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00
timedata.h
timestampindex.h refactor: add missing headers to {address,timestamp}index 2023-09-25 22:57:41 +05:30
tinyformat.h
torcontrol.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
torcontrol.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
txdb.cpp Merge #19331: build: Do not include server symbols in wallet 2024-01-10 12:06:05 -06:00
txdb.h Merge bitcoin/bitcoin#22263: refactor: wrap CCoinsViewCursor in unique_ptr 2023-12-03 20:45:01 -06:00
txmempool.cpp Merge #20944: rpc: Return total fee in getmempoolinfo 2024-01-16 09:29:49 -06:00
txmempool.h Merge #20944: rpc: Return total fee in getmempoolinfo 2024-01-16 09:29:49 -06:00
uint256.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
uint256.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
undo.h
unordered_lru_cache.h
validation.cpp Merge bitcoin#18044: Use wtxid for transaction relay 2024-01-22 19:44:33 -06:00
validation.h Merge bitcoin/bitcoin#25017: validation: make CScriptCheck and prevector swap members noexcept 2024-01-13 19:32:32 -06:00
validationinterface.cpp Merge bitcoin/bitcoin#25040: refactor: Pass lifetimebound reference to SingleThreadedSchedulerClient 2024-01-13 23:09:41 -06:00
validationinterface.h Merge #18982: wallet: Minimal fix to restore conflicted transaction notifications 2024-01-10 12:07:53 -06:00
version.h chore: Post v19 cleanup (#5622) 2023-10-19 11:33:44 -05:00
versionbits.cpp Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
versionbits.h Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
walletinitinterface.h refactor: rename CJClientManager 2024-01-10 12:06:01 -06:00
warnings.cpp Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00
warnings.h Merge #19233: Make SetMiscWarning() accept bilingual_str argument 2024-01-16 15:05:05 -06:00