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

Reapply 8644 on 9260 #9313

Open
wants to merge 155 commits into
base: yy-beat-itest-optimize
Choose a base branch
from

Commits on Nov 25, 2024

  1. sweep: add new state TxFatal for erroneous sweepings

    Also updated the loggings. This new state will be used in the following
    commit.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    d361ba6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2217843 View commit details
    Browse the repository at this point in the history
  3. sweep: add new interface method Immediate

    This prepares the following commit where we now let the fee bumpr
    decides whether to broadcast immediately or not.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    d51bde9 View commit details
    Browse the repository at this point in the history
  4. sweep: handle inputs locally instead of relying on the tx

    This commit changes how inputs are handled upon receiving a bump result.
    Previously the inputs are taken from the `BumpResult.Tx`, which is now
    instead being handled locally as we will remember the input set when
    sending the bump request, and handle this input set when a result is
    received.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    be1ec51 View commit details
    Browse the repository at this point in the history
  5. 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 after the `blockbeat` is
    implemented as the action to publish is now always triggered by a new
    block. Meanwhile, we still keep the option to bypass the block trigger
    so users can broadcast immediately by setting `Immediate` to true.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    075e31e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3671a38 View commit details
    Browse the repository at this point in the history
  7. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    da3a6ab View commit details
    Browse the repository at this point in the history
  8. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    37536c7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    de76205 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0216b9c View commit details
    Browse the repository at this point in the history
  11. sweep: break initialBroadcast into two steps

    With the combination of the following commit we can have a more granular
    control over the bump result when handling it in the sweeper.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    4abd9ba View commit details
    Browse the repository at this point in the history
  12. sweep: make sure nil tx is handled

    After previous commit, it should be clear that the tx may be failed to
    created in a `TxFailed` event. We now make sure to catch it to avoid
    panic.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    e783439 View commit details
    Browse the repository at this point in the history
  13. chainio: introduce chainio to handle block synchronization

    This commit inits the package `chainio` and defines the interface
    `Blockbeat` and `Consumer`. The `Consumer` must be implemented by other
    subsystems if it requires block epoch subscription.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    46e0a43 View commit details
    Browse the repository at this point in the history
  14. chainio: implement Blockbeat

    In this commit, a minimal implementation 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    c77c230 View commit details
    Browse the repository at this point in the history
  15. chainio: add helper methods to dispatch beats

    This commit adds two methods to handle dispatching beats. These are
    exported methods so other systems can send beats to their managed
    subinstances.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    08520b0 View commit details
    Browse the repository at this point in the history
  16. chainio: add BlockbeatDispatcher to dispatch blockbeats

    This commit adds a blockbeat dispatcher which handles sending new blocks
    to all subscribed consumers.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    0fa9406 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    029aa31 View commit details
    Browse the repository at this point in the history
  18. multi: implement Consumer on subsystems

    This commit implements `Consumer` on `TxPublisher`, `UtxoSweeper`,
    `ChainArbitrator` and `ChannelArbitrator`.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    26e034a View commit details
    Browse the repository at this point in the history
  19. sweep: remove block subscription in UtxoSweeper and TxPublisher

    This commit removes the independent block subscriptions in `UtxoSweeper`
    and `TxPublisher`. These subsystems now listen to the `BlockbeatChan`
    for new blocks.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    a00120f View commit details
    Browse the repository at this point in the history
  20. sweep: remove redundant notifications during shutdown

    This commit removes the hack introduced in lightningnetwork#4851. Previously we had this
    issue because the chain notifier was stopped before the sweeper, which
    was changed a while back and we now always stop the chain notifier last.
    In addition, since we no longer subscribe to the block epoch chan
    directly, this issue can no longer happen.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    36ef0c3 View commit details
    Browse the repository at this point in the history
  21. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    bb78060 View commit details
    Browse the repository at this point in the history
  22. contractcourt: remove block subscription in chain arbitrator

    This commit removes the block subscriptions used in `ChainArbitrator`
    and replaced them with the blockbeat managed by `BlockbeatDispatcher`.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    58153f7 View commit details
    Browse the repository at this point in the history
  23. contractcourt: remove block subscription in channel arbitrator

    This commit removes the block subscriptions used in `ChannelArbitrator`,
    replaced them with the blockbeat managed by `BlockbeatDispatcher`.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    981e9c2 View commit details
    Browse the repository at this point in the history
  24. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    e3167ca View commit details
    Browse the repository at this point in the history
  25. contractcourt: start channel arbitrator with blockbeat

    To avoid calling GetBestBlock again.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    a24ca9e View commit details
    Browse the repository at this point in the history
  26. multi: start consumers with a starting blockbeat

    This is needed so the consumers have an initial state about the current
    block.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    952869c View commit details
    Browse the repository at this point in the history
  27. lnd: add new method startLowLevelServices

    In this commit we start to break up the starting process into smaller
    pieces, which is needed in the following commit to initialize blockbeat
    consumers.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    bb42ff5 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    1292c9b View commit details
    Browse the repository at this point in the history
  29. contractcourt: fix linter funlen

    Refactor the `Start` method to fix the linter error:
    ```
    contractcourt/chain_arbitrator.go:568: Function 'Start' is too long (242 > 200) (funlen)
    ```
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    ac409a0 View commit details
    Browse the repository at this point in the history
  30. multi: improve loggings

    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    4005e2a View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    5b3b60c View commit details
    Browse the repository at this point in the history
  32. contractcourt: add verbose logging in resolvers

    We now put the outpoint in the resolvers's logging so it's easier to
    debug. Also use the short channel ID whenever possible to shorten the
    log line length.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    660fa82 View commit details
    Browse the repository at this point in the history
  33. contractcourt: add spend path helpers in timeout/success resolver

    This commit adds a few helper methods to decide how the htlc output
    should be spent.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    cd1a184 View commit details
    Browse the repository at this point in the history
  34. contractcourt: add sweep senders in htlcSuccessResolver

    This commit is a pure refactor in which moves the sweep handling logic
    into the new methods.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    91cd342 View commit details
    Browse the repository at this point in the history
  35. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    a5c05ae View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    f1a9e6d View commit details
    Browse the repository at this point in the history
  37. contractcourt: add sweep senders 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    982470c View commit details
    Browse the repository at this point in the history
  38. contractcourt: add methods to checkpoint states

    This commit adds checkpoint methods in `htlcTimeoutResolver`, which are
    similar to those used in `htlcSuccessResolver`.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    dda8208 View commit details
    Browse the repository at this point in the history
  39. contractcourt: add resolve handlers in htlcTimeoutResolver

    This commit adds more methods to handle resolving the spending of the
    output based on different spending paths.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    fab3acf View commit details
    Browse the repository at this point in the history
  40. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    0d5908e View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    e75f396 View commit details
    Browse the repository at this point in the history
  42. 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. Since we are using both utxo nursery and sweeper at the same
    time, to make sure this change doesn't break the existing behavior, we
    implement the `Launch` as following,
    - zero-fee htlc - handled by the sweeper
    - direct output from the remote commit - handled by the sweeper
    - legacy htlc - handled by the utxo nursery
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    aa7fcd0 View commit details
    Browse the repository at this point in the history
  43. contractcourt: add Launch method to htlc timeout 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. Since we are using both utxo nursery and sweeper at the same
    time, to make sure this change doesn't break the existing behavior, we
    implement the `Launch` as following,
    - zero-fee htlc - handled by the sweeper
    - direct output from the remote commit - handled by the sweeper
    - legacy htlc - handled by the utxo nursery
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    9ade1ef View commit details
    Browse the repository at this point in the history
  44. invoices: exit early when the subscriber chan is nil

    When calling `NotifyExitHopHtlc` it is allowed to pass a chan to
    subscribe to the HTLC's resolution when it's settled. However, this
    method will also return immediately if there's already a resolution,
    which means it behaves like a notifier and a getter. If the caller
    decides to only use the getter to do a non-blocking lookup, it can pass
    a nil subscriber chan to bypass the notification.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    cea75bf View commit details
    Browse the repository at this point in the history
  45. contractcourt: add Launch method to incoming contest resolver

    A minor refactor is done to support implementing `Launch`.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    566eb80 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    f4e8e75 View commit details
    Browse the repository at this point in the history
  47. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    600732e View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    0d1e81b View commit details
    Browse the repository at this point in the history
  49. contractcourt: break launchResolvers into two steps

    In this commit, we break the old `launchResolvers` into two steps - step
    one is to launch the resolvers synchronously, and step two is to
    actually waiting for the resolvers to be resolved. This is critical as
    in the following commit we will require the resolvers to be launched at
    the same blockbeat when a force close event is sent by the chain watcher.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    aeafa63 View commit details
    Browse the repository at this point in the history
  50. contractcourt: offer outgoing htlc one block earlier before its expiry

    We need to offer the outgoing htlc one block earlier to make sure when
    the expiry height hits, the sweeper will not miss sweeping it in the
    same block. This also means the outgoing contest resolver now only does
    one thing - watch for preimage spend till height expiry-1, which can
    easily be moved into the timeout resolver instead in the future.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    29521a1 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    097079e View commit details
    Browse the repository at this point in the history
  52. contractcourt: register spend notification during init

    This commit moves the creation of the spending notification from `Start`
    to `newChainWatcher` so we subscribe the spending event before handling
    the block, which is needed to properly handle the blockbeat.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    8f6f9e2 View commit details
    Browse the repository at this point in the history
  53. contractcourt: add method handleCommitSpend

    To prepare for the blockbeat handler.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    6870b73 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    9631dbb View commit details
    Browse the repository at this point in the history
  55. contractcourt: notify blockbeat for chainWatcher

    We now start notifying the blockbeat from the ChainArbitrator to the
    chainWatcher.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    ca92160 View commit details
    Browse the repository at this point in the history
  56. contractcourt: provide a shortcut to ChannelPoint

    This way the log lines are shorten.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    530ac1b View commit details
    Browse the repository at this point in the history
  57. 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 Nov 25, 2024
    Configuration menu
    Copy the full SHA
    808e3a6 View commit details
    Browse the repository at this point in the history
  58. contractcourt: add close event handlers in ChannelArbitrator

    To prepare the next commit where we would handle the event upon
    receiving a blockbeat.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    651d4d4 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    b058383 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    3d48f0c View commit details
    Browse the repository at this point in the history
  61. chainntnfs: skip dispatched conf details

    We need to check `dispatched` before sending conf details, otherwise the
    channel `ntfn.Event.Confirmed` will be blocking, which is the leftover
    from lightningnetwork#9275.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    d785469 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    5c9c6d0 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    9757c4b View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    9bd342e View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    72e17a4 View commit details
    Browse the repository at this point in the history
  66. itest: fix testSweepHTLCs

    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    3023c35 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    79a8260 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    29bb9b8 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    d116a56 View commit details
    Browse the repository at this point in the history
  70. lntest+itest: start flattening the multi-hop tests

    Starting from this commit, we begin the process of flattening the
    multi-hop itests to make them easier to be maintained. The tests are
    refactored into their own test cases, with each test focusing on testing
    one channel type. This is necessary to save effort for future
    development.
    
    These tests are also updated to reflect the new `blockbeat` behavior.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    50d8d75 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    1607d4b View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    2d3b28b View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    493650e View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    6c50559 View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    aa0ca88 View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    bdca3af View commit details
    Browse the repository at this point in the history
  77. itest: flatten testHtlcTimeoutResolverExtractPreimageLocal

    This commit simplfies the test since we only test the preimage
    extraction logic in the htlc timeout resolver, there's no need to test
    it for all different channel types as the resolver is made to be
    oblivious about them.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    291919a View commit details
    Browse the repository at this point in the history
  78. itest: flatten testHtlcTimeoutResolverExtractPreimageRemote

    Also remove unused code.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    6db372c View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    820a4e5 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    5581c7a View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    35aa809 View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    fda9ef1 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    70c2f3f View commit details
    Browse the repository at this point in the history
  84. Configuration menu
    Copy the full SHA
    241da54 View commit details
    Browse the repository at this point in the history
  85. itest+lntest: fix channel force close test

    Also flatten the tests to make them easier to be maintained.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    b3a1489 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    6cf665d View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    897803b View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    fe7d5c1 View commit details
    Browse the repository at this point in the history
  89. lntest+itest: remove the usage of ht.AssertActiveHtlcs

    The method `AssertActiveHtlcs` is now removed due to it's easy to be
    misused. To assert a given htlc, use `AssertOutgoingHTLCActive` and
    `AssertIncomingHTLCActive` instead for ensuring the HTLC exists in the
    right direction. Although often the case `AssertNumActiveHtlcs` would be
    enough as it implicitly checks the forwarding behavior for an
    intermediate node by asserting there are always num_payment*2 HTLCs.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    b8da896 View commit details
    Browse the repository at this point in the history
  90. htlcswitch: handle nil circuit properly when settling

    We have two sources which can call `handlePacketSettle`, either through
    the link's `<-s.htlcPlex`, or the `<-s.resolutionMsgs`, which means the
    `closeCircuit` could be call twice. Previously we already caught this
    case inside `closeCircuit`, in that we would return a nil circuit upon
    seeing `ErrUnknownCircuit`, indicating the circuit was removed. However,
    we still need to account the case when the circuit is being closed,
    which is now fixed as we will ignore when seeing `ErrCircuitClosing`.
    yyforyongyu committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    84c8aa6 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2024

  1. routing: fix nil pointer dereference in exitWithErr

    In a rare case when the critical log is triggered when using postgres as
    db backend, the `payment` could be nil cause the server is shutting
    down, causing the payment fetching to return an error. We now cache its
    state before fetching it from the db.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    f777264 View commit details
    Browse the repository at this point in the history
  2. lnwallet: add debug logs

    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0725cb5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    13ef2ee View commit details
    Browse the repository at this point in the history
  4. itest: shuffle test cases to even out blocks mined in tranches

    This commit adds a new flag to shuffle all the test cases before running
    them so tests which require lots of blocks to be mined are less likely
    to be run in the same tranch.
    
    The other benefit is this approach provides a more efficient way to
    figure which tests are broken since all the differnet backends are
    running different tranches in their builds, we can identify more failed
    tests in one push.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    bbc4945 View commit details
    Browse the repository at this point in the history
  5. workflows: pass action ID as the shuffle seed

    To make sure each run is shuffled, we use the action ID as the seed.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    a7b69c6 View commit details
    Browse the repository at this point in the history
  6. itest: remove direct reference to stanby nodes

    Prepares the upcoming refactor. We now never call `ht.Alice` directly,
    instead, we always init `alice := ht.Alice` so it's easier to see how
    they are removed in a following commit.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    cffea2f View commit details
    Browse the repository at this point in the history
  7. itest: remove the use of standby nodes

    This commit removes the usage of the standby nodes and uses
    `CreateSimpleNetwork` when applicable. Also introduces a helper method
    `NewNodeWithCoins` to quickly start a node with funds.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    f33e55f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6a743f4 View commit details
    Browse the repository at this point in the history
  9. itest+lntest: remove standby nodes

    This commit removes the standby nodes Alice and Bob.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    b12a16f View commit details
    Browse the repository at this point in the history
  10. itest: remove unnecessary channel close and node shutdown

    Since we don't have standby nodes anymore, we don't need to close the
    channels when the test finishes. Previously we would do so to make sure
    the standby nodes have a clean state for the next test case, which is no
    longer relevant.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    6d3ed89 View commit details
    Browse the repository at this point in the history
  11. lntest: make sure node is properly shut down

    Soemtimes the node may be hanging for a while without being noticed,
    causing failures in its following tests, thus making the debugging
    extrememly difficult. We now assert the node has been shut down from the
    logs to assert the shutdown process behaves as expected.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    822b71a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0019cb3 View commit details
    Browse the repository at this point in the history
  13. itest: fix testOpenChannelUpdateFeePolicy

    This commit fixes a misuse of `ht.Subtest`, where the nodes should
    always be created inside the subtest.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    1ffe921 View commit details
    Browse the repository at this point in the history
  14. itest: fix flake in testSendDirectPayment

    This bug was hidden because we used standby nodes before, which always
    have more-than-necessary wallet utxos.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    c6819c0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    50e2495 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    71eab38 View commit details
    Browse the repository at this point in the history
  17. itest: flatten PSBT funding test cases

    So it's easier to get the logs and debug.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    494f1e5 View commit details
    Browse the repository at this point in the history
  18. itest: fix and document flake in sweeping tests

    We previously didn't see this issue because we always have nodes being
    over-funded.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    8082b93 View commit details
    Browse the repository at this point in the history
  19. itest: remove loop in wsTestCaseBiDirectionalSubscription

    So we know which open channel operation failed.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    844b100 View commit details
    Browse the repository at this point in the history
  20. itest: fix flake in testRevokedCloseRetributionZeroValueRemoteOutput

    We need to mine an empty block as the tx may already have entered the
    mempool. This should be fixed once we start using the sweeper to handle
    the justice tx.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    c270401 View commit details
    Browse the repository at this point in the history
  21. itest: fix flake in testSwitchOfflineDelivery

    The reconnection will happen automatically when the nodes have a
    channel, so we just ensure the connection instead of reconnecting
    directly.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    c6b7aa7 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    dda51c2 View commit details
    Browse the repository at this point in the history
  23. itest: use ht.CreateSimpleNetwork whenever applicable

    So we won't forget to assert the topology after opening a chain of
    channels.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d388c88 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    45ee9e5 View commit details
    Browse the repository at this point in the history
  25. lntest+itest: remove AssertNumActiveEdges

    This is no longer needed since we don't have standby nodes, plus it's
    causing panic in windows build due to `edge.Policy` being nil.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    3c4b63a View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    e005582 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    4f7d952 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    076885b View commit details
    Browse the repository at this point in the history
  29. lntest: increase rpcmaxwebsockets for btcd

    This has been seen in the itest which can lead to the node startup
    failure,
    ```
    2024-11-20 18:55:15.727 [INF] RPCS: Max websocket clients exceeded [25] - disconnecting client 127.0.0.1:57224
    ```
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    cb3b285 View commit details
    Browse the repository at this point in the history
  30. itest: document details about MPP-related tests

    This is needed so we can have one place to fix the flakes found in the
    MPP-related tests, which is fixed in the following commit.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    a6bbb3f View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    f9c0cd5 View commit details
    Browse the repository at this point in the history
  32. lntest: fix flakeness in openChannelsForNodes

    We now make sure the channel participants have heard their private
    channel when opening channels.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d8d2a54 View commit details
    Browse the repository at this point in the history
  33. itest: optimize blocks mined in testGarbageCollectLinkNodes

    There's no need to mine 80ish blocks here.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    bdfa085 View commit details
    Browse the repository at this point in the history
  34. itest: break remote signer into independent cases

    So the test can run faster.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    98c7a92 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    136c6f3 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    a3473ec View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    db84d56 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    006f656 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    676b925 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    6b84e60 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    27b0489 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    7a08b78 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    41d1203 View commit details
    Browse the repository at this point in the history
  44. itest: break down single hop send to route

    Also removed the duplicate test cases.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    c0d284c View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    c18e356 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    ce88b8b View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    aace64e View commit details
    Browse the repository at this point in the history
  48. itest: track and skip flaky tests for windows

    To make the CI indicative, we now starting tracking the flaky tests
    found when running on Windows. As a starting point, rather than ignore
    the windows CI entirely, we now identify there are cases where lnd can
    be buggy when running in windows.
    
    We should fix the tests in the future, otherwise the windows build
    should be deleted.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    3535cca View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    f2d5b36 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    41f2387 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    b011d8c View commit details
    Browse the repository at this point in the history
  52. itest+lntest: add new method FundNumCoins

    Most of the time we only need to fund the node with given number of
    UTXOs without concerning the amount, so we add the more efficient
    funding method as it mines a single block in the end.
    yyforyongyu committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    be55355 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    87ea4f0 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    7ed3548 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2024

  1. Configuration menu
    Copy the full SHA
    b645f9c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70529e1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    563fff9 View commit details
    Browse the repository at this point in the history
  4. itest: fix flake in multi-hop payments

    To make this itest work reliably with multiple parallel SQL
    transactions, we need to count both the settle and final HTLC
    events. Otherwise, sometimes the final events from earlier
    forwards are counted before the forward events from later
    forwards, causing a miscount of the settle events. If we
    expect both the settle and final event for each forward,
    we don't miscount.
    aakselrod committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    d1d2e20 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    235de40 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    77a1817 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c9e1fd6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    440c151 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3b04232 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6cca186 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    fb50cec View commit details
    Browse the repository at this point in the history