Elements 0.21: backports from Core 0.21.0#1029
Elements 0.21: backports from Core 0.21.0#1029apoelstra merged 84 commits intoElementsProject:elements-0.21from
Conversation
5509e9e to
aa68999
Compare
aa68999 to
6c0bae5
Compare
|
Rebased. cc @gwillen this is ready for review |
9f26e9b to
4310a10
Compare
(cherry picked from commit 7ffac12)
…nt and wallet_name parameter specify a wallet (cherry picked from commit b1f59d5)
Aplies a patch to Qt that fixes the non-determinism by modifying Qt. The source of the non-determinism is how LLVM 8 optimizes qt_intersect_spans when compiling. The particular optimization that seems to be causing the problems is that a temp variable is being added for spans->y. For some reason, when it does this, it chooses different instructions to use when making that variable. We bypass this problem by patching qt_intersect_spans to always make and use this local variable. Github-Pull: #20447 Rebased-From: 8f7d1b3 Tree-SHA512: 558da5c2bb0373e2a89f2c219170f802036e0e87cc8e808336b23d074152cb893007a440f46ec957156b0921355cd18502710f2d224f27bc26e934c50ebebc41 (cherry picked from commit ab23a83)
(cherry picked from commit fa05d19)
(cherry picked from commit fac4e13)
(cherry picked from commit fa69c2c)
(cherry picked from commit c46c18b)
It is unnecessary to upgrade to FEATURE_HD_SPLIT if this feature is already supported by the wallet. Because upgrading to FEATURE_HD_SPLIT actually requires upgrading to FEATURE_PRE_SPLIT_KEYPOOL, users would accidentally be upgraded to FEATURE_PRE_SPLIT_KEYPOOL instead of nothing being done. Fixes the issue described at bitcoin/bitcoin#20403 (comment) (cherry picked from commit 2498b04)
(cherry picked from commit 99d56e3)
(cherry picked from commit ca8cd89)
A check to raise an error on zero-fee txns was mistakenly extended in commit a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include fundrawtransaction and walletcreatefundedpsbt. This commit overrides zero fee rate checking for these two RPCs, not only for the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new fee_rate (sat/vB) arg. Github-Pull: #20426 Rebased-From: 1b3d700 (cherry picked from commit 54e1edc)
as the feeRate argument should soon be deprecated. Also loosen one test (and a similar one) that caused a one-off CI failure with: expected message 'Insufficient total fee 0.00000141, must be at least 0.00001704 (oldFee 0.00000999 + incrementalFee 0.00000705)' actual message 'Insufficient total fee 0.00000141, must be at least 0.00001712 (oldFee 0.00001007 + incrementalFee 0.00000705)' Github-Pull: #20426 Rebased-From: 3f1e10b (cherry picked from commit 6e4969f)
See the corresponding BIP change: bitcoin/bips#1043 Github-Pull: #20564 Rebased-From: 1583498 (cherry picked from commit bead935)
Whenever both encodings are permitted, try both, and if only one succeeds, return that one. Otherwise prefer the one for which the heuristic sanity check passes. If that is the case for neither or for both, return the extended-permitting deserialization. Github-Pull: #20595 Rebased-From: 39c42c4 (cherry picked from commit 1caa32e)
Introduces a DeferringSignatureChecker which simply takes a BaseSignatureChecker and passes through everything. SignatureExtractorChecker now subclasses DeferringSignatureChecker. This allows for all BaseSignatureChecker functions to be implemented for SignatureExtractorChecker, while allowing for future signature checkers which opreate similarly to SignatureExtractorChecker. Github-Pull: #21166 Rebased-From: 6965456 (cherry picked from commit 7de019b)
During each loop of CreateTransaction, instead of constantly getting a new feerate, use the feerate that we have already fetched for all fee calculations. Thix fixes a race condition where the feerate required changes during each iteration of the loop. This commit changes behavior as the "Fee estimation failed" error will now take priority over "Signing transaction failed". Github-Pull: #21083 Rebased-From: 1a6a0b0 (cherry picked from commit 48fc675)
Make sure that all fee calculations use the same feerate. coin_selection_params.effective_fee is the variable we use for all fee calculations, so get rid of remaining nFeeRateNeeded usages and just directly set coin_selection_params.effective_fee. Does not change behavior. Github-Pull: #21083 Rebased-From: e2f429e (cherry picked from commit 34c89f9)
Instead of setting the long term feerate for each SelectCoinsMinConf iteration, set it once during CreateTransaction and let it be shared with each SelectCoinsMinConf through coin_selection_params.m_long_term_feerate. Does not change behavior. Github-Pull: #21083 Rebased-From: 448d04b (cherry picked from commit bcd7166)
Instead of fetching the discard feerate for each SelectCoinsMinConf iteration, fetch and cache it once during CreateTransaction so that it is shared for each SelectCoinsMinConf through coin_selection_params.m_discard_feerate. Does not change behavior. Github-Pull: #21083 Rebased-From: bdd0c29 (cherry picked from commit 5fc381e)
4310a10 to
321ff88
Compare
|
Checked that all the commits (up to 321ff88) are the thing they claim to be. (I reviewed the I didn't check yet that the things they claim to be are reasonable. |
|
Oh, except e45e7c1, where our diff is empty, whereas upstream's diff is adding a test case for transaction decoding (ambiguity between segwit and pre-segwit encoding format.) Possibly the offending issue just doesn't exist in elements, and you did that on purpose? |
|
Thank you! Let me redo the last four commits. I forgot to use |
This is a non-functional change that replaces the `CNode` on-stack variables with `CNode` pointers. The reason for this is that it would allow us to add those `CNode`s to `CConnman::vNodes[]` which in turn would allow us to check that they are disconnected properly - a `CNode` object must be in `CConnman::vNodes[]` in order for its `fDisconnect` flag to be set. If we store pointers to the on-stack variables in `CConnman` then it would crash at the end, trying to `delete` them. Github-Pull: #21571 Rebased-From: 4d6e246 (cherry picked from commit dfeb6c1)
321ff88 to
ebf6a24
Compare
|
Replaced last four commits. |
|
Added doc update and release version |
8e6ca1f to
b6fccab
Compare
Basically I just ran
for bin in elements-cli elementsd elements-tx elements-wallet
do
help2man ./src/$bin > ./doc/man/$bin.1
echo "Done $bin"
done
b6fccab to
3168f2c
Compare
|
Rechecked that last four cherry-picks now look good (they match what they say they were cherry-picked from.) Checked that the set of cherry-picked commits matches the non-merge commits in:
after manually excluding the speedy trial ones, the bech32 ones, and the one-off ones by Wladimir doing release activities. |
|
utACK 3168f2c |
|
There's a small issue I spotted in the manpages, probably implying the same issue exists in the help text, which we're going to leave for -rc2. (The port looks wrong.) |
This is a cherry-pick of all the commits from Bitcoin Core 0.21.1 that are not on master, except those related to bech32m and Speedy Trial.
TODO (will do each in a separate additional commit, no need to delay review)