Age | Commit message (Collapse) | Author |
|
Tree-SHA512: 3a262c501cdfe9bda7f33045c6d16fb4d3aa46c11ebfd6664302460413c2333ea39fb201fbd7b9edaddb76f92138a3e026ec2f0a9ba40eabff45ae451d5c6af3
|
|
6a326cf66f04948ffe729e5540a69e159a7840ad tests: Test that a fully signed tx given to signrawtx is unchanged (Andrew Chow)
2d48d7dcfb93eeec36dd6f5cbad289b89ec69324 Simplify and fix CWallet::SignTransaction (Andrew Chow)
Pull request description:
Backport `CWallet::SignTransaction` from master which is simpler and not broken.
Previously `CWallet::SignTransaction` would return false for a fully signed transaction. This is a regression and obviously incorrect - a fully signed transaction is always complete. This occurs because `CWallet::SignTransaction` would iterate through each input and skip any further checks if the input was already signed. It would then end up falling through to the `return false` catch-all thus erroneously saying a fully signed transaction is incomplete. The change to attempting to use all `ScriptPubKeyMan`s fixes this problem since the `LegacyScriptPubKeyMan` (the only spkm implemented in 0.20) will verify inputs during its signing attempt and correctly return that it is complete when the inputs verify. Thus a fully signed transaction will be correctly identified as complete, `LegacyScriptPubKeyMan::SignTranaction` will return true, and so `CWallet::Transaction` will return true too.
Note that this is not a backport of any specific commit. Rather it is the end result of the changes we have made to this function in master.
Fixes #19737
ACKs for top commit:
fjahr:
Code review ACK 6a326cf66f04948ffe729e5540a69e159a7840ad
MarcoFalke:
re-ACK 6a326cf66f 👓
Tree-SHA512: 7b8e04cfc264de01a2de08a99477c1a110fa0965dcbd4305bf4632a165f28b090746789195f5cb584eb6d85e27d4801a09d2dad28e508d7898c7c088e771812b
|
|
fa074d2c7b9c3d34876c428d12672a505d4ce4eb Revert "Merge #19606: Backport wtxid relay to v0.20" (MarcoFalke)
Pull request description:
The 0.20 branch has bugfixes that should be released. However, a tag can currently not be created because the latest merge introduced a regression and is not a bugfix (https://github.com/bitcoin/bitcoin/pull/20317#issuecomment-723754509, https://github.com/bitcoin/bitcoin/pull/20317#issuecomment-727624755).
Fix that by reverting the last merge. Can be reviewed by re-doing the revert or calling `git diff HEAD HEAD~2 | wc` and observing an empty diff.
ACKs for top commit:
laanwj:
Code review ACK fa074d2c7b9c3d34876c428d12672a505d4ce4eb
Tree-SHA512: 1a1314b9bb85f44696dc307845e80292998d6c9c000e7386c48405e74400d9cd22be6996e555f198da917e04024a1c8e609dfd830759a27fe4070168b0d272bb
|
|
7566af419f3e7060152ae062f5a578f543a16a5a doc: Update data directory path comments (Hennadii Stepanov)
09261de6edd7f9fd876607fef350995052da63ba util: Add StripRedundantLastElementsOfPath function (Hennadii Stepanov)
8ef0dace867dbdc1b1dead98f0d69f64eb886d67 macOS deploy: use the new plistlib API (Jonas Schnelli)
314e79581f05881284ed9dfb661754830ed54833 build: fix mutex detection when building bdb on macOS (fanquake)
1f67a30e8374951997af924293c60eff56ae39ed random: fixes read buffer resizing in RandAddSeedPerfmon (Ethan Heilman)
6113b547f4cce8be732bf45687a74eccf4a3abfc net: Send post-verack handshake messages at most once (MarcoFalke)
bdf15d0d5d12eb33594b90ebb48366ea7bb5c3d9 rpc: Adjust witness-tx deserialize error message (MarcoFalke)
731502a18385276887a57ad8574fdbaef976920d rpc: Properly deserialize txs with witness before signing (MarcoFalke)
ee0082b886264fcddd73c5bb7c41ba8316527b9c Avoid the use of abs64 in timedata (Pieter Wuille)
05bd0c220aa0f4cb6202dd19d3164ba2e7cb015e docs: Correct description for getblockstats's txs field (Nadav Ivgi)
Pull request description:
Backports the following PRs to the 0.20 branch:
* https://github.com/bitcoin/bitcoin/pull/19777 - docs: Correct description for getblockstats's txs field
* https://github.com/bitcoin/bitcoin/pull/19836 - rpc: Properly deserialize txs with witness before signing
* https://github.com/bitcoin/bitcoin/pull/20080 - Strip any trailing `/` in -datadir and -blocksdir paths
* https://github.com/bitcoin/bitcoin/pull/20082 - [bugfix] random: fixes read buffer to use min rather than max
* https://github.com/bitcoin/bitcoin/pull/20141 - Avoid the use of abs64 in timedata
* https://github.com/bitcoin/bitcoin/pull/20146 - net: Send post-verack handshake messages at most once
* https://github.com/bitcoin/bitcoin/pull/20195 - build: fix mutex detection when building bdb on macOS
* https://github.com/bitcoin/bitcoin/pull/20298 - macOS deploy: use the new plistlib API
Will add additional commits as they become available.
ACKs for top commit:
MarcoFalke:
review ACK 7566af419f3e7060152ae062f5a578f543a16a5a 🗡
Tree-SHA512: add6bb978313c12c3e07bc232636ae9d1ab0edd0b816705c5c70eeb1cc04097165fd5e29d60c706886943ceb1f749a422020766b4aa2d23be51e9f839157a4bb
|
|
This reverts commit a339289c2ef9caffa1195436695a13f6e48e1bbc, reversing
changes made to b9ac31f2d29ae3e79c0f0cde5bab2d7213e6da51.
|
|
Github-Pull: #20080
Rebased-From: ad5cef5dfdd5802fc187a52e74d940a52f420a51
|
|
Co-authored-by: saibato <saibato.naga@pm.me>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Github-Pull: 20080
Rebased-From: b19e88230f0e93e95e883e65376963cb9c36f606
|
|
+ Replaces std::max with std::min to resize buffer in RandAddSeedPerfmon
+ Documents behavior of RandAddSeedPerfmon
Github-Pull: #20082
Rebased-From: bd5215103eb3985c1622eddea45a040e6173829c
|
|
Github-Pull: #20146
Rebased-From: fa1f6f237d02265af616129402fa2b8a3019dda5
|
|
Github-Pull: #19836
Rebased-From: 33330778230961cfbf2a24de36b5877e395cc596
|
|
Github-Pull: #19836
Rebased-From: cccc7525697e7b8d99b545e34f0f504c78ffdb94
|
|
Github-Pull: #20141
Rebased-From: d1292f25f272401da0c58580521c74b1fa03a9ad
|
|
It does count the coinbase transaction.
Refs #19766
Github-Pull: #19777
Rebased-From: 4148f55dd016f940df50a44cf03d117cdb1dd929
|
|
|
|
|
|
|
|
Previously, TX_WITNESS_MUTATED could be returned during transaction validation
for either transactions that had a witness that was non-standard, or for
transactions that had no witness but were invalid due to segwit validation
rules.
However, for txid/wtxid-relay considerations, net_processing distinguishes the
witness stripped case separately, because it affects whether a wtxid should be
able to be added to the reject filter. It is safe to add the wtxid of a
witness-mutated transaction to the filter (as that wtxid shouldn't collide with
the txid, and hence it wouldn't interfere with transaction relay from
txid-relay peers), but it is not safe to add the wtxid (== txid) of a
witness-stripped transaction to the filter, because that would interfere with
relay of another transaction with the same txid (but different wtxid) when
relaying from txid-relay peers.
Also updates the comment explaining this logic, and explaining that we can get
rid of this complexity once there's a sufficient deployment of wtxid-relaying
peers on the network.
|
|
Using both txid and wtxid-based relay with peers means that we could sometimes
download the same transaction twice, if announced via two different hashes from
different peers.
Use a heuristic of delaying txid-peer-getdata requests by 2 seconds, if we have
at least one wtxid-based peer.
|
|
When sent to and received from a given peer, enables using wtxid's for
announcing and fetching transactions with that peer.
|
|
|
|
This adds a field to CNodeState that tracks whether to relay transactions with
that peer via wtxid, instead of txid. As of this commit the field will always
be false, but in a later commit we will add a way to negotiate turning this on
via p2p messages exchanged with the peer.
|
|
Previously, we only added txids to recentRejects if we were sure that the
transaction couldn't have had the wrong witness (either because the witness was
malleated or stripped).
In preparation for wtxid-based relay, we can observe that txid == wtxid for
transactions that have no witness, and add the wtxid of rejected transactions,
provided the transaction wasn't a witness-stripped one. This means that we now
add more data to the filter (as prior to this commit, any transaction with a
witness that failed to be accepted was being skipped for inclusion in the
filter) but witness malleation should still not interfere with relay of a valid
segwit transaction, because the txid of a segwit transaction would not be added
to the filter after failing validation.
In the future, having wtxids in the recent rejects filter will allow us to
skip downloading the same wtxid multiple times, once our peers use wtxids for
transaction relay.
Also add the txid to recentRejects if the transaction failed for
TX_INPUTS_NOT_STANDARD.
|
|
This is in preparation for wtxid-based invs (we need to be able to tell whether
we AlreadyHave() a transaction based on either txid or wtxid).
This also double the size of the bloom filter, which is overkill, but still
uses a manageable amount of memory.
|
|
|
|
|
|
Since it's only used for transactions, there's no need to pass in an inv type.
|
|
|
|
Backport CWallet::SignTransaction from master which is simpler and not
broken.
|
|
Our policy checks for non-standard inputs depend only on the non-witness
portion of a transaction: we look up the scriptPubKey of the input being
spent from our UTXO set (which is covered by the input txid), and the p2sh
checks only rely on the scriptSig portion of the input.
Consequently it's safe to add txids of transactions that fail these checks to
the reject filter, as the witness is irrelevant to the failure. This is helpful
for any situation where we might request the transaction again via txid (either
from txid-relay peers, or if we might fetch the transaction via txid due to
parent-fetching of orphans).
Further, in preparation for future witness versions being deployed on the
network, ensure that WITNESS_UNKNOWN transactions are rejected in
AreInputsStandard(), so that transactions spending v1 (or greater) witness
outputs will fall into this category of having their txid added to the reject
filter.
Github-Pull: #19620
Rebased-From: 7989901c7eb62ca28b3d1e5d5831041a7267e495
|
|
Tree-SHA512: b03b180f9ade0e6f74a722c9704725674abc8bdfdaed4579ed3b0569c6b584359a4696821d07c070887284c9876785ae92b1ccdc11fece0d505040e97fe81413
|
|
Github-Pull: #19517
Rebased-From: 75122780e2c46505d977e24c5612dfa9442ab754
|
|
Github-Pull: #19219
Rebased-From: 2ad58381fffb33d611abf900b73d9e6b5a4e35f8
|
|
This patch improves performance and resource usage around IP
addresses that are banned for misbehavior. They're already not
actually banned, as connections from them are still allowed,
but they are preferred for eviction if the inbound connection
slots are full.
Stop treating these like manually banned IP ranges, and instead
just keep them in a rolling Bloom filter of misbehaving nodes,
which isn't persisted to disk or exposed through the ban
framework. The effect remains the same: preferred for eviction,
avoided for outgoing connections, and not relayed to other peers.
Also change the name of this mechanism to better reflect reality;
they're not banned, just discouraged.
Contains release notes and several interface improvements by
John Newbery.
Github-Pull: #19219
Rebased-From: b691f2df5f7d443c0c9ee056ab94aa0fc19566d5
|
|
Github-Pull: #19300
Rebased-From: b9971ae5853c1d62e09d976a8705f4f731290d85
|
|
Offline signers will always need a non_witness_utxo so make sure it is
there.
Github-Pull: #19215
Rebased-From: 46004790588c24174a0bec49b540d158ce163ffd
|
|
Github-Pull: #19215
Rebased-From: 5279d8bc07d601fe6a67ad665fbc7591fe73c7de
|
|
Github-Pull: #19215
Rebased-From: 72f6bec1da198764d4648a10a61c485e7ab65e9e
|
|
https://github.com/bitcoin/bitcoin/pull/18982#pullrequestreview-416974841
Github-Pull: #18982
Rebased-From: 7eaf86d3bfc83f2beb3ef449707d5156853126fb
|
|
This fix is a based on the fix by Antoine Riard <ariard@student.42.fr> in
https://github.com/bitcoin/bitcoin/pull/18600.
Unlike that PR, which implements some new behavior, this just restores previous
wallet notification and status behavior for transactions removed from the
mempool because they conflict with transactions in a block. The behavior was
accidentally changed in two `CWallet::BlockConnected` updates:
a31be09bfd77eed497a8e251d31358e16e2f2eb1 and
7e89994133725125dddbfa8d45484e3b9ed51c6e from
https://github.com/bitcoin/bitcoin/pull/16624, causing issue
https://github.com/bitcoin/bitcoin/issues/18325.
The change here could be improved and replaced with a more comprehensive
cleanup, so it includes a detailed comment explaining future considerations.
Fixes #18325
Co-authored-by: Antoine Riard <ariard@student.42.fr>
Github-Pull: #18982
Rebased-From: b604c5c8b5892842f13dee89ae31812a28ab25d1
|
|
Co-authored-by: sipa <pieter@wuille.net>
Github-Pull: #18700
Rebased-From: e8fa0a3d2025509fcddc59fc618e91371542cf87
|
|
Pthread library does not set errno.
Pthread library's errno is returned by return value.
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Github-Pull: #19194
Rebased-From: cb38b069b0f41b1a26264784b1c1303c8ac6ab08
|
|
384d3f991c9bdeec6eb4685df5918877dbbe7634 Add missing QPainterPath include (Andrew Chow)
Pull request description:
This is needed to compile with Qt 5.15.
Github-Pull: #19097
Rebased-From: 79b0a69e09c1a912122e6431ea3c530cc292c690
Top commit has no ACKs.
Tree-SHA512: 23c4604cddb0bf5955afa6dfb6be87989df591e5f5ca5b85257c72e916f29337012b24c9ab5374a3289700ab7518ddb48f21195a2173ea1f935d69bd2ad13b8b
|
|
This is needed to compile with Qt 5.15.
Github-Pull: #19097
Rebased-From: 79b0a69e09c1a912122e6431ea3c530cc292c690
|
|
412d5fe8791c417bf46fc55a5bb8d59be98a33db QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate (Luke Dashjr)
2abe8cc3b760219cfa434e4c96e9f8d3611d0037 Bugfix: Include "csv","!segwit" in "rules" (Luke Dashjr)
Pull request description:
Original branch merges cleanly (no rebase needed)
See also #17946
ACKs for top commit:
jnewbery:
utACK 412d5fe8791c417bf46fc55a5bb8d59be98a33db
Tree-SHA512: 8b269f7782c10f02dc245cc377d91f594474eade6a32184a49fa2ed3928d91917e4b83eefee6947bfb5ffff54eca2781f8cf2169c1f0ad3fefca1d4b3cf304dd
|
|
Tree-SHA512: 50d0605712273d661f22d0ded2f8010d69fd8baa94537419d3d0ff82bf5f407e6d7bce0e8cf8ff32a2d8e40feb224124f30e22c52b0f132c3a56128335a2593a
|
|
Given that #18413 has not been backported.
|
|
ProcessMessage(...) fuzzer
Github-Pull: #18757
Rebased-From: fdceb6328382ac0f9d643f9d42ba0509062d7d48
|
|
Headers-first is the primary method of announcement on the network. If a
node fell back sending blocks by inv, it's probably for a re-org. The
final block hash provided should be the highest, so send a getheaders
and then fetch the blocks we need to catch up.
Github-Pull: #18962
Rebased-From: 746736639e6d05acdb85c866d4c605c947d4c500
|
|
Fix the following error in travis:
test/validationinterface_tests.cpp:26:36: error: default initialization of an object of const type 'const BlockValidationState' without a user-provided default constructor
const BlockValidationState state_dummy;
Github-Pull: #18975
Rebased-From: 050e2ee6f28e7b31c167013be7313726e34084e9
|
|
This is achieved by switching to a shared_ptr.
Also, switch the validationinterfaces in the tests to use shared_ptrs
for the same reason.
Github-Pull: #18742
Rebased-From: 7777f2a4bb1f9d843bc50a4e35085cfbb2808780
|