Commit Graph

26087 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
f04ce8bcda
partial bitcoin#22229: consolidate to f-strings (part 1)
includes:
- 86d958262dff43002820d58ccb8958e2dbfb9d5b
2024-05-29 11:48:36 -05:00
Kittywhiskers Van Gogh
68ea6cc5c5
merge bitcoin#22589: update I2P hardcoded seeds and docs for 22.0
Arguably partial; however the commit it excludes is not relevant

includes:
- d2dffd5be4c8f6a1942dd971d09707c3620a1689
2024-05-29 11:48:35 -05:00
pasta
74a10a87ea
Merge #6037: fix: bump version of libbacktrace library
0e82bf46d2 fix: bump version of libbacktrace library (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Old version of `libbacktrace` library doesn't support debug information for ELF produced by modern compilers

  It appears like an error:
   > unrecognized DWARF version in .debug_info at 6
   > no debug info in ELF executable

  ## What was done?
  Bump version of `libbacktraces` to the current master. It doesn't seems as it has any releases anymore, so, I chose the latest revision.

  ## How Has This Been Tested?
  With old version:
  ```
  No debug information available for stacktrace. You should add debug information and then run
  dashd -printcrashinfo=bvcgc43iinzgc43ijfxgm3ybaacwiyltnbsfw43umq5du5dfojwws3tborssqkjamnqwy3dfmqqgi5lfeb2g6idvnzugc3tenrswiidfpbrwk4dunfxw4csfpbrwk4dunfxw4oraor4xazj5mnugc4ramnxw443ufiwca53imf2d2isiiveekiqed56acaaaaaaaaucrlszzcfaaaaevexftsekaaafvmqbaaaaaaaaaa===
  ```

  With this fixes output as expected:
  ```
  std::terminate() called due to unhandled exception
  Exception: type=char const*, what="HEHE"
     0#: (0x5D7C19364C3F) bitcoind.cpp:114          - AppInit
     1#: (0x5D7C19364C3F) bitcoind.cpp:273          - main
     2#: (0x7B0B19C28150) libc_start_call_main.h:74 - __libc_start_call_main
     3#: (0x7B0B19C28209) libc-start.c:128          - call_init
     4#: (0x7B0B19C28209) libc-start.c:347          - __libc_start_main_impl
     5#: (0x5D7C193734D5) <unknown-file>            - ???
  ```

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

Tree-SHA512: d133d166251bb12b4dbba8e7f0802943cc7ce98f8d6b322fc547a4da37d51ee8599ef3714c6e07aab35e04416b2b492816bd4b505a52137f432c0a935ac40196
2024-05-29 11:23:52 -05:00
Kittywhiskers Van Gogh
d7c35d0538
refactor: remove llmq::CQuorumManager global, move to LLMQContext 2024-05-29 08:21:53 +00:00
Kittywhiskers Van Gogh
5b86df6ca3
refactor: reduce llmq::CQuorumManager globals use, use args 2024-05-29 08:20:57 +00:00
Kittywhiskers Van Gogh
1efd219173
refactor: remove llmq::CQuorumBlockProcessor global, move to LLMQContext
We used to store an alias to the `CQuorumBlockProcessor` instance present
in the global state in `LLMQContext` but handled construction and
destruction of the instance in `LLMQContext`. As direct global usage no
longer exists, we can fully subsume it into `LLMQContext`.
2024-05-29 08:17:46 +00:00
Wladimir J. van der Laan
34c80473a8
Merge #19877: [test] clarify rpc_net & p2p_disconnect_ban functional tests
47ff5098ad5ea2c20ea387f99940a7cde6c80789 [test] Clarify setup of node topology. (Amiti Uttarwar)
0672522aedd3760c30b8740c7e9487f00bf9dfeb [move-only, test]: Match test order with run order (Amiti Uttarwar)

Pull request description:

  small improvements to clarify logic in the functional tests
  1. have test logic in `rpc_net.py` match run order of the test
  2. remove `connect_nodes` calls that are redundant with the automatic test setup executed by the test framework

  Noticed when I was trying to debug a test for #19725. Small changes but imo very helpful, because they initially confused me.

ACKs for top commit:
  laanwj:
    ACK 47ff5098ad5ea2c20ea387f99940a7cde6c80789

Tree-SHA512: 2843da2c0b4f06b2600b3adb97900a62be7bb2228770abd67d86f2a65c58079af22c7c20957474a98c17da85f40a958a6f05cb8198aa0c56a58adc1c31100492
2024-05-29 14:03:57 +07:00
MarcoFalke
e42412924f
Merge #19770: RPC: getpeerinfo: Deprecate "whitelisted" field (replaced by "permissions")
5b57dc5458800e56b4dddfeb32a1813804a62b0f RPC: getpeerinfo: Wrap long help line for bytesrecv_per_msg (Luke Dashjr)
d681a28219d3876a2b6e3cd2fb0d92963674903e RPC: getpeerinfo: Deprecate "whitelisted" field (replaced by "permissions") (Luke Dashjr)

Pull request description:

  If we were going to continue support for "whitelisted", we should have probably made it true if any permission flag was set, rather than only if "default permissions" were used.

  This corrects the description, and deprecates it.

ACKs for top commit:
  laanwj:
    ACK 5b57dc5458800e56b4dddfeb32a1813804a62b0f

Tree-SHA512: a2e2137f8be8110357c1b2fef2c923fa8c7c4a49b0b2b3a2d78aedf12f8ed5cc7e140018a21b37e6ec7770ed4007542aeef7ad4558973901b107e8e0f81d6003
2024-05-29 14:03:56 +07:00
fanquake
f96966b7ea
Merge #20043: doc: Add 19501 release notes
fa710a6d67b2de64bde90def77c70d0a052f9030 doc: Add 19501 release notes (MarcoFalke)
faf60dee34ae3dbe8e103a2c1b0679f13df6a921 doc: Remove double-whitespace from help string, other whitespace fixups (MarcoFalke)

Pull request description:

  Adds release notes and fixes up some whitespace nits for the touched RPCs

ACKs for top commit:
  fanquake:
    ACK fa710a6d67b2de64bde90def77c70d0a052f9030
  laanwj:
    Code review ACK fa710a6d67b2de64bde90def77c70d0a052f9030

Tree-SHA512: b84a96386a9a8ed69f464c7dffdd600cf9a8b33a06120798b141b300991baed369ab91ae48df6446e89e1d62534ccd8ae721454e7a19b48900b317e9192afc47
2024-05-29 14:03:56 +07:00
MarcoFalke
6a164eaea9
Merge #19501: send* RPCs in the wallet returns the "fee reason"
69cf5d4eeb73f7d685e915fc17af64634d88a4a2 [test] Make sure send rpc returns fee reason (Sishir Giri)
d5863c0b3e20d56acf7246008b7832efde68ab21 [send] Make send RPCs return fee reason (Sishir Giri)

Pull request description:

  Whenever a wallet funds a transaction, the fee reason is reported to the user only if the verbose is set to true. I added an extra parameter to `CreateTransaction` function in wallet.cpp. Then I implemented the fee reason return logic in `SendMoney`  in rpcwallet.cpp, followed by verbose parameter in `sendtoaddress` and `sendmany` functions. I also added a fee reason test case in walletbasic.py.

  link to the issue: https://github.com/MarcoFalke/bitcoin-core/issues/22#issue-616251578

ACKs for top commit:
  instagibbs:
    ACK 69cf5d4eeb
  meshcollider:
    utACK 69cf5d4eeb73f7d685e915fc17af64634d88a4a2

Tree-SHA512: 2e3af32dcfbd5511ba95f8bc8edca7acfe709a8430ff03e43172e5d0af3dfa4b2f57906978e7f272d878043b9ed8c6004674cf47d7496b005d5f612e9a58aa0e
2024-05-29 14:03:56 +07:00
MarcoFalke
b6c8d852e3
Merge #19725: [RPC] Add connection type to getpeerinfo, improve logs
a512925e19a70d7f6b80ac530a169f45ffaafa1c [doc] Release notes (Amiti Uttarwar)
50f94b34a33c954f6e207f509c93d33267a5c3e2 [rpc] Deprecate getpeerinfo addnode field (Amiti Uttarwar)
df091b9b509f0b10e4315c0bfa2da0cc0c31c22f [refactor] Rename test file to allow any getpeerinfo deprecations. (Amiti Uttarwar)
395acfa83a5436790c1a722a5609ac9d48df235f [rpc] Add connection type to getpeerinfo RPC, update tests (Amiti Uttarwar)
49c10a9ca40967d28ae16dfea9cccc6f3a6624a1 [log] Add connection type to log statement (Amiti Uttarwar)

Pull request description:

  After #19316, we can more directly expose information about the connection type on the `getpeerinfo` RPC. Doing so also makes the existing addnode field redundant, so this PR begins the process of deprecating this field.

  This PR also includes one commit that improves a log message, as both use a shared function to return the connection type as a string.

  Suggested by sdaftuar- https://github.com/bitcoin/bitcoin/pull/19316#discussion_r468001604 & https://github.com/bitcoin/bitcoin/pull/19316#discussion_r468018093

ACKs for top commit:
  jnewbery:
    Code review ACK a512925e19a70d7f6b80ac530a169f45ffaafa1c.
  sipa:
    utACK a512925e19a70d7f6b80ac530a169f45ffaafa1c
  guggero:
    Tested and code review ACK a512925e.
  MarcoFalke:
    cr ACK a512925e19a70d7f6b80ac530a169f45ffaafa1c 🌇
  promag:
    Code review ACK a512925e19a70d7f6b80ac530a169f45ffaafa1c.

Tree-SHA512: 601a7a38aee235ee59aca690784f886dc2ae4e418b2e6422c4b58cd597376c00f74910f66920b08a08a0bec28bf8022e71a1435785ff6ba8a188954261aba78e
2024-05-29 14:03:55 +07:00
Samuel Dobson
f86263b180
Merge #18202: refactor: consolidate sendmany and sendtoaddress code
08fc6f6cfc3b06fd170452a766696d7b833113fa [rpc] refactor: consolidate sendmany and sendtoaddress code (Sjors Provoost)

Pull request description:

  I consolidated code between these two RPC calls, since `sendtoaddress` is essentially `sendmany` with 1 destination.

  Unless I overlooked something, the only behaviour change is that some `sendtoaddress` error codes changed from `-4` to `-6`. The release note mentions this.

  Salvaged from #18201.

ACKs for top commit:
  fjahr:
    Code review ACK 08fc6f6cfc3b06fd170452a766696d7b833113fa
  jonatack:
    ACK 08fc6f6cfc3b06fd170452a766696d7b833113fa
  meshcollider:
    Code review & functional test run ACK 08fc6f6cfc3b06fd170452a766696d7b833113fa

Tree-SHA512: 7b66c52fa0444a4d02fc3f81d9c2a386794d447616026a30111eda35fb46510475eea6506a9ceda00bb4e0230ebb758da5d236b3ac05c954c044fa68a1e3e909
2024-05-29 13:57:02 +07:00
Konstantin Akimov
0e82bf46d2
fix: bump version of libbacktrace library
Old version doesn't support debug information for ELF produced by modern compilers

It appears like an error:
 > unrecognized DWARF version in .debug_info at 6
 > no debug info in ELF executable

which causes:
 > No debug information available for stacktrace. You should add debug information and then run

And backtraces are not shown on linux even if debug infos here.

With this fixes output as expected:
```
std::terminate() called due to unhandled exception
Exception: type=char const*, what="HEHE"
   0#: (0x5D7C19364C3F) bitcoind.cpp:114          - AppInit
   1#: (0x5D7C19364C3F) bitcoind.cpp:273          - main
   2#: (0x7B0B19C28150) libc_start_call_main.h:74 - __libc_start_call_main
   3#: (0x7B0B19C28209) libc-start.c:128          - call_init
   4#: (0x7B0B19C28209) libc-start.c:347          - __libc_start_main_impl
   5#: (0x5D7C193734D5) <unknown-file>            - ???
```
2024-05-29 12:26:11 +07:00
pasta
3b3b1b8e00
Merge #6034: backport: merge bitcoin#21261, #20877, #21832, #22547, #22544, #22959, #23324, partial bitcoin#20764 (cli backports: part 2)
bde72a41fe merge bitcoin#23324: print peer counts for all reachable networks in -netinfo (Kittywhiskers Van Gogh)
4b245441a0 merge bitcoin#22959: Display all proxies in -getinfo (Kittywhiskers Van Gogh)
30b0fcf4a6 merge bitcoin#22544: drop torv2; torv3 becomes onion per GetNetworkName() (Kittywhiskers Van Gogh)
b6ca36edda merge bitcoin#22547: Add progress bar for -getinfo (Kittywhiskers Van Gogh)
1f89bfd176 merge bitcoin#21832: Implement human readable -getinfo (Kittywhiskers Van Gogh)
2200b78a15 merge bitcoin#20877: user help and argument parsing improvements (Kittywhiskers Van Gogh)
bd934c71eb partial bitcoin#20764: cli -netinfo peer connections dashboard updates (Kittywhiskers Van Gogh)
b2d865633f merge bitcoin#21261: update inbound eviction protection for multiple networks, add I2P peers (Kittywhiskers Van Gogh)
0b16b50fcb cli: fix loop counter comparison in `ProcessReply` (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependency for https://github.com/dashpay/dash/pull/6035

  * Dependency for https://github.com/dashpay/dash/pull/6031

  * In [dash#5904](https://github.com/dashpay/dash/pull/5904) ([bitcoin#21595](https://github.com/bitcoin/bitcoin/pull/21595)), one of the loops in `ProcessReply` is supposed to iterate `rows.size()` times (which at the time was hardcoded to `3`), the backport erroneously set the value to `m_networks.size()` (which also evaluated to `3`) as part of increasing `m_networks.size()` usage.

    As this pull request includes [bitcoin#23324](https://github.com/bitcoin/bitcoin/pull/23324), which changes it over to  `rows.size()`, the above has been corrected in a separate commit for documentation purposes.

  * `-addrinfo` output

    ![dash-cli addrinfo output](https://github.com/dashpay/dash/assets/63189531/24db46be-729e-4fa8-a268-87f2497cff9a)

  * `-getinfo` output (diamonds are due to rendering limitations of my terminal and are not indicative of the symbols used)

    ![dash-cli getinfo output](https://github.com/dashpay/dash/assets/63189531/626fe67f-f505-4a04-931a-76e75146e5a0)

  * `-netinfo` output

    ![dash-cli netinfo output](https://github.com/dashpay/dash/assets/63189531/afbff3d0-7127-44e2-bfe7-81b08c0e214e)

  ## Breaking Changes

  * CLI `-addrinfo` now returns a single field for the number of `onion` addresses known to the node instead of separate `torv2` and `torv3` fields, as support for TorV2 addresses was removed from Dash Core in 18.0.

  * `-getinfo` has been updated to return data in a user-friendly format that also reduces vertical space.

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

ACKs for top commit:
  PastaPastaPasta:
    utACK bde72a41fe

Tree-SHA512: 921cb45b7e243a321a32c835eb23d5ba8df610ff234a548a9051436a2c21845ce70097fb9a9bb812b77b04373f9f0a9f90264168d97b08da1890be06bfd9f99c
2024-05-28 12:39:40 -05:00
Kittywhiskers Van Gogh
1d3afe742b
evo: use gsl::not_null in CTxMemPool::ConnectManagers 2024-05-28 15:24:36 +00:00
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