Commit Graph

25687 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
cf940e8d85
init: decouple CMasternodeMetaMan construction from initialization 2024-04-09 20:45:28 +00:00
Jonas Schnelli
a2f190deff
Merge bitcoin-core/gui#115: Replace "Hide tray icon" option with positive "Show tray icon" one
03edb52eee5a87af16161c23bdc6cde91a2e5b8b qt: Remove redundant BitcoinGUI::setTrayIconVisible (Hennadii Stepanov)
17174f8328c44ae84479e8365c122ad8502bd7da gui: Replace "Hide tray icon" option with positive "Show tray icon" one (Hennadii Stepanov)

Pull request description:

  This change makes easier both (1) using this option, and (2) reasoning about the code.

ACKs for top commit:
  jonasschnelli:
    utACK 03edb52eee5a87af16161c23bdc6cde91a2e5b8b

Tree-SHA512: 38e317492210d4fb13302dea383bd1f4f0ae1219d7ff2fdcb78607f15ac61a51969acaadb59b72c3f075b6356ef54368eb46fb49e6e1bd42db6d5804b97e232b
2024-04-10 03:19:40 +07:00
MarcoFalke
65b80e76b7
Merge #21531: test: remove qt byteswap compattests
9ac86bcc0d72cdcecdbf8884a557095bbc3cdc11 test: remove qt byteswap compattests (fanquake)

Pull request description:

  These were added as part of #9366 when with fixing issues with Protobuf.

  Now that we no-longer use Protobuf, there's no reason to maintain a duplicate set of byteswap tests in the qt tests. Our other set of byteswap tests are here: https://github.com/bitcoin/bitcoin/blob/master/src/test/bswap_tests.cpp.

ACKs for top commit:
  laanwj:
    Code review ACK 9ac86bcc0d72cdcecdbf8884a557095bbc3cdc11

Tree-SHA512: 72ba131a5f8fbd9fdbbc4e1f95baa794496c960b12e0271700c632c6511b7e1b331e8db07a201838b4d56b2aeeb43d4de4e10265ea07ab14241307fa14d3342e
2024-04-10 03:19:40 +07:00
MarcoFalke
ba883c5da2
Merge bitcoin-core/gui#139: doc: Improve gui/src/qt README.md
5d1f260713f9f1d29c0db68f2917dfe7368d4ba0 Improve gui/src/qt README.md (Jarol Rodriguez)

