Commit Graph

12762 Commits

Author SHA1 Message Date
d0191cb5ed rpcserver: validate FinalCltvDelta and CltvLimit for REST
Missed this check in PR #5293.
2021-08-11 15:37:53 -04:00
07fa98fca5 Merge pull request #5614 from yyforyongyu/skip-release-note
trivial: skip release note for trivial fixes
2021-08-11 11:50:15 +02:00
dee9b9a9b1 Merge pull request #5603 from Crypt-iQ/peer_switch_refactor_08022021
htlcswitch+peer: introduce packetHandler, ChannelUpdateHandler interfaces for cleaner separation
2021-08-11 09:31:02 +02:00
a5e0ece64b Merge pull request #5616 from yyforyongyu/fix-context-timeout
itest: fix close channel context timeout
2021-08-11 09:19:17 +02:00
6d7fef7742 docs: update release note 2021-08-11 12:45:14 +08:00
8eddc50beb itest: remove context creations outside close channel assertion 2021-08-11 12:44:39 +08:00
2e4417454b itest: create context with timeout in closeChannelAndAssertType 2021-08-11 12:41:57 +08:00
be341bcd68 Merge pull request #5528 from guggero/keep-channel-backup-local-force-close
backups: Keep channel backup in case of local force close
2021-08-10 19:31:59 -07:00
b0e9442ba5 Merge pull request #4884 from yyforyongyu/3004-buffer-pool
lnwire: fix heap escapes to reduce gc pressure
2021-08-10 19:13:08 -07:00
e9fa44f49f Merge pull request #5613 from Roasbeef/release-notes-checklist
docs: add release notes to PR checklist and contributor guidelines
2021-08-10 15:58:44 -07:00
f33752da3b docs/release-notes: mention change to contribution guidelines 2021-08-10 15:56:26 -07:00
85e3dd3e45 docs: add release notes to PR checklist and contributor guidelines 2021-08-10 15:56:17 -07:00
db4a488e23 docs: update 0.14 release notes 2021-08-10 17:15:52 -04:00
23a4fad4ac htlcswitch+peer: CreateAndAddLink in switch, add messageSwitch to peer
This commit allows the peer to be tested without relying on a raw
htlcswitch.Switch pointer. This is accomplished by using a messageSwitch
interface and adding the CreateAndAddLink method to the
htlcswitch.Switch.
2021-08-10 17:15:52 -04:00
e72468646c htlcswitch+peer: embed ChannelUpdateHandler in ChannelLink
GetLink, GetLinksByInterface now use ChannelUpdateHandler.
2021-08-10 17:15:52 -04:00
051cd8793a htlcswitch: introduce and embed packetHandler interface in ChannelLink
This will allow separating the now-private *htlcPacket methods from
the publicly-used ChannelLink interface methods.
2021-08-10 17:15:51 -04:00
6c6e353597 htlcswitch+peer: pass BestHeight to ChannelLinkConfig
This allows non-test usages of ChannelLinkConfig to omit the raw
htlcswitch.Switch pointer.
2021-08-10 17:15:49 -04:00
b64f413718 trivial: skip release note for trivial fixes [skip ci] 2021-08-11 00:17:10 +08:00
23c3597d13 Merge pull request #5607 from bhandras/payments_test_flake_fix
itests: payments test flake fix
2021-08-10 09:15:56 +02:00
a0e958f96f docs: add release notes for lnwire gc 2021-08-10 05:54:45 +08:00
2cf6969dbc lnwire: refactor Encode to use specific writers - III
This commit refactors the remaining usage of WriteElements. By
replacing the interface types with concrete types for the params used in
the methods, most of the encoding of the messages now takes zero heap
allocations.
2021-08-10 05:36:09 +08:00
c1ad9cc60f lnwire: refactor Encode to use specific writers - II
This commit takes another 10 message types and refactors their Encode
method to use specific writers. The following commit will refactor the
rest.
2021-08-10 05:36:09 +08:00
563ff7266a lnwire: refactor Encode to use specific writers - I
This commit takes 10 types of messages and refactors their Encode method
to use specific writers. The following commits will refactor the rest.
2021-08-10 05:36:09 +08:00
f04410c546 lnwire: add independent writers
This commit breaks the method WriteElement and adds specific writers for
each of the data types.
2021-08-10 05:36:09 +08:00
e381b33b21 lnwire: fix typo in docs 2021-08-10 05:36:08 +08:00
aa1561c60d lnwire: use write buffer in Encode methods
This commit changes the WriteElement and WriteElements methods to take a
write buffer instead of io.Writer. The corresponding Encode methods are
changed to use the write buffer.
2021-08-10 05:36:08 +08:00
879d3cc86c wtwire: remove reference from lnwire 2021-08-10 05:36:08 +08:00
f212f1aa20 lnwire: refactor WriteMessage to use bytes.Buffer
This commit changes the method WriteMessage to use bytes.Buffer to save
heap allocations. A unit test is added to check the method is
implemented as expected.
2021-08-10 05:36:08 +08:00
77862e45af lnwire: add benchmark tests to ReadMessage and WriteMessage 2021-08-10 05:36:07 +08:00
4b12f40a48 lnwire: remove unused MaxMessagePayload const
MaxMessagePayload and MaxSliceLength are duplicate variables. This
commit deletes MaxMessagePayload and keeps MaxSliceLength.
2021-08-10 05:36:07 +08:00
527c6f06e2 docs: add release notes 2021-08-09 16:06:56 +02:00
f7943448b9 itest: fix channel open and close ntfn test
Because we now get one more update per channel when closing it, we need
to update our test that looks at the close notifications sent by the
SubscribeChannelEvent RPC.
2021-08-09 16:06:56 +02:00
bb4c754504 itest: test local force close restore scenario
We want to make sure we can recover funds from a channel that was force
closed by the local node just before the node needed to be restored. We
add a special test case with specific assertions for that scenario.
2021-08-09 13:55:37 +02:00
294fba0bc5 itest: fix channel backup subscription test
With one more notification event being dispatched in the local force
close case we need to update one of the integration tests to account for
the additional message.
2021-08-09 13:55:35 +02:00
06a693f10e lnrpc+rpcserver: add new fully resolved chan update event
This commit adds the new channel update event for a channel that is now
fully resolved to the event subscription RPC.
2021-08-09 13:55:34 +02:00
5917486dc9 channel_notifier: keep chan in SCB on local foce close
In case we force close a channel from our end the funds can be time
locked for up to 2 weeks worst case. If something happens to our node in
that time, we don't have any information on that channel anymore because
currently the channel is removed from the channel backup file the moment
the commitment transaction confirms.
Instead we want to keep the channel around in the SCB file until we've
actually swept the time locked funds.

