Commit Graph

39 Commits (master)

Author SHA1 Message Date
Slyghtning 855fa8dccf
unit: adjust for incorrect amount sweep 3 months ago
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
Slyghtning ce6f82626b
unit: abandon swap 5 months ago
sputn1ck becc8a38d8
multi: use context in loopdb call
This commit adds a context to our loopdb interface, which we should use
in the sqlite migration.
11 months ago
Andras Banki-Horvath cd91f90ed2
loop: use MuSig2 1.0 scheme for the new MuSig2 swaps 1 year ago
Andras Banki-Horvath da4bcbea10
loopdb: refactor the SwapContract to hold all HTLC keys
This commit adds a new struct to hold all HTLC keys and refactors the
SwapContract which is used by both loopin and loopout swaps to use this
new struct. The newly added internal keys will for now hold the script
keys to keep everything equivalent but are already stored and read back
if the protocol version is set to MuSig2.
1 year ago
Andras Banki-Horvath e8cfe4cea9
swap: pass in MuSig2 version when creating taproot HTLCs
This commit adds the MuSig2 version as an input parameter when creating
Taproot htlcs. This will allow us to create both old and new MuSig2
Taproot HTLCs correctly.
1 year ago
Andras Banki-Horvath a7451622e5
mod: bump LND and lndclient to include musig2 1.0rc2 changes
This commit bumps LND and lndclient to make it possible to upgrade
taproot HTLC construction with a MuSig2 version. This is required to
support both old (MuSig2 0.4) and new (MuSig2 1.0) clients.
1 year ago
Andras Banki-Horvath 049b17ff96
misc: refactor loop tests to use require where possible 1 year ago
Andras Banki-Horvath bdb4b773ed
swap: refactor htlc construction to allow passing of internal keys
This commit is a refactor of how we construct htlcs to make it possible
to pass in internal keys for the sender and receiver when creating P2TR
htlcs. Furthermore the commit also cleans up constructors to not pass in
script versions and output types to make the code more readable.
1 year ago
Andras Banki-Horvath 88956455b4
multi: completely remove support for NP2WSH htlcs
This commit removes all code related to NP2WSH htlcs. These were
historically used when segwit adoption was very sporadic and are not
used anywhere anymore. Some historical swaps stored in the DB may be
listed with incorrect htlc adresses from here on.
2 years ago
Andras Banki-Horvath 901a935514
loopin: enable p2tr htlcs without keyspend 2 years ago
Andras Banki-Horvath 9610becebd
multi: add the aggregate internal pubkey to the v3 htlc 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 dec6dd7e70
swap: HTLCV3 added
In this commit we add the version 3 htlc, which is implemented with
taproot script spending the two payment paths: the claim path case, and
the timeout case.
2 years ago
Harsha Goli 7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2 years ago
carla d1c26a20da
multi: surface server swap initiation grpc error codes
Formatting our error was stifling any grpc error returned by the
server. Instead, we bubble up our grpc error, setting an unknown
code if the server did not specifically return an error code.
3 years ago
carla cae72b5848
loopin/test: move invoice updates to loopin test context 3 years ago
carla 4911130671
loopin: store loop in on-chain fees 3 years ago
Oliver Gugger 2a732a4385
loop: add initiator string to user agent 4 years ago
Andras Banki-Horvath 98bdbcddfb tests: extend tests to also test resuming with HTLC v2 4 years ago
Andras Banki-Horvath 9fdd531130
swap: add HTLC script version 4 years ago
Joost Jager 8b215edaa2
multi: create init result structs 4 years ago
Joost Jager f91422d188
loopin: record htlx tx hash 4 years ago
Joost Jager a3b7fa5977
loopin: fail swap when htlc amount is incorrect
Previously the swap would get stuck in a state where it wouldn't ever
progress because the server rejected the htlc.
4 years ago
Joost Jager 0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 4 years ago
carla 2ebbc78131
swap: add constructor for swap config 4 years ago
Andras Banki-Horvath 0aa978bd09 loopin: modify internally published htlc to use p2wsh 4 years ago
Andras Banki-Horvath f0aff9b7bd looprpc+loopin: support for native segwit htlcs
This commit extends SwapResponse and SwapStatus with np2wsh and p2wsh
htlc output addresses to support both nested and native segwit htlcs
in loop-in.

Furthermore the commit adds support for native segwith loop-in htlcs.
When the htlc is paid internally, as of this commit we'll use NP2WSH,
otherwise users are free to select whether to pay the NP2WSH or the
P2WSH htlc.
4 years ago
Joost Jager 9aaef3fd07
loopin: use discovered htlc value for timeout tx 4 years ago
Joost Jager edac1a4054
loopin/test: extend test with external htlcs 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
Joost Jager 1b306ad425
loopdb: replace swap state enum by state data object
This commits lays down the foundation in the database for adding more
persistent state data to swaps.
5 years ago
Joost Jager 30c7d71c57
use np2wsh for loop in htlc 5 years ago
Joost Jager b5d2fb3894
loopd: add loop in state InvoiceSettled 5 years ago
Joost Jager 3e960b8b54
multi: loop in swap 5 years ago