Pull request description:

  **Master/Before:** [Render of Master](https://github.com/bitcoin-core/gui/blob/master/src/qt/README.md)

  **PR/After:** [Render of PR](5d1f260713/src/qt/README.md)

  **Changes:**
  The README.md found in `gui/src/qt` seems to not have gotten any love in a while. This PR fixes some grammatical errors, makes it easier to follow, and modernizes the logic of using Qt Creator.
  1. Makes several sections more informative
  2. Directories under `Files and Directories` now end with a forward slash denoting that they are a directory
  3. Modernize the Qt Creator Logic for the current setup flow
  4. Add UNIX Qt Creator Setup Instructions (Ubuntu & Debian)

ACKs for top commit:
  RandyMcMillan:
    ACK 5d1f260 👍🏼
  jonatack:
    ACK 5d1f260713f9f1d29c0db68f2917dfe7368d4ba0

Tree-SHA512: bd5cc24b95460f34a1efa489a6acc10d7632c84eabdcdc5729ef077d8303cf037ed664aae033af8883252433ea0999d8ec7d92e8b03d03a873d32b041a94f813
2024-04-10 03:19:39 +07:00
Jonas Schnelli
368c65d050
Merge bitcoin-core/gui#72: util: Log static plugins meta data and used style
957895c715f86feaa26c806e5fa8ebb77430a926 util: Log static plugins meta data and style (Hennadii Stepanov)

Pull request description:

  This PR is a follow-up of https://github.com/bitcoin/bitcoin/pull/17826, and adds additional info about the imported static plugins and the used style to the `debug.log` I found useful for testing (e.g., with `QT_QPA_PLATFORM`, `QT_QPA_PLATFORMTHEME`, `QT_STYLE_OVERRIDE` variables) and debugging issues (e.g., https://github.com/bitcoin/bitcoin/pull/19716#issuecomment-674052881).

  The excerpt from the log:
  ```
  2020-11-15T18:41:45Z [main] Bitcoin Core version v0.20.99.0-f0b933f78 (release build)
  2020-11-15T18:41:45Z [main] Qt 5.9.8 (static), plugin=xcb (static)
  2020-11-15T18:41:45Z [main] Static plugins:
  2020-11-15T18:41:45Z [main]  QXcbIntegrationPlugin, version 329992
  2020-11-15T18:41:45Z [main] Style: fusion / QFusionStyle
  ...
  ```

ACKs for top commit:
  jarolrod:
    ACK 957895c715f86feaa26c806e5fa8ebb77430a926, Tested on macOS 11.1
  jonasschnelli:
    utACK 957895c715f86feaa26c806e5fa8ebb77430a926

Tree-SHA512: 0e46db7560f380fbda8ce5e53faa5d419a456e90ca595ce46be8e3030c99d3a113586edad1988a97e9bf0279e944f975968ed1156817bc16723ed31c64850239
2024-04-10 03:19:39 +07:00
MarcoFalke
317777e7d7
Merge bitcoin-core/gui#171: Use layout manager for Create Wallet dialog
d4feb6812a2707ef85d75dda4372086ec62eb922 qt: Use layout manager for Create Wallet dialog (Hennadii Stepanov)

Pull request description:

  On master (e75f91eae3936269b40b4bfdfe540d5526270936) not using layout manager causes problems with resizing:

  ![Screenshot from 2021-01-01 13-03-13](https://user-images.githubusercontent.com/32963518/103437728-ce1d4580-4c33-11eb-8915-1e9482775653.png)
  ![Screenshot from 2021-01-01 13-03-26](https://user-images.githubusercontent.com/32963518/103437730-d6758080-4c33-11eb-9e0f-87d0dd487fcb.png)

  Also text labels are not resized properly on some window managers (https://github.com/bitcoin/bitcoin/issues/20777), or if their lengths are changed (after translation).

  This PR introduces a standard layout manager for the "Create Wallet" dialog that fixes all layout issues (actually, the `createwalletdialog.ui` has been re-written from scratch):

  ![Screenshot from 2021-01-01 13-10-03](https://user-images.githubusercontent.com/32963518/103437822-d0cc6a80-4c34-11eb-84fd-fcb10a16d9ef.png)
  ![Screenshot from 2021-01-06 23-50-36](https://user-images.githubusercontent.com/32963518/103823090-0b416780-507a-11eb-89dd-3f48a358e168.png)

  Additional visual changes:
  - advanced options are grouped in `QGroupBox` (https://github.com/bitcoin-core/gui/pull/96#issuecomment-726337165)
  - enabled the [size grip](https://doc.qt.io/qt-5/qsizegrip.html#details)

  Fix https://github.com/bitcoin/bitcoin/issues/20777

ACKs for top commit:
  jarolrod:
    ACK d4feb6812a2707ef85d75dda4372086ec62eb922
  Sjors:
    re-tACK d4feb6812a2707ef85d75dda4372086ec62eb922
  promag:
    Tested ACK d4feb6812a2707ef85d75dda4372086ec62eb922 on macos.

Tree-SHA512: 4c055962e49f88624900b880b33a866976d224628784593428b712d2e94563d77ddefddea3397134d20e72f738a8cf9aa885c1272fd9ffc90213c104435fb9f4
2024-04-10 03:19:39 +07:00
MarcoFalke
83313a5603
Merge bitcoin#20789: Rework strong and weak net enum fuzzing
missing faaef94
2024-04-10 03:19:38 +07:00
MarcoFalke
4a3e3af6e7
Merge #20813: scripted-diff: Bump copyright headers
fa0074e2d82928016a43ca408717154a1c70a4db scripted-diff: Bump copyright headers (MarcoFalke)

Pull request description:

  Needs to be done because no one has removed the years yet

ACKs for top commit:
  practicalswift:
    ACK fa0074e2d82928016a43ca408717154a1c70a4db

Tree-SHA512: 210e92acd7d400b556cf8259c3ec9967797420cfd19f0c2a4fa54cb2b3d32ad9ae27e771269201e7d554c0f4cd73a8b1c1a42c9f65d8685ca4d52e5134b071a3
2024-04-10 03:19:34 +07:00
Konstantin Akimov
31ffb78ced
feat: add option -usehd to wallettool to let create non-hd wallets 2024-04-10 01:59:00 +07:00
Konstantin Akimov
456e34c991
chore: drop debug printing of private keys to console stdout
Debug logs should not be printed to stdout, stderr exists for it.
Private keys should not be printed to console by activation very general
macros name "ENABLE_DASH_DEBUG".
This macros is used only for hdchain private keys, the location util/system.h
is too general for it.
Functional test "tool_wallet.py" is failed due to unexpected output for tsan.

It seems as easier to remove this logs due to too many issues with it
rather than address all of them.
2024-04-10 01:59:00 +07:00
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