Commit Graph

25972 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
805537e695
evo: add CMNHFManager::(Dis)connectManagers to remove global use 2024-05-28 15:20:13 +00:00
pasta
cb352c5179
Merge #5884: backport: Merge bitcoin#22423, 22096
6d44f36afd Merge bitcoin/bitcoin#22096: p2p: AddrFetch - don't disconnect on self-announcements (fanquake)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: 0a7def9eedeab85f4fb7a34e88ce7c051e3e97b7ec68cb91d02e3387de65d0756e11f0d53c66b8d6a2c886f67649b7887349ea48aaf1dd3af86e4e1ca81c29f1
2024-05-27 12:20:09 -05:00
fanquake
6d44f36afd
Merge bitcoin/bitcoin#22096: p2p: AddrFetch - don't disconnect on self-announcements
5730a43703f7e5a5ca26245ba3b55fbdd027d0b6 test: Add functional test for AddrFetch connections (Martin Zumsande)
c34ad3309f93979b274a37de013502b05d25fad8 net, rpc: Enable AddrFetch connections for functional testing (Martin Zumsande)
533500d9072b7d5a36a6491784bdeb9247e91fb0 p2p: Add timeout for AddrFetch peers (Martin Zumsande)
b6c5d1e450dde6a54bd785504c923adfb45c7060 p2p: AddrFetch - don't disconnect on self-announcements (Martin Zumsande)

Pull request description:

  AddrFetch connections (old name: oneshots) are intended to be short-lived connections on which we ask a peer for addresses via `getaddr` and disconnect after receiving them.

  This is done by disconnecting after receiving the first `addr`. However, it is no longer working as intended, because nowadays, the first `addr` a typical bitcoin core node sends is its self-announcement.
  So we'll disconnect before the peer gets a chance to answer our `getaddr`.

  I checked that this affects both `-seednode` peers specified manually, and DNS seeds when AddrFetch is used as a fallback if DNS doesn't work for us.

  The current behavior of getting peers via AddrFetch when starting with an empty addrman would be to connect to the peer, receive its self-announcement and add it to addrman, disconnect, reconnect to the same peer again as a full outbound (no other addresses in addrman) and then receive more `addr`. This is silly and not in line with AddrFetch peer being intended to be short-lived peers. 

  Fix this by only disconnecting after receiving an `addr` message of size > 1.

  [Edit] As per review discussion, this PR now also adds a timeout after which we disconnect if we haven't received any suitable `addr`, and a functional test.

ACKs for top commit:
  amitiuttarwar:
    reACK 5730a43703f7e5a5ca26245ba3b55fbdd027d0b6
  naumenkogs:
    ACK 5730a43703f7e5a5ca26245ba3b55fbdd027d0b6
  jnewbery:
    ACK 5730a43703

Tree-SHA512: 8a81234f37e827705138eb254223f7f3b3bf44a06cb02126fc7990b0d231b9bd8f07d38d185cc30d55bf35548a6fdc286b69602498d875b937e7c58332158bf9
2024-05-27 12:18:23 -05:00
Wladimir J. van der Laan
fab41fd3c5
partial Merge #18878: test: Add test for conflicted wallet tx notifications
Backport notice:
we don't have bumpfee feature, so, only some part of code is backported

f963a680515eda66429b3d1537a7baf281ab9283 test: Add test for conflicted wallet tx notifications (Russell Yanofsky)

Pull request description:

  Add test coverage for conflicted wallet transaction notifications so we can improve current behavior and avoid future regressions

  https://github.com/bitcoin/bitcoin/pull/9240 - accidental break
  https://github.com/bitcoin/bitcoin/issues/9479 - bug report
  https://github.com/bitcoin/bitcoin/pull/9371 - fix
  https://github.com/bitcoin/bitcoin/pull/16624 - accidental break
  https://github.com/bitcoin/bitcoin/issues/18325 - bug report
  https://github.com/bitcoin/bitcoin/pull/18600 - potential fix

ACKs for top commit:
  laanwj:
    ACK f963a680515eda66429b3d1537a7baf281ab9283
  jonatack:
    re-ACK f963a680515eda66429b3d1537a7baf281ab9283
  MarcoFalke:
    ACK f963a680515eda66429b3d1537a7baf281ab9283

Tree-SHA512: d3a7952a2d3dc2ff0800ef857575ea4ef9759c0917d58a7fc91e2db0ca3cc3baf0dd0cf9af61683f691e5fefb11afe8120bb5810c7037ed9ecedee385dd4aa07

fixup dashify of feature_notifications
2024-05-27 21:55:54 +07:00
MarcoFalke
db5bd34ee8
Merge #19202: log: remove deprecated db log category
c514a4f59a7430f05dbe20465ddf4ca323329f1e doc: release note for `db` log category removal (Jon Atack)
4c0c89307dabbf51a32551471c54966ddf7c5bc3 log: remove deprecated `db` log category (Jon Atack)

Pull request description:

  The `db` log category was renamed to `walletdb` (like `coindb`) in #17410 and its upcoming removal announced in the 0.20 release notes.

  ```
  - The `-debug=db` logging category has been renamed to
    `-debug=walletdb` to distinguish it from `coindb`.  The `-debug=db`
    option has been deprecated and will be removed in the next major
    release.  (#17410)
  ```

  This PR removes the warning and reverts to the usual behavior for an unrecognised log category.
  ```
  $ bitcoin-cli logging '["db"]'
  error code: -8
  error message:
  unknown logging category db
  ```
  ```
  $ ./src/bitcoind -debug=db
  Warning: Unsupported logging category -debug=db.
  2020-06-07T15:30:45Z Bitcoin Core version v0.20.99.0-4c0c89307d (debug build)
  2020-06-07T15:30:45Z Warning: Unsupported logging category -debug=db.
  2020-06-07T15:30:45Z Assuming ancestors of block 0000000000000000000f2adce67e49b0b6bdeb9de8b7c3d7e93b21e7fc1e819d have valid signatures.
  2020-06-07T15:30:45Z Setting nMinimumChainWork=00000000000000000000000000000000000000000e1ab5ec9348e9f4b8eb8154
  2020-06-07T15:30:45Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
  2020-06-07T15:30:45Z Using RdSeed as additional entropy source
  ```

ACKs for top commit:
  MarcoFalke:
    ACK c514a4f59a7430f05dbe20465ddf4ca323329f1e 🔄

Tree-SHA512: fd62fd7ae0dc65446ba4401d75b4047e055396a33f7f1b176e79a7753250aec2a474ae604163d3f7e68710443c0ed2f45e44435d15f35612d794807e2142d5a3
2024-05-27 21:55:48 +07:00
UdjinM6
3c3489d7a1
test: add test 2024-05-27 17:49:07 +03:00
UdjinM6
41ab95dbf8
feat: skip governance checks for blocks below the best chainlock 2024-05-27 17:48:59 +03:00
Kittywhiskers Van Gogh
bde72a41fe
merge bitcoin#23324: print peer counts for all reachable networks in -netinfo 2024-05-26 22:26:57 +00:00
Kittywhiskers Van Gogh
4b245441a0
merge bitcoin#22959: Display all proxies in -getinfo 2024-05-26 22:26:57 +00:00
Kittywhiskers Van Gogh
30b0fcf4a6
merge bitcoin#22544: drop torv2; torv3 becomes onion per GetNetworkName() 2024-05-26 22:26:57 +00:00
Kittywhiskers Van Gogh
b6ca36edda
merge bitcoin#22547: Add progress bar for -getinfo 2024-05-26 22:26:57 +00:00
Kittywhiskers Van Gogh
1f89bfd176
merge bitcoin#21832: Implement human readable -getinfo 2024-05-26 22:26:56 +00:00
Kittywhiskers Van Gogh
2200b78a15
merge bitcoin#20877: user help and argument parsing improvements 2024-05-26 22:26:56 +00:00
Kittywhiskers Van Gogh
bd934c71eb
partial bitcoin#20764: cli -netinfo peer connections dashboard updates
excludes:
- 9d6aeca2c5ec1df579c27c39e82fa3ddf1d25986
2024-05-26 22:26:56 +00:00
Kittywhiskers Van Gogh
b2d865633f
merge bitcoin#21261: update inbound eviction protection for multiple networks, add I2P peers 2024-05-26 22:26:56 +00:00
Kittywhiskers Van Gogh
0b16b50fcb
cli: fix loop counter comparison in ProcessReply
The loop is supposed to iterate for `rows.size()` (which is `3`, and this
change is done in bitcoin#23324), not for `m_networks.size()` (which is
also `3` but subsequent backports change that).
2024-05-26 22:26:56 +00:00
Kittywhiskers Van Gogh
cbb6828ec7
refactor: access llmq::CQuorumManager through arg in MNHFTx, functions 2024-05-26 12:57:17 +00:00
pasta
e4c848baf2
Merge #6008: backport: Merge bitcoin#21983, 21756, 21927, revert dashpay#855
7b52349b11 Revert "merge #855: Fix bad mn sig ipv6" (Vijay)
cd21313389 Merge bitcoin/bitcoin#21927: fuzz: Run const CScript member functions only once (MarcoFalke)
5ab49e6b57 Merge bitcoin/bitcoin#21756: Avoid calling `getnameinfo` when formatting IPv6 addresses in `CNetAddr::ToStringIP` (W. J. van der Laan)
86c874edfc Merge bitcoin/bitcoin#21983: build: Silence lupdate "unknown namespace/class" warnings (W. J. van der Laan)

Pull request description:

  bitcoin backport

Top commit has no ACKs.

Tree-SHA512: dbe30f5ef22b67742c2c832d2aff76ea2ec1307f63e4aaae8a3a041d3000dbf9e2b3b0a632068326f6d7b5373ed7e7e966a2c47e67ec20527b49d43b0a2c3fe3
2024-05-24 13:42:30 -05:00
Vijay
7b52349b11
Revert "merge #855: Fix bad mn sig ipv6" 2024-05-24 13:33:26 -05:00
MarcoFalke
cd21313389
Merge bitcoin/bitcoin#21927: fuzz: Run const CScript member functions only once
fa74bfc8601cd2b749deb38388e2a4636d8b86ea fuzz: Run const CScript member functions only once (MarcoFalke)

