Commit Graph

1570 Commits (6db2a393318db2ac80face6ec86c4e23ac7c6093)
 

Author SHA1 Message Date
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
2 weeks ago
András Bánki-Horváth 35d27fa0e2
Merge pull request #821 from bhandras/support-incomplete-mocks 2 weeks ago
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.
2 weeks ago
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.
2 weeks ago
Slyghtning 64b0e24419
Merge pull request #818 from hieblmi/in-batch-logging
sweepbatcher: log confirmed batch tx id
2 weeks ago
Slyghtning 3ee3963030
sweepbatcher: log confirmed batch tx id 2 weeks ago
András Bánki-Horváth 634fbbcba2
Merge pull request #819 from bhandras/store-mock-mx
loopdb: properly lock store mock for concurrent access
2 weeks ago
Andras Banki-Horvath bd5418337c
loopdb: properly lock store mock for concurrent access 2 weeks ago
Boris Nagaev 8978afede9
Merge pull request #817 from starius/fix-typo
sweepbatcher: fix typo in log message
3 weeks ago
Boris Nagaev dba3d15b02
sweepbatcher: fix typo in log message 3 weeks ago
Boris Nagaev 9751780fae
Merge pull request #815 from starius/publish-errors-handler
sweepbatcher: add option WithPublishErrorHandler
3 weeks ago
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.
3 weeks ago
Boris Nagaev 6b852c1c0b
go.mod: update btcwallet
Update it to the version having symbol chain.ErrInsufficientFee.
3 weeks ago
Boris Nagaev 54bf02294e
go.mod: update lnd to v0.18.3-beta.rc1
This is needed to update btcwallet dependency.
3 weeks ago
Boris Nagaev 898efbf2ae
sweepbatcher: fix godoc 3 weeks ago
Boris Nagaev 876ed401db
Merge pull request #813 from starius/sweepbatcher-max-inputs
sweepbatcher: set max batch size to 1000 sweeps
3 weeks ago
Boris Nagaev 7780aca492
sweepbatcher: log the reason of acceptance failure
Add Info log message in cases when addSweep returns accept=false and err=nil.
3 weeks ago
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.
3 weeks ago
Boris Nagaev a6e9a2b652
Merge pull request #791 from starius/sweepbatcher-mixed-batches
sweepbatcher: add mixed batches as an option
4 weeks ago
Boris Nagaev b171f76b27
sweepbatcher: make greedy algo mixed batch aware 4 weeks ago
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.
4 weeks ago
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).
4 weeks ago
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.
4 weeks ago
Boris Nagaev 2c2c427a6d
sweepbatcher: factor out method createPsbt
Unload method publishBatchCoop. Also this code will be reused in new method
for mixed batches soon.
4 weeks ago
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.
4 weeks ago
András Bánki-Horváth ff144c7e25
Merge pull request #812 from bhandras/use-looprpc-tag
build: use tagged looprpc v1.0.0
4 weeks ago
Andras Banki-Horvath dbc56ff8c9
build: use tagged looprpc v1.0.0 4 weeks ago
András Bánki-Horváth b76163ffcb
Merge pull request #811 from bhandras/looprpc-mod
looprpc: Convert looprpc into a Versioned Module
4 weeks ago
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.
4 weeks ago
Boris Nagaev 07791664c6
Merge pull request #809 from starius/sweepbatcher-tx-label
sweepbatcher: customize transaction labels
1 month ago
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.
1 month ago
Boris Nagaev 98fa740375
Merge pull request #801 from starius/sweepbatcher-wait
sweepbatcher: add options WithInitialDelay and WithPublishDelay
1 month ago
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.
1 month ago
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.
1 month ago
Boris Nagaev e178d32717
sweepbatcher: add option WithInitialDelay
WithInitialDelay instructs sweepbatcher to wait for the duration provided
after new batch creation before it is first published. This facilitates
better grouping. It only affects newly created batches, not batches loaded from
DB, so publishing does happen in case of a daemon restart (especially important
in case of a crashloop). Defaults to 0s. If a sweep is about to expire (time
until timeout is less that 2x initialDelay), then waiting is skipped.
1 month ago
Boris Nagaev 429eb85e14
sweepbatcher: use lnd/clock for timers
Added option: WithClock. Use it for publishDelay timer.
It will be used for testing.
1 month ago
Boris Nagaev d7fa4ab94d
test.Guard: make timeout configurable 1 month ago
Boris Nagaev be69653bf0
sweepbatcher/store: remove unused field clock 1 month ago
Boris Nagaev ce4a4d97a5
sweepbatcher: rename a private const
Renamed defaultPublishDelay to defaultTestnetPublishDelay. Its godoc was already
for defaultTestnetPublishDelay, but the const was named defaultPublishDelay.
1 month ago
Boris Nagaev 6d3a488f2f
Merge pull request #802 from lightninglabs/dependabot/go_modules/github.com/docker/docker-25.0.6incompatible
build(deps): bump github.com/docker/docker and cli from 24.0.9+incompatible to 27.1.1+incompatible
1 month ago
Boris Nagaev 1aec52c719
go.mod: update docker and cli to 27.1.1
Fix build in https://github.com/lightninglabs/loop/pull/802
1 month ago
dependabot[bot] fa3b9b3a96
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.9+incompatible to 25.0.6+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v24.0.9...v25.0.6)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
1 month ago
Boris Nagaev 7cfee83912
Merge pull request #804 from starius/fix-AddSuccessToEstimator
swap: fix leaf estimation in AddSuccessToEstimator
1 month ago
Boris Nagaev fa8703f052
swap: fix leaf estimation in AddSuccessToEstimator
According to AddTapscriptInput's godoc, the first argument (leafWitnessSize)
must include not the whole size of witness, but only the size of data consumed
by the revealed script. Previously the value was too high, because it also
included the following extra elements: number_of_witness_elements (1 byte),
witness script and its size, control block and its size.

Tests for greedy_batch_selection were affected by this change.
1 month ago
András Bánki-Horváth a5180ffcd3
Merge pull request #808 from drawdrop/master
chore: fix some function names
1 month ago
drawdrop b4193dfb28 chore: fix some function names
Signed-off-by: drawdrop <cricis@icloud.com>
1 month ago
András Bánki-Horváth 44d46010a0
Merge pull request #807 from lightninglabs/alexbosworth-patch-5 1 month ago
Alex Bosworth c367598869
version: bump version to v0.28.7-beta 1 month ago
Boris Nagaev 0c8d12a75e
Merge pull request #806 from starius/client-last-hop
client: fill LastHop in FetchSwaps
1 month ago
Boris Nagaev ed3db3bab2
client: fill LastHop in FetchSwaps
Loop used to "forget" last_hop of swaps created before its restart.
The commit fixes this.

Added test TestFetchSwapsLastHop for this. Filled field abandonChans in test
utility function newSwapClient because the field is used in new test.

Fixes https://github.com/lightninglabs/loop/issues/798
1 month ago