Commit Graph

25627 Commits

Author SHA1 Message Date
MarcoFalke
3f4b42caa4
Merge #20687: wallet: Add missing check for -descriptors wallet tool option
fae32f295cc5b57c1cb95090bb60cddb42f9778a wallet: Add missing check for -descriptors wallet tool option (MarcoFalke)
faf8f61368696b9cbbea55ead30d6a48203235ff test: Add missing check for is_sqlite_compiled (MarcoFalke)
fa7dde1c418e2e700853bd30cc9e012c4e4c5ef2 wallet: Pass ArgsManager into ExecuteWalletToolFunc instead of using global (MarcoFalke)

Pull request description:

  Also, fix a test failure when compiled without sqlite

ACKs for top commit:
  ryanofsky:
    Code review ACK fae32f295cc5b57c1cb95090bb60cddb42f9778a. Thanks for implementing the -descriptors check and dealing with the test failure!
  jonatack:
    Code review utACK fae32f295cc5b57c1cb95090bb60cddb42f9778a

Tree-SHA512: 3d7710694085822739a8316e4abc6db270799ca6ff6b0f9e5563ae240da65ae6a9cab7ba2647feae6ba540dac40b55b38ed41c8f6ed0bf02a3d1536284448927
2024-04-10 01:59:00 +07:00
MarcoFalke
2978c452cd
Merge #19137: wallettool: Add dump and createfromdump commands
23cac24dd3f2aaf88aab978e7ef4905772815cd2 tests: Test bitcoin-wallet dump and createfromdump (Andrew Chow)
a88c320041bd1cd1786b2dfd9ab698a67c2a57c6 wallettool: Add createfromdump command (Andrew Chow)
e1e7a90d5f0616a46ffadd62a9f1c65406cca6b4 wallettool: Add dump command (Andrew Chow)

Pull request description:

  Adds two commands to the `bitcoin-wallet` tool: `dump` and `createfromdump`. These commands will be useful for a wallet storage migration in the future. It is also generally useful to have a storage agnostic dump like this. These commands are similar to BDB's `db_dump` and `db_load` tools. This can also be useful for manual construction of a wallet file for tests.

  `dump` outputs every key-value pair from the wallet as comma separated hex. Each key-value pair is on its own line with the key and value in hex separated by a comma. This is output to the file specified by the new `-dumpfile` option.

  `createfromdump` takes a file produced by `dump` and creates a new wallet file with exactly the records specified in that file.

  A new option `-dumpfile` is added to the wallet tool. When used with `dump`, the records will be written to the specified file. When used with `createfromdump`, the file is read and the key-value pairs constructed from it. `createfromdump` requires `-dumpfile`.

  A simple round-trip test is added to the `tool_wallet.py`.

  This PR is based on #19334,

ACKs for top commit:
  Sjors:
    re-utACK 23cac24
  MarcoFalke:
    re review ACK 23cac24dd3f2aaf88aab978e7ef4905772815cd2 only change is rebase and removing useless shared_ptr wrapper 🎼
  ryanofsky:
    Code review ACK 23cac24dd3f2aaf88aab978e7ef4905772815cd2. Only changes since last review rebase and changing a pointer to a reference

Tree-SHA512: 2d63cf62baca3d16495aa698dc02f7d889c81b41015e9c92c23c275bb4a690fc176d351c3fd7f310bd6b17f5a936cc9be694cbecd702af741b96c0f530e72fa2
2024-04-10 01:58:59 +07:00
MarcoFalke
99dec80fbb
Merge #19253: Tests: tidy up address.py and segwit_addr.py
825fcae484f31182041dfacbf820e818d759b130 [tests] Replace bytes literals with hex literals (John Newbery)
64eca45100536579a3849631e59d4277bbc25be1 [tests] Fix pep8 style violations in address.py (John Newbery)
b230f8b3f3adcb1e2ae299094f9ae0a8bc7cc3d0 [tests] Correct docstring for address.py (John Newbery)
ea70e6a2ca0e183ef40cdb9b3b86f39e94366015 [tests] Tidy up imports in address.py (John Newbery)
7f639df0b8a15aaeccedab00b634925f568c2c9a [tests] Remove unused optional verify_checksum parameter (John Newbery)
011e784f74411bd5d5dbccfd3af39e0937fd8933 [tests] Rename segwit encode and decode functions (John Newbery)
e4557133f595f357df5e16ae4f2f19c579631396 [tests] Move bech32 unit tests to test framework (John Newbery)

Pull request description:

  Lots of small fixes:

  - moving unit tests to test_framework implementation files
  - renaming functions to be clearer
  - removing multiple imports
  - removing unreadable byte literals from the code
  - fixing pep8 violations
  - correcting out-of-date docstring

