Commit graph

16863 commits

Author SHA1 Message Date
Carla Kirk-Cohen
b81a6f3d2f
htlcswitch: split parsing and validation of TLV payloads
When handling blinded errors, we need to know whether there was a
blinding key in our payload when we successfully parsed our payload
but then found an invalid set of fields. The combination of
parsing and validation in NewPayloadFromReader means that we don't know
whether a blinding point was available to us by the time the error is
returned.

This commit splits parsing and validation into two functions so that
we can take a look at what we actually pulled of the payload in between
parsing and TLV validation.
2024-04-25 09:15:58 -04:00
Carla Kirk-Cohen
4d051b4170
multi: handle all blinding point validation in ValidateParsedPayloadTypes
This commit moves all our validation related to the presence of fields
into ValidateParsedPayloadTypes so that we can handle them in a single
place. We draw the distinction between:
- Validation of the payload (and the context within it's being parsed,
  final hop / blinded hop etc)
- Processing and validation of encrypted data, where we perform
  additional cryptographic operations and validate that the fields
  contained in the blob are valid.

This helps draw the line more clearly between the two validation types,
rather than splitting some payload-releated blinded hop processing
into the encrypted data processing part. The downside of this approach
(vs doing the blinded path payload check _after_ payload validation)
is that we have to pass additional context into payload validation
(ie, whether we got a blinding point in our UpdateAddHtlc - as we
already do for isFinalHop).
2024-04-25 09:15:57 -04:00
Carla Kirk-Cohen
c2c0158c84
htlcswitch: handle malformed HTLC with invalid onion blinding code
This commit adds handling for malformed HTLC errors related to blinded
paths. We expect to receive these errors _within_ a blinded path,
because all non-introduction nodes are instructed to return malformed
errors for failures.

