Skip to content

Conversation

@tnull
Copy link
Collaborator

@tnull tnull commented Jan 23, 2026

.. all of our tests should be robust against switching chain sources. We
here opt to pick a random one each time to considerably extend our test
coverage, instead of just running some cases against non-Esplora chain
sources.

tnull added 2 commits January 23, 2026 14:08
It's weird to have a special intermediary `setup_node` method if we have
`TestConfig` for exactly that reason by now. So we move
`async_payment_role` over.
.. all of our tests should be robust against switching chain sources. We
here opt to pick a random one each time to considerably extend our test
coverage, instead of just running some cases against non-Esplora chain
sources.
@tnull tnull requested a review from TheBlueMatt January 23, 2026 14:00
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 23, 2026

👋 Thanks for assigning @TheBlueMatt as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull
Copy link
Collaborator Author

tnull commented Jan 23, 2026

This will be flaky, at the very least until lightningdevkit/rust-lightning#4341 gets release, which would have been caught if we'd ever had run the 0conf test case with an Electrum chain source.

TheBlueMatt
TheBlueMatt previously approved these changes Jan 23, 2026
Copy link
Contributor

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me. Hopefully CI fails until lightningdevkit/rust-lightning#4341

@tnull
Copy link
Collaborator Author

tnull commented Jan 23, 2026

makes sense to me. Hopefully CI fails until lightningdevkit/rust-lightning#4341

I think I'll whack-a-mole a few more flakes/bugs before landing this.

When we intially implemented `bitcoind` syncing polling the mempool was
very frequent and rather inefficient so we made a choice not to
unnecessarily update the payment store for mempool changes, especially
since we only consider transactions `Succeeded` after
`ANTI_REORG_DELAY` anyways.

However, since then we made quite a few peformance improvements to the
mempool syncing, and by now we should just update they payment store as
not doing so will lead to rather unexpected behavior, making some tests
fail for `TestChainSource::Bitcoind`, e.g., `channel_full_cycle_0conf`,
which we fix here.
@tnull
Copy link
Collaborator Author

tnull commented Jan 23, 2026

Previously

    simple_bolt12_send_receive (bitcoind RPC)
    test_node_announcement_propagation (bitcoind RPC)

had failed, I want to double-check them once more before moving forward here.

Previously, we fixed than a fresh node syncing via `bitcoind` RPC would
resync all chain data back to genesis. However, while introducing a
wallet birthday is great, it disallowed discovery of historical funds if
a wallet would be imported from seed. Here, we add a recovery mode flag
to the builder that explictly allows to re-enable resyncing from genesis
in such a scenario. Going forward, we intend to reuse that API for an
upcoming Lightning recoery flow, too.
@tnull tnull force-pushed the 2026-01-test-setup branch from 96b6f29 to b8179ca Compare January 23, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants