Commit graph

151 commits

Author SHA1 Message Date
Oliver Gugger
cafe3dfd7c
makefile: use lowercase llm for easy search/replace 2020-06-24 10:31:16 +02:00
Oliver Gugger
3543466604
Makefile+lint: only limit concurrency on Travis 2020-06-24 09:58:17 +02:00
Oliver Gugger
bb09760864
clientdb: fix formatting 2020-06-24 09:55:42 +02:00
Oliver Gugger
336a72e545
Merge pull request #4 from Roasbeef/travis
build: add basic travis config
2020-06-24 09:54:55 +02:00
Olaoluwa Osuntokun
e83e66c163
build: force travis to use go modules 2020-06-23 19:03:41 -07:00
Olaoluwa Osuntokun
b5bf85129a
build: add basic travis config 2020-06-23 18:58:44 -07:00
Olaoluwa Osuntokun
6416e02f69
Merge pull request #3 from guggero/fix-order-deletion
clientdb: fix order deletion
2020-06-23 18:43:42 -07:00
Olaoluwa Osuntokun
a5f195b03a
Merge pull request #1 from guggero/makefile
make: add Makefile, .gitignore and lint config
2020-06-23 18:39:45 -07:00
Oliver Gugger
b120e5b21c
clientdb: fix order deletion 2020-06-23 15:38:53 +02:00
Oliver Gugger
7b045393ac
make: add Makefile, .gitignore and lint config 2020-06-23 10:45:34 +02:00
Olaoluwa Osuntokun
57fa63c237
multi: rename, fix modules 2020-06-21 19:37:00 -07:00
Wilmer Paulino
182bd1badf agora: add account deposit command 2020-06-17 18:34:56 -07:00
Wilmer Paulino
f521327cb5 clmrpc: add DepositAccount RPC 2020-06-17 18:34:54 -07:00
Wilmer Paulino
7c0a5070ea account: add support for lnd-backed account deposits 2020-06-17 18:34:53 -07:00
Wilmer Paulino
a92022392f account: allow inputs in transaction creation
This serves as prepatory work to introduce account deposits, as they
rely on a set of additional inputs being provided.
2020-06-17 18:34:52 -07:00
Wilmer Paulino
b7e48b5432 account: add basic coin selection heuristic
Most of the code is heavily borrowed from the chanfunding package in
lnd, except for some minor changes to account for the difference in
weights. Ideally, that package is refactored and abstracted such that it
doesn't only apply for channel funding.
2020-06-17 18:34:51 -07:00
Wilmer Paulino
573e3ea987 account: refactor withdrawal logic out from createNewAccountOutput
Some of the refactored methods will become useful with the introduction
of account deposits.
2020-06-17 18:34:50 -07:00
Wilmer Paulino
10efa7d582 clientdb: store global random lock ID upon database initialization 2020-06-17 18:34:49 -07:00
Oliver Gugger
e4e7236cc0 clmrpc: add README.md 2020-06-05 21:25:53 +02:00
Oliver Gugger
69ebc705e8 clmrpc: re-generate with updated grpc-gateway 2020-06-05 21:25:52 +02:00
Oliver Gugger
adcb145e76 client+cmd: add recover command 2020-06-05 16:24:33 +02:00
Oliver Gugger
679efaa7b7 client: perform account recovery 2020-06-05 16:24:33 +02:00
Oliver Gugger
a81167c6a0 client: add account recovery 2020-06-05 16:24:30 +02:00
Oliver Gugger
7b65bb70fa client: treat error differently in recovery mode 2020-06-05 16:24:07 +02:00
Oliver Gugger
f3bd20f88f client: refactor chan type in subscription 2020-06-05 16:23:43 +02:00
Oliver Gugger
eab2b0b47b client: refactor connect and auth into method 2020-06-05 16:23:43 +02:00
Oliver Gugger
31a3220708 clmrpc: add account recovery 2020-06-05 16:23:43 +02:00
Oliver Gugger
62c95e422e clmrpc: add account recovery messages 2020-06-04 14:49:15 +02:00
Oliver Gugger
c5ea06b26d client+clmrpc: use enum for OrderState 2020-05-27 14:57:56 +02:00
Oliver Gugger
6cc5240fda server+itest: validate maximum account value 2020-05-27 14:57:56 +02:00
Oliver Gugger
909a5bbc3e client: send account value on account reservation 2020-05-27 14:57:55 +02:00
Oliver Gugger
c46bfef959 client+clmrpc: unify data types for amounts, fees and blocks
We use the same proto message types everywhere for these kinds
of fields:
- absolute amounts (sats): uint64
- fee rates (sat/kWU): uint64
- fee rates (ppm): uint32
- blocks (absolute and relative): uint32

