Commit Graph

781 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
e82559516c
merge bitcoin#25619: avoid overriding non-virtual ToString() in CService and use better naming 2024-09-11 16:18:46 +00:00
Kittywhiskers Van Gogh
76a458e5f9
fmt: apply formatting suggestions from clang-format-diff.py 2024-09-04 16:29:30 +00:00
Kittywhiskers Van Gogh
dbe41ea141
refactor: move object request logic to PeerManagerImpl
Preparation for backporting bitcoin#24543, which makes `State()` internal
to `PeerManagerImpl`.
2024-09-04 16:29:29 +00:00
pasta
efe4c2d6eb
Merge #6143: backport: bitcoin#19160, #21663, #21669, #21732, #21738, #21750, #21775, #21812
f4cb0fbfe1 fix: no need to relay quorum commitment in case of block undo (Konstantin Akimov)
0431a33919 fix: follow-up changes for bitcoin#14193. (Konstantin Akimov)
86b76d19b6 Merge bitcoin/bitcoin#21812: ci: Enable D_GLIBCXX_DEBUG for multiprocess task (fanquake)
334496ea7e Merge bitcoin/bitcoin#21775: p2p: Limit m_block_inv_mutex (MarcoFalke)
23b83109ea Merge bitcoin/bitcoin#21750: net: remove unnecessary check of CNode::cs_vSend (MarcoFalke)
b34514191f Merge bitcoin/bitcoin#21738: test: Use clang-12 for ASAN, Add missing suppression (fanquake)
3411577473 Merge bitcoin/bitcoin#19160: multiprocess: Add basic spawn and IPC support (W. J. van der Laan)
970048d917 fix: missing changes from bitcoin#19267 - run multiprocess on CI (Konstantin Akimov)
f2b7ee73db fix: follow-up bitcoin#15402 - removed dead code (Konstantin Akimov)
274068cdbc fix: follow-up bitcoin/bitcoin#21732 - minor missing typo (MarcoFalke)
e9450a8b36 Merge #21669: test: Remove spurious double lock tsan suppressions by bumping to clang-12 (MarcoFalke)
ef92c3065c Merge #21663: ci: Fix macOS brew install command (W. J. van der Laan)

Pull request description:

  ## Issue being fixed or feature implemented
  Just regular backports from v22

  ## What was done?
  See commits for backports.

  Also there're 2 bugs are fixed which became visible after backporting bitcoin#21775 - both are related to possible deadlocks in net_processing

  ## How Has This Been Tested?
  Run unit and functional tests. Enabled multiprocess builds on CI

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  UdjinM6:
    utACK f4cb0fbfe1
  PastaPastaPasta:
    utACK f4cb0fbfe1

