Commit Graph
13450 Commits
Author SHA1 Message Date
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
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
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
bitromortac d27c622568 config: allow independent rpccookie config
The bitcoind .cookie contains an autogenerated user (__cookie__) and
password (random string), which can be used instead of the rpc user name
and password. This commit allows for running against bitcoind without
having to access bitcoin.conf like in the case for pure
user/password/zmq configuration.
2022-08-08 12:14:32 +02:00
Oliver Gugger 7e225f6aa5 Merge pull request #6806 from data-retriever/fixed-typo
Fixed typo
2022-08-08 08:58:08 +02:00
Data Retriever 9a368f0e8c trivial: typo fix [skip ci] 2022-08-07 20:29:19 +00: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
Oliver Gugger e86a69b815 Merge pull request #6748 from Kixunil/patch-3
doc: Deprecation reason of `settled` on `Invoice`
2022-08-02 12:38:08 +02:00
Martin Habovštiak b4647bc37f doc: Deprecation reason of settled on Invoice
This documents how to deal with `settled` being deprecated. It took me quite a bit of digging without such documentation.

[skip ci]
2022-08-02 11:04:01 +02: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
Oliver Gugger 87f4f03fca Merge pull request #6763 from theborakompanioni/patch-2
fix: go version in ARMv6 section of INSTALL.md
2022-07-25 19:22:38 +02:00
Thebora Kompanioni a4ae57f9e9 fix: go version in ARMv6 section of INSTALL.md 2022-07-23 17:55:06 +02:00
Oliver Gugger 2d093ac183 Merge pull request #6741 from morehouse/fix_sign_psbt
itest: fix sign_psbt failure
2022-07-22 15:27:12 +02:00
Elle Mouton 25acb51ba3 multi: registration complete MW interceptor msg
In this commit, we change the flow of the rpc middleware registration
a bit. In order to allow a client to add rpc middleware interceptors in
a deterministic order, we now make the server send a "registration
complete" message to the client after compeleting the registration
process so that the client knows when it can go ahead and register the
next client.
2022-07-20 14:58:47 -05:00
Matt Morehouse f3c0dd1d05 doc: update release notes 2022-07-20 10:15:40 -05:00
Matt Morehouse 7a05f07634 itest: fix sign_psbt failure
Ensure the wallet has synced the blockchain before attempting to spend
funds.

Prior to this fix, I get the following error:
  rpc error: code = Unknown desc = wallet couldn't fund PSBT: error
      creating funding TX: insufficient funds available to construct
      transaction
2022-07-19 12:41:34 -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
Oliver Gugger 0ac421907a Merge pull request #6739 from ellemouton/indexOutOfRange
rpcperms: re-init mw lookup map after removal of one
2022-07-19 16:59:45 +02:00
Symphonic3 40790e1f6a Fix typo in abandonchannel description
i_know_what_im_doing --> i_know_what_i_am_doing
2022-07-15 19:31:08 -06:00
Oliver Gugger f7b7442680 Merge pull request #6545 from yyforyongyu/5746-sendtoroute
routing: enable skipping failing payments upon temporary error
2022-07-15 14:34:56 +02:00
Elle Mouton cc2fbd18b1 rpcperms: re-init mw lookup map after removal of one
After removing a registered middlware from the slice, we need to update
the index lookup map with the updated index for each middleware.
2022-07-15 14:25:54 +02:00
yyforyongyu edf647222c docs: add release note for skip_temp_err 2022-07-15 19:03:38 +08:00
yyforyongyu 07e9adfd8c routerrpc+cmd: use skip_temp_err when sending to route 2022-07-15 19:03:12 +08:00
yyforyongyu 46ca28fe22 routerrpc: add new field skip_temp_err in SendToRouteRequest 2022-07-15 19:03:12 +08:00
yyforyongyu 39ac4ca92c routing: fix unit test for SendToRoute
This commit removes the old multi shards test for `SendToRoute` as the
method doesn't support sending MPP. The original test passed due to a
flawed mocking method, where the mockers bypassed the public interfaces
to maintain their internal state, which caused a non-exsiting situation
that a temp error wouldn't fail the payment. A new unit test is added to
demonstrate the actual case.
2022-07-15 19:03:12 +08:00
yyforyongyu d9915723dd routing: add unit test for SendToRouteSkipTempErr 2022-07-15 19:03:12 +08:00
yyforyongyu e99c63c804 routing: add SendToRouteSkipTempErr to skip temp error failure
This commit adds a new method `SendToRouteSkipTempErr` that skips
failing the payment unless a terminal error occurred. This is
accomplished by demoting the original `SendToRoute` to a private method
and creating two new methods on top of it to minimize code change.
2022-07-15 19:03:12 +08:00
Carsten Otto c6fffeb1c2 router: fix typos 2022-07-15 19:03:12 +08:00
Oliver Gugger e6b25309bd Merge pull request #6731 from guggero/linter-upgrade
tools: upgrade linter version to v1.46.2
2022-07-15 11:25:25 +02:00