Commit Graph

17388 Commits

Author SHA1 Message Date
Boris Nagaev
90c45ddd8f
lnwallet: factor out func GetSignedCommitTx
This pure function creates signed commit transaction, using various
inputs passed as struct TaprootSignedCommitTxInputs and a signer.

This is needed to be able to store the inputs without a signature
in SCB and sign the transaction in chantools scbforceclose.

See https://github.com/lightningnetwork/lnd/pull/8183/files#r1423959791
2024-10-11 10:00:42 -03:00
Boris Nagaev
e7776a4c1e
contractcourt: fix doc of commitSweepResolver
It is used for sweeping time-locked outputs as well as non time-locked outputs.
2024-10-11 10:00:42 -03:00
Boris Nagaev
e04aaa0de0
chanbackup: test encoding of taproot channel 2024-10-11 10:00:42 -03:00
Boris Nagaev
a1aec88268
[lncli] exportchanbackup single channel in hex
It used to be base64, which is not compatible with verifychanbackup,
expecting hex.
2024-10-11 10:00:42 -03:00
Oliver Gugger
136cb42457
Merge pull request #9168 from feelancer21/fix-lncli-wallet-proto
lnrpc: fix lncli documentation tags in walletkit.proto
2024-10-11 06:58:54 -06:00
feelancer21
5290598f1b
lnrpc: fix lncli documentation tags in walletkit.proto
Fixes the tag for `wallet pendingsweeps` and adds the tag for
`wallet estimatefeerate`.
2024-10-08 18:19:36 +02:00
Oliver Gugger
0dd58ee529
Merge pull request #9033 from ziggie1984/non-anchor-channel-bump
error out when non-anchor channels are tried to bump the force close fee.
2024-10-07 23:30:17 -06:00
Olaoluwa Osuntokun
bdc5187749
Merge pull request #9159 from ziggie1984/fn-set-addon
fn: Add Size and IsEmpty methods to Set
2024-10-07 17:30:05 +02:00
Olaoluwa Osuntokun
8e451cb8be
Merge pull request #9144 from ziggie1984/add-rpcclient-logging
lnd: add logger for rpcclient
2024-10-07 11:05:00 +02:00
Olaoluwa Osuntokun
e9fbbe2528
Merge pull request #9143 from ellemouton/rb-set-bit-required
feature+rpcserver: add SetBit helper to set dependent bits
2024-10-04 19:16:34 -07:00
Olaoluwa Osuntokun
e2c97ede81
Merge pull request #9141 from starius/goroutines2
fn: add goroutine manager
2024-10-04 19:15:46 -07:00
Olaoluwa Osuntokun
35759dea1b
Merge pull request #9117 from Liongrass/patch-6
Update link in musig2.md
2024-10-04 19:09:16 -07:00
Olaoluwa Osuntokun
b8c828d730
Merge pull request #9135 from ProofOfKeags/fn/slice-uncons
[MICRO]: fn: add uncons, unsnoc and its component projections
2024-10-04 19:08:58 -07:00
Keagan McClelland
4e1579cf4c
fn: add uncons, unsnoc and its component projections 2024-10-04 14:47:11 -06:00
Elle
d90871bee7
Merge pull request #9161 from ellemouton/fixInvalidBlindingEncodeSig
channeldb/mig/lnwire21: fix FailInvalidBlinding Encode sig
2024-10-04 12:52:49 +02:00
Elle Mouton
8f6d336ab2
channeldb/mig/lnwire21: fix FailInvalidBlinding Encode sig
fix the signature of the Encode method so that it does in fact implement
the Serializable interface defined in the lnwire21 package. This differs
slightly from the interface defined in the main lnwire package.
2024-10-04 10:31:46 +02:00
ziggie
42e8a43375
fn: Add Size and IsEmpty methods to Set 2024-10-04 01:07:47 +02:00
Olaoluwa Osuntokun
42500b2129
Merge pull request #9154 from ziggie1984/master
multi: bump btcd version.
2024-10-03 15:41:59 -07:00
ziggie
4402137fb4
multi: bump btcd version.
The new SignCompact return values had to be adopted across the
code base.
2024-10-03 21:56:21 +02:00
Olaoluwa Osuntokun
2d333178c3
Merge pull request #8960 from lightningnetwork/0-19-staging-rebased
[custom channels 5/5]: merge custom channel staging branch into master
2024-10-03 10:07:16 -07:00
Olaoluwa Osuntokun
bdaa9f4146
sweep: ensure we factor in extra change addrs in MaxFeeRateAllowed 2024-10-02 18:10:14 -07:00
George Tsagkarelis
f2adabb989
docs: update release notes 2024-10-02 18:10:12 -07:00
Olaoluwa Osuntokun
8494887adc
lnd: signal taproot overlay chans based on config
We also add a sanity check to make sure they can't be signaled without
the aux interfaces.
2024-10-02 18:10:11 -07:00
Olaoluwa Osuntokun
c6ba5d11f1
lncfg: add new config option for taproot overlay chans 2024-10-02 18:10:10 -07:00
Olaoluwa Osuntokun
2395c4d0a1
rpc+funding: add taproot overlay as RPC chan type 2024-10-02 18:10:09 -07:00
Olaoluwa Osuntokun
d72de4cdbc
lnrpc: add SIMPLE_TAPROOT_OVERLAY feature bit 2024-10-02 18:10:08 -07:00
Olaoluwa Osuntokun
18521dbe0c
funding: add chan type awareness for new taproot chans overlay 2024-10-02 18:10:07 -07:00
Olaoluwa Osuntokun
0ee9b02094
lnwallet: add awareness of taproot overlay chan type to reservations 2024-10-02 18:10:06 -07:00
Olaoluwa Osuntokun
f21c1165a0
feature: add awareness of new taproot chans overlay feature bit
This bit will be false by default in current production deployments.
2024-10-02 18:10:05 -07:00
Olaoluwa Osuntokun
7f9268c38f
lnwire: add new taproot chans overlay feature bit 2024-10-02 18:10:04 -07:00
Olaoluwa Osuntokun
4920bf6e1a
contractcourt: integration aux sweeper to breach arb
Similar to the sweeper, when we're about to make a new breach
transaction, we ask the sweeper for a new change address, if it has one.
Then when we go to publish, we notify broadcast.
2024-10-02 18:10:03 -07:00
Olaoluwa Osuntokun
c59f11168b
contractcourt: update makeBreachedOutput to accept resolution blob 2024-10-02 18:10:02 -07:00
Olaoluwa Osuntokun
f81cd79bca
contractcourt: update GenSweepScript to return internal key
For the upcoming aux sweeper integration, the internal key is needed for
the call backs.
2024-10-02 18:10:01 -07:00
Olaoluwa Osuntokun
9a181105e2
multi: hook up new aux interfaces 2024-10-02 18:10:00 -07:00
Olaoluwa Osuntokun
47f728e548
contractcourt: pause resolution for HTLCs w/ custom records
This is a hold over until the aux resolution is finalized for HTLC
outputs.
2024-10-02 18:09:59 -07:00
Olaoluwa Osuntokun
eaea11e48f
sweep: update sweeper to use AuxSweeper to add extra change addr
In this commit, we start to use the AuxSweeper (if present) to obtain a
new extra change addr we should add to the sweeping transaction. With
this, we'll take the set of inputs and our change addr, and then maybe
gain a new change addr to add to the sweep transaction.

