[backport#17292] Add new mempool benchmarks for a complex pool
Summary:
Add new mempool benchmarks for a complex pool (Jeremy Rubin)
Pull request description:
This PR is related to #17268. It adds a mempool stress test which makes a really big complicated tx graph, and then, similar to mempool_eviction test, trims the size. The test setup is to make 100 original transactions with Rand(10)+2 outputs each. Then, 800 times: we create a new transaction with Rand(10) + 1 parents that are randomly sampled from all existing transactions (with unspent outputs). From each such parent, we then select Rand(remaining outputs) +1 50% of the time, or 1 outputs 50% of the time. Then, we trim the size to 3/4. Then we trim it to just a single transaction. This creates, hopefully, a big bundle of transactions with lots of complex structure, that should really put a strain on the mempool graph algorithms. This ends up testing both the descendant and ancestor tracking. I don't love that the test is "unstable". That is, in order to compare this test to another, you really can't modify any of the internal state because it will have a different order of invocations of the deterministic randomness. However, it certainly suffices for comparing branches.
Top commit has no ACKs.
Backport of Core PR17292 and PR17349 (to unbreak PR17292)
Rationale: On PR17292, struct 'Available' does not follow the rule-of-three with raises a compiler warning that our CI treats with -Werror (it has a user-defined copy-assignment operator without respective copy-constructor and destructor), so I removed it since no deep-copy behavior was required. Noticing that PR17349 did that plus removed a spurious copy-constructor from src/psbt.h, I decided that was reason enough to squash the two PR's together instead of submitting a modified version of each.
Test Plan:
ninja check check-functional bitcoin-bench -filter=ComplexMemPool
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D7414