Commit Graph

17366 Commits

Author SHA1 Message Date
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
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
Olaoluwa Osuntokun
9f0cc159ea
Merge pull request #8644 from Roasbeef/remove-sql-mutex-part-deux
kvdb/postgres: remove global application level lock
2024-10-01 18:06:45 -07:00
Elle
f1207ef740
Merge pull request #9001 from ellemouton/namespacedMC
routing: Namespaced Mission Control
2024-10-01 20:21:53 +02:00
Elle Mouton
83c1d731e7
docs: add release note entry 2024-10-01 18:02:26 +02:00
Elle Mouton
8126930d6c
routing: support multiple namespaced MissionControls 2024-10-01 14:11:05 +02:00
Elle Mouton
5eff056933
routing: prefix MC logs with namespace 2024-10-01 14:06:54 +02:00
Elle Mouton
f0f4f2df21
routing: separate MissionControl from MissionControlManager
This commit renames the previous MissionControl to MissionController and
the previous MissionController interface to MissionControlQuerier. This
is done because soon the (new) MissionController will back multiple
namespaced MissionControl instances.  For now, it just houses a single
MissionControl in the default namespace.

This commit also replaces the MissionControl's `now` function with a
`clock.Clock`.
2024-10-01 14:06:50 +02:00
Elle Mouton
28a828a11e
routing: unexport MissionControl mutex
Only the MissionControl instance should use this variable and it should
not be accessible to users of MissionControl.
2024-10-01 13:50:50 +02:00
Elle Mouton
6b449a6633
routing: start writing and reading from namespaced MC
and invoke the associated mission control migration.
2024-10-01 13:50:50 +02:00
Elle Mouton
bfe4a08341
channeldb/migration33: migrate MC store pairs to default namespace
In this commit, the mission control store is migrated such that all
existing pairs which are currently stored directly in the top level
results bucket are now instead moved to a "default" namespace bucket.

Note that this migration is not yet invoked in this commit. The
migration will be invoked in the same commit that starts writing and
reading the new format.
2024-10-01 13:50:50 +02:00
Elle Mouton
2dd9046622
routing: introduce missionControlDB abstraction
So that `missionControlStore` can be unaware of the backing DB structure
it is writing to. In an upcoming commit when we change mission control
to write to namespaced buckets instead, we then only need to update the
`namespacedDB` implementation.
2024-10-01 13:50:50 +02:00
Elle
75eaaf7c5c
Merge pull request #8911 from ellemouton/reduceMCRouteEncoding
routing+channeldb: use a more minimal encoding for MC routes
2024-10-01 13:49:11 +02:00
Elle Mouton
34303e77a1
docs: add release notes entry 2024-10-01 10:53:48 +02:00
Olaoluwa Osuntokun
43a1ca4f3d
kvdb/postgres: remove global application level lock
In this commit, we remove the global application level lock from the
postgres backend. This lock prevents multiple write transactions from
happening at the same time, and will also block a writer if a read is on
going. Since this lock was added, we know always open DB connections
with the strongest level of concurrency control available:
`LevelSerializable`. In concert with the new auto retry logic, we ensure
that if db transactions conflict (writing the same key/row in this
case), then the tx is retried automatically.

Removing this lock should increase perf for the postgres backend, as now
concurrent write transactions can proceed, being serialized as needed.
Rather then trying to handle concurrency at the application level, we'll
set postgres do its job, with the application only needing to retry as
necessary.
2024-09-30 16:58:46 -07:00
Elle Mouton
383a6d274f
routing+channeldb: migrate MC store to use minimal Route encoding
Add a new mcRoute type that houses the data about a route that MC
actually uses. Then add a migration (channeldb/migration32) that
migrates the existing store from its current serialisation to the new,
more minimal serialisation.
2024-09-30 11:40:25 +02:00
Elle Mouton
96445f99b4
channeldb: boiler plate code for migration32
In preparation for the commit which will add the main logic for
migration 32 (which will migrate the MC store to use a more minimal
encoding), this commit just adds some of the code that the migration
will need to the package.
2024-09-30 11:40:25 +02:00
Elle Mouton
82ae0220c8
lnwire21: add custom records parsing
We add the new custom records encoding/decoding logic to the "frozen"
lnwire21 package. We can do this because nothing uses this logic yet. If
the custom records logic changes, the changes should _not_ be added to
the lnwire21 version.
2024-09-30 08:59:02 +02:00
Elle Mouton
33ab4b9db9
lnwire21: add CodeInvalidBlinding
To prevent the need to copy the entire onion_error.go file for a new
Mission Control migration, this commit just updates the existing
lnwire21/onion_error.go file with the new CodeInvalidBlinding code. The
lnwire21 should not really ever be updated but adding a new code should
be fine as it does not affect old migrations since this is a new code.
2024-09-30 08:58:15 +02:00
Olaoluwa Osuntokun
1acc8393bc
Merge pull request #9087 from ProofOfKeags/fn/list-filter
fn: add Filter to List
2024-09-28 12:47:04 +09:00