Skip to content

Conversation

@erickcestari
Copy link
Contributor

An offer with offer_chains present but containing zero chain hashes is invalid, as it makes invoice requests impossible. The payer cannot satisfy the requirement to set invreq_chain to "one of offer_chains" when the array is empty.

Add explicit requirement for readers to reject such offers, along with rationale and a test vector.

Closes #1282

Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

ACK 82ee861

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK 82ee861

@rustyrussell
Copy link
Collaborator

Sure.

Tempted to just clarify the reader requirements to " - if the node does not accept invoices for at least one of the chains:"

That clearly covers this case.

An offer with offer_chains present but containing zero chain hashes
is invalid, as it makes invoice requests impossible—the payer cannot
satisfy the requirement to set invreq_chain to "one of offer_chains"
when the array is empty.

Add explicit requirement for readers to reject such offers, along with
rationale and a test vector.
@erickcestari erickcestari force-pushed the offer-chains-with-zero-chain-hash branch from 82ee861 to 8eb8740 Compare January 13, 2026 11:38
@erickcestari
Copy link
Contributor Author

Sure.

Tempted to just clarify the reader requirements to " - if the node does not accept invoices for at least one of the chains:"

That clearly covers this case.

Updated! It should be less repetitive now.

Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

ACK 8eb8740, thanks!

@t-bast t-bast merged commit 34455ff into lightning:master Jan 19, 2026
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.

BOLT 12: Clarify handling of empty offer_chains field

4 participants