Commit Graph

16563 Commits

Author SHA1 Message Date
Tom Kirkpatrick
3837c3f12e
lnwallet: add configurable cache for web fee estimator
Add fee.min-update-timeout and fee.max-update-timeout config options to
allow configuration of the web fee estimator cache.
2024-05-04 14:41:41 +08:00
Tom Kirkpatrick
fa616ee059
config: remove deprecated neutrino.feeurl config option 2024-05-04 14:41:40 +08:00
Olaoluwa Osuntokun
399ea864da
Merge pull request #8703 from carlaKC/flake-blindedchainerr
itest/flake: add more comprehensive assertions before HTLC cleared check
2024-05-02 12:09:04 -05:00
Oliver Gugger
90bff71db9
Merge pull request #8716 from yyforyongyu/temp-fix-height-race
sweep: make `TxPublisher.currentHeight` atomic
2024-05-02 17:19:33 +02:00
Oliver Gugger
fb632bb945
Merge pull request #8712 from djkazic/invoice-gc-noop
invoices: if there are no invoices make gc noop
2024-05-01 08:31:56 +02:00
yyforyongyu
3f8da16b77
sweep: make TxPublisher.currentHeight atomic 2024-05-01 12:16:54 +08:00
djkazic
1542424782
invoices: if there are no invoices make gc noop 2024-04-30 11:58:18 -04:00
Oliver Gugger
e8a1d4876e
Merge pull request #8705 from yyforyongyu/fix-typo
lnrpc: fix typo
2024-04-30 12:11:25 +02:00
Olaoluwa Osuntokun
9f4e92c518
Merge pull request #8706 from guggero/release-notes-fix
0.18: add contributors from git log, polish release notes
2024-04-29 16:09:28 -07:00
Oliver Gugger
6159d41970
docs: remove entry for fix within release
This commit removes an entry that was fixed in the same release as it
was introduced. So nobody should've been running into it yet.
2024-04-29 19:17:52 +02:00
Oliver Gugger
9dbf7e2133
docs: cleanup release notes
This commit removes a duplicate, fixes some typos and grammar issues and
removes an empty section/heading.
2024-04-29 19:17:52 +02:00
Oliver Gugger
3d56ffd0e4
Merge pull request #8662 from fuyangpengqi/master
chore: fix function names in comment
2024-04-29 15:10:20 +02:00
Oliver Gugger
be6b9b4b47
docs: update contributor list from git log
This commit adds contributors that didn't add themselves to the release
notes by extracting their GitHub username (or, if available their
name and surname from GitHub) from the git log manually.
2024-04-29 13:45:51 +02:00
yyforyongyu
9f2995251e
lnrpc: fix typo 2024-04-29 19:14:27 +08:00
Oliver Gugger
0419074ab8
Merge pull request #8695 from bitromortac/linter-cache
make: add cache directory for linter
2024-04-29 11:14:06 +02:00
Carla Kirk-Cohen
6e3a46ee91 itest: add more comprehensive assertions before HTLC cleared check
We mine quite a few blocks in this test to trigger a htlc timeout,
so it can be pretty slow. This fix adds assertions for additional
"state steps" that happen in between the failing of the htlc on-chain
and asserting that we're fully cleared out so that slower running
machines won't timeout.
2024-04-27 11:42:35 -04:00
Olaoluwa Osuntokun
ded995a843
Merge pull request #8701 from Roasbeef/0-18-branch
build: bump version to v0.18.0-beta.rc1
2024-04-26 19:45:41 -07:00
Olaoluwa Osuntokun
3b6103d29f
build: bump version to v0.18.0-beta.rc1 2024-04-26 19:19:23 -07:00
Olaoluwa Osuntokun
b92216ea13
Merge pull request #8700 from Roasbeef/kvdb-update-1-4-8
build: update to kvdb v1.4.8
2024-04-26 19:09:13 -07:00
Olaoluwa Osuntokun
f536c9b608
build: update to kvdb v1.4.8 2024-04-26 16:17:19 -07:00
Olaoluwa Osuntokun
5148941ed9
Merge pull request #8699 from Roasbeef/kvdb-sqlite-update-4-26
build: update to sqldb v1.0.2
2024-04-26 16:10:49 -07:00
Olaoluwa Osuntokun
e80adcde8e
Merge pull request #8692 from guggero/tlv-types
tlv: add new types and functions
2024-04-26 16:10:24 -07:00
Olaoluwa Osuntokun
7302051f44
build: update to sqldb v1.0.2
In this commit, we update the project and relevant sub-modules to sqldb
v1.0.2. The next step is to tag a new version of kvdb, then update the
main module to use that.
2024-04-26 15:31:14 -07:00
Olaoluwa Osuntokun
abcad6218e
Merge pull request #8696 from Roasbeef/sqlite-update
sqldb+kvdb: update to sqlite v1.29.8
2024-04-26 15:25:33 -07:00
Olaoluwa Osuntokun
b0463124d0
Merge pull request #8694 from Roasbeef/fix-pkg-race
channeldb: fix race in TestPackager by removing global test var
2024-04-26 15:18:00 -07:00
Olaoluwa Osuntokun
675ae6e213
Merge pull request #8693 from yyforyongyu/add-default-conf
rpc: add default conf target back
2024-04-26 12:45:06 -07:00
Olaoluwa Osuntokun
add2691954
Merge pull request #8485 from carlaKC/7298-3-forwardblindedroutes
[3/3]: Blinded Route Error Handling
2024-04-26 12:39:11 -07:00
Olaoluwa Osuntokun
fe8784aa0c
channeldb: fix race in TestPackager by removing global test var
In this commit, we fix a race in the `TestPackager` series on channeldb.
A few tests were sharing the same global variable of the set of log
updates, which includes a pointer to an HTLC. The `ExtraData` value of
the HTLC would then be mutated once we go to encode the message on disk.

