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

BOLT update, including payment metadata support #5086

Commits on Mar 31, 2022

  1. wire/tlvstream: const.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    86f40a7 View commit details
    Browse the repository at this point in the history
  2. specs: update CSV files.

    Regenerate from current BOLTS via `make extract-bolt-csv`
    
    1. The remote_addr field was added manually into peer_wire.csv: this
       needs to be a patch otherwise it vanishes on regen.
    2. We never brought into the channel_disabled fields, because it was
       too much hassle (we never actually generate this!).  Do it now.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    5c7d874 View commit details
    Browse the repository at this point in the history
  3. doc: update BOLT references part1, including bolt11 test vectors with…

    … payment_secret.
    
    The signatures on the new examples are sometimes different from what we produce though?
    They're valid, however.
    
    And one example has an unneeded feature 5-bit; it's not *wrong*, but
    it's not optimal.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    3098c00 View commit details
    Browse the repository at this point in the history
  4. shutdown: don't allow shutdown to p2pkh or p2sh addresses for anchor …

    …outputs.
    
    This doesn't have an effect now (except in experimental mode), but it
    will when we support anchors.  So we deprecate the use of those in the
    close command too.
    
    For experimental mode we have to avoid using p2pkh; adapt that test.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Deprecated: JSON-RPC: `shutdown` no longer allows p2pkh or p2sh addresses.
    rustyrussell committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    51311dd View commit details
    Browse the repository at this point in the history
  5. doc: big BOLT update to incorporate warnings language.

    We do this (send warnings) in almost all cases anyway, so mainly this
    is a textual update, but there are some changes:
    
    1. Send ERROR not WARNING if they send a malformed commitment secret.
    2. Send WARNING not ERROR if they get the shutdown_scriptpubkey wrong (vs upfront)
    3. Send WARNING not ERROR if they send a bad shutdown_scriptpubkey (e.g. p2pkh in future)
    4. Rename some vars 'err' to 'warn' to make it clear we send a warning.
    
    This means test_option_upfront_shutdown_script can be made reliable, too,
    and it now warns and doesn't automatically close channel.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    bfaa53d View commit details
    Browse the repository at this point in the history
  6. bolt11: support payment_metadata.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    42f5df5 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2022

  1. lightningd: metadata received support (log and decline).

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    5f9d492 View commit details
    Browse the repository at this point in the history
  2. sendpay: add payment_metadata argument.

    And document the missing arguments.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    0550f6f View commit details
    Browse the repository at this point in the history
  3. plugins/pay: send payment_metadata if provided in invoice.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Added: Protocol: `pay` (and decode, etc) supports bolt11 payment_metadata a-la lightning/bolts#912
    rustyrussell committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    1b0be29 View commit details
    Browse the repository at this point in the history
  4. doc: update BOLTs to latest master.

    Just typo fixes and the like.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    8d9bd17 View commit details
    Browse the repository at this point in the history
  5. bolt11: reorder invoice production to match test vectors.

    After this, we can exactly reproduce the vectors (in DEVELOPER mode).
    
    1. Move payment_metadata position to match test vector.
    2. Create flag to suppress `c` field production.
    3. Some vectors put secret before payment_hash, hack that in.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    f350685 View commit details
    Browse the repository at this point in the history
  6. pytest: fix flake in test_multichan.

    I have a separate branch which fixes this race properly, but it's not anything
    to do with this PR.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    91932be View commit details
    Browse the repository at this point in the history