Commit Graph
100 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun d0d4782c3e Merge pull request #6826 from Roasbeef/bitcoind-taproot-after-19
chainreg: update tapoort node awareness to account for bitcoind 19+
2022-08-12 16:22:04 -07:00
Olaoluwa Osuntokun 6d0b354a8f Merge pull request #6664 from Crypt-iQ/fl_chanupdate_order
funding: defer sending channel_update until received funding_locked
2022-08-12 16:01:23 -07:00
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
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
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
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
Olaoluwa Osuntokun 492f8b6999 chainreg: shutdown if backend node doesn't support taproot
In this commit, we add a check during normal node construction to see if
the backend node supports Taproot. If it doesn't, then we want to
shutdown and force the user to take note.

To check if the node supports Taproot, we'll first try the normal
getblockchaininfo call. If this works, cool, then we can rely on the
value. If it doesn't, then we'll fall back to the getdeploymentinfo call
which was added in a recent version of bitcoind [1]. Newer versions of
bitcoind might also have this call, and the getblockchaininfo call, but
not actually populate the softforks field [2]. In this case, we'll fall
back, and we also account for the case when the getblockchaininfo RPC is
removed all together.

[1]: https://github.com/bitcoin/bitcoin/pull/23508
[2]: https://github.com/bitcoin/bitcoin/pull/25114

Fixes #6773
2022-08-05 17:23:31 -07:00
Olaoluwa Osuntokun 115b041874 Merge pull request #6469 from yyforyongyu/5388-migration
channeldb: add optional migration to prune revocation logs
2022-08-04 17:15:08 -07:00
Olaoluwa Osuntokun 4df0a22409 docs/release-notes: add release notes for 0.16 2022-08-02 17:02:59 -07:00
Olaoluwa Osuntokun 89dc75cd90 lntest/itest: add test case for conf ntfn w/ block
In this commit, we add a test case to exercise the fact that if we
request a confirmation notification with the raw block, then it includes
one. We add this to the existing test that uses the conf ntfn rpc call
for simplicity.
2022-08-01 19:59:33 -07:00
Olaoluwa Osuntokun cdb15e77d5 lnrpc/chainrpc: include the block in the conf ntfn if specified 2022-08-01 19:59:28 -07:00
Olaoluwa Osuntokun 08f1c2e93a chainntfns: add new option for conf notifications to send block
In this commit, we add a new option for the existing confirmation
notification system that optionally allows the caller to specify that a
block should be included as well.

The only quirk w/ the implementation here is the neutrino backend:
usually we get filtered blocks, we so need to first fetch the block
again so we can deliver the full block to the notifier. On the notifier
end, it'll only be checking for the transactions we care about, to
sending a full block doesn't affect the correctness.

We also extend the `testBatchConfirmationNotification` test to assert
that a block is only included if the caller specifies it.
2022-08-01 19:59:21 -07:00
Olaoluwa Osuntokun 046aa7fe4a docs/release-notes: add entry for 0.15.1 2022-07-26 17:23:21 -07:00
Olaoluwa Osuntokun 1e556aa189 multi: thread through the new max fee field for co-op close
In this commit, we parse the new max fee field, and pass it through the
switch, all the way to the peer where it's ultimately passed into the
chan closer state machine.
2022-07-26 17:23:16 -07:00
Olaoluwa Osuntokun c791b18cc0 lnrpc: add a new max_fee field to the CloseChannel RPC call
In this commit, we add a new max_fee field that we'll use to decide when
to bail out of a co-op close dance as the initiator.
2022-07-26 17:23:13 -07:00
Olaoluwa Osuntokun 9eb1e8721a lnwallet/chancloser: add tests for the new max fee behavior 2022-07-26 17:23:11 -07:00
Olaoluwa Osuntokun 106912b015 lnwallet/chancloser: remove raw state machine pointer, add channel interface
In this commit, we remove the raw channel state machine pointer from the
chan closer and instead replace that with an interface that captures
*just* the methods we need in order to do the co-op close dance.

This is a preparatory refactoring for some upcoming unit tests.
2022-07-26 17:23:08 -07:00
Olaoluwa Osuntokun 4a997bfdd2 lnwallet: add new AbsoluteThawHeight method
This lets callers get the thaw height without needing to first obtain a
snapshot of the channel state.
2022-07-26 17:23:05 -07:00
Olaoluwa Osuntokun c140da8f49 lnwallet/chancloser: remove the commit fee clamp, introduce max fee
In this commit, we stop clamping the ideal fee rate to the commitment
fee of the channel. This catches us up to this PR of the spec:
https://github.com/lightning/bolts/pull/847.

