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

mutil: introduce simple BlockBeat to fix itest flakes #8717

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Commits on Jun 3, 2024

  1. chainntnfs+lnd: replace BlockHeader with Block

    So the block data can be used by subsystems without calling `GetBlock`.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    a517cfb View commit details
    Browse the repository at this point in the history
  2. sweep: add new state TxError for erroneous sweepings

    Also updated the loggings. This new state will be used in the following
    commit.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    5eb0e6d View commit details
    Browse the repository at this point in the history
  3. sweep: add handleInitialBroadcast to handle initial broadcast

    This commit adds a new method `handleInitialBroadcast` to handle the
    initial broadcast. Previously we'd broadcast immediately inside
    `Broadcast`, which soon will not work giving the blockbeat being used in
    the following commit.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    8ba5810 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    df0190e View commit details
    Browse the repository at this point in the history
  5. sweep: add method handleBumpEventError and fix markInputFailed

    Previously in `markInputFailed`, we'd remove all inputs under the same
    group via `removeExclusiveGroup`. This is wrong as when the current
    sweep fails for this input, it shouldn't affect other inputs.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    f601893 View commit details
    Browse the repository at this point in the history
  6. sweep: add method isMature on SweeperInput

    Also updated `handlePendingSweepsReq` to skip immature inputs so the
    returned results are the same as those in pre-0.18.0.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    a7addc3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    01a576a View commit details
    Browse the repository at this point in the history
  8. chainio: add blockbeat to handle block synchronization among subsys…

    …tems
    
    In this commit, a minimal version of `BlockBeat` is added to synchronize
    block heights, which will be used in `ChainArb`, `Sweeper`, and
    `TxPublisher` so blocks are processed sequentially among them.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    845867d View commit details
    Browse the repository at this point in the history
  9. sweep+contractcourt: update UtxoSweeper, TxPublisher and `ChainAr…

    …b` to use blockbeat
    
    In this commit, we replace the individual block subscription with the
    implementation of the interface method `ProcessBlock` so they share a
    single block notifier.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    7090c9e View commit details
    Browse the repository at this point in the history
  10. contractcourt: use blockbeat in ChannelArbitrator

    This commit refactors the block dispatching logic in `ChainArbitrator`
    so the blocks are sent concurrently to all active channel arbitrators.
    It also makes sure the blockbeat is now sent to channel arbitrators.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    faac005 View commit details
    Browse the repository at this point in the history
  11. contractcourt: init activeResolvers with a block chan

    This commit changes the `activeResolvers` map so each active resolver
    now has a block chan to receive new blocks.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    6ee2cd7 View commit details
    Browse the repository at this point in the history
  12. contractcourt: remove block subscription used in resolvers

    After this commit, when a new block comes, it will be passed through
    chainArb -> ChannelArbitrator -> resolvers.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    d96d4c5 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    06a9c13 View commit details
    Browse the repository at this point in the history
  14. contractcourt: remove the immediate param used in Resolve

    This `immediate` flag was added as a hack so during a restart, the
    pending resolvers would offer the inputs to the sweeper and ask it to
    sweep them immediately. This is no longer need due to `blockbeat`, as
    now during restart, a block is always sent to all subsystems via the
    flow `ChainArb` -> `ChannelArb` -> resolvers -> sweeper. Thus, when
    there are pending inputs offered, they will be processed by the sweeper
    immediately.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    dd2b110 View commit details
    Browse the repository at this point in the history
  15. contractcourt: remove waitForHeight in resolvers

    The sweeper can handle the waiting so there's no need to wait for blocks
    inside the resolvers. By offering the inputs prior to their mature
    heights also guarantees the inputs with the same deadline are
    aggregated.
    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    ce7cba6 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bc18614 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    1378022 View commit details
    Browse the repository at this point in the history
  18. x

    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    3b5f718 View commit details
    Browse the repository at this point in the history
  19. x

    yyforyongyu committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    6ec05ab View commit details
    Browse the repository at this point in the history