Commit Graph
100 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun 2f04ce7c6e Merge pull request #8334 from lightningnetwork/tlv-record-enchancements
tlv: various enhancements to the new RecordT type
2024-01-05 13:57:55 -08:00
Olaoluwa Osuntokun cedbdd8999 Merge pull request #8142 from carlaKC/8137-validateblindedpayload
routing: Add Validation for Decoding Blinded Paths
2024-01-03 12:33:11 -08:00
Olaoluwa Osuntokun ffd330ac43 Merge pull request #8095 from carlaKC/7882-mcblinding
missioncontrol: add invalid onion blinding handling for blinded paths
2024-01-03 12:29:43 -08:00
Olaoluwa Osuntokun 85046997c9 tlv: add utility funcs/methods to make tlv.OptionalRecord easier to use
We add a WhenSome that'll pass in the actual underlying value, and not
just the record.

We also add `SomeRecord` to make it easier to create TLV records w/
`Some` set.
2024-01-02 18:51:41 -08:00
Olaoluwa Osuntokun aec2f9bf08 tlv: add TlvType method to RecordT
This will be useful when decoding optional TLV records, as we can use
this to look up in the `typeMap` for a given field to see if we decoded
it or not.
2024-01-02 18:51:35 -08:00
Olaoluwa Osuntokun 09afc92215 tlv: make TlvType method for TlvType interface public
With this change, callers can now examine a struct instance of the
`TlvType` instance to figure out programmatically which integer type is
maps to. This'll be useful when decoding optional TLV types into a wire
struct (knowing when to set it to Some vs None).
2024-01-02 18:51:33 -08:00
Olaoluwa Osuntokun 66cf4396a2 tlv: modify RecordT type to ensure type param takes precedence
In this commit, we modify the RecordT type to allow callers to re-use
the Record definition of a different type, but use the new type param to
override the integer type used on the wire.

This will let use do things like encode a signature using the same
RecordProducer instance, but with a diff type in another context.

The upcoming use for this is allowing our `lnwire.Sig` type to be
encoded in the same message using distinct TLV integer types (new co-op
close protocol).
2024-01-02 18:51:30 -08:00
Olaoluwa Osuntokun 7f8b185f40 Merge pull request #8307 from ziggie1984/channel-reestablishment-logging
lnwallet: fix logging.
2024-01-02 12:28:01 -08:00
Olaoluwa Osuntokun ac9ca024a4 Merge pull request #8121 from Roasbeef/tlv-record-type-param
tlv: add new RecordT[T] utility type
2023-12-12 17:47:59 -08:00
Olaoluwa Osuntokun 63e86b72c5 tlv: add new RecordT[T, V] utility type
In this commit, we add a new type, `RecordT[T, V]` to reduce some of the
common boiler plate for TLV types. This type lets you take either a
primitive type, or an existing Record, and gain common methods used to
create tlv streams.

It also serves as extra type annotation as well, since wire structs can
use this to wrap any existing type and gain the relevant record methods.

This implementation ensures that the very definition of the field also
binds the TLV type value. It does this by using the generated code to
map a struct like TlvType1 to an actually Type like Type(1).
2023-12-12 17:47:10 -08:00
Olaoluwa Osuntokun c304c2a8bb tlv: run go generate for new set of TLV types
This shouldn't need to be run again, as this implementation restricts
things to just values 0-99, due to a hard upper limit with the way Go
unions work under the hood.
2023-12-12 17:47:04 -08:00
Olaoluwa Osuntokun 78d5806555 tlv/internal: add new internal package for generating TLV type structs
In this commit, we add some new code generation to the codebase. As
we'll see in a future commit, this'll allow us to create a new Record[T,
V] type, where T is actually a concrete _struct_ that implements a
special interface that deems it as a valid TLV type.
2023-12-12 17:47:01 -08:00
Olaoluwa Osuntokun 2fee3f6efa Merge pull request #8030 from ellemouton/queryChanUpdateTimestamps
multi: query chan update timestamps
2023-12-11 11:18:08 -08:00
Olaoluwa Osuntokun c32edbd732 Merge pull request #8266 from Roasbeef/fn-v1
build: bump to fn/v1.0.0
2023-12-08 14:28:40 -08:00
Olaoluwa Osuntokun d50dd8e2d7 build: bump to fn/v1.0.0 2023-12-08 14:08:17 -08:00
Olaoluwa Osuntokun 445bd27e59 Merge pull request #8259 from Roasbeef/fn-module
fn: create new sub-module
2023-12-08 13:52:26 -08:00
Olaoluwa Osuntokun b0114efad3 fn: create new sub-module
In this commit, we make a new sub-module from the `fn` package. This
lets other projects use it w/o pulling in all of lnd, and also other
sub-packages within lnd.