Tree-SHA512: 3204c2aa243fa4834ccf4ff4672d183cf9b35f87b857df8543572cd685729e15fca39f85b27194233e57cbc1746e36b556efab95ce20d0aa0a7d4476a9f3c6c0
2024-08-10 19:15:13 +07:00
pasta
3c6ef31816
Merge #6175: feat: allow resigning for EHF
6f82a56171 feat: add option to AsyncSignIfMember to allow signing same requestID on different msgHashes (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Please see: https://www.dash.org/forum/index.php?threads/ehf-activation-issues.55146/ for a description of this issue

  ## What was done?
  Allow re-signing specifically for EHF messages, this is important as due to rotation, and duplicate requestIDs a member will refuse to re-sign when they participate in a later quorum.

  ## How Has This Been Tested?
  Devnet deployed with a mix of this version, older versions and current v21.0

  ## Breaking Changes
  This doesn't introduce any breaking changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: a758e6363901624d8540983ad09085d47a33fe61e8e576ec4317b051a0f988efb983bd06d9894bcce19c9f587ad703022ce00ceddd3760d7c9d382878f40c2d7
2024-08-07 18:03:36 +07:00
pasta
6f82a56171
feat: add option to AsyncSignIfMember to allow signing same requestID on different msgHashes 2024-08-07 17:55:44 +07:00
UdjinM6
d8449aecf9
fix: stop trying to sign pending txes when they are no longer non-locked 2024-08-05 10:28:05 +03:00
Konstantin Akimov
f4cb0fbfe1
fix: no need to relay quorum commitment in case of block undo
It fixes potentiall deadlock:
    Assertion failed: detected inconsistent lock order for 'peer.m_tx_relay->m_tx_inventory_mutex' in net_processing.cpp:971 (in thread 'httpworker.0'), details in debug log.
    Posix Signal: Aborted
       0#: (0x5BE0A9B78F04) stl_vector.h:115        - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_copy_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data const&)
       1#: (0x5BE0A9B78F04) stl_vector.h:127        - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_swap_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data&)
       2#: (0x5BE0A9B78F04) stl_vector.h:1959       - std::vector<unsigned long, std::allocator<unsigned long> >::_M_move_assign(std::vector<unsigned long, std::allocator<unsigned long> >&&, std::integral_constant<bool, true>)
       3#: (0x5BE0A9B78F04) stl_vector.h:768        - std::vector<unsigned long, std::allocator<unsigned long> >::operator=(std::vector<unsigned long, std::allocator<unsigned long> >&&)
       4#: (0x5BE0A9B78F04) stacktraces.cpp:777     - HandlePosixSignal
       5#: (0x733859C42990) libc_sigaction.c        - ???
       6#: (0x733859C99A1B) pthread_kill.c:44       - __pthread_kill_implementation
       7#: (0x733859C99A1B) pthread_kill.c:78       - __pthread_kill_internal
       8#: (0x733859C99A1B) pthread_kill.c:89       - __GI___pthread_kill
       9#: (0x733859C428E6) raise.c:27              - __GI_raise
      10#: (0x733859C268B7) abort.c:81              - __GI_abort
      11#: (0x5BE0A9B7EA06) basic_string.h:390      - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned long, unsigned long, char const*) const
      12#: (0x5BE0A9B7EA06) basic_string.h:1461     - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)
      13#: (0x5BE0A9B7EA06) basic_string.h:1365     - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(char const*)
      14#: (0x5BE0A9B7EA06) sync.cpp:114            - potential_deadlock_detected
      15#: (0x5BE0A9B8548E) sync.cpp:188            - push_lock<std::recursive_mutex>
      16#: (0x5BE0A9B8548E) sync.cpp:212            - void EnterCritical<std::recursive_mutex>(char const*, char const*, int, std::recursive_mutex*, bool)
      17#: (0x5BE0A935C582) unique_lock.h:150       - std::unique_lock<std::recursive_mutex>::try_lock()
      18#: (0x5BE0A935C582) sync.h:162              - UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::Enter(char const*, char const*, int)
      19#: (0x5BE0A935C582) sync.h:183              - UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::UniqueLock(AnnotatedMixin<std::recursive_mutex>&, char const*, char const*, int, bool)
      20#: (0x5BE0A9487A92) net_processing.cpp:972  - PushInv
      21#: (0x5BE0A94896E5) shared_ptr_base.h:1070  - std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
      22#: (0x5BE0A94896E5) shared_ptr_base.h:1524  - ~__shared_ptr
      23#: (0x5BE0A94896E5) shared_ptr.h:175        - ~shared_ptr
      24#: (0x5BE0A94896E5) net_processing.cpp:2276 - operator()
      25#: (0x5BE0A94896E5) net.h:1051              - ForEachNode<CConnman::CFullyConnectedOnly, (anonymous namespace)::PeerManagerImpl::RelayInv(CInv&, int)::<lambda(CNode*)>&>
      26#: (0x5BE0A94896E5) net.h:1058              - ForEachNode<(anonymous namespace)::PeerManagerImpl::RelayInv(CInv&, int)::<lambda(CNode*)> >
      27#: (0x5BE0A94896E5) net_processing.cpp:2269 - RelayInv
      28#: (0x5BE0A98B7C03) blockprocessor.cpp:683  - llmq::CQuorumBlockProcessor::AddMineableCommitment(llmq::CFinalCommitment const&)
      29#: (0x5BE0A98BE2E1) blockprocessor.cpp:338  - llmq::CQuorumBlockProcessor::UndoBlock(CBlock const&, gsl::not_null<CBlockIndex const*>)
      30#: (0x5BE0A9809EA9) specialtxman.cpp:264    - CSpecialTxProcessor::UndoSpecialTxsInBlock(CBlock const&, CBlockIndex const*, std::optional<MNListUpdates>&)
      31#: (0x5BE0A96FFB84) validation.cpp:1693     - CChainState::DisconnectBlock(CBlock const&, CBlockIndex const*, CCoinsViewCache&)
      32#: (0x5BE0A9701481) validation.cpp:2726     - CChainState::DisconnectTip(BlockValidationState&, DisconnectedBlockTransactions*)
2024-07-27 13:04:24 +07:00
pasta
859b9ad28f
style: run clang-format 2024-07-25 01:54:47 +07:00
Konstantin Akimov
acafd6ab83
fix: codestyle no spaces for annotations [[ ... ]] 2024-07-25 01:33:00 +07:00
Kittywhiskers Van Gogh
94173f14dd
merge bitcoin#21850: Remove GetDataDir(net_specific) function 2024-07-23 17:45:24 +00:00
Kittywhiskers Van Gogh
d69ca833df
merge bitcoin#21727: Move more stuff to blockstorage 2024-07-19 17:17:47 +00:00
Konstantin Akimov
a8a3ea0e90
feat: enable EHF activation of MN_RR on mainnet 2024-07-18 12:48:55 +07:00
Konstantin Akimov
6004e06769
feat: return enum in RecoveredSig verifying code, apply for RPC submitchainlock
It helps to detect case of Tip is way too far behind: the signature can be
still valid but core can't verify it yet but later it may become a valid signature.
2024-07-09 00:09:49 +07:00
Konstantin Akimov
130b6d1e96
refactor: replace static private member method to static method 2024-07-05 16:13:05 +07:00
Kittywhiskers Van Gogh
208b1c079b
refactor: drop usage of chainstate globals in masternode logic 2024-06-26 13:50:49 +00:00
Kittywhiskers Van Gogh
303c6bb4db
refactor: drop usage of chainstate globals in llmq logic 2024-06-26 13:50:49 +00:00
Kittywhiskers Van Gogh
c48c0e79f3
refactor: stop using ::ChainstateActive() in GetBlockHash 2024-06-26 11:49:47 +00:00
Kittywhiskers Van Gogh
d7c35d0538
refactor: remove llmq::CQuorumManager global, move to LLMQContext 2024-05-29 08:21:53 +00:00
Kittywhiskers Van Gogh
5b86df6ca3
refactor: reduce llmq::CQuorumManager globals use, use args 2024-05-29 08:20:57 +00:00
Kittywhiskers Van Gogh
1efd219173
refactor: remove llmq::CQuorumBlockProcessor global, move to LLMQContext
We used to store an alias to the `CQuorumBlockProcessor` instance present
in the global state in `LLMQContext` but handled construction and
destruction of the instance in `LLMQContext`. As direct global usage no
longer exists, we can fully subsume it into `LLMQContext`.
2024-05-29 08:17:46 +00:00
Vijay
7b52349b11
Revert "merge #855: Fix bad mn sig ipv6" 2024-05-24 13:33:26 -05:00
pasta
806fc73494
Merge #5954: refactor: significant Mutex refactoring
acd0f49d7b refactor: significant Mutex refactoring (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Don't use generic names; recursive mutexes where not needed; etc

  ## What was done?
  Includes:
  RecursiveMutex -> Mutex,
  renaming of `cs` to something more meaningful,
  usage of atomics where trivially possible,
  introduce a method CQuorum::SetVerificationVector to avoid needing to lock an internal mutex externally

  ## How Has This Been Tested?
  Compiling

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 76d0ee37e348680bdcd8f03237d3fc1febbf908a9c13e6ddea7be52a35adfca35cde3001ce6ecb140d7dba950ad19519d34d137de17a073306e3e7b26cb95b70
2024-05-14 09:16:33 -05:00
Kittywhiskers Van Gogh
362e3101ad
merge bitcoin#21943: Dedup and RAII-fy the creation of a copy of CConnman::vNodes 2024-05-08 16:21:51 +00:00
Kittywhiskers Van Gogh
bf98ad6a42
merge bitcoin#22782: Remove unused MaybeSetAddrName 2024-05-08 16:20:19 +00:00
pasta
d44b0d5dcb
Merge #5990: refactor: minimize locking in ChainLocks Cleanup
04ba164064 refactor: immediately update lastCleanupTime (pasta)
d0d2641154 refactor: minimize locking of cs_main in chainlocks.cpp (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Simple changes, just look at the two commits: first we minimize scope of cs_main to what actually needs it. Then we change where we update the `lastCleanupTime` to right after we check it to minimize any chance of two threads entering at the same time.

  ## What was done?

  ## How Has This Been Tested?
  Built, ran for a bit

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 63432ccc16a67e6478e578c96fe809cf33d08e5068285c21e65ccc175c0c9e82c23519d57f0c4ebac162a094bfc20eb44df30cbe85b26815d02eaac06ceb66ad
2024-05-03 10:16:00 -05:00
pasta
acd0f49d7b
refactor: significant Mutex refactoring
Includes:
RecursiveMutex -> Mutex,
renaming of `cs` to something more meaningful,
usage of atomics where trivially possible,
introduce a method CQuorum::SetVerificationVector to avoid needing to lock an internal mutex externally

fix: avoid cs_vvec_shShare double-lock

Co-authored-by: UdjinM6 <udjinm6@users.noreply.github.com>
2024-04-30 12:41:34 -05:00
Kittywhiskers Van Gogh
8b1d3b55ab
llmq: replace LOCKS_EXCLUDED with negative EXCLUSIVE_LOCKS_REQUIRED 2024-04-30 11:47:02 +00:00
Kittywhiskers Van Gogh
33098aefff
merge bitcoin#21160: Move tx inventory into net_processing 2024-04-26 20:25:55 +00:00
Kittywhiskers Van Gogh
4d629a04fb
refactor: limit fMasternodeMode usage in blockstorage, init, net_processing 2024-04-24 18:46:14 +00:00
Kittywhiskers Van Gogh
a9cbdfcebc
refactor: remove fMasternodeMode usage from llmq logic 2024-04-24 18:45:41 +00:00
pasta
04ba164064
refactor: immediately update lastCleanupTime 2024-04-23 11:35:20 -05:00
pasta
d0d2641154
refactor: minimize locking of cs_main in chainlocks.cpp 2024-04-23 11:35:18 -05:00
Kittywhiskers Van Gogh
f2fe39fadc
trivial: add Asserts for m_peerman pointer container uses 2024-04-23 16:08:11 +00:00
Kittywhiskers Van Gogh
35be4e2ebe
llmq: pass PeerManager to llmq::CInstantSendManager constructor
Required to avoid crashes when calling RelayInvFiltered in situations
where the PeerManager* atomic hasn't been set (possible when ProcessMessage
isn't called, leaving the value unset, while a separate thread traverses
the ProcessPendingInstantSendLocks > ProcessPendingInstantSendLocks[1] >
ProcessInstantSendLock > RelayInvFiltered call chain).

[1] - There is a function with the exact same name but with multiple
      arguments
2024-04-23 16:08:11 +00:00
Kittywhiskers Van Gogh
bfd33cd2b4
net: move CConnman::RelayInv{Filtered} into PeerManager 2024-04-23 16:08:10 +00:00
Kittywhiskers Van Gogh
313a7e9a50
trivial: cleanup unnecessary headers in context files 2024-04-23 16:06:41 +00:00
Kittywhiskers Van Gogh
c3f1ac2291
net: retire CConnman::RelayTransaction, use PeerManager::RelayTransaction 2024-04-23 16:06:41 +00:00
Kittywhiskers Van Gogh
0323c6ca17
net: move Relay{Inv, InvFiltered, Transaction} out of CConnman 2024-04-23 16:06:41 +00:00
Kittywhiskers Van Gogh
cf90cf20c6
refactor: remove CMasternodeMetaMan global, move to NodeContext 2024-04-12 17:02:09 +00:00
Kittywhiskers Van Gogh
c99fb42ddf
refactor: remove CMasternodeSync global, move to NodeContext 2024-04-12 17:01:24 +00:00
pasta
54ea9260d4
Merge #5974: backport: bitcoin#19522, #19809, #20993, #21075, #21126, #21138, #21221, #21354, #21542
005a6b104a fix: format string in llmq/commitment - mismatched arguments (Konstantin Akimov)
4774e1e8f6 Merge #19809: log: Prefix log messages with function name and source code location if -logsourcelocations is set (Wladimir J. van der Laan)
43a94f0580 fix: adjust functional tests due to dash's support of thread name after v0.12 (Konstantin Akimov)
085120d9f9 Merge #20993: test: store subversion (user agent) as string in msg_version (MarcoFalke)
e866b43160 Merge #21542: ci: Bump macOS VM image to the latest version (fanquake)
a3702534e5 Merge #21354: build, doc: Drop no longer required packages from macOS cross-compiling dependencies (fanquake)
6bcc86ad3b Merge #21221: [tools] Allow argument/parameter bin packing in clang-format (MarcoFalke)
318c7263d0 Merge #19522: build: fix building libconsensus with reduced exports for Darwin targets (Wladimir J. van der Laan)
88a45d4a9a Merge #21138: ci: Re-run wine tests once if they fail (fanquake)
4abb768456 Merge #21126: ci: Properly bump to focal for win cross build (fanquake)
f254f77d75 Merge #21075: doc: Fix markdown formatting (MarcoFalke)

Pull request description:

  ## Issue being fixed or feature implemented
  Regular backports from bitcoin v22 and related fixes

  ## What was done?
  Follow-up fixes for  bitcoin#19809
  Backports:
   - bitcoin/bitcoin#21075
   - bitcoin/bitcoin#21126
   - bitcoin/bitcoin#21138
   - bitcoin/bitcoin#19522
   - bitcoin/bitcoin#21221
   - bitcoin/bitcoin#21354
   - bitcoin/bitcoin#21542
   - bitcoin/bitcoin#19809
   - bitcoin/bitcoin#20993

  ## How Has This Been Tested?
  Run unit/functional tests

  ## Breaking Changes
  N/A
  Notice, that function name is included now by default to logs with `-logfunctionnames` and many logs have function name twice now such as:
  ```
   node0 2024-04-06T20:13:56.564123Z (mocktime: 2014-12-04T17:15:38Z) [httpworker.3] [masternode/sync.cpp:331] [NotifyHeaderTip] CMasternodeSync::NotifyHeaderTip -- pindexNew->nHeight: 5 fInitialDownload=0
  ```
  For further development need to take it in account and do not use more direct calls `__func__` from code as well as reduce usages in codebase.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK 005a6b104a

Tree-SHA512: f98949c4605dda7d6dfe790554e1d31a8c8178b57520578fcd58178c68fe7af33c0d66a79865683c1357de9a73fa4f484eb828b28e11ca110b8e1915c1fcf9b3
2024-04-12 10:20:15 -05:00
Konstantin Akimov
005a6b104a
fix: format string in llmq/commitment - mismatched arguments 2024-04-11 02:25:09 +07:00
Wladimir J. van der Laan
4774e1e8f6
Merge #19809: log: Prefix log messages with function name and source code location if -logsourcelocations is set
b4511e2e2ed1a6077ae6826a9ee6b7a311293d08 log: Prefix log messages with function name if -logsourcelocations is set (practicalswift)

Pull request description:

  Prefix log messages with function name if `-logfunctionnames` is set.

  Yes, exactly like `-logthreadnames` but for function names instead of thread names :)

  This is a small developer ergonomics improvement: I've found this to be a cheap/simple way to correlate log output and originating function.

  For me it beats the ordinary cycle of 1.) try to figure out a regexp matching the static part of the dynamic log message, 2.) `git grep -E 'Using .* MiB out of .* requested for signature cache'`, 3.) `mcedit filename.cpp` (`openemacs filename.cpp` works too!) and 4.) search for log message and scroll up to find the function name :)

  Without any logging parameters:

  ```
  $ src/bitcoind -regtest
  2020-08-25T03:29:04Z Using RdRand as an additional entropy source
  2020-08-25T03:29:04Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
  2020-08-25T03:29:04Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
  2020-08-25T03:29:04Z Loaded best chain: hashBestChain=0fff88f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e22ff height=0 date=2011-02-02T23:16:42Z progress=1.000000
  2020-08-25T03:29:04Z block tree size = 1
  2020-08-25T03:29:04Z nBestHeight = 0
  2020-08-25T03:29:04Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast
  2020-08-25T03:29:04Z 0 addresses found from DNS seeds
  ```

  With `-logthreadnames` and `-logfunctionnames`:

  ```
  $ src/bitcoind -regtest -logthreadnames -logfunctionnames
  2020-08-25T03:29:04Z [init] [ReportHardwareRand] Using RdRand as an additional entropy source
  2020-08-25T03:29:04Z [init] [InitSignatureCache] Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
  2020-08-25T03:29:04Z [init] [InitScriptExecutionCache] Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
  2020-08-25T03:29:04Z [init] [LoadChainTip] Loaded best chain: hashBestChain=0fff88f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e22ff height=0 date=2011-02-02T23:16:42Z progress=1.000000
  2020-08-25T03:29:04Z [init] [AppInitMain] block tree size = 1
  2020-08-25T03:29:04Z [init] [AppInitMain] nBestHeight = 0
  2020-08-25T03:29:04Z [loadblk] [LoadMempool] Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast
  2020-08-25T03:29:04Z [dnsseed] [ThreadDNSAddressSeed] 0 addresses found from DNS seeds
  ```

