Commit graph

37394 commits

Author SHA1 Message Date
merge-script
fb9890cbd5
Merge bitcoin/bitcoin#30184: [25.x] windeploy: Renew certificate
7a4eff2c98 windeploy: Renew certificate (Ava Chow)

Pull request description:

  Github-Pull: #30149
  Rebased-From: 9f4ff1e965

ACKs for top commit:
  theuni:
    ACK 7a4eff2c98
  glozow:
    ACK 7a4eff2c98

Tree-SHA512: 827b20fad32a2f140e12595ff297fc29769a6189561f13c06e4b3dc05265f48efbf3185320d436229767918dfda9d7417ec8a39018662379641e3f7828ba93a5
2024-05-29 09:06:05 +01:00
Ava Chow
7a4eff2c98
windeploy: Renew certificate
Github-Pull: #30149
Rebased-From: 9f4ff1e965
2024-05-28 16:18:20 +01:00
fanquake
62c22dd679
Merge bitcoin/bitcoin#29794: [25.x] Finalize 25.2
e95c484f7d doc: Update release notes for 25.2 final (Ava Chow)
14b85b6276 doc: Update manpages for 25.2 final (Ava Chow)
1c13eae6e0 doc: Bump bips.md to 25.2 (Ava Chow)
03a568deb6 build: Bump to 25.2 final (Ava Chow)

Pull request description:

  Final changes for 25.2 release

ACKs for top commit:
  glozow:
    utACK e95c484f7d
  fanquake:
    ACK e95c484f7d

Tree-SHA512: 10a4d6d516e2bea9b4383eb174a6c7827be0359522d366746ead0a28f275e0cadf6e5e9a0e4cafe425438532a57ada0ecbfba300f02370eac411f101dd86dfe6
2024-04-03 10:30:24 +01:00
Ava Chow
e95c484f7d doc: Update release notes for 25.2 final 2024-04-02 18:31:03 -04:00
Ava Chow
14b85b6276 doc: Update manpages for 25.2 final 2024-04-02 18:30:12 -04:00
Ava Chow
1c13eae6e0 doc: Bump bips.md to 25.2 2024-04-02 18:25:08 -04:00
Ava Chow
03a568deb6 build: Bump to 25.2 final 2024-04-02 18:24:34 -04:00
fanquake
d5bad0d2d1
Merge bitcoin/bitcoin#29531: [25.x] backports
27cfda1bae doc: Update release notes for 25.2rc2 (Ava Chow)
daba5e2c5b doc: Update manpages for 25.2rc2 (Ava Chow)
8a0c980d6e build: Bump to 25.2rc2 (Ava Chow)
cf7d3a8cd0 p2p: Don't consider blocks mutated if they don't connect to known prev block (Greg Sanders)
3eaaafa225 [test] IsBlockMutated unit tests (dergoegge)
0667441a7b [validation] Cache merkle root and witness commitment checks (dergoegge)
de97ecf14f [test] Add regression test for #27608 (dergoegge)
8cc4b24c74 [net processing] Don't process mutated blocks (dergoegge)
098f07dc8d [validation] Merkle root malleation should be caught by IsBlockMutated (dergoegge)
8804c368f5 [validation] Introduce IsBlockMutated (dergoegge)
4f5baac6ca [validation] Isolate merkle root checks (dergoegge)
f93be0103f test: make sure keypool sizes do not change on `getrawchangeaddress`/`getnewaddress` failures (UdjinM6)
7c08ccf19b wallet: Avoid updating `ReserveDestination::nIndex` when `GetReservedDestination` fails (UdjinM6)

Pull request description:

  Backport:

  * #29510
  * #29412
  * #29524

ACKs for top commit:
  glozow:
    utACK 27cfda1bae

