Commit graph

94 commits

Author SHA1 Message Date
ffranr
d63837109c
perms: move perms.go into poolrpc
This change narrows the import scope for lightning-node-connect (LNC).
Instead of importing the entire pool package, LNC now only needs to
import poolrpc.

It also brings pool in line with the structure used in our other
projects.
2025-05-08 00:36:26 +01:00
Oliver Gugger
837a9b7b55
server: bump lnd minimum compatible version to v0.18.5-beta 2025-03-13 11:55:57 -05:00
Elle Mouton
6dd03c0edc
multi: update lnd, aperture and lndclient deps
This includes upgrading the logging framework to the V2 framework. This
new framework lets us deprecate the `maxlogfiles` and
`maxlogfilesize` config options.
2025-03-05 12:31:15 +02:00
Andras Banki-Horvath
948dbca84e
multi: bump aperture and rename L402 to LSAT where possible 2024-05-23 14:07:48 +02:00
Oliver Gugger
51358ef7a1
server+rpcserver: restrict use of taproot chans 2023-10-25 10:04:23 +02:00
Oliver Gugger
4ccc703cab
server: specify gRPC keepalive params
With this commit we instruct the gRPC client to ping the server every 10
seconds to make sure the TCP connection is still alive.
2023-06-05 17:39:22 +02:00
positiveblue
00b079244f
version: bump to v0.6.2-beta
Now that lnd `v0.16.0-beta.rc` is out we can target the right lnd
version for `muSig2V100RC2Version`.
2023-03-10 09:45:00 -08:00
Oliver Gugger
2d3aef1725
order+server: add flag based batch version 2023-03-08 17:42:06 +01:00
Oliver Gugger
1b1d0b69e0
multi: add new account version 2023-03-08 17:42:06 +01:00
Oliver Gugger
a5539ee08a
server+README: bump minimum required lnd version to v0.15.4-beta
Since any version prior to v0.15.4-beta will not sync to the mainnet
chain, we can safely bump the minimum required version to that since no
older version will be running (properly) anywhere.
2023-03-08 17:42:05 +01:00
Oliver Gugger
30c7ef6531
multi: bump lnd+lndclient compile time dependency
This commit bumps the compile time dependency of lnd and lndclient to
the 0.16.x branch. This makes the code forward compatible but does not
yet change anything with respect to the minimum required version the
user needs to run.
2023-03-08 17:42:04 +01:00
Oliver Gugger
34af866ce9
multi: fix linter issues 2023-02-23 11:26:42 +01:00
positiveblue
8d54713cef
order: bump latest batch version to ZeroConfChannels 2022-10-18 04:34:21 -07:00
positiveblue
d30a0b213c
multi: update lnd and lndclient v0.15.1-beta 2022-10-18 04:34:20 -07:00
Oliver Gugger
a1dab842d6
server: bump required lnd version for Taproot to v0.15.1-beta 2022-09-12 17:20:12 +02:00
Oliver Gugger
d109f913c4
multi: remove global shutdown interceptor
During the integration tests we might want to shut down a trader client
through the admin RPC. If that closes the shutdown channel on a package
global interceptor, that means we can't start another trader client
during that test. We need to make sure we can pass in an interceptor for
each trader instance.
2022-09-12 17:20:12 +02:00
Oliver Gugger
a6c18a9bb1
multi: add new batch version for account auto-upgrade 2022-09-12 17:20:11 +02:00
Oliver Gugger
a63985d614
multi: add account version to RPCs and manager 2022-09-12 17:20:10 +02:00
Oliver Gugger
986d889b74
multi: fix linter issues 2022-08-03 20:33:06 +02:00
Oliver Gugger
433a3c4bcf
rpcserver+server: bump minimum required lnd version to v0.14.3-beta
With lnd 0.15.0 almost out of the door, it is reasonable for us to ask
users to be on the latest 0.14.x version.
We use the walletrpc.SignPsbt method in Pool which was added in 0.14.2.
2022-06-30 15:39:48 +02:00
Elle Mouton
92d4aa0e06
multi: move RequiredPermissions to dedicated dir
This commit moves the RequiredPermissions map to its own directory so
that projects importing the permissions list dont need to import all the
dependencies of the pool package.
2022-06-14 15:07:39 +02:00
positiveblue
1b578c47bb
order: Mark missing invoices as failed in the client db 2022-04-21 23:47:59 -07:00
positiveblue
9bdcb8e554
server: add nonce to missing order errors 2022-04-13 14:30:28 -07:00
positiveblue
6027ccd3d6
multi: bump btcec/v2 and btcutil to new versions 2022-03-28 15:22:41 +02:00
Elle Mouton
c4d43e708d server: rename createDefaultMacaroonFile
Rename createDefaultMacaroonFile to withMacaroonService since this is
now a more appropriate name.
2022-01-17 16:04:03 +02:00
Elle Mouton
599f26528c multi: use lndclient MacaroonService
Since the code for creating and using a macaroon service is the same for
multiple projects (pool, loop, litd etc), the code has been unified in
lndclient. So this commit removes the macaroon service code and instead
uses the lndclient code.
2022-01-17 16:04:03 +02:00
Oliver Gugger
b1b9bd989b
rpcserver: fix nil version in subserver mode
A new variable for the connected lnd node's version was added but was
not given a value when run in subserver mode within LiT.
This commit uses the lnd service's cached version directly and removes
the uninitialized variable.
2022-01-14 14:12:08 +01:00
Oliver Gugger
7c2268fcbb
Merge pull request #330 from lightninglabs/default-script-chan-type
multi: remove static default channel types instead select them based on lnd's verison
2021-12-23 11:56:45 +01:00
Oliver Gugger
1f50c7839a
server+auctioneer: make batch version configurable 2021-12-22 09:47:44 +01:00
Olaoluwa Osuntokun
eecb470538
server: store the version of the connected lnd node
We'll use this in a follow up commit to decide what channel type we want
to use.
2021-12-17 18:02:43 -08:00
Turtle
5b44ae53de
pool: conditionally create default macaroon file
In some cases we don't want the default macaroon file to be created on
disk, so we allow passing in a boolean that toggles the macaroon
creation.
2021-11-04 14:09:02 +01:00
Oliver Gugger
8be226351d
macaroons+server: close macaroon DB on server shutdown
In the integration tests we stop the pool daemon but don't exit the main
process. So it can happen that the underlying bbolt DB isn't properly
closed and when the daemon is started again during the test it runs into
a timeout. We fix this by properly closing the DB when the service is
stopped.

