Commit graph

13638 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
6b7abc3dbc
chainreg: update tapoort node awareness to account for bitcoind 19+
Bitcoind 23 will use the new `getdeploymentinfo` while versions after 19
(but below 23) will use the `UnifiedSoftForks` field instead of the
`SoftForks UnifiedSoftForks` field.

With this PR the taproot gating logic has been tested on bitcoind
versions: 21, 22, and 23. 21 is when the taproot logic was first added.
2022-08-12 15:35:32 -07:00
eugene
d51af48c3b
release-notes: update for 0.15.1 2022-08-12 17:49:27 -04:00
eugene
16067ca908
funding: defer sending channel_update until received funding_locked
This is required by BOLT#07 as otherwise the counter-party will
discard the channel_update as they may not consider the channel
"ready" or reorg-safe. Most other implementations besides eclair
have work-arounds for this, but it is nice to be spec-compliant.
2022-08-12 17:48:25 -04:00
Olaoluwa Osuntokun
dc453f2c39
Merge pull request #6820 from Roasbeef/btcsuite-updates
build: update to latest versions of btec, btcutil, and btcutil/psbt
2022-08-12 14:40:20 -07:00
Olaoluwa Osuntokun
822822bb75
build: update to latest versions of btec, btcutil, and btcutil/psbt
Fixes #6668
2022-08-12 14:40:00 -07:00
Olaoluwa Osuntokun
be5bc79444
Merge pull request #6716 from Crypt-iQ/zeroconfacceptor
multi: add zeroconfacceptor to default reject incoming channels
2022-08-12 14:20:11 -07:00
Olaoluwa Osuntokun
d0996a9df8
Merge pull request #6810 from Roasbeef/taproot-errwhere
multi: use taproot errwhere applicable for change/delivery/tower addresses
2022-08-12 14:18:35 -07:00
eugene
dd0615f488
release-notes: update for 0.15.1 2022-08-12 16:36:53 -04:00
eugene
48912560e2
lntest: update zero-conf tests to account for zeroconfacceptor 2022-08-12 16:36:17 -04:00
eugene
4ab80b012d
chanacceptor+lnrpc: update the commitmentTypes, send zero-conf to client
This updates the RPCAcceptor to send the correct commitment type
even if the zero-conf or scid-alias channel types are set. This also
adds two bools to the ChannelAcceptRequest struct that denotes whether
the funder set the zero-conf and scid-alias channel types.
2022-08-12 16:36:17 -04:00
eugene
c2a4a9adbc
multi: add zeroconfacceptor that default rejects if no rpc acceptors
This is a safety mechanism so that zero-conf channels are not accepted
by default if no rpc acceptor exists.
2022-08-12 16:30:42 -04:00
Daniel McNally
7a96b0afe1
Add release notes entry for #6457 2022-08-12 11:34:46 -04:00
Daniel McNally
f1ed9754c2
config_builder: specify root key during wallet init
This sets the macaroon root key during wallet initialization when one
is provided in the init wallet params.
2022-08-12 11:34:44 -04:00
Daniel McNally
4b14226e81
macaroons: add SetRootKey method
This adds a SetRootKey method which can be used to set the default
macaroon root key to a specified value.
2022-08-12 11:34:43 -04:00
Daniel McNally
86e5f9d0db
lnrpc: add macaroon_root_key to InitWalletRequest
This adds a field for specifying the macaroon root key to use during the
wallet initialization process instead of having lnd generate a random
macaroon root key itself.
2022-08-12 10:30:32 -04:00
Olaoluwa Osuntokun
67a6bb5ecf
build: bump version to v0.15.99
We forgot to do this after 0.15 was tagged, but usually we use a x.99
version to indicate that the commits in master are between releases.
This might also make it easier to help identify exactly which version a
user is running in issue reports.

[skip-ci]
2022-08-11 17:36:43 -07:00
Olaoluwa Osuntokun
91bc4b540c
docs/release-notes: add release notes entry 2022-08-11 17:26:28 -07:00
Olaoluwa Osuntokun
42549519ca
lnwallet/chanfunding: assumes all change outputs are P2TR 2022-08-11 17:26:23 -07:00
Olaoluwa Osuntokun
322937a67e
lnwallet: use P2TR addresses for change outputs for funding coin select 2022-08-11 17:26:21 -07:00
Olaoluwa Osuntokun
bcff2f07de
rpc: use P2TR addresses when sending funds back to wallet (anchor reserve) 2022-08-11 17:26:18 -07:00
Olaoluwa Osuntokun
b711120dca
sweep: change outputs are now P2TR 2022-08-11 17:26:16 -07:00
Olaoluwa Osuntokun
dc16f5df53
watchtower: uses P2TR for sweep, delivery, and reward addresses
In this commit, we modify the watch tower to use P2TR addrs for just
about anything sweep related.

