55 Commits
Author SHA1 Message Date
Andras Banki-Horvath e8825f2098 build: add temporary kvdb mod replace 2025-04-01 12:40:32 +02:00
Elle Mouton 9d0cd3ff4f multi: update more loggers to the v2 type 2024-10-22 17:03:56 +02:00
Elle Mouton 58317e66d3 lnrpc/Dockerfile: update falafel version
Update the falafel version.
2024-08-05 15:59:50 +02:00
Oliver Gugger 648fb22f63 multi: wrap all errors 2024-04-11 15:04:03 +02:00
Oliver Gugger 4140d2a9d7 lnrpc: re-generate protos after dependency update 2024-03-14 09:32:29 +01:00
Elle Mouton 1c7a7543c7 lnrpc: add session ID to tower session info
This will be used in the itest added in an upcoming commit so that we can
test the TerminateSession command.
2024-02-20 14:44:39 +02:00
Elle Mouton 5d16491c13 lnrpc+lncli: add TerminateSession command 2024-02-20 14:44:38 +02:00
Elle Mouton 26432359ad lnrpc+lncli: add DeactivateTower to rpc 2024-02-20 14:44:11 +02:00
Elle Mouton 3cb194c45e lnrpc+lncli: update wtclientrpc for taproot towers 2024-01-19 15:33:06 +02:00
Elle Mouton e800aacff4 wtclient+server: unexport and rename TowerClient
Rename and unexport the `TowerClient` struct to `client` and rename the
`TowerClientManager` interface to `ClientManager`.
2023-11-28 11:01:51 +02:00
Elle Mouton fcfdf699e3 multi: move BackupState and RegisterChannel to Manager
This commit moves over the last two methods, `RegisterChannel` and
`BackupState` from the `Client` to the `Manager` interface. With this
change, we no longer need to pass around the individual clients around
and now only need to pass the manager around.

