Skip to content

Include onchain transactions in events#448

Open
tnull wants to merge 4 commits into
lightningdevkit:mainfrom
tnull:2025-01-include-onchain-transactions-in-events
Open

Include onchain transactions in events#448
tnull wants to merge 4 commits into
lightningdevkit:mainfrom
tnull:2025-01-include-onchain-transactions-in-events

Conversation

@tnull

@tnull tnull commented Jan 27, 2025

Copy link
Copy Markdown
Collaborator

Closes #446.
Based on #432.

In #432 we exposed transactions in store. Here we take a stab at exposing them via events. However, to avoid emitting duplicate events for channel-related transactions, this is in draft until we have lightningdevkit/rust-lightning#3566

@tnull

tnull commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator Author

While the latest BDK 2.2 now shipped event (which would make emitting events easier on our end), we still need lightningdevkit/rust-lightning#3566 to properly classify the transactions in our store. So this remains blocked until the latter ships (likely with LDK 0.3).

@ovitrif

ovitrif commented Oct 29, 2025

Copy link
Copy Markdown

While the latest BDK 2.2 now shipped event (which would make emitting events easier on our end), we still need lightningdevkit/rust-lightning#3566 to properly classify the transactions in our store. So this remains blocked until the latter ships (likely with LDK 0.3).

Is there a way we could get this into ldk-node sooner?
To be honest we (Bitkit team), kind of relied on the expectation that the BDK 2.2 PR #310 Return wallet events when applying updates will be integrated in ldk-node soon enough (ie. this month or November); and we made our roadmapping around this expectation. Now I'm getting feedback that there is no way we can delay our release any further than when it's planned, and the due date is very soon; which leaves us with very few options:

  1. Get help from you to get this into ldk-node very soon (November)
  2. Collaborate with you to have someone from our team help with implementation efforts (for example by fixing lightningdevkit/rust-lightning#3566), but then we will need a commitment that if we fix that, this PR takes priority and it is implemented shortly thereafter)
  3. Do our own implementation for this

The team seems to lean towards favoring option 3, which is not ideal IMHO, but the main argument is that we don't really have the time to go any other route.

The issue that I see from my PoV is that option 2 might even seem faster.

Could 2 be an option?

@tnull

tnull commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator Author

Technically unblocked, but we should first land #791, as the API here will depend on the API choices there.

tnull added 2 commits July 10, 2026 13:01
Let callers obtain the object produced by merge semantics without a
second lookup. Preserve the existing boolean API so unrelated call
sites and their allocation behavior remain unchanged.

Co-Authored-By: HAL 9000
Let wallet sync enqueue on-chain payment events directly.

Co-Authored-By: HAL 9000
@tnull tnull force-pushed the 2025-01-include-onchain-transactions-in-events branch 3 times, most recently from b20b0b5 to b2d7c36 Compare July 10, 2026 12:59
@tnull tnull marked this pull request as ready for review July 10, 2026 13:00
@tnull

tnull commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Should be good for review now.

@tnull tnull force-pushed the 2025-01-include-onchain-transactions-in-events branch from b2d7c36 to 35a60c4 Compare July 10, 2026 13:07
@tnull tnull requested a review from jkczyz July 10, 2026 13:39
tnull added 2 commits July 10, 2026 15:39
Notify users when otherwise unclassified on-chain payments reach the
anti-reorg confirmation depth.

Use the wallet's effective stored payment so classified funding,
splice, close, and sweep transactions stay quiet.

Co-Authored-By: HAL 9000
The in-memory store source is shared by the library test utilities and
integration-test helpers. Keep its unit test in the library-only module
so each integration binary does not register and rerun it.

Co-Authored-By: HAL 9000
@tnull tnull force-pushed the 2025-01-include-onchain-transactions-in-events branch from 35a60c4 to 176ac00 Compare July 10, 2026 13:40
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.

Expose on-chain transactions in events

2 participants