Note that we may actually switch back to a malformed error later on if
we too are a relaying node in the route, but we handle that case the
incoming link.
2024-04-25 09:15:56 -04:00
Oliver Gugger
2089a88f4b
Merge pull request #7765 from ErikEk/retire-io-ioutil-dep
Remove io/ioutil package dependency
2024-04-25 13:17:15 +02:00
ziggie
f4b92eb3d4
docs: add release-notes. 2024-04-25 12:00:56 +01:00
ziggie
9f9d1c9e0b
itest: fix typo. 2024-04-25 12:00:26 +01:00
ziggie
fe829c2508
mod: bump neutrino version. 2024-04-25 12:00:26 +01:00
erik
0d94131fca doc: release note 2024-04-25 11:56:54 +02:00
erik
df4ddcc573 multi: replace ioutil.TempDir 2024-04-25 11:24:41 +02:00
erik
caf2419ff6 multi: replace ioutil.ReadDir 2024-04-25 11:24:17 +02:00
erik
c7f81d3142 multi: replace ioutil.Discard 2024-04-25 11:23:54 +02:00
erik
789c6bac8c multi: replace ioutil.WriteFile 2024-04-25 11:23:31 +02:00
erik
ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
erik
619c8f4eb8 multi: repleace ioutil.ReadAll 2024-04-25 11:21:18 +02:00
Oliver Gugger
dcd8e16376
Merge pull request #8685 from ziggie1984/fix-bumpfee-immediate
fix lncli bumpfee flag parsing
2024-04-25 10:17:05 +02:00
Oliver Gugger
7f5f8065ca
Merge pull request #8672 from mohamedawnallah/makeDeleteAllPaymentsArgsRequired
rpcserver: Make sure the arguments are provided when calling `DeleteAllPayments` RPC
2024-04-25 10:02:59 +02:00
Oliver Gugger
8ce3622792
Merge pull request #8590 from ffranr/test-node-name-in-tmpdir
lntest: add test node name to tmp directory name
2024-04-24 20:06:04 +02:00
Oliver Gugger
fe26005228
Merge pull request #8592 from zhiqiangxu/master
itest: fix ascii
2024-04-24 11:05:21 -06:00
Oliver Gugger
5cf700d611
Merge pull request #8658 from hidewrong/master
chore: fix struct names
2024-04-24 10:56:20 -06:00
Mohamed Awnallah
b683b385cd
docs: update release-notes-0.18.0.md 2024-04-24 18:49:53 +02:00
Mohamed Awnallah
6e1d9b8d6a
lncli: update AllPayments in deletePayments 2024-04-24 18:49:01 +02:00
Mohamed Awnallah
3364d2f2d6
lntest: delete all payments in DeleteAllPayments 2024-04-24 18:48:59 +02:00
Mohamed Awnallah
5c3015b223
rpcserver: validate DeleteAllPayments options 2024-04-24 18:48:57 +02:00
Mohamed Awnallah
4f48cc69fb
lnrpc: add all_payments opt to DeleteAllPayments 2024-04-24 18:48:52 +02:00
ziggie
0ea45efe28
docs: add release-notes. 2024-04-24 16:56:09 +01:00
ziggie
64601a9bbe
wallet lncli: fix bumpfee parsing bug. 2024-04-24 16:56:09 +01:00
zhiqiangxu
64740e18cb itest: fix ascii 2024-04-24 23:30:03 +08:00
Oliver Gugger
acc595195c
Merge pull request #8545 from ziggie1984/dont-use-sweeper-unconfirmed-utxos
dont use sweeper unconfirmed utxos
2024-04-24 08:29:06 -06:00
ziggie
58e12884dc
docs: add release-notes. 2024-04-24 13:58:20 +01:00
ziggie
351e9a68dd
multi: Add tests to psbt and normal open channel flow.
Itests were added to the normal channel funding flow and the psbt
funding flow using unstable (unconfirmed sweeper inputs).
2024-04-24 13:58:20 +01:00
ziggie
b954ee4c72
rpcserver: allow unconf. inputs for psbt shim.
Allow unconfirmed inputs to be used when funding a channel via
the psbt channel opening flow. We do now check for unstable utxos.
2024-04-24 13:58:20 +01:00
ziggie
ab7634b276
multi: Add utxo restriction for batchchannel openings.
Add utxo restrictions for psbt internal wallet funded lightning
channels. This also includes batchopening channels backed by the
internal wallet.
2024-04-24 13:58:20 +01:00
ziggie
62a52b4d7c
multi: Utxo restriction single funding case.
Restrict the utxo selection when opening a single internal wallet
funded backed channel.
2024-04-24 13:58:19 +01:00
ziggie
2a88cf8eef
mod: update btcwallet version. 2024-04-24 13:58:19 +01:00
Oliver Gugger
39b7f1c4f4
GitHub: give tag to each cover job 2024-04-23 19:16:56 +02:00
Oliver Gugger
7468eb3416
GitHub: only run cover on some itests, send completion
We only want to run the coverage on some select tests, since we don't
want to make tests with slow backends even slower.
And because we use "parallel: true" when uploading the coverage results,
those will only be assembled once we send "parallel-finished: true"
using the goveralls action.
So we do that with a new "finish" job.
2024-04-23 19:16:56 +02:00
Oliver Gugger
8a5160e1de
multi: add test coverage for integration tests 2024-04-23 19:15:33 +02:00
Oliver Gugger
7fb233326e
Merge pull request #8674 from yyforyongyu/sweeper-remove-and-docs
sweep: add docs and remove dead code
2024-04-23 11:12:24 -06:00
yyforyongyu
e855421095
docs: update release notes 2024-04-23 23:19:41 +08:00
yyforyongyu
83024585bb
sweep: add README 2024-04-23 23:17:44 +08:00
Oliver Gugger
2b74a34301
Merge pull request #8678 from hieblmi/add-hieblmi-to-verify-install
Add hieblmi to verify install script
2024-04-23 06:16:43 -06:00
Slyghtning
ffaf4da1da
release: add hieblmi to verify install script 2024-04-23 10:03:23 +02:00
yyforyongyu
9c5124e117
sweep: remove unused param Fee 2024-04-23 04:44:00 +08:00
yyforyongyu
54aaeea491
sweep: remove dead code and dead tests 2024-04-23 04:44:00 +08:00
Olaoluwa Osuntokun
7af195768a
Merge pull request #8667 from lightningnetwork/elle-new-sweeper
Merge new sweeper branch to master
2024-04-22 11:20:49 -07:00
Oliver Gugger
73fd389e9a
Merge pull request #8627 from feelancer21/inbound-fees-reject
lnrpc: rejects positive inbound fees by default
2024-04-22 01:56:02 -06:00
Oliver Gugger
a201d5e365
Merge pull request #8661 from ProofOfKeags/feature/record-producer-axiom
tlv: add axiomatic RecordProducer implementation for Record
2024-04-22 01:42:06 -06:00
feelancer21
a2319e4313 lnrpc: rejects positive inbound fees by default
Positive inbound are now rejected by default. The user can enable positive
inbound fees with the option 'accept-positive-inbound-fees'.
2024-04-20 00:11:36 +02:00
yyforyongyu
4d96f9c4c1
docs: add release notes 2024-04-20 04:41:31 +08:00
yyforyongyu
d854c80aa7
itest+lntest: fix itest re the new sweeping behavior 2024-04-20 04:41:29 +08:00