Commit Graph

26109 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
a475f5f4e5
refactor: drop usage of chainstate globals in coinjoin logic 2024-06-26 11:57:21 +00:00
Kittywhiskers Van Gogh
ed56dbdbc4
refactor: don't use globals to access members we can directly access
FlushStateToDisk and {Enforce, Invalidate, MarkConflicting}Block are all
CChainState functions, no need to access our own members through
chainstate globals when we can access them directly.
2024-06-26 11:49:48 +00:00
Kittywhiskers Van Gogh
c48c0e79f3
refactor: stop using ::ChainstateActive() in GetBlockHash 2024-06-26 11:49:47 +00:00
Kittywhiskers Van Gogh
6abf7f8b63
refactor: stop using ::Chain{state}Active() in GetUTXO* 2024-06-26 11:25:07 +00:00
Kittywhiskers Van Gogh
f6f7df3731
rpc: don't use GetUTXOCoin in CDeterministicMN::ToJson()
The fallback introduced in dash#5607 for spent UTXOs also works for
unspent UTXOs, no reason to leave it as fallback when it can be made
primary.

Also, if we did want to keep GetUTXOCoin around, it would need access
to CChainState due to the refactoring due in the next commit, which is
possible in its RPC invocations but isn't so readily available in Qt
code, where it is also called. The fallback code has the benefit of not
relying on CChainState.
2024-06-26 11:25:05 +00:00
Konstantin Akimov
7b44af26ca
refactor: move common code inside protx_register_common_wrapper 2024-06-25 22:36:55 +07:00
Konstantin Akimov
89d5e26473
refactor: replace bunch of bool flags to the enum 2024-06-25 22:36:55 +07:00
Konstantin Akimov
1351bc9aad
refactor: move common code to the wrapper 2024-06-25 22:36:55 +07:00
Konstantin Akimov
8d4c28a983
refactor: remove unused protx code from old implementation 2024-06-25 22:36:54 +07:00
Konstantin Akimov
2a837f8243
refactor: use new composite for RPC 'protx NNN' 2024-06-25 22:36:53 +07:00
pasta
4a520991db
Merge #6066: feat: support descriptor wallets for RPC protx updateregistar
c9a600e0fa fix: linkage error - message signer better to be common code rather than libconsensus (Konstantin Akimov)
8299b3b369 feat: protxregistar implementation for descriptor wallets (Konstantin Akimov)
6f45432f76 refactor: removed unused SignSpecialTxPayloadByString (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented

  RPC `protx updateregistar` uses forcely LegacyScriptPubKeyMan instead using CWallet's interface.
  It causes a failures such as
  ```
  test_framework.authproxy.JSONRPCException: This type of wallet does not support this command (-4)
  ```

  ## What was done?
  New method `SignSpecialTxPayloadByHash` is implemented in interface instead exporting raw private key for some address.

  See https://github.com/dashpay/dash-issues/issues/59 to track progress

  ## How Has This Been Tested?
  Functional test `feature_dip3_deterministicmns.py` to run by both ways - legacy and descriptor wallets.

  Run unit and functional tests.

  Extra test done locally:
  ```diff
  --- a/test/functional/test_framework/test_framework.py
  +++ b/test/functional/test_framework/test_framework.py
  @@ -242,10 +242,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):

           if self.options.descriptors is None:
               # Prefer BDB unless it isn't available
  -            if self.is_bdb_compiled():
  -                self.options.descriptors = False
  -            elif self.is_sqlite_compiled():
  +            if self.is_sqlite_compiled():
                   self.options.descriptors = True
  +            elif self.is_bdb_compiled():
  +                self.options.descriptors = False
  ```

  to flip flag descriptor wallets/legacy wallets for all functional tests.

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] 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 c9a600e0fa

Tree-SHA512: 00aea1cd9db3537b9a9dcdee096d47ea48337edeea3f52ad54aea91781678b8641ac2dd86b67f61f87e3912945bcb5361a42a3279b6c08bb8d9f096bed8fe842
2024-06-25 09:46:52 -05:00
pasta
fc11cd8362
Merge #6077: test: functional tests for RPC getgovernanceinfo
3971613285 feat: functional tests for RPC getgovernanceinfo (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  https://github.com/dashpay/dash-issues/issues/63

  ## What was done?
  It adds functional test for `getgovernanceinfo`

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

  Check output of `test/functional/test_runner.py -j20 --previous-releases --coverage --extended`
  ```
  Uncovered RPC commands:
    - cleardiscouraged
    - debug
    - getblockheaders
    - getmerkleblocks
    - getpoolinfo
    - voteraw
  ```

  ## 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
  - [x] 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 3971613285

Tree-SHA512: f2d93db9068a707f2b33dd841b14f266db226fc5e907f19a49cf7a856b840f0c2c1f521c462996888933bb0ed636c288db12b1d36978c124cb536ea1ab9f3892
2024-06-25 09:27:13 -05:00
pasta
375838378a
feat: bump protocol version to distinguish v21 from v20.1 2024-06-25 09:19:50 -05:00
pasta
6cb8dcd75b
Merge #6065: fix: add missing checks for not nullptr in rpc for dash specific code
dc15420470 refactor: use EnsureConnman and EnsurePeerman when possible (Konstantin Akimov)
dc01f07f74 fix: add missing checks for not nullptr in rpc for dash specific code (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  There're some usages of unique pointers in RPC code that are not guarded by non-nullptr checks

  ## What was done?
  Added missing `CHECK_NON_FATAL` and refactored some of them to `EnsureConnman` and `EnsurePeerman`

  ## How Has This Been Tested?
  Run unit/functional 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
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK dc15420470

Tree-SHA512: 0483d9208f38648cad55804791415b2facfd165514651463f9b48c44d1963be2888471bb6b1f51015bb9ddd160f272b86f42ee67aea66e640c410175412f5f75
2024-06-25 08:46:04 -05:00
pasta
d2af69fb2b
Merge #6058: fix: reset rounds to 0 when tx fee is not 0
0365b06fab fix: reset rounds to 0 when tx fee is not 0 (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  > a coinjoin send with say 10x 1 + 0.001 denom -> 10 denom, and this doesn’t reset rounds to 0

  reported by @PastaPastaPasta 👍

  ## What was done?
  only real coinjoin tx can be a 0 fee tx with denoms, use that fact to avoid the edge case described above

  ## How Has This Been Tested?
  reproduced the issue

  ## 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 _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    ACK 0365b06fab

Tree-SHA512: b72ac5c01cc77c81945c3ae00b80fbdc4884acf3cfadc3fbcf4b78ff5655cce3b2ece4885478e5bf7476d351411df88b967d2baa3925155cffdc6054dd3bb502
2024-06-25 08:44:14 -05:00
Kittywhiskers Van Gogh
cc55ebbf93
merge bitcoin#22093: Try posix-specific CXX first for mingw32 host 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
638806b2cc
merge bitcoin#22088: improve note on choosing posix mingw32 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
7ad0141d66
merge bitcoin#23947: use host_os instead of TARGET_OS in configure output 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
9126006c18
merge bitcoin#20201: pkg-config related cleanup 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
77862d8f5f
merge bitcoin#23494: minor boost tidyups 2024-06-25 13:39:57 +00:00
Kittywhiskers Van Gogh
ef4b35060d
merge bitcoin#23269: remove redundant warning flags 2024-06-25 13:39:56 +00:00
Kittywhiskers Van Gogh
183d08f1d9
merge bitcoin#22133: Make QWindowsVistaStylePlugin available again 2024-06-25 13:39:56 +00:00
Kittywhiskers Van Gogh
1fbdd009cd
merge bitcoin#21430: Add -Werror=implicit-fallthrough compile flag 2024-06-25 13:39:56 +00:00
Kittywhiskers Van Gogh
cae5496d0b
merge bitcoin#21920: improve macro for testing -latomic requirement 2024-06-25 13:22:14 +00:00
Kittywhiskers Van Gogh
78db324970
partial bitcoin#20938: fix linking against -latomic when building for riscv
includes:
- 54ce4fac80689621dcbcc76169b2b00b179ee743
2024-06-25 13:22:13 +00:00
Kittywhiskers Van Gogh
972b4198d7
merge bitcoin#23007: remove WSL install instructions and point to upstream 2024-06-25 13:22:13 +00:00
Kittywhiskers Van Gogh
54be58b494
merge bitcoin#22845: improve check for ::(w)system 2024-06-25 13:22:13 +00:00
Kittywhiskers Van Gogh
5b86009d40
merge bitcoin#22464: fix 32-bit narrowing warning in bench/peer_eviction.cpp 2024-06-25 13:22:13 +00:00
Kittywhiskers Van Gogh
a42202d86f
merge bitcoin#22433: remove straggling boost thread_group related code 2024-06-25 13:22:13 +00:00
Kittywhiskers Van Gogh
abdf4d7b9f
build: use enough padding to match with labels in options printout 2024-06-25 13:22:12 +00:00
Kittywhiskers Van Gogh
e22f4216cb
doc: clean up build-windows.md
These cleanups include:
- Removing a leftover protobuf reference
- Removing instructions on how to build for 32-bit Windows
  - As backports assumed that there are only instructions for 64-bit
    Windows persist, their diff only made one change instead of two.
    But as the 32-bit instructions precede 64-bit, only they received
    changes. The following were affected.
    - Removal of tarball comment
    - Addition of WSL-specific instructions
- Removing references to MSVC as we do not support it
- Adding instructions for setting the default compiler for mingw32 to
  POSIX
- Adding instructions for escaping %PATH%s with spaces
- Adding instructions for cloning Dash Core into the mounted filesystem
  if using WSL
- Adding reference to `dependencies.md`
- Adding suggestion to use `-j`
- Realigning some language with upstream
- Add git as a dependency
2024-06-25 13:21:26 +00:00
pasta
5baa522225
Merge #6045: feat: one more queue for "external" requests from 3rd parties
241f073932 feat: rpc external users are comma separated list (Konstantin Akimov)
68def970ad refactor: re-order arguments options alphabetically (Konstantin Akimov)
c7efd56a07 feat: rpc external users: use 2 queues but no extra threads (Konstantin Akimov)
c575a5808a feat: change handler to '/' for external users, use only rpc user name to choose queue (Konstantin Akimov)
f1c1fd873e feat: implementation for /external handler for RPC (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  To avoid struggling to response to critical rpc requests, and split them from 3rd parties who uses a node as an external service, there are introduced one more queue of requests that will be served without throttling for instance consensus important rpcs

  ## What was done?
  new command line arguments:
   - `rpcexternaluser` - List of comma-separated usernames for JSON-RPC external connections. If not specified, there's no special queue is created, all requests in one queue
   - `rpcexternalworkqueue=<n>` - Set the depth of the work queue to service external RPC calls

  ## How Has This Been Tested?
  Functional test `rpc_platform_filter.py` is updated to test new functionality

  ## Breaking Changes
  NA

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] 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 241f073932
  PastaPastaPasta:
    utACK 241f073932

Tree-SHA512: 15b371f24f5302853b85419e2b20c29749d6aae1c98a541d7471f1d3a681643063302c2a5ecce04dfad2da9101ea69d2f08a7e0e11a28609c6011d78273c57a7
2024-06-24 11:54:43 -05:00
pasta
7ca4812b18
Merge #6036: feat: skip governance checks for blocks below the best chainlock
18328279ec fix: force mnsync to skip gov obj sync on reconnection (UdjinM6)
08331bb950 fix: apply suggestions (UdjinM6)
3c3489d7a1 test: add test (UdjinM6)
41ab95dbf8 feat: skip governance checks for blocks below the best chainlock (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  A node can miss governance trigger sometimes and then it would stuck not being able to sync any further. This issue can be fixed manually by resetting sync status and reconsidering the "invalid" block. However, that's inconvenient. Also, what it does under the hood is it simply disables some parts of block validation. We could do that automagically and more precise if we would trust ChainLocks instead.

  ## What was done?
  Skip governance checks for blocks below the best known chainlock, add tests.

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

ACKs for top commit:
  knst:
    utACK 18328279ec
  PastaPastaPasta:
    utACK 18328279ec

Tree-SHA512: 3cc4e2707e24b36c9f64502561667d0cb66eced7019db7941781ab1b84cfd267b3dab4684c71b059e074450ea76dc8e342744bffdd1ca1be6ccceb34b3580659
2024-06-24 11:52:39 -05:00
Konstantin Akimov
3971613285
feat: functional tests for RPC getgovernanceinfo 2024-06-24 18:09:55 +07:00
pasta
91e9dd41bd
Merge #6069: backport: bitcoin#19698, #20079, #20566, #20715, #20868, #21012, #21188, #21200, #21205, #21211, #21293
4e81732c57 Merge #21200: test: Speed up rpc_blockchain.py by removing miniwallet.generate() (Wladimir J. van der Laan)
4ab6aa4598 Merge #21293: test: Replace accidentally placed bit-OR with logical-OR (Wladimir J. van der Laan)
5a77c02188 Merge #19698: test: apply strict verification flags for transaction tests and assert backwards compatibility (Wladimir J. van der Laan)
259a767a38 Merge #21211: test: Move P2WSH_OP_TRUE to shared test library (MarcoFalke)
91e0359df4 Merge #21205: build: actually fail when Boost is missing (fanquake)
e3e69290a2 Merge #21188: scripted-diff: Remove redundant lock annotations in net processing (MarcoFalke)
5ec99ff3b4 Merge #20715: util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet (MarcoFalke)
292861a9bc Merge #20868: validation: remove redundant check on pindex (MarcoFalke)
e5249fb307 Merge #21012: ci: Fuzz with integer sanitizer (MarcoFalke)
785f7310ed Merge #20079: p2p: Treat handshake misbehavior like unknown message (MarcoFalke)
147d391c74 Merge #20566: refactor: Use C++17 std::array where possible (MarcoFalke)

Pull request description:

  ## What was done?
  Backports from bitcoin v22

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

  ## Breaking Changes
  N/A

  ## Checklist:
  - [ ] 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 4e81732c57b9513d0cc3de53d4a61918b064a3e7; LGTM
  UdjinM6:
    utACK 4e81732

Tree-SHA512: f18a73427b7f86bdc4cf9a3c2569b970d814a68705ed386196a143914860b52362365f24283f5b69bf1684ac35bbec5051a9728c475795ffdf3cf3a6ce217c00
2024-06-21 00:39:37 -05:00
Wladimir J. van der Laan
4e81732c57
Merge #21200: test: Speed up rpc_blockchain.py by removing miniwallet.generate()
faa137eb9eac5554504b062a6dc865ca87fd572b test: Speed up rpc_blockchain.py by removing miniwallet.generate() (MarcoFalke)
fa1fe80c757df0adcbfaf41b5c5c8a468bc07b6f test: Change address type from P2PKH to P2WSH in rpc_blockchain (MarcoFalke)
fa4d8f3169e38cbdbae20258efebe7070c49f522 test: Cache 25 mature coins for ADDRESS_BCRT1_P2WSH_OP_TRUE (MarcoFalke)
fad25153f5c8e88f72cf666b16b0b0dbdc45d3b1 test: Remove unused bug workaround (MarcoFalke)
faabce7d07c5776e4116b1a7ad1f6c408a4a4e46 test: Start only the number of nodes that are needed (MarcoFalke)

Pull request description:

  Speed up various tests:

  * Remove unused nodes, which only consume time on start/stop
  * Remove unused "bug workarounds"
  * Remove the need for `miniwallet.generate()` by adding `miniwallet.scan_blocks()`. (On my system, with valgrind, generating 105 blocks takes 3.31 seconds. Rescanning 5 blocks takes 0.11 seconds.)

ACKs for top commit:
  laanwj:
    Code review ACK faa137eb9eac5554504b062a6dc865ca87fd572b

Tree-SHA512: ead1988d5aaa748ef9f8520af1e0bf812cf1d72e281ad22fbd172b7306d850053040526f8adbcec0b9a971c697a0ee7ee8962684644d65b791663eedd505a025
2024-06-20 12:23:14 +07:00
Wladimir J. van der Laan
4ab6aa4598
Merge #21293: test: Replace accidentally placed bit-OR with logical-OR
df8f2a11dcadd08840c5311631132a522650a83e test: Replace accidentally placed bit-OR with logical-OR (Hennadii Stepanov)

Pull request description:

  This PR is a follow up of #19698.

ACKs for top commit:
  glozow:
    utACK df8f2a11dc

Tree-SHA512: 36aba3e952850deafe78dd39775a568e89e867c8a352f511f152bce7062f614f5bb4f23266dbb33da5292c9ee6da5ccefce117e3168621c71d2140c8e7f58460
2024-06-20 12:23:13 +07:00
Wladimir J. van der Laan
5a77c02188
Merge #19698: test: apply strict verification flags for transaction tests and assert backwards compatibility
5786a818e1a96bc1dd65b0e81b05998876357a74 Verify that all validation flags are backward compatible (gzhao408)
b10ce9aa48c8937cb91fca05e29c68098a364d93 [test] check verification flags are minimal/maximal (gzhao408)
a260c22cad0672dda11f42f649ebdc7cfa53b16a [test] Check for invalid flag combinations (gzhao408)
a7098a2a8d2d23ee3be1d71ab8c71475bf5a31ee [refactor] use CheckTxScripts, TrimFlags, FillFlags (gzhao408)
7a77727b2f66f3d723e03e917f0cabb459c49d62 Apply minimal validation flags to tx_invalid tests (gzhao408)
9532591bedaecf7c2debe779dec0a0debec2623b [test] add BADTX setting for invalid txns that fail CheckTransaction (gzhao408)
4c06ebf1281f0f387ab7493fe15176a05247525e [test] fix two witness tests in invalid tests with empty vout (gzhao408)
158a0b268ca2f73a5d504791359d1eff2cf27715 Apply maximal validation flags to tx_valid tests (gzhao408)
0a76a39b633760d4668d39859605c05629ee0025 [test] fix CSV test missing OP_ADD (gzhao408)
19db590d044efe7d474a16720e5b56e7b55db54c [test] remove unnecessary OP_1s from CSV and CLTV tests (gzhao408)

Pull request description:

  This uses the first 4 commits of #15045, rebased and added some comments. The diff is quite large already and I want to make it easy to review, so I'm splitting it into 2 PRs (transaction and script). Script one is WIP, I'll link it when I open it.

  Interpretation of scripts is dependent on the script verification flags passed in.
  In tests, we should always apply **maximal** verification flags when checking that a transaction is **valid**; any additional flags should invalidate the transaction. A transaction should not be valid because we forgot to include a flag, and we should apply all flags by default.
  We should apply **minimal** verification flags when asserting that a transaction is **invalid**; if verification flags are applied, removing any one of them should mean the transaction is valid.
  New verify flags must be backwards compatible; tests should check backwards compatibility and apply the new flags by default. All `tx_invalid` tests should continue to be invalid with the exact same verify flags. All `tx_valid` tests that don't pass with new flags should _explicitly_ indicate that the flags need to be excluded, and fail otherwise.

  1. Flip the meaning of `verifyFlags` in tx_valid.json to mean _excluded_ verification flags instead of included flags. Edit the test data accordingly.
  2. Trim unneeded flags from tx_invalid.json.
  3. Add check to verify that tx_valid tests have maximal flags and tx_invalid tests have minimal flags.
  4. Add checks to verify that flags are soft forks (#10699) i.e. adding any flag should only decrease the number of acceptable scripts. Test by adding/removing random flags.

ACKs for top commit:
  achow101:
    ACK 5786a818e1a96bc1dd65b0e81b05998876357a74
  laanwj:
    ACK 5786a818e1a96bc1dd65b0e81b05998876357a74

Tree-SHA512: 19195d8cf3299e62f47dd3443ae4a95430c5c9d497993a18ab80de9e24b1869787af972774993bf05717784879bc4592fdabaae0fddebd437963d8f3c96d9a73
2024-06-20 12:23:13 +07:00
MarcoFalke
259a767a38
Merge #21211: test: Move P2WSH_OP_TRUE to shared test library
22220ef6d5f331c9e1f3e9487eaf07ab13693921 test: Move P2WSH_OP_TRUE to shared test library (MarcoFalke)

Pull request description:

  Otherwise it can't be used in other tests (unit, fuzz, bench, ...)

ACKs for top commit:
  darosior:
    ACK 22220ef6d5f331c9e1f3e9487eaf07ab13693921

Tree-SHA512: 1b636e751281291f7c21ac51c3d014f6a565144c9482974391c516228e756442b077655eda970eb8bdb12974b97855a909b2b60d518026a8d5f41aa15ec7cbc8
2024-06-20 12:23:13 +07:00
fanquake
91e0359df4
Merge #21205: build: actually fail when Boost is missing
c5da2749e2f7375e292fb0982e8e252ae1adbce3 build: actually stop configure if Boost isn't available (fanquake)
cad8b527eaf7a93877e2249960866fd4db2d1c14 build: explicitly install libboost-dev package (fanquake)

Pull request description:

  If Boost is not found via AX_BOOST_BASE, we don't actually stop
  configuring, only a warning is emitted:
  ```bash
  checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version MINIMUM_REQUIRED_BOOST or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
  ```

  Instead we usually fail when one of the other AX_BOOST_* macros fails to find a library. These macros are slowly being
  removed, and in any case, it makes more sense to fail earlier if Boost is missing.

  If Boost is unavailable, the failure now looks like:
  ```bash
  checking for boostlib >= 1.58.0 (105800)... configure: We could not detect the boost libraries (version 1.58.0 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
  configure: error: Boost is not available!
  ```

  Note that we now just pass the version into AX_BOOST_BASE, which fixes it's display in the output (rather than showing `MINIMUM_REQUIRED_BOOST`).

  This PR also has a commit that adds `libboost-dev` to our install instructions and CI. This package is currently installed as a side-effect of installing our other libboost-*-dev packages. However as those continue to disappear, it makes sense to install boost-dev explicitly.

ACKs for top commit:
  laanwj:
    Code review ACK c5da2749e2f7375e292fb0982e8e252ae1adbce3
  MarcoFalke:
    Concept ACK c5da2749e2f7375e292fb0982e8e252ae1adbce3

Tree-SHA512: f866062f9d7d3a2316b6c887f17c664b9cfff41fdc0cb99ca79d641240fb01a5ae0d34140e515bc465219e1b43d5ca84f7c55f48b9c5b45a80ff2795dafd072b
2024-06-20 12:23:12 +07:00
MarcoFalke
e3e69290a2
Merge #21188: scripted-diff: Remove redundant lock annotations in net processing
fafddfadda0c77876ba764c5b65ee5fa8e53a5e0 scripted-diff: Remove shadowing lock annotations (MarcoFalke)

Pull request description:

  Would be good to not redundantly copy the lock annotation from the class declaration to the member implementation. Otherwise it may not result in a compile failure if a new lock requirement is added to the member implementation, but not the class declaration.

ACKs for top commit:
  amitiuttarwar:
    ACK `fafddfadda`, confirmed that the annotations removed were all redundant. confirmed the claim of potential issue :)
  hebasto:
    ACK fafddfadda0c77876ba764c5b65ee5fa8e53a5e0
  jonatack:
    Light utACK fafddfadda0c77876ba764c5b65ee5fa8e53a5e0 verified that the removed annotations in the definitions correspond to those in their respective declarations

Tree-SHA512: ea095c6d4e0bedd70d4e2d8a42b06cfd90c161ebfcaac13558c5dc065601a732e5f812f332104b7daa087aa57b8b0242b177799d22eef7628d77d4d87f443bf2
2024-06-20 12:23:12 +07:00
MarcoFalke
5ec99ff3b4
Merge #20715: util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet
fa61b9d1a68820758f9540653920deaeae6abe79 util: Add ArgsManager::GetCommand() and use it in bitcoin-wallet (MarcoFalke)
7777105a24a36b62df35d12ecf6c6370671568c8 refactor: Move all command dependend checks to ExecuteWalletToolFunc (MarcoFalke)
fa06bce4ac17f93decd4ee38c956e7aa55983f0d test: Add tests (MarcoFalke)
fac05ccdade8b34c969b9cd9b37b355bc0aabf9c wallet: [refactor] Pass ArgsManager to WalletAppInit (MarcoFalke)

Pull request description:

  This not only moves the parsing responsibility out from the wallet tool, but it also makes it easier to implement bitcoin-util #19937

  Fixes: #20902

ACKs for top commit:
  ajtowns:
    ACK fa61b9d1a68820758f9540653920deaeae6abe79
  fjahr:
    Code review ACK fa61b9d1a68820758f9540653920deaeae6abe79

Tree-SHA512: 79622b806e8bf9dcd0dc24a8a6687345710df57720992e83a41cd8d6762a6dc112044ebc58fcf6e8fbf45de29a79b04873c5b8c2494a1eaaf902a2884703e47b
2024-06-20 12:23:02 +07:00
MarcoFalke
292861a9bc
Merge #20868: validation: remove redundant check on pindex
c943282b5e6312537f885c811d43120ce2f5b766 validation: remove redundant check on pindex (jarolrod)

Pull request description:

  This removes a redundant check on `pindex` being a `nullptr`. By the time we get to this step `pindex` is always a `nullptr` as the branch where it has been set would have already returned.

  Closes #19223

ACKs for top commit:
  Zero-1729:
    re-ACK c943282
  ajtowns:
    ACK c943282b5e6312537f885c811d43120ce2f5b766 - code review only
  MarcoFalke:
    review ACK c943282b5e6312537f885c811d43120ce2f5b766 📨
  theStack:
    re-ACK c943282b5e6312537f885c811d43120ce2f5b766

Tree-SHA512: d2dc58206be61d2897b0703ee93af67abed492a80e84ea03dcfbf7116833173da3bdafa18ff80422d5296729d5254d57cc1db03fdaf817c8f57c62c3abef673c
2024-06-20 12:19:24 +07:00
MarcoFalke
e5249fb307
Merge #21012: ci: Fuzz with integer sanitizer
faff3991a9be0ea7be31685fb46d94c212c5da34 ci: Fuzz with integer sanitizer (MarcoFalke)

Pull request description:

  Otherwise the suppressions file will go out of sync

ACKs for top commit:
  practicalswift:
    cr ACK faff3991a9be0ea7be31685fb46d94c212c5da34: patch looks correct

Tree-SHA512: 349216d071a2c5ccf24565fe0c52d7a570ec148d515d085616a284f1ab9992ce10ff82eb17962dddbcda765bbd3a9b15e8b25f34bdbed99fc36922d4161d307c
2024-06-20 12:19:21 +07:00
MarcoFalke
785f7310ed
Merge #20079: p2p: Treat handshake misbehavior like unknown message
faaad1bbac46cfeb22654b4c59f0aac7a680c03a p2p: Ignore version msgs after initial version msg (MarcoFalke)
fad68afcff731153d1c83f7f56c91ecbb264b59a p2p: Ignore non-version msgs before version msg (MarcoFalke)

Pull request description:

  Handshake misbehaviour doesn't cost us more than any other unknown message, so it seems odd to treat it differently

ACKs for top commit:
  jnewbery:
    utACK faaad1bbac46cfeb22654b4c59f0aac7a680c03a
  practicalswift:
    ACK faaad1bbac46cfeb22654b4c59f0aac7a680c03a: patch looks correct

Tree-SHA512: 9f30c3b5c1f6604fd02cff878f10999956152419a3dd9825f8267cbdeff7d06787418b41c7fde8a00a5e557fe89204546e05d5689042dbf7b07fbb7eb95cddff
2024-06-20 02:25:45 +07:00
MarcoFalke
147d391c74
Merge #20566: refactor: Use C++17 std::array where possible
fac7ab1d5b58fb9cfd80d5cf74ac4d2e5cb8eff2 refactor: Use C++17 std::array where possible (MarcoFalke)

Pull request description:

  Using the C++11 std::array with explicit template parameters is problematic because overshooting the size will fill the memory with default constructed types.

  For example,

  ```cpp
  #include <array>
  #include <iostream>

  int main()
  {
      std::array<int, 3> a{1, 2};
      for (const auto& i : a) {
          std::cout << i << std::endl;  // prints "1 2 0"
      }
  }
  ```

ACKs for top commit:
  jonasschnelli:
    Code Review ACK fac7ab1d5b58fb9cfd80d5cf74ac4d2e5cb8eff2
  practicalswift:
    cr ACK fac7ab1d5b58fb9cfd80d5cf74ac4d2e5cb8eff2
  vasild:
    ACK fac7ab1d
  promag:
    Code review ACK fac7ab1d5b58fb9cfd80d5cf74ac4d2e5cb8eff2.

Tree-SHA512: ef7e872340226e0d6160e6fd66c6ca78b2ef9c245fa0ab27fe4777aac9fba8d5aaa154da3d27b65dec39a6a63d07f1063c3a8ffb667a98ab137756a1a0af2656
2024-06-20 02:25:42 +07:00
Konstantin Akimov
c9a600e0fa
fix: linkage error - message signer better to be common code rather than libconsensus 2024-06-18 21:19:02 +07:00
pasta
7f17ff8d8f
Merge #6062: feat: Let addrman handle multiple ports for all networks
76b4300fdf fix: Let addrman handle multiple ports for all networks (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  There is really no need to do have this restriction in `addrman`, we check `AllowMultiplePorts()` in `connman` which should be enough already. We can safely re-align `addrman` to its upstream implementation as suggested in #6043.

  ## What was done?
  Drop port "discrimination" in `addrman`, remove related tests.

  ## How Has This Been Tested?
  Run tests, run dash-qt on mainnet/testnet

  ## 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 _(for repository code-owners and collaborators only)_

ACKs for top commit:
  kwvg:
    ACK 76b4300fdf
  PastaPastaPasta:
    utACK 76b4300fdf422097b0b39460e80ee4da98247f03; is it really a fix or a refactor? doesn't change observable system behavior
  knst:
    utACK 76b4300fdf

Tree-SHA512: 50363b5de7a6c6ad4de18c08b0a5cc31e89be8e5304f9684ce2cc609df4de07ff6d8d010556b5f6651c698e1a86960dba8005cc26fdb00bd03c856752d3e06ef
2024-06-17 21:57:21 -05:00
pasta
77a025fb3b
Merge #6053: trivial: add a missing dash-specific files in util/ to linter lists
fbffe06dad fix: suppress lint warnings for edge due to both missing epoll and kpoll (Konstantin Akimov)
b799683d60 fix: pass reference instead copy of argument in util/edge (Konstantin Akimov)
9d941aacb9 fix: removed unused assigned (Konstantin Akimov)
d9e2e47685 fix: add a missing file util/wpipe to linter lists (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Some source files in src/util is missing to specify as dash specific for linters

  ## What was done?
  Added to list of dash's linters

  ## How Has This Been Tested?
  Run `test/lint/lint-all.sh`

  ## 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 fbffe06dad
  PastaPastaPasta:
    utACK fbffe06dad
  kwvg:
    utACK fbffe06dad

Tree-SHA512: 05bd40f987a93b47ca939f37d6e5b62e2044f2acce7a6ea6c361594eace808da17b17e0149095daecd0fb5418c6cbedbc70ad07ac3b7a1156a94188b04c2fd00
2024-06-17 21:56:53 -05:00
Konstantin Akimov
8299b3b369
feat: protxregistar implementation for descriptor wallets 2024-06-18 01:13:59 +07:00