Commit Graph

38 Commits (master)

Author SHA1 Message Date
George Tsagkarelis 33fdde949f
loop: fix loopout and client tests for sweeper integration 3 months ago
George Tsagkarelis e0d85958f7
multi: move StoreMock to loopdb 3 months ago
Oliver Gugger 08026dab93
multi: update linter, fix issues 7 months ago
sputn1ck 960a78be3d
protocol: set musig2 to be the stable version
This commit changes the stable protocol version to be the Musig2 protocol.
The experimental version is set to the stable version
in order for the flag to still work if a user has it set.
1 year ago
sputn1ck 4baf88c414
multi: fix linter issues
This commit fixes outstanding linter issues, that we're not found by
running `make lint` locally. The linter issues were found by running
`docker run -v $(pwd):/build loop-tools golangci-lint run --whole-files`

I added the `revive` to the excludes as it would be to much of a
refactor and IMO seems unneccesary. E.g.
`interface.go:222:6: exported: type name will be used as
loop.LoopInTerms by other packages, and that stutters; consider
 calling this InTerms (revive)`. I think `loop.LoopInTerms` is fine.
1 year ago
Andras Banki-Horvath 049b17ff96
misc: refactor loop tests to use require where possible 1 year ago
Andras Banki-Horvath 5d7b0abdf5
loopout: add unit test for the MuSig2 sweep case 2 years ago
Andras Banki-Horvath 82b58e5c0e
loopout: attempt cooperative musig2 sweep
This commit adds optional cooperative musig2 sweep by calling the server
to create a partial signature for the sweep if we'd otherwise be allowed
to spend the htlc. If the cooperative musig2 spend fails, we always fall
back to use the scriptpath spend.
2 years ago
Andras Banki-Horvath d3401f809f
loopout: fix flaky loopout preimage push and expiry tests 2 years ago
Andras Banki-Horvath 391ef57ea3
loopout: enable p2tr without keyspend 2 years ago
Oliver Gugger d5952f1202
multi: bump all dependency to use lnd 0.15.0-beta.rc4
This commit bumps all dependencies to be in line with what's required
for the current release candidate of lnd 0.15.0-beta.
2 years ago
sputn1ck efb6f75d60
swap: add lasthop, outgoingchanids to swapinfo 2 years ago
sputn1ck a1271fee40
multi: fix linter issues 2 years ago
Harsha Goli 7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2 years ago
Carla Kirk-Cohen 7a3e3bdad0
Merge pull request #368 from yyforyongyu/fix-test
loopout: fix TestCustomSweepConfTarget
3 years ago
carla f166ce899d
loopout: cancel swap with server when off-chain fails 3 years ago
carla 16111352a8
multi: add cancel swap function to execute config 3 years ago
carla 9db8bd5f2a
loopout: do not reveal preimage if time to safe reveal has passed 3 years ago
yyforyongyu 8d4404a8fb
loopout: add test for checking preimage reveal after timeout 3 years ago
carla ab9a662758
loop/test: simplify preimage push test to be less dependent on height
Our preimage push test previously relied on our dropping down to the
default sweep conf target to mock a drop in chain fees. This makes
our test dependent on height, which makes changes to our sweep logic
regarding when we reveal our preimage break this test. In this commit
that logic is replaced with simply locking our mock and updating fees
on the fly.
3 years ago
yyforyongyu 11758dc388
loopout: fix TestCustomSweepConfTarget 3 years ago
Joost Jager c8666caf20
loopin: mpp pre-swap probe 4 years ago
carla 1877b7f08b
multi: store loop out htlc confirmations on disk
To allow users to specify differing confirmation targets, we store the
swap conf target per-swap. This makes us restart safe, so we do not
forget confirmation values for swaps that are in flight when we restart.
4 years ago
Joost Jager 43323ffbe2
loopout: extend htlc expiry based on conf target 4 years ago
Joost Jager 85eb3d0fee
loopout/test: prevent modification of global test request 4 years ago
Joost Jager 8b215edaa2
multi: create init result structs 4 years ago
Joost Jager e22524a262
loopout: register for confirmation using htlc tx hash 4 years ago
Joost Jager 3e71ff0c81
loopdb: strongly typed constants 4 years ago
Joost Jager 0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 4 years ago
carla 65c847674d
multi: add preimage push to loop out after sweep attempt
Once we have revealed our preimage to the world with a sweep attempt,
we can safely push our preimage to the server to speed up on chain
claim.

Rather than rely on the server, we use the state of our invoice in lnd
to determine whether we should continue trying to push the preimage to
the server.
4 years ago
carla 2ebbc78131
swap: add constructor for swap config 4 years ago
Joost Jager 8c544bf2ba
loopdb: store outgoing channel set
Upgrade the database schema to allow for multiple outgoing channels.
This is implemented as an on-the-fly migration leaving the old key in
place.
4 years ago
Joost Jager c6697da90b
loopout/test: test payment parameters 4 years ago
Joost Jager a05e46697d
test: assert raw output signing requests 4 years ago
Oliver Gugger b574e344ea
multi: add persistent logger 5 years ago
Oliver Gugger 36838cf7f4
multi: fix most obvious linter errors 5 years ago
Wilmer Paulino e0d23cb180
loopout: compare delta from htlc expiry correctly
This addresses an issue where using a sweep confirmation target greater
than the default would result in most cases not revealing the preimage
due to the default confirmation target yielding a higher fee than the
max miner fee backed by the confirmation target provided.
5 years ago
Olaoluwa Osuntokun 94f347e673
multi: finalize rename from uncharge to loop out 5 years ago