We also do away with the old 3x ideal fee "max fee", and replace that
with an explicit max fee. This new max fee will either be the default
multiplier of the ideal fee, or a new user specified max fee value.
2022-07-26 17:20:23 -07:00
Olaoluwa Osuntokun fec8fd9c63 Merge pull request #6754 from ellemouton/ensureRpcRegistrationOrder
multi: synchronous rpc middleware registration
2022-07-26 19:05:30 -05:00
Olaoluwa Osuntokun d9f4b36cb9 Merge pull request #6742 from Symphonic3/master
Fix typo in lncli abandonchannel description
2022-07-19 09:45:11 -07:00
Olaoluwa Osuntokun af47943f52 Merge pull request #6714 from guggero/remote-signer-fix
lnwallet: don't create BIP044 key scope by default
2022-07-13 17:17:56 -07:00
Olaoluwa Osuntokun 2a18263336 lntest: keep all failed payments by default for HarnessNode
In this commit, we fix a detected flake: we go to make a payment, and
then want to assert that 2 attempts we required. The existing logic
assumes that the success and the payment will still be on disk. With a
recent PR, we now delete failed payments by default, but after the fact,
in a non-atomic fashion.

We fix this issue simply by having all the nodes keep around failed
payments for the sake of all the old itests that assumed this
information would always be on disk.

Introduced in: https://github.com/lightningnetwork/lnd/pull/6438.

Fixes https://github.com/lightningnetwork/lnd/issues/6711.
2022-07-07 19:28:30 -07:00
Olaoluwa Osuntokun d9c79d874e Merge pull request #5955 from Crypt-iQ/zero-conf-alias-patch
multi: implement option_scid_alias, zero-conf w/ channel_type
2022-07-07 17:02:56 -07:00
Olaoluwa Osuntokun dc35f78ebc Merge pull request #6509 from Roasbeef/macaroons-rks
macaroons: futher abstract NewService from root key store impl
2022-07-06 19:00:49 -07:00
Olaoluwa Osuntokun e073b1d343 macaroons: futher abstract NewService from root key store impl
In this commit, we modify the `macaroons.NewService` consturctor to
accept the main interface rather than the raw DB. This allows us to use
other backends other than bolt or the kvdb interface to store the
macaroon root keys.