Pull request description:

  Those functions should be O(N) in the input size (or maybe worse, I didn't check), so if the fuzz input dictates to run them N times, the complexity is N^2.

  Fix this by calling them only once.

  Can be reviewed with: `--ignore-all-space  --word-diff-regex=.`

  Input: https://github.com/bitcoin/bitcoin/files/6464685/clusterfuzz-testcase-minimized-input.log

  Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34101

ACKs for top commit:
  practicalswift:
    cr ACK fa74bfc8601cd2b749deb38388e2a4636d8b86ea: patch looks correct, rationale makes sense and patch touches only `src/test/fuzz/`

Tree-SHA512: d579f7a2103ec154bf482a872142e55a1d9e7673d33a22a4c4230186fdd1b6618846463f4e25941031cc8c4bd1ea8d06cb49ae1bb1ec4af115497f5e5de1e19c
2024-05-24 13:33:25 -05:00
W. J. van der Laan
5ab49e6b57
Merge bitcoin/bitcoin#21756: Avoid calling getnameinfo when formatting IPv6 addresses in CNetAddr::ToStringIP
54548bae8004a8f49d73bd29aeca8b41894214c4 net: Avoid calling getnameinfo when formatting IPv6 addresses in CNetAddr::ToStringIP (practicalswift)
c10f27fdb2d335954dd1017ce6d5800159427374 net: Make IPv6ToString do zero compression as described in RFC 5952 (practicalswift)

Pull request description:

  Avoid calling `getnameinfo` when formatting IPv6 addresses in `CNetAddr::ToStringIP`.

  Fixes #21466.
  Fixes #21967.

  The IPv4 case was fixed in #21564.

ACKs for top commit:
  laanwj:
    Code review ACK 54548bae8004a8f49d73bd29aeca8b41894214c4
  vasild:
    ACK 54548bae8004a8f49d73bd29aeca8b41894214c4

Tree-SHA512: 8404e458b29efdb7bf78b91adc075d05e0385969d1532cccaa2c7cb69cd77411c42d95fcefc4000137b9f2076fe395731c7d9844b7d42b58a6d3bec69eed6fce
2024-05-24 13:33:25 -05:00
W. J. van der Laan
86c874edfc
Merge bitcoin/bitcoin#21983: build: Silence lupdate "unknown namespace/class" warnings
88bdc4d33eaeefb5cfe41bb4aa565c0cb361a982 build: Silent lupdate "unknown namespace/class" warnings (Hennadii Stepanov)

Pull request description:

  This PR removes multiple _"Qualifying with unknown namespace/class"_ warnings in `make -C src translate` output.
  Also all of the `lupdate` options are moved before input files (as documented).

  The remaining warnings are fixed in Qt 5.12.2 (see [QTBUG-42736](https://bugreports.qt.io/browse/QTBUG-42736)).

ACKs for top commit:
  laanwj:
    Tested ACK 88bdc4d33eaeefb5cfe41bb4aa565c0cb361a982

Tree-SHA512: 9c12ff5425a84758aaf8073554891ffe7eb2d75650a12be14ece364b6b7a4461626654885e35c5543462f0941abb020cc36dc64e656c85c8d6d2da36efc7ea2c
2024-05-24 13:33:24 -05:00
pasta
a6df93e273
Merge #6026: backport: Merge bitcoin#22696, 22541, 22715
a640c6585a Merge bitcoin/bitcoin#22715: wallet: use `FormatFullVersion()` & `PACKAGE_NAME` in dumpwallet (fanquake)
783a6bd842 Merge bitcoin/bitcoin#22541: Add a new RPC command: restorewallet (Samuel Dobson)
c99fe37702 Merge bitcoin/bitcoin#22696: p2p: log addrman consistency checks (fanquake)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: a0900b4e92dacb593b4554fe94c9ec1897c35c4b796bfc649927eefd46dea887ea11e82e26eab3db6e59375a20f535ae2e21056d5b0e41c80c73aaaffd9e295c
2024-05-24 13:30:26 -05:00
fanquake
a640c6585a
Merge bitcoin/bitcoin#22715: wallet: use FormatFullVersion() & PACKAGE_NAME in dumpwallet
2d7534bd93ec78609e187beaea64f1d1bdb1f81a wallet: use PACKAGE_NAME instead of "Bitcoin" in rpcdump (fanquake)
14b480240539eee8d296ed1ac6ec674b34635433 wallet: use FormatFullVersion instead of CLIENT_BUILD in rpcdump (fanquake)

Pull request description:

  The dumpwallet RPC is the last place we're using CLIENT_BUILD directly, rather FormatFullVersion() (which just returns it), so switch to using that. At the same time, use PACKAGE_NAME (Bitcoin Core), rather than just "Bitcoin".

ACKs for top commit:
  MarcoFalke:
    cr ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a
  laanwj:
    Tested ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a
  achow101:
    ACK 2d7534bd93ec78609e187beaea64f1d1bdb1f81a
  Zero-1729:
    crACK 2d7534b

Tree-SHA512: b38ee074e317448719d2a628380786ec665413515b38d9ce680c21608bc2acf6a2bf817f78f100a8310477613ae72d6969cc4f595f4f44af0896659d3ebf2671
2024-05-24 13:30:00 -05:00
Samuel Dobson
783a6bd842
Merge bitcoin/bitcoin#22541: Add a new RPC command: restorewallet
5fe8100ff36fed6d50c2a25b028f57b25af3504c Change the wallet_backup.py test to use the restorewallet RPC command instead of restoring wallets manually. (lsilva01)
ae23faba6fc5cabc896f1175456d1018576f912d Add a new RPC command: restorewallet (lsilva01)

Pull request description:

  As far as I know, there is no command to restore the wallet from a backup file.
  The only way to do this is to replace the `wallet.dat` of a newly created wallet with the backup file, which is hardly an intuitive way.

  This PR implements the `restorewallet` RPC command which restores the wallet from the backup file.

  To test:
  First create a backup file:
  `$ bitcoin-cli -rpcwallet="wallet-01" backupwallet /home/Backups/wallet-01.bak`

  Then restore it in another wallet:
  `$ bitcoin-cli  restorewallet "restored-wallet-01" /home/Backups/wallet-01.bak`

ACKs for top commit:
  achow101:
    re-ACK 5fe8100ff36fed6d50c2a25b028f57b25af3504c
  prayank23:
    tACK 5fe8100ff3
  meshcollider:
    utACK 5fe8100ff36fed6d50c2a25b028f57b25af3504c

Tree-SHA512: 9639df4d8ad32f255f5b868320dc69878bd9aceb3b471b49dfad500b67681e2d354292b5410982fbf18e25a44ed0c06fd4a0dd010e82807c2e00ff32e84047a1
2024-05-24 13:30:00 -05:00
fanquake
c99fe37702
Merge bitcoin/bitcoin#22696: p2p: log addrman consistency checks
4844b74ba73ecc6d336a52b4dc4cd144a01b0ea2 p2p: log addrman consistency checks (Jon Atack)

Pull request description:

  This mini-patch picks up #22479 to log addrman consistency checks in the `BCLOG::ADDRMAN` category when they are enabled with the `-checkaddrman=<n>` configuration option for values of n greater than 0.

  ```
  $ ./src/bitcoind -signet -checkaddrman=20 -debug=addrman
  ...
  2021-08-13T11:14:45Z Addrman checks started: new 3352, tried 89, total 3441
  2021-08-13T11:14:45Z Addrman checks completed successfully
  ```

  This allows people to
  - verify the checks are running
  - see when and how often they are being performed
  - see the number of new/tried/total addrman entries per check
  - see the start/end of the checks

  Thanks to John Newbery for ideas to improve this logging.

ACKs for top commit:
  jnewbery:
    Code review ACK 4844b74ba73ecc6d336a52b4dc4cd144a01b0ea2
  Zero-1729:
    tACK 4844b74ba73ecc6d336a52b4dc4cd144a01b0ea2
  theStack:
    Concept and code-review ACK 4844b74ba73ecc6d336a52b4dc4cd144a01b0ea2 ♟️

Tree-SHA512: 10b51c480d52a753ea8a59dbdd1e2c4f49067e7f4afe59d58426a8fb438f52447fe3a6090fa52132bc382d876927fa338b229c906d85668086f7f8f5bd8ed38a
2024-05-24 13:29:59 -05:00
pasta
f6855c0a1e
Merge #6025: backport: Merge bitcoin#22359
0bdc299af8 Merge bitcoin/bitcoin#22359: wallet: Do not set fInMempool in transactionAddedToMempool when tx is not in the mempool (Samuel Dobson)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: 97cb8d377e9f9460dfa9674a3c29b10e259336df7fc3beb7a2291d200a4cd0b1ddc257f9bbd3b9e8748b3c42f58f32019e09486c232dd51b5b38d1c031d802c8
2024-05-24 13:27:23 -05:00
Samuel Dobson
0bdc299af8
Merge bitcoin/bitcoin#22359: wallet: Do not set fInMempool in transactionAddedToMempool when tx is not in the mempool
fa6fd3dd6a4e7f30eff5963836aed43fe01af078 wallet: Properly set fInMempool in mempool notifications (MarcoFalke)

Pull request description:

  A wallet method (like bumping the fee) might have set `fInMempool` to false because the transaction was removed from the mempool (See commit fa4e088cbac035b8029a10b492849540150d0622).

  Avoid setting it back to true (incorrectly) in the validation interface background thread.

  Fixes #22357

ACKs for top commit:
  ryanofsky:
    Code review ACK fa6fd3dd6a4e7f30eff5963836aed43fe01af078. Only change since last review is extending workaround to `transactionRemovedFromMempool`. Since we know this workaround is imperfect and the goal of this PR is mainly to fix CI errors, I would probably be inclined to limit the workaround to as few places as possible where we have seen actual failures, instead of adding the workaround to as many places as possible, where there is some chance it might trigger new failures. But since this workaround is so straightforward and almost looks like a real fix, probably it doesn't matter.
  meshcollider:
    utACK fa6fd3dd6a4e7f30eff5963836aed43fe01af078

Tree-SHA512: d690136a577f1f532aa1fee80d3f6600ff7fc61286fbf564a53d7938d5ae52d33f0dbb0fef8b8c041a4970fb424f0b9f1ee7ce791e0ff8354e0000ecc9e22b84
2024-05-24 13:27:07 -05:00
pasta
82dbeed6ef
Merge #6010: backport: Merge bitcoin#21848,22003
5d51855b4d Merge bitcoin/bitcoin#22003: txmempool: add thread safety annotations (MarcoFalke)
be14afca36 Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor architecture-independent (MarcoFalke)

Pull request description:

  backport

Top commit has no ACKs.

Tree-SHA512: eec5f474a4d182f8673509d2e163c12f78c88cc578ed60b580e9ab1c793535d1b058ad7fb8600c4f514b2351905982f94b96ad666ec47b23de849a0a99d3bd94
2024-05-24 13:24:51 -05:00
MarcoFalke
5d51855b4d
Merge bitcoin/bitcoin#22003: txmempool: add thread safety annotations
793b2682841b0bdd7eb93163e34728765cfe52b2 txmempool: add thread safety annotations (Anthony Towns)

Pull request description:

  Add missing thread safety guards to CTxMempool members.

ACKs for top commit:
  MarcoFalke:
    cr ACK 793b2682841b0bdd7eb93163e34728765cfe52b2
  hebasto:
    re-ACK 793b2682841b0bdd7eb93163e34728765cfe52b2, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/22003#pullrequestreview-664529633) review.

Tree-SHA512: c5eb197c63375c80c325a276f322177e84e0181c94a124720b1a364e964ac223fc6fdfd89bd0e152b76959fb6b97bfbf82dd36ec105ed6e2dc045ede717df4ae
2024-05-24 13:24:30 -05:00
MarcoFalke
be14afca36
Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor architecture-independent
fafd121026c4f1e25d498983e4f88c119516552b refactor: Make CFeeRate constructor architecture-independent (MarcoFalke)

Pull request description:

  Currently the constructor is architecture dependent. This is confusing for several reasons:

  * It is impossible to create a transaction larger than the max value of `uint32_t`, so a 64-bit `size_t` is not needed
  * Policy (and consensus) code should be arch-independent
  * The current code will print spurious compile errors when compiled on 32-bit systems:

  ```
  policy/feerate.cpp:23:22: warning: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
      assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
  ```

  Fix all issues by making it arch-independent. Also, fix `{}` style according to dev notes.

ACKs for top commit:
  theStack:
    re-ACK fafd121026c4f1e25d498983e4f88c119516552b
  promag:
    Code review ACK fafd121026c4f1e25d498983e4f88c119516552b.

Tree-SHA512: e16f75bad9ee8088b87e873906d9b5633449417a6996a226a2f37d33a2b7d4f2fd91df68998a77e52163de20b40c57fadabe7fe3502e599cbb98494178591833
2024-05-24 13:24:30 -05:00
pasta
a6af7d5ff1
Merge #6032: backport: bitcoin/bitcoin#28769: build: Update qt package up to 5.15.11 - fix crash at Kubuntu 24.04
b85fc45a15 Merge bitcoin/bitcoin#28769: build: Update `qt` package up to 5.15.11 (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  It fixes crash of qt app on Kubuntu 24.04

  ```
  *** buffer overflow detected ***: terminated

  #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
  #1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
  #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
  #3  0x00007ffff764526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
  #4  0x00007ffff76288ff in __GI_abort () at ./stdlib/abort.c:79
  #5  0x00007ffff76297b6 in __libc_message_impl (fmt=fmt@entry=0x7ffff77ce765 "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:132
  #6  0x00007ffff7736c19 in __GI___fortify_fail (msg=msg@entry=0x7ffff77ce74c "buffer overflow detected") at ./debug/fortify_fail.c:24
  #7  0x00007ffff77365d4 in __GI___chk_fail () at ./debug/chk_fail.c:28
  #8  0x00007ffff7737a67 in __readlink_chk (path=<optimized out>, buf=<optimized out>, len=<optimized out>, buflen=<optimized out>) at ./debug/readlink_chk.c:31
  #9  0x0000555556988ab3 in qt_readlink(char const*) ()
  #10 0x0000555556a1f18b in QLockFilePrivate::processNameByPid(long long) ()
  #11 0x0000555556a1aa7b in QLockFilePrivate::lockFileContents() const ()
  #12 0x0000555556a1eccf in QLockFilePrivate::tryLock_sys() ()
  #13 0x0000555556a1bf01 in QLockFile::tryLock(int) ()
  #14 0x0000555556a1c094 in QLockFile::tryLock(int) ()
  #15 0x0000555556a1c094 in QLockFile::tryLock(int) ()
  #16 0x00005555568d8dd3 in QConfFileSettingsPrivate::syncConfFile(QConfFile*) ()
  #17 0x00005555568d9753 in QConfFileSettingsPrivate::sync() ()
  #18 0x00005555568c8ef5 in QSettings::~QSettings() ()
  #19 0x0000555555721f82 in Intro::showIfNeeded (did_show_intro=<optimized out>, prune_MiB=@0x7fffffffd2f0: 0) at qt/intro.cpp:275
  #20 0x00005555556ddab6 in GuiMain (argc=3, argv=0x7fffffffd828) at qt/bitcoin.cpp:629
  #21 0x00007ffff762a1ca in __libc_start_call_main (main=main@entry=0x5555556d7f00 <main(int, char**)>, argc=argc@entry=3, argv=argv@entry=0x7fffffffd828) at ../sysdeps/nptl/libc_start_call_main.h:58
  #22 0x00007ffff762a28b in __libc_start_main_impl (main=0x5555556d7f00 <main(int, char**)>, argc=3, argv=0x7fffffffd828, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd818) at ../csu/libc-start.c:360
  #23 0x00005555556d7e35 in _start ()
  ```

  Every usage of `QSettings` cause this crash on one of my PC, but not other. `-resetguisettings` doesn't help. gcc/clang - same crash. Removing data doesn't help.

  ## What was done?
  Bump QT to the newer version.
  See also related PR: https://github.com/dashpay/dash/pull/6011

  ## How Has This Been Tested?
  Build & Run

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

Top commit has no ACKs.

Tree-SHA512: 3a9024a860c11aa7a48bfb36b3f29772feb6ff458ecbc0faffe774af08e6c7db5754048b0db2bf8713faf4cba861794b2855931416b8cd77389b31f1e47b8aad
2024-05-24 13:21:18 -05:00
fanquake
b85fc45a15
Merge bitcoin/bitcoin#28769: build: Update qt package up to 5.15.11
8047bb6feaa9ee5d6c1edb7640baaf228450bc6b build: Update `qt` package up to 5.15.11 (Hennadii Stepanov)

Pull request description:

  In the light of https://github.com/bitcoin/bitcoin/pull/28622, we probably have to patch Qt. It seems reasonable to update it up to the latest available version before doing that.

ACKs for top commit:
  TheCharlatan:
    ACK 8047bb6feaa9ee5d6c1edb7640baaf228450bc6b

Tree-SHA512: b4d7df2ff059b8f58c3202d913237c0d39a962748658f1ce853884dca095fbda5f56d4d68f73a1bc8da2f295e96a20927306e148b41a9f4afc42c8edb11c3729
2024-05-24 13:21:05 -05:00
pasta
cfc40864c1
Merge #5989: backport: Merge bitcoin#21718, 21759, 21872
00e556ac7a Merge bitcoin/bitcoin#21872: net: Sanitize message type for logging (MarcoFalke)
be9781d8b4 Merge bitcoin/bitcoin#21759: wallet: document coin selection code (fanquake)
ea347e6a6e Merge #21718: rpc: Improve error message for getblock invalid datatype. (fanquake)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: 110f139b827ae9e489858c6110bec525e0fe08e7a1d0bf98fccb4e0fa2f532ae1c307eecb97975d02d3252f6c36f2b1b0f10367b6d0cbc8f430ac27e0c938758
2024-05-19 11:20:16 -05:00
MarcoFalke
00e556ac7a
Merge bitcoin/bitcoin#21872: net: Sanitize message type for logging
09205b33aa74e385caa2803aa6febc18ad1efa32 net: Clarify message header validation errors (W. J. van der Laan)
955eee76803c098978cf0bbc7f1f6d3c230544e2 net: Sanitize message type for logging (W. J. van der Laan)

Pull request description:

  - Use `SanitizeString` when logging message errors to make sure that the message type is sanitized. I have checked all logging in `net.cpp`.

  - For the `MESSAGESTART` error don't inspect and log header details at all: receiving invalid start bytes makes it likely that the packet isn't even formatted as valid P2P message. Logging the four unexpected start bytes (as hex) should be enough.

  - Update `p2p_invalid_messages.py` test to check this.

  - Improve error messages in a second commit.

  Issue reported by gmaxwell.

ACKs for top commit:
  MarcoFalke:
    re-ACK 09205b33aa74e385caa2803aa6febc18ad1efa32 only change is log message fixup 🔂
  practicalswift:
    re-ACK 09205b33aa74e385caa2803aa6febc18ad1efa32

Tree-SHA512: 8fe5326af135cfcf39ea953d9074a8c966b9b85a810b06a2c45b8a745cf115de4f321e72fc769709d6bbecfc5953aab83176db6735b04c0bc6796f59272cadce
2024-05-19 11:19:52 -05:00
fanquake
be9781d8b4
Merge bitcoin/bitcoin#21759: wallet: document coin selection code
6ba892126d354219b146f0c7f35d472f9c14bdac refactor + document coin selection strategy (glozow)
58ea324fdd906204bb77ea4be1c01a3ab56cf86f [docs] add doxygen comments to wallet code (glozow)
0c74716c50384677724247e05e6592f845fc8635 [docs] format existing comments as doxygen (glozow)

Pull request description:

  I think it would help code review to have more documentation + doxygen comments

ACKs for top commit:
  Xekyo:
    ReACK 6ba892126d
  achow101:
    ACK 6ba892126d354219b146f0c7f35d472f9c14bdac

Tree-SHA512: 74a78d9b0e0c1d5659bed566432a5b3511511d8b2432f440565f443da7b8257a1b90e70aa7505a7f8abf618748eeb43d166e84f278bdee3d34ce5d5c37dc573a
2024-05-19 11:19:51 -05:00
fanquake
ea347e6a6e
Merge #21718: rpc: Improve error message for getblock invalid datatype.
a41149426168b8ea96099f10576022c6a09033d1 rpc: Improve getblock error message for invalid data type. (klementtan)

Pull request description:

  Improve error messages for getblock invalid datatype.

  fixes: #21717

ACKs for top commit:
  instagibbs:
    utACK a411494261
  theStack:
    ACK a41149426168b8ea96099f10576022c6a09033d1
  promag:
    Code review ACK a41149426168b8ea96099f10576022c6a09033d1.

Tree-SHA512: 6e7d8290681e8ab375629f81669d0f8e0c21f9eb7ed9e2455cd19ea013e69b2d95fa7a9ee795315b2d5c60c96035c6cefc3d6e1039a06fd88c1dc7fe275ee6a1
2024-05-19 11:19:51 -05:00
pasta
df6d666918
Merge #5998: backport: (scripted-diff) Merge bitcoin#21836, 21710, 21753
e0d9dc18a8 scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string (Vijay)
7bd0262aa2 Merge bitcoin/bitcoin#21753: doc: add -addrinfo to tor docs (W. J. van der Laan)
6350b0cd86 Merge bitcoin/bitcoin#21710: doc: update helps for addnode rpc and -addnode/-maxconnections config options (W. J. van der Laan)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: 0aafc4ac01f13418921d3cc4f13f42e7a4c4688918de3a801d9f7f7e6290d33b6e9408689866aef7db558b233375d2f8d01a0fe670e96dd09346ece634e45211
2024-05-19 11:16:55 -05:00
Vijay
e0d9dc18a8
scripted-diff: Merge #21836: Replace three dots with ellipsis in the UI string
-BEGIN VERIFY SCRIPT-
sed -i -E -e 's/\.\.\."\)(\.|,|\)| )/…"\)\1/' -- $(git ls-files -- 'src' ':(exclude)src/qt/dashstrings.cpp' ':(exclude)src/immer/')
sed -i -e 's/\.\.\.\\"/…\\"/' src/qt/sendcoinsdialog.cpp
sed -i -e 's|\.\.\.</string>|…</string>|' src/qt/forms/*.ui
sed -i -e 's|\.\.\.)</string>|…)</string>|' src/qt/forms/sendcoinsdialog.ui
-END VERIFY SCRIPT-
2024-05-19 11:16:42 -05:00
W. J. van der Laan
7bd0262aa2
Merge bitcoin/bitcoin#21753: doc: add -addrinfo to tor docs
65f30e4c21e94b775853392b7e0de5c7fd3de488 doc: add -addrinfo troubleshooting section to tor.md (Jon Atack)

Pull request description:

  Follow-up to #21595.

ACKs for top commit:
  jarolrod:
    ACK 65f30e4c21e94b775853392b7e0de5c7fd3de488
  practicalswift:
    ACK 65f30e4c21e94b775853392b7e0de5c7fd3de488
  0xB10C:
    ACK 65f30e4c21e94b775853392b7e0de5c7fd3de488
  theStack:
    ACK 65f30e4c21e94b775853392b7e0de5c7fd3de488

Tree-SHA512: d17fa007106b8f877d2632c99273c663a24f025febe52faec9b197c561df808fd6a92bb27992ccbf5c3cc0d82058a8c4b82a2f1b99325f0ddfdac5ef703ac7d7
2024-05-19 11:16:41 -05:00
W. J. van der Laan
6350b0cd86
Merge bitcoin/bitcoin#21710: doc: update helps for addnode rpc and -addnode/-maxconnections config options
b4fcbcfb49461b96bc72fb64d6152de7c5ce00de doc: update -maxconnections config option help (Jon Atack)
79685a8992ad302833b506cc6d03aab1cc127de0 doc: update -addnode config option help (Jon Atack)
2896c6c4cc6d382d8369c037e274c08dd8e32c69 doc: update addnode rpc help (Jon Atack)

Pull request description:

  Since #9319 proposed by Gregory Maxwell and released in v0.14, peers manually added through the `-addnode` config option or using the `addnode` RPC have their own separate limit of 8 connections that does not compete with other inbound or outbound connection usage and is not subject to the limitation imposed by the `-maxconnections` option.

  This PR updates the `-addnode` and `-maxconnections` config options and the `addnode` RPC help docs with this information.

  `-addnode` config option help
  ```
  $ bitcoind -h | grep -A5 addnode=
    -addnode=<ip>
         Add a node to connect to and attempt to keep the connection open (see
         the addnode RPC help for more info). This option can be specified
         multiple times to add multiple nodes; connections are limited to
         8 at a time and are counted separately from the -maxconnections
         limit.

  $ bitcoind -h | grep -A3 maxconnections=
    -maxconnections=<n>
         Maintain at most <n> connections to peers (default: 125). This limit
         does not apply to connections manually added via -addnode or the
         addnode RPC, which have a separate limit of 8.
  ```

  `addnode` rpc help
  ```
  $ bitcoin-cli help addnode
  addnode "node" "command"

  Attempts to add or remove a node from the addnode list.
  Or try a connection to a node once.
  Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be
  full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).
  Addnode connections are limited to 8 at a time and are counted separately from the -maxconnections limit.
  ```

ACKs for top commit:
  prayank23:
    ACK b4fcbcfb49
  jarolrod:
    ACK b4fcbcfb49461b96bc72fb64d6152de7c5ce00de

Tree-SHA512: b6d69baa6cbf6d53f91bac5b39b549d49db6c95f92ea1bdd3588a6432794a25ac2c8b3c89e2c72bb9097e61f2717c8b5ecc404745d5992b88e523db03200898f
2024-05-19 11:16:41 -05:00
pasta
b114e2e82d
Merge #6015: backport: Merge bitcoin#22043, 22169, 22135
f951dddef5 Merge bitcoin/bitcoin#22135: CRegTestParams: Use `args` instead of `gArgs`. (MarcoFalke)
d613458bf4 Merge bitcoin/bitcoin#22169: p2p, rpc, fuzz: various tiny follow-ups (fanquake)
72d51a75e5 Merge bitcoin/bitcoin#22043: rpc, test: addpeeraddress test coverage, code simplify/constness (MarcoFalke)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: 9cd5ae1683fe1f54230e14fcd1c4e34c1ef83885d6a03a11781fafca973fc8f39743185680aaed67c01d537c2ece5f8a8b71f7c26a09557858ae4812cd9e94de
2024-05-19 11:13:54 -05:00
MarcoFalke
f951dddef5
Merge bitcoin/bitcoin#22135: CRegTestParams: Use args instead of gArgs.
5f23531926e1a9cf13bd69c09a7a8f638df1c32b CRegTestParams: Use `args` instead of `gArgs`. (Kiminuo)

Pull request description:

  This PR is a very minor follow-up to #13311.

  I believe that `gArgs` was just overlooked at the modified line.

ACKs for top commit:
  MarcoFalke:
    cr ACK 5f23531926e1a9cf13bd69c09a7a8f638df1c32b

Tree-SHA512: f4e4ed6b23fca60e88825b502f20a1341ee2e4429bc8a2a7e419057adb643abda11be2061fe7ee076931657736e629aff88fd2c33737c84c330dc9d64f368c30
2024-05-19 11:13:42 -05:00
fanquake
d613458bf4
Merge bitcoin/bitcoin#22169: p2p, rpc, fuzz: various tiny follow-ups
c274574458e5921be4d1f3e86e6bba72a7cd3e65 p2p, rpc, fuzz: various tiny follow-ups (Jon Atack)

Pull request description:

  - p2p: pass `Span` by value per https://github.com/bitcoin/bitcoin/pull/22143#issuecomment-853953438 as a follow-up to 8be56f0f8ecc54744
  - rpc: remove duplicate `CAddress` constructor per https://github.com/bitcoin/bitcoin/pull/22043#discussion_r638535703
  - fuzz: rename 3 fuzz targets changed in eba9a94b9f56be2fda623e77f19b960425ea1eb5 back to their original names per https://github.com/bitcoin-core/qa-assets/pull/63#issuecomment-855281865

ACKs for top commit:
  MarcoFalke:
    cr ACK c274574458e5921be4d1f3e86e6bba72a7cd3e65
  practicalswift:
    cr ACK c274574458e5921be4d1f3e86e6bba72a7cd3e65: patch looks correct
  jarolrod:
    ACK  c274574458e5921be4d1f3e86e6bba72a7cd3e65

Tree-SHA512: 3672b210d30b3a91f3a6455005e4d3cb1f89621820c417c645d24b06e53459440122a1f75758e0e04c3d04eff9d6f88ef62865216aa3e42301c6df783f7c0b4a
2024-05-19 11:13:42 -05:00
MarcoFalke
72d51a75e5
Merge bitcoin/bitcoin#22043: rpc, test: addpeeraddress test coverage, code simplify/constness
b36e0cd1b9d361ac6f9777c09328a13e9ee923be rpc: simplify addpeeraddress and improve code constness (Jon Atack)
6b1926cf1eac1ad1850599d2753dd22bc21fd327 test: addpeeraddress functional test coverage (Jon Atack)

Pull request description:

  - Add functional test coverage for rpc addpeeraddress
  - Simplify addpeeraddress and improve code constness

ACKs for top commit:
  klementtan:
    ACK [`b36e0cd`](b36e0cd1b9)
  MarcoFalke:
    review ACK b36e0cd1b9d361ac6f9777c09328a13e9ee923be 💭

Tree-SHA512: 01773fb70f23db5abf46806bb27804e48feff27272b2e6582bd5b886e9715088eb2d84755106bce2ad6f88e21582f7f071a30a89d5b17286d899c3dd8553b4fc
2024-05-19 11:13:42 -05:00
pasta
2cad51b509
Merge #6016: backport: Merge bitcoin#22214, 22120, 21745
3b5dc9e5aa Merge bitcoin/bitcoin#21745: refactor: Add missing includes in pubkey.cpp/pubkey.h (W. J. van der Laan)
1ee01c801e Merge bitcoin/bitcoin#22120: test: p2p_invalid_block: Check that a block rejected due to too-new tim… (MarcoFalke)
bf72bea014 Merge bitcoin/bitcoin#22214: refactor: Rearrange fillPSBT arguments (fanquake)

Pull request description:

  bitcoin backport

Top commit has no ACKs.

Tree-SHA512: 5b4ab7e898c8e0c3f465acc084f3c2136c8c8523d5cc813f042df8591967acff17a380a4173b7c6da63f6dca76773d8ad9811d68d290f3ddd198eaa6481bbacb
2024-05-19 11:12:06 -05:00
W. J. van der Laan
3b5dc9e5aa
Merge bitcoin/bitcoin#21745: refactor: Add missing includes in pubkey.cpp/pubkey.h
71c824ed6cf70b39ca09e8b3962f452f69523af0 cleaned up and added missing "include" statements for pubkey.cpp and pubkey.h (William Bright)

Pull request description:

  #### Problem:
  Many symbols in the files were undefined and causing issues when I was working on building independent sections of the codebase. The hidden imports from the "secp256k1" library was a particular pain point.

  The other standard and missing includes are following best practices and will help with refactoring, build process and others.

  #### Changes:
  Clean up and declared imports/include for `pubkey.cpp` and `pubkey.h`

ACKs for top commit:
  jnewbery:
    utACK 71c824ed6c
  laanwj:
    Code review ACK 71c824ed6cf70b39ca09e8b3962f452f69523af0

Tree-SHA512: bce605cfde24d8e3be82a596cabab7a8577fec0aef7c5e6f7a56603357046d8e8dea11ac8e3dbe79600550291be7784e35c7a55ebf40b46525b8949e4bedae96
2024-05-19 11:11:35 -05:00
MarcoFalke
1ee01c801e
Merge bitcoin/bitcoin#22120: test: p2p_invalid_block: Check that a block rejected due to too-new tim…
754e802274e9373ad7e1dccb710acf74ded6e7fb test: check rejected future block later accepted (Luke Dashjr)

Pull request description:

  (Luke) was unsure if the code sufficiently avoided caching a
  time-too-new rejection, so wrote this test to check it.  It looks like
  despite only exempting BLOCK_MUTATED, it is still okay because header
  failures never cache block invalidity.  This test will help ensure that
  if this ever changes, BLOCK_TIME_FUTURE gets excluded at the same time.

  This PR re-opens https://github.com/bitcoin/bitcoin/pull/17872 which went stale and addresses the nits raised by reviewers there.

ACKs for top commit:
  MarcoFalke:
    review ACK 754e802274e9373ad7e1dccb710acf74ded6e7fb

Tree-SHA512: a2bbc8fffb523cf2831e1ecb05f20868e30106a38cc2e369e4973fa549cca06675a668df16f76c49cc4ce3a22925404255e5c53c4232d63ba1b9fca878509aa0
2024-05-19 11:11:34 -05:00
fanquake
bf72bea014
Merge bitcoin/bitcoin#22214: refactor: Rearrange fillPSBT arguments
f47e8028391fbcf44fe1dbf3539f42e4185590fd Rearrange fillPSBT arguments (Russell Yanofsky)

Pull request description:

  Move fillPSBT inout argument before output-only arguments. This is a nice thing to do to keep the interface style [consistent](https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs). But motivation is to work around a current limitation of the libmultiprocess code generator (which figures out order of inout parameters by looking at input list, but more ideally would use the output list).

  ---

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

ACKs for top commit:
  achow101:
    ACK f47e8028391fbcf44fe1dbf3539f42e4185590fd
  theStack:
    Code-review ACK f47e8028391fbcf44fe1dbf3539f42e4185590fd

Tree-SHA512: 1787af3031ff7ed6b519f3b93054d8b257af96a3380a476a6dab0f759329039ecc5d624b785c5c2d14d594fc852dd81c626880c775c691ec9c79b7b3dbcfb257
2024-05-19 11:11:30 -05:00
pasta
1fc62c81a0
Merge #6020: backport: bitcoin#21053, #22082, #22118, #22292, #22308, #22334, #22358, #22388, bitcoin-core/gui#271, #311
0bed7b4702 Merge bitcoin/bitcoin#22292: bench, doc: benchmarking updates and fixups (fanquake)
c95df68637 Merge bitcoin/bitcoin#22388: ci: use Ubuntu 20.04 as the default Docker container (MarcoFalke)
c586ca5b56 Merge bitcoin/bitcoin#22334: wallet: do not spam about non-existent spk managers (fanquake)
62f9394374 Merge bitcoin/bitcoin#22308: wallet: Add missing BlockUntilSyncedToCurrentChain (MarcoFalke)
240d8efb82 Merge bitcoin/bitcoin#22358: Remove unused wallet pointer from wallet signals (fanquake)
9a1500ab47 Merge bitcoin/bitcoin#22118: test: check anchors.dat when node starts for the first time (MarcoFalke)
262c8b6f44 Merge bitcoin/bitcoin#22082: test: update nanobench from release 4.0.0 to 4.3.4 (MarcoFalke)
3d2cea667b Merge bitcoin-core/gui#311: Peers Window rename 'Peer id' to 'Peer' (Hennadii Stepanov)
dc498be3be Merge bitcoin-core/gui#271: Don't clear console prompt when font resizing (W. J. van der Laan)
1ed2d2d891 Merge #21053: rpc, test: document {previous,next}blockhash as optional (MarcoFalke)

Pull request description:

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

  ## What was done?
   - bitcoin/bitcoin#21053
   - bitcoin-core/gui#271
   - bitcoin-core/gui#311
   - bitcoin/bitcoin#22082
   - bitcoin/bitcoin#22118
   - bitcoin/bitcoin#22358
   - bitcoin/bitcoin#22308
   - bitcoin/bitcoin#22334
   - bitcoin/bitcoin#22388
   - bitcoin/bitcoin#22292

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

Tree-SHA512: 8354297857516ddf94b242f2e50e1a28d999e613da2a7eb90c603e1fee7212e46d6e8a20ad42aa2945b48137e98fc7f589c9c77469c71cc01d032a33fa6da517
2024-05-18 21:08:06 -05:00