Commit graph

15744 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
99481e3e84
Merge pull request #8127 from lightningnetwork/dependabot/go_modules/github.com/docker/docker-24.0.7incompatible
build(deps): bump github.com/docker/docker from 20.10.24+incompatible to 24.0.7+incompatible
2023-10-30 10:41:27 -07:00
dependabot[bot]
2a8cf329b9
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.24+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.24...v24.0.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 15:39:29 +00:00
r3drun3
071214006f
docs(readme): add release build and go report status badges
Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
2023-10-30 08:44:06 +01:00
yyforyongyu
3c62ba57d3
chainfee: make timeout values constant 2023-10-29 13:24:28 +08:00
yyforyongyu
090892c613
chainfee: use proper mock for WebAPIFeeSource in tests 2023-10-29 13:24:27 +08:00
yyforyongyu
efcba4a836
chainfee: simplify WebAPIFeeSource interface
This commit removes the interface methods `GenQueryURL` and
`ParseResponse` so the `WebAPIEstimator` can care less about the
implementation details of this interface.
2023-10-29 13:24:27 +08:00
yyforyongyu
8ca48311ee
chainfee: add a new interface method GetFeeMap
This commit adds a new method `GetFeeMap` to handle querying the web API
and parse the response into a map that's used by the fee estimator. In
doing so we can provide a deeper abstraction over the `WebAPIFeeSource`
interface.
2023-10-29 13:24:27 +08:00
Matt Morehouse
66d6a8455d
docs: update release notes 2023-10-27 14:54:29 -05:00
Matt Morehouse
ed1b54ac3a
lnwire: use require package for onion failure fuzz tests 2023-10-27 14:52:00 -05:00
Matt Morehouse
a7ee45bea0
lnwire: add FuzzFailIncorrectDetails test
The test is identical to other onion failure fuzz tests, except that it
uses a custom equality function to get around the nil != []byte{} issue
with reflect.DeepEqual.
2023-10-27 14:52:00 -05:00
Matt Morehouse
2181fd432c
lnwire: fuzz onion failure messages
Fuzz tests for decoding and encoding of onion failure messages, based on
the fuzz harness for other lnwire messages. The onion failure messages
were uncovered by existing fuzz tests.
2023-10-27 14:12:41 -05:00
Oliver Gugger
3b7cda9e8d
Merge pull request #8111 from jharveyb/chainkit_add_getblockheader
chainkit: expose getblockheader
2023-10-27 18:35:05 +02:00
Jonathan Harvey-Buschel
459a60e4e6
doc: add release notes for 8111 2023-10-27 11:05:28 -04:00
Jonathan Harvey-Buschel
c5d041f2f4
itest: add GetBlockHeader to ChainKit tests 2023-10-27 11:05:28 -04:00
Jonathan Harvey-Buschel
c20e4871cd
chainrpc+lncli: expose GetBlockHeader + add to CLI 2023-10-27 11:05:27 -04:00
Jonathan Harvey-Buschel
6edd1e1220
multi: add GetBlockHeader to BlockChainIO 2023-10-27 11:05:27 -04:00
ziggie
8bbab59745
docs: fix double hypen to single hyphen.
bitcoind uses single hyphens so changed where necessary.
2023-10-27 13:30:44 +02:00
ziggie
14c4addcdc
docs: Add requirement for bitcoind [skip ci]
Add a comment to disallow the bitcoind config parameter
`rpcserialversion`.
2023-10-27 13:28:09 +02:00
Jonathan Harvey-Buschel
7a8803e3cf
chainrpc: update proto to expose GetBlockHeader 2023-10-26 16:16:35 -04:00
Oliver Gugger
7d2e0ae3e4
Merge pull request #8116 from lightningnetwork/dependabot/go_modules/google.golang.org/grpc-1.56.3
build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3
2023-10-26 14:06:09 +02:00
Oliver Gugger
e6fde8bd0c
GitHub: bump pinned versions in CI check 2023-10-26 10:25:35 +02:00
dependabot[bot]
c5e42a752a
build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 07:20:20 +00:00
Oliver Gugger
06020578c9
Merge pull request #8115 from lightningnetwork/dependabot/go_modules/kvdb/google.golang.org/grpc-1.56.3
build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3 in /kvdb
2023-10-26 09:19:02 +02:00
dependabot[bot]
effa5cf066
build(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3 in /kvdb
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 22:28:42 +00:00
Olaoluwa Osuntokun
a1fa195493
Merge pull request #8091 from yyforyongyu/remove-rbf-sweeper
sweep: remove possible RBF when sweeping new inputs
2023-10-25 15:14:32 -07:00
Oliver Gugger
ebbf078d6d
Merge pull request #8014 from Roasbeef/go-loop-exp
build: prep for Go 1.22 by using GOEXPERIMENT=loopvar for tests
2023-10-25 15:36:52 +02:00
Olaoluwa Osuntokun
63a94ad987
build: build+install using GOEXPERIMENT=loopvar
We also update the release script to do the same as well.
2023-10-24 18:40:58 -07:00
Olaoluwa Osuntokun
206ad69b75
discovery: fix incorrect test, masked by loop scoping bug
When we first go to boot up the syncer, when we're in the active phase,
after we do the historical sync, we'll send a timestamp message that we
want everything, then transition to the passive mode. The test didn't
account for this extra message before, as the last test was being
re-used here (ran in parallel).

We fix this by asserting that the first expected message is sent, then
also the follow up messages as well.
2023-10-24 18:40:53 -07:00
Olaoluwa Osuntokun
b1eaeb6ac6
build: prep for Go 1.22 by using GOEXPERIMENT=loopvar for tests
In this commit, [we prep for some upcoming changes in
Go](https://go.dev/blog/loopvar-preview) by running our tests with
`GOEXPERIMENT=loopvar`. This changes the loop semantics to fix a common
bug where a scoping issue causes a variable to be re-used, which can
cause unintended bugs down the line.

If everything passes with this flag on, then we can keep it on, and also
rest a bit easier knowing that the compiler will fix a class of bugs
that would previously pop up for us.
2023-10-24 18:40:49 -07:00
yyforyongyu
dba4c8e5ad
trivial: fix typo and nits 2023-10-23 13:01:52 +08:00
yyforyongyu
05fbe8b116
docs: update release note re RBF fix 2023-10-23 13:01:52 +08:00
yyforyongyu
0816f9124c
itest: update itest to reflect new sweeper behavior 2023-10-23 13:01:50 +08:00
yyforyongyu
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
yyforyongyu
acc15d8113
sweep: add new method rescheduleInputs and refactor sweep 2023-10-23 10:44:46 +08:00
yyforyongyu
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
yyforyongyu
4ba09098d1
sweep+lnd: move ticker creation into sweeper 2023-10-23 10:24:58 +08:00
yyforyongyu
62b5869f87
sweep: add new method handleSweep 2023-10-23 10:24:58 +08:00
yyforyongyu
f1d0f9f74e
sweep: add new method handleInputSpent 2023-10-23 10:24:58 +08:00
yyforyongyu
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
yyforyongyu
39973687aa
sweep: add new method handleNewInput 2023-10-23 10:24:58 +08:00
Oliver Gugger
15f4213793
Merge pull request #7828 from ProofOfKeags/pong-enforcement
multi: pong enforcement
2023-10-19 21:50:08 +02:00
Keagan McClelland
012cc6af8c peer: eliminate unnecessary log spam from received pong msgs 2023-10-19 09:26:50 -07:00
Keagan McClelland
5762061487 docs: Update release notes to include pong enforcement 2023-10-19 09:26:50 -07:00
Keagan McClelland
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
Keagan McClelland
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
Keagan McClelland
ac265812fc peer+lnd: make BestBlockView available to Brontide 2023-10-19 09:22:07 -07:00
Keagan McClelland
74b30a71cb lnd: start the BestBlockTracker during server startup 2023-10-19 09:22:07 -07:00
Keagan McClelland
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
Keagan McClelland
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
Oliver Gugger
e1fb1e484a
Merge pull request #7967 from morehouse/fuzz_onion
htlcswitch: fuzz onion encoding/decoding
2023-10-19 15:30:03 +00:00