In this commit, rather than the IncubateOutputs method taking a close
summary entirely, we now take resolutions for each possible output
type. We do this as it’s possible that each output is sent for
incubation at a different time as on-chain conditions change.
Additionally, if we get a baby output (CLTV locked transaction), we’ll
check to see if we can immediately broadcast it. Otherwise, we may
never sweep it unless a restart is attempted.
This commit fixes a prior goroutine leak that could result in a node
having thousands of goroutines, particularly due to many concurrent
channel fundings. We now ensure that for each BlockEpoch client
created, we ensure that the client is cancelled once the creating
grouting exits.
This commit fixes a slight logic error that could render the
`pendingchannels` RPC unusable if a node was on the reciting end of a
channel force close with no time-locked balance. In such a case the
channel wouldn’t be sent to the utxoNursery, resulting in an “contract
not found error”.
To fix this behavior, we’ve created a typed error that can be checked
within the RPC, thus we no longer treat this routine case as an error
case.
This commit adds a new public facing method to the utxoNursery:
NurseryReport. This method is intended to be used by callers to
introspect into the current state of the utxo nursery. With this
information, callers will be able to ascertain: the number of immature
outputs, the total number of funds in limbo, and when funds can be
fully swept.
This commit adds to new index buckets to the undo nursery: one that
allows searching the preschool bucket by origin chan point, and another
that allows querying the kindergarten bucket using an identical key.
These index buckets are updated in tandem with their regular buckets.
A note has been named in this commit to re-work the bucket structure
for a time in the near future in which we have implemented full
on-chain HTLC handling.
This commit adds an additional field to the kidOutput struct: the
outpoint of the channel that originally created the output. This field
is now needed in order to add some additional indexes that are required
to enable callers to query the internal state of the utxoNursery.
If a forceClose happens and the to-self output is below the dust value,
then that output will be non-existant in the commitment transaction.
UtxoNursery now handles that case by checking to see if the accompanying
selfOutPutSignDescriptor is nil. If it is nil, then it will ignore it.
This commit fixes a slight bug in the utxoNursery. Previously, if we
forced closed a channel that was solely funded by the other party
without pushing any satoshis, then the utxoNursery would attempt to
sweep a target output even though it didn’t actually exist. This would
result in the creation of a negative value’d output due to the hard
coded fees currently used in several areas.
To fix his, we now ignore any “output” with a value of zero, when
adding new outputs to the kindergarden bucket.
This commit augments the server’s response to successful SendPayment
commands by also returning the full path taken in order to fulfill the
payment. With this information, the user now obtains more context about
their payment whcih can be useful when debugging, or just exploring the
capabilities of the daemon.
This commit makes a large number of minor changes concerning API usage
within the deamon to match the latest version on the upstream btcsuite
libraries.
The major changes are the switch from wire.ShaHash to chainhash.Hash,
and that wire.NewMsgTx() now takes a paramter indicating the version of
the transaction to be created.
This commit implements so minor changes in formatting: character column
limits, error returning, scoped, errors. The aforementioned changes are
a bit of minor clean up after the merge of the latest PR in order to
ensure the new code in the file conforms to the code style in the rest
of the project.
Moved transaction states from in-memory maps to persistent BoltDB
buckets. This allows channel force closes to operate reliably if the
daemon is shut down and restarted at any point during the forced
channel closure process.
Within the inner loop of the utxoNursery when waiting for a new
sweepable transaction to be confirmed, we now use the new ChainNotifier
API for ConfirmationEvent’s which exposes additional details as to
exactly where in the chain the transaction was ultimately confirmed.
Within the utoxNursery we now use a two value read fro the block epoch
channel in order to exit early if/when the ChainNotifier begins the
shutdown process before the signal reaches the utxoNursery.
This commit removes the previously added contract breach retribution
duties from the utxoNursery. Much of the code removed will instead be
moved to a new sub-system which continuously monitors the state of ALL
active contracts for their entire life time.
This commit expands the duties of the utxoNursery (which should maybe
be renamed), to handle carrying out retribution against a counter-party
who breaches the channel contract by broadcasting a prior revoked state
on-chain.
As part of the retribution, once the breach transaction (the revoked
commitment transaction) has been confirmed within a block, the nursery
then sweep ALL funds pending within the channel to the daemon’s wallet.
This new section of the code has been implemented without full
persistence logic similar to time-locked output sweeping workflow of
the nursery. In a later commit, this section will gain full persistence
logic so the workflows can survive restarts of the daemon.
This commit adds a few workarounds in order to concurrently support the
REST proxy as well as the regular gRPC interface. Additionally,
concrete support for the following RPC calls has been added:
GetTransactions, SubscriptTransactions, SubscribeInvoices, and
NewWitnessAddress.
This commit introduces the utxoNursery. The duty of the utxoNursery is
to watch over CSV-locked immature outputs until they’ve fully matured.
An output is mature once both its sequence lock indicated by the CSV op
code within its output has become active. Once an output is mature the
nursery sweeps the outputs in batches into the source wallet.
The utxoNursery executes its duties once a commitment transaction has
been broadcast on-chain.