The extra change addr will be treated as an extra required tx out,
shared across all the relevant inputs. This'll also be used in
NeedWalletInput to make sure that we add an extra input if needed to be
able to pay for the change addr.
2024-10-02 18:09:58 -07:00
Olaoluwa Osuntokun
cb93f8c01a
sweep: add new AuxSweeper interface
In this commit, we add a new AuxSweeper interface. This'll take a set of
inputs, and a change addr for the sweep transaction, then optionally
return a new sweep output to be added to the sweep transaction.

We also add a new NotifyBroadcast method.  This'll be used to notify
that we're _about_ to broadcast a sweeping transaction. The set of
inputs is passed in, which allows the caller to prepare for the ultimate
broadcast of the sweeping transaction.

We also add ExtraTxOut to BumpRequest pass fees to NotifyBroadcast. This
allows the callee to know the total fee of the sweeping transaction.
2024-10-02 18:09:57 -07:00
Olaoluwa Osuntokun
d52d30d46e
server+sweep: convert GenSweepScript to use new addr type
We convert it to use lnwallet.AddrWithKey, as in the future, knowing the
internal key for an address will be useful.
2024-10-02 18:09:56 -07:00
Olaoluwa Osuntokun
88ae4cbb21
contractcourt: set resolution blob in commitSweepResolver 2024-10-02 18:09:55 -07:00
Olaoluwa Osuntokun
bf3cf9ef3c
input: add ResolutionBlob method to inputKit
We also update breachedOutput w/ the new API.
2024-10-02 18:09:54 -07:00
Olaoluwa Osuntokun
3f50339898
input: refactor all inputs to use MakeBaseInput, add opts
In this commit, we refactor all the other constructors for the input to
use MakeBaseInput. We also add a new set of functional options as well.
This'll be useful later on to ensure that new options are properly
applied to all the input types.
2024-10-02 18:09:53 -07:00
Olaoluwa Osuntokun
e0ced8e629
lnwallet+peer: move internalKeyForAddr to lnwallet package
This way we can re-use it. We also make it slightly more generalized.
2024-10-02 18:09:52 -07:00
Olaoluwa Osuntokun
f74d1ce53b
contractcourt: add CommitBlob to taprootBriefcase
This'll be used to store the extra resolution information for the
commitment outputs.
2024-10-02 18:09:51 -07:00
Olaoluwa Osuntokun
4619cefc8f
lnwallet: add new aux resolver interface
This will be used by external callers to modify the way we resolve
contracts on chain. For a given contract, we'll store an extra "blob",
that will later be presented during the sweeping phase.
2024-10-02 18:09:50 -07:00
Olaoluwa Osuntokun
0f2c16de99
contractcourt: convert taprootBriefcase to use new tlv record type
This commit doesn't yet go all the way to modify all the other records
quite yet.
2024-10-02 18:09:49 -07:00
Olaoluwa Osuntokun
bf0bd64023
lnwire: modify TestLightningWireProtocol to use sub-tests
This way, it's possible to run induvidual tests to target failures.
2024-10-02 18:09:48 -07:00
George Tsagkarelis
d1a2dd6bd0
routing: add htlcAmt to PaymentBandwidth method of TlvTrafficShaper
This commit was added to the 0-19-staging branch recently and therefore
didn't make it into a previous part yet. So it's unrelated to the
changes in this part but is required for the whole custom channel saga.
2024-10-02 18:09:46 -07:00
András Bánki-Horváth
9eb405e9c6
fn: add goroutine manager
The package provides type GoroutineManager which is used to launch goroutines
until context expires or the manager is stopped. Stop method blocks until all
started goroutines stop.

Original code by Andras https://go.dev/play/p/HhRpE-K2lA0

Adjustments and tests by Boris.
2024-10-02 20:29:59 -03:00
ziggie
2915936a39
docs: add release-notes. 2024-10-03 00:38:50 +02:00
ziggie
6387c0ab50
walletrpc: error out for non-anchor chans.
Return an error if a non-anchor channel is tried to be fee-bumped.
2024-10-03 00:37:49 +02:00