Commit graph

463 commits

Author SHA1 Message Date
Oliver Gugger
90a74b34ff
Merge pull request #107 from halseth/node-key-cli-arg
cmd/pool: allow ratings nodekey without named flag
2020-10-15 10:36:41 +02:00
Johan T. Halseth
37cedb0118
cmd/pool: allow ratings nodekey without named flag 2020-10-15 09:54:52 +02:00
Olaoluwa Osuntokun
99c9405d77 build: bump version to v0.2.8-alpha 2020-10-14 11:21:37 -07:00
Justin O'Brien
0d64ec67a4
GitBook: [master] 11 pages modified 2020-10-14 10:52:41 +00:00
Olaoluwa Osuntokun
cf7020cdf7
Merge pull request #105 from lightninglabs/gitbook-docs
docs: re-organize docs into new Gitbook compatible structure
2020-10-13 17:43:06 -07:00
Olaoluwa Osuntokun
d1a5c35949 docs: re-organize docs into new Gitbook compatible structure 2020-10-13 17:02:46 -07:00
Olaoluwa Osuntokun
7744d9d4bf
Merge pull request #104 from guggero/del-order-timestamp
Update order status to "failed" instead of deleting
2020-10-13 16:21:41 -07:00
Olaoluwa Osuntokun
caa2272692
Merge pull request #100 from wpaulino/order-min-match
order+rpc: introduce MinUnitsMatch field
2020-10-13 16:11:41 -07:00
Oliver Gugger
b0dc59a39e
order+clientdb: remove unused DelOrder method 2020-10-13 10:11:37 +02:00
Oliver Gugger
27903f77c4
rpcserver: update order status on failure
Instead of deleting the partial order (which had a bug in it that it
didn't remove the order creation timestamp) we for now only update its
status to failed. We'll want to implement proper housekeeping at one
point to get rid of archived orders. But for now we have the
--active_only flag that helps to easily filter out archived orders on
the command line.
2020-10-13 10:09:43 +02:00
Wilmer Paulino
bd39dfc78f
order: mark order with unfulfilled units below min as executed 2020-10-12 19:51:32 -07:00
Wilmer Paulino
3c92676aec
order: use min units match to compute reserved value 2020-10-12 19:51:31 -07:00
Wilmer Paulino
fecb1a8398
pool: add min chan amt flag to order submission 2020-10-12 19:51:30 -07:00
Wilmer Paulino
e9031a4885
order: enforce min units match in batch verification 2020-10-12 19:51:29 -07:00
Wilmer Paulino
664a55ad3b
clientdb: store order MinUnitsMatch field 2020-10-12 19:51:28 -07:00
Wilmer Paulino
f45245e8fc
order+rpc: introduce MinUnitsMatch field 2020-10-12 19:51:27 -07:00
Olaoluwa Osuntokun
c5fe0d7c52 version: bump version to v0.2.7-alpha 2020-10-12 17:14:53 -07:00
Olaoluwa Osuntokun
0f42edccae
Merge pull request #89 from Roasbeef/bid-node-tiers
multi: add new node tier system for bids, a ratings endpoint for querying, and expose node+tier info in leases
2020-10-09 16:02:40 -07:00
Olaoluwa Osuntokun
43c6069e04 cmd/pool/auction: expose new ratings command, fill in ratings info for leases 2020-10-09 15:55:16 -07:00
Olaoluwa Osuntokun
0de4a2f20b cmd/pool: accept min_node_tier when accepting new bids 2020-10-09 15:55:16 -07:00
Olaoluwa Osuntokun
479090f7d3 rpc: add node pubkey and ratings information to the leases response 2020-10-09 15:55:16 -07:00
Olaoluwa Osuntokun
032649b183 rpc+auctioneer: implement new NodeRatings end point 2020-10-09 15:55:16 -07:00
Olaoluwa Osuntokun
618fe0ad53 auctioneer+rpc: thread through new MinNodeTier for order submission/listing 2020-10-09 15:53:43 -07:00
Olaoluwa Osuntokun
4b41c323c7 poolrpc: add new calls for Bid node rating system, and node rating queries 2020-10-09 15:53:43 -07:00
Olaoluwa Osuntokun
273fb46088 clientdb: add new key within order bucket for min node tier
In this commit, we add a new key within the order bucket that stores
just the node tier for a given order. The current code only _expects_ a
node tier to exist for Bid orders, however things have been designed
such that, we can easily add tier options for Ask orders as well.

Along the way we modify the `orderCallback` to include the node tier
information as its read from a distinct bucket. In the future, we'll
likely want to make this into a struct so the function signature doesn't
ever expand.
2020-10-09 15:53:43 -07:00
Wilmer Paulino
a9807ab0fd
Merge pull request #103 from guggero/proper-shutdown
rpcserver: request proper shutdown on terminal error
2020-10-09 12:38:50 -07:00
Oliver Gugger
1af2e1c209
rpcserver: request proper shutdown on terminal error
When a terminal error is received, it is not enough to stop the server
itself to terminate the trader daemon because the main goroutine still
blocks on the read from the shutdown channel.
Instead we have to request a proper shutdown through the signal package
to initiate a full trader daemon stop.
2020-10-09 13:31:25 +02:00
Olaoluwa Osuntokun
a65dfb9829 order: introduce new node tier system
In this commit, we introduce a new field to only bids (for now): a min
node tier. This node tier is meant to allow buyers to express the level
of "quality" they're interested in for a given purchased channel. This
quality is determined using the current server-side rating system. The
base node tier are those considered "above the cut", this is also the
default tier: t1. The next node tier is t0, and is the buckets all other
nodes fall in. As the tiers rise, the number of nodes in each tier
shrinks, as these are meant to be the upper percentile of all nodes.

NOTE: The way this is implemented is actually a _breaking change_ from
the perspective of orders as we add a new field, which is included in
the order digest, without also bumping the version.
2020-10-07 18:03:47 -07:00
Johan T. Halseth
fdbbb7425f
Merge pull request #101 from halseth/orders-active-only
`active_only` option when listing orders
2020-10-07 13:24:52 +02:00
Johan T. Halseth
60f33ca9aa
cmd/pool: add active_only CLI flag 2020-10-07 11:24:29 +02:00
Johan T. Halseth
1aec4b54b7
rpcserver: skip archived orders if active_only set 2020-10-07 11:24:05 +02:00
Johan T. Halseth
e056405a7b
poolrpc: add active_only option to ListOrders 2020-10-07 11:23:42 +02:00
Olaoluwa Osuntokun
b57d4958fd build: bump version to v0.2.6-alpha 2020-10-06 16:04:33 -07:00
Olaoluwa Osuntokun
a511aea4d9 rpc: add LeaseDurations to set of macaroon perms 2020-10-06 16:00:50 -07:00
Olaoluwa Osuntokun
028fd05406 build: bump version to v0.2.5-alpha 2020-10-06 15:45:55 -07:00
Johan T. Halseth
cd6d403e4b
Merge pull request #99 from halseth/pointer-race-fix
account: revert back to manager pointer
2020-10-06 14:33:11 +02:00
Johan T. Halseth
b9f53f2c46
account: revert back to manager pointer 2020-10-06 09:46:35 +02:00
Olaoluwa Osuntokun
c8ecf5fab5 build: bump version to v0.2.4 2020-10-05 19:40:24 -07:00
Olaoluwa Osuntokun
e7d1902231
Merge pull request #97 from Roasbeef/order-duration-buckets
multi: do away with min/max durations for bid/ask and move towards set order duration buckets
2020-10-05 18:13:51 -07:00
Olaoluwa Osuntokun
8e6afecf3a
Merge pull request #98 from Roasbeef/txn-prefix-labels
multi: label all account modification txns with optional prefix
2020-10-05 18:10:08 -07:00
Olaoluwa Osuntokun
1ff491c0b6 rpc: don't accept order submission of invalid durations
In this commit, we restrict the validation in SubmitOrder to only accept
durations of orders that show up in the Terms call. The way this is
implemented, we'll be able to easily add new durations in the future
without modifying the client each time too much.
2020-10-05 17:57:16 -07:00
Olaoluwa Osuntokun
281f2a17d2 multi: unify min/max durations into single field of LeaseDuration
In this commit, we replace the existing min/max duration system with a
single field that expresses the expected duration of a lease. Note that
we've left some of the exiting logic in place that select a duration
from a bid in an attempt to make this more of a "soft fork" which will
allow any existing orders to be cleared out as normal before we switch
over.

Once we add multiple durations (this commit assumes a single duration),
we'll need to modify the verification logic to be able to handle
multiple clearing prices for a given batch.
2020-10-05 17:57:16 -07:00
Olaoluwa Osuntokun
aed85f5bd4 multi: label all account modification txns with optional prefix
In this commit, in order to make accounting for account
modification/creation transactions a bit easier, we'll now always add a
label describing the transaction within the account manager. The user is
also able to set their own prefix to the label as well to allow
insertion of custom meta data.
2020-10-05 17:54:10 -07:00
Olaoluwa Osuntokun
63be83dc01 poolrpc: move towards set duration buckets instead of min/max duration
In this commit, we make a series of RPC changes to do away with the
min/max order preference and instead replace that with a single unified
field for the duration of a lease. The Terms method has been extended to
return the current set of active leases. Things have been done in this
way to allow us to announce a new duration, accept orders, but not yet
enable market clearing for it.

The changes in this commit were intended to be non-breaking, which is
why the Bid/Ask message distinction still exists, even though with this
commit they nearly share all the same fields. In the future further
fields may be added that still make both messages asymmetric.
2020-10-05 17:28:56 -07:00
Olaoluwa Osuntokun
e49902167c internal: update mocks to match latest lndclient version 2020-10-05 12:45:32 -07:00
Olaoluwa Osuntokun
a0991a431a build: update to latest lndclient version w/ tx labels 2020-10-05 12:40:06 -07:00
Olaoluwa Osuntokun
5899491377
Merge pull request #90 from guggero/connect-fix
poold: fix connection issues and retry mechanism
2020-10-05 11:27:32 -07:00
Oliver Gugger
79b8fc834e
auctioneer: make initial backoff use more clear
When normally connecting for the first time, the initial backoff is set
to 0 and no wait is executed. We make this a bit more clear by moving
the zero check into the loop and out of the `wait` method.
2020-10-05 15:21:32 +02:00
Oliver Gugger
b72c37a9cf
auctioneer: try connecting with sync RPC
To make the auctioneer connection retry mechanism a bit more robust, we
try a "cheap" (resource wise) synchronous RPC call instead of the
streaming SubscribeBatchAuction call that'll only fail once we actually
try to authenticate an account.
That way we can catch errors if the auctioneer server is down and try a
proper reconnect.
2020-10-05 15:21:32 +02:00
Oliver Gugger
324749b6cc
auctioneer: add error channel switch
To divert all error channels to the subscription handling the
authentication, we create a concurrency safe error channel switch that
sends the incoming error messages to the correct processing channel.
2020-10-05 15:21:26 +02:00