In this commit, we move to stop setting a default channel type on the
CLI. Instead, we want this to be selected at runtime by the daemon based
on what the lnd node can offer.
Fixes#318.
Short names must be unique. This commit renames the short command name
"r" for "pool accounts recover" to "re" to not conflict with "renew".
To avoid running into an error during automatic bid order submission
when offering a sidecar channel, we need to make the --min_chan_amt flag
of the order mandatory.
When manually submitting an order, we want to update the state of the
ticket in the main database to the same state that we update the ticket
that's stored within the orders's TLV data.
Update leases to include the nonce of the order that the match was
with. This is required to match a lease with the event list provided
by an order in the case of multiple matches (and thus get a timestamp
for that lease).
In this commit, we modify the `OfferSidecarRequest` to instead embed the
entire bid order. This makes parsing on the command line a bit easier,
and sets us up for auto negotiation, as we'll need to have the entire
bid ahead of time so we can submit it during ticket negotiation.
With the same order quote calculation now available as an RPC, we no
longer need to do the calculation in the CLI code and can instead use
the new QuoteOrder call.
A sidecar channel uses different multisig keys than a normal order so we
need to fix the lookup in the batch transaction. While we're at it, we
might as well return the self chan balance and whether it was a sidecar
channel in the leases response.
With the RPC methods now in place, we add a new sidecar subcommand to
our CLI and add verbs for interacting with sidecars to it.
Because the ticket is in an encoded form we also add a printticket
subcommand for easy inspection.
We update the bid order submission CLI and add the --self_chan_balance
flag that will request an initially balanced channel to be leased.
To make sure that askers can signal that they understand that new
feature, we also bump the submitted order version for ask orders.
We add the initiator string "pool-cli" to the account open and order
submission calls to give the server an idea what user facing software
was used for those actions.
We add a new order version that is allowed to submit lease durations
outside of the default/legacy 2016 block duration.
No new fields are added, so nothing changes in the serialization or the
digest. This version only signals that the client is able to process
batch requests with multiple duration buckets.
To be able to fully clean up an old, pending batch snapshot on daemon
startup, we first need to switch to a method that returns the full
snapshot instead of just its ID.
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.