We also add a temp replace directive for new module.  We'll remove this
once we tag the final version.
2023-12-06 17:00:10 -08:00
Olaoluwa Osuntokun f87e370efd Merge pull request #8232 from yyforyongyu/optimize-mempool
gomod: update `btcwallet` version
2023-11-30 14:47:14 -08:00
Olaoluwa Osuntokun d9b88fba67 Merge pull request #8198 from morehouse/brontide_startup_race_test
peer: test for startup writeHander data race
2023-11-17 16:01:16 -08:00
Olaoluwa Osuntokun 64753b01d1 Merge pull request #8186 from Crypt-iQ/issue_8184_2
peer: send reestablish, shutdown messages before starting writeHandler
2023-11-16 12:58:12 -08:00
Olaoluwa Osuntokun e02fd39ce6 Merge pull request #8170 from yyforyongyu/0-18-staging-missed
Add missing commits from `0-18-staging`
2023-11-13 10:38:23 -08:00
Olaoluwa Osuntokun 9937b1d6de Merge branch 'dyncomms' 2023-11-10 13:30:28 -08:00
Olaoluwa Osuntokun 6de3fea8e6 Merge pull request #8158 from Crypt-iQ/writeMessage_fix
peer: send messages in Start via writeMessage to bypass writeHandler
2023-11-08 14:54:54 -08:00
Olaoluwa Osuntokun dacb86fdbc Merge pull request #8106 from orbitalturtle/sign-tagged-hash-rpc
lnrpc: add tagged hash option to signer.SignMessage/VerifyMessage rpcs
2023-11-06 17:05:35 -08:00
Olaoluwa Osuntokun e6fbaafda4 Merge pull request #8139 from yyforyongyu/upgrade-bitcoind
CI: upgrade bitcoind version to 0.25
2023-11-01 11:15:12 -07:00
Olaoluwa Osuntokun eb5fc0c349 Merge pull request #7811 from yyforyongyu/fix-panix
contractcourt: stop lnd when received witness is empty
2023-10-31 15:17:30 -07:00
Olaoluwa Osuntokun b0261f7793 Merge pull request #8132 from Roasbeef/strict-macaroon-version
macaroons: reject unknown macaroon versions
2023-10-31 15:16:55 -07:00
Olaoluwa Osuntokun 9287b755d8 macaroons: reject unknown macaroon versions
We've only ever made macaroons with the v2 versions, so we should
explicitly reject those that aren't actually v2. We add a basic test
along the way, and also add a similar check for the version encoded in
the macaroon ID.
2023-10-31 13:23:50 -07:00
Olaoluwa Osuntokun c382268201 Merge pull request #8104 from Roasbeef/taproot-chans-nonce-double-init
multi: skip InitRemoteMusigNonces if we've already called it
2023-10-31 13:02:54 -07:00
Olaoluwa Osuntokun 7f652ee729 Merge pull request #8135 from yyforyongyu/fix-flakes
multi: fix test flakes in unit tests and itests
2023-10-31 12:58:25 -07:00
Olaoluwa Osuntokun 8c121ee5e0 docs/release-notes: add entry for nonce init fix 2023-10-31 10:10:49 -07:00
Olaoluwa Osuntokun 32c8b82c36 Merge pull request #7669 from morehouse/fuzz_lnwire_onion_errors
lnwire: fuzz onion failure messages
2023-10-30 12:44:55 -07:00
Olaoluwa Osuntokun 78ff68ad05 Merge pull request #8119 from lightningnetwork/udpate-docs
docs: Add requirement for bitcoind.
2023-10-30 12:34:57 -07:00
Olaoluwa Osuntokun 99617f7afe Merge pull request #8123 from R3DRUN3/master
add release build and go report status badges
2023-10-30 10:51:10 -07:00
Olaoluwa Osuntokun 19880ffe2c Merge pull request #8101 from yyforyongyu/fix-web-fee-unit-test
chainfee: Fix test flake in `TestWebAPIFeeEstimator`
2023-10-30 10:50:16 -07:00
Olaoluwa Osuntokun 99481e3e84 Merge pull request #8127 from lightningnetwork/dependabot/go_modules/github.com/docker/docker-24.0.7incompatible
build(deps): bump github.com/docker/docker from 20.10.24+incompatible to 24.0.7+incompatible
2023-10-30 10:41:27 -07:00
Olaoluwa Osuntokun a1fa195493 Merge pull request #8091 from yyforyongyu/remove-rbf-sweeper
sweep: remove possible RBF when sweeping new inputs
2023-10-25 15:14:32 -07:00
Olaoluwa Osuntokun 63a94ad987 build: build+install using GOEXPERIMENT=loopvar
We also update the release script to do the same as well.
2023-10-24 18:40:58 -07:00
Olaoluwa Osuntokun 206ad69b75 discovery: fix incorrect test, masked by loop scoping bug
When we first go to boot up the syncer, when we're in the active phase,
after we do the historical sync, we'll send a timestamp message that we
want everything, then transition to the passive mode. The test didn't
account for this extra message before, as the last test was being
re-used here (ran in parallel).

