-
Notifications
You must be signed in to change notification settings - Fork 38.6k
[25.1] Final backports #28487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[25.1] Final backports #28487
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
unrelated: Looks like tsan seems to be starting to fail some time within the last two weeks. |
Github-Pull: bitcoin#28452 Rebased-From: 3fcd7fc
The legacy wallet allowed to import any raw script, without checking if it was valid or not. Appending it to the watch-only set. This causes a crash in the migration process because we are only expecting to find valid scripts inside the legacy spkm. These stored scripts internally map to `ISMINE_NO` (same as if they weren't stored at all..). So we need to check for these special case, and take into account that the legacy spkm could be storing invalid not watched scripts. Which, in code words, means IsMineInner() returning IsMineResult::INVALID for them. Github-Pull: bitcoin#28125 Rebased-From: 1de8a23
The migration process must skip any invalid script inside the legacy spkm and all the addressbook records linked to them. These scripts are not being watched by the current wallet, nor should be watched by the migrated one. IsMine() returns ISMINE_NO for them. Github-Pull: bitcoin#28125 Rebased-From: 8e7e3e6
This reduces chances of having old estimates in fee_estimates.dat. Github-Pull: bitcoin#27622 Rebased-From: 5b886f2
Old fee estimates could cause transactions to become stuck in the mempool. This commit prevents the node from using stale estimates from an old file. Github-Pull: bitcoin#27622 Rebased-From: 3eb241a
If -acceptstalefeeestimates option is passed stale fee estimates can now be read when operating in regtest environments. Additionally, this commit updates all declarations of the CBlockPolicyEstimator class to include a the second constructor variable. Github-Pull: bitcoin#27622 Rebased-From: cf219f2
This commit adds tests to ensure that old fee_estimates.dat files are not read and that fee_estimates are periodically flushed to the fee_estimates.dat file. Additionaly it tests the -regtestonly option -acceptstalefeeestimates. Github-Pull: bitcoin#27622 Rebased-From: d2b39e0
Github-Pull: bitcoin#27834 Rebased-From: fa22538
19cd633 to
5e51a9c
Compare
MarkConflicted calculates conflict confirmations incorrectly when both the last block processed height and the conflicting height are negative (i.e. uninitialized). If either are negative, we should not be marking conflicts and should exit early. Github-Pull: bitcoin#28542 Rebased-From: 4660fc8
Loading a wallet with conflicts without a chain (e.g. wallet tool and migration) would previously result in an assertion due to -1 being both a valid number of conflict confirmations, and the indicator that that member has not been set yet. Github-Pull: bitcoin#28542 Rebased-From: 782701c
|
Added #28542. Slight diff in the tests to account for changes to |
|
This will hopefully have 1 or 2 additional changes added (see milestone/labels), but marking as ready for review. |
Github-Pull: bitcoin#28543 Rebased-From: 79ef528
dergoegge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a668394
willcl-ark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a668394
Verified the diffs between each patch and its Rebased-From patch
|
Suggesting to add bitcoin-core/gui#751 |
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: e14cc8f
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: bae209e
ok |
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When backporting #28452 locally, I've got the following diff with this PR:
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -35,6 +35,7 @@
#include <util/threadinterrupt.h>
#include <util/trace.h>
#include <util/translation.h>
+#include <util/vector.h>
#ifdef WIN32
#include <string.h>
Yea, because it's not used in that file in this branch. |
fac054d ci: Print Linux kernel info (MarcoFalke) Pull request description: Required to debug issues like bitcoin/bitcoin#28487 (comment). For example: ``` FATAL: ThreadSanitizer: unexpected memory mapping 0x57cf8f031000-0x57cf8f173000 ACKs for top commit: hebasto: ACK fac054d Tree-SHA512: 7eb158e52daffe5cbcdfa3ed1efb45e1930b80a2672558fe400c8d72ce59a8cbeb02296dfc2032721d511410885a1f057672fe8086ba1c72a494aef541bf7eb4
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK f31899d, I've applied all backports locally and got a zero diff with this PR branch.
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 bitcoin#27909 (comment)) 2. Improve encapsulation by making the mutex and cv internal members, and exposing just the WaitUntilEmpty() method that can be safely used. Github-Pull: bitcoin#28551 Rebased-From: 41f9027
There is no significant benefit in logging the request count instead of the connection count. Reduces amount of code and computational complexity. Github-Pull: bitcoin#28551 Rebased-From: 084d037
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: bitcoin#28551 Rebased-From: 68f23f5
|
This is ready for final review. |
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dergoegge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reACK 45a5fcb
willcl-ark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reACK 45a5fcb
build info
| Key | Value |
|---|---|
| Hostname | ubuntu |
| Arch | x86_64 |
| Kernel | 6.2.0-32-generic |
| System | Linux |
| CC | Ubuntu clang version 16.0.6 |
| CXX | Ubuntu clang version 16.0.6 |
| Configure | ./configure --with-incompatible-bdb --without-miniupnpc --without-natpmp --disable-bench --without-gui --enable-debug CXX=/usr/lib/ccache/clang++ CC=/usr/lib/ccache/clang --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh --no-create --no-recursion ./config.status ./config.status src/config/bitcoin-config.h |
Further backports for the
25.xbranch. Currently:qtpackage build with new Xcode 15 linker #28543