ACKs for top commit:
  jonatack:
    re-ACK 825fcae484f31182041dfacbf820e818d759b130 per `git range-diff a0a422c 7edcdcd 825fcae` and verified `wallet_address_types.py` and `wallet_basic.py --descriptors` (the failure on one travis job) are green locally.
  MarcoFalke:
    ACK 825fcae484f31182041dfacbf820e818d759b130
  fanquake:
    ACK 825fcae484f31182041dfacbf820e818d759b130 - looks ok to me.

Tree-SHA512: aea509c27c1bcb94bef11205b6a79836c39c62249672815efc9822f411bc2e2336ceb3d72b3b861c3f4054a08e16edb28c6edd3aa5eff72eec1d60ea6ca82dc4
2024-04-10 01:58:59 +07:00
Samuel Dobson
5758c4840c
Merge bitcoin/bitcoin#23349: util: Use FEATURE_LATEST for wallets created with bitcoin-wallet
5b6b5ef5d178bea3c1b2f21e3bd05186312ea191 util: Use FEATURE_LATEST for wallets created with bitcoin-wallet (Hennadii Stepanov)

Pull request description:

  Since the 49d2374acf5845c5f760b5fd241482f292164147 commit was athored by **jonasschnelli** in 2016, the wallet version was bumped twice: in 2017 (bitcoin/bitcoin#11250) and in 2018 (bitcoin/bitcoin#12560).

  This PR bumps the version of wallets created with `bitcoin-wallet` offline tool.

  On master (04437ee721e66a7b76bef5ec2f88dd1efcd03b84) -- `"walletversion": 139900`:
  ```
  $ src/bitcoin-wallet -signet -wallet=211025-test-master create
  Topping up keypool...
  Wallet info
  ===========
  Name: 211025-test-master
  Format: sqlite
  Descriptors: yes
  Encrypted: no
  HD (hd seed available): yes
  Keypool Size: 6000
  Transactions: 0
  Address Book: 0
  $ src/bitcoin-cli -signet -rpcwallet=211025-test-master getwalletinfo
  {
    "walletname": "211025-test-master",
    "walletversion": 139900,
    "format": "sqlite",
    "balance": 0.00000000,
    "unconfirmed_balance": 0.00000000,
    "immature_balance": 0.00000000,
    "txcount": 0,
    "keypoolsize": 3000,
    "keypoolsize_hd_internal": 3000,
    "paytxfee": 0.00000000,
    "private_keys_enabled": true,
    "avoid_reuse": false,
    "scanning": false,
    "descriptors": true
  }
  ```

  With this PR -- `"walletversion": 169900`:
  ```
  $ src/bitcoin-wallet -signet -wallet=211025-test-pr create
  Topping up keypool...
  Wallet info
  ===========
  Name: 211025-test-pr
  Format: sqlite
  Descriptors: yes
  Encrypted: no
  HD (hd seed available): yes
  Keypool Size: 6000
  Transactions: 0
  Address Book: 0
  $ src/bitcoin-cli -signet -rpcwallet=211025-test-pr getwalletinfo
  {
    "walletname": "211025-test-pr",
    "walletversion": 169900,
    "format": "sqlite",
    "balance": 0.00000000,
    "unconfirmed_balance": 0.00000000,
    "immature_balance": 0.00000000,
    "txcount": 0,
    "keypoolsize": 3000,
    "keypoolsize_hd_internal": 3000,
    "paytxfee": 0.00000000,
    "private_keys_enabled": true,
    "avoid_reuse": false,
    "scanning": false,
    "descriptors": true
  }
  ```

ACKs for top commit:
  lsilva01:
    Code Review ACK 5b6b5ef
  stratospher:
    ACK 5b6b5ef.
  rajarshimaitra:
    ACK 5b6b5ef5d1
  meshcollider:
    Code review ACK 5b6b5ef5d178bea3c1b2f21e3bd05186312ea191

Tree-SHA512: 0221e76fa8f29037920d0a483c742bf270ecaead45f30230943b78775aaea63ac052e43fe712d15c2326e515dea2d2ac82de0924882598421c1874f2e6f442a6
2024-04-10 01:58:59 +07:00
MarcoFalke
25248f9cb7
Merge #20365: wallettool: add parameter to create descriptors wallet
173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12 test: walettool create descriptors (Ivan Metlushko)
345e88eecf1b28607d5da3af38e19794a8a115ce wallettool: add param to create descriptors wallet (Ivan Metlushko)
6d3af3ab627096a824cb6a7ca1ebeddc7530361c wallettool: pass in DatabaseOptions into MakeWallet (Ivan Metlushko)

Pull request description:

  Rationale: expose and promote descriptor wallets in more places; make cli tool more consistent with `createwallet` rpc.

  Add `-descriptors` parameter which is off by default. When specified it will create a new descriptors wallet with sqlite backend, which is consistent with `createwallet` rpc.

  This PR is based on a suggestion from **ryanofsky** https://github.com/bitcoin/bitcoin/pull/19137#discussion_r516779603

  Example:
  ```
  $ ./src/bitcoin-wallet  -wallet=fewty -descriptors create
  Topping up keypool...
  Wallet info
  ===========
  Name: fewty
  Format: sqlite
  Descriptors: yes
  Encrypted: no
  HD (hd seed available): yes
  Keypool Size: 6000
  Transactions: 0
  Address Book: 0
  ```
  ```
  $ ./src/bitcoin-wallet  -wallet=fewty create
  Topping up keypool...
  Wallet info
  ===========
  Name: fewty
  Format: bdb
  Descriptors: no
  Encrypted: no
  HD (hd seed available): yes
  Keypool Size: 2000
  Transactions: 0
  Address Book: 0
  ```

ACKs for top commit:
  achow101:
    ACK 173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12
  ryanofsky:
    Code review ACK 173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12. This seems pretty nicely implemented now, with opportunities to clean up more and dedup later
  MarcoFalke:
    Concept ACK 173cc9b7be335b5dd2cc1bb112dfa6ec5c13ec12 🌠

Tree-SHA512: cc32ba336ff709de2707ee15f495b4617908e8700ede8401a58e894f44cda485c544d644023c9a6604d88a62db9d92152383ee2e8abf691688c25cf6e222c622
2024-04-10 01:58:58 +07:00
Konstantin Akimov
7eb9b590de
fix: follow-up changes for #17261 of usages ScriptPubKeyMan inside WalletTool
It should be get-or-create instead just-get
2024-04-10 01:58:58 +07:00
Konstantin Akimov
00d4ad5102
fix: assert if coinjoin-loader is nullptr during wallet initialization 2024-04-10 01:58:58 +07:00
Konstantin Akimov
31040abae6
fix: isHDenabled is true only when chain is generated; before that's always false 2024-04-10 01:58:57 +07:00
Kittywhiskers Van Gogh
fae5696d82
init: move CActiveMasternodeManager construction before PeerManager 2024-04-09 15:41:08 +00:00
MarcoFalke
e36eacd868
Merge #18772: rpc: calculate fees in getblock using BlockUndo data
66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e test: RPC: getblock fee calculations (Elliott Jin)
bf7d6e31b1062ab5f90e14e83c56309f499fa2e9 RPC: getblock: tx fee calculation for verbosity 2 via Undo data (Elliott Jin)

Pull request description:

  This change is progress towards #18771 .  It adapts the fee calculation part of #16083 and addresses some feedback.  The additional "verbosity level 3" features are planned for a future PR.

  **Original PR description:**

  > Using block undo data (like in #14802) we can now show fee information for each transaction in a block without the need for additional -txindex and/or a ton of costly lookups. For a start we'll add transaction fee information to getblock verbosity level 2. This comes at a negligible speed penalty (<1%).

ACKs for top commit:
  luke-jr:
    tACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e
  fjahr:
    tACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e
  MarcoFalke:
    review ACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e 🗜

Tree-SHA512: be1fe4b866946a8dc36427f7dc72a20e10860e320a28fa49bc85bd2a93a0d699768179be29fa52e18b2ed8505d3ec272e586753ef2239b4230e0aefd233acaa2
2024-04-09 22:34:38 +07:00
MarcoFalke
41a1e10954
Merge #20690: Clean up logging of outbound connection type
6d1e85f475a8af3ca0e094ed101dc19704e5ab74 Clean up logging of outbound connection type (Suhas Daftuar)

Pull request description:

  We have a function that converts `ConnectionType` enums to strings, so use it.

  Suggested by ajtowns in https://github.com/bitcoin/bitcoin/pull/19858#discussion_r540791588

ACKs for top commit:
  amitiuttarwar:
    ACK 6d1e85f475a8af3ca0e094ed101dc19704e5ab74
  naumenkogs:
    ACK 6d1e85f

Tree-SHA512: f5084d8b5257380696d9fde86a8873e190cd4553feb07fa49df39bbd9510bf5832d190a3bca1571c48370d16a17c7a34900857b21b27bec0777bfa710211d7bb
2024-04-09 22:34:37 +07:00
Jonas Schnelli
648d6f04fb
Merge bitcoin-core/gui#13: Hide peer detail view if multiple are selected
76277cc77dea39b53e09ee1c440cd37270826201 qt: Hide peer detail view if multiple are selected (João Barbosa)

Pull request description:

  Currently if multiple peers are selected the peer detail view shows the first new selected peer.

  With this PR the peer detail view is hidden when multiple peers are selected. It is also a slight refactor to simplify and remove duplicate code.

ACKs for top commit:
  jonasschnelli:
    Tested ACK 76277cc77dea39b53e09ee1c440cd37270826201.
  hebasto:
    ACK 76277cc77dea39b53e09ee1c440cd37270826201, tested on Linux Mint 20 (Qt 5.12.8).

Tree-SHA512: 16c9cfd6ccb7077a9f31917a6cb3532e32d17d21f735e43bf4720fb0c8bb1bd539d42569c105df4b551f5dccb4acaeedb6bb2362620a9cb9267a602d9d065b9f
2024-04-09 22:34:37 +07:00
pasta
ce992f7a3a
Merge #5972: chore: merge master 20.1.1 back into develop
b96b20283d chore: bump version to 20.1.1 (pasta)
83cac77335 docs: add v20.1.1 release notes (pasta)
e58c7c443c Merge #5970: guix: exclude debug symbols for apple from list of hashes due to its non-determinism (pasta)
2bde1ddca4 Merge #5927: fix: check if message can be handled before attempting to deserialize (pasta)
1637fa5a9e Merge #5968: docs: add v20.0.4 release notes (pasta)
fd46c4ccda Merge #5962: fix: deadlock over cs_main and contributionsCacheCs in dkssessionmgr (pasta)

Pull request description:

  Merge master into develop

Top commit has no ACKs.

Tree-SHA512: e65ffefcb7d0e92367ff322cab533f8505f0e9d00ab136bccb1dbf86ad64d6b710b5c9f9943594c544827d2eb69f5d0ba185962a2ac0b16c6b776a94f44cfb42
2024-04-09 08:46:55 -05:00
UdjinM6
250856d7a6
Merge branch 'master' into merge_master_20.1.1 2024-04-05 20:33:07 +03: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
pasta
19512988c6
Merge #5969: chore: backport items to 20.1.x and release v20.1.1
b96b20283d chore: bump version to 20.1.1 (pasta)
83cac77335 docs: add v20.1.1 release notes (pasta)
e58c7c443c Merge #5970: guix: exclude debug symbols for apple from list of hashes due to its non-determinism (pasta)
2bde1ddca4 Merge #5927: fix: check if message can be handled before attempting to deserialize (pasta)
1637fa5a9e Merge #5968: docs: add v20.0.4 release notes (pasta)
fd46c4ccda Merge #5962: fix: deadlock over cs_main and contributionsCacheCs in dkssessionmgr (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Backport to v20.1.x and release v20.1.1

  ## What was done?
  Backports and release

  ## How Has This Been Tested?

  ## 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: 40574df3349bf1c653a50b4efbf78d1654eb048eeeb483eb657eec5f2af102f95cff8f978a98c174925d2672d56426238a1b7ec3e8cd2a53ec28c0fca42c1293
2024-04-03 13:31:31 -05:00
pasta
b96b20283d
chore: bump version to 20.1.1 2024-04-03 13:12:29 -05:00
pasta
83cac77335
docs: add v20.1.1 release notes
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: thephez <thephez@users.noreply.github.com>
2024-04-03 13:12:29 -05:00
pasta
e58c7c443c
Merge #5970: guix: exclude debug symbols for apple from list of hashes due to its non-determinism
a29f82670b guix: exclude debug symbols for apple from list of hash sums due to its undeterminism (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Debug symbols for apples are non-deterministic. Due to that all list of hash sums differ between build.
  It causes to impossible to merge all GPG signatures to one file *.asc, because different files are signed.
  For example these hash lists: https://github.com/dashpay/guix.sigs/blob/master/20.1.0/knst/all.SHA256SUMS#L6 and https://github.com/dashpay/guix.sigs/blob/master/20.1.0/thephez/all.SHA256SUMS#L6
  are different:
  ```
  ac87fd17eb19edcaa83b2cbf02e6d74ec12b1eaab50fc73789413bb04f1e04b5  dashcore-20.1.0-arm64-apple-darwin-debug.tar.gz
  e16eaa02e24cdf643b58831c96bf1494c02602651e977994c8317f752b4c3ae3  dashcore-20.1.0-arm64-apple-darwin-debug.tar.gz
  ```

  ## What was done?
  It excludes the line with hash of apples's debug artefact from the final list.

  ## How Has This Been Tested?
  Run guix build and guix attest locally for 2 targets. There's output:
  ```
  $ cat ~/projects/guix.sigs/20.1.0-317-ga29f82670b96/knst/noncodesigned.SHA256SUMS
  f20cee2e348a850d39f79a6f06ce8019aca577bf5da0e81a3eb1d06013c0d3d9  dashcore-20.1.0-317-ga29f82670b96.tar.gz
  e01c18b817793a7d71173c9b2d84b32d7bdc27e67fbd2ac35ad85457bed5b5c3  dashcore-20.1.0-317-ga29f82670b96-x86_64-apple-darwin-unsigned.dmg
  0987f99859a4a7c5c1676a754f022f97dfe1dd8fdd8a35170e3144f43d317270  dashcore-20.1.0-317-ga29f82670b96-x86_64-apple-darwin-unsigned.tar.gz
  2afdffd9e5b959dd1f54baadf2e8c7159147050ea032074b6d606945621e9a28  dashcore-20.1.0-317-ga29f82670b96-x86_64-apple-darwin.tar.gz
  2f3af85fddb12cb6ff6f9c370b9bbb7b4893ed90748cefbb55fc4ce4d22cb3e9  dashcore-20.1.0-317-ga29f82670b96-x86_64-linux-gnu-debug.tar.gz
  19daa1c8310d3097bf25713a551f2bcd59eccfa882b3b413db36591d6ec7c204  dashcore-20.1.0-317-ga29f82670b96-x86_64-linux-gnu.tar.gz
  ```
  linux's debug is still here, apple's debug is not here as expected

  ## 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 a29f826

Tree-SHA512: d3b85ffea440b1b1d13b19373a9928e2881120747363844d4a9293d19afd986b98f096f3cdeee46acc93ca213200be44cadd867c3c77b9be55b7b81ecfcc156d
2024-04-03 13:04:39 -05:00
pasta
43d0b3c74c
Merge #5970: guix: exclude debug symbols for apple from list of hashes due to its non-determinism
a29f82670b guix: exclude debug symbols for apple from list of hash sums due to its undeterminism (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Debug symbols for apples are non-deterministic. Due to that all list of hash sums differ between build.
  It causes to impossible to merge all GPG signatures to one file *.asc, because different files are signed.
  For example these hash lists: https://github.com/dashpay/guix.sigs/blob/master/20.1.0/knst/all.SHA256SUMS#L6 and https://github.com/dashpay/guix.sigs/blob/master/20.1.0/thephez/all.SHA256SUMS#L6
  are different:
  ```
  ac87fd17eb19edcaa83b2cbf02e6d74ec12b1eaab50fc73789413bb04f1e04b5  dashcore-20.1.0-arm64-apple-darwin-debug.tar.gz
  e16eaa02e24cdf643b58831c96bf1494c02602651e977994c8317f752b4c3ae3  dashcore-20.1.0-arm64-apple-darwin-debug.tar.gz
  ```

  ## What was done?
  It excludes the line with hash of apples's debug artefact from the final list.

  ## How Has This Been Tested?
  Run guix build and guix attest locally for 2 targets. There's output:
  ```
  $ cat ~/projects/guix.sigs/20.1.0-317-ga29f82670b96/knst/noncodesigned.SHA256SUMS
  f20cee2e348a850d39f79a6f06ce8019aca577bf5da0e81a3eb1d06013c0d3d9  dashcore-20.1.0-317-ga29f82670b96.tar.gz
  e01c18b817793a7d71173c9b2d84b32d7bdc27e67fbd2ac35ad85457bed5b5c3  dashcore-20.1.0-317-ga29f82670b96-x86_64-apple-darwin-unsigned.dmg
  0987f99859a4a7c5c1676a754f022f97dfe1dd8fdd8a35170e3144f43d317270  dashcore-20.1.0-317-ga29f82670b96-x86_64-apple-darwin-unsigned.tar.gz
  2afdffd9e5b959dd1f54baadf2e8c7159147050ea032074b6d606945621e9a28  dashcore-20.1.0-317-ga29f82670b96-x86_64-apple-darwin.tar.gz
  2f3af85fddb12cb6ff6f9c370b9bbb7b4893ed90748cefbb55fc4ce4d22cb3e9  dashcore-20.1.0-317-ga29f82670b96-x86_64-linux-gnu-debug.tar.gz
  19daa1c8310d3097bf25713a551f2bcd59eccfa882b3b413db36591d6ec7c204  dashcore-20.1.0-317-ga29f82670b96-x86_64-linux-gnu.tar.gz
  ```
  linux's debug is still here, apple's debug is not here as expected

  ## 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 a29f826

Tree-SHA512: d3b85ffea440b1b1d13b19373a9928e2881120747363844d4a9293d19afd986b98f096f3cdeee46acc93ca213200be44cadd867c3c77b9be55b7b81ecfcc156d
2024-04-03 13:04:02 -05:00
pasta
fbcef10cf4
Merge #5956: refactor: add cs_mapSocketToNode and cs_sendable_receivable_nodes to minimize cs_vNode contention (and document an undocumented lock requirement)
0b8fe48fbe refactor: add cs_mapSocketToNode and cs_sendable_receivable_nodes to minimize cs_vNode contention (and document an undocumented lock requirement) (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Reduce locking contention on cs_vNode

  ## What was done?
  added new mutex

  ## How Has This Been Tested?
  Building running locally on testnet

  ## Breaking Changes
  None

  ## 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

Top commit has no ACKs.

Tree-SHA512: b7a3aa8078cf7f2b5f9a833a345e405351a927fa517993d77cefa77c9d109c5d92e06b6d3f91093b0fa4d91c4a464f19ce4eb457e486f9532ce890f02b9b99e1
2024-04-03 12:27:51 -05:00
pasta
c0c6a90426
Merge #5964: backport: merge bitcoin#19763, #20653, #20756, #19315, #20646, #21015, #19771, #21425, #21236, #21198, #21707, #21785, #21506, #22107, partial bitcoin#21186, merge gui#226, partial gui#206 (networking backports: part 2)
e89c555b0f merge bitcoin#22107: rename GetSystemTimeInSeconds to GetTimeSeconds (Kittywhiskers Van Gogh)
2e55327f55 net: introduce CanRelayAddrs as RelayAddrsWithConn substitute (Kittywhiskers Van Gogh)
5478001a81 partial bitcoin#21186: Move addr data into net_processing (Kittywhiskers Van Gogh)
26c39f5b92 net: replace RelayAddrsWithConn check with !IsBlockOnlyConn (Kittywhiskers Van Gogh)
4844e729e2 merge bitcoin#21506: make NetPermissionFlags an enum class (Kittywhiskers Van Gogh)
03ab144b8f merge bitcoin#21785: Fix intermittent issue in p2p_addr_relay.py (Kittywhiskers Van Gogh)
6d27db58d1 merge bitcoin#21707: Extend functional tests for addr relay (Kittywhiskers Van Gogh)
39384ba461 merge bitcoin#21198: Address outstanding review comments from PR20721 (Kittywhiskers Van Gogh)
d34d2c4efb merge bitcoin#21236: Extract addr send functionality into MaybeSendAddr() (Kittywhiskers Van Gogh)
ba1df91d8d merge bitcoin#21425: Pass PeerManagerImpl members only once (Kittywhiskers Van Gogh)
5c4c7c55f8 merge bitcoin#19771: Replace enum CConnMan::NumConnections with enum class ConnectionDirection (Kittywhiskers Van Gogh)
62a7311fe4 merge bitcoin#21015: Make all of net_processing (and some of net) use std::chrono types (Kittywhiskers Van Gogh)
8b204c4c82 merge bitcoin-core/gui#226: Add "Last Block" and "Last Tx" rows to peer details area (Kittywhiskers Van Gogh)
3e8ba24c87 partial bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details (Kittywhiskers Van Gogh)
e109c0042a merge bitcoin#20646: refer to BIPs 339/155 in feature negotiation (Kittywhiskers Van Gogh)
1d4f10a378 merge bitcoin#19315: Allow outbound & block-relay-only connections in functional tests (Kittywhiskers Van Gogh)
b76e029e44 merge bitcoin#20756: Add missing field (permissions) to the getpeerinfo help (Kittywhiskers Van Gogh)
d0c596e91d merge bitcoin#20653: Move addr relay comment in net to correct place (Kittywhiskers Van Gogh)
017d1b40e3 merge bitcoin#19763: don't relay to the address' originator (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * [bitcoin#19763](https://github.com/bitcoin/bitcoin/pull/19763) doesn't play nice on its own, `p2p_addr_relay.py` fails because of `assert_equal(total_ipv4_received, num_ipv4_addrs * ipv4_branching_factor)` where `not(0 == 20)`. It only works with [bitcoin#21707](https://github.com/bitcoin/bitcoin/pull/21707).
  * In the GUI/Qt wallet, the peer information tab in the debug window has three fields added to them, "Wants Tx Relay", "Last Block" and "Last Tx".
  * The RPC help text for `getpeerinfo` now includes help text for the `permissions` return value and a debug RPC called `addconnection` has been introduced.

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

Tree-SHA512: 2be14351c22852b1318ded496fea60536db40659ab14e71bde02082935120bfb9df275790a4cb3170f54bcb4b2fb4f44096dd0e7cc703a705127ee294be39894
2024-04-03 11:54:48 -05:00
Konstantin Akimov
a29f82670b
guix: exclude debug symbols for apple from list of hash sums due to its undeterminism 2024-04-03 23:45:24 +07:00
pasta
2bde1ddca4
Merge #5927: fix: check if message can be handled before attempting to deserialize
afbae06520 fix: check if message can be handled before attempting to deserialize (thephez)

Pull request description:

  ## Issue being fixed or feature implemented
  Currently `message-capture-parser.py` crashes when encountering certain messages (e.g. mnauth). This at least makes it possible to run the script without crashing. There may be better options for solving this.

  ## What was done?
  Check if the dictionary is going to return `None` before we attempt to do something further with it. Hide whitespace changes to see the few lines that were added: https://github.com/dashpay/dash/pull/5927/files?diff=unified&w=1

  ## How Has This Been Tested?
  Running script locally

  ## Breaking Changes
  N/A

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

Top commit has no ACKs.

Tree-SHA512: 041af57afcfd1d93487fd41d34a50e3a99f7fa129563dfe1e1cf2498974c8e658bd6acb9c810887c841160074056ba999e9b6607ac9336b98b9d42806682c607
2024-04-03 11:21:15 -05:00
pasta
1637fa5a9e
Merge #5968: docs: add v20.0.4 release notes
7f57516d04 docs: add v20.0.4 release notes (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  We didn't archive v20.0.4 release notes somehow in #5910

  ## What was done?
  Archive 20.0.4 release notes

  ## How Has This Been Tested?

  ## 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: d703dedf1aad2afb5eb8af291f89e38fa2dfb4185ef9e25194c273bb9f04ae8075ea87318552b468b1a487b39b95cf1dee794d3d3c5b8a863dbfd6d458ee8e72
2024-04-03 11:15:17 -05:00
pasta
e1532db3e1
Merge #5968: docs: add v20.0.4 release notes
7f57516d04 docs: add v20.0.4 release notes (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  We didn't archive v20.0.4 release notes somehow in #5910

  ## What was done?
  Archive 20.0.4 release notes

  ## How Has This Been Tested?

  ## 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: d703dedf1aad2afb5eb8af291f89e38fa2dfb4185ef9e25194c273bb9f04ae8075ea87318552b468b1a487b39b95cf1dee794d3d3c5b8a863dbfd6d458ee8e72
2024-04-03 11:12:29 -05:00
Kittywhiskers Van Gogh
e89c555b0f
merge bitcoin#22107: rename GetSystemTimeInSeconds to GetTimeSeconds 2024-04-03 16:10:18 +00: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
5478001a81
partial bitcoin#21186: Move addr data into net_processing
excludes:
- 0829516d1f3868c1c2ba507feee718325d81e329
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
4844e729e2
merge bitcoin#21506: make NetPermissionFlags an enum class 2024-04-03 16:10:16 +00:00
Kittywhiskers Van Gogh
03ab144b8f
merge bitcoin#21785: Fix intermittent issue in p2p_addr_relay.py 2024-04-03 16:10:16 +00:00
Kittywhiskers Van Gogh
6d27db58d1
merge bitcoin#21707: Extend functional tests for addr relay 2024-04-03 16:10:16 +00:00
Kittywhiskers Van Gogh
39384ba461
merge bitcoin#21198: Address outstanding review comments from PR20721 2024-04-03 16:10:16 +00:00
Kittywhiskers Van Gogh
d34d2c4efb
merge bitcoin#21236: Extract addr send functionality into MaybeSendAddr() 2024-04-03 16:10:15 +00:00
Kittywhiskers Van Gogh
ba1df91d8d
merge bitcoin#21425: Pass PeerManagerImpl members only once 2024-04-03 16:10:15 +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
Kittywhiskers Van Gogh
62a7311fe4
merge bitcoin#21015: Make all of net_processing (and some of net) use std::chrono types 2024-04-03 16:10:14 +00:00
Kittywhiskers Van Gogh
8b204c4c82
merge bitcoin-core/gui#226: Add "Last Block" and "Last Tx" rows to peer details area 2024-04-03 16:07:20 +00:00
Kittywhiskers Van Gogh
3e8ba24c87
partial bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details
excludes:
- 142807af8b82e2372a03df893c50df4f4a96aca4
2024-04-03 16:07:20 +00:00
Kittywhiskers Van Gogh
e109c0042a
merge bitcoin#20646: refer to BIPs 339/155 in feature negotiation 2024-04-03 16:06:41 +00:00
Kittywhiskers Van Gogh
1d4f10a378
merge bitcoin#19315: Allow outbound & block-relay-only connections in functional tests 2024-04-03 16:06:40 +00:00
pasta
7f57516d04
docs: add v20.0.4 release notes 2024-04-03 11:05:47 -05:00
Kittywhiskers Van Gogh
b76e029e44
merge bitcoin#20756: Add missing field (permissions) to the getpeerinfo help 2024-04-03 16:05:31 +00:00
Kittywhiskers Van Gogh
d0c596e91d
merge bitcoin#20653: Move addr relay comment in net to correct place
comment was moved to net.h in 678df631 (#4888) and removed entirely in
796353ad (#5771). the comment is being restored back to where it is
upstream, in CNode::RelayAddrsWithConn.
2024-04-03 16:05:30 +00:00
Kittywhiskers Van Gogh
017d1b40e3
merge bitcoin#19763: don't relay to the address' originator 2024-04-03 16:05:30 +00:00
pasta
fd46c4ccda
Merge #5962: fix: deadlock over cs_main and contributionsCacheCs in dkssessionmgr
ded1b5a3df fix: deadlock over cs_main and contributionsCacheCs in dkssessionmgr (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  **It fixes rpc failure: "Work queue depth exceeded"**

  As I checked on running `dashd` in deadlock condition:
  Thread 78 is a thread that keep `cs_main`:
  ```
  #14 0x0000aaaad1f8d604 in BuildSimplifiedMNListDiff () at evo/simplifiedmns.cpp:364
  ```
  but it is locked by `contributionsCacheCs`
  ```
  #8  llmq::CDKGSessionManager::GetVerifiedContributions () at llmq/dkgsessionmgr.cpp:392
  ```

  On other hand, `contributionsCacheCs` is blocked by Thread 59
  ```
  #17 0x0000aaaad1ba1940 in llmq::CDKGSessionManager::GetVerifiedContributions () at llmq/dkgsessionmgr.cpp:393
  ```
  and it makes circuit lock by waiting `cs_main` in
  ```
  #9  ReadBlockFromDisk () at node/blockstorage.cpp:75
  ```

  See https://github.com/dashpay/dash-issues/issues/69 for more details

  Seems introduced there: dashpay/dash#3911

  ## What was done?
  Deadlock is removed by reducing scope of mutex

  ## How Has This Been Tested?
  I reviewed 2 different servers which have status `work queue exceeded`, both have same deadlock, so, this patch should fix this issue. Once this fix is merged, we can test it on testnet.

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

Top commit has no ACKs.

Tree-SHA512: 4fe5c03c464ee6934fb927b897f007b65a8995723196edaffdae067edee7067da151130d4c4bac47d3418fdad5c8e130682f42d7ef9c044380a8c8fff78ee008
2024-04-03 10:55:46 -05:00
pasta
dc6f52ac99
Merge #5961: feat: implement read write locks in threading and use them for CActiveMasternodeManager::cs
069282611c refactor: make CActiveMasternodeManager::cs SharedMutex and private (pasta)
663774c544 feat: implement Read Write Locks in threading (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  We have some caches or other information in codebase which are read from a lot; but rarely written to. We can use a RW lock here instead of a normal Mutex

  ## What was done?
  Implement a RW lock and use them

  ## How Has This Been Tested?
  Hasn't been much; looking for review atm. Maybe should deploy this on testnet for a bit and make sure it doesn't break.
  ## Breaking Changes

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

Tree-SHA512: a9759d4904580eebb5ddf9e05d3d54cf4b0b0db971f09d2f4cb093fddc0a13094998ef2af301de581fd64dc1235df80bace7f701ab437c2ecfa663b4fc6e25ed
2024-04-03 10:36:12 -05:00
pasta
0b8fe48fbe
refactor: add cs_mapSocketToNode and cs_sendable_receivable_nodes to minimize cs_vNode contention (and document an undocumented lock requirement) 2024-04-03 10:33:02 -05:00
pasta
0a22b3ed3d
Merge #5958: backport: bitcoin#20182 ci: Build with --enable-werror by default, and document exceptions
a47635baad feat: drop symbol check from CI to unify with bitcoin, keep it for qt5 only (Konstantin Akimov)
0c38cc325e fix: drop -static-libstc++ from depends/hosts/{linux,mingw32}.mk which is clang-only (Konstantin Akimov)
14a67ee85e Merge #20182: ci: Build with --enable-werror by default, and document exceptions (MarcoFalke)

Pull request description:

  ## Issue being fixed or feature implemented
  As discovered in #5957:

  Jobs tsan/ubsan fails with backport bitcoin#20182

  it fails, because both tsan and ubsan jobs use clang but all other jobs use gcc. Somehow, after configure there are set incorrect options:

  ```
  clang++-16 -std=c++17 -c -pipe -static-libstdc++ -O1   -Werror -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_DEBUG=1 -I/builds/dashpay/dash/depends/x86_64-pc-linux-gnu/include/  conftest.cpp
  ```

  `clang` doesn't support `-static-llibstdc++` which is supposed to be gcc-only, it cause this failure:
  ```
  clang: error: argument unused during compilation: '-static-libstdc++' [-Werror,-Wunused-command-line-argument]
  ```

  This failure make `autoconf` to think that clang doesn't support `-Werror` and fails with this error. So, you can't activate this flag.

  ## What was done?
  Backport bitcoin#20182 and related fixes to make it works

  ## How Has This Been Tested?
  CI now succeed with bitcoin#20182. It means, that -Werror activated for clang; also there are not warnings such as:
  ```
  clang: error: argument unused during compilation: '-static-libstdc++' [-Werror,-Wunused-command-line-argument]
  ```
  https://gitlab.com/dashpay/dash/-/jobs/6494328698

  ## 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
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: f912824eaa1ec7513cda7278a3df9e067b0ab48a2d174b18654c8070aa6544bac33a52f494c1e35b4eab10392c1f26df4663e21d12a4dfff7c0a4a6a01ff9551
2024-04-03 10:30:30 -05:00