Skip to content

smite: reject channel_ready for an unsigned channel - #304

Merged
morehouse merged 1 commit into
lnfuzz:masterfrom
ekzyis:channel-ready-unsigned
Oct 27, 2026
Merged

morehouse merged 1 commit into
lnfuzz:masterfrom
ekzyis:channel-ready-unsigned

Conversation

@ekzyis

@ekzyis ekzyis commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Based on #303

A channel is tracked from the moment we build its `funding_created`, so
`ChannelReadyOracle` accepted a `channel_ready` from a target that never
answered with a `funding_signed`. Without that signature we hold no valid
commitment transaction, so a channel the target treats as ready leaves our
funding output spendable only with its cooperation.

BOLT 2 mentions nodes MUST wait for `funding_signed` before sending
`shutdown` but not for `channel_ready`. This might have been an
oversight.

The two-channel `channel_ready` programs skipped `funding_signed`, so they
now await one for each channel.

@morehouse morehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good; will need rebase once #303 is updated.

@ekzyis
ekzyis force-pushed the channel-ready-unsigned branch from c436cd4 to ebed335 Compare October 27, 2026 19:29
@ekzyis

ekzyis commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

ebed335: addressed feedback + rebase on master (74d7514)

Do you think the lightning developers will be interested in a PR to mention this:

MUST wait for funding_signed before sending out channel_ready

It's an issue with funds at risk for the peer, though, not for the misbehaving node. Maybe SHOULD instead of MUST?

Comment thread smite/src/oracles/channel_ready.rs Resolved
@morehouse

Copy link
Copy Markdown
Collaborator

Do you think the lightning developers will be interested in a PR to mention this:

MUST wait for funding_signed before sending out channel_ready

It's an issue with funds at risk for the peer, though, not for the misbehaving node. Maybe SHOULD instead of MUST?

The spec already says not to broadcast the transaction until funding_signed is received. And would someone really send channel_ready before they even broadcast?

There's probably a gap that could be closed here, and it would probably get merged if the change is small, but I'm not sure it will really make a difference for anyone implementing the spec.

A channel is tracked from the moment we build its `funding_created`, so
`ChannelReadyOracle` accepted a `channel_ready` from a target that never
answered with a `funding_signed`. Without that signature we hold no
valid commitment transaction, so a channel the target treats as ready
leaves our funding output spendable only with its cooperation.

The two-channel `channel_ready` programs skipped `funding_signed`, so
they now await one for each channel.
@ekzyis
ekzyis force-pushed the channel-ready-unsigned branch from ebed335 to 5dde24e Compare October 27, 2026 20:31

@morehouse morehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@morehouse
morehouse merged commit 75c1fea into lnfuzz:master Oct 27, 2026
5 checks passed
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.

2 participants