To do this change, all the goroutines that handle channel closes,
closable sessions needed to be moved to the Manager and so a large part
of this commit is just moving this code from the TowerClient to the
Manager.
2023-11-28 10:59:40 +02:00
Elle Mouton ab2f781b4a wtclient+lnrpc: move Policy to Manager 2023-11-28 09:54:03 +02:00
Elle Mouton 4e51bf3a3f wtclient+lnrpc: move LookupTower to Manager 2023-11-28 09:54:02 +02:00
Elle Mouton 0b3d751e33 wtclient+lnrpc: move RegisteredTowers to Manager
Move the `RegisteredTowers` method from the `Client` to the `Manager`
interface.
2023-11-28 09:54:02 +02:00
Elle Mouton 4348f2062a wtclient+lnrpc: move Stats to Manager
Move the `Stats` method from the `Client` to the `Manager` interface.
2023-11-28 09:54:02 +02:00
Elle Mouton f38b5cf258 lnrpc+wtclient: refactor ClientStats
This commit removes the mutex from ClientStats and instead puts that in
clientStats which wraps ClientStats with a mutex. This is so that the
tower client interface can return a ClientStats struct without worrying
about copying a mutex.
2023-11-28 09:54:02 +02:00
Elle Mouton a5e7d35af2 wtclient+lnrpc: move RemoveTower to Manager
Simiarly to the previous commit, this commit moves the RemoveTower
method from the Client to the TowerClientManager interface. The manager
handles any DB related handling. The manager will first attempt to
remove the tower from the in-memory state of each client and then will
attempt to remove the tower from the DB. If the removal from the DB
fails, the manager will re-add the tower to the in-memory state of each
client.
2023-11-28 09:54:02 +02:00
Elle Mouton a44bf381c4 multi: move AddTower to Tower Client Manager
In this commit we move the AddTower method from the Client interface to
the TowerClientManager interface. The wtclientrpc is updated to call the
`AddTower` method of the Manager instead of calling the `AddTower`
method of each individual client. The TowerClient now is also only
concerned with adding a new tower (or new tower address) to its
in-memory state; the tower Manager will handle adding the tower to the
DB.
2023-11-28 09:54:02 +02:00
Keagan McClelland 4eca04e6a0 lnrpc: add wtclientrpc doc tags to enable lncli api doc generation 2023-11-20 14:43:59 -07:00
yyforyongyu 0532b82dd5 multi: add new method FeePerVByte to avoid manual conversion 2023-10-13 17:00:53 +08:00
Elle Mouton 273b934f62 wtdb+lnrpc: return correct NumAckedUpdates from wtclientrpc 2023-09-14 10:33:04 +02:00
positiveblue 49e099f0a0 lnrpc: run make rpc
The docker image have been updated so we are using another protobuf
version to generate the files. The generate files include the version of
the compiler used to creating them, so we need this commit to pass the
`rpc-check` step in our CI.
2023-09-05 10:11:51 -07:00
Oliver Gugger ea8fe6f3f3 mod+lnrpc: bump google.golang.org/protobuf to v1.30.0 2023-05-11 22:52:00 +02:00
Elle Mouton 13c656defe lnrpc: use new ExcludeExhaustedSessions option 2023-03-20 20:14:01 +02:00
Elle Mouton e6494889b0 wtclientrpc: add excludeExhaustedSessions option
Add a new `exclude_exhausted_sessions` field to the relevant
wtclient.proto requests. This was chosen instead of "include_exhausted"
so as to not break the API.
2023-03-20 20:14:01 +02:00
Elle Mouton 31beacc2c4 lnrpc/wtclientrpc: populate sessions from legacy channels 2023-03-20 16:51:51 +02:00
Elle Mouton b635629e3c lnrpc/wtclientrpc: correctly merge tower client info
Prior to this commit, the wtclient would request tower info from both
the legacy client and the anchors client and would then merge the
results returned. This is incorrect since the two clients will have
different session info and different "active" statuses for the same
tower. This commit thus ensures that we dont lose this info.
2023-03-16 14:59:08 +02:00
Elle Mouton 2fd4f3f180 go.mod+lnrpc+github: point to latest kvdb changes
Use kvdb package v1.4.1. This update also forced the protobuf version to
be bumped which required `make rpc` to be run to update the generated
files. This also required a bump in the github pinned dependencies
config for the grpc and protobuf libs.
2023-01-25 14:03:00 +02:00
Elle Mouton c3a2368f46 multi: migrate towers to use RangeIndex for AckedUpdates
In this commit, a migration is done that takes all the AckedUpdates of
all sessions and stores them in the RangeIndex pattern instead and
deletes the session's old AckedUpdates bucket. All the logic in the code
is also updates in order to write and read from this new structure.
2023-01-11 13:59:03 +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
Evan Kaloudis 981f8969b4 lnrpc/gen_protos.sh: remove js build tag 2022-09-07 18:32:05 -04:00
Olaoluwa Osuntokun b3998ddb5c lnrpc: re-compile protos w/ Go 1.19 2022-08-24 11:43:00 -05:00
Oliver Gugger 7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Dimitris Apostolou 530a2059e5 multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
Oliver Gugger 702f0d7ced lnrpc: generate JSON/WASM client stubs 2021-08-03 13:44:36 +02:00
Oliver Gugger dd749fe580 lnrpc: update grpc-gateway library to v2 2021-07-27 13:09:59 +02:00
Oliver Gugger 4a0025c1b7 lnrpc: split REST annotations into service files
As a preparation for the migration to the grpc-gateway/v2 library we
declare each service's REST annotations in its own file. This is
optional in the v1 library but mandatory in v2.
2021-07-27 12:59:52 +02:00
Andras Banki-Horvath e5f249ad51 mod: integrate latest btcwallet and bump protobuf and grpc 2021-05-04 17:33:09 +02:00
Wilmer Paulino 7517243d6d wtclient: decrement pending tasks stats upon accepted task
We'd never decrement the number of pending backups upon a watchtower
accepting one, making it confusing for users to determine whether their
backups have actually been accepted. Along the way, we also rename
NumTasksReceived to NumTasksPending to better reflect its purpose.
2021-04-14 17:18:25 -07:00
yyforyongyu 9d0d88ac21 lnrpc+lncli: deprecate sat_per_byte and add sat_per_vbyte
This commit deprecates/replaces the old field `sat_per_byte` with
`sat_per_vbyte`. While the old field suggests sat per byte, it’s
actually using sat per virtual byte. We use the Hidden param to hide all
the deprecated flags. These flags won't show up in help menu onwards,
while stay valid that can be passed from cli. Thus bash scripts
referencing these fields won't be broken.
2021-03-26 17:16:40 +08:00
Johan T. Halseth 4ea494e8c5 lnrpc: wrap subservers in GrpcHandler
In order to be able to register the subservers with the root grpc server
before we have all dependencies available, we wrap them in an
GrpcHandler struct. This struct will initially hold an empty reference
to the subservers, which allows us to register with the GRPC server, and
later populate and create the subserver instance.
2021-03-11 13:05:23 +01:00
Conner Fromknecht b28bbc3223 wtclinet+itest: expose anchor client via rpc + add itest 2020-11-25 16:16:47 -08:00
Conner Fromknecht 5b3a08a1cd multi: thread anchor client down to wtclient subserver 2020-11-25 16:16:28 -08:00
Conner Fromknecht a5c40858c9 lnrpc/wtclientrpc: add anchor_client bool to all requests 2020-11-25 16:16:24 -08:00
Oliver Gugger 558d63718b rpcserver+lnrpc: register REST subservers with root server 2020-06-04 08:50:44 +02:00
Oliver Gugger fe16be5bb8 lnrpc: extract or add REST annotations to yaml 2020-06-04 08:50:00 +02:00
Wilmer Paulino b195d39ad7 rpc: use existing rpc logger for wtclientrpc
The logger string used to identify the wtclient and wtclientrpc loggers
was the same, leading to being unable to modify the log level of the
wtclient logger as it would be overwritten with the wtclientrpc's one.
To simplify things, we decide to use the existing RPC logger for
wtclientrpc.
2020-05-14 13:35:03 -07:00
Oliver Gugger 272598a706 lnrpc: generate gateway and swagger for all RPCs 2020-05-08 14:33:59 +02:00
Oliver Gugger 0800386138 lnrpc: unify proto style by moving services to top of file 2020-05-08 14:33:04 +02:00
Oliver Gugger fdcb30e57f lnrpc: run clang-format 2020-03-10 20:19:08 +01:00