Commit Graph

40 Commits

Author SHA1 Message Date
a2b277cf1d multi: fix linter errors 2023-08-22 16:34:15 -07:00
47d4eb341d contractcourt: store new taproot resolution info in new key
We pull the information from the sign descriptors and store them in the
resolutions. However, the resolvers created end up duplicating the
resolution data, so we update the sign descs as needed during start up.
2023-08-22 16:33:30 -07:00
7dfe4018ce multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
895a2e497b multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
b7407882ac contractcourt: create breachResolver if BreachResolution present
Also transitions to the proper state based on if this is a legacy
breach in the channel arbitrator or a modern breach with a resolver.
2022-01-25 15:42:20 -05:00
af03c8cb46 contractcourt: handle writing BreachResolution in arbitrator log 2022-01-25 15:42:20 -05:00
530a2059e5 multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
91b75f8375 contractcourt: add docs for state transition paths 2021-09-23 13:22:34 +08:00
14c851c8fc kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
1e68cdc8cf input+lnwallet+contractcourt: define SignDetails for HTLC resolutions 2020-12-10 14:24:18 +01:00
f1404af475 contractcourt: pass in optional txns to lookups required for arb startup
To allow us to grab all of the information we need for our channel arbs
in a more efficient way on startup, we add an optional tx to our lookup
functions required on start.
2020-11-12 15:25:35 +02:00
d89f51d1d0 multi: add reset closure to kvdb.Update
Similarly as with kvdb.View this commits adds a reset closure to the
kvdb.Update call in order to be able to reset external state if the
underlying db backend needs to retry the transaction.
2020-11-05 17:57:12 +01:00
2a358327f4 multi: add reset closure to kvdb.View
This commit adds a reset() closure to the kvdb.View function which will
be called before each retry (including the first) of the view
transaction. The reset() closure can be used to reset external state
(eg slices or maps) where the view closure puts intermediate results.
2020-11-05 17:57:12 +01:00
acc0ec13e1 trivial: remove unused print 2020-08-28 17:09:39 +08:00
57f7115437 trivial: typo fix 2020-08-13 07:33:52 +08:00
fa46db9c48 multi: add resolver reports to Checkpoint
To allow us to write the outcome of our resolver to disk, we add
optional resolver reports to the CheckPoint function. Variadic params
are used because some checkpoints may have no reports (when the resolver
is not yet complete) and some may have two (in the case of a two stage
resolution).
2020-07-07 19:49:51 +02:00
455ddfebdb multi: rename: ReadBucket to RBucket 2020-05-26 18:21:08 -07:00
d0d2ca403d multi: rename ReadTx to RTx 2020-05-26 18:20:37 -07:00
320101d054 contractcourt: convert to use new kvdb abstraction 2020-03-18 19:34:52 -07:00
07a39b1ebf cnct: do not persist stateless resolvers
Preparation for the anchor resolver which does not have persistent
state.
2020-03-18 12:26:57 +01:00
dd77d9263e cnct: persist anchor resolutions 2020-03-17 16:25:33 +01:00
1e5eec990e cnct: add new from reader resolver initializers 2019-11-11 14:35:28 +01:00
ff63a680a1 cnct: instantiate quit channels inside resolvers
Removes a bug-prone construction that existed previously where the quit
channel was replaced just-in-time.
2019-11-07 13:10:35 +01:00
75ecbfd321 cnct: unexport ResolverKit quit field 2019-11-07 13:10:33 +01:00
ee14eaec5f cnct: remove redundant AttachResolverKit call 2019-11-07 13:10:31 +01:00
1e0ed1e52f multi: fix dropped errors 2019-09-13 09:50:38 +02:00
3186c0f3a2 cnct: use resolverType type 2019-09-10 17:22:01 +02:00
ed8d635cf1 contractcourt/briefcase: avoid bucket modification in ForEach loop
Since the contents were deleted before the bucket was deleted, we just
delete the bucket immediately.
2019-06-14 21:09:02 +02:00
364c0dd9f1 contractcourt: add storage for the confirmed CommitSet
In this commit, we add storage to the Briefcase for reading/writing a
confirmed CommitSet. This will be used in follow up commits to ensure
that we're able to survive restarts after we mark a channel as pending
closed. Along the way, we also re-add the FetchChainActions struct as
legacy nodes will need this storage.
2019-05-27 15:26:44 -07:00
ea7bae8492 contractcourt: remove the now unused chain actions methods
We still keep the `actionsBucketKey` variable around so current
contracts will clean up the existing state once they've been fully
resolved.
2019-05-27 15:26:41 -07:00
9e012ecc93 multi: move Input interface and related code
This commit is a step to split the lnwallet package. It puts the Input
interface and implementations in a separate package along with all their
dependencies from lnwallet.
2019-01-31 13:25:33 +01:00
1fd3aac925 multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
1ded697e8d multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
7bacdd65dc contractcourt: define StateCommitmentBroadcasted 2018-04-25 09:37:22 +02:00
663c396235 multi: fix a-vs-an typos 2018-04-17 19:02:04 -07:00
800eea931f build+multi: switch from bolt to bbolt
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08:00
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
783f01e1c7 multi: fix linter warnings 2018-01-22 19:19:56 -08:00
701eb9d4f4 contractcourt: add new briefcase.go file to house persistent arbitrator state
In this commit, we add a new file: briefcase.go. The contents of this
file are the ArbitratorLog. This log will be used by the internal state
machine of each Channel Arbitrator to ensure that each state transition
is fully reflected on-disk, to ensure that the state machine is durable
and able to survive restarts.

This commit also adds a new implementation of the ArbitratorLog
interface backed by boltdb.
2018-01-22 19:19:35 -08:00