One eye sore in this diff are the changes to
`backup_task_internal_test.go`. All the values are hard coded, and now
either differ by a value of 48, or needed to be modified to account for
the new assumptions propagated to rewards values and fees.
2022-08-11 17:26:13 -07:00
Olaoluwa Osuntokun
cd313eba24
contractcourt: the breach arb now uses P2TR outputs for sweep addrs 2022-08-11 17:26:10 -07:00
Olaoluwa Osuntokun
2cc75db6f8
server: default sweep addrs to P2TR
This change covers sweep addresses for: the breach arbitrator, and watch
tower clients.
2022-08-11 17:26:07 -07:00
Olaoluwa Osuntokun
a1cd7734d8
Merge pull request #6633 from Roasbeef/segwit-any-shutdown
multi: send P2TR addrs by default for co-op close, add new `option_any_segwit` feature bit
2022-08-11 17:05:31 -07:00
Olaoluwa Osuntokun
cd7c705db2
docs/release-notes: add release notes entry 2022-08-10 18:44:43 -07:00
Olaoluwa Osuntokun
3bf2790e21
lntest/itest: add new itest to cover taproot co-op close 2022-08-10 18:44:39 -07:00
Olaoluwa Osuntokun
89529fbb4f
feature+lncfg: add config option to turn of anysegwit 2022-08-10 18:44:37 -07:00
Olaoluwa Osuntokun
fffad49ad1
peer: send taproot addrs during co-op close based on new feature bit
If the ShutdownAnySegwitOptional option is active, then we can safely
send these newer addresses.
2022-08-10 18:44:35 -07:00
Olaoluwa Osuntokun
99d37f254e
funding: send taproot addrs as upfront shutdown if ShutdownAnySegwitOptional is active 2022-08-10 18:44:33 -07:00
Olaoluwa Osuntokun
a61b6c25b3
lnwallet/chanclose: update ProcessCloseMsg to check co-op close addrs
We only want to allow p2wkh, p2tr, and p2wsh addresses, so we'll utilize
the newly public wallet function to restrict this.
2022-08-10 18:44:31 -07:00
Olaoluwa Osuntokun
c79ffc07ce
lnwallet: export ValidateUpfrontShutdown and restrict allowed addrs
In this commit, we catch up our logic with the latest version of the
spec that removed support for normal p2kh and p2sh addresses for co-op
closes, in order to make dust calculations more uniform.
2022-08-10 18:44:29 -07:00
Olaoluwa Osuntokun
5f9c1b902f
lnwire+feature: add awareness of option_shutdown_anysegwit
In this commit, we add awareness of the option_shutdown_anysegwit that
permits both sides to send newer segwit based addresses. This'll
eventually enable us to send taproot addresses for co-op close.
2022-08-10 18:44:26 -07:00
Olaoluwa Osuntokun
559160e95c
Merge pull request #6734 from Crypt-iQ/alias_listchannels
rpc: add alias info to some rpcs
2022-08-10 18:38:18 -07:00
Olaoluwa Osuntokun
3263dbf96a
Merge pull request #6816 from Crypt-iQ/zero-conf-doc
docs: add zero-conf channels doc
2022-08-10 18:37:51 -07:00
eugene
6c915484ba
docs: add documentation for zero-conf channels
This short doc goes into how to open zero-conf channels as either
the funder or fundee.
2022-08-10 14:25:11 -04:00
eugene
5bd6498029
funding: remove TODO 2022-08-10 14:25:09 -04:00
Oliver Gugger
17014b592e
Merge pull request #6730 from Roasbeef/notifier-optional-block
chainntfns: add new option for conf notifications to send block
2022-08-10 13:52:49 +02:00
eugene
610e94b36f
release-notes: update for 0.15.1 2022-08-09 14:11:09 -04:00
eugene
aa576adecc
rpc+cli: add general ListAliases function to dump all aliases 2022-08-09 14:11:08 -04:00
eugene
48f270fe20
rpc: add zero-conf, alias information to {list,closed}channels 2022-08-09 14:09:41 -04:00
Olaoluwa Osuntokun
012c0d96f5
Merge pull request #6740 from Crypt-iQ/walletsweep
sweep: account for all script types in craftSweepTx
2022-08-08 18:15:15 -07:00
Olaoluwa Osuntokun
e4b5aa94a3
Merge pull request #6770 from Roasbeef/co-op-close-with-more-spec-innit
lnwallet/chancloser: remove the commit fee clamp, introduce max fee
2022-08-08 18:14:22 -07:00
Olaoluwa Osuntokun
ec7be963f9
Merge pull request #6798 from Roasbeef/backend-must-taproot
chainreg: shutdown if backend node doesn't support taproot
2022-08-08 15:27:43 -07:00
Olaoluwa Osuntokun
b270bde935
Merge pull request #6809 from positiveblue/remove-feature-dependency
Remove `ScidAliasOptional` feature dependency on `ExplicitChannelTypeOptional`
2022-08-08 15:27:12 -07:00
eugene
3ca81e5441
release-notes: update for 0.15.1 2022-08-08 15:33:02 -04:00
eugene
6ec2826f6c
sweep: account for all script types in craftSweepTx
With this change, transactions created via craftSweepTx will be
standard. Previously, p2wsh/p2pkh scripts passed in via SendCoins would
be weighted as p2wpkh scripts. With a feerate of 1 sat/vbyte,
transactions returned would be non-standard. Luckily, the critical
sweeper subsystem only used p2wpkh scripts so this only affected
callers from the rpcserver.

Also added is an integration test that fails if SendCoins manages
to generate a non-standard transaction. All script types are now
accounted for in getWeightEstimate, which now errors if an unknown
script type is passed in.
2022-08-08 15:33:00 -04:00
positiveblue
b8bf884bcd
docs: Add release notes for feature bit fix (#6809) 2022-08-08 10:45:31 -07:00
positiveblue
aee52294c7
feature: remove ScidAliasOptional dependency on ExplicitChannelTypeOptional
The [spec](https://github.com/lightning/bolts/blob/master/09-features.md)
does not specify a dependency between `ScidAliasOptional` (47) and
`ExplicitChannelTypeOptional` (45).

This bug lead to some connectivity issues with peers not setting the
45 feature bit while setting the 47.

The issue [6802](https://github.com/lightningnetwork/lnd/issues/6802) is
an example of this.
2022-08-08 10:11:06 -07:00
Oliver Gugger
6060e05d7c
Merge pull request #6736 from bitromortac/2207-independent-cookie
config: allow independent rpccookie config
2022-08-08 13:33:49 +02:00