ACKs for top commit:
  laanwj:
    Code review ACK b4511e2e2ed1a6077ae6826a9ee6b7a311293d08
  MarcoFalke:
    review ACK b4511e2e2ed1a6077ae6826a9ee6b7a311293d08 🌃

Tree-SHA512: d100f5364630c323f31d275259864c597f7725e462d5f4bdedcc7033ea616d7fc0d16ef1b2af557e692f4deea73c6773ccfc681589e7bf6ba970b9ec169040c7
2024-04-11 02:25:08 +07:00
Kittywhiskers Van Gogh
91f4588f71
refactor: const the pointer of type const CActiveMasternodeManager 2024-04-09 20:45:32 +00:00
Kittywhiskers Van Gogh
cf940e8d85
init: decouple CMasternodeMetaMan construction from initialization 2024-04-09 20:45:28 +00:00
pasta
27c0813c08
Merge #5953: fix: resolve a few very unlikely lifetime / undefined behavior issues
6f2b350baa fix: don't move out of pendingContributionVerifications; use a ref and then clear (pasta)
7f36f122b2 fix: fix potential mutex lifetime issue were we are returning a reference, and then releasing the mutex (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  See individual commits

  ## What was done?
  Fix potential lifetime issue and potential undefined behavior

  ## How Has This Been Tested?
  Compiling

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: f76d88c1fe3c19a92bdf451f147520e29f5edf84342dfb0b6ea9bde901a3f826c09b5aa2334d8f6fa687aaae7d0c109f36779883c670915d55b69af3ea8affd4
2024-04-03 14:11:59 -05:00
Kittywhiskers Van Gogh
2e55327f55
net: introduce CanRelayAddrs as RelayAddrsWithConn substitute
Since bitcoin#21186, mutual exclusivity is not a given (i.e.
RelayAddrsWithConn != !IsBlockOnlyConn), we should use RelayPeersWithConn
for a definitive answer and since relying on a no-longer-true property
breaks InstantSend, let's fetch the right answer instead.
2024-04-03 16:10:17 +00:00
Kittywhiskers Van Gogh
26c39f5b92
net: replace RelayAddrsWithConn check with !IsBlockOnlyConn
Dash uses a lot more CNode::RelayAddrsWithConn checks than Bitcoin (esp.
since a483122f (#4888)), so bitcoin#21186 will not adequately cover the
removal of RelayAddrsWithConn usages.

When possible to query with RelayAddrsWithPeer, that should be used, as
that value is the most reliable, else we rely on the former mutual
exclusivity of IsBlockOnlyConn and RelayAddrsWithConn to fill in the
blanks where a more reliable query isn't available.

Note: To prevent builds from breaking, a change has been made in
InstantSend code despite it breaking functionality. A commit later will
repair it by creating a way to access RelayAddrsWithPeer.
2024-04-03 16:10:17 +00:00
Kittywhiskers Van Gogh
5c4c7c55f8
merge bitcoin#19771: Replace enum CConnMan::NumConnections with enum class ConnectionDirection 2024-04-03 16:10:15 +00:00