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

RBF: Final part #4399

Merged
merged 23 commits into from
Mar 6, 2021
Merged

Commits on Mar 5, 2021

  1. df-rbf: init an rbf for real, using openchannel_bumpfee

    Reorg a bit of the RBF code so we use the same codepaths for we-init vs
    they-init starts.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    84d7b29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e49a241 View commit details
    Browse the repository at this point in the history
  3. df: update reserve calculation

    We can use the funding amount to derive the reserve requirement.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    fc051d1 View commit details
    Browse the repository at this point in the history
  4. df-rbf: only permit the channel initiator to init RBF

    We're *mostly* set up for both sides doing RBF, except that it reverses
    the callback flow (using the plugin vs RPC calls) and we're not
    currently smart enough to flip between them gracefully
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    fee2c15 View commit details
    Browse the repository at this point in the history
  5. df-rbf: separate first-time channel save from update (RBF)

    We can't "first save" a channel twice; instead we split in two and just
    update the underlying channel on subsequent passes (RBFs)
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    24ea527 View commit details
    Browse the repository at this point in the history
  6. rbf: consolidate failure paths, use "warnings"

    We move over to the new "warning" paradigm, instead of using
    an "rbf_fail" message.
    
    Every failure is either a warning or an error; on warnings we
    hang up and reconnect later, effectively resetting the state.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    17c3382 View commit details
    Browse the repository at this point in the history
  7. rbf: clean up channel on error

    Make sure we clean up unsaved channels appropriately on failure.
    
    We forget the peer/channel if it's unsaved!
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    2f40c6b View commit details
    Browse the repository at this point in the history
  8. df: move methods around so we can call them elsewhere

    Will reuse these elsewhere soon
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    d04de94 View commit details
    Browse the repository at this point in the history
  9. df: handle funding_locked + tx_signatures messages out of order

    If we're doing an RBF, it's possible that the peer will send us a
    funding_locked, shutdown, or tx_signatures message. (We get tx_sigs out
    of order on a reconnect)
    
    This lets us gracefully handle a shutdown or funding_locked
    sent at any time (after first funding tx) as well.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    6fb06fa View commit details
    Browse the repository at this point in the history
  10. listpeers: include info on channels that are in-process

    Channels that we're in negotiation for, but don't have a commitment
    transaction saved for yet.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    e2f0987 View commit details
    Browse the repository at this point in the history
  11. channel: move inflight + feerate methods to channel.c

    Need these more accessible for next patch, which moves the next_feerate
    info into listpeers
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    4c5024c View commit details
    Browse the repository at this point in the history
  12. listpeers: include feerate info for RBF-candidate channels

    Changelog-Added: JSON-RPC: `listpeers` now includes 'last_feerate', 'next_feerate', 'initial_feerate' and 'next_fee_step' for channels in state DUALOPEND_AWAITING_LOCKIN
    
    fixup! listpeers: include feerate info for RBF-candidate channels
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    8acc78f View commit details
    Browse the repository at this point in the history
  13. df-rbf: update rejection criteria for tx_sigs

    since we might be in the middle of an RBF, update our checks to be more
    robust
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    ea06a4c View commit details
    Browse the repository at this point in the history
  14. df: cleanup error handling on lightningd side

    Make existing methods understand how unsaved channels work, re-work
    errors so that we handle everything appropriately
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    97f0fe8 View commit details
    Browse the repository at this point in the history
  15. df-tests: happy path rbf test

    I can has RBF?
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    2773688 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    10fb911 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    1401761 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    796b4ea View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    3ac665b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    3dd2166 View commit details
    Browse the repository at this point in the history
  21. df-memleak: expose memleak error and fix

    We were getting a memleak error that the open_attempt isnt' being
    cleaned up in test_rbf_reconnect_tx_construct. I had some trouble
    reproducing it, so I removed the reliance on using `tmpctx` to clean it
    up and was more surgical about cleaning it up inline.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    edb888b View commit details
    Browse the repository at this point in the history
  22. df: add (over zealous?) note about the usage of psbt_has_req_fields

    Requested-In-Part-By: Rusty Russell @rustyrussell
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    36460c9 View commit details
    Browse the repository at this point in the history
  23. connectd: clean up the channel stuffs when we get a reconnect

    If they've disconnected/reconnected we need to terminate all the
    inflight stuff, plus go ahead and call 'disconnect' plugin trigger etc.
    niftynei committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    4b7af79 View commit details
    Browse the repository at this point in the history