We also create a new ExtendedRootKeyStore interface that implements some
of the more advanced features we use such as macaroon encryption and
password rotation.
2022-07-06 18:59:50 -07:00
Olaoluwa Osuntokun 98ab9e3057 Merge pull request #6642 from Crypt-iQ/linkstopidx
htlcswitch: add linkStopIndex to cleanly shutdown ChannelLink
2022-06-30 17:01:07 -07:00
Olaoluwa Osuntokun 7b56b67f34 Merge pull request #6546 from carlaKC/bolts-950-warningmessage
lnwire/peer: add ability to read + log peer warning messages
2022-06-30 16:56:20 -07:00
Olaoluwa Osuntokun b96203a0eb Merge pull request #6655 from Crypt-iQ/disconnectpeerfix
server.go: replace call to removePeer with Disconnect in DisconnectPeer
2022-06-29 18:40:45 -07:00
Olaoluwa Osuntokun 3759b0f1ee Merge pull request #6577 from ziggie1984/hop-hints-opt-in-addholdinvoice
Hop hints opt in addholdinvoice
2022-06-28 15:38:48 -07:00
Olaoluwa Osuntokun f1717ea421 Merge pull request #6676 from guggero/fix-release-reproducibility
Fix release reproducibility
2022-06-28 15:08:01 -07:00
Olaoluwa Osuntokun 9988d392eb docs/release-notes: create release notes for 0.15.1
This commit also fixes the release notes of a recent PR that didn't
quite make it into 0.15: the entry should  now be in the 0.15.1 release
notes.
2022-06-24 15:47:35 -07:00
Olaoluwa Osuntokun a121f305b6 Merge pull request #6576 from ellemouton/paymentAddrBuildRouteFlag
lncli: add payment-addr flag to buildroute
2022-06-24 15:44:35 -07:00
Olaoluwa Osuntokun 5c36d96c9c build: bump version to v0.15.0-beta 2022-06-23 10:37:58 -07:00
Olaoluwa Osuntokun 39b522b878 build: bump version to v0.15.0-beta.rc6 2022-06-10 16:11:19 -05:00
Olaoluwa Osuntokun eb69f038f2 Merge pull request #6631 from Roasbeef/docker-container-update
build: update all Dockerfiles to build w/ Go 1.18.2
2022-06-10 14:02:17 -07:00
Olaoluwa Osuntokun 4d7ff6a73c Merge pull request #6632 from lightningnetwork/addr-type-taproot
walletkit+sweeper: add forgotten P2TR address type
2022-06-10 14:02:06 -07:00
Olaoluwa Osuntokun c0672b80c2 build: update all Dockerfiles to build w/ Go 1.18.2 2022-06-10 11:32:39 -07:00
Olaoluwa Osuntokun f66463bb05 build: bump version to v0.15.0-beta.rc5 2022-06-08 12:59:03 -07:00
Olaoluwa Osuntokun 69a2b32b1f Merge pull request #6627 from Roasbeef/btcwallet-btcd-neutrino-bump
build: bump btcd, btcwallet and neutrino to latest versions
2022-06-08 12:24:44 -07:00
Olaoluwa Osuntokun c69138e00d build: bump btcd, btcwallet and neutrino to latest versions 2022-06-08 11:40:50 -07:00
Olaoluwa Osuntokun 12eddae47a build: bump version to v0.15.0-beta.rc4 2022-06-02 14:47:18 -07:00
Olaoluwa Osuntokun 622c8402a0 Merge pull request #6611 from Roasbeef/psbt-validation-fix
lnrpc/walletrpc: reject PSBT packets w/o any UTXO input info
2022-06-02 14:44:59 -07:00
Olaoluwa Osuntokun a46ffe4299 Merge pull request #6612 from Roasbeef/tor-bump
build: bump tor version to v1.0.1
2022-06-02 14:44:38 -07:00
Olaoluwa Osuntokun 2298ef81ab lnrpc/walletrpc: reject PSBT packets w/o any UTXO input info
Fixes https://github.com/lightningnetwork/lnd/issues/6567
2022-06-02 13:05:58 -07:00
Olaoluwa Osuntokun 1017efe18b Merge pull request #6605 from Roasbeef/proper-sweep-lease-second-level-success
contractcourt: unify the lease specific HTLC sweeping logic
2022-06-02 13:03:10 -07:00
Olaoluwa Osuntokun 9b0718ae35 contractcourt: unify the lease specific HTLC sweeping logic
In this commit, we consolidate the _lease specific_ logic for the
success and timeout HTLC resolvers. We do this with the addition of a
new struct which is then composed via struct embedding with the two
existing structs. This fixes a flake in the integration tests by
ensuring the height is set up front, rather than eventually once the
height matches the lock time.
2022-06-01 16:42:33 -07:00
Olaoluwa Osuntokun 199f9d1139 Merge pull request #6600 from bhandras/invoiceregistry-deadlock
invoices: fix deadlock in the invoice registry
2022-06-01 14:59:55 -07:00
Olaoluwa Osuntokun fb119446c1 build: bump tor version to v1.0.1 2022-06-01 13:54:56 -07:00
Olaoluwa Osuntokun addbbc0e1a Merge pull request #6608 from Roasbeef/btcwallet-psbt-bip32-taproot-fix
build: upgrade to latest version of btcwallet
2022-06-01 13:49:50 -07:00
Olaoluwa Osuntokun 5d98635ab5 build: upgrade to latest version of btcwallet
This commit upgrades to the latest version of btcwallet that fixes an
issue that would cause us to not properly sign a validate populated PSBT
in certain scenarios.

