Skip to content

smite-scenarios: skip RecvChannelReady on premature funding tx - #171

Merged
morehouse merged 1 commit into
masterfrom
premature_broadcast
Jul 29, 2026
Merged

smite-scenarios: skip RecvChannelReady on premature funding tx#171
morehouse merged 1 commit into
masterfrom
premature_broadcast

Conversation

@morehouse

@morehousemorehouse commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

If the funding transaction was mined before sending it to the target via funding_created, the target may never detect the funding transaction on chain and will therefore fail to send us channel_ready. Make RecvChannelReady a no-op in this case.

This was found to occur while fuzzing both LDK and LND.

If the funding transaction was mined before sending it to the target via
funding_created, the target may never detect the funding transaction on
chain and will therefore fail to send us channel_ready. Make
RecvChannelReady a no-op in this case.

@NishantBansal2003NishantBansal2003 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

This approach gave me an idea that could be implemented in the future: maintain a HashMap<txid, confirmations>. This would replace both the unmined_txids and mined_txidsHashSet with a single map, while avoiding repeated get_transaction_confirmations RPC calls during sequences like MineBlock -> RecvChannelReady until state.config.minimum_depth is reached

@morehouse
morehouse merged commit 1e6a7f3 into masterJul 29, 2026
5 checks passed
@morehouse
morehouse deleted the premature_broadcast branch July 29, 2026 13:32
@morehouse

Copy link
Copy Markdown
CollaboratorAuthor

Cool idea. Anything to reduce unnecessary RPC calls would be good for improving speed.

Sign up for freeto 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.

2 participants

@morehouse@NishantBansal2003