The macaroon service doesn't close the backend anymore because in the
lnd context the backend connection could be a shared connection to a
remote DB that we don't want to close when we start/stop the service
itself.
2021-10-28 16:05:58 +02:00
Oliver Gugger
b460ba6fee
multi: update lndclient to latest version
With this commit we update to the latest lndclient version of the 0.14.0
branch that reverts a breaking change in the basic client and also fixes
a "close of closed channel" panic.
2021-10-26 12:38:54 +02:00
Oliver Gugger
429b28b110
multi: prepare for upcoming lnd v0.14.0-beta release 2021-10-20 19:25:54 -07:00
carla
234f4d80fb
gomod: bump to lndclient 13-7
This commit bumps pool to lndclient 13-7 so that code that depends
on lnd 0.13 can import pool. As is, pool is running with lndclient 0.12,
but pins minimum version to 0.11, so we are already in a state where
some of the apis available at compile time are not enforced by minimum
run version.

This commit bumps this minimum version up to 0.12 to minimize the
difference between the compile and runtime lnd version.
2021-08-20 16:49:41 +02:00
Oliver Gugger
938e608ab2
multi: update lnd master with grpc-gateway upgrade
To make pool work with the latest lnd version inside of LiT, we need
to upgrade the grpc-gateway library to the same v2 version here too.
2021-07-29 14:01:23 +02:00
Oliver Gugger
ab46aa7a49
server+config: allow max LSAT routing fee to be configured
If users are only connected to the network through nodes with high fees
even the 5% default routing fee for the LSAT might not be enough. To
avoid them needing to compile Pool with a custom value, we expose that
value as a config option.
2021-07-01 10:44:12 +02:00
Oliver Gugger
f38eeaf933
multi: bump lnd to version v0.13.0-beta.rc3 2021-05-25 20:25:16 +02:00
Olaoluwa Osuntokun
ba9a223bd6
sidecar: use a funciton closure for PrepareOrder
The RPC server won't be created by the time we attempt to reach for this
pointer, so we use a function closure to allow "lazy" evaluation which
only attempts to derf once the system is already up and running.
2021-05-09 19:25:16 -07:00
Olaoluwa Osuntokun
d0390b4c2c
server: add new config for sidecar acceptor 2021-05-09 19:25:02 -07:00
Oliver Gugger
482f4828b9
server+sidecar_acceptor: consume auction messages
Whenever we are expecting a sidecar channel with us as the recipient, we
subscribe to the auction server through the special new SubscribeSidecar
RPC that works exactly the same as the SubscribeBatchAuction with the
only difference that we can use our channel funding multisig key as the
authentication key instead of the trader account key.
We have to react to all batch auction messages but our role is somewhat
simplified as we don't have to fully verify or sign the batch itself.
2021-04-06 13:36:31 +02:00
Oliver Gugger
36b30a741d
multi: add auctioneer client to sidecar acceptor 2021-04-06 13:36:31 +02:00
Oliver Gugger
bc9bf56a8d
server+funding: add sidecar offer to funding manager
With this commit we add the business logic for creating a sidecar
channel offer as the provider.
We choose the funding manager as the place for this logic as that
already has most of the required lnd clients and will ultimately be
responsible for kickstarting the funding of the sidecar channel on the
provider's side.
2021-04-06 13:36:30 +02:00
Oliver Gugger
27ed02a5c4
multi: add sidecar acceptor type
With this commit we add a new sidecar acceptor type that is exclusively
responsible for managing the recipient's tasks of executing a sidecar
channel. The two tasks are:
1. Verify a sidecar ticket and the offer contained within then add the
   recipient node information to the ticket so it can be returned to the
   sidecar provider. This is step 2/4 of the entire sidecar execution
   protocol.
