Commit Graph

26641 Commits

Author SHA1 Message Date
Hennadii Stepanov
9dff334f47
Merge bitcoin-core/gui#361: Fix gui segfault caused by bitcoin/bitcoin#22216
d7f3b1af21daa93165b3726fee059a55b7727280 Fix gui segfault caused by bitcoin/bitcoin#22216 (Russell Yanofsky)

Pull request description:

  Reported by Hennadii Stepanov https://github.com/bitcoin/bitcoin/pull/22216#issuecomment-859790682

  Fixes bitcoin/bitcoin#22227

ACKs for top commit:
  hebasto:
    ACK d7f3b1af21daa93165b3726fee059a55b7727280, tested on Linux Mint 20.1 (Qt 5.12.8).
  jarolrod:
    ACK d7f3b1af21daa93165b3726fee059a55b7727280

Tree-SHA512: d672bfa9f1bcd500a879ec7ed27096086ae93b73ad5da8090f29cc5b6d985c46a76583cc384304d67210f87b6b839c2391f0fcc24fd3588c4a014e540283fdfe
2024-08-28 01:09:45 +07:00
MarcoFalke
1087849955
Merge bitcoin/bitcoin#22216: refactor: Make SetupServerArgs callable without NodeContext
493fb47c577b7564138c883a8f22cbac3619ce44 Make SetupServerArgs callable without NodeContext (Russell Yanofsky)

Pull request description:

  `bitcoin-gui` code needs to call `SetupServerArgs` but will not have a `NodeContext` object if it is communicating with an external `bitcoin-node` process, so this just passes `ArgsManager` directly.

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102.

ACKs for top commit:
  MarcoFalke:
    review ACK 493fb47c577b7564138c883a8f22cbac3619ce44

Tree-SHA512: 94cda4350113237976e32f1935e3602d1e6ea90c29c4434db2094be70dddf4b63702c3094385258bdf1c3e5b52c7d23bbc1f0282bdd4965557eedd5aef9a0fd4
2024-08-28 01:09:45 +07:00
MarcoFalke
fd94de6888
Merge bitcoin/bitcoin#21178: test: run mempool_reorg.py even with wallet disabled
a3f0cbf82ddae2dd83001a9cc3a7948dcfb6fa47 test: run mempool_reorg.py even with wallet disabled (Darius Parvin)

Pull request description:

  Run mempool_reorg.py test even when the wallet is disabled, as discussed in #20078.

  As part of this PR I created a new method in `MiniWallet`, `create_self_transfer`, to return a raw tx (without broadcasting it) and its associated utxo.

ACKs for top commit:
  MarcoFalke:
    cr ACK a3f0cbf82ddae2dd83001a9cc3a7948dcfb6fa47

Tree-SHA512: 316a38faffadcb87499c1d6eca21e9696cef65362bbffcf621788a9b771bb1fa2971b1c7835cbd34b952d7612ad83afbca824cd8be39ecd6b994e8963027f991
2024-08-28 01:09:45 +07:00
Konstantin Akimov
f1f5723fcf
fix: missing changes from bitcoin#14123 2024-08-28 01:09:45 +07:00
UdjinM6
c2c4b2b794
fix: release unused memory in CNetMsgMaker::Make() 2024-08-27 20:45:36 +03:00
Samuel Dobson
1973532372
Merge bitcoin/bitcoin#22337: wallet: Use bilingual_str for errors
92993aa5cf37995e65e68dfd6f129ecaf418e01c Change SignTransaction's input_errors to use bilingual_str (Andrew Chow)
171366e89b828a557f8262d9dc14ff7a03f813f7 Use bilingual_str for address fetching functions (Andrew Chow)
9571c69b51115454c6a699be9492024f7b46c2b4 Add bilingual_str::clear() (Andrew Chow)

Pull request description:

  In a couple of places in the wallet, errors are `std::string`. In order for these errors to be translated, change them to use `bilingual_str`.