To fix this, we the global with a function that returns a new instance
of all the test data.

```
==================
WARNING: DATA RACE
Write at 0x0000021b0a48 by goroutine 2896:
  github.com/lightningnetwork/lnd/lnwire.(*ExtraOpaqueData).PackRecords()
      /home/runner/work/lnd/lnd/lnwire/extra_bytes.go:74 +0x546
  github.com/lightningnetwork/lnd/lnwire.EncodeMessageExtraData()
      /home/runner/work/lnd/lnd/lnwire/extra_bytes.go:121 +0x4d
  github.com/lightningnetwork/lnd/lnwire.(*UpdateAddHTLC).Encode()
      /home/runner/work/lnd/lnd/lnwire/update_add_htlc.go:164 +0x5af
  github.com/lightningnetwork/lnd/lnwire.WriteMessage()
      /home/runner/work/lnd/lnd/lnwire/message.go:330 +0x351
  github.com/lightningnetwork/lnd/channeldb.WriteElement()
      /home/runner/work/lnd/lnd/channeldb/codec.go:186 +0x1975
  github.com/lightningnetwork/lnd/channeldb.WriteElements()
      /home/runner/work/lnd/lnd/channeldb/codec.go:247 +0x14f
  github.com/lightningnetwork/lnd/channeldb.serializeLogUpdate()
      /home/runner/work/lnd/lnd/channeldb/channel.go:2529 +0x3c
  github.com/lightningnetwork/lnd/channeldb.putLogUpdate()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package.go:525 +0xae
  github.com/lightningnetwork/lnd/channeldb.(*ChannelPackager).AddFwdPkg()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package.go:489 +0x684
  github.com/lightningnetwork/lnd/channeldb_test.TestPackagerOnlyAdds.func1()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package_test.go:283 +0x4c
  github.com/btcsuite/btcwallet/walletdb/bdb.(*db).Update()
      /home/runner/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.2/bdb/db.go:429 +0xe5
  github.com/lightningnetwork/lnd/kvdb.Update()
      /home/runner/go/pkg/mod/github.com/lightningnetwork/lnd/kvdb@v1.4.6/interface.go:16 +0x258
  github.com/lightningnetwork/lnd/channeldb_test.TestPackagerOnlyAdds()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package_test.go:282 +0x17b
  testing.tRunner()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1595 +0x238
  testing.(*T).Run.func1()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1648 +0x44

Previous write at 0x0000021b0a48 by goroutine 2898:
  github.com/lightningnetwork/lnd/lnwire.(*ExtraOpaqueData).PackRecords()
      /home/runner/work/lnd/lnd/lnwire/extra_bytes.go:74 +0x546
  github.com/lightningnetwork/lnd/lnwire.EncodeMessageExtraData()
      /home/runner/work/lnd/lnd/lnwire/extra_bytes.go:121 +0x4d
  github.com/lightningnetwork/lnd/lnwire.(*UpdateAddHTLC).Encode()
      /home/runner/work/lnd/lnd/lnwire/update_add_htlc.go:164 +0x5af
  github.com/lightningnetwork/lnd/lnwire.WriteMessage()
      /home/runner/work/lnd/lnd/lnwire/message.go:330 +0x351
  github.com/lightningnetwork/lnd/channeldb.WriteElement()
      /home/runner/work/lnd/lnd/channeldb/codec.go:186 +0x1975
  github.com/lightningnetwork/lnd/channeldb.WriteElements()
      /home/runner/work/lnd/lnd/channeldb/codec.go:247 +0x14f
  github.com/lightningnetwork/lnd/channeldb.serializeLogUpdate()
      /home/runner/work/lnd/lnd/channeldb/channel.go:2529 +0x3c
  github.com/lightningnetwork/lnd/channeldb.putLogUpdate()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package.go:525 +0xae
  github.com/lightningnetwork/lnd/channeldb.(*ChannelPackager).AddFwdPkg()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package.go:489 +0x684
  github.com/lightningnetwork/lnd/channeldb_test.TestPackagerAddsThenSettleFails.func1()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package_test.go:490 +0x4c
  github.com/btcsuite/btcwallet/walletdb/bdb.(*db).Update()
      /home/runner/go/pkg/mod/github.com/btcsuite/btcwallet/walletdb@v1.4.2/bdb/db.go:429 +0xe5
  github.com/lightningnetwork/lnd/kvdb.Update()
      /home/runner/go/pkg/mod/github.com/lightningnetwork/lnd/kvdb@v1.4.6/interface.go:16 +0x2cd
  github.com/lightningnetwork/lnd/channeldb_test.TestPackagerAddsThenSettleFails()
      /home/runner/work/lnd/lnd/channeldb/forwarding_package_test.go:489 +0x1e7
  testing.tRunner()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1595 +0x238
  testing.(*T).Run.func1()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1648 +0x44

Goroutine 2896 (running) created at:
  testing.(*T).Run()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1648 +0x82a
  testing.runTests.func1()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:2054 +0x84
  testing.tRunner()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1595 +0x238
  testing.runTests()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:2052 +0x896
  testing.(*M).Run()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1925 +0xb57
  github.com/lightningnetwork/lnd/kvdb.RunTests()
      /home/runner/go/pkg/mod/github.com/lightningnetwork/lnd/kvdb@v1.4.6/test_utils.go:23 +0x26
  github.com/lightningnetwork/lnd/channeldb.TestMain()
      /home/runner/work/lnd/lnd/channeldb/setup_test.go:10 +0x308
  main.main()
      _testmain.go:321 +0x303

Goroutine 2898 (running) created at:
  testing.(*T).Run()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1648 +0x82a
  testing.runTests.func1()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:2054 +0x84
  testing.tRunner()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1595 +0x238
  testing.runTests()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:2052 +0x896
  testing.(*M).Run()
      /home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/testing/testing.go:1925 +0xb57
  github.com/lightningnetwork/lnd/kvdb.RunTests()
      /home/runner/go/pkg/mod/github.com/lightningnetwork/lnd/kvdb@v1.4.6/test_utils.go:23 +0x26
  github.com/lightningnetwork/lnd/channeldb.TestMain()
      /home/runner/work/lnd/lnd/channeldb/setup_test.go:10 +0x308
  main.main()
      _testmain.go:321 +0x303
==================
```
2024-04-26 12:36:53 -07:00
Olaoluwa Osuntokun
eb605a02fd
sqldb+kvdb: update to sqlite v1.29.8
Updates to SQLite 3.45.3: https://www.sqlite.org/releaselog/3_45_3.html.

