Commit graph

13766 commits

Author SHA1 Message Date
Slyghtning
2189bb4ba6 docs: update release notes 2022-10-20 09:23:50 -04:00
Slyghtning
85f0ec2954 itest: check peer alias in ForwardingHistory 2022-10-20 09:23:50 -04:00
Slyghtning
3e4c98c938 rpcserver: enrich ForwardingHistory with peer alias
In this commit a helper method in ForwardingHistory is introduced that enriches
each ForwardingEvent by peer alias names for the incoming and outgoing channel.
2022-10-20 09:23:47 -04:00
Slyghtning
2db62c18a1 lncli: add flag skip_peer_alias_lookup to fwdinghistory
A new flag skip_peer_alias_lookup is introduced that communicates to the
server if the peer alias lookup per forwarding event should be skipped
in order to improve performance.
2022-10-18 11:08:03 -04:00
Slyghtning
425ce55968 lnrpc: peer_alias_in and peer_alias_out fields for ForwardingEvent 2022-10-18 11:08:00 -04:00
Oliver Gugger
4fbd608b73
Merge pull request #7050 from positiveblue/build-info
[skip ci] build: fix makefile targets using `RELEASE_LDFLAGS`
2022-10-18 13:36:19 +02:00
positiveblue
85d88cd004
[skip ci] build: fix makefile targets using RELEASE_LDFLAGS
I forgot the `-ldflags` before setting the ldflags for the `install`
target.
2022-10-18 02:06:15 -07:00
Olaoluwa Osuntokun
c65abf8b05
Merge pull request #6759 from yyforyongyu/1-new-itest
itest: start a scaffolding testing framework
2022-10-17 20:06:48 -07:00
Olaoluwa Osuntokun
609cc8b883
lnd: add SECURITY.MD to bolster security entry in README 2022-10-17 12:05:15 -07:00
Oliver Gugger
db42e63ab7
Merge pull request #7046 from C-Otto/watchtower-docu-fixes
watchtower: docu fixes
2022-10-17 18:05:26 +02:00
Oliver Gugger
f68d047a26
Merge pull request #6963 from positiveblue/build-info
build: get binary build info from `debug/buildinfo`
2022-10-17 10:04:33 +02:00
positiveblue
a92d7ad6d3
docs: update release notes for v0.16.0-beta 2022-10-17 00:55:16 -07:00
positiveblue
5924964a9b
build: get binary build info from debug/buildinfo
Since `go1.18` the runtime has a package that provides information about module
versions, version control information, and build flags embedded in executable
files built by the go command.

The new packages allows us to get information needed by the `version` command
without having to rely on `ldflags` set at build time.

