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.
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.
A high max batch fee rate would reserve a lot of the account balance for
fees.
Note that if the actual fee rate goes higher than the max batch fee rate
set, then the orders won't be included in the batch, and the default
must be overridden.