Commit graph

2089 commits

Author SHA1 Message Date
Boris Nagaev
dfad554d43
cmd/loop: parse string slice as string slice
Previously it was parsed as a single JSON string. Now each hint is parsed
individually.
2025-10-07 14:05:13 -03:00
Boris Nagaev
5fa5a4e1b8
cmd/loop: parse start_time_ns as int, not string
urfave/cli/v3 returns "" if an int flag is accessed using String getter.
2025-10-07 14:05:13 -03:00
Boris Nagaev
e8f5a54b22
cmd/loop: parseAmt fails in negative amounts 2025-10-07 14:05:13 -03:00
Boris Nagaev
ea9f902de2
cmd/loop: parse --amt as int, not as string
urfave/cli/v3 returns "" if an int flag is accessed using String getter.
2025-10-07 14:05:13 -03:00
Boris Nagaev
dfb16df6ad
cmd/loop: hide command forceautoloop
It is not intended for prod use. Those who need it can still use it.
2025-10-07 14:05:13 -03:00
Slyghtning
3323beaaeb
Merge pull request #1014 from hieblmi/fix-static-quote
staticaddr: fix static quote
2025-10-07 11:33:44 +02:00
Slyghtning
39b3752480
cmd: print quoted amount from InQuoteRequst 2025-10-07 11:13:44 +02:00
Slyghtning
68baebf478
loopd: return quoted amount in InQuoteResponse 2025-10-07 11:13:44 +02:00
Slyghtning
f840852e8d
looprpc: add quoted amount in InQuoteResponse 2025-10-07 11:13:43 +02:00
Slyghtning
c1ab1f36cf
Merge pull request #1009 from hieblmi/fast-flag
staticaddr: fast-flag
2025-10-07 10:03:01 +02:00
Slyghtning
f05b0e630c
cmd: positional amount flag for staticaddr loop-in 2025-10-07 09:14:17 +02:00
Slyghtning
25485226e4
cmd: staticaddr fast-flag support 2025-10-07 09:12:39 +02:00
Slyghtning
aaeeefee00
loop: handle fast-flag in legacy loop-in 2025-10-07 09:12:39 +02:00
Slyghtning
168420c28d
loopd: fast-flag in GetLoopInQuote and StaticAddressLoopIn 2025-10-07 09:12:38 +02:00
Slyghtning
51258af025
staticaddr: fast-flag support
--fast allows the client to expedite the publishing
of on-chain swap transactions with change, e.g. if --amount was specified.
2025-10-07 08:53:39 +02:00
Slyghtning
422bcd7077
sweepbatcher: fast-flag enables zero delay publishing 2025-10-07 08:53:39 +02:00
Slyghtning
92a8726e07
loopdb: staticaddr fast flag migration and queries 2025-10-07 08:53:36 +02:00
Slyghtning
83c86661d3
swapserverrpc: fast flag for ServerLoopInQuoteRequest and ServerStaticAddressLoopInRequest 2025-10-07 08:52:56 +02:00
Slyghtning
8464e4c687
looprpc: fast flag for QuoteRequest and StaticAddressLoopInRequest 2025-10-07 08:51:34 +02:00
Boris Nagaev
d346cb364d
Merge pull request #1012 from starius/sweepbatcher-close-add-race
sweepbatcher: harden AddSweep race handling
2025-10-06 11:30:58 -03:00
Boris Nagaev
d90b4c25a7
sweepbatcher: harden AddSweep race handling
Re-ordered the cleanup in handleSweeps so completed batches are deleted only
after any re-add attempt, preventing a finished batch from being dropped before
it can absorb the re-add.

Added a fresh status/parent-batch lookup inside handleSweeps so the logic now
reacts to swaps that complete between AddSweep and the event-loop handler; fully
confirmed sweeps are routed straight to monitorSpendAndNotify instead of
spawning a duplicate batch.

Added regression test testSweepBatcherHandleSweepRace, which replays the
AddSweep/confirmation race and verifies that only the original batch remains and
the sweep keeps its parent assignment.
2025-10-03 02:29:37 -03:00
Boris Nagaev
9f8f4e6bea
Merge pull request #1007 from starius/docker-release
Docker release
2025-09-30 16:15:44 -03:00
Boris Nagaev
aec03c1e0b
release.sh: set -buildid to ''
If Go binary itself comes from `go install golang.org/dl/go1.24.6@latest` it
embeds a different BuildID. We unset BuildID to enforce reproducibility.
2025-09-30 14:15:47 -03:00
Boris Nagaev
25c5618684
release.sh: fix green and red messages on Mac 2025-09-30 12:02:12 -03:00
Boris Nagaev
260b90d1af
release.sh: check Go version, provide GO_CMD var 2025-09-30 11:37:46 -03:00
Boris Nagaev
6d8872f995
release.sh: reproducible gzip on Mac
Make sure we use GNU gzip. Mac by default uses BSD gzip.
2025-09-29 22:24:10 -03:00
Boris Nagaev
a34b46c760
release.sh: remove the clonned dir with -rf
Otherwise it asks confirmation to remove tmp-.../.git dir.
2025-09-29 12:10:31 -03:00
Boris Nagaev
2464e942ec
release.sh: use git describe --abbrev=10
Without --abbrev flag it may produce different number of hash characters
on different instances. It depends on the state of Git repo itself.
2025-09-29 11:27:25 -03:00
Boris Nagaev
35d0fa26ac
docs: describe "make docker-release" 2025-09-29 11:24:08 -03:00
Boris Nagaev
2f3edb913b
release.sh: print sha256 hash of manifest file 2025-09-29 11:24:08 -03:00
Boris Nagaev
ec53b0d2d4
release.sh: make the list of tags reproducible
When doing git-clone to a subdir, do not keep tags, since there can be local
tags affecting `git describe` and buildvcs info. Instead pull the tags from
upstream.
2025-09-29 11:24:08 -03:00
Boris Nagaev
a889fbecb3
release.sh: collect artifacts in intermediate dir
Collect artifacts in "tmp-..." instead of final place. If build fails in the
middle, we don't want to leave the artifacts directory with partial result.

Also remove the build directory (with Git clone) in the end.
2025-09-29 11:24:08 -03:00
Boris Nagaev
9c138039d2
release.sh: build Go in reproducible way
Added -trimpath to remove absolute paths from the binary.
2025-09-29 11:24:08 -03:00
Boris Nagaev
9e8cde5556
release.sh: make reproducible .zip and .tar.gz
Took the code for reproducible packing from LND.
2025-09-29 11:24:08 -03:00
Boris Nagaev
0e30dc92c2
release.sh: git clone before building
Create a temporary directory inside loop/ directory and make a clone of Git repo
to that dir. This ensures that the version built is exactly what is committed
without any unstaged files and not dirty.
2025-09-29 11:24:08 -03:00
Boris Nagaev
3150aa5641
release.sh: fix building untagged commits
To test "make docker-release" it is convenient to pass a regular commit to it
(an output of `git describe`). In this commit release.sh is changed to detect
such "tags" and skip tag signature verification for it.

Also if release.sh is used without an argument, a unique directory name is
generated from the current time.
2025-09-29 11:24:08 -03:00
Boris Nagaev
8a357059f0
make: fix green prints
Previous version produces escapped sequnces as text (Debian 12).
2025-09-29 11:24:08 -03:00
Boris Nagaev
f70678f863
make: add target "docker-release"
"make docker-release tag=..." produces the same binaries regardless on
the platform and the installed Go version, because it uses Docker.
2025-09-29 11:24:08 -03:00
Boris Nagaev
c9e2467ac2
Merge pull request #1008 from starius/fix-sb-dust-main-output-test
sweepbatcher: fix flacky TestPresigned/dust_main_output
2025-09-29 02:13:44 -03:00
Boris Nagaev
e3a0587dfe
sweepbatcher: fix TestPresigned/dust_main_output
The Problem:
The test TestPresigned/dust_main_output was causing a deadlock. When the test
called batcher.AddSweep for the second time (with a valid sweep), the batcher
would create a new batch and attempt to register for a spend notification.
However, the test was not waiting for or consuming this notification
registration, leading to a blocked goroutine and a timeout.

The Fix:
I have added a line to the test to consume the spend notification registration
from the mock lnd's channel, similar to how other tests in the same file are
structured. This prevents the deadlock.

The problem was introduced in commit 54652dc641.
2025-09-28 20:57:00 -03:00
Slyghtning
00cc90b547
Merge pull request #1006 from hieblmi/fix-swap-change
staticaddr: ignoreUnknown flag for DepositsForOutpoints
2025-09-26 13:42:27 +02:00
Slyghtning
55081cd8fe
staticaddr: ignoreUnknown flag for DepositsForOutpoints 2025-09-26 12:03:48 +02:00
Slyghtning
7c41ec579a
Merge pull request #887 from hieblmi/static-arb-amount-swap
staticaddr: fractional swap amount
2025-09-25 11:32:40 +02:00
Slyghtning
a877cfdc4c
staticaddr: checkChange method for sweep signing 2025-09-25 11:13:35 +02:00
Slyghtning
221372b5ef
sweepbatcher: relax output constrained in monitorConfAndNotify 2025-09-25 11:13:35 +02:00
Slyghtning
a012430596
loopd: fractional static address swap amount 2025-09-25 11:13:35 +02:00
Slyghtning
2ee772b251
staticaddr: selected swap amount migration
The selected_amount column of all previous
swaps is filled with the total value of
deposits that partook in these swaps.
2025-09-25 11:13:35 +02:00
Slyghtning
23f6c24c0c
staticaddr: fix swap amount in listswaps command 2025-09-25 11:13:34 +02:00
Slyghtning
95a456791b
loopd: deposit selection for GetLoopInQuote
If a quote request contains an amount and flag
SelectDeposits set to true the quoting coin-
selects the required deposits to meet the
swap amount in order to quote for the number
of deposits.
2025-09-25 11:13:34 +02:00
Slyghtning
581761a12f
staticaddr: arbitrary loop-in amount
In this commit we add a new function SelectDeposits
to the loop-in manager. It coin-selects deposits that
meet an arbitrary swap amount provided by the client.
We have to ensure that the server creates the correct
change outputs for the htlc- and sweepless sweep
transactions.
2025-09-25 11:13:34 +02:00