Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offers #798

Merged
merged 8 commits into from
Sep 24, 2024
Merged

Offers #798

merged 8 commits into from
Sep 24, 2024

Commits on Aug 27, 2024

  1. BOLT 1: add bip340sig type.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    3793495 View commit details
    Browse the repository at this point in the history
  2. BOLT 1: Add utf8 type.

    It's far easier to validate these on parsing than to hand-validate them
    elsewhere.
    
    I didn't turn `alias` or `error` into this, though they're similar
    (`alias` can have a nul terminator).
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    a854025 View commit details
    Browse the repository at this point in the history
  3. tools/spellcheck.sh: more generally ignore things inside ``.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    8611f6b View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Allow using short_channel_id in onion messages

    Offers may contain blinded paths to allow for greater recipient privacy.
    However, they come at a cost of increased QR code size as each hop
    requires a 33-byte `point` for the `next_node_id`. Allow using
    `short_channel_id` instead, which only requires 8 bytes.
    
    Still allow for use of `next_node_id` for cases where the blinded path
    may not involve channel counterparties or for long-lived offers, which
    may outlive the given channels.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    jkczyz authored and rustyrussell committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c406f1a View commit details
    Browse the repository at this point in the history
  2. Add a sciddir_or_pubkey fundamental type

    Offers may contain blinded paths to allow for greater recipient privacy.
    However, they come at a cost of increased QR code size as the
    introduction node requires a 33-byte `point`.
    
    Define a new `sciddir_or_pubkey` fundamental type such that either a point or a
    reference to one in a `channel_announcement` can be used. This is
    backwards compatible with `point`.
    
    Use this new type for the `blinded_path` subtype's `first_node_id`.
    jkczyz authored and rustyrussell committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8f1a564 View commit details
    Browse the repository at this point in the history
  3. BOLT 12: offers, sixth draft

    A BOLT11 "invoice" has proven too low-level for human use in many
    scenarios.  Efforts like lnurl have covered the gap, but integrating
    some of such higher layers into the lightning protocol itself has many
    advantages.
    
    This draft defines three new things:
    
    1. A new invoice format.  I know, this is painful, but it maps almost
       1:1 to the current format (though signatures are very different),
       is easier to implement, and easier to send via the lightning
       network itself.
    
    2. Formats for an "offer", which for all intents and purposes serves
       as the new, persistent invoice for users.
    
    3. Format for an "invoice_request": this is a message sent via the
       lightning network itself to receive the real invoice, or can
       be used directly in a send-money scenario (e.g. ATM).
    
    The offer (for accepting payments) or invoice_request (for sending
    payments) are usually presented via a QR code or similar, the replies
    are sent using onion messages.  Each copies fields from the prior so
    it stands alone, to allow statelessness.
    
    Features which have been deliberately omitted for the initial version:
    - Recurrence.
    - Invoice replacement ("don't accept that old payment!")
    - Payer proof for refunds.
    
    This effort has been EPIC, and there is absolutely no way I could have
    done this without the often thankless task of implementing,
    re-implementing, revising and re-reading this text.
    
    In particular I have been delighted to receive the mental boost from
    the following people:
    
    1. Thomas H of ACINQ (https://github.com/thomash-acinq)
    2. Jeffrey Czyz of Square Crypto (https://github.com/jkczyz)
    3. Joost Jager (https://github.com/joostjager)
    4. Aditya Sharma (https://github.com/adi2011)
    5. Rene Pickhardt (https://github.com/renepickhardt)
    6. Bastien Teinturier of ACINQ (https://github.com/t-bast)
    7. Valentine Wallace of LDK (https://github.com/valentinewallace)
    8. Matt Corallo of LDK (https://github.com/BlueMatt)
    
    Also @bjarnemagnussen, @ellemouton, @animatedbarber, @617a7a,
    @instagibbs, @evansmj, @eupn and @yyforyongyu.
    
    (And no doubt others over the years, who I've accidentally omitted!)
    
    Yes, of course, thanks to my family for their patience with me.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    47adf18 View commit details
    Browse the repository at this point in the history
  4. BOLT 4: add bolt12 payloads to onion message payloads.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    eaaa69b View commit details
    Browse the repository at this point in the history
  5. BOLT 12: the test vectors.

    Three vectors:
    
    1. Raw string decoding tests.  (Start here!)
    2. Offer decoding tests.
    3. TLV signature tests.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    f4d74a9 View commit details
    Browse the repository at this point in the history