Tree-SHA512: 37feadd65d9ea55c0a92c9d2a6f74f87cafed3bc67f8deeaaafc5b7042f954e55ea34816612e1a49088f4f1906f104e00c7c3bec7affd1c1f48220b57a8769c5
2024-03-22 13:40:07 +00:00
Ava Chow
27cfda1bae doc: Update release notes for 25.2rc2 2024-03-21 13:43:34 -04:00
Ava Chow
daba5e2c5b doc: Update manpages for 25.2rc2 2024-03-08 12:22:30 -05:00
Ava Chow
8a0c980d6e build: Bump to 25.2rc2 2024-03-08 12:14:46 -05:00
Greg Sanders
cf7d3a8cd0
p2p: Don't consider blocks mutated if they don't connect to known prev block
Github-Pull: #29524
Rebased-From: a1fbde0ef7
2024-03-05 12:18:05 -05:00
dergoegge
3eaaafa225
[test] IsBlockMutated unit tests
Github-Pull: #29412
Rebased-From: d8087adc7e
2024-03-05 12:17:59 -05:00
dergoegge
0667441a7b
[validation] Cache merkle root and witness commitment checks
Slight performance improvement by avoiding duplicate work.

Github-Pull: #29412
Rebased-From: 1ec6bbeb8d
2024-03-05 12:17:54 -05:00
dergoegge
de97ecf14f
[test] Add regression test for #27608
Github-Pull: #29412
Rebased-From: 5bf4f5ba32
2024-03-05 12:17:49 -05:00
dergoegge
8cc4b24c74
[net processing] Don't process mutated blocks
We preemptively perform a block mutation check before further processing
a block message (similar to early sanity checks on other messsage
types). The main reasons for this change are as follows:

- `CBlock::GetHash()` is a foot-gun without a prior mutation check, as
  the hash returned only commits to the header but not to the actual
  transactions (`CBlock::vtx`) contained in the block.
