refactor: Make CCheckQueue RAII-styled #18731

pull hebasto wants to merge 7 commits into bitcoin:master from hebasto:200421-queue-raii changing 9 files +95 −150
  1. hebasto commented at 12:33 AM on April 22, 2020: member

    This PR:

    • makes CCheckQueue RAII-styled
    • gets rid of two global variables:
      • scriptcheckqueue
      • g_parallel_script_checks

    This PR is based on #18710, therefore only the last two commits should be considered.

  2. fanquake added the label Refactoring on Apr 22, 2020
  3. hebasto cross-referenced this on Apr 22, 2020 from issue Add local thread pool to CCheckQueue by hebasto
  4. DrahtBot commented at 10:12 AM on April 22, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20487 (draft: Add syscall sandboxing using seccomp-bpf (Linux secure computing mode) by practicalswift)
    • #20323 (tests: Create or use existing properly initialized NodeContexts by dongcarl)
    • #20228 (addrman: Make addrman a top-level component by jnewbery)
    • #19935 (Move SaltedHashers to separate file and add some new ones by achow101)
    • #19602 (wallet: Migrate legacy wallets to descriptor wallets by achow101)
    • #19438 (Introduce deploymentstatus by ajtowns)
    • #19183 ([WIP DONOTMERGE] Replace boost with C++17 by MarcoFalke)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. DrahtBot cross-referenced this on Apr 22, 2020 from issue Make g_chainman internal to validation by maflcko
  6. DrahtBot cross-referenced this on Apr 22, 2020 from issue Prevent consecutive ::cs_main locks by hebasto
  7. DrahtBot cross-referenced this on Apr 22, 2020 from issue coins: allow cache resize after init by jamesob
  8. DrahtBot cross-referenced this on Apr 22, 2020 from issue bench: Remove requirement that all benches use same testing setup by maflcko
  9. DrahtBot added the label Needs rebase on Apr 22, 2020
  10. hebasto marked this as a draft on Apr 25, 2020
  11. hebasto renamed this:
    refactor: Make CCheckQueue RAII-styled
    [WIP] refactor: Make CCheckQueue RAII-styled
    on Apr 25, 2020
  12. promag commented at 10:52 PM on April 26, 2020: member

    Concept ACK RAII style.

    Need to fix test/fuzz/checkqueue.cpp in lines 41 and 42.

  13. hebasto force-pushed on Apr 28, 2020
  14. hebasto renamed this:
    [WIP] refactor: Make CCheckQueue RAII-styled
    refactor: Make CCheckQueue RAII-styled
    on Apr 28, 2020
  15. hebasto marked this as ready for review on Apr 28, 2020
  16. hebasto commented at 7:31 PM on April 28, 2020: member

    Rebased ba61343f43f8d91c160d698b3db11fc9d34e81eb -> 3553bde5b160ee243bce725d0b0165887a272136 (pr18731.01 -> pr18731.02) ~and ready for review.~

  17. DrahtBot cross-referenced this on Apr 28, 2020 from issue Remove unused boost/thread by maflcko
  18. DrahtBot removed the label Needs rebase on Apr 28, 2020
  19. hebasto marked this as a draft on Apr 28, 2020
  20. hebasto renamed this:
    refactor: Make CCheckQueue RAII-styled
    [WIP] refactor: Make CCheckQueue RAII-styled
    on Apr 28, 2020
  21. hebasto force-pushed on Apr 28, 2020
  22. hebasto force-pushed on May 1, 2020
  23. hebasto commented at 3:43 AM on May 1, 2020: member

    Updated 3553bde5b160ee243bce725d0b0165887a272136 -> 01be64d1305e5b30867e3955d7cdcd036e7f8381 (pr18731.02 -> pr18731.04, diff):

    • copy constructor and copy assignment are disabled

    And this PR is ready for review, finally.

  24. hebasto marked this as ready for review on May 1, 2020
  25. hebasto renamed this:
    [WIP] refactor: Make CCheckQueue RAII-styled
    refactor: Make CCheckQueue RAII-styled
    on May 1, 2020
  26. DrahtBot cross-referenced this on May 2, 2020 from issue The Zero Allocations project by jb55
  27. DrahtBot cross-referenced this on May 6, 2020 from issue More thread safety annotation coverage by ajtowns
  28. DrahtBot cross-referenced this on May 7, 2020 from issue assumeutxo by jamesob
  29. DrahtBot cross-referenced this on May 14, 2020 from issue wallet: Refactor the classes in wallet/db.{cpp/h} by achow101
  30. DrahtBot added the label Needs rebase on May 23, 2020
  31. hebasto force-pushed on May 26, 2020
  32. hebasto commented at 5:51 PM on May 26, 2020: member

    Rebased 01be64d1305e5b30867e3955d7cdcd036e7f8381 -> 3fa858781b0cf753a2c7901a386d3fc8f5f11e3a (pr18731.04 -> pr18731.05) due to the conflict with #18698.

  33. DrahtBot removed the label Needs rebase on May 26, 2020
  34. DrahtBot cross-referenced this on May 27, 2020 from issue wallet: Add sqlite as an alternative wallet database and use it for new descriptor wallets by achow101
  35. DrahtBot cross-referenced this on May 27, 2020 from issue wallet: Remove boost from PeriodicFlush by maflcko
  36. DrahtBot added the label Needs rebase on May 28, 2020
  37. hebasto force-pushed on May 28, 2020
  38. hebasto commented at 8:19 AM on May 28, 2020: member

    Rebased 3fa858781b0cf753a2c7901a386d3fc8f5f11e3a -> aad6c472415264a7ee93aeab1a461181ee96ad0c (pr18731.05 -> pr18731.06) due to the conflict with #16127.

  39. DrahtBot removed the label Needs rebase on May 28, 2020
  40. DrahtBot cross-referenced this on May 28, 2020 from issue Refactor: clean up PeriodicFlush() by jnewbery
  41. DrahtBot cross-referenced this on May 29, 2020 from issue wallet: Introduce and use DummyDatabase instead of dummy BerkeleyDatabase by achow101
  42. DrahtBot cross-referenced this on Jun 2, 2020 from issue wallettool: Add dump and createfromdump commands by achow101
  43. hebasto closed this on Jun 2, 2020

  44. hebasto reopened this on Jun 2, 2020

  45. DrahtBot added the label Needs rebase on Jun 2, 2020
  46. hebasto force-pushed on Jun 4, 2020
  47. hebasto commented at 9:32 AM on June 4, 2020: member

    Rebased aad6c472415264a7ee93aeab1a461181ee96ad0c -> ec0522406675dae9e88b13f5ee82a2311a547fdf (pr18731.06 -> pr18731.07) due to the conflict with #18792.

  48. DrahtBot removed the label Needs rebase on Jun 4, 2020
  49. DrahtBot cross-referenced this on Jun 4, 2020 from issue validation: Make VerifyDB level 4 interruptible by maflcko
  50. DrahtBot added the label Needs rebase on Jun 4, 2020
  51. hebasto force-pushed on Jun 4, 2020
  52. hebasto commented at 2:35 PM on June 4, 2020: member

    Rebased ec0522406675dae9e88b13f5ee82a2311a547fdf -> 894b3e3e2769ea3e51cc62bd52bcda04c81b853e (pr18731.07 -> pr18731.08) due to the conflict with #19142.

  53. DrahtBot removed the label Needs rebase on Jun 4, 2020
  54. DrahtBot added the label Needs rebase on Jun 5, 2020
  55. hebasto force-pushed on Jun 5, 2020
  56. hebasto commented at 5:10 AM on June 5, 2020: member

    Rebased 894b3e3e2769ea3e51cc62bd52bcda04c81b853e -> d0ac4468e6911acc9cc8e82736782ca80f42a18c (pr18731.08 -> pr18731.09) due to the conflict with #18758.

  57. DrahtBot removed the label Needs rebase on Jun 5, 2020
  58. DrahtBot cross-referenced this on Jun 6, 2020 from issue [WIP DONOTMERGE] Replace boost with C++17 (std::shared_mutex) by maflcko
  59. hebasto force-pushed on Jun 6, 2020
  60. hebasto commented at 6:40 AM on June 6, 2020: member

    Rebased d0ac4468e6911acc9cc8e82736782ca80f42a18c -> 6f224c64de16f1d8badc8284ce6cf96d83c40d45 (pr18731.09 -> pr18731.10) due to the conflict with #18710.

  61. DrahtBot cross-referenced this on Jun 13, 2020 from issue Replace current benchmarking framework with nanobench by martinus
  62. DrahtBot cross-referenced this on Jun 14, 2020 from issue validation: Warm coins cache during prevalidation to connect blocks faster by andrewtoth
  63. DrahtBot cross-referenced this on Jun 16, 2020 from issue Replace boost::filesystem with std::filesystem by kiminuo
  64. DrahtBot cross-referenced this on Jul 3, 2020 from issue Introduce deploymentstatus by ajtowns
  65. DrahtBot cross-referenced this on Jul 20, 2020 from issue Remove mempool global by maflcko
  66. DrahtBot cross-referenced this on Jul 26, 2020 from issue rpc: Avoid useless mempool query in gettxoutproof by maflcko
  67. DrahtBot added the label Needs rebase on Jul 28, 2020
  68. hebasto force-pushed on Jul 29, 2020
  69. hebasto commented at 8:32 AM on July 29, 2020: member

    Rebased 6f224c64de16f1d8badc8284ce6cf96d83c40d45 -> 45ba39aa6d61b3e6ccef0b265c27f56de209b5b6 (pr18731.10 -> pr18731.11) due to the conflicts with #18637 and #19589.

  70. DrahtBot removed the label Needs rebase on Jul 29, 2020
  71. DrahtBot cross-referenced this on Jul 29, 2020 from issue Pass mempool pointer to UnloadBlockIndex/GetCoinsCacheSizeState by maflcko
  72. DrahtBot cross-referenced this on Jul 30, 2020 from issue Disable fee estimation in blocksonly mode (by removing the fee estimates global) by darosior
  73. DrahtBot added the label Needs rebase on Jul 30, 2020
  74. hebasto force-pushed on Jul 31, 2020
  75. hebasto commented at 11:23 AM on July 31, 2020: member

    Rebased 45ba39aa6d61b3e6ccef0b265c27f56de209b5b6 -> f62b22af87390719e09163df093b6a9059ad151c (pr18731.11 -> pr18731.12) due to the conflicts with #18011 and #19604.

  76. DrahtBot cross-referenced this on Jul 31, 2020 from issue refactor: Keep mempool interface in validation by maflcko
  77. DrahtBot removed the label Needs rebase on Jul 31, 2020
  78. DrahtBot cross-referenced this on Aug 20, 2020 from issue bench: Prevent thread oversubscription and decreases the variance of result values by hebasto
  79. hebasto force-pushed on Aug 21, 2020
  80. hebasto commented at 6:29 AM on August 21, 2020: member

    Rebased f62b22af87390719e09163df093b6a9059ad151c -> 7a6ad64160c15cb9a77af1a0dcced476d0a08bda (pr18731.12 -> pr18731.13) on top of #19710 and #18710 to prevent merge conflicts.

  81. DrahtBot cross-referenced this on Aug 26, 2020 from issue validation: UTXO snapshot activation by jamesob
  82. DrahtBot cross-referenced this on Aug 28, 2020 from issue Pass mempool reference to chainstate constructor by maflcko
  83. DrahtBot added the label Needs rebase on Aug 31, 2020
  84. hebasto force-pushed on Aug 31, 2020
  85. hebasto commented at 8:57 AM on August 31, 2020: member

    Rebased 7a6ad64160c15cb9a77af1a0dcced476d0a08bda -> e5a82deda64a11f03c48a6fcaadb78ec3502745f (pr18731.13 -> pr18731.14) due to the conflicts with #19710 and #19826.

  86. DrahtBot removed the label Needs rebase on Aug 31, 2020
  87. DrahtBot cross-referenced this on Sep 19, 2020 from issue validation: Reduce direct g_chainman usage by dongcarl
  88. DrahtBot cross-referenced this on Sep 19, 2020 from issue refactor: Remove unused CTxMemPool::clear() helper by maflcko
  89. DrahtBot added the label Needs rebase on Sep 23, 2020
  90. refactor: Use member initializers in CCheckQueue 0ef938685b
  91. Add local thread pool to CCheckQueue 01511776ac
  92. test: Use CCheckQueue local thread pool dba30695fc
  93. bench: Use CCheckQueue local thread pool 6784ac471b
  94. refactor: Drop boost::thread stuff in CCheckQueue bb6fcc75d1
  95. refactor: Make CCheckQueue RAII-styled
    Also this commits gets rid of scriptcheckqueue global variable.
    8e78a419bf
  96. refactor: Drop g_parallel_script_checks global 56d40da18f
  97. hebasto force-pushed on Sep 24, 2020
  98. hebasto commented at 4:00 AM on September 24, 2020: member

    Rebased e5a82deda64a11f03c48a6fcaadb78ec3502745f -> 56d40da18fb60641c6dd683f77837cd32c0e24dd (pr18731.14 -> pr18731.15) due to the conflict with #19927.

  99. DrahtBot removed the label Needs rebase on Sep 24, 2020
  100. DrahtBot cross-referenced this on Sep 28, 2020 from issue validation: Remove useless call to mempool->clear() by maflcko
  101. DrahtBot cross-referenced this on Sep 29, 2020 from issue Move SaltedHashers to separate file and add some new ones by achow101
  102. DrahtBot cross-referenced this on Oct 1, 2020 from issue wallet: Migrate legacy wallets to descriptor wallets by achow101
  103. DrahtBot cross-referenced this on Oct 15, 2020 from issue tree-wide: De-globalize ChainstateManager by dongcarl
  104. DrahtBot cross-referenced this on Oct 23, 2020 from issue addrman: Make addrman a top-level component by jnewbery
  105. DrahtBot cross-referenced this on Oct 24, 2020 from issue addrman: Make consistency checks a runtime option by jnewbery
  106. DrahtBot cross-referenced this on Nov 25, 2020 from issue Add syscall sandboxing using seccomp-bpf (Linux secure computing mode) by practicalswift
  107. DrahtBot cross-referenced this on Dec 5, 2020 from issue tests: Create or use existing properly initialized NodeContexts by dongcarl
  108. DrahtBot added the label Needs rebase on Dec 9, 2020
  109. DrahtBot commented at 11:14 AM on December 9, 2020: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  110. hebasto marked this as a draft on Dec 19, 2020
  111. DrahtBot commented at 11:21 AM on December 15, 2021: contributor

    <!--13523179cfe9479db18ec6c5d236f789-->There hasn't been much activity lately and the patch still needs rebase. What is the status here?

    • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
    • Is it no longer relevant? ➡️ Please close.
    • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
  112. DrahtBot commented at 1:07 PM on March 21, 2022: contributor

    <!--13523179cfe9479db18ec6c5d236f789-->There hasn't been much activity lately and the patch still needs rebase. What is the status here?

    • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
    • Is it no longer relevant? ➡️ Please close.
    • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.
  113. jonatack commented at 1:18 PM on March 21, 2022: contributor

    #18710 was merged, so this could be rebased and brought out of draft if you are still working on this.

  114. hebasto commented at 2:31 PM on April 22, 2022: member

    I won't be able to focus on this stuff in the near future.

    So closing up for grabs.

  115. hebasto closed this on Apr 22, 2022

  116. hebasto added the label Up for grabs on Apr 22, 2022
  117. maflcko cross-referenced this on Jun 23, 2022 from issue ~CCheckQueue assertion failure during unclean exits by luke-jr
  118. hebasto cross-referenced this on Dec 28, 2022 from issue bugfix: Make `CCheckQueue` RAII-styled (attempt 2) by hebasto
  119. hebasto commented at 1:18 PM on December 28, 2022: member

    I won't be able to focus on this stuff in the near future.

    So closing up for grabs.

    #26762.

  120. hebasto removed the label Up for grabs on Dec 28, 2022
  121. hebasto deleted the branch on Dec 28, 2022
  122. achow101 referenced this in commit 498994b6f5 on Nov 30, 2023
  123. bitcoin locked this on Dec 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: 2026-05-20 06:54 UTC