Skip to content

BOLT4: unclear handling of invalid onions at final node #1290

@f321x

Description

@f321x

In BOLT 4 it is written that only forwarding nodes, but not final nodes, should fail an htlc e.g. for an invalid hmac or onion version. Why should the final node not fail a htlc with these errors if they receive an invalid onion? Should final nodes use some different error type or is this an issue of the spec?

bolts/04-onion-routing.md

Lines 1333 to 1339 in 14272b1

A _forwarding node_ MAY, but a _final node_ MUST NOT:
- if the onion `version` byte is unknown:
- return an `invalid_onion_version` error.
- if the onion HMAC is incorrect:
- return an `invalid_onion_hmac` error.
- if the ephemeral key in the onion is unparsable:
- return an `invalid_onion_key` error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions