tapchannel+itest: implement AuxCloseShape and cover the coop close fee baseline - #2091
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a regression test for cooperative close fee estimation when auxiliary outputs are present, ensuring that closing at the relay floor remains successful. It also adds helper functions closeAssetChannelWithFeeAndAssert and waitForClosePendingUpdate to facilitate testing channel closures with specific fee rates. Feedback suggests replacing the magic number 1000 with a named constant for better maintainability and improving the reliability of channel closure operations by using a longer timeout and applying it to the CloseChannel RPC call.
d25dda6 to
f087881
Compare
|
@darioAnongba, remember to re-request review from reviewers when ready |
GeorgeTsagk
left a comment
There was a problem hiding this comment.
LGTM
pending LND PR and final go.mod replace
Bumps lnd to pull in the AuxCloseShape interface method (lightningnetwork/lnd#10969) and implements it: one P2TR entry per party with a non-zero asset balance. The close fee only affects the values of the asset outputs, never their number or script sizes. Also updates the lntest harness call to the NewNodeWatchOnly API.
f087881 to
d2d85bf
Compare
Closes an asset channel at the relay floor fee rate and asserts the close transaction confirms with the expected auxiliary output. A fee baseline that omits the aux output weight underprices the close transaction, which is then rejected by the mempool and the test times out waiting for the close.
d2d85bf to
5c2b5e6
Compare
tapchannel+itest: implement AuxCloseShape and cover the coop close fee baseline (cherry picked from commit af41397)
Adds the tapd side of lightningnetwork/lnd#10969, which fixes the initial coop close fee baseline for channels with auxiliary close outputs, together with a regression itest.
AuxCloseShape implementation
AuxChanCloser.AuxCloseShapereturns the fee-independent shape of the auxiliary close outputs: one P2TR entry per party with a non-zero asset balance. lnd uses this shape to include the aux output weight in the coop close fee baseline, and validates the concrete outputs returned byAuxCloseOutputsagainst it before signing a proposal. The close fee only affects the values of the asset outputs, never their number or script sizes, which is the invariant that makes the shape fee-independent.The first commit bumps lnd to a master version that contains the new interface method.
Regression itest
coop_close_fee_baselineopens an asset channel and cooperatively closes it at the relay floor fee rate (1 sat/vByte), asserting that the close transaction confirms and carries the expected auxiliary output. At the relay floor there is no headroom: a fee baseline that omits the aux output weight produces a close transaction below the relay fee rate, which the mempool rejects, and the test times out waiting for the close.Run with
make itest-cc cccase=coop_close_fee_baseline.