This can be really helpful while debugging errors from people using custom
binaries. For example a build from master.
2022-10-17 00:52:37 -07:00
Carsten Otto
378478eb1a multi: fix typos and grammar issues in comments [skip ci] 2022-10-17 09:40:22 +02:00
Carsten Otto
2a56f602db wtclient: fix documentation [skip ci]
the implementation also returns exhausted sessions
2022-10-17 09:40:22 +02:00
Oliver Gugger
27fdd0a5b0
Merge pull request #7048 from benthecarman/fix-comment
lnrpc: fix description of tx_index to be correct
2022-10-17 09:33:52 +02:00
benthecarman
4607dff2c3
lnrpc: fix description of tx_index to be correct[skip ci] 2022-10-16 19:59:40 -05:00
yyforyongyu
ff0b953fa2
docs: add release note for the new itest 2022-10-14 15:45:25 +08:00
yyforyongyu
b312ae24aa
lntemp: add README 2022-10-14 15:45:25 +08:00
yyforyongyu
353b744039
lntemp+itest: create interface WebFeeService
This commit adds a new interface, `WebFeeService`, so external projects
can create their own mocked fee services.
2022-10-14 15:45:25 +08:00
yyforyongyu
9d79e76876
itest: timeout while waiting for predicate result
This commit sends the returned value of pred() inside a goroutine such
that when a predicate function never returns during the first run, the
wait package can timeout properly.
2022-10-14 15:45:24 +08:00
yyforyongyu
2ab842c645
itest: refactor test testUpdateChanStatus 2022-10-14 15:45:24 +08:00
yyforyongyu
cc69634a2e
lntemp: add more methods to support testUpdateChanStatus 2022-10-14 15:45:24 +08:00
yyforyongyu
1350f76627
itest: add a new test entry point to run the temp tests
This commit adds a new function, `TestLightningNetworkDaemonTemp`, to
run the new tests.
2022-10-14 15:45:24 +08:00
yyforyongyu
645257a55f
lntemp: complete HarnessNode with setup functions
This commit adds more methods in `HarnessNode` and a `SetupHarness` helper
to easily setup a new itest.
2022-10-14 15:45:24 +08:00
yyforyongyu
a3fa4ba10a
lntemp: re-introduce HarnessTest as a test manager
This commit adds a new component, `HarnessTest`, as a test manager, which
is responsible for managing the state change in the itest. It is built
on top of `HarnessNode` and will be handling assertions so that a test
can be created without unnecessary attention to node's unwanted
failures. This commit also adds a minimal set of assertions.
2022-10-14 15:45:24 +08:00
yyforyongyu
89d275169a
lntemp: add nodeManager to manage running nodes
This commit adds a new struct, `nodeManager`, to manage running nodes.
It keeps track of the running nodes, and manages the start and stop of
the nodes with the context of `HarnessTest`.
2022-10-14 15:45:23 +08:00
yyforyongyu
ea1336ae2a
lntemp: add HarnessMiner to manage miner related functions 2022-10-14 15:45:23 +08:00
yyforyongyu
00b143eac8
lntemp: add utils and fee service
This commit adds several helper functions and a fee service. Note that
the fee service is identical to what's inside `lntest`. Once the
migration is done, the old file will be removed.
2022-10-14 15:45:23 +08:00
yyforyongyu
d32539ab86
lntemp: add HarnessNode to manage lnd's process
This commit adds a new struct, `HarnessNode`, to manage the lnd process
used in our itest. This struct is built upon `HarnessRPC`, `State`, and
`NodeWatcher`.
2022-10-14 15:45:23 +08:00
yyforyongyu
cd5ab844e2
lntest: export flag logoutput
This commit temporarily exports the flag `logoutput` so it can be used
by `lntemp`.
2022-10-14 07:25:29 +08:00
yyforyongyu
cf0e0820d6
lntemp: introduce SyncMap to store type information
This commit replaces the usage of `sync.Map` with the new struct
`SyncMap` to explicitly express the type info used in the map.
2022-10-14 07:25:29 +08:00
yyforyongyu
30ebacb888
lntemp/node: add node topology watcher
This commit adds a new struct, `nodeWatcher`, to keep track of all graph
topology updates of a given node, including updates from channel edges,
policies, and peers.
2022-10-14 07:25:29 +08:00
yyforyongyu
f8dcebb637
lntemp/node: introduce node state
This commit adds a new package `lntemp/node` and inside it a new struct
`State` is added to track the internal node state. This enables us using
the same running nodes accross tests without wrong uncleaned states.
2022-10-14 07:25:29 +08:00
yyforyongyu
d5abecbba9
lntemp/rpc: add new package lntemp/rpc to manage rpc clients
This commit starts the construction of the new package `lntemp`. This
package serves as the scaffolding while we migrate our old itest into
the new one. Once the migration is finished, the package will be put
back to `lntest`.
2022-10-14 07:25:29 +08:00
yyforyongyu
55f8a621ae
lntest+github: add flag temptest to run tests separately
This commit adds a new flag `temptest` so we can run new and old tests
separately. This flag will be removed once the migration from old tests
to new tests is finished.
2022-10-14 07:25:28 +08:00
Oliver Gugger
2e410dd248
Merge pull request #7029 from MStreet3/bug/blockcache-test-data-race
blockcache: fix datarace in blockcache_test
2022-10-13 20:10:07 +02:00
Michael Street
a51e1ae931
docs: add release notes 2022-10-13 10:33:09 -04:00
Michael Street
46444d9154
blockcache: fix datarace in blockcache_test
mockChainBackend simulates a chain backend and
tracks the number of calls via a private property
called chainCallCount.  This commit uses a write
mutex instead of read mutex in the call to GetBlock,
adds a getter method to access chainCallCount
with a read mutex and uses a write mutex in
resetChainCallCount.
2022-10-13 10:32:27 -04:00
Oliver Gugger
d2d3cf3408
Merge pull request #6956 from ellemouton/configureChanReserve
multi: configurable remote chan reserve
2022-10-13 15:39:40 +02:00
Oliver Gugger
d55f861107
Merge pull request #6928 from ellemouton/wtclientMemPerf
multi: remove AckedUpdates & CommittedUpdates from ClientSession struct
2022-10-13 15:34:35 +02:00
Oliver Gugger
c2d89bd9f5
Merge pull request #7032 from guggero/autopilot-test-fix
autopilot: fix loop variables, use require
2022-10-13 15:31:31 +02:00
Elle Mouton
e6eed56827
docs: update release notes for #6928 2022-10-13 14:42:51 +02:00
Elle Mouton
75e5339217
watchtower: remove CommittedUpdates from ClientSession
In this commit, the new ListClientSession functional options and new
FetchSessionCommittedUpdates function are utilised in order to allow us
to completely remove the CommittedUpdates member from the ClientSession
struct.
2022-10-13 14:41:26 +02:00
Oliver Gugger
fcdb2b545f
docs: add release notes 2022-10-13 14:40:43 +02:00
Oliver Gugger
8d6befd797
autopilot: fix loop variables, use require
With this commit we fix a few occurrences of loop variables being
accessed in closures.
While we touch the code, we also migrate it to using the require
library.
2022-10-13 14:40:43 +02:00
Elle Mouton
fe3d9174ea
watchtower: add FetchSessionCommittedUpdates func to DB
In this commit, a new tower client db function is added that can be used
to fetch all the committed updates for a given session ID. This is done
in preparation for an upcoming commit where the CommittedUpdates will be
removed from the ClientSession struct.
2022-10-13 14:39:23 +02:00
Elle Mouton
15858cae1c
watchtower+lnrpc: remove AckedUpdates from ClientSession struct
In this commit, we start making use of the new ListClientSession
functional options added in the previous commit. We use the functional
options in order to calculate the max commit heights per channel on the
construction of the tower client. We also use the options to count the
total number of acked and committed updates. With this commit, we are
also able to completely remove the AckedUpdates member of the
ClientSession since it is no longer used anywhere in the code.
2022-10-13 14:36:33 +02:00
Elle Mouton
40e0ebf417
watchtower: add ListClientSessions functional options
This commit adds functional options to the ListClientSessions call that
can be used to perform a variety of extra operations during the DB
query. These functional options are not yet used in this commit.
2022-10-13 14:35:34 +02:00
Elle Mouton
3ac3b6a90d
watchtower: refactor getClientSession helper funcs
Small refactor to some of the tower client db helper functions in order
to simplify upcoming commits.
2022-10-13 14:35:03 +02:00