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

option_simple_close (features 60/61) #1096

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on Jul 17, 2023

  1. BOLT 2, 3, 9: option_simple_close.

    Pay your own fees, so the peer will sign without caring.  Even if it doesn't relay.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    d299e0d View commit details
    Browse the repository at this point in the history
  2. BOLT 2: fix battling requirements for shutdown

    The shutdown section says:
    
    ```
      - MUST NOT send multiple `shutdown` messages.
    ```
    
    But the reconnection section says:
    
    ```
      - upon reconnection:
        - if it has sent a previous `shutdown`:
          - MUST retransmit `shutdown`.
    ```
    
    So clearly, remove the former.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    aa6deb8 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2023

  1. fixup! BOLT 2, 3, 9: option_simple_close.

    * Adds both directions to the diagram.
    * Rename closee_output to has_closee_output.
    * Refer explicitly to BOLT 3 for "null output" defn.
    * Pad the OP_RETURN to make 65 bytes.
    rustyrussell committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    62f6b5b View commit details
    Browse the repository at this point in the history
  2. fixup! BOLT 2, 3, 9: option_simple_close.

    More MUST, less SHOULD.
    rustyrussell committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    c22fd7b View commit details
    Browse the repository at this point in the history
  3. Require non-dust output for closer.

    You have to give them something which will propagate.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    4fa6f92 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2023

  1. BOLT 2: Rewrite to use TLV, and only allow the lesser-amount to drop …

    …output.
    
    If both are dust, you should lowball fees.  The next patch adds OP_RETURN
    as a valid shutdown scriptpubkey though if you really want to do this.
    
    This also addresses the case where people send a new `shutdown` with a *different* scriptpubkey.  This could previously cause a race where you receive a bad signature (because it hasn't received the updated shutdown), so we ignore these cases.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    74f32dc View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. BOLT 2: allow standard OP_RETURN as an output type.

    This gets around "but both our outputs are dust!" problems, as
    recommended by Anthony Towns.
    
    I hope I interpreted the standardness rules correctly (technically,
    you can have multiple pushes in an OP_RETURN as long as the total is
    under 83 bytes, but let's keep it simple).
    
    Add an explicit note that "OP_RETURN" is never considered "uneconomic".
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    182c77b View commit details
    Browse the repository at this point in the history
  2. Feedback from Bastien

    - Make it clear why the OP_RETURN restrictions have two forms.
    - Cross-reference existing dust threshold
    - Lots of typo fixes
    - Don't set closer_and_closee if we're larger/equal, and closee is dust.
    - Remove Rationale on delete zero-output tx hack.
    rustyrussell committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    5d3fa98 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. BOLT 2: specify nSequence explicitly.

    We don't care, as long as it's RBF-able.  This will be nicer for
    Taproot when mutual closes are otherwise indistinguishable from normal
    spends.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    77baa9a View commit details
    Browse the repository at this point in the history