Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Regular rebasing of the cmake-staging branch #280

Closed
wants to merge 84 commits into from

Commits on Jul 16, 2024

  1. guard TxRequest and rejection caches with new mutex

    We need to synchronize between various tx download structures.
    TxRequest does not inherently need cs_main for synchronization, and it's
    not appropriate to lock all of the tx download logic under cs_main.
    glozow committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    3eb1307 View commit details
    Browse the repository at this point in the history
  2. add ValidationInterface::ActiveTipChange

    This is a synchronous callback notifying clients of all tip changes.
    
    It allows clients to respond to a new block immediately after it is
    connected. The synchronicity is important for things like
    m_recent_rejects, in which a transaction's validity can change (rejected
    vs accepted) when this event is processed. For example, the transaction
    might have a timelock condition that has just been met. This is distinct
    from something like m_recent_confirmed_transactions, in which the
    validation outcome is the same (valid vs already-have), so it does not
    need to be reset immediately.
    glozow committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    36f170d View commit details
    Browse the repository at this point in the history
  3. update recent_rejects filters on ActiveTipChange

    Resetting m_recent_rejects once per block is more efficient than
    comparing hashRecentRejectsChainTip with the chain tip every time we
    call AlreadyHaveTx. We keep hashRecentRejectsChainTip for now to assert
    that updates happen correctly; it is removed in the next commit.
    glozow committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    18a4355 View commit details
    Browse the repository at this point in the history
  4. remove obsoleted hashRecentRejectsChainTip

    This also means AlreadyHaveTx no longer needs cs_main held.
    glozow committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    723ea0f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    61745c7 View commit details
    Browse the repository at this point in the history
  6. remove obsoleted TxOrphanage::m_mutex

    The TxOrphanage is now guarded externally by m_tx_download_mutex.
    glozow committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    6ff8406 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c85acce View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Configuration menu
    Copy the full SHA
    6c9746f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1810e20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    51d8f43 View commit details
    Browse the repository at this point in the history
  4. contrib: assume binary existence in sec/sym checks

    If the binaries don't exist, the Guix build has failed for some other
    reason.
    
    There's no need to check for unknown architectures, or executable
    formats, as the only ones that could be built are those that we've
    configured toolchains for in Guix.
    
    We've also been doing this inconsistently across the two scripts.
    fanquake committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    1bc9f64 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Merge bitcoin#30111: locks: introduce mutex for tx download, flush re…

    …jection filters once per tip change
    
    c85acce [refactor] delete EraseTxNoLock, just use EraseTx (glozow)
    6ff8406 remove obsoleted TxOrphanage::m_mutex (glozow)
    61745c7 lock m_recent_confirmed_transactions using m_tx_download_mutex (glozow)
    723ea0f remove obsoleted hashRecentRejectsChainTip (glozow)
    18a4355 update recent_rejects filters on ActiveTipChange (glozow)
    36f170d add ValidationInterface::ActiveTipChange (glozow)
    3eb1307 guard TxRequest and rejection caches with new mutex (glozow)
    
    Pull request description:
    
      See bitcoin#27463 for full project tracking.
    
      This contains the first few commits of bitcoin#30110, which require some thinking about thread safety in review.
      - Introduce a new `m_tx_download_mutex` which guards the transaction download data structures including `m_txrequest`, the rolling bloom filters, and `m_orphanage`. Later this should become the mutex guarding `TxDownloadManager`.
        - `m_txrequest` doesn't need to be guarded using `cs_main` anymore
        - `m_recent_confirmed_transactions` doesn't need its own lock anymore
        - `m_orphanage` doesn't need its own lock anymore
      - Adds a new `ValidationInterface` event, `ActiveTipChanged`, which is a synchronous callback whenever the tip of the active chainstate changes.
      - Flush `m_recent_rejects` and `m_recent_rejects_reconsiderable` on `ActiveTipChanged` just once instead of checking the tip every time `AlreadyHaveTx` is called. This should speed up calls to that function (no longer comparing a block hash each time) and removes the need to lock `cs_main` every time it is called.
    
      Motivation:
      - These data structures need synchronization. While we are holding `m_tx_download_mutex`, these should hold:
        - a tx hash in `m_txrequest` is not also in `m_orphanage`
        - a tx hash in `m_txrequest` is not also in `m_recent_rejects` or `m_recent_confirmed_transactions`
        - In the future, orphan resolution tracking should also be synchronized. If a tx has an entry in the orphan resolution tracker, it is also in `m_orphanage`, and not in `m_txrequest`, etc.
      - Currently, `cs_main` is used to e.g. sync accesses to `m_txrequest`. We should not broaden the scope of things it locks.
      - Currently, we need to know the current chainstate every time we call `AlreadyHaveTx` so we can decide whether we should update it. Every call compares the current tip hash with `hashRecentRejectsChainTip`. It is more efficient to have a validation interface callback that updates the rejection filters whenever the chain tip changes.
    
    ACKs for top commit:
      instagibbs:
        reACK c85acce
      dergoegge:
        Code review ACK c85acce
      theStack:
        Light code-review ACK c85acce
      hebasto:
        ACK c85acce, I have reviewed the code and it looks OK.
    
    Tree-SHA512: c3bd524b5de1cafc9a10770dadb484cc479d6d4c687d80dd0f176d339fd95f73b85cb44cb3b6b464d38a52e20feda00aa2a1da5a73339e31831687e4bd0aa0c5
    fanquake committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    9607277 View commit details
    Browse the repository at this point in the history
  2. Merge bitcoin#30423: contrib: simplify test-security-check

    1bc9f64 contrib: assume binary existence in sec/sym checks (fanquake)
    51d8f43 contrib: simplify ELF test-security-check (fanquake)
    1810e20 contrib: simplify PE test-security-check (fanquake)
    6c9746f contrib: simplify MACHO test-security-check (fanquake)
    
    Pull request description:
    
      The current `test-security-check` script is hard to understand, and change (i.e https://github.com/bitcoin/bitcoin/pull/29987/files#diff-52aa0cda44721f089e53b128cb1232a876006ef257b211655456b17dfb2ec712); tests are also not done in isolation (when-possible). Fix that, and add missing checks. Simplifies future toolchain/security/hardening changes.
    
    ACKs for top commit:
      hebasto:
        ACK 1bc9f64 (assuming my Guix hashes match; I'll provide them shortly).
      TheCharlatan:
        ACK 1bc9f64
    
    Tree-SHA512: 1885d0ce63a94ffa61345327f919da20b63de6dd4148d6db3ee8bad4485253a36e8ab0dbee48cecc02ea35d139edfed75453af45fc364bcbef6fe16b6823bc7a
    fanquake committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    fa0b5d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2dc6136 View commit details
    Browse the repository at this point in the history
  4. cmake: Introduce interface libraries to encapsulate common flags

    Also add a sanity check for non-encapsulated (directory-wide) build
    properties.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    00c56c4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5a53683 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c053404 View commit details
    Browse the repository at this point in the history
  7. cmake: Add introspection module

    Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
    Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
    3 people committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    a26a3b7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    26a3e25 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2e33979 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6b9a03c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c405d64 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    120affb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c5a750b View commit details
    Browse the repository at this point in the history
  14. cmake: Add ccache support

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    c8abf25 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3fffba9 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    741d537 View commit details
    Browse the repository at this point in the history
  17. cmake: Build leveldb static library

    Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
    hebasto and theuni committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    641a13a View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    8c16b96 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    9999a39 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7899465 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    8b75736 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0e66edb View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    bff4cf2 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    fe8f4a6 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bbca0ea View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    9797b4f View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    1f51c88 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    3106231 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    7411fef View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    0df4049 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    2c09317 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    360023b View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    013e586 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    faf2b8c View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    2bd197f View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    f36e637 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    84c6e27 View commit details
    Browse the repository at this point in the history
  38. cmake: Add SANITIZERS option

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    d99ea5a View commit details
    Browse the repository at this point in the history
  39. cmake: Add fuzzing options

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    5d11165 View commit details
    Browse the repository at this point in the history
  40. cmake: Add Python-based tests

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    7253192 View commit details
    Browse the repository at this point in the history
  41. cmake: Add HARDENING option

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    173d60c View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    df76567 View commit details
    Browse the repository at this point in the history
  43. cmake: Add WERROR option

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    e17298d View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    4fc14b8 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    7e4662f View commit details
    Browse the repository at this point in the history
  46. cmake: Add WITH_DBUS option

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    b6e6b6a View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    597076f View commit details
    Browse the repository at this point in the history
  48. cmake: Build bitcoinkernel library

    Co-authored-by: TheCharlatan <seb.kung@gmail.com>
    hebasto and TheCharlatan committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    271d0a7 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    d2a8ed1 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    e5c5069 View commit details
    Browse the repository at this point in the history
  51. depends: Amend handling flags environment variables

    If any of {C,CXX,CPP,LD}FLAGS is specified it should be assigned to
    a non-type-specific variable.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    74eae0b View commit details
    Browse the repository at this point in the history
  52. Revert "build, qt: Do not install *.prl files"

    This reverts commit 1155978.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    ae8edbf View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    4e63d89 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    d534e52 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    c26d0f7 View commit details
    Browse the repository at this point in the history
  56. qt, build: Drop QT_STATICPLUGIN macro

    Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's
    `QT_STATIC` macro. No need to handle both of them.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    d2ec00b View commit details
    Browse the repository at this point in the history
  57. qt: Drop Q_IMPORT_PLUGIN macros

    When using CMake, each plugin comes with a C++ stub file that
    automatically initializes the static plugin. Consequently, any target
    that links against a plugin has this C++ file added to its SOURCES,
    which makes the removed code redundant.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    cb7000c View commit details
    Browse the repository at this point in the history
  58. cmake: Add cross-compiling support

    To configure CMake for cross-compiling, use
    `--toolchain depends/${HOST}/toolchain.cmake` command-line option.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    28353c0 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    32d04c2 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    8e1db0d View commit details
    Browse the repository at this point in the history
  61. cmake: Add APPEND_{CPP,C,CXX,LD}FLAGS cache variables

    The content of those variables is appended to the each target after the
    flags added by the build system.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    c37e542 View commit details
    Browse the repository at this point in the history
  62. cmake: Add Maintenance module

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    7eda797 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    66527db View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    29ab654 View commit details
    Browse the repository at this point in the history
  65. cmake: Add docs build target

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    1356ae4 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    fa0705d View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    199349f View commit details
    Browse the repository at this point in the history
  68. cmake: Add useful presets

    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    a8957df View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    123cfee View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    69cc524 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    dcd411e View commit details
    Browse the repository at this point in the history
  72. ci: Test CMake edge cases

    Keep this commit at the top when rebasing.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    0e465e1 View commit details
    Browse the repository at this point in the history
  73. cmake, ci: Skip miniupnpc package in depends

    This change fixes CI jobs as the `miniupnpc` source archive is not
    available neither at https://miniupnp.tuxfamily.org nor at
    https://bitcoincore.org/depends-sources at this moment.
    hebasto committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    dc490da View commit details
    Browse the repository at this point in the history