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

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

Open
ViktorTigerstrom opened this issue Nov 6, 2024 · 0 comments · May be fixed by #9248
Labels
bug Unintended code behaviour itests Issues related to integration tests.

Comments

@ViktorTigerstrom
Copy link
Collaborator

ViktorTigerstrom commented Nov 6, 2024

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.

@ViktorTigerstrom ViktorTigerstrom added bug Unintended code behaviour needs triage itests Issues related to integration tests. and removed needs triage labels Nov 6, 2024
@guggero guggero linked a pull request Nov 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour itests Issues related to integration tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant