Commit Graph

15565 Commits

Author SHA1 Message Date
yyforyongyu
994a1426d6
CI: upgrade bitcoind version to 0.25 2023-11-01 16:34:07 +08:00
Olaoluwa Osuntokun
eb5fc0c349
Merge pull request #7811 from yyforyongyu/fix-panix
contractcourt: stop lnd when received witness is empty
2023-10-31 15:17:30 -07:00
Olaoluwa Osuntokun
b0261f7793
Merge pull request #8132 from Roasbeef/strict-macaroon-version
macaroons: reject unknown macaroon versions
2023-10-31 15:16:55 -07:00
Olaoluwa Osuntokun
9287b755d8
macaroons: reject unknown macaroon versions
We've only ever made macaroons with the v2 versions, so we should
explicitly reject those that aren't actually v2. We add a basic test
along the way, and also add a similar check for the version encoded in
the macaroon ID.
2023-10-31 13:23:50 -07:00
Olaoluwa Osuntokun
c382268201
Merge pull request #8104 from Roasbeef/taproot-chans-nonce-double-init
multi: skip InitRemoteMusigNonces if we've already called it
2023-10-31 13:02:54 -07:00
Olaoluwa Osuntokun
7f652ee729
Merge pull request #8135 from yyforyongyu/fix-flakes
multi: fix test flakes in unit tests and itests
2023-10-31 12:58:25 -07:00
Olaoluwa Osuntokun
8c121ee5e0
docs/release-notes: add entry for nonce init fix 2023-10-31 10:10:49 -07:00
Slyghtning
12f23d2352
itest: simple taproot channel status 2023-10-31 10:10:43 -07:00
Slyghtning
20e731b636
itest: assertions to check channel status 2023-10-31 10:10:41 -07:00
Eugene Siegel
dc42b160a0
multi: skip InitRemoteMusigNonces if we've already called it
Prior to this commit, taproot channels had a bug:

- If a disconnect happened before peer.AddNewChannel was called,
  then the subsequent reconnect would call peer.AddNewChannel and
  attempt the ChannelReestablish dance.

- peer.AddNewChannel would call NewLightningChannel with
  populated nonce ChannelOpts. This in turn would call
  InitRemoteMusigNonces which would create a new musig pair session
  and set the channel's pendingVerificationNonce to nil.

- During the reestablish dance, ProcessChanSyncMsg would be called.
  This would also call InitRemoteMusigNonces, except it would fail
  since pendingVerificationNonce was set to nil in the previous
  invocation.

To fix this, we add a new functional option to signal to the init logic
that it doesn't need to call InitRemoteMusigNonces in   in
ProcessChanSyncMsg.
2023-10-31 10:10:35 -07:00
yyforyongyu
fc52a01055
itest: fix test flake in testHtlcTimeoutResolverExtractPreimageRemote
From the build,
```
harness_miner.go:218:
        	Error Trace:	/home/runner/work/lnd/lnd/lntest/harness_miner.go:218
        	            				/home/runner/work/lnd/lnd/lntest/harness.go:1641
        	            				/home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:2207
        	            				/home/runner/work/lnd/lnd/itest/lnd_multi-hop_test.go:152
        	Error:      	Received unexpected error:
        	            	want 2, got 3 in mempool: [a7cbb5724e39579cfc75d0469270f691988cb67fcc51a332256cafb193cf40bd b12a03a0622a3cf7d53867f060a6de8166e564a1a3109bc2be1ec0b720f305da 073d66885ccded1a770dc9aa5f1d44c8e10ac4e916e5ab50ef5149a5649ec8ba]
        	Test:       	TestLightningNetworkDaemon/tranche03/130-of-135/neutrino/htlc_timeout_resolver_extract_preimage_remote/zeroconf=false/committype=SIMPLE_TAPROOT
        	Messages:   	assert tx in mempool timeout
    harness.go:339: finished test: htlc_timeout_resolver_extract_preimage_remote, start height=1312, end height=1347, mined blocks=35
```
2023-10-31 23:49:31 +08:00
yyforyongyu
cc6b20bf2f
lntest: mine empty blocks when cleaning up force close
Fix this test flake,
```
harness_miner.go:218:
        	Error Trace:	/home/runner/work/lnd/lnd/lntest/harness_miner.go:218
        	            				/home/runner/work/lnd/lnd/lntest/harness.go:1641
        	            				/home/runner/work/lnd/lnd/lntest/harness.go:1515
        	            				/home/runner/work/lnd/lnd/itest/lnd_wipe_fwdpkgs_test.go:121
        	            				/home/runner/work/lnd/lnd/lntest/harness.go:286
        	            				/home/runner/work/lnd/lnd/itest/lnd_test.go:136
        	Error:      	Received unexpected error:
        	            	want 1, got 0 in mempool: []
        	Test:       	TestLightningNetworkDaemon/tranche02/91-of-135/neutrino/wipe_forwarding_packages
        	Messages:   	assert tx in mempool timeout
    harness.go:339: finished test: wipe_forwarding_packages, start height=1636, end height=1653, mined blocks=17
    harness.go:345: test failed, skipped cleanup
```
2023-10-31 16:51:24 +08:00
yyforyongyu
2caa7d2b2b
invoices: add verbose errors to catch flakes in
`TestInvoiceExpiryWithRegistry`
2023-10-31 16:31:44 +08:00
Olaoluwa Osuntokun
32c8b82c36
Merge pull request #7669 from morehouse/fuzz_lnwire_onion_errors
lnwire: fuzz onion failure messages
2023-10-30 12:44:55 -07:00
Olaoluwa Osuntokun
78ff68ad05
Merge pull request #8119 from lightningnetwork/udpate-docs
docs: Add requirement for bitcoind.
2023-10-30 12:34:57 -07:00
Olaoluwa Osuntokun
99617f7afe
Merge pull request #8123 from R3DRUN3/master
add release build and go report status badges
2023-10-30 10:51:10 -07:00
Olaoluwa Osuntokun
19880ffe2c
Merge pull request #8101 from yyforyongyu/fix-web-fee-unit-test
chainfee: Fix test flake in `TestWebAPIFeeEstimator`
2023-10-30 10:50:16 -07:00
yyforyongyu
28497e940f
docs: update release notes re empty witness data 2023-10-31 01:45:07 +08:00
yyforyongyu
ee883c332f
chainntnfs: stop lnd when received witness stack is empty
This commit uses `Criticalf` to gracefully stop `lnd` when the received
witness data is empty.
2023-10-31 01:44:43 +08:00
yyforyongyu
28c3c835bf
chainntnfs: return an error when witness stack is empty
This commit adds a check when receiving transactions from
`BitcoindClient` so an error is returned when empty witness is found.
2023-10-31 01:44:43 +08:00
yyforyongyu
971d3d8d9c
contractcourt: make sure isPreimageSpend won't panic
This commit adds a length check in `isPreimageSpend` to make sure it
won't ever panic and adds a unit test to verify it.
2023-10-31 01:44:43 +08:00
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