0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-08 14:34:53 -05:00
bitcoin-core/src
Ava Chow 0b768746ef
Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags
27f260aa6e net: remove now unused global 'g_initial_block_download_completed' (furszy)
aff7d92b15 test: add coverage for peerman adaptive connections service flags (furszy)
6ed53602ac net: peer manager, dynamically adjust desirable services flag (furszy)
9f36e591c5 net: move state dependent peer services flags (furszy)
f9ac96b8d6 net: decouple state independent service flags from desirable ones (furszy)
97df4e3887 net: store best block tip time inside PeerManager (furszy)

Pull request description:

  Derived from #28120 discussion.

  By relocating the peer desirable services flags into the peer manager, we
  allow the connections acceptance process to handle post-IBD potential
  stalling scenarios.

  The peer manager will be able to dynamically adjust the services flags
  based on the node's proximity to the tip (back and forth). Allowing the node
  to recover from the following post-IBD scenario:
  Suppose the node has successfully synced the chain, but later experienced
  dropped connections and remained inactive for a duration longer than the limited
  peers threshold (the timeframe within which limited peers can provide blocks). In
  such cases, upon reconnecting to the network, the node might only establish
  connections with limited peers, filling up all available outbound slots. Resulting
  in an inability to synchronize the chain (because limited peers will not provide
  blocks older than the `NODE_NETWORK_LIMITED_MIN_BLOCKS` threshold).

ACKs for top commit:
  achow101:
    ACK 27f260aa6e
  vasild:
    ACK 27f260aa6e
  naumenkogs:
    ACK 27f260aa6e
  mzumsande:
    Light Code Review ACK 27f260aa6e
  andrewtoth:
    ACK 27f260aa6e

