Commit Graph

15515 Commits

Author SHA1 Message Date
dba4c8e5ad trivial: fix typo and nits 2023-10-23 13:01:52 +08:00
05fbe8b116 docs: update release note re RBF fix 2023-10-23 13:01:52 +08:00
0816f9124c itest: update itest to reflect new sweeper behavior 2023-10-23 13:01:50 +08:00
92837621ec sweep: remove possible RBF when creating sweeping tx for new inputs
This commit changes how we create the input sets which are used to
construct the sweeping transactions. Assume the sweeper has two inputs,
one is new and one is retried, we'd end up having two transactions,
- tx1: which spends both the new and old inputs.
- tx2: which spends the new inputs only.
When publishing these txes, depending on which one gets into the mempool
first, the other one will be viewed as an RBF for the first one since
they both spending the same input(the new input).

This is now fixed by only attempt to publish the second tx when there
isn't a first tx - when there is a tx1, it means the new inputs are
already used in this tx along with retried inputs, hence there's no need
to publish tx2 which spends the new inputs only.
2023-10-23 10:48:51 +08:00
acc15d8113 sweep: add new method rescheduleInputs and refactor sweep 2023-10-23 10:44:46 +08:00
7de4186766 sweep: simplify polling logic in sweeper
This commit attempts to make the polling logic in sweeper more linear.
Previously, the sweep's timer is reset/restarted in multiple places,
such as when a new input comes in, or a new block comes in, or a
previous input being spent, making it difficult to follow. We now remove
the old timer and replaces it with a simple polling logic - we will
schedule sweeps every 5s(default), and if there's no input to be swept,
we'd skip, just like the previous `scheduleSweep` does.
It's also worthy noting that, although `scheduleSweep` triggers the
timer to tick, by the time we do the actual sweep in `sweepCluster`,
conditions may have changed. This is now also fixed because we only have
one place to create the clusters and sweeps.
2023-10-23 10:24:58 +08:00
4ba09098d1 sweep+lnd: move ticker creation into sweeper 2023-10-23 10:24:58 +08:00
62b5869f87 sweep: add new method handleSweep 2023-10-23 10:24:58 +08:00
f1d0f9f74e sweep: add new method handleInputSpent 2023-10-23 10:24:58 +08:00
39a7cc6434 sweep: rename waitForSpend to monitorSpend to avoid confusion
The method `waitForSpend` makes it sounding like it's blocking while
it's not, thus it's renamed to avoid confusion.
2023-10-23 10:24:58 +08:00
39973687aa sweep: add new method handleNewInput 2023-10-23 10:24:58 +08:00
15f4213793 Merge pull request #7828 from ProofOfKeags/pong-enforcement
multi: pong enforcement
2023-10-19 21:50:08 +02:00
012cc6af8c peer: eliminate unnecessary log spam from received pong msgs 2023-10-19 09:26:50 -07:00
5762061487 docs: Update release notes to include pong enforcement 2023-10-19 09:26:50 -07:00
99226e37ef peer: Add machinery to track the state and validity of remote pongs
This commit refactors some of the bookkeeping around the ping logic
inside of the Brontide. If the pong response is noncompliant with
the spec or if it times out, we disconnect from the peer.
2023-10-19 09:26:45 -07:00
1eab7826d2 peer: abstract out ping payload generation from the pingHandler
This change makes the generation of the ping payload a no-arg
closure parameter, relieving the pingHandler of having to
directly monitor the chain state. This makes use of the
BestBlockView that was introduced in earlier commits.
2023-10-19 09:22:07 -07:00
ac265812fc peer+lnd: make BestBlockView available to Brontide 2023-10-19 09:22:07 -07:00
74b30a71cb lnd: start the BestBlockTracker during server startup 2023-10-19 09:22:07 -07:00
7c403b439c chainreg: Add BestBlockTracker to ChainControl
This commit takes the best block tracker and adds it to the
ChainControl objects and appropriately initializes it on
ChainControl creation
2023-10-19 09:22:07 -07:00
405d4e5f73 chainntnfs: introduce system for chain state tracking and querying
This change adds a new subsystem that is responsible for providing
an up to date view of some global chainstate parameters.
2023-10-19 09:22:07 -07:00
e1fb1e484a Merge pull request #7967 from morehouse/fuzz_onion
htlcswitch: fuzz onion encoding/decoding
2023-10-19 15:30:03 +00:00
812f4d9242 Merge pull request #8081 from bhandras/invoicedb-refactor
invoices: refactor `InvoiceDB` to eliminate `ScanInvoices`
2023-10-19 09:27:54 +00:00
9bdbd79bd2 Merge pull request #8094 from yyforyongyu/fix-rescan-race
gomod: update btcwallet re rescan race fix
2023-10-18 12:25:41 -07:00
bedafca49d docs: update release notes for 0.18.0 2023-10-18 16:15:59 +02:00
8bf7503aa4 invoices: remove the now unused ScanInvoices method 2023-10-18 16:15:58 +02:00
d7d385f78f invoices: refactor initial invoice scan when the registry starts
In this commit we change how we select invoices to follow or delete when
starting the InvoiceRegistry to instead of using the deperecated scan
func from channeldb, use specific functions to gather pending and delete
canceled invoices.
2023-10-18 16:15:58 +02:00
8ab267ad90 channeldb: add k/v implementation for InvoiceDB.DeleteCanceledInvoices method 2023-10-18 16:15:58 +02:00
1f8065de35 channeldb: add k/v implementation for InvoiceDB.FetchPendingInvoices 2023-10-18 16:15:57 +02:00
91d910872d Merge pull request #7715 from bshramin/http-client-timeout
lntest: set ReadHeaderTimeout for http client
2023-10-17 19:33:39 +00:00
59a20fe1d1 gomod: update btcwallet re rescan race fix 2023-10-18 01:31:27 +08:00
0c64a183cf lntest: add http header timeout to config 2023-10-17 11:25:06 -06:00
82838e4a62 Merge pull request #8090 from ziggie1984/add-additional-log-chan-closure
Add more information when a co-op close is failing.
2023-10-17 10:27:21 +00:00
b0bb853f77 Merge pull request #8092 from yyforyongyu/fix-peer-unit-test
multi: fix peer unit test and disable `paralleltest`
2023-10-17 10:18:27 +00:00
e8d865aba5 Merge pull request #7824 from yyforyongyu/sweeper-unit-test
input+sweep: make sure input with no fee rate is not added to cluster
2023-10-17 06:36:21 +00:00
a6f044b748 Merge pull request #8057 from Chinwendu20/tlv-bool
tlv: Added bool to primitive
tor/v1.1.3
2023-10-16 15:23:48 +00:00
844a792251 docs: Added release note
Signed-off-by: Ononiwu Maureen <amaka013@gmail.com>
2023-10-16 14:21:36 +01:00
206f773a9b tlv: Added bool to primitive
Signed-off-by: Ononiwu Maureen <amaka013@gmail.com>
2023-10-16 14:21:25 +01:00
d6c7200bb4 Merge pull request #8086 from lightningnetwork/dependabot/go_modules/tor/golang.org/x/net-0.17.0
build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /tor
2023-10-16 11:00:19 +00:00
55c5a33f6f Merge pull request #8087 from lightningnetwork/dependabot/go_modules/kvdb/golang.org/x/net-0.17.0
build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /kvdb
2023-10-16 10:59:59 +00:00
be9fb28ac1 build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /kvdb
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 10:45:31 +00:00
aa95469b1f build(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 in /tor
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 10:45:20 +00:00
cbb6e681a5 build(deps): bump github.com/btcsuite/btcd in /healthcheck (#8051)
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.22.0-beta.0.20220207191057-4dc4ff7963b4 to 0.23.2.
- [Release notes](https://github.com/btcsuite/btcd/releases)
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES)
- [Commits](https://github.com/btcsuite/btcd/commits/v0.23.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 12:44:27 +02:00
6a80530fff gomod: update btcwallet version (#8019) 2023-10-16 09:14:56 +02:00
fad7d3fe81 chore: pkg import only once (#8093)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-10-16 09:02:05 +02:00
e4dd911778 multi: clarify co-op closure failures. 2023-10-13 20:35:08 +02:00
d0edb47166 docs: update release notes 2023-10-13 17:00:53 +08:00
551102a0f3 sweep: fix make lint 2023-10-13 17:00:53 +08:00
34e0c7b5e0 input+sweep: make sure input with no fee rate is not added to cluster
This commit makes sure an input is only added to the cluster when it has
successfully estimated its fee rate. Previously, when an error is
returned from `feeRateForPreference`, we'd still add this input to the
cluster, resulting a **lower** fee rates being used because when
averaging the fee rates, we'd think this input has zero fee rate
specified.

An unit test is patched to make the method `clusterByLockTime` more
robust.
2023-10-13 17:00:53 +08:00
0532b82dd5 multi: add new method FeePerVByte to avoid manual conversion 2023-10-13 17:00:53 +08:00
a46168e669 sweep: remove redundant map inputFeeRates when creating cluster
This commit removes the map `inputFeeRates` inside `clusterByLockTime`
as the fee rate can already be access via `input.lastFeeRate`.
2023-10-13 17:00:53 +08:00