Additionally we unify the comments and remove the [ json_name = "" ]
declarations in the trader proto as they aren't needed with the
jsonpb marshaller that we use.
Then we align the naming of the account key to be called trader key
everywhere instead of user's sub key.
2020-05-27 14:33:34 +02:00
Olaoluwa Osuntokun
33246cda7d multi: fix linter issues 2020-05-26 19:58:14 -07:00
Olaoluwa Osuntokun
aaadcdb38a client/clmrpc: extend the SubmitOrder response to include the order nonce
This'll let clients/UIs track the new order by nonce, which can be
useful for looking up later. We'll also use this in the itests to write
more assertions about expected order states.
2020-05-26 19:58:12 -07:00
Olaoluwa Osuntokun
9a2268ad48 client: change order.Kit.AcctKey into raw key bytes
In this commit, we change the key stored within the internal order kit
into a raw pubkey array. Along the way we fix a bug in the verifier
tests due to using a map with pointer keys rather than the actual value
itself.
2020-05-26 19:57:54 -07:00
Olaoluwa Osuntokun
4e72d595b3 client/rpc: off-set the thaw height of a shim based on the current height
Without this change, the thaw height would be relative rather than
absolute. We still need to pick an even more objective anchor to ensure
proper synchrony.
2020-05-26 19:57:53 -07:00
Olaoluwa Osuntokun
983902c6d6 client/rpc: add extra logging for order submission 2020-05-26 19:57:52 -07:00
Olaoluwa Osuntokun
29eb4b64ce client/rpc: properly pass chanSize into GenFundingPkScript 2020-05-26 19:57:51 -07:00
Olaoluwa Osuntokun
a112024d3d client/rpc: ensure lndClient is set in newRPCServer 2020-05-26 19:57:50 -07:00
Olaoluwa Osuntokun
50a9a3e447 client/rpc: fix panic in sendAcceptBatch
In this commit, we fix a panic in `sendAcceptBatch` due to the fact that
the method as is, creates a slice with enough _capacity_ but a zero
length. In this case, trying to access an index will result in a panic.
In this commit, we shift things over to use append instead of index into
the slice.
2020-05-26 19:57:50 -07:00
Olaoluwa Osuntokun
20a5085017 client/order: properly set UnitsFilled in ParseRPCMatchedOrders 2020-05-26 19:57:49 -07:00
Olaoluwa Osuntokun
ad5c24bf2a client/order: log expected script when ending state script validation fails 2020-05-26 19:57:48 -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
f4df5ea56f client: add pprof support to config 2020-05-19 17:36:56 -07:00
Olaoluwa Osuntokun
c6dba8c7c1 client/account: raise max acct value to 1 BTC 2020-05-18 16:06:19 -07:00
Oliver Gugger
f110e8b948 client: use key descriptor to subscribe to account
The account subscription doesn't need access to the full account,
only its key descriptor. This is a preparation for the account
recovery where we want to subscribe to the auctioneer but don't have
the full account anymore.
2020-05-14 15:56:06 +02:00
Oliver Gugger
77b4c03a9a client+clmrpc: change shutdown msg to generic error
More error messages will be added to the server responses soon
so it makes sense to create an error type with the reason set
as a code instead of individual messages for each purpose.
2020-05-14 15:56:01 +02:00
Wilmer Paulino
a67669e188 cmd/agora: add account withdrawal command 2020-05-12 15:10:11 -07:00