We fix this by asserting that the first expected message is sent, then
also the follow up messages as well.
2023-10-24 18:40:53 -07:00
Olaoluwa Osuntokun b1eaeb6ac6 build: prep for Go 1.22 by using GOEXPERIMENT=loopvar for tests
In this commit, [we prep for some upcoming changes in
Go](https://go.dev/blog/loopvar-preview) by running our tests with
`GOEXPERIMENT=loopvar`. This changes the loop semantics to fix a common
bug where a scoping issue causes a variable to be re-used, which can
cause unintended bugs down the line.

If everything passes with this flag on, then we can keep it on, and also
rest a bit easier knowing that the compiler will fix a class of bugs
that would previously pop up for us.
2023-10-24 18:40:49 -07:00
Olaoluwa Osuntokun 9bdbd79bd2 Merge pull request #8094 from yyforyongyu/fix-rescan-race
gomod: update btcwallet re rescan race fix
2023-10-18 12:25:41 -07:00
Olaoluwa Osuntokun 4f346060df Merge pull request #8067 from lightningnetwork/0-18-staging-rebased
branch: merge 0.18 staging branch into master
2023-10-09 11:20:11 -07:00
Olaoluwa Osuntokun 92fe545b0a Merge pull request #8053 from kilrau/fix/lncli-desc
lncli: fix description of connect/disconnect peer
2023-10-05 13:27:46 -07:00
Olaoluwa Osuntokun 13e1fd3f09 Merge pull request #8056 from guggero/release-template-link-fix
GitHub: fix link in release template
2023-10-04 11:13:49 -07:00
Olaoluwa Osuntokun 2fb150c8fe build: bump version to v0.17.0 2023-10-03 10:20:31 -07:00
Olaoluwa Osuntokun caa9bf9222 Merge pull request #8043 from Roasbeef/0-17-rc6
build: bump version to v0.17.0 rc6
2023-09-28 13:45:52 -05:00
Olaoluwa Osuntokun 4e6bb71c0f build: bump version to v0.17.0 rc6 2023-09-28 12:00:41 -05:00
Olaoluwa Osuntokun bb7a257359 Merge pull request #8037 from yyforyongyu/fix-weight-calc
lnwallet+rpcserver: fix weight calculation for taproot channels
2023-09-28 11:21:29 -05:00
Olaoluwa Osuntokun edeb0d7db5 Merge pull request #8041 from Roasbeef/background-peer-prune
peer: launch persistent peer pruning in background goroutine
2023-09-28 11:18:10 -05:00
Olaoluwa Osuntokun eae9dd07f0 peer: launch persistent peer pruning in background goroutine
This PR is a follow up, to a [follow
up](https://github.com/lightningnetwork/lnd/pull/7938) of an [initial
concurrency issue](https://github.com/lightningnetwork/lnd/pull/7856)
fixed in the peer goroutine.

In #7938, we noticed that the introduction of `p.startReady` can cause
`Disconnect` to block. This happens as `Disconnect` cannot be called
until `p.startReady` has been closed. `Disconnect` is also called from
`InboundPeerConnected` (the case of concurrent peers, so we need to
remove one of the connections) while the main server mutex is held. If
`p.Start` blocks for any reason, then this leads to the deadlock as: we
can't disconnect until we've finished starting, and we can't finish
starting as we need the disconnect caller to exit as it has the mutex.

In this commit, we now make the call to `prunePersistentPeerConnection`
async. The call to `prunePersistentPeerConnection` eventually wants to
grab the server mutex, which triggers the circular waiting scenario
above.

The main learning here is that no calls to the main server mutex path
can block from `p.Start`. This is more or less a stop gap to resolve the
issue initially introduced in v0.16.4. Assuming we want to move forward
with this fix, we should reexamine `p.startReady` all together, and also
revisit attempt to refactor this section of the code to eliminate the
mega mutex in the server in favor of a dedicated event loop.
2023-09-27 21:24:50 -05:00
Olaoluwa Osuntokun 1ebfe95772 Merge pull request #8035 from Roasbeef/0-17-rc5
build: bump version to v0.17.0 rc5
2023-09-26 18:21:07 -05:00
Olaoluwa Osuntokun f63a2b9507 build: bump version to v0.17.0 rc5 2023-09-26 16:11:45 -05:00
Olaoluwa Osuntokun 01a05fdea7 Merge pull request #8031 from guggero/chan-acceptor-taproot-chan
chanacceptor+lnrpc: add simple taproot channel support
2023-09-26 16:08:19 -05:00
Olaoluwa Osuntokun abe888f719 contractcourt: modify the incoming contest resolver to use concurrent queue
In this commit, we modify the incoming contest resolver to use a
concurrent queue. This is meant to ensure that the invoice registry
subscription loop never blocks. This change is meant to be minimal and
implements option `5` as outlined here:
https://github.com/lightningnetwork/lnd/issues/8023.

With this change, the inner loop of the subscription dispatch method in
the invoice registry will no longer block, as the concurrent queue uses
a fixed buffer of a queue, then overflows into another queue when that
gets full.

Fixes https://github.com/lightningnetwork/lnd/issues/7917
2023-09-25 18:48:30 -05:00
Olaoluwa Osuntokun ec585431a9 Merge pull request #8004 from Roasbeef/0-17-rc4
build: bump version to v0.17.0 rc4
2023-09-18 18:44:29 -07:00
Olaoluwa Osuntokun 8948dfa113 build: bump version to v0.17.0 rc4 2023-09-18 13:58:41 -07:00
Olaoluwa Osuntokun 9f4a8836db Merge pull request #7981 from ellemouton/handleRogueUpdates
watchtower: handle rogue updates
2023-09-18 13:56:52 -07:00
Olaoluwa Osuntokun 12be6a37a7 Merge branch 'master' into handleRogueUpdates 2023-09-18 13:55:41 -07:00
Olaoluwa Osuntokun 7412482406 Merge pull request #7994 from Roasbeef/remote-signer-musig2-nonces
multi: add ability to specify local nonces for musig2 signer rpc, add itest for remote signer taproot chans
2023-09-18 13:54:14 -07:00
Olaoluwa Osuntokun 2359481226 Merge pull request #7983 from Roasbeef/blocking-and-mutex-profile
lnd+config: add ability to obtain blocking and mutex profiles
2023-09-18 11:45:40 -07:00
Olaoluwa Osuntokun 23a153abae lnd+config: add ability to obtain blocking and mutex profiles
In this commit, we add the ability to obtain blocking and mutex
profiles. The blocking profile will show which goroutines are
consistently blocked on synchronization primitives like channels, or
I/O. The mutex profile will show which mutexes are very contested.

The blocking profile can be enabled with a new arg: `--blockingprofile`.
The mutex profile can be enabled with a new arg: `--mutexprofile`. These
are both ignored if the profile port isn't set.

Activating these profiles requires the caller to pass in a sampling
rate. For now I've set it just to `1` to test things out. Unfortunately
documentation is rather scarce, so there aren't any good guides re what
these values should be set to. AFAICT, these add more overhead than the
other prowling options, so they shouldn't necessarily be enabled
persistently in production.
2023-09-18 11:44:49 -07:00
Olaoluwa Osuntokun 6c3a55d89c itest: add remote signer test case for taproot chans
This ensures that taproot chans can be used with the remote signer
configuration.
2023-09-18 11:42:20 -07:00
Olaoluwa Osuntokun 8405590152 lnrpc/signrpc+lnwallet/rpcwallet: expose local nonces over RPC
In this commit, we update the set of protos to accept the local secret
nonces over RPC. This is actually a 97 byte value, as it includes the
two 32 byte nonces, as well as the 33 byte value of the public key of
the signer.

This is needed in order to be able to open taproot channels over the RPC
interface.
2023-09-18 11:42:15 -07:00
Olaoluwa Osuntokun ce93b236aa input+lnwallet: modify musig2 interfaces use explicit optional local nonces
In this commit, we modify the musig2 interfaces to instead use an
explicit value for the local nonces. Before this commit, we used the
functional option, but we want to also support specifying this value
over RPC for the remote signer. The functional option pattern is opaque,
so we can't get the nonce value we need. To get around this, we'll just
make this an explicit pointer, then map this to the functional option at
the very last moment.
2023-09-18 11:42:13 -07:00
Olaoluwa Osuntokun 327b0c92bd Merge pull request #7991 from Roasbeef/ws-bufio-max-msg
lnrpc: increase max message size for ws proxy
2023-09-18 11:33:02 -07:00
Olaoluwa Osuntokun 247c1d8dc8 lnrpc: increase max message size for ws proxy
In this commit, we increase the max message size for the ws proxy. We
have a similar setting for the normal gRPC server which was tuned to be
able to support decoding `GetNetworkInfo` as the channel graph got
larger. We keep the default buffer size of 64 KB, but allow that to be
expanded to up to 4 MB (current value) to decode larger messages.

One alternative would be to modify the `Split` function to break up
larger lines into smaller ones. We'd need to double check that the
libraries at a higher level of abstraction can handle the chunks. The
scan function would look something like:
```go
splitFunc := func(data []byte, eof bool) (int, []byte, error) {
        if len(data) >= chunkSize {
                return chunkSize, data[:chunkSize], nil
        }

        return bufio.ScanLines(data, eof))
}
scanner.Split(splitFunc)
```
2023-09-18 11:32:34 -07:00
Olaoluwa Osuntokun 2d5c0c9b4e Merge pull request #7985 from Roasbeef/graceful-data-loss-fc
lnwallet+contractcourt: gracefully handle auto force close post data …
2023-09-15 18:30:53 -07:00
Olaoluwa Osuntokun de54a603b7 lnwallet+contractcourt: gracefully handle auto force close post data loss
In this commit, update the start up logic to gracefully handle a
seemingly rare case. In this case, a peer detects local data loss with a
set of active HTLCs. These HTLCs then eventually expire (they may or may
not actually "exist"), causing a force close decision. Before this PR,
this attempt would fail with a fatal error that can impede start up.

To better handle such a scenario, we'll now catch the error when we fail
to force close due to entering the DLP and instead terminate the state
machine at the broadcast state. When a commitment transaction eventually
confirms, we'll play it as normal.

Fixes https://github.com/lightningnetwork/lnd/issues/7984
2023-09-15 18:29:09 -07:00
Olaoluwa Osuntokun 90effda090 Merge pull request #7977 from Roasbeef/lnd-17-rc3
build: bump version to v0.17.0 rc3
2023-09-12 16:27:45 -07:00
Olaoluwa Osuntokun 1628240960 build: bump version to v0.17.0 rc3 2023-09-12 15:13:40 -07:00
Olaoluwa Osuntokun 8c53620021 Merge pull request #7966 from yyforyongyu/add-force-sweep-outgoing
contractcourt: make sure we force sweep outgoing htlcs
2023-09-12 10:12:49 -07:00
Olaoluwa Osuntokun c77192a64d Merge pull request #7960 from Roasbeef/update-kv-db
build: update to kvdb v1.4.3
2023-09-12 10:07:32 -07:00
Olaoluwa Osuntokun 0c815af7ff build: update lnd sub modules, and btcd + btcutil 2023-09-11 20:35:06 -07:00
Olaoluwa Osuntokun bb67131ce5 kvdb/sqlbase: use positive+negative build tags for new sql error parsing
In this commit, we use exhaustive build tags to ensure that we can
always build the `sqlbase` package, independent of the set build tags.
To do this, we move the type declarations _into_ the parsing functions.
This then allows us to create two versions for each db: with the db, and
without it.

To avoid a module tag round trip to get this working, we use a local
replace for now. Once this is merged in, we can do the tag (along side
rc3), then remove the replace.
2023-09-11 20:35:01 -07:00
Olaoluwa Osuntokun 30eb90d901 build: update to kvdb v1.4.3
We needed a tag after updating the module with retry for
sqlite/postgres.
2023-09-11 20:34:58 -07:00
Olaoluwa Osuntokun fd58cbfe6b Merge pull request #7954 from yyforyongyu/fix-chainfee-unit-test
multi: fix unit test flakes
2023-09-05 15:46:56 -07:00
Olaoluwa Osuntokun 84b2f2d0f8 Merge pull request #7955 from yyforyongyu/fix-rand-retry-delay
kvdb/sqlbase: fix params used in `randRetryDelay`
2023-09-05 15:44:49 -07:00
Olaoluwa Osuntokun 13568fd5b0 build: bump version to v0.17.0-rc2 (#7942) 2023-08-30 20:14:25 -07:00
Olaoluwa Osuntokunandziggie 01c64712a3 multi: ensure link is always torn down due to db failures, add exponential back off for sql-kvdb failures (#7927)
* lnwallet: fix log output msg

The log message is off by one.

* htlcswitch: fail channel when revoking it fails.

When the revocation of a channel state fails after receiving a new
CommitmentSigned msg we have to fail the channel otherwise we
continue with an unclean state.

* docs: update release-docs

* htlcswitch: tear down connection if revocation processing fails

If we couldn't revoke due to a DB error, then we want to also tear down
the connection, as we don't want the other party to continue to send
updates. That may lead to de-sync'd state an eventual force close.
Otherwise, the database might be able to recover come the next
reconnection attempt.

* kvdb: use sql.LevelSerializable for all backends

In this commit, we modify the default isolation level to be
`sql.LevelSerializable. This is the strictness isolation type for
postgres. For sqlite, there's only ever a single writer, so this doesn't
apply directly.

* kvdb/sqlbase: add randomized exponential backoff for serialization failures

In this commit, we add randomized exponential backoff for serialization
failures. For postgres, we''ll his this any time a transaction set fails
to be linearized. For sqlite, we'll his this if we have many writers
trying to grab the write lock at time same time, manifesting as a
`SQLITE_BUSY` error code.

As is, we'll retry up to 10 times, waiting a minimum of 50 miliseconds
between each attempt, up to 5 seconds without any delay at all. For
sqlite, this is also bounded by the busy timeout set, which applies on
top of this retry logic (block for busy timeout seconds, then apply this
back off logic).

* docs/release-notes: add entry for sqlite/postgres tx retry

---------

Co-authored-by: ziggie <ziggie1984@protonmail.com>
2023-08-30 16:48:00 -07:00
Olaoluwa Osuntokun eb0d8af645 peer: eliminate circular waiting by calling maybeSendNodeAnn async (#7938)
In this commit, we attempt to fix circular waiting scenario introduced
inadvertently when [fixing a race condition
scenario](https://github.com/lightningnetwork/lnd/pull/7856). With that
PR, we added a new channel that would block `Disconnect`, and
`WaitForDisconnect` to ensure that only until the `Start` method has
finished would those calls be allowed to succeed.

The issue is that if the server is trying to disconnect a peer due to a
concurrent connection, but `Start` is blocked on `maybeSendNodeAnn`,
which then wants to grab the main server mutex, then `Start` can never
exit, which causes `startReady` to never be closed, which then causes
the server to be blocked.

This PR attempts to fix the issue by calling `maybeSendNodeAnn` in a
goroutine, so it can grab the server mutex and not block the `Start`
method.

Fixes https://github.com/lightningnetwork/lnd/issues/7924

Fixes https://github.com/lightningnetwork/lnd/issues/7928

Fixes https://github.com/lightningnetwork/lnd/issues/7866
2023-08-30 15:47:45 -07:00
Olaoluwa Osuntokun dde1495e1d build: bump Go version to v1.21.0, lnd version to v0.17.0 rc1 (#7914)
* build: update Go version to 1.21.0

* build: bump version to v0.17.0 rc1
2023-08-23 17:33:11 -07:00
Olaoluwa Osuntokun 251bcad899 Merge pull request #7877 from ellemouton/bumpOnion
multi: update lightning-onion version
2023-08-23 12:22:15 -07:00
Olaoluwa Osuntokun e2f5374f67 Merge pull request #7904 from lightningnetwork/simple-taproot-chans-staging
multi: merge simple taproot channels staging branch into master
2023-08-22 19:24:31 -07:00
Olaoluwa Osuntokun a87631c957 itest: add case for taproot chans to htlc timeout resolver itests 2023-08-22 17:43:51 -07:00
Olaoluwa Osuntokun 92da6b1d44 multi: fix linter warnings with updated linter 2023-08-22 16:34:47 -07:00
Olaoluwa Osuntokun 7506383074 itest: update zero conf multi-hop tests to remove extra blocks mined
In the master branch, the blocks are mined earlier, so we don't need to
mine an extra set.
2023-08-22 16:34:42 -07:00
Olaoluwa Osuntokun 562163ea3d docs/release-notes: add release notes for taproot chans 2023-08-22 16:34:39 -07:00
Olaoluwa Osuntokun 3f8d33d7ab funding: add SIMPLE_TAPROOT case to TestCommitmentTypeFundmaxSanityCheck 2023-08-22 16:34:36 -07:00
Olaoluwa Osuntokun 5f1e0bf772 multi: add new SCB version for the taproot chan type 2023-08-22 16:34:34 -07:00
Olaoluwa Osuntokun 94f45b2b82 itest: use explicit chan type negotiation for taproot chan cases
The prior commit removed implicit negotiation, so we'll need to make
sure to use the explicit chan type feature vector when we go to
negotiate.
2023-08-22 16:34:31 -07:00
Olaoluwa Osuntokun 384b1b1c12 feature: use +100 staging bit for taproot channels
In this commit, we carry out a new notion introduced during a recent
spec meeting to use a feature bit plus 100 before the feature has been
finalized in the spec.

We split into the Final and Staging bits.
2023-08-22 16:34:28 -07:00
Olaoluwa Osuntokun fcbf6f2483 lnwallet: add taproot case to TestForceClose
This adds some extra assertions to ensure things like the taproot
commitment weight estimation is correct.
2023-08-22 16:34:25 -07:00
Olaoluwa Osuntokun ff055ce0a4 lnwallet: uniformly use sighash default everywhere for taproot chans
We use a helper function to ensure that anytime we're about to make a
normal sighash, we consult the channel type to check if we should use
the default value or sighash all explicitly.
2023-08-22 16:34:23 -07:00
Olaoluwa Osuntokun dd05dd55d4 funding: add explicit chan type support for zeroconf+scid+taproot
We also remove the old implicit negotiation as well, as we'll be
updating tests to use explciit when required.
2023-08-22 16:34:20 -07:00
Olaoluwa Osuntokun 4b65c71213 lnwallet: for musig2 coop close fee estimation
Co-op close for musig2 chans needs to use the proper witness size.
2023-08-22 16:34:17 -07:00
Olaoluwa Osuntokun a2b277cf1d multi: fix linter errors 2023-08-22 16:34:15 -07:00
Olaoluwa Osuntokun d3e4bca772 itest: add taproot support to revocation itests 2023-08-22 16:34:12 -07:00
Olaoluwa Osuntokun 7c5be4d056 itest: add taproot support for all variants of runMultiHopHtlcClaimTest 2023-08-22 16:34:06 -07:00
Olaoluwa Osuntokun 5739061f13 lnwallet: add first+second level taptweaks to htlc retribution
The first and second level taptweaks need to be stored in order to
ensure the breach arb can play revocations at both the first and second
level.
2023-08-22 16:34:04 -07:00
Olaoluwa Osuntokun 28c086f1fc htlcswitch: remove call to InitRemoteMusigNonces
In this commit, we remove the internal call to `InitRemoteMusigNonces`.
We don't need this since when we go to process the remote party's chan
reest message, we'll already call this method. Otherwise, we'll get an
error here since the pending verification nonce has been wiped out after
each call.
2023-08-22 16:34:02 -07:00