Fixes https://github.com/lightningnetwork/lnd/issues/6579
2022-06-01 10:24:31 -07:00
Olaoluwa Osuntokun 5ba033bed8 Merge pull request #6594 from yyforyongyu/fix-data-race
channeldb: fix data race in TestSerializeRevocationLog
2022-05-31 16:07:51 -07:00
Olaoluwa Osuntokun 1e0d6ec0ad Merge pull request #6586 from Crypt-iQ/nil_htlcset
contractcourt: make empty htlcSets for closed channels
2022-05-28 19:59:25 -07:00
Olaoluwa Osuntokun 08e4e66574 build: bump version to v0.15.0-beta.rc3 2022-05-23 18:42:48 -07:00
Olaoluwa Osuntokun e98a739130 Merge pull request #6518 from Crypt-iQ/dupestone
htlcswitch: remove synchronous link handoff, special-case keystone err
2022-05-23 16:51:19 -07:00
Olaoluwa Osuntokun ab91f85d05 Merge pull request #6563 from yyforyongyu/export-chanstatus
multi: export channel status field in migration25
2022-05-23 11:26:53 -07:00
Olaoluwa Osuntokun 164a9c6f68 build: bump version to v0.15.0-beta.rc2 2022-05-20 00:08:28 -07:00
Olaoluwa Osuntokun 3e5b5d52f0 Merge pull request #6551 from yyforyongyu/fix-migration
channeldb: change balance fields to tlv records and migrate historical bucket
2022-05-19 16:35:31 -07:00
Olaoluwa Osuntokun b31640e6b0 build: bump version to v0.15.0-beta.rc1 2022-05-16 20:16:01 -07:00
Olaoluwa Osuntokun 2c4136da1b Merge pull request #6525 from Crypt-iQ/amp_preimage_fix
invoices: properly set Preimage field for success resolution
2022-05-13 15:15:03 -07:00
Olaoluwa Osuntokun 7106ea59db Merge pull request #6524 from guggero/aezeed-bump
aezeed+keychain: bump internal version of seed to 1
2022-05-12 16:35:49 -07:00
Olaoluwa Osuntokun 9f101f46ec Merge pull request #6528 from guggero/list-leased-outputs
btcwallet bump: add Taproot fields to FundPsbt, add pkScript and value to ListLeases
2022-05-12 16:24:00 -07:00
Olaoluwa Osuntokun 4949243d67 Merge pull request #6477 from Crypt-iQ/testmultihopflake
invoices: add client to map before delivering backlog notif
2022-05-11 16:45:36 -07:00
Olaoluwa Osuntokun 7e5b353498 Merge pull request #6415 from Crypt-iQ/inv_refactor
channeldb+invoices: refactor invoice logic when updating
2022-05-11 16:45:10 -07:00
Olaoluwa Osuntokun 630fc36dcf multi: introduce and use new TapTweak and SignMethod fields
In this commit, we add a new field `TapTweak` to be used for key path
spends. Before this commit, we'd overload the existing `WitnessScript`
field to pass this information to the signing context. This was
confusing as for tapscript spends, this was the leaf script, which
mirrors the other script based spending types.

With this new filed, users need to set this to the script root for
keypath spends where the output key commits to a real merkle root, and
nothing when bip 86 spending is being used.

To make the signing even more explicit, we also add a new field called
sign_method with an enum type that differentiates between the different
segwit v0 and v1 signing methods.

Fixes https://github.com/lightningnetwork/lnd/issues/6446.
2022-05-11 10:07:49 +02:00
Olaoluwa Osuntokun 5e4d349ea6 cmd/lncli: make hop hint inclusion opt-in for addinvoice
Fixes #6484.
2022-05-10 17:56:57 -07:00
Olaoluwa Osuntokun 8c3b9e7153 Merge pull request #6435 from ellemouton/ignoreUnknownAddressInNA
lnwire: ignore unknown addresses in NodeAnnouncement
2022-05-05 15:54:31 -07:00
Olaoluwa Osuntokun 0ec88b5346 Merge pull request #6347 from yyforyongyu/5388-rm-revc-log
lnwallet+channeldb: store minimal info in revocation log bucket
2022-05-05 15:52:59 -07:00
Olaoluwa Osuntokun dec389d54f build: update CI to build against bitcoind 23 2022-05-04 15:24:22 -07:00
Olaoluwa Osuntokun 12b82d0156 Merge pull request #5652 from ErikEk/neutrino-sub-server
Neutrino sub-server
2022-05-03 16:01:24 -07:00
Olaoluwa Osuntokun b5fed36465 Merge pull request #6468 from Roasbeef/neutrino-tor
build: update to version of neutrino w/ BIP 155 support
2022-05-03 15:50:44 -07:00
Olaoluwa Osuntokun 9ec26325b5 build: update to version of neutrino w/ BIP 155 support
Fixes #4973
2022-05-03 15:48:37 -07:00
Olaoluwa Osuntokun 54adc6996b Merge pull request #6322 from Crypt-iQ/handoff_deadlock_fix
contractcourt: deadlock fix via temporary unmerged map
2022-05-03 15:12:20 -07:00
Olaoluwa Osuntokun de6fcf15b6 Merge pull request #6419 from Crypt-iQ/shutdown_coop_restart
peer: allow restart during cooperative close
2022-04-28 17:59:06 -07:00
Olaoluwa Osuntokun 9572b49922 Merge pull request #6064 from dongcarl/2021-12-admin-cli-args
config: Add bitcoind.{config,rpccookie} configuration options
2022-04-21 16:52:45 -07:00