Commit graph

18 commits

Author SHA1 Message Date
Oliver Gugger
7d9e6bdce3
server: pin required lnd version, block until synced
With this commit we address two issues with the connection to lnd:
First, we didn't specify the required version of lnd even though we used
features of 0.11.0. This is fixed by pinning the version to 0.11.0
explicitly and specifying the subservers that are required to be active.
Second, we didn't wait for lnd to be synced to its chain backend. We use
the new functionality in the lndclient repo that does exactly this.
2020-08-11 19:41:02 +02:00
Oliver Gugger
978950600c
multi: update aperture, use lndclient, remove loop
To get rid of the loop dependency, we update aperture (which now houses
all the LSAT code) and use the standalone lndclient repository.
2020-08-11 19:41:01 +02:00
Olaoluwa Osuntokun
fb3f2b6f76
server: on start up, sync local with remote order state
In this commit, we add some new logic to reconcile our local order state
with what the auctioneer has on start up. However, we'll only update our
local order if the auctioneer shows the order as being cancelled. For
all other cases, we should reconcile that difference if we have a
pending batch that was confirmed while we were offline, or confirmed
after we sent our signature. In this case, we'll log the order nonce
with a warning log-level so users can track down any possible issues.
2020-08-04 18:21:05 -07:00
Oliver Gugger
7ab3b587bd
server: add LSAT store to struct
As a preparation to be able to interact with the LSAT store on the RPC
level, we need to hold a reference to it in the server. So far we also
don't pass the client DB to the RPC server but instead access it through
the server struct. We do the same for the LSAT store.
2020-08-03 11:08:54 +02:00
Olaoluwa Osuntokun
18a825d935
server: add new unary+streaming interceptors to log all RPC errors 2020-07-01 17:52:05 -07:00
Olaoluwa Osuntokun
57fa63c237
multi: rename, fix modules 2020-06-21 19:37:00 -07:00
Olaoluwa Osuntokun
7c9c6dfe2d Merge pull request #84 from Roasbeef/client-fix
client: ensure the auctioneer client is started
2020-05-22 15:29:17 -07:00
Oliver Gugger
8785596960 client: add config option to disable LSAT 2020-05-20 13:53:06 +02:00
Olaoluwa Osuntokun
e691b4dac8 client: ensure the auctioneer client is started
In the integration tests, we start the client manually as part of the
set up process. When the trader is run in a standalone manner, we still
need to ensure the client is started, otherwise the auth handshake can't
take place.
2020-05-19 17:43:28 -07:00
Olaoluwa Osuntokun
55bc067f1d client: add logic to register funding shims and open chans in batch lifecycle
In this commit, we add the missing logic to register for funding shims
when we're the taker of an executed order, and also to establish new
channels after we send OrderMatchAccept when we're the maker of an
executed order.
2020-05-07 19:37:05 -07:00
Olaoluwa Osuntokun
5c795ef264 client: add full lnd client to main server
As a temporary work around, we'll also add a full lnd client, as we'll
need to do things like connect to peers, register for funding shims, and
also open channels. In the future we'll catch up lndclient to add these
new methods so we can use mocks in our unit tests.
2020-05-07 19:37:02 -07:00
Wilmer Paulino
4013f33984 auctioneer: remove irrelevant pending batch on stream establishment
This commit aims to address another gap within the system to ensure
trader pending batch states are as accurate as possible. In a previous
commit, we addressed the case of a trader signing for a batch,
disconnecting and not receiving a Finalize message, and seeing a spend
for an account.

Here, we're interested in determining whether a batch a trader signed
for is actually still relevant to the trader. Since any trader can bail
from a batch, the batch may need to be re-done by the auctioneer, and if
a trader that previously signed for a previous version of the batch
remains disconnected, then they won't be aware of said new batch. At
this point, the trader has a lingering pending batch that's no longer
irrelevant, so we remove it. This logic is tied to the connection
establishment between the trader and auctioneer to ensure we handle the
disconnection and crash case of a trader after signing for a batch.
2020-05-05 13:54:39 -07:00
Wilmer Paulino
f7143b56ae server: move db init from RPC to main server
The auctioneer client will require some database methods in a later
commit, but at the moment of initialization, the database does not yet
exist.
2020-05-05 13:54:38 -07:00
Oliver Gugger
afa03d728b client: expose LSAT identity 2020-04-29 16:19:13 +02:00
Oliver Gugger
9111b99f0b client: add dummy interceptor 2020-04-29 16:18:41 +02:00
Oliver Gugger
42adb28ff5 client: verify batch 2020-04-03 21:50:22 +02:00
Oliver Gugger
7579b158fc client: implement stream RPC 2020-03-04 15:11:08 +01:00
Oliver Gugger
2c88c6de18 client: refactor to start/stop model 2020-02-26 11:59:36 -03:00
Renamed from agorad.go (Browse further)