diff options
author | fanquake <fanquake@gmail.com> | 2023-05-31 11:12:06 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-05-31 11:24:57 +0100 |
commit | 2a786ea3493c9c2c628137806271f77e62fbee05 (patch) | |
tree | ebca5e8f5964e465b81a064e5b13a8d5b275d7fa /src/hash.h | |
parent | 1b8b28d83b2b59356fbe718c552156f60a951cf2 (diff) | |
parent | fafb4da121b19ba1b7bd173e25651c64d1982fb4 (diff) |
Merge bitcoin/bitcoin#27780: fuzz: Avoid timeout in utxo_total_supply
fafb4da121b19ba1b7bd173e25651c64d1982fb4 fuzz: Avoid timeout in utxo_total_supply (MarcoFalke)
Pull request description:
Looks like for high block counts it may be better to mock the chain, otherwise a high limit will lead to fuzz input bloat and timeouts, see https://github.com/bitcoin/bitcoin/pull/17860#issuecomment-1538252773.
It can be checked that the fuzz target can still find the CVE, see https://github.com/bitcoin/bitcoin/pull/17860#pullrequestreview-1410594057 with a diff of:
```diff
diff --git a/src/consensus/tx_check.cpp b/src/consensus/tx_check.cpp
index f949655909..6f4cfb5f51 100644
--- a/src/consensus/tx_check.cpp
+++ b/src/consensus/tx_check.cpp
@@ -39,8 +39,6 @@ bool CheckTransaction(const CTransaction& tx, TxValidationState& state)
// the underlying coins database.
std::set<COutPoint> vInOutPoints;
for (const auto& txin : tx.vin) {
- if (!vInOutPoints.insert(txin.prevout).second)
- return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-txns-inputs-duplicate");
}
if (tx.IsCoinBase())
```
Also, fix a nit, see https://github.com/bitcoin/bitcoin/pull/17860#discussion_r1186451948
ACKs for top commit:
dergoegge:
ACK fafb4da121b19ba1b7bd173e25651c64d1982fb4
Tree-SHA512: a28fe9cd6ebb4c9bed5a5b35be76c1c436a87586c8fc3b3c4c8559a4a77ac08098324370da421d794c99579882c0872b6b29415de47ade6a05a08504a3d494c4
Diffstat (limited to 'src/hash.h')
0 files changed, 0 insertions, 0 deletions