Commit graph

16105 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
d44c72b979
Merge pull request #8345 from yyforyongyu/use-testmempoolaccept
lnwallet: perform mempool acceptance check before publishing
2024-01-26 18:54:43 -08:00
Alex Sears
0767a2cbc0
routerrpc: unmarshal AMP record in route hop marshalling 2024-01-26 15:21:43 -05:00
Olaoluwa Osuntokun
0d37621bcb
Merge pull request #8420 from ProofOfKeags/cleanup/contractcourt/naming
contractcourt: rename files for package consistency
2024-01-25 15:23:02 -08:00
yyforyongyu
a614888797
lnwallet/test: fix testPublishTransaction for neutrino 2024-01-26 03:01:20 +08:00
yyforyongyu
d2ab35629a
lnwallet/test: fix ZMQ format 2024-01-26 03:01:20 +08:00
Yong
2f1468000d
Merge pull request #8421 from ProofOfKeags/refactor/lnwallet/redundant-fields
lnwallet: remove redundant unused fields
2024-01-26 02:59:08 +08:00
Andras Banki-Horvath
59ce7d9845
github: bump pull-resquest-stats to v2.11.0 2024-01-25 18:08:34 +01:00
Yong
b9a8e2f6d0
Merge pull request #8419 from bhandras/kvdb-embedded-postgres-upgrade
kvdb: embedded postgres upgrade to allow setting a custom `max_connections` config value
2024-01-25 23:18:46 +08:00
yyforyongyu
cb2c2e89dd
lnrpc: fix docs on ListPaymentsRequest 2024-01-25 19:49:29 +08:00
Keagan McClelland
9c2270a5ea lnwallet: remove redundant unused fields 2024-01-24 17:22:35 -08:00
Keagan McClelland
9b92b55b9b contractcourt: rename files for package consistency 2024-01-24 17:15:01 -08:00
yyforyongyu
783e914027
lnwallet/test: stop creating burning tx in tests
bitcoind v25.0 updated the `sendrawtransaction` RPC to have an optional
argument `maxburnamount` with a default value of 0. This means our
existing test that uses burning output cannot be published, hence, we
remove the usage of it in our tests and replace it with a normal tx.
2024-01-25 08:45:22 +08:00
Olaoluwa Osuntokun
11bafe84ff
lnwallet/test: add new tx publish sub-test for policy weight limits 2024-01-25 08:45:22 +08:00
Olaoluwa Osuntokun
a616fa3fb7
lnwallet/test: convert the tx publish tests to sub-tests 2024-01-25 08:21:11 +08:00
yyforyongyu
a6a8415a26
contractcourt: make sure ChainArbitrator is started properly
We should not fail to start the node if a republish attempt failed for a
channel's closing tx. Instead, we log an error to continue the startup
and let other channels continue their operations.
2024-01-25 07:54:39 +08:00
yyforyongyu
fb1c6ea6a7
btcwallet: proceed to call PublishTransaction on mempool errors
Previously, `PublishTransaction` in `btcwallet` will first mark the tx
label in db first before broadcasting it to the network. Even though the
broadcast may fail with the error already in mempool or already
confirmed, this tx label updating is still performed. To maintain the
old behavior, we now catch the errors from `TestMempoolAccept`, and make
sure to call the `PublishTransaction` to mark the tx label even there
are errors from mempool acceptance check.
2024-01-25 07:54:39 +08:00
yyforyongyu
1435ba5636
docs: add release note for testmempoolaccept 2024-01-25 07:54:39 +08:00
yyforyongyu
2686ca324a
lnwallet: check mempool acceptance before publishing
This commit adds a mempool acceptance check before broadcasting a given
transaction. To maintain the current behavior from
`BtcWallet.PublishTransaction`, the two errors, `ErrInMempool` and
`ErrAlreadyConfirmed` returned from `TestMempoolAccept` are ignored.
2024-01-25 07:54:39 +08:00
yyforyongyu
e4482421c9
gomod+chainreg: update btcwallet to use TestMempoolAccept 2024-01-25 07:54:35 +08:00
Andras Banki-Horvath
560ea95a59
docs: update release notes for 0.18 2024-01-24 21:38:54 +01:00
Andras Banki-Horvath
25af657ad5
kvdb: set postgres max_connections on the started instance 2024-01-24 21:38:54 +01:00
Andras Banki-Horvath
524fa66abf
kvdb: bump embedded postgres to v1.25.0 2024-01-24 21:38:53 +01:00
Olaoluwa Osuntokun
758ae6fbec
Merge pull request #8336 from lightningnetwork/fn-module-goodies
fn: add some new goodies to sub-module to be used in future PRs
2024-01-23 19:18:34 -08:00
Olaoluwa Osuntokun
1d1c1382d0
fn: add utility funcs/method for option type 2024-01-23 19:09:59 -08:00
Olaoluwa Osuntokun
1fc3f14467
fn: add new generic set container 2024-01-23 19:09:53 -08:00
Olaoluwa Osuntokun
eb72bb9712
fn: add SendOrQuit 2024-01-23 19:09:50 -08:00
Olaoluwa Osuntokun
a2694009cd
fn: add basic generic chan recv utility funcs 2024-01-23 19:09:47 -08:00
Olaoluwa Osuntokun
f7e2e6ddd6
fn: add basic generic queue 2024-01-23 19:09:45 -08:00
Olaoluwa Osuntokun
f166829fe4
fn: add reduce func 2024-01-23 19:09:42 -08:00
Olaoluwa Osuntokun
d702158d9b
fn: add new EventPublisher event pub/sub system
This builds on the concurrent queue to create a generic way to allow
goroutines to pub/sub information. An example includes being notified
each time a state machine is able to carry out a new state transition.
2024-01-23 19:09:39 -08:00
Olaoluwa Osuntokun
1cbfda525a
fn: add new Either[L, R] type
This implements a union of two values. Uses the existing option under
the hood, and adds a simple helper function.
2024-01-23 19:09:36 -08:00
Olaoluwa Osuntokun
0715e84f04
fn: add new ConcurrentQueue[T] data structure
This is a version of the queue we have elsewhere, but we can get rid of
all the casting and interface usage in favor of a type param.
2024-01-23 19:09:29 -08:00
Olaoluwa Osuntokun
1caca81ba1
Merge pull request #8167 from ProofOfKeags/bugfix/htlc-flush-shutdown
Bugfix/htlc flush shutdown
2024-01-23 18:49:47 -08:00
Keagan McClelland
69ef1b2b3b docs: update release notes 2024-01-23 14:31:57 -08:00
Keagan McClelland
07277172f8 itest+lntest: remove temporary hacks around broken coop close in itests 2024-01-23 14:31:51 -08:00
Keagan McClelland
9e58ebd0fb itest: test that we can close with in-flight htlcs 2024-01-23 12:25:06 -08:00
Keagan McClelland
94373bd96f htlcswitch: placate confused linter 2024-01-23 12:25:06 -08:00
Keagan McClelland
804dabb4ea lnd: make closechannel send an instant empty update when no_wait set
We do things this way to keep behavior consistent across REST, gRPC
and CLI consistent. This was done to not alter the way we handle
Recv calls from the streams.
2024-01-23 12:25:01 -08:00
Oliver Gugger
e31d159893
Merge pull request #8401 from yyforyongyu/update-btcd-ver
gomod: fix `btcd` mempool leak fix and `GetBlock` heap escape
2024-01-23 11:42:09 -06:00
Oliver Gugger
d7796b464e
Merge pull request #8377 from ellemouton/towerTestFlakeFix
wtclient: ensure correct disk mode for overflow queue
2024-01-23 09:47:27 -06:00
yyforyongyu
e6f5d17548
chainreg: satisfy chain.Interface in NoChainSource 2024-01-23 17:46:06 +08:00
Oliver Gugger
7d03b43ddf
Merge pull request #8314 from mohamedawnallah/add-auto-protolinter
[CI]: Install protolint to enforce the protobuf style guide rules in the CI
2024-01-23 03:25:55 -06:00
yyforyongyu
ff1f33eee9
docs: update release notes for mem leak fix 2024-01-23 17:09:44 +08:00
yyforyongyu
4ee862e3be
blockcache: fix heap escape in GetBlock
This commit fixes a heap escape found in `GetBlock`. This happens
because the `msgBlock` is a pointer returned from `getBlockImpl`, and
the whole `getBlockImpl` escapes to the heap because it's referenced in
two places,
- in the `Cache`, it's used as a reference type to create the new block.
- this pointer is also returned and now needs to stay on the heap.