May also address https://github.com/lightningnetwork/lnd/issues/8666.
2024-04-26 12:26:59 -07:00
fuyangpengqi
5f22d97b51 chore: fix function names in comment
Signed-off-by: fuyangpengqi <995764973@qq.com>
2024-04-27 00:04:09 +08:00
Carla Kirk-Cohen
6572f5cb74
docs: add error handling link 2024-04-26 11:35:19 -04:00
Carla Kirk-Cohen
7867cb3a70
multi: turn on route blinding by default 2024-04-26 11:35:18 -04:00
Carla Kirk-Cohen
eaa85920ea
multi: enable optional route blinding feature 2024-04-26 11:35:17 -04:00
Carla Kirk-Cohen
75d4a4c295
itest: add coverage for blinded error resolution from on-chain failure
This itest adds a test that we still propagate blinded errors back
properly after a restart with an on-chain resolution. The test also
updates our sendpayment timeout to longer so that there's time to
resolve the on chain claim.
2024-04-26 11:35:17 -04:00
Carla Kirk-Cohen
2140f1940f
itest: manually set timeout on cancel payment and provide cancel
For tests where our payments require an on-chain resolution,
provide longer timeout and return cancel functions.
2024-04-26 10:56:33 -04:00
bitromortac
ba34f220b9
make: add cache directory for linter
Mounts a local temporary folder to the linter docker container in order
to persist the linter cache across runs.
2024-04-26 13:47:50 +02:00
yyforyongyu
db52e7e381
docs: update release notes 2024-04-26 10:42:46 +08:00
yyforyongyu
d0441a2a29
multi: add default conf targt in SendCoins/SendMany/OpenChannel/CloseChannel 2024-04-26 10:42:44 +08:00
Olaoluwa Osuntokun
e6d6789fd9
Merge pull request #8681 from Roasbeef/amp-flag-consistency
lnrpc: ensure parsing of the Amp flag for payments is consistent
2024-04-25 18:49:51 -07:00
Olaoluwa Osuntokun
e8031fdccf
lnrpc: ensure parsing of the Amp flag for payments is consistent
In this commit, we fix an inconsistent in the API related to AMP
payments. When a payment request isn't specified, we require the `--amp`
flag on the CLI to make an AMP payment. However, for payment requests,
we don't require this flag. To fix this inconsistency, we now require
the `--amp` flag to _also_ be set for payment requests.
2024-04-25 16:16:16 -07:00
Olaoluwa Osuntokun
ab2f34e13b
Merge pull request #8621 from ziggie1984/fix-sync-neutrino-nodes
fix sync neutrino nodes
2024-04-25 16:13:32 -07:00
Oliver Gugger
c6dae6c3c0
tlv: rename receivers, add ValOpt
ValOpt returns an Option of the underlying value.
2024-04-25 16:51:12 +02:00
Olaoluwa Osuntokun
956b00b599
tlv: add in new BigSizeT type
This type is useful when one wants to encode an integer as an underlying BigSize record. It wraps any integer, then handles the transformation into and out of the BigSize encoding on disk.
2024-04-25 16:48:29 +02:00
Olaoluwa Osuntokun
5b2869b0ec
tlv: add new Blob type alias
In this commit, we add a new type alias for a blob type. This type can be used in areas where a byte slice is used to store a TLV value, which may be a fully opaque nested TLV.
2024-04-25 16:48:06 +02:00
Carla Kirk-Cohen
d57c6fab47
itest: add coverage for disabling blinded forwards 2024-04-25 09:47:17 -04:00
Carla Kirk-Cohen
428a33fbda
itest: add coverage for failure at the introduction node 2024-04-25 09:47:16 -04:00
Carla Kirk-Cohen
4535cf6c65
itest: add coverage for failure within a blinded route 2024-04-25 09:47:15 -04:00
Carla Kirk-Cohen
d13a73a93a
itest: add test coverage for failure at blinded receiver 2024-04-25 09:47:14 -04:00
Carla Kirk-Cohen
43687181f7
htlcswitch: convert blinded failures for blinded payments 2024-04-25 09:47:13 -04:00
Carla Kirk-Cohen
de9c9c028c
htlcswitch: set packet obfuscator for failures through switch
Set obfuscator for use in blinded error handling when we forward
failures through the switch.
2024-04-25 09:47:12 -04:00