ACKs for top commit:
  hebasto:
    re-ACK 92993aa5cf37995e65e68dfd6f129ecaf418e01c, only rebased since my [previous](https://github.com/bitcoin/bitcoin/pull/22337#pullrequestreview-694542729) review, verified with
  klementtan:
    Code review ACK 92993aa5cf37995e65e68dfd6f129ecaf418e01c
  meshcollider:
    Code review ACK 92993aa5cf37995e65e68dfd6f129ecaf418e01c

Tree-SHA512: 5400e419dd87db8c49b67ed0964de2d44b58010a566ca246f2f0760ed9ef6a9b6f6df7a6adcb211b315b74c727bfe8c7d07eb5690b5922fa5828ceef4c83461f
Signed-off-by: Vijay <vijaydas.mp@gmail.com>
2024-08-27 20:08:25 +05:30
Kittywhiskers Van Gogh
87d775d27c
partial bitcoin#22868: Call load handlers without cs_wallet locked
excludes changes in `wallet/context.h` due to `::vpwallets` (and thus,
`cs_wallets`) not being deglobalized yet
2024-08-26 15:55:38 +00:00
Kittywhiskers Van Gogh
c602ca15e1
coinjoin: protect m_wallet_manager_map with cs_wallet_manager_map
Avoid TSan-reported data race

```
WARNING: ThreadSanitizer: data race (pid=374820)
  Read of size 8 at 0x7b140002ce10 by thread T12:
    #0 _M_ptr /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:154:42 (dashd+0xb58e08) (BuildId: c3fdce9f7e778985a4fb0968ff4506d9ad24d408)
    #1 get /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:361:21 (dashd+0xb58e08)
    #2 operator-> /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:355:9 (dashd+0xb58e08)
    #3 CoinJoinWalletManager::DoMaintenance() /src/dash/src/coinjoin/client.cpp:1907:9 (dashd+0xb58e08)
    [...]
  Previous write of size 8 at 0x7b140002ce10 by thread T17 (mutexes: write M0):
    #0 operator new(unsigned long) <null> (dashd+0x162657) (BuildId: c3fdce9f7e778985a4fb0968ff4506d9ad24d408)
    #1 allocate /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h:114:27 (dashd+0xb772b4) (BuildId: c3fdce9f7e778985a4fb0968ff4506d9ad24d408)
    #2 allocate /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h:443:20 (dashd+0xb772b4)
    #3 _M_get_node /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_tree.h:580:16 (dashd+0xb772b4)
    [...]
    #8 CoinJoinWalletManager::Add(CWallet&) /src/dash/src/coinjoin/client.cpp:1898:26 (dashd+0xb58c73) (BuildId: c3fdce9f7e778985a4fb0968ff4506d9ad24d408)
[...]
SUMMARY: ThreadSanitizer: data race [...]
```
2024-08-26 15:55:37 +00:00
Kittywhiskers Van Gogh
b75e83b298
merge bitcoin#24218: Fix implicit-integer-sign-change 2024-08-26 15:35:13 +00:00
Kittywhiskers Van Gogh
8ecc22f51f
merge bitcoin#23471: Improve ZMQ documentation 2024-08-26 15:35:13 +00:00
Kittywhiskers Van Gogh
2965093c4a
merge bitcoin#22079: Add support to listen on IPv6 addresses 2024-08-26 15:35:13 +00:00
Kittywhiskers Van Gogh
3ac3714957
merge bitcoin#21310: fix sync-up by matching notification to generated block 2024-08-26 15:35:13 +00:00
Kittywhiskers Van Gogh
7b0c725c59
merge bitcoin#21008: fix zmq test flakiness, improve speed 2024-08-26 15:35:13 +00:00
Kittywhiskers Van Gogh
5e87efd04b
merge bitcoin#20523: deduplicate 'sequence' publisher message creation/sending 2024-08-26 15:35:12 +00:00
Kittywhiskers Van Gogh
99c730f0f3
merge bitcoin#20953: dedup zmq test setup code (node restart, topics subscription) 2024-08-26 15:35:12 +00:00
Kittywhiskers Van Gogh
982c1f03d4
merge bitcoin#19572: Create "sequence" notifier, enabling client-side mempool tracking 2024-08-26 15:35:12 +00:00
Kittywhiskers Van Gogh
b0b4e0fa7f
zmq: Make g_zmq_notification_interface a smart pointer
courtesy of 8ed4ff8e from bitcoin#27125
2024-08-26 14:06:05 +00:00
Konstantin Akimov
dc59cbc315
fix: optimize includes in gsl/pointer.h to speed up compile time
it removes:
 - algorithm: `forward` is a part of utility not algorithm
 - system_error: `hash` is already declared in memory
2024-08-26 16:16:31 +07:00
Konstantin Akimov
d5e32e1b79
fix: disable gsl iostream feature for faster compile time
We do not use this feature and implementation is trivial: just call `get()`
2024-08-26 16:16:31 +07:00
UdjinM6
b330318db7
refactor: drop circular dependency 2024-08-26 11:45:24 +03:00
Kittywhiskers Van Gogh
0a1ffd30b9
zmq: extend appending address to log msg for Dash-specific notifications
Continuation of e66870c5 from bitcoin#18309
2024-08-25 12:15:29 +00:00
pasta
f675fcbd25
Merge #6230: fix: resolve GitHub workflow warnings
88bf7a8cb4 fix: resolve GitHub workflow warnings (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

  ## What was done?

  ## How Has This Been Tested?
  Check results for CI and Guix actions (in future PRs? 🤷‍♂️ )

  ## 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
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 91464dbb85767e27bd26484cf597f7794e450d56901a407864ce9d3880fb15118047ee040f4e4ab19ea2a0a6dc8aaa6239353427f35f9c7500a6df0fdff6fb6f
2024-08-24 21:28:44 -05:00
Kittywhiskers Van Gogh
ad840ec31a
Merge bitcoin#22593: remove hex_str_to_bytes helper
Signed-off-by: Vijay <vijaydas.mp@gmail.com>
2024-08-25 07:55:20 +05:30
MarcoFalke
cbc4c63f58
Merge bitcoin/bitcoin#22619: test: refactor: use consistent bytes <-> hex-string conversion in functional test framework
5a1bef60a03b57de708a1a751bd90b8245fd8b83 test: refactor: remove binascii from test_framework (Zero-1729)

Pull request description:

  This PR continues the work started in PR #22593, regarding using the `bytes` built-in module. In this PR specifically, instances of `binascii`'s methods `hexlify`, `unhexlify`,  and `a2b_hex` have been replaced with the build-in `bytes` module's `hex` and `fromhex` methods where appropriate to make bytes <-> hex-string conversions consistent across the functional test files and test_framework.

  Additionally, certain changes made are based on the following assumption:

  ```
  bytes.hex(data) == binascii.hexlify(data).decode()
  bytes.hex(data).encode() == binascii.hexlify(data)
  ```

  Ran the functional tests to ensure behaviour is still consistent and changes didn't break existing tests.

  closes #22605

ACKs for top commit:
  theStack:
    Code-review ACK 5a1bef60a03b57de708a1a751bd90b8245fd8b83 🔢

Tree-SHA512: 8f28076cf0580a0d02a156f3e1e94c9badd3d41c3fbdfb2b87cd8a761dde2c94faa5f4c448d6747b1ccc9111c3ef1a1d7b42a11c806b241fa0410b7529e2445f
Signed-off-by: Vijay <vijaydas.mp@gmail.com>
2024-08-25 07:55:13 +05:30
pasta
114d7877d3
Merge #6098: backport: merge bitcoin#22278, #24103, #24235, #24177, #24299, #24917, #22564, #25349, #25571, #17487, #26999, #27011 (blockstorage backports: part 2)
b65863783f merge bitcoin#27011: Add simulation-based `CCoinsViewCache` fuzzer (Kittywhiskers Van Gogh)
1d0e410280 merge bitcoin#26999: A few follow-ups to bitcoin#17487 (Kittywhiskers Van Gogh)
7d837ea5c5 merge bitcoin#17487: allow write to disk without cache drop (Kittywhiskers Van Gogh)
2c758f4ba2 merge bitcoin#25571: Make mapBlocksUnknownParent local, and rename it (Kittywhiskers Van Gogh)
70a91e1d3f merge bitcoin#25349: CBlockIndex/CDiskBlockIndex improvements for safety, consistent behavior (Kittywhiskers Van Gogh)
eca0a64ea1 merge bitcoin#22564: Move mutable globals cleared in ::UnloadBlockIndex to BlockManager (Kittywhiskers Van Gogh)
916b3f0041 merge bitcoin#24917: Make BlockManager::LoadBlockIndex private (Kittywhiskers Van Gogh)
e10ca27fa6 merge bitcoin#24299: UnloadBlockIndex and ChainstateManager::Reset thread safety cleanups (Kittywhiskers Van Gogh)
18aa55be1e merge bitcoin#24177: add missing thread safety lock assertions (Kittywhiskers Van Gogh)
678e67c505 merge bitcoin#24235: use stronger EXCLUSIVE_LOCKS_REQUIRED() (Kittywhiskers Van Gogh)
edc665c80d merge bitcoin#24103: Replace RecursiveMutex m_cs_chainstate with Mutex, and rename it (Kittywhiskers Van Gogh)
d19ffd613a merge bitcoin#22278: Add LIFETIMEBOUND to CScript where needed (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on https://github.com/dashpay/dash/pull/6097
  * Dependency for https://github.com/dashpay/dash/pull/6067
  * Test failures in `linux64_multiprocess-build` ([build](https://gitlab.com/dashpay/dash/-/jobs/7550924662)) and `linux64_tsan-test` ([build](https://gitlab.com/dashpay/dash/-/jobs/7550924666)) do not stem from this PR but are pre-existing failures in `develop` ([build](https://gitlab.com/dashpay/dash/-/jobs/7550859495), [build](https://gitlab.com/dashpay/dash/-/jobs/7550859499)). A fix for the build failures has been opened as a separate PR.

  ## Breaking Changes

  None observed.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    LGTM, utACK b65863783f
  PastaPastaPasta:
    utACK b65863783f

Tree-SHA512: 1a9c3a41617af274db169db47a9c9fce7ba7ce0b2d68aa75617640a55da11a0fa095cb25ce6a2d38f06d3f6a6cc4c08cb4cf82dca4bdc74192e8882fd5f7052f
2024-08-24 21:12:29 -05:00
UdjinM6
88bf7a8cb4
fix: resolve GitHub workflow warnings 2024-08-24 01:15:31 +03:00
UdjinM6
e54fe42ce8
refactor: use key_to_p2pkh_script in more places 2024-08-24 00:51:21 +03:00
UdjinM6
3ed6246889
test: check creditOutputs format 2024-08-24 00:51:14 +03:00
UdjinM6
ba0e64505b
fix: creditOutputs in AssetLock tx json output should be an array of objects, not debug strings 2024-08-24 00:45:02 +03:00
Kittywhiskers Van Gogh
b65863783f
merge bitcoin#27011: Add simulation-based CCoinsViewCache fuzzer 2024-08-23 07:00:39 +00:00
Kittywhiskers Van Gogh
1d0e410280
merge bitcoin#26999: A few follow-ups to bitcoin#17487 2024-08-23 06:57:38 +00:00
Kittywhiskers Van Gogh
7d837ea5c5
merge bitcoin#17487: allow write to disk without cache drop 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
2c758f4ba2
merge bitcoin#25571: Make mapBlocksUnknownParent local, and rename it 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
70a91e1d3f
merge bitcoin#25349: CBlockIndex/CDiskBlockIndex improvements for safety, consistent behavior 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
eca0a64ea1
merge bitcoin#22564: Move mutable globals cleared in ::UnloadBlockIndex to BlockManager
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
916b3f0041
merge bitcoin#24917: Make BlockManager::LoadBlockIndex private 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
e10ca27fa6
merge bitcoin#24299: UnloadBlockIndex and ChainstateManager::Reset thread safety cleanups 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
18aa55be1e
merge bitcoin#24177: add missing thread safety lock assertions 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
678e67c505
merge bitcoin#24235: use stronger EXCLUSIVE_LOCKS_REQUIRED() 2024-08-23 06:57:37 +00:00
Kittywhiskers Van Gogh
edc665c80d
merge bitcoin#24103: Replace RecursiveMutex m_cs_chainstate with Mutex, and rename it 2024-08-23 06:57:36 +00:00
Kittywhiskers Van Gogh
d19ffd613a
merge bitcoin#22278: Add LIFETIMEBOUND to CScript where needed 2024-08-23 06:57:36 +00:00
UdjinM6
1f4e1a17ed
test: add test for governance inv expiration 2024-08-22 22:03:48 +03:00
UdjinM6
06b4dba0d3
feat: make CInv python implementation aware of governance invs 2024-08-22 22:01:07 +03:00
UdjinM6
c7c930ece6
fix: use correct condition in logs 2024-08-22 21:30:26 +03:00
pasta
045e178730
Merge #6134: backport: Merge bitcoin#22860
b9213fa976 Merge bitcoin/bitcoin#22860: test: Always clear reject reason in IsStandard tx test (MarcoFalke)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: 7257e9e7bdc6681fcb810f3b4c4034e8afcccdd6f3a6afe63e329e9d211833d55ce87d41c9c4e06af76d04e2ea234fb9d1ffa98108b94e1eddec43fd027bbadc
2024-08-22 10:00:40 -05:00
MarcoFalke
b9213fa976
Merge bitcoin/bitcoin#22860: test: Always clear reject reason in IsStandard tx test
fa1b08eb1413d547b5e322f20e6907b2f827a162 test: Always clear reject reason in IsStandard tx test (MarcoFalke)

Pull request description:

  For some tests the reject reason wasn't cleared between runs and thus subsequent tests might (theoretically) fail to verify the correct reject reason.

ACKs for top commit:
  benthecarman:
    ACK fa1b08eb1413d547b5e322f20e6907b2f827a162
  theStack:
    Code-review ACK fa1b08eb1413d547b5e322f20e6907b2f827a162

Tree-SHA512: fcb727a690f92a4cf06127c302ba464f1e8cb997498e4f7fd9e210d193559b07e6efdb9d5c8a0bef3fe643bdfd5fedd431aaace20978dd49e56b8e770cb9f930
2024-08-22 10:00:01 -05:00
pasta
3f4b50a794
Merge #6222: fix: adjust payee predictions after mn_rr activation, add tests
715bc1af66 test: check `masternode winners` before and after mn_rr (UdjinM6)
9d47cd2226 fix: adjust payee predictions after mn_rr activation (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Payment predictions in GUI are wrong when mn_rr is active, `masternode winners` RPC is affected by the same issue too. Actual payments aren't affected.

  ## What was done?
  Adjust calculations, add tests for `masternode winners`.

  ## How Has This Been Tested?
  Run dash-qt on testnet, check "Next Payment" on "Masternode" tab. Run tests.

  ## 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
  - [ ] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK 715bc1a

Tree-SHA512: 293c77974bcb50c6f9c51449d7bb12f89ad8db5871cad3a6083fe1951fe77e0deba8de7688b2f600fabe977bdc7390a66a984a6a076be19183c23742e00e27bf
2024-08-22 08:21:00 -05:00
UdjinM6
d41d87a5be
fix: use std::chrono::seconds 2024-08-22 15:03:13 +03:00
UdjinM6
d6fe7146ff
chore: make clang-format and linter happy 2024-08-22 15:03:13 +03:00
UdjinM6
b57a9220c1
refactor: sqash 2 hash maps into one, use proper naming 2024-08-22 15:03:13 +03:00