Commit Graph

7 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
1c5d62a804
lnwallet: add new concrete error InvalidHtlcSigError for failed htlc sig validation
In this commit we add a new error: InvalidHtlcSigError. This error will
be returned when we're unable to validate an HTLC signature sent by the
remote party. This will allow other nodes to more easily debug _why_ the
signature was rejected.
2018-04-04 17:41:10 -07:00
Olaoluwa Osuntokun
9c483c38b1
lnwallet: update state machine to use new lnwire.Sig everywhere 2018-02-06 20:14:31 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Johan T. Halseth
9f2ec87ed6
lnwallet/sigpool: exit SubmitSignBatch on quit 2018-02-02 21:16:38 -05:00
Olaoluwa Osuntokun
03ba13fcf8
lnwallet: ensure sigPool goroutines can always exit 2017-11-11 14:59:56 -08:00
flaurida
e106cfdef1 lnwallet: replace sort.Sort with sort.Slice in channel.go
Use sort.Slice in SignNextCommitment function in lnwallet/channel.go,
as part of the move to use new language features. Remove
sortableSignBatch type wrapper for slice of signJobs since it is
no longer needed to sort jobs according to their output indices.
Also fix a few minor typos in channel.go and sigpool.go.
2017-10-02 23:13:47 -07:00
Olaoluwa Osuntokun
b5044e9217
lnwallet: introduce the sigPool struct to optimize state creation+verification
This commit introduce a new struct which acts as a companion struct to
the channel state machine struct. With the new commitment state
machine, we require a signature to be signed and validated for each
outstanding non-trimmed HTLC within the commitment state. As it’s
possible to have hundreds of HTLC’s on a given commitment transaction,
rather than perform all ECDSA operations in serial, we instead aim to
parallelize the computation with a worker pool of sign+verify workers.

The two primary methods of the sigPool are SubmitVerifyBatch and
SubmitSignBatch which allow a caller to trigger an asynchronous job
execution when creating or validating a new commitment state.
2017-07-30 17:50:06 -07:00