Tree-SHA512: 07befb9bcd0b60a4e7c45e4429c02e7b6c66244f0910f4b2ad97c9b98258b6f46c914660a717b5ed4ef4814d0dbfae6e18e6559fe9bec7d0fbc2034109200953
2024-01-31 11:44:41 -05:00
..
bench Merge bitcoin/bitcoin#26684: bench: add readblock benchmark 2024-01-02 11:12:32 -05:00
common settings: add auto-generated warning msg for editing the file manually 2024-01-22 10:50:03 -03:00
compat
config
consensus
crc32c
crypto Merge bitcoin/bitcoin#29180: crypto: remove use of BUILD_BITCOIN_INTERNAL macro in sha256 2024-01-26 18:56:41 -05:00
index refactor: Remove calls to StartShutdown from KernelNotifications 2023-12-04 15:39:15 -04:00
init doc: add unconditional info loglevel following merge of PR 28318 2024-01-11 11:01:28 -06:00
interfaces Merge bitcoin/bitcoin#28890: rpc: Remove deprecated -rpcserialversion 2024-01-05 10:42:10 +00:00
ipc multiprocess: Add type conversion code for UniValue types 2023-11-28 12:35:50 -05:00
kernel [log] mempool loading 2024-01-12 13:48:02 +00:00
leveldb
logging
minisketch
node Merge bitcoin/bitcoin#29308: doc: update BroadcastTransaction comment 2024-01-30 12:09:52 +00:00
policy Merge bitcoin/bitcoin#29013: test: doc: follow-up #28368 2024-01-03 11:23:27 +00:00
primitives Merge bitcoin/bitcoin#28766: Improve peformance of CTransaction::HasWitness (28107 follow-up) 2023-11-28 08:44:41 -05:00
qt Merge bitcoin-core/gui#789: Avoid non-self-contained Windows header 2024-01-26 20:40:46 +00:00
rpc Merge bitcoin/bitcoin#24748: test/BIP324: functional tests for v2 P2P encryption 2024-01-29 12:31:31 -05:00
script wallet: fix key parsing check for miniscript expressions in ParseScript 2023-12-08 06:54:00 -03:00
secp256k1 Update secp256k1 subtree to latest master 2024-01-04 14:40:28 +00:00
support
test Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags 2024-01-31 11:44:41 -05:00
univalue
util doc: Clarify C++20 comments 2024-01-05 11:22:31 +01:00
wallet refactor: Compile unreachable code 2024-01-25 16:25:55 +01:00
zmq Remove deprecated -rpcserialversion 2023-12-11 18:22:13 +01:00
.bear-tidy-config
.clang-format refactor: Print verbose serialize compiler error messages 2023-12-15 15:20:54 +01:00
.clang-tidy
addrdb.cpp
addrdb.h
addresstype.cpp
addresstype.h
addrman.cpp Merge bitcoin/bitcoin#27581: net: Continuous ASMap health check 2023-12-06 11:22:42 -05:00
addrman.h doc, test: Test and explain service flag handling 2024-01-15 16:19:53 -05:00
addrman_impl.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp
banman.h
base58.cpp
base58.h
bech32.cpp
bech32.h
bip324.cpp
bip324.h
bitcoin-chainstate.cpp refactor: Add NodeContext::shutdown member 2023-12-04 15:39:15 -04:00
bitcoin-cli-res.rc
bitcoin-cli.cpp Fix -netinfo backward compat with getpeerinfo pre-v26 2024-01-09 15:27:08 -06:00
bitcoin-tx-res.rc
bitcoin-tx.cpp doc: Update bitcoin-tx replaceable documentation 2023-12-11 13:08:46 -05:00
bitcoin-util-res.rc
bitcoin-util.cpp
bitcoin-wallet-res.rc
bitcoin-wallet.cpp
bitcoind-res.rc
bitcoind.cpp Get rid of shutdown.cpp/shutdown.h, use SignalInterrupt directly 2023-12-04 15:39:15 -04:00
blockencodings.cpp
blockencodings.h
blockfilter.cpp refactor: SpanReader without nVersion 2023-11-28 12:42:07 +01:00
blockfilter.h
chain.cpp
chain.h
chainparams.cpp
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkqueue.h
clientversion.cpp
clientversion.h
coins.cpp
coins.h
compressor.cpp
compressor.h
core_io.h Remove deprecated -rpcserialversion 2023-12-11 18:22:13 +01:00
core_memusage.h
core_read.cpp
core_write.cpp Remove deprecated -rpcserialversion 2023-12-11 18:22:13 +01:00
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp
deploymentstatus.h
dummywallet.cpp
external_signer.cpp Remove unused version.h include 2023-11-30 11:28:19 +01:00
external_signer.h
flatfile.cpp
flatfile.h
hash.cpp crypto, hash: replace custom rotl32 with std::rotl 2024-01-05 17:12:38 +01:00
hash.h
headerssync.cpp
headerssync.h
httprpc.cpp
httprpc.h
httpserver.cpp Merge bitcoin/bitcoin#28318: logging: Simplify API for level based logging 2024-01-10 14:11:32 -05:00
httpserver.h refactor: Remove call to ShutdownRequested from HTTPRequest 2023-12-04 15:39:15 -04:00
i2p.cpp net: create I2P sessions with both ECIES-X25519 and ElGamal encryption 2024-01-07 16:24:08 -06:00
i2p.h
indirectmap.h
init.cpp Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags 2024-01-31 11:44:41 -05:00
init.h Get rid of shutdown.cpp/shutdown.h, use SignalInterrupt directly 2023-12-04 15:39:15 -04:00
key.cpp refactor: Allow std::span construction from CKey 2024-01-16 15:29:18 +01:00
key.h refactor: Allow std::span construction from CKey 2024-01-16 15:29:18 +01:00
key_io.cpp refactor: Allow std::span construction from CKey 2024-01-16 15:29:18 +01:00
key_io.h
logging.cpp logging: add -loglevelalways=1 option 2023-12-15 11:03:25 +10:00
logging.h logging: add LogError, LogWarning, LogInfo, LogDebug, LogTrace 2023-12-20 15:59:48 +10:00
Makefile.am Merge bitcoin/bitcoin#29180: crypto: remove use of BUILD_BITCOIN_INTERNAL macro in sha256 2024-01-26 18:56:41 -05:00
Makefile.bench.include Merge bitcoin/bitcoin#26684: bench: add readblock benchmark 2024-01-02 11:12:32 -05:00
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.minisketch.include
Makefile.qt.include
Makefile.qt_locale.include
Makefile.qttest.include
Makefile.test.include Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags 2024-01-31 11:44:41 -05:00
Makefile.test_fuzz.include
Makefile.test_util.include
Makefile.univalue.include
mapport.cpp
mapport.h
memusage.h
merkleblock.cpp refactor: Use Txid in CMerkleBlock 2023-11-28 17:49:41 +01:00
merkleblock.h refactor: Use Txid in CMerkleBlock 2023-11-28 17:49:41 +01:00
net.cpp Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags 2024-01-31 11:44:41 -05:00
net.h Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags 2024-01-31 11:44:41 -05:00
net_permissions.cpp
net_permissions.h
net_processing.cpp Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags 2024-01-31 11:44:41 -05:00
net_processing.h net: move state dependent peer services flags 2024-01-15 10:28:20 -03:00
net_types.cpp
net_types.h
netaddress.cpp
netaddress.h
netbase.cpp
netbase.h
netgroup.cpp Merge bitcoin/bitcoin#27581: net: Continuous ASMap health check 2023-12-06 11:22:42 -05:00
netgroup.h net: Add continuous ASMap health check logging 2023-12-02 22:03:08 +01:00
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp
outputtype.h
pow.cpp
pow.h
prevector.h
protocol.cpp net: remove now unused global 'g_initial_block_download_completed' 2024-01-23 10:25:16 -03:00
protocol.h net: remove now unused global 'g_initial_block_download_completed' 2024-01-23 10:25:16 -03:00
psbt.cpp Remove unused version.h include 2023-11-30 11:28:19 +01:00
psbt.h refactor: SpanReader without nVersion 2023-11-28 12:42:07 +01:00
pubkey.cpp
pubkey.h Add missing XOnlyPubKey::data() to get mutable data 2024-01-16 10:58:57 +01:00
random.cpp
random.h
randomenv.cpp
randomenv.h
rest.cpp Merge bitcoin/bitcoin#28890: rpc: Remove deprecated -rpcserialversion 2024-01-05 10:42:10 +00:00
rest.h
reverse_iterator.h
scheduler.cpp
scheduler.h
serialize.h Allow std::byte C-style array serialization 2023-12-15 15:21:22 +01:00
signet.cpp refactor: SpanReader without nVersion 2023-11-28 12:42:07 +01:00
signet.h
span.h refactor: Print verbose serialize compiler error messages 2023-12-15 15:20:54 +01:00
streams.cpp
streams.h Remove unused CDataStream 2023-11-30 11:27:54 +01:00
sync.cpp
sync.h
threadsafety.h
timedata.cpp
timedata.h
tinyformat.h
torcontrol.cpp Merge bitcoin/bitcoin#28318: logging: Simplify API for level based logging 2024-01-10 14:11:32 -05:00
torcontrol.h
txdb.cpp
txdb.h
txmempool.cpp refactor: remove CTxMemPool::queryHashes() 2024-01-18 21:54:56 +00:00
txmempool.h refactor: remove CTxMemPool::queryHashes() 2024-01-18 21:54:56 +00:00
txorphanage.cpp fuzz: Improve fuzzing stability for txorphan harness 2023-12-08 13:14:46 +00:00
txorphanage.h fuzz: Improve fuzzing stability for txorphan harness 2023-12-08 13:14:46 +00:00
txrequest.cpp refactor: modernize-use-default-member-init for bit-fields (C++20) 2023-12-07 11:06:01 +01:00
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp validation: move nChainTx assert down in CheckBlockIndex 2024-01-23 18:27:32 -05:00
validation.h Merge bitcoin/bitcoin#26762: bugfix: Make CCheckQueue RAII-styled (attempt 2) 2023-11-30 14:28:46 -05:00
validationinterface.cpp
validationinterface.h doc: fix typo and update incorrect comment 2024-01-02 12:40:11 +01:00
versionbits.cpp
versionbits.h
walletinitinterface.h
warnings.cpp
warnings.h