Skip to content

[bug]: The batch_channel_funding and unannounced_channels itests cannot be run consecutively within the same tranche #9245

@ViktorT-11

Description

@ViktorT-11

The itests CI will currently error if the batch_channel_funding and unannounced_channels itests are run consecutively within the same tranche.

The error was first shown in #8754, and can be seen in this action run:
https://github.com/lightningnetwork/lnd/actions/runs/11627900800

Thanks to @guggero for the help with identifying that!

The reason why this error is only shown in #8754, is that the PR adds 2 new itests to the allTestCases list, which modifies the order of the tests in such a way that both the batch_channel_funding and unannounced_channels itests gets run in tranche 1.

To reproduce the issue, follow these steps:

  1. Check out the PR and build the integration test binaries using make build-itest.
  2. Run the following command:
    itest/itest.test -test.v -test.timeout=180m -logoutput -logdir=.logs-tranche1 -lndexec=itest/lnd-itest -btcdexec=itest/btcd-itest -splittranches=8 -runtranche=1 -test.run='TestLightningNetworkDaemon/.*/.*/btcd/(unannounced_channels|batch_channel_funding)'
    

So far I've tracked down that the issue occurs due to this channel being set to private in the batch open request in the batch_channel_funding test:

Private: true,

For some reason, once the unannounced_channels itest starts ht.Alice.State.Edge.Public will report that there's 1 edge for that channel, even though the ht.Alice.State.Edge.Public actually evaluates to 0 when the
batch_channel_funding test completes. Therefore there seems to be some cleanup that's lacking.

I'm digging into the issue and will update this issue report with any new info I find.

Edit:
I've also noticed now that the value that ht.Alice.State.Edge.Public get's set to before the next test, i.e.:

req = &lnrpc.ChannelGraphRequest{IncludeUnannounced: false}
resp = alice.RPC.DescribeGraph(req)
len(resp)

Results in 1 after all channels have been closed in the batch_channel_funding itest, if run at the end of that itest. Therefore it seems like the closing of the private channel in the batch (chanpoint4), doesn't get reflected in the DescribeGraph response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnintended code behaviouritestsIssues related to integration tests.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions