Commit graph

1586 commits

Author SHA1 Message Date
Alex Bosworth
75dc20fe01
version: bump version to v0.28.8-beta 2024-10-15 13:58:42 -07:00
Boris Nagaev
2c32575c75
Merge pull request #833 from starius/sweepbatcher-feerate-grows
sweepbatcher: make sure feerate does not decrease
2024-10-15 12:43:56 -03:00
Boris Nagaev
864d7f24cd
sweepbatcher: make sure feerate does not decrease
Previous behaviour was to overwrite batch's feerate with minFeeRate of
its primary sweep, which could be lower that previus batch's feerate or
lower that feerate of some other sweep.

Instead, batch's feerate only grows and never declines and is at least as high
as the highest feerate of its sweeps.

Added a test to verify this.
2024-10-15 11:28:40 -03:00
Slyghtning
f0a25f9429
Merge pull request #832 from hieblmi/log-loop-validation
loopout: trace logs for hasBandwidth mpp check
2024-10-15 11:19:38 +02:00
Slyghtning
caa8cc850d
loopout: trace logs for hasBandwidth mpp check 2024-10-15 10:08:31 +02:00
Konstantin Nick
8bc6b61de1
Merge pull request #826 from sputn1ck/generalized_notif_stream
Generalized notif stream
2024-10-08 15:15:43 +02:00
sputn1ck
7409ae73c6
loopd: add notification manager
This commit adds the notification manager to the
loopd daemon.
2024-10-08 14:58:41 +02:00
sputn1ck
5df53cd81a
notifications: add notification manager
This commit adds a generic notification manager
that can be used to subscribe to different types
of notifications.
2024-10-08 14:58:41 +02:00
sputn1ck
6408ec8e7e
reservation: remove notifications from reservation
This commit removes the notification stream from
the reservation manager and replaces it with a
subscriber interface.
2024-10-08 14:58:37 +02:00
András Bánki-Horváth
61c0b45897
Merge pull request #829 from bhandras/cost-migration-rpc-batchsize
loopd: allow setting RPC batch size when running cost migration
2024-10-08 14:55:31 +02:00
Konstantin Nick
5be132290a
Merge pull request #830 from sputn1ck/rpc_ntfn_stream
swapserverrpc: refactor reservation notifications
2024-10-07 12:04:50 +02:00
sputn1ck
cc1d942c7a
swapserverrpc: refactor reservation notifications
This commit refactors the proto definitions of the
reservation notifications to use a more generic
mechanism that can be used for other types of
notifications as well.
2024-10-07 11:57:31 +02:00
Boris Nagaev
96d321ece7
Merge pull request #825 from starius/swapserverrpc-looprpc
multi: do not rename swapserverrpc to looprpc
2024-09-25 12:42:10 -03:00
Boris Nagaev
af81f3b2bf
swapserverrpc: sync with server types 2024-09-22 13:31:03 -03:00
Andras Banki-Horvath
0e2a36004a
loopd: allow setting RPC batch size when running cost migration
Previously we defaulted to fetching 1000 payments at a time when running
the cost migration however due to slowness on LND side this may prevent
the migration from completing due to RPC timeout kicking in. This commit
adds a new config value to give more control to the user by setting the
batch size as needed.
2024-09-20 10:13:48 +02:00
Boris Nagaev
8447f58ff9
multi: do not rename swapserverrpc to looprpc
Many imports renamed it, but it was not needed.
2024-09-10 09:54:17 -03:00
András Bánki-Horváth
6db2a39331
Merge pull request #816 from lightninglabs/dependabot/go_modules/github.com/jackc/pgx/v5-5.5.4
build(deps): bump github.com/jackc/pgx/v5 from 5.3.1 to 5.5.4
2024-09-03 18:20:56 +02:00
András Bánki-Horváth
35d27fa0e2
Merge pull request #821 from bhandras/support-incomplete-mocks 2024-09-02 19:25:55 +02:00
Andras Banki-Horvath
a55c461a8f
test: support incomplete mocks
Updating the mocks to be complete implementation of the underlying
interfaces is not always possible due to cross dependency issues.
This commit embeds the interfaces into the mocks so we can at least
always compile them.
2024-09-02 18:49:22 +02:00
dependabot[bot]
d160112610
build(deps): bump github.com/jackc/pgx/v5 from 5.3.1 to 5.6.0
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.3.1 to 5.6.0.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.3.1...v5.6.0)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: indirect
...

The commit was updated by Boris to bump the version to 5.6.0.
2024-09-02 12:30:57 -03:00
Slyghtning
64b0e24419
Merge pull request #818 from hieblmi/in-batch-logging
sweepbatcher: log confirmed batch tx id
2024-09-02 16:00:53 +02:00
Slyghtning
3ee3963030
sweepbatcher: log confirmed batch tx id 2024-09-02 15:42:51 +02:00
András Bánki-Horváth
634fbbcba2
Merge pull request #819 from bhandras/store-mock-mx
loopdb: properly lock store mock for concurrent access
2024-09-02 14:23:41 +02:00
Andras Banki-Horvath
bd5418337c
loopdb: properly lock store mock for concurrent access 2024-09-02 13:35:38 +02:00
Boris Nagaev
8978afede9
Merge pull request #817 from starius/fix-typo
sweepbatcher: fix typo in log message
2024-09-01 22:07:26 -03:00
Boris Nagaev
dba3d15b02
sweepbatcher: fix typo in log message 2024-09-01 13:00:36 -03:00
Boris Nagaev
9751780fae
Merge pull request #815 from starius/publish-errors-handler
sweepbatcher: add option WithPublishErrorHandler
2024-08-28 13:12:38 -03:00
Boris Nagaev
7c93dff830
sweepbatcher: add option WithPublishErrorHandler
WithPublishErrorHandler sets the callback used to handle publish errors.
It can be used to filter out noisy messages.
2024-08-27 19:26:29 -03:00
Boris Nagaev
6b852c1c0b
go.mod: update btcwallet
Update it to the version having symbol chain.ErrInsufficientFee.
2024-08-27 19:26:29 -03:00
Boris Nagaev
54bf02294e
go.mod: update lnd to v0.18.3-beta.rc1
This is needed to update btcwallet dependency.
2024-08-27 19:26:29 -03:00
Boris Nagaev
898efbf2ae
sweepbatcher: fix godoc 2024-08-27 10:57:41 -03:00
Boris Nagaev
876ed401db
Merge pull request #813 from starius/sweepbatcher-max-inputs
sweepbatcher: set max batch size to 1000 sweeps
2024-08-27 10:03:36 -03:00
Boris Nagaev
7780aca492
sweepbatcher: log the reason of acceptance failure
Add Info log message in cases when addSweep returns accept=false and err=nil.
2024-08-26 20:53:29 -03:00
Boris Nagaev
f21a21ee41
sweepbatcher: set max batch size to 1000 sweeps
This is needed to avoid non-standard batch transactions (larger than 400k wu).
A non-cooperative input is 393 wu, so 1000 inputs are still under 400k wu.
2024-08-26 14:17:24 -03:00
Boris Nagaev
a6e9a2b652
Merge pull request #791 from starius/sweepbatcher-mixed-batches
sweepbatcher: add mixed batches as an option
2024-08-21 14:11:24 -03:00
Boris Nagaev
b171f76b27
sweepbatcher: make greedy algo mixed batch aware 2024-08-21 14:05:50 -03:00
Boris Nagaev
d007cf6e20
sweepbatcher: use coopFailed in greedy selection
Treat coopFailed flag the same as nonCoopHint. The former is what we found in
previos signing attempts, the later is what the caller signalled to us.
2024-08-21 14:05:50 -03:00
Boris Nagaev
26eda00ef2
sweepbatcher: add mixed batches option
Option WithMixedBatch instructs sweepbatcher to create mixed batches with regard
to cooperativeness. Such a batch can include both sweeps signed both
cooperatively and non-cooperatively. If cooperative signing fails for a sweep,
transaction is updated to sign that sweep non-cooperatively and another round of
cooperative signing runs on the remaining sweeps. The remaining sweeps are
signed in non-cooperative (more expensive) way. If the whole procedure fails for
whatever reason, the batch is signed non-cooperatively (the fallback).
2024-08-21 14:05:50 -03:00
Boris Nagaev
58d9445bc5
test/signer_mock: return signatures of real size
Size of a signature affects the weight of transaction, which is verified
in tests.

Also method SignOutputRaw now returns the number of signatures matching
the number of signature descriptors to prevent crashes in tests where
multiple inputs are signed.
2024-08-21 14:05:50 -03:00
Boris Nagaev
2c2c427a6d
sweepbatcher: factor out method createPsbt
Unload method publishBatchCoop. Also this code will be reused in new method
for mixed batches soon.
2024-08-21 14:05:50 -03:00
Boris Nagaev
5cd6c0c83c
sweepbatcher: coopSignBatchTx accepts wire.MsgTx
... instead of psbt.Packet.

Make the code simpler. Function worked with packet.UnsignedTx only,
so it is easier to pass tx directly.
2024-08-21 14:05:50 -03:00
András Bánki-Horváth
ff144c7e25
Merge pull request #812 from bhandras/use-looprpc-tag
build: use tagged looprpc v1.0.0
2024-08-21 17:44:51 +02:00
Andras Banki-Horvath
dbc56ff8c9
build: use tagged looprpc v1.0.0 2024-08-21 17:36:09 +02:00
András Bánki-Horváth
b76163ffcb
Merge pull request #811 from bhandras/looprpc-mod
looprpc: Convert looprpc into a Versioned Module
2024-08-21 17:30:53 +02:00
Andras Banki-Horvath
64886dfc66
looprpc: convert looprpc into a versioned module
This commit transforms the looprpc subpackage into a versioned module.
By doing so, projects that rely solely on the generated RPC code from
the proto files will benefit from significantly reduced dependencies
during compilation.
2024-08-21 16:46:33 +02:00
Boris Nagaev
07791664c6
Merge pull request #809 from starius/sweepbatcher-tx-label
sweepbatcher: customize transaction labels
2024-08-13 10:46:20 -03:00
Boris Nagaev
7fb7c2bda1
sweepbatcher: customize transaction labels
Previously sweepbatcher used loop/labels.LoopOutBatchSweepSuccess to assign
transactions labels. The value is "BatchOutSweepSuccess -- $batch_id", which
does not fit use cases outside of loop-out. Now there is option WithTxLabeler
which sets a function used to generate the label.
2024-08-13 10:42:00 -03:00
Boris Nagaev
98fa740375
Merge pull request #801 from starius/sweepbatcher-wait
sweepbatcher: add options WithInitialDelay and WithPublishDelay
2024-08-13 10:34:32 -03:00
Boris Nagaev
9af6718089
sweepbatcher: test InitialDelay and PublishDelay
Tested scenarios:

1. For a regular sweep newly added it waits for initialDelay + publishDelay
   before publishing a transaction.
2. For a sweep recovered from DB it does not wait before publishing tx.
3. If a sweep is about to expire, initialDelay is skipped.
2024-08-13 10:28:11 -03:00
Boris Nagaev
3f56345492
sweepbatcher: add option WithPublishDelay
WithPublishDelay sets the delay of batch publishing that is applied in the
beginning, after the appearance of a new block in the network or after the
end of initial delay (see WithInitialDelay). It is needed to prevent
unnecessary transaction publishments when a spend is detected on that block.
Default value depends on the network: 5 seconds in mainnet, 0.5s in testnet.
For batches recovered from DB this value is always 0s.
2024-08-13 09:20:31 -03:00