- We have observed attacks that abused mutated blocks in the past, which
  could have been prevented by simply not processing mutated blocks
  (e.g. https://github.com/bitcoin/bitcoin/pull/27608).

Github-Pull: #29412
Rebased-From: 49257c0304
2024-03-05 12:17:45 -05:00
dergoegge
098f07dc8d
[validation] Merkle root malleation should be caught by IsBlockMutated
Github-Pull: #29412
Rebased-From: 2d8495e080
2024-03-05 12:17:40 -05:00
dergoegge
8804c368f5
[validation] Introduce IsBlockMutated
Github-Pull: #29412
Rebased-From: 66abce1d98
2024-03-05 12:17:35 -05:00
dergoegge
4f5baac6ca
[validation] Isolate merkle root checks
Github-Pull: #29412
Rebased-From: 95bddb930a
2024-03-05 12:17:28 -05:00
UdjinM6
f93be0103f
test: make sure keypool sizes do not change on getrawchangeaddress/getnewaddress failures
Github-Pull: bitcoin/bitcoin#29510
Rebased-From: e073f1dfda
2024-03-01 17:12:36 -05:00
UdjinM6
7c08ccf19b
wallet: Avoid updating ReserveDestination::nIndex when GetReservedDestination fails
Github-Pull: bitcoin/bitcoin#29510
Rebased-From: 367bb7a80c
2024-03-01 17:12:25 -05:00
fanquake
1ce5accc32
Merge bitcoin/bitcoin#29464: [25.2] Final backports and changes for 25.2rc1
9f13dc1ed3 doc: Update release notes for 25.2rc1 (Ava Chow)
a27662b16a doc: update manpages for 25.2rc1 (Ava Chow)
65c6171784 build: Bump to 25.2rc1 (Ava Chow)
cf0f43ee42 wallet: Fix use-after-free in WalletBatch::EraseRecords (MarcoFalke)
6acfc4324c Use only Span{} constructor for byte-like types where possible (MarcoFalke)
b40d10787b util: Allow std::byte and char Span serialization (MarcoFalke)

Pull request description:

  Backport:

  * #29176
  * #27927

  #29176 does not cleanly backport, and it also requires 27927 to work. Both are still fairly simple backports.

  Also does the rest of the version bump tasks for 25.2rc1.

ACKs for top commit:
  fanquake:
    ACK 9f13dc1ed3

Tree-SHA512: 9d9dbf415f8559410eba9a431b61a8fc94216898d2d1fd8398e1f7a22a04790faade810e65324c7a797456b33396c3a58f991e81319aaaa63d3ab441e5e20dbc
2024-02-26 11:54:29 +00:00
Ava Chow
9f13dc1ed3 doc: Update release notes for 25.2rc1 2024-02-21 18:52:41 -05:00
Ava Chow
a27662b16a doc: update manpages for 25.2rc1 2024-02-21 18:48:50 -05:00
Ava Chow
65c6171784 build: Bump to 25.2rc1 2024-02-21 18:39:11 -05:00
MarcoFalke
cf0f43ee42
wallet: Fix use-after-free in WalletBatch::EraseRecords
Github-Pull: bitcoin/bitcoin#29176
Rebased-From: faebf1df2a
2024-02-21 18:34:20 -05:00
MarcoFalke
6acfc4324c
Use only Span{} constructor for byte-like types where possible
This removes bloat that is not needed.

Github-Pull: bitcoin/bitcoin#27927
Rebased-From: fa38d86235
2024-02-21 18:34:05 -05:00
MarcoFalke
b40d10787b
util: Allow std::byte and char Span serialization
Github-Pull: bitcoin/bitcoin#27927
Rebased-From: fa257bc831
2024-02-21 18:33:43 -05:00
fanquake
8087626cbd
Merge bitcoin/bitcoin#28768: [25.x] Backports
53bbda5114 doc: update release notes for 25.x (fanquake)
31e1e035be test: add regression test for the getrawtransaction segfault (Martin Zumsande)
041228d293 rpc: fix getrawtransaction segfault (Martin Zumsande)
b86285df1f gui: fix crash on selecting "Mask values" in transaction view (Sebastian Falbesoner)
c21024fd86 doc: add historical release notes for 25.1 (fanquake)

Pull request description:

  Collecting backports for the 25.x branch. Currently:
  * https://github.com/bitcoin-core/gui/pull/774
  * https://github.com/bitcoin/bitcoin/pull/29003

ACKs for top commit:
  stickies-v:
    ACK 53bbda5114

Tree-SHA512: 9b1ba17cce9de70d20329372ba71225dd930718a1f7db84a7be764dcfbba01c5e466255e7b95433ab6d7559ee8aaa04cc99ee5d1512d91fcc0a8015f1aa4150a
2024-01-16 11:23:36 +00:00
fanquake
53bbda5114
doc: update release notes for 25.x 2024-01-16 09:28:18 +00:00
Martin Zumsande
31e1e035be
test: add regression test for the getrawtransaction segfault
This fails on master without the previous commit.

Github-Pull: #29003
Rebased-From: 9075a44646
2024-01-15 15:23:49 +00:00
Martin Zumsande
041228d293
rpc: fix getrawtransaction segfault
The crash would happen when querying a mempool transaction with verbosity=2, while pruning.

Github-Pull: #29003
Rebased-From: 494a926d05
2024-01-15 15:23:49 +00:00
Sebastian Falbesoner
b86285df1f
gui: fix crash on selecting "Mask values" in transaction view
This commits fixes a crash bug that can be caused with the following steps:
- change to the "Transactions" view
- right-click on an arbitrary transaction -> "Show transaction details"
- close the transaction detail window again
- select "Settings" -> "Mask values"

The problem is that the list of opened dialogs, tracked in the member
variable `m_opened_dialogs`, is only ever appended with newly opened
transaction detail dialog pointers, but never removed. This leads to
dangling pointers in the list, and if the "Mask values" menu item is
selected, a crash is caused in the course of trying to close the opened
transaction detail dialogs (see `closeOpenedDialogs()` method). Fix this
by removing the pointer from the list if the corresponding widget is
destroyed.

Github-Pull: https://github.com/bitcoin-core/gui/pull/774
Rebased-From: e26e665f9f
2023-12-11 15:51:59 +00:00
fanquake
c21024fd86
doc: add historical release notes for 25.1 2023-12-11 15:51:59 +00:00
fanquake
7da4ae1f78
Merge bitcoin/bitcoin#28655: [25.1] Final Changes
a13670090d doc: update release notes for 25.1 (fanquake)
e8d5c35e80 doc: update manual pages for 25.1 (fanquake)
9e00b73ee7 build: bump version to 25.1 final (fanquake)

Pull request description:

  Final changes for `v25.1`.
  PR for bitcoincore.org is here: https://github.com/bitcoin-core/bitcoincore.org/pull/991.
  No additional changes have been backported since rc1 (tagged 14 days ago),
  and no bugs or issues have been reported (test bins have been available for 9 days).

ACKs for top commit:
  hebasto:
    ACK a13670090d.
  TheCharlatan:
    lgtm ACK a13670090d

Tree-SHA512: 037f937dd4d2a9de15ff15a80f35b6047b61ffc3d9a33e7d4a4fcbce6302569bbc516c6da5849211b34ebbe914c4edcdd182e2d1d43897d0dcd32834ce6f2574
2023-10-16 16:44:20 +01:00
fanquake
a13670090d
doc: update release notes for 25.1 2023-10-16 11:35:40 +02:00
fanquake
e8d5c35e80
doc: update manual pages for 25.1 2023-10-16 11:34:25 +02:00
fanquake
9e00b73ee7
build: bump version to 25.1 final 2023-10-16 11:30:08 +02:00
fanquake
167d3e2f16
Merge bitcoin/bitcoin#28559: [25.1] Final changes for 25.1rc1
10f3f813b2 doc: add release notes for 25.1rc1 (fanquake)
71aed7aa31 doc: update manual pages for 25.1rc1 (fanquake)
02f059c819 build: Bump version to 25.1rc1 (fanquake)
dc1fcec026 doc: add 25.0 release notes (fanquake)

Pull request description:

  Final changes to tag a `25.1rc1`.
  Bumps version numbers, man pages, adds release notes etc.

ACKs for top commit:
  dergoegge:
    ACK 10f3f813b2
  hebasto:
    ACK 10f3f813b2, I have reviewed the code and it looks OK.
  willcl-ark:
    ACK 10f3f813b2
  stickies-v:
    ACK 10f3f813b2

Tree-SHA512: 3e1c527dac06afb4c8e1e481055211f69aa0ed769ac242ed610d23d470bbc0c062227034d01876ba4a5fa836e953fb001e8b0d6bc026069d372d34b8a031fb25
2023-10-04 13:10:16 +01:00
fanquake
10f3f813b2
doc: add release notes for 25.1rc1 2023-10-04 11:24:05 +01:00
fanquake
71aed7aa31
doc: update manual pages for 25.1rc1 2023-10-04 11:24:05 +01:00
fanquake
02f059c819
build: Bump version to 25.1rc1 2023-10-04 11:24:05 +01:00
fanquake
dc1fcec026
doc: add 25.0 release notes 2023-10-04 11:24:05 +01:00
fanquake
9f8d501cb8
Merge bitcoin/bitcoin#28487: [25.1] Final backports
45a5fcb165 http: bugfix: track closed connection (stickies-v)
752a456fa8 http: log connection instead of request count (stickies-v)
ae86adabe4 http: refactor: use encapsulated HTTPRequestTracker (stickies-v)
f31899d19a gui: macOS, make appMenuBar part of the main app window (furszy)
64ffa94231 gui: macOS, do not process dock icon actions during shutdown (furszy)
e270f3f857 depends: fix unusable memory_resource in macos qt build (fanquake)
a6683945ca build, macos: Fix `qt` package build with new Xcode 15 linker (Hennadii Stepanov)
b3517cb1b5 test: Test loading wallets with conflicts without a chain (Andrew Chow)
d63478cb50 wallet: Check last block and conflict height are valid in MarkConflicted (Andrew Chow)
5e51a9cc72 ci: Nuke Android APK task, Use credits for tsan (MarcoFalke)
910c36253e test: ensure old fee_estimate.dat not read on restart and flushed (ismaelsadeeq)
37764d3300 tx fees, policy: read stale fee estimates with a regtest-only option (ismaelsadeeq)
16bb9161fa tx fees, policy: do not read estimates of old fee_estimates.dat (ismaelsadeeq)
c4dd5989b3 tx fees, policy: periodically flush fee estimates to fee_estimates.dat (ismaelsadeeq)
c36770cefd test: wallet, verify migration doesn't crash for an invalid script (furszy)
0d2a33e05c wallet: disallow migration of invalid or not-watched scripts (furszy)
2c51a07c08 Do not use std::vector = {} to release memory (Pieter Wuille)

Pull request description:

  Further backports for the `25.x` branch. Currently:
  * https://github.com/bitcoin/bitcoin/pull/27622
  * https://github.com/bitcoin/bitcoin/pull/27834
  * https://github.com/bitcoin/bitcoin/pull/28125
  * https://github.com/bitcoin/bitcoin/pull/28452
  * https://github.com/bitcoin/bitcoin/pull/28542
  * https://github.com/bitcoin/bitcoin/pull/28543
  * https://github.com/bitcoin/bitcoin/pull/28551
  * https://github.com/bitcoin/bitcoin/pull/28571
  * https://github.com/bitcoin-core/gui/pull/751

ACKs for top commit:
  hebasto:
    re-ACK 45a5fcb165, only #28551 has been backported with since my recent [review](https://github.com/bitcoin/bitcoin/pull/28487#pullrequestreview-1655584132).
  dergoegge:
    reACK 45a5fcb165
  willcl-ark:
    reACK 45a5fcb165

Tree-SHA512: 0f5807aa364b7c2a2039fef11d5cd5e168372c3bf5b0e941350fcd92e7db4a1662801b97bb4f68e29788c77d24bbf97385a483c4501ca72d93fa25327d5694fa
2023-10-04 11:23:14 +01:00
stickies-v
45a5fcb165
http: bugfix: track closed connection
It is possible that the client disconnects before the request is
handled. In those cases, evhttp_request_set_on_complete_cb is never
called, which means that on shutdown the server we'll keep waiting
endlessly.

By adding evhttp_connection_set_closecb, libevent automatically
cleans up those dead connections at latest when we shutdown, and
depending on the libevent version already at the moment of remote
client disconnect. In both cases, the bug is fixed.

Github-Pull: #28551
Rebased-From: 68f23f57d7
2023-10-04 10:12:59 +01:00
stickies-v
752a456fa8
http: log connection instead of request count
There is no significant benefit in logging the request count instead
of the connection count. Reduces amount of code and computational
complexity.

Github-Pull: #28551
Rebased-From: 084d037231
2023-10-04 10:11:01 +01:00
stickies-v
ae86adabe4
http: refactor: use encapsulated HTTPRequestTracker
Introduces and uses a HTTPRequestTracker class to keep track of
how many HTTP requests are currently active, so we don't stop the
server before they're all handled.

This has two purposes:
1. In a next commit, allows us to untrack all requests associated
with a connection without running into lifetime issues of the
connection living longer than the request
(see https://github.com/bitcoin/bitcoin/pull/27909#discussion_r1265614783)

2. Improve encapsulation by making the mutex and cv internal members,
and exposing just the WaitUntilEmpty() method that can be safely
used.

Github-Pull: #28551
Rebased-From: 41f9027813
2023-10-04 10:10:35 +01:00
furszy
f31899d19a
gui: macOS, make appMenuBar part of the main app window
By moving the appMenuBar destruction responsibility to the QT
framework, we ensure the disconnection of the submenus signals
prior to the destruction of the main app window.

The standalone menu bar may have served a purpose in earlier
versions when it didn't contain actions that directly open
specific screens within the main application window. However,
at present, all the actions within the appMenuBar lead to the
opening of screens within the main app window. So, the absence
of a main app window makes these actions essentially pointless.

Github-Pull: gui#751
Rebased-From: bae209e387
2023-10-03 15:59:17 +01:00
furszy
64ffa94231
gui: macOS, do not process dock icon actions during shutdown
As the 'QMenuBar' is created without a parent window in MacOS, the
app crashes when the user presses the shutdown button and, right
after it, triggers any action in the menu bar.

This happens because the QMenuBar is manually deleted in the
BitcoinGUI destructor but the events attached to it children
actions are not disconnected, so QActions events such us the
'QMenu::aboutToShow' could try to access null pointers.

Instead of guarding every single QAction pointer inside the
QMenu::aboutToShow slot, or manually disconnecting all
registered events in the destructor, we can check if a
shutdown was requested and discard the event.

The 'node' field is a ref whose memory is held by the
main application class, so it is safe to use here. Events
are disconnected prior destructing the main application object.

Furthermore, the 'MacDockIconHandler::dockIconClicked' signal
can make the app crash during shutdown for the very same
reason. The 'show()' call triggers the 'QApplication::focusWindowChanged'
event, which is connected to the 'minimize_action' QAction,
which is also part of the app menu bar, which could no longer exist.

Github-Pull: gui#751
Rebased-From: e14cc8fc69
2023-10-03 15:58:41 +01:00
fanquake
e270f3f857
depends: fix unusable memory_resource in macos qt build
See https://codereview.qt-project.org/c/qt/qtbase/+/482392.

Github-Pull: #28571
Rebased-From: 848eec0936
2023-10-03 15:55:04 +01:00