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

Beat [3/4]: Implement Consumer on chainWatcher and resolvers #8922

Draft
wants to merge 29 commits into
base: yy-blockbeat
Choose a base branch
from

Commits on Oct 15, 2024

  1. Configuration menu
    Copy the full SHA
    9f0b94d View commit details
    Browse the repository at this point in the history
  2. contractcourt: add methods to decide spend path in htlcSuccessResolver

    This commit adds a few helper methods to decide how the htlc output
    should be spent.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    354be8c View commit details
    Browse the repository at this point in the history
  3. contractcourt: add methods to send sweep requests in `htlcSuccessReso…

    …lver`
    
    This commit is a pure refactor in which moves the sweep handling logic
    into the new methods.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    7ba62d5 View commit details
    Browse the repository at this point in the history
  4. contractcourt: add resolver handlers in htlcSuccessResolver

    This commit refactors the `Resolve` method by adding two resolver
    handlers to handle waiting for spending confirmations.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    40b65ee View commit details
    Browse the repository at this point in the history
  5. contractcourt: add Launch method to anchor/breach resolver

    We will use this and its following commits to break the original
    `Resolve` methods into two parts - the first part is moved to a new
    method `Launch`, which handles sending a sweep request to the sweeper.
    The second part remains in `Resolve`, which is mainly waiting for a
    spending tx.
    
    Breach resolver currently doesn't do anything in its `Launch` since the
    sweeping of justice outputs are not handled by the sweeper yet.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    37991e6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2fd53b9 View commit details
    Browse the repository at this point in the history
  7. contractcourt: add Launch method to htlc success resolver

    This commit breaks the `Resolve` into two parts - the first part is
    moved into a `Launch` method that handles sending sweep requests, and
    the second part remains in `Resolve` which handles waiting for the
    spend.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    5e3ce4c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f013b2a View commit details
    Browse the repository at this point in the history
  9. contractcourt: add methods to handle sweep in htlcTimeoutResolver

    This commit adds new methods to handle making sweep requests based on
    the spending path used by the outgoing htlc output.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    963986b View commit details
    Browse the repository at this point in the history
  10. contractcourt: add methods to checkpoint states

    This commit adds checkpoint methods in `htlcTimeoutResolver`, which are
    similar to those used in `htlcSuccessResolver`.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    c9f642a View commit details
    Browse the repository at this point in the history
  11. contractcourt: add methods to resolve different paths

    This commit adds more methods to handle resolving the spending of the
    output based on different spending paths.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    38233c0 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5d9899e View commit details
    Browse the repository at this point in the history
  13. contractcourt: add Launch method to incoming contest resolver

    A minor refactor is done to support implementing `Launch`.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    b3b86f8 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    492fceb View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    622fc87 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    742b050 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c30ab9d View commit details
    Browse the repository at this point in the history
  18. chainio: enable spending txns lookup in Blockbeat

    This commit adds two interface methods, `HasOutpointSpent` and
    `HasOutpointSpentByScript` so the caller can use the current `blockbeat`
    to decide whether a given outpoint or a pkscript has been spent or not.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    7f0f144 View commit details
    Browse the repository at this point in the history
  19. chainio+contractcourt: handle blockbeat in chainWatcher

    This commit adds a new method on `Blockbeat` to query the spending tx
    for a given outpoint and pkScript, thus treating `Blockbeat` as the
    single source of truth.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    79f4cd3 View commit details
    Browse the repository at this point in the history
  20. contractcourt: use ShortChanID instead of ChannelPoint in log

    This way the log lines are shorten.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    cf7e81b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f9b77fd View commit details
    Browse the repository at this point in the history
  22. contractcourt: fix concurrent access to resolved

    This commit makes `resolved` an atomic bool to avoid data race. This
    field is now defined in `contractResolverKit` to avoid code duplication.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    868265c View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    ef95c61 View commit details
    Browse the repository at this point in the history
  24. multi: add new method ChainArbitrator.RedispatchBlockbeat

    This commit adds a new method to enable us resending the blockbeat in
    `ChainArbitrator`, which is needed for the channel restore as the chain
    watcher and channel arbitrator are added after the start of the chain
    arbitrator.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    7283893 View commit details
    Browse the repository at this point in the history
  25. contractcourt: make sure output from legacy success tx is swept

    This commit fixes an existing issue where the output from a pre-anchor
    type HTLC success tx is not swept.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    3561f90 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    2cd82ff View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    61aa221 View commit details
    Browse the repository at this point in the history
  28. itest: fix multi hop tests

    This commit fixes the multi hop tests to reflect the latest sweeper
    changes.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    491796f View commit details
    Browse the repository at this point in the history
  29. itest: fix tests regarding the new sweeper behavior

    This commit fix watchtower, channel backup, and route blinding tests re
    the new sweeper behavior.
    yyforyongyu committed Oct 15, 2024
    Configuration menu
    Copy the full SHA
    e568154 View commit details
    Browse the repository at this point in the history