2. Interact with the auction server and connect out to an asker's node in the
   right moment then accept the incoming channel. This is step 4/4 of the
   entire sidecar execution protocol.
The code for these two tasks are kept separate from the default funding
manager to make it easier to extract a standalone sidecar acceptor
client later on. It also makes it easier to see what code would need to be
re-implemented in another language to integrate just the acceptor part.
2021-04-06 13:36:30 +02:00
Oliver Gugger
2730d69c2f
funding+server: turn pending chan sub into subscription server
As a preparation for allowing multiple managers to consume the pending
channel updates, we move those events from a single channel to a
subscribe.Server construct.
We also pass in the subscription client to use into waitForChannelOpen
so we can use a different one in different flows.
2021-04-02 15:27:35 +02:00
Oliver Gugger
6923729566
funding+server+rpcserver: use funding.ManagerConfig
As a preparation to add non-exported fields to the funding manager, we
want to create a NewManager function that takes a config instead of
instantiating the manager directly.
2021-04-02 14:18:12 +02:00
Oliver Gugger
5a95222b7c
multi: add channel acceptor
With everything else in place, we now only need to add and start a
channel acceptor that looks at each incoming channel and rejects it if
the push amount offered doesn't match the value in the bid order.
2021-03-19 16:50:33 +01:00
Oliver Gugger
4d6fdae004
funding+order: move DefaultBatchStepTimeout
We need to use the DefaultBatchStepTimeout variable outside of the
funding manager as well and move it to the order package to not create a
circular dependency when accessing it from the root package.
2021-03-19 16:50:32 +01:00
Oliver Gugger
0cf137c511
server: fix nil pointer panic when running as subserver
When Pool is started as a subserver in LiT the gRPC server is never
initialized. When trying to stop Pool this would lead to a nil pointer
panic.
2021-02-24 09:31:41 +01:00
kon
4537447933 auctioneer: add tor proxy 2021-02-04 09:58:57 +01:00