Commit Graph
100 Commits
Author SHA1 Message Date
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
Olaoluwa Osuntokun 9c97d26cfb scripts: add gpg key for ellemouton [skip ci] (#6429) 2022-04-20 10:27:30 -07:00
Olaoluwa Osuntokun 3133154538 Merge pull request #6421 from yyforyongyu/tlv-compress
tlv: add new record type to encode `BigSize`
2022-04-19 10:12:05 -07:00
Olaoluwa Osuntokun 0b20dcc4f5 Merge pull request #6414 from ellemouton/keysendFeatureBit
multi: announce Keysend feature bit
2022-04-15 16:09:04 -07:00
Olaoluwa Osuntokun d397e3e680 Merge pull request #6340 from Roasbeef/go-1-18
build: update to Go 1.18
2022-04-13 15:02:26 -07:00
Olaoluwa Osuntokun 440f4d982c Merge pull request #5810 from bottlepay/payment-metadata
routing: send payment metadata
2022-04-13 15:01:56 -07:00
Olaoluwa Osuntokun cd8a87c0da Merge pull request #6219 from bottlepay/onchain-interceptor
contractcourt: onchain htlc interceptor
2022-04-13 14:58:29 -07:00
Olaoluwa Osuntokun c0d4308a23 Merge pull request #6389 from guggero/p2tr-addr-used
wallet: fix p2tr addresses not being marked as used
2022-04-13 10:32:51 -07:00
Olaoluwa Osuntokun 2fadc60ef2 docs/release-notes: add note entry for Go 1.18 2022-04-12 16:14:12 -07:00
Olaoluwa Osuntokun d6b2283279 docs/INSTALL.md: update min Go version to 1.18
In this commit, we update the min Go version to be version 1.18. This
breaks our prior rule of supporting the last two major versions, but
allows us to use the larger features in 1.18 sooner, such as the newly
released type parameters.
2022-04-12 16:14:07 -07:00
Olaoluwa Osuntokun a90dfff9a5 build: update to Go 1.18 2022-04-12 16:14:04 -07:00
Olaoluwa Osuntokun dabb74fa3c Merge pull request #6352 from bhandras/stuck-payment
routing: fail in-flight attempts cleanly on terminal payment failure
2022-04-12 12:52:22 -04:00
Olaoluwa Osuntokun 2fd900b172 Merge pull request #5587 from positiveblue/5466-update-node-announcement-data
lnrpc: Add UpdateNodeAnnouncement endpoint
2022-04-11 22:32:12 -04:00
Olaoluwa Osuntokun e6fd93eb38 Merge pull request #6385 from Roasbeef/tlv-all-day-err-day
lnrpc: remove legacy onion payload as an option for SendToRoute
2022-04-11 20:45:29 -04:00
Olaoluwa Osuntokun 060fcafc19 docs/release-notes: add entry for SendToRoute legacy payload deprecation 2022-04-11 20:30:08 -04:00
Olaoluwa Osuntokun 427a518b0a lnrpc: ignore legacy onion payload as an option for SendToRoute
In this commit, we start to ignore the option to allow the caller to use
the legacy onion payload. The new payload is much more flexible and
efficient, so there's really no reason to still use it, other than for
backwards compatibility tests. Our existing tests that exercise the
legacy feature uses a build tag, which forces nodes to not advertise the
new payload format, which then forces path finding to include the legacy
payload, so we can be confident that route is still being tested.

The existence of this option (which actually makes the TLV payload
opt-in for `SendToRoute` users) makes it harder to remove it from the
protocol all together. With this PR, we take a step forward to allowing
such a change which is being tracked on the spec level at:
https://github.com/lightning/bolts/pull/962.

In a future release, we'll move to remove the field all together.
Ignoring the field today doesn't seem to have any clear downsides, as
most payments always include the MPP payload (due to payment secrets),
so this shouldn't impact users in a significant way.
2022-04-11 20:29:57 -04:00
Olaoluwa Osuntokun 954d5cf896 Merge pull request #6403 from guggero/fix-linter
cmd/lncli: fix linter issues after contributor PR [skip ci]
2022-04-11 12:26:22 -04:00
Olaoluwa Osuntokun f8174630d8 build: update to latest btcutil/psbt version
Updates a version of `btcutil/psbt` that has looser parsing requirements
to properly match the BIP.

Fixes: https://github.com/lightningnetwork/lnd/issues/6372
2022-03-29 20:10:54 -05:00
Olaoluwa Osuntokun dceb10144f Merge pull request #6263 from guggero/schnorr-taproot-signet
Taproot: integrate btcec/v2 and btcwallet changes to support Taproot key spend paths in lnd's wallet
2022-03-25 16:07:56 -07:00
Olaoluwa Osuntokun bd5e29ec83 Merge pull request #6359 from guggero/fix-rest-proxy-fallback
lnd: disable REST proxy HTTP method fallback
2022-03-23 16:28:41 -07:00
Olaoluwa Osuntokun 3fce8e7501 Merge pull request #6358 from Crypt-iQ/amp_state_decoder
channeldb: change to ErrTypeForDecodingErr for amp state
2022-03-23 16:10:38 -07:00
Olaoluwa Osuntokun 42ca9b171e Merge pull request #6342 from bhandras/leader_election_ttl
cluster: configurable session TTL for the leader elector
2022-03-22 18:47:17 -07:00
Olaoluwa Osuntokun 3a040174aa Merge pull request #6274 from Roasbeef/anchor-utxos-unconf
lnrpc+sweep: properly remove any unconfirmed descendant chains a to-be-swept input is spent
2022-03-17 16:47:55 -07:00
Olaoluwa Osuntokun d16430792e docs/release-notes: add entry for 3rd party anchor sweep fix 2022-03-17 16:36:54 -07:00
Olaoluwa Osuntokun e5625878e9 lntest/itest: add new itest for 3rd party anchor spends
In this commit, we add a new integration tests to exercise the fix
introduced in the prior commit. In this test, we reconstruct a scenario
for a 3rd party to sweep an anchor spend after force closing, causing a
prior spend we had to be invalidated. Without the prior commit, this test
fails as the original anchor sweep is still found in the wallet.
2022-03-17 16:36:49 -07:00
Olaoluwa Osuntokun e1e9de24df sweep: remove all unconfirmed descendant transactions when a sweep conflicts
Before this commit, we we were trying to sweep an anchor output, and
that output was spent by someone else (not the sweeper), then we would
report this back to the original resolver (allowing it to be cleaned
up), and also remove the set of inputs spent by that transaction from
the set we need to sweep.

However, it's possible that if a user is spending unconfirmed outputs,
then the wallet is holding onto an invalid transaction, as the outputs
that were used as inputs have been double spent elsewhere.

In this commit, we fix this issue by recursively removing all descendant
transactions of our past sweeps that have an intersecting input set as
the spending transaction. In cases where a user spent an unconfirmed
output to funding a channel, and that output was a descendant of the now
swept anchor output, the funds will now properly be marked as available.

Fixes #6241
2022-03-17 16:36:47 -07:00
Olaoluwa Osuntokun 4ecd153be2 lnrpc: add new locked balance field for WalletBalance
In this commit, we add a new field to the WalletBalance call that
permits users to account for the set of outputs that may be locked due
to a pending transaction. Without this field any time users locked
outputs for things like PSBT signing, then they disappear from the
WalletBalance call, which may cause a panic.
2022-03-17 16:36:44 -07:00
Olaoluwa Osuntokun f13399bc49 Merge pull request #6190 from ErikEk/listunspent-deafult-values
walletrpc: add default values to listunspent
2022-03-16 16:16:45 -07:00
Olaoluwa Osuntokun 1eefa2863c Merge pull request #6325 from thinkmassive/daily-build-tag
github: daily builds use a unique tag
2022-03-10 16:04:30 -08:00
Olaoluwa Osuntokun 791411cdb8 Merge pull request #6237 from sangaman/lncli-state-desc
lncli: update `lncli state` description
2022-03-02 17:08:22 -08:00
Olaoluwa Osuntokun 8b18c6c69d Merge pull request #6220 from Crypt-iQ/batch_ticker_clamp
config: clamp channel-commit-interval to reasonable time
2022-03-02 17:07:35 -08:00
Olaoluwa Osuntokun a47da0a990 Merge pull request #6246 from Crypt-iQ/settle_pipeline_check
htlcswitch: only pipeline settle if add is locked-in
2022-03-02 17:07:14 -08:00
Olaoluwa Osuntokun 28389fe38c Merge pull request #6295 from Roasbeef/strfmt-update
build: update go-pretty v6
2022-03-01 15:03:04 -08:00
Olaoluwa Osuntokun 4a15de05aa build: update go-pretty v6 [skip ci]
In this commit we update go-pretty to use the latest v6 version of the
library. The existing version we used had a reported vulnerability.
Updating to this newest version also helped to shrink our set of
indirect dependencies.

In the future we can use
https://github.com/lightningnetwork/lnd/pull/5870 to detect/flag these
issues automatically.

Fixes #6293
2022-03-01 15:02:23 -08:00
Olaoluwa Osuntokun 4d9a05c2f4 Merge pull request #6221 from Crypt-iQ/link_handoff
multi: reliable hand-off from htlcswitch to contractcourt
2022-02-24 17:01:36 -08:00
Olaoluwa Osuntokun 10fba3d859 Merge pull request #6214 from yyforyongyu/server-start-order
server: start htlcswitch early in the pipeline
2022-02-24 15:32:46 -08:00
Olaoluwa Osuntokun 9a50cc95b7 Merge pull request #6224 from Roasbeef/prometheus-latency-histograms
monitoring+cfg: add new option to export gRPC perf metrics
2022-02-16 16:38:51 -08:00
Olaoluwa Osuntokun 1fd8a78537 docs/release-notes: add entry for gRPC perf flag 2022-02-16 16:20:38 -08:00
Olaoluwa Osuntokun 5084d2a4e5 Merge pull request #6236 from carlaKC/6225-hophintlimit
invoicesrpc: limit first pass of hop hint selection
2022-02-07 10:46:45 -08:00
Olaoluwa Osuntokun f6ba5be351 Merge pull request #6234 from Roasbeef/increase-legacy-api-fee-limit
lnwallet: increase legacy fee limit threshold to 1k sats
2022-02-03 12:17:20 -08:00
Olaoluwa Osuntokun 80e304573c lnwallet: increase legacy fee limit threshold to 1k sats
In this commit, we increase the legacy fee limit threshold (the amount
below which we'll allow 100% of funds to go to fees for the non-v2 RPC
calls) from 50 sats to 1k sats.
2022-02-03 11:54:01 -08:00
Olaoluwa Osuntokun 5891643269 Merge pull request #6226 from guggero/fee-limit-fix
Fix default value for fee limit
2022-02-02 12:53:11 -08:00
Olaoluwa Osuntokun 5a827dd19b Merge pull request #6177 from bottlepay/interceptor-failures
htlcswitch: add htlc interceptor failure control
2022-02-01 17:00:07 -08:00
Olaoluwa Osuntokun 10c5d6c0bd monitoring+cfg: add new option to export gRPC perf metrics
In this commit, we expose a new monitoring option to allow users to
export gRPC performance metrics. These metrics can be used to see how
long certain calls are taking, the total amount of time spent handling
calls, broken down by service and also call.

This option consumes additional memory and disk space for the Prometheus
server, which is why we're opting to make it an optional flag.
2022-02-01 15:55:26 -08:00
Olaoluwa Osuntokun a05b85686f docs/release-notes: add roasbeef to 0.14.2 notes [skip-ci] 2022-01-26 14:18:29 -08:00