The fix is simple, we now make a copy of the block and use the copy
instead, freeing `getBlockImpl` from the heap.
2024-01-23 17:08:57 +08:00
yyforyongyu
77e5deae9d
gomod: update btcd version to fix mem leak 2024-01-23 17:08:54 +08:00
Elle
51de320d69
Merge pull request #8385 from Roasbeef/ping-async-dc
peer: make PingManager disconnect call async
2024-01-23 09:24:11 +02:00
Keagan McClelland
359f271541
docs: update release notes 2024-01-22 18:20:36 -08:00
Olaoluwa Osuntokun
185119f5c3
peer: refactor main event loop for ping handler
The error was never used as the init couldn't return an error, so we do
away with that. We also modify the main event loop dispatch to more
closely match other areas of the codebase.
2024-01-22 18:20:30 -08:00
Olaoluwa Osuntokun
b5cbeb4ad7
peer: make PingManager disconnect call async
In this commit, we make all calls to disconnect after a ping/pong
violation is detected in the `PingManager` async. We do this to avoid
circular waiting that may occur if the disconnect call back ends up
waiting on the peer goroutine to be torn down. If this happens, then the
peer goroutine will be blocked on the ping manager fully tearing down,
which is blocked on the peer disconnect succeeding.

This is a similar class of issue we've delt with recently as pertains to
the peer and the server: sync all back execution must not lead to
a circular waiting loop.

Fixes #8379
2024-01-22 18:20:23 -08:00
Keagan McClelland
ec55831229 htlcswitch+peer: remove ShutdownIfChannelClean 2024-01-22 16:08:59 -08:00