It looks like lnd even supports recovering from such a case if the peer
is still online and can tell us what commit height to use for deriving
the commit point. If the peer isn't around anymore then external tools
could be used to brute force the commit height.
2021-08-09 13:55:33 +02:00
7e68cae8bd server+contractcourt: signal channel fully resolved
We might want to react to a channel being fully resolved after being
involved in a force close. For this we add a new callback and invoke it
where appropriate.
2021-08-09 13:55:31 +02:00
dcff9e5e26 channelnotifier: add event for fully resolved channel
We'll want to be informed about a channel that's been fully resolved on
chain in case it was involved in a force close. We add a new event type
and emit method for it.
2021-08-09 13:55:30 +02:00
fd10d8d903 Replacing deprecated import with recommended replacement
npm module grpc is deprecated as of April 2021. 
The recommended replacement is @grpc/grpc-js. 
The replacement is compatible with the use cases presented in JS examples and so switching examples to it requires only changes to the list of npm modules to install and the imports.

Source for deprecation: https://www.npmjs.com/package/grpc
Source for replacement and compatibility information: https://www.npmjs.com/package/@grpc/grpc-js
2021-08-07 11:07:48 +02:00
90db8de6fe Merge pull request #5460 from ErikEk/lncli-add-command-for-publishtransaction
lncli: add command for publishtransaction
2021-08-06 14:42:49 -07:00
ccd890b098 docs: update release notes 2021-08-06 17:37:40 +02:00
0f400b2b16 itests: payments test flake fix 2021-08-06 17:37:37 +02:00
254d9be6ff Merge pull request #5513 from bhandras/commit_queue_fix
etcd: fix dereferencing issue in commit queue causing contention and change design to be more scalable
2021-08-06 09:26:40 +02:00
e243be1ba2 docs: update 0.14.0 release notes 2021-08-06 07:53:14 +02:00
b29ae94e10 etcd: redesign commit queue to make it more robust and scalable
This commit builds on the ideas of @cfromknecht in lnd/5153. The
addition is that the design is now simpler and more robust by queueing
up everything, but allowing maximal parallelism where txns don't block.
Furthermore the commit makes CommitQueue.Done() private essentially
removing the need to understand the queue externally.
2021-08-06 07:53:13 +02:00
02aa77261d etcd: fix dereferncing issue in etcd.CommitQueue causing contention
This commit fixes an issue where subsequent transaction retries may have
changed the read/write sets inside the STM which in turn left junk
references to these keys in the CommitQueue. The left keys potentially
conflicted with subsequent transactions, queueing them up causing
througput degradation.
2021-08-06 07:53:10 +02:00
407ee84838 Merge pull request #5554 from Roasbeef/sendpayment-amp-reuse-fix
cmd/lncli: always parse the pay_addr field for sendpayment
2021-08-05 13:39:48 -07:00
31063c269e Merge pull request #5509 from guggero/itest-flake-hunt
itest: neutrino anchor output flake fix
2021-08-05 17:44:53 +02:00
ec587b7253 docs: add release notes 2021-08-05 16:11:48 +02:00
6421fd532c itest: fix anchor SCB sweep tests
Fixes another flake related to Neutrino and how it handles UTXOs.
2021-08-05 16:11:29 +02:00