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
0.18.1: Backports #16035
0.18.1: Backports #16035
Conversation
Github-Pull: bitcoin#15983 Rebased-From: faf38bc
utACK for 5935f01 But I guess it makes sense to keep this open for a while for other things that need to be backported to the 0.18 branch. |
This helps to distinguish it from CNode::fRelayTxes and avoid bugs like 425278d Github-Pull: bitcoin#15990 Rebased-From: fa1dce7
Github-Pull: bitcoin#15990 Rebased-From: fa3872e
Github-Pull: bitcoin#15990 Rebased-From: fa320de
Github-Pull: bitcoin#15990 Rebased-From: fa8ced3
Could include #14984. |
Updates text since -whitelistforcerelay was set to false by default in PR bitcoin#15193. Github-Pull: bitcoin#15890 Rebased-From: e0bb279
This change marks the already-existing bitcoin-wallet.1 manpage file for installation together with the others. Previously, only bitcoind.1, bitcoin-cli.1, bitcoin-tx.1 and bitcoin-qt.1 would be installed. Github-Pull: bitcoin#15947 Rebased-From: 00d1104
@MarcoFalke I won't open a PR to backport 14984 until you say so, it should be a clean cherry pick. |
Github-Pull: bitcoin#15957 Rebased-From: c3ef63a
Github-Pull: bitcoin#14039 Rebased-From: bb530ef
Github-Pull: bitcoin#15893 Rebased-From: 25b0786
Github-Pull: bitcoin#15893 Rebased-From: cc556e4
Github-Pull: bitcoin#16021 Rebased-From: fa2b52a
Done |
The GCC bug test backport needs to be fixed for the test/compilerbug_tests.cpp:5:10: fatal error: test/setup_common.h: No such file or directory
#include <test/setup_common.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated. |
Github-Pull: bitcoin#16044 Rebased-From: 6e6494b
Github-Pull: bitcoin#16122 Rebased-From: 2d8ad2f
Github-Pull: bitcoin#16135 Rebased-From: d2ae6be
Github-Pull: bitcoin#15985 Rebased-From: 58e291c
Ugh, thx. Fixed. |
The menu must be created before connecting to aboutToShow signal. Github-Pull: bitcoin#16231 Rebased-From: 5224be5
@MarcoFalke What makes #16205 important to backport? |
@practicalswift It's mentioned at the bottom of that PR: #16205 (comment).
|
Thanks for asking. Please let me know if there is a pull request missing for backport or something was backported in error. Apart from a bunch one-line conflicts, the commits are all clean cherry-picks. |
Qt docs: This attribute must be set before QGuiApplication is constructed. Github-Pull: bitcoin#16254 Rebased-From: 099e4b9
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.
Checked 5935f01 and ensured that -fstack-reuse=none
was being added to CXXFLAGS when compiling with GCC:
CC = gcc
CFLAGS = -g -O2
CPPFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
CXX = g++ -std=c++11
CXXFLAGS = -fstack-reuse=none -Wstack-protector -fstack-protector-all -Wall -Wextra -Wformat -Wvla -Wredundant-decls -Wno-unused-parameter -Wno-implicit-fallthrough -g -O2
LDFLAGS = -pthread -Wl,-z,relro -Wl,-z,now -pie
ARFLAGS = cr
...
(16035)root@69972490e9d9:/bitcoin# gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Checked 3dbc7de, and that loaded wallets are shown as disabled.
Checked b55cbe8 and that the bitcoin.conf
opening behaviour works as expected.
Checked 7ed1a60 and that it’s not possible to enter and execute commands in the console during startup.
Checked d80c558 and that you cannot cause a segfault using:
src/bitcoin-cli -regtest dumpwallet ~/downloads/wallet
src/bitcoin-cli -regtest importwallet ~/downloads/wallet
Checked d1f2611. Note that this is not a clean cherry-pick. #include <test/setup_common.h>
has been fixed up to be #include <test/test_bitcoin.h>
for 0.18
.
Also checked that the test failed if you compile without -fstack-protector=none
:
Running 1 test case...
Entering test module "Bitcoin Test Suite"
test/compilerbug_tests.cpp(8): Entering test suite "compilerbug_tests"
test/compilerbug_tests.cpp(30): Entering test case "gccbug_90348"
test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
test/compilerbug_tests.cpp(38): error: in "compilerbug_tests/gccbug_90348": check check_zero(in, i) has failed
test/compilerbug_tests.cpp(30): Leaving test case "gccbug_90348"; testing time: 19263us
test/compilerbug_tests.cpp(8): Leaving test suite "compilerbug_tests"; testing time: 19286us
Leaving test module "Bitcoin Test Suite"; testing time: 19364us
*** 4 failures are detected in the test module "Bitcoin Test Suite"
make[3]: *** [Makefile:14472: test/compilerbug_tests.cpp.test] Error 1
Note that 592016b is not a clean cherry-pick. It has the removal of the assert_greater_than
include, which is not in the referenced commit (f402012).
Note that 79745d1 does not contain the src/sync.cpp change from fa8f195.
I assume d9fc969 was backported because other test changes rely on it? Regardless, why not backport the other commit (b679785) from # 15826? I’d have thought backporting the documentation would also be useful.
Checked 2800b3d and that wallets still appear in the GUI.
Checked 715da91 and that the warning is removed on a Ubuntu Bionic system. Given I'm running in virtualbox, I don't think I can see the same improvements that others saw in #16254.
Other commits I looked over the backported code.
Currently seeing failures running the functional tests. Have commented inline.
|
||
raw = self.nodes[0].createrawtransaction([{"txid": unspent['txid'], "vout": unspent['vout']}], {self.nodes[0].getnewaddress(): 1}) | ||
tx = FromHex(CTransaction(), raw) | ||
assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex()) |
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.
Traceback (most recent call last):
File "/Users/michael/github/bitcoin/test/functional/test_framework/test_framework.py", line 175, in main
self.run_test()
File "/Users/michael/github/bitcoin/test/functional/p2p_segwit.py", line 278, in run_test
self.test_superfluous_witness()
File "/Users/michael/github/bitcoin/test/functional/p2p_segwit.py", line 2076, in test_superfluous_witness
assert_raises_rpc_error(-22, "TX decode failed", self.nodes[0].decoderawtransaction, serialize_with_bogus_witness(tx).hex())
AttributeError: 'bytes' object has no attribute 'hex'
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.
@fanquake .hex
requires python3.5
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.
@MarcoFalke isn’t the 0.18 branch minimum 3.4.9?
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.
Bumped it, since 3.4 is EOL
Github-Pull: bitcoin#15826 Rebased-From: b679785
Indeed. Good point on the doc, added as backport. |
See also: dddd1d0
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.
Commit 79745d1 is missing:
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -47,7 +47,9 @@ struct CLockLocation {
std::string ToString() const
{
- return mutexName + " " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : "");
+ return strprintf(
+ "%s %s:%s%s (in thread %s)",
+ mutexName, sourceFile, itostr(sourceLine), (fTry ? " (TRY)" : ""), m_thread_name);
}
private:
Is there a reason?
Edit: if the goal is to just replace fprintf
then it's all good.
ACK bcb27d7, I've verified all commits but just built each unclean cherry pick (which are trivial).
Edit: I think this PR is now substantial enough. |
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 bcb27d7
Had a quick look over af25a75, and confirmed that the functional tests are now running (using 3.5.6) after bcb27d7. Full test output is here. Note that p2p_invalid_messages.py
fails quite often on macOS, so isn't an issue here.
I agree that this is turning into a lot to review and test, so would suggest we merge this soon (assuming some more reviewers) without piling to much more in.
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.
These should be a clean merge, not cherry-picked:
Bugfix: test/functional/rpc_psbt: Remove check for specific error mes…
Bugfix: test/functional/rpc_psbt: Correct test description comment …
@luke-jr I used cherry-picks for consistency. (Most other backports are cherry-picks) |
Merges should be used whenever possible. (Ideally, it would be nice if we could get to the point where most fixes are clean merges.) |
I agree, but sometimes it is not clear in advance what is a fix and needs to be backported. Sounds off-topic for this pull request and could be raised in an irc meeting? |
The incorrect cherry-picks are part of this PR :) |
This has been the policy for years, afaic. So to change it, it would have to be discussed. Also, I am not sure how that will interfere with the release process scripts of @laanwj. |
ACK bcb27d7 ; compiled and ran the tests; checked the commits match the commits they claim to, and that those commits are in master. didn't check that the commits haven't been reverted in master. |
ACK bcb27d7 Please don't merge yet as @fanquake would like to do this as his first merge to a branch 😄
It can handle either merges (only requirement is to have the correct PR # in the title of the merge commit), or the |
bcb27d7 .python-version: Bump to 3.5.6 (MarcoFalke) af25a75 Add comments to Python ECDSA implementation (John Newbery) 715da91 Set AA_EnableHighDpiScaling attribute early (Hennadii Stepanov) 2800b3d gui: Fix open wallet menu initialization order (João Barbosa) e78007f Make and get the multisig redeemscript and destination in one function instead of two (Andrew Chow) d9fc969 Pure python EC (Pieter Wuille) 23ba460 test: Add test that addmultisigaddress fails for watchonly addresses (MarcoFalke) 13b3bb5 test: Fixup creatmultisig documentation and whitespace (MarcoFalke) 79745d1 Replace remaining fprintf with tfm::format manually (MarcoFalke) beb09f0 scripted-diff: Replace fprintf with tfm::format (MarcoFalke) e29aa6e Exceptions should be caught by reference, not by value. (Kristaps Kaupe) f88959b tinyformat: Add doc to Bitcoin Core specific strprintf (MarcoFalke) 0023c97 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke) 832eb4f Bugfix: test/functional/rpc_psbt: Correct test description comment (Luke Dashjr) 966d8d0 Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions (Luke Dashjr) bb36ac8 rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke) d24d0ec Add example 2nd arg to signrawtransactionwithkey (Chris Moore) 592016b fixup: Fix prunning test (João Barbosa) c80a498 Fix RPC/pruneblockchain returned prune height (Jonas Schnelli) b239824 gui: Enable open wallet menu on setWalletController (João Barbosa) d1f2611 Add test for GCC bug 90348 (Pieter Wuille) d80c558 gui: Set progressDialog to nullptr (João Barbosa) 7ed1a60 gui: Enable console line edit on setClientModel (João Barbosa) b55cbe8 qt: fix opening bitcoin.conf via Preferences on macOS; see #15409 (shannon1916) b6c1f94 Disallow extended encoding for non-witness transactions (take 3) (MarcoFalke) 8603108 Add test for superfluous witness record in deserialization (Gregory Sanders) 5a58ddb Fix missing input template by making minimal tx (Gregory Sanders) 206f5ee Disallow extended encoding for non-witness transactions (Pieter Wuille) 3dbc7de Show loaded wallets as disabled in open menu instead of nothing (MeshCollider) a635377 Install bitcoin-wallet manpage. (Daniel Kraft) eb85ee6 Doc: remove text about txes always relayed from -whitelist (David A. Harding) 890a92e doc: Mention blocksonly in reduce-traffic.md, unhide option (MarcoFalke) 3460555 test: Add test for p2p_blocksonly (MarcoFalke) 8f215c7 test: Format predicate source as multiline on error (MarcoFalke) 9c1a607 net: Rename ::fRelayTxes to ::g_relay_txes (MarcoFalke) 5935f01 build with -fstack-reuse=none (MarcoFalke) Pull request description: Tree-SHA512: 5cd73a4319cb69c92b528239cf97c0ed5fcf2b9e8c7fe154e4679eeec95db433a0223d8dc574e4cdc96c1913cfdf160b10c42dcdbcb5bbc8fb743c07930ef9da
No description provided.