bench: remove from available_coins with reference, vout size #24975

pull Crypt-iQ wants to merge 1 commits into bitcoin:master from Crypt-iQ:pool_bench changing 1 files +2 −2
  1. Crypt-iQ commented at 1:08 pm on April 25, 2022: contributor
    In the current mempool benchmarks, the coins were not being deleted from available_coins since Available rather than Available& was used. Also the lack of the reference meant that coin.vin_left++ only incremented the copy’s variable rather than the one in the vector. The removal condition previously compared the coin’s vin.size() to vin_left, when it should have been using vout.size(). I changed the MempoolCheck bench to instead use min_ancestors of 1 rather than 5 as otherwise an underflow could occur when calling coin.ref->vout.size() - coin.vin_left. This previously did not occur since vin_left was always 0 since a copy of the coin was used. Using 1 vs 5 shouldn’t give too much of a difference since the test can still generate more than 1 (or 5) ancestors.
  2. maflcko commented at 1:13 pm on April 25, 2022: member
    See also #23693
  3. DrahtBot added the label Tests on Apr 25, 2022
  4. Crypt-iQ commented at 2:02 pm on April 25, 2022: contributor
    With this change but without the min_ancestors = 1 change, the underflow would make my computer swap heavily and run out of disk space since n_to_take would be ~max unsigned long
  5. DrahtBot commented at 5:44 pm on April 25, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  6. Crypt-iQ commented at 12:20 pm on April 26, 2022: contributor
    It seems like #24927 changes the mempoolcheck benchmark by using a PopulateMempool func, so this PR could actually just be a revert #23693 unless changing the ComplexMempool bench should instead be using something like PopulateMempool with “real” coins?
  7. DrahtBot added the label Needs rebase on Jun 2, 2022
  8. Crypt-iQ force-pushed on Jun 24, 2022
  9. bench: remove from available_coins with reference, vout size 5fb9ba3971
  10. Crypt-iQ force-pushed on Jun 24, 2022
  11. DrahtBot removed the label Needs rebase on Jun 24, 2022
  12. Crypt-iQ commented at 2:31 pm on June 24, 2022: contributor
    Rebased since MempoolCheck no longer relies on the coin creation
  13. achow101 commented at 7:17 pm on October 12, 2022: member
    cc @glozow
  14. Crypt-iQ commented at 4:22 pm on October 18, 2022: contributor
    unfortunately don’t have time to work on this, lmk if i should close it
  15. glozow commented at 8:48 am on October 22, 2022: member

    Agree these are correct bug fixes. It’s unclear to me why #22856, but not this, has the underflow problem?

    unless changing the ComplexMempool bench should instead be using something like PopulateMempool with “real” coins?

    This function and PopulateMempool are quite similar. If PopulateMempool creates equally complex graphs of transactions, yeah, it probably makes sense to switch it over.

  16. achow101 commented at 5:50 pm on October 28, 2022: member

    unfortunately don’t have time to work on this, lmk if i should close it

    Closing as Up For Grabs.

  17. achow101 closed this on Oct 28, 2022

  18. achow101 added the label Up for grabs on Oct 28, 2022
  19. bitcoin locked this on Oct 28, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me