Commit Graph

13399 Commits

Author SHA1 Message Date
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
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
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
Oliver Gugger
af97b8f877
Merge pull request #6722 from guggero/sign-schnorr-tweaked
signrpc: add Schnorr signatures to sign and verify message
2022-07-14 14:51:47 +02:00
Oliver Gugger
1e02d8910f
Merge pull request #6718 from hieblmi/chan-point-for-updatechanstatus
lncli: chan_point option for abandonchannel
2022-07-14 10:32:40 +02:00
ErikEk
98abaf266c
doc: release notes 2022-07-14 10:29:29 +02:00
ErikEk
14453ea7db
itest: cover sign and verify msg 2022-07-14 10:29:29 +02:00
ErikEk
b5af0ce327
signrpc: add schnorr sig to sign and validate msg 2022-07-14 10:29:29 +02:00
Oliver Gugger
9d568cc119
Merge pull request #6630 from guggero/rpc-middleware-replace-request
RPC middleware: allow replacing request messages and response errors too
2022-07-14 10:24:19 +02:00
Oliver Gugger
f649c6fd47
docs: update release notes 2022-07-14 09:36:50 +02:00
Oliver Gugger
9774db614b
itest: add integration test for error interception 2022-07-14 09:36:50 +02:00
Oliver Gugger
e1efb39177
itest: add integration test for request replacement 2022-07-14 09:36:50 +02:00
Oliver Gugger
b1d8767a0c
rpcperms: intercept errors too 2022-07-14 09:36:50 +02:00
Oliver Gugger
502542da60
lnrpc: add is_error to intercept message 2022-07-14 09:36:48 +02:00
Oliver Gugger
d604055ccc
lnrpc: describe request replacement in API docs
This commit updates the comments in the proto file to mention the new
behavior of also being able to replace request messages.
2022-07-14 09:36:36 +02:00
Oliver Gugger
86c64abfe6
rpcperms: allow requests to be replaced as well
With this commit we allow a replacement message to be sent by the
middleware for a request type as well as the response type. This allows
an incoming RPC request to be modified before it is forwarded to lnd.
2022-07-14 09:36:36 +02:00
Oliver Gugger
dc32ca61f8
rpcperms: add replaceProtoMsg
Because of the way the gRPC Receive() method is designed, we need a way
to replace a proto message with the content of another one without
replacing the original instance itself (e.g. overwrite all values in the
existing struct instance).
2022-07-14 09:36:36 +02:00
Oliver Gugger
66258ee7b5
lnrpc: enable RPC middleware in REST WebSockets
If we don't flag the /v1/middleware call as request streaming, it can't
be used properly with REST WebSockets because the proxy would close the
connection after the first request message.
2022-07-14 09:36:36 +02:00
Oliver Gugger
b0d85c41a5
docs: add release notes 2022-07-14 09:33:50 +02:00
Oliver Gugger
850330a34e
multi: fix linter issues
Fix some issues found by the new nonamedreturn rule and rename some
nolint comment to the new rule name.
2022-07-14 09:30:53 +02:00
Oliver Gugger
da75619245
golangci: disable new exhauststruct rule
A new linter rule was added in the latest version that wants all fields
in a struct to be declared, even if the default value is used. Because
that would mean a large diff for us, we disable the rule for now.
2022-07-14 09:29:34 +02:00
Oliver Gugger
7d7ab4da3a
tools: upgrade linter to latest version 2022-07-14 09:29:16 +02: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
Slyghtning
2f5192012e lncli: chan_point option for abandonchannel [skip ci] 2022-07-13 10:20:55 -04:00
Oliver Gugger
47822fada6
Merge pull request #6724 from ellemouton/ignorepair
lncli: add ignore_pair flag to queryroutes
2022-07-13 13:51:49 +02:00
Elle Mouton
ae6161d847
lncli: add ignore_pair flag to queryroutes 2022-07-13 10:00:50 +02:00
Oliver Gugger
d365babe25
docs: add release notes 2022-07-08 16:08:22 +02:00
Oliver Gugger
989648b7ec
itest: fix timeout in sign_psbt test 2022-07-08 16:08:21 +02:00
Oliver Gugger
9fd9234d86
lnwallet: don't create BIP044 key scope by default
With a change in #6379 we made sure that all default scopes are added to
the the wallet. Unfortunately this included the BIP044 key scope that
our wallet doesn't really use. This breaks the remote signing setup
because we don't export the account of the BIP044 scope and therefore
run into an issue on the watch-only side when attempting to create the
wallet.
2022-07-08 14:32:03 +02:00
Oliver Gugger
6980a18ab1
Merge pull request #6712 from Roasbeef/itest-keep-failed-payments
lntest: keep all failed payments by default for HarnessNode
2022-07-08 14:31:37 +02:00
Oliver Gugger
713c996d20
Merge pull request #6709 from ellemouton/guaranteeRPCInterceptorOrder
rpcperms: guarantee execution order of interceptors
2022-07-08 12:27:08 +02: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
eugene
a01017cffd
funding: revert earlier change for LDK compatibility
This removes the requirement that the zero-conf channel acceptor
flow use anchors. Also adds a fail-early check for minimum depth
zero in the non zero conf case. It would fail later, but it makes
more sense to fail immediately when receiving AcceptChannel.
2022-07-07 17:10:31 -04:00
eugene
a87ff413c4
release-notes: update for 0.15.0 2022-07-07 17:10:31 -04:00
eugene
91b26f8ce7
sample-lnd: showing how to enable scid-alias, zero-conf feature bits 2022-07-07 17:10:30 -04:00
eugene
5e0a2d3f92
itest: zero-conf, scid-alias channel-type integration tests 2022-07-07 17:10:30 -04:00
eugene
49dd4b9e34
multi: add zero-conf, scid-alias channel-types to rpc
This allows the open channel rpcs to use the zero-conf or scid-alias
channel types.
2022-07-07 17:10:30 -04:00
eugene
b9ef26061a
server+netann+peer: put peer's alias in Update, proper config for link
This commit modifies the netann subsystem to use the peer's alias
for ChannelUpdates where appropriate (i.e. in case we are sending
the alias to the peer). It also modifies the loadActiveChannels
function in the peer package to handle upgrading a channel when the
scid-alias feature bit is turned on.
2022-07-07 17:10:30 -04:00
eugene
778be5be58
chanbackup: handle Single creation for zero-conf channels
The SCB function NewSingle is now zero-conf aware. Since the confirmed
short channel id may be unknown, it may use the broadcast height.
2022-07-07 17:10:29 -04:00
eugene
3fc53c673b
contractcourt: set proper height hint for zero-conf channels
The contractcourt's chain watcher is now zero-conf aware and will use
an appropriate heightHint when scanning the chain.
2022-07-07 17:10:29 -04:00