Skip to content

Set Upfront Shutdown Address via lnrpc/lncli #3786

@carlaKC

Description

@carlaKC

Once #3655 is merged, lnd will support the option_upfront_shutdown_address feature which allows nodes to specify an address that a channel should be paid out to upon cooperative close. If the peer we open a channel with supports the feature and we choose to set this address, the peer will not cooperatively close out to an address other than the one provided on channel open.
Further details are provided in BOLT2.

Steps to Completion

  • Add a shutdown_address to lnrpc/lncli's OpenChanne calls
  • Decode the address usingbtcutil.DecodeAddress(addr, activeNetParams.Params)
  • Create a pay to address script using txscript.PayToAddrScript(addr) and set the value on openChanReq.ShutdownScript
  • [Optional] expose the feature bits that our peers support via rpc so that users know when they can set an upfront address (the OpenChannel call will fail if you try to set an upfront address for a channel with a peer that does not support the feature)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3might get fixed, nice to havebeginnerIssues suitable for new developersfundingRelated to the opening of new channels with funding transactions on the blockchainrpcRelated to the RPC interfacespec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions