Commit graph

2058 commits

Author SHA1 Message Date
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
Slyghtning
4931fb9ccd
looprpc: fractional amount for static address loop-ins
The QuoteRequest adds a field auto_select_deposits to signal
that the specified quote amount should be coin-selected from
the client's deposits to determine the number of deposits to
quote for.
The StaticAddressLoopInRequest gets a new amount field that
either indicates that the swap amount should be allocated
from the passed deposits or coin-selected from all available
deposits.
2025-09-25 11:13:34 +02:00
Slyghtning
22ac716726
sqlc: add amount column to static swaps 2025-09-25 11:13:33 +02:00
Slyghtning
1a4f16fc20
Merge pull request #951 from hieblmi/swap-amount-rpcs
swapserverrpc: arbitrary static swap amount
2025-09-25 10:35:46 +02:00
Slyghtning
3b8ec72dbc
swapserverrpc: arbitrary static swap amount 2025-09-19 10:49:31 +02:00
Boris Nagaev
691c290739
Merge pull request #1005 from starius/agents
Updated README and architecture.md with Gemini, added AGENTS.md
2025-09-18 12:49:45 -03:00
Boris Nagaev
0c88b058eb
add file AGENTS.md
The whole project was analyzed by AI and the context was saved to the file.
This file is picked up by agents automatically and it should facilitate AI
understanding of the project.
2025-09-18 01:07:09 -03:00
Boris Nagaev
45d73ed5d4
README, docs: add static-ins and instant-outs 2025-09-18 01:07:09 -03:00
Slyghtning
ff91b51307
Merge pull request #1004 from hieblmi/withdraw-fixes
staticaddr: robustness fixes for withdrawals
2025-09-15 14:11:13 +02:00
Slyghtning
d0670f109b
staticaddr: add nil checks for withdrawals 2025-09-15 13:53:30 +02:00
Slyghtning
1f8f282b00
Merge pull request #1003 from hieblmi/recon-on-block
staticaddr: poll deposits on block arrival
2025-09-08 18:32:05 +02:00
Slyghtning
b36f1651a3
staticaddr: poll new deposits on block arrival 2025-09-08 16:52:36 +02:00
Boris Nagaev
cef0fae2ee
Merge pull request #1001 from starius/bump-lnd-0.19.3
bump LND to 0.19.3
2025-09-01 11:55:35 -03:00
Boris Nagaev
93f8bd454f
docker: bump Go from 1.23.12 to 1.24.6 2025-08-31 23:16:13 -03:00
Boris Nagaev
f721459ef0
bump LND to 0.19.3 2025-08-31 23:03:11 -03:00
Boris Nagaev
ae22323734
Merge pull request #998 from starius/loopin-skip-unnecessary-timeout-tx
loopin: no timeout tx if invoice was paid
2025-08-27 10:58:06 -03:00
Slyghtning
a1fb489a47
Merge pull request #996 from hieblmi/fix-971
staticaddr: monitor tx id of expiry sweep
2025-08-27 13:31:59 +02:00
Slyghtning
719701f149
Merge pull request #995 from hieblmi/listunspent-fix
staticaddr: filter unavailable deposits in `ListUnspentDeposits`
2025-08-27 13:26:23 +02:00
Slyghtning
a2cce3c2e2
Merge pull request #999 from hieblmi/more-logging
staticaddr: log errors in manager.Run
2025-08-27 13:26:00 +02:00
Slyghtning
0ee9a617e6
staticaddr: log errors in manager.Run 2025-08-26 09:47:18 +02:00
Boris Nagaev
a1d4ea9fda
loopin: no timeout tx if invoice was paid
This action is not needed, since the swap is complete.
Wait until the timeout anyway to be able to push the key on every block.
2025-08-26 02:38:38 -03:00
Slyghtning
a862f8ba60
test: unit test ListUnspentDeposits 2025-08-22 16:18:15 +02:00
Slyghtning
6ee4cf96f0
staticaddr: monitor tx id of expiry sweep 2025-08-22 16:14:18 +02:00
Slyghtning
d3a2badc8b
loopd: filter unavailable deposits in ListUnspentDeposits
ListUnspentRaw returns the unspent wallet view of the
backing lnd wallet. It might be that deposits show up
there that are actually not spendable because they
already have been used but not yet spent by the server.
We filter out such deposits in ListUnspentDeposits.
2025-08-22 15:54:19 +02:00
András Bánki-Horváth
70cf2d828f
Merge pull request #994 from lightninglabs/dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.4.0
build(deps): bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0
2025-08-21 17:26:52 +02:00
dependabot[bot]
7cbf765e11
build(deps): bump github.com/go-viper/mapstructure/v2
Bumps [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-viper/mapstructure/releases)
- [Changelog](https://github.com/go-viper/mapstructure/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-viper/mapstructure/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/go-viper/mapstructure/v2
  dependency-version: 2.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-21 14:52:54 +00:00
Slyghtning
c1607839e0
Merge pull request #987 from hieblmi/round-weight
fee: round up transaction weight to the nearest satoshi
2025-08-21 10:09:16 +02:00
Slyghtning
1930be8cc7
staticaddr: round up withdrawal tx weight to the nearest satoshi
this commit fixes issue
https://github.com/lightninglabs/loop/issues/966
2025-08-21 09:34:15 +02:00
Slyghtning
7c2f67643d
Merge pull request #991 from hieblmi/cli-show-deposits-and-swaphashes
staticaddr: show deposits and swap hashes in cli
2025-08-20 18:36:07 +02:00
Slyghtning
b2a4d7af2d
staticaddr: show deposits as part of cli swap output 2025-08-20 17:07:29 +02:00
Slyghtning
a41334dd3d
staticaddr: add swap hash to deposit structs 2025-08-20 16:58:20 +02:00
Slyghtning
98fece465d
Merge pull request #993 from hieblmi/asciicheck
gomod: update to Go 1.24.6 and `golangci-lint` v2
2025-08-19 22:26:00 +02:00