Commit Graph

1055 Commits

Author SHA1 Message Date
ffranr
29a12c28c9
routing: pass link bandwidth to traffic shaper's bandwidth query
This commit updates the traffic shaper's bandwidth query method to
accept the link bandwidth as a parameter. This allows an external
traffic shaper to optionally return the link bandwidth as the payment
bandwidth.
2024-06-20 22:28:58 +01:00
Oliver Gugger
1f86f38f36
Merge remote-tracking branch 'origin/master' into 0-19-staging 2024-05-28 13:55:23 +02:00
Oliver Gugger
b628483120
routing: update TLV traffic shaper interface 2024-05-27 20:23:01 +02:00
Oliver Gugger
1404468299
routing: remove unused struct member 2024-05-27 20:23:01 +02:00
Oliver Gugger
8865484fb7
routing+lnrpc: fix log statements 2024-05-27 20:23:01 +02:00
Oliver Gugger
6b7849950a
multi: add tapscript root to gossip message 2024-05-27 12:58:29 +02:00
feelancer21
f62c00fe34
multi: Inbound fees are retained when not provided
Fixes the problem that inbound base fee and fee rate are overwritten
with 0 if they are not specified in PolicyUpdateRequest. This ensures
backward compatibility with older rpc clients that do not yet support
the inbound feature.
2024-05-22 20:48:42 +02:00
George Tsagkarelis
53e9f288ed
routing: use first hop records on path finding 2024-05-22 17:28:22 +02:00
George Tsagkarelis
37cbfea912
routing: add TlvTrafficShaper to bandwidth hints 2024-05-22 17:28:22 +02:00
George Tsagkarelis
25b4066b17
multi: use wire records on payment and intercept flows 2024-05-22 14:44:18 +02:00
Slyghtning
c9713e0ddb
routing: log edge when skipping it 2024-05-16 13:54:54 +02:00
Bufo
af9858c3ed
feat: add inbound fees to channel notifications 2024-05-07 18:58:25 +02:00
Olaoluwa Osuntokun
a4a7d11e88
multi: update GenTaprootFundingScript to pass tapscript root
In most cases, we won't yet be passing a root. The option usage helps us keep the control flow mostly unchanged.
2024-04-30 16:39:20 +02:00
erik
ab83343c87 multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
Oliver Gugger
648fb22f63
multi: wrap all errors 2024-04-11 15:04:03 +02:00
Joost Jager
0bae781785 routing: add inbound fee support to pathfinding
Add sender-side support for inbound fees in pathfinding
and route building.
2024-03-31 18:12:28 +02:00
Joost Jager
9d4251c18d routing/test: test local unified edge 2024-03-31 18:12:28 +02:00
Joost Jager
e0a080454a routing: track unifiedPolicyEdge
Preparation so that we can have the inbound fee available
in addition to the outgoing policy.
2024-03-31 18:12:28 +02:00
Joost Jager
763787e08c routing+lnrpc: add inbound fee policy update 2024-03-31 16:49:19 +02:00
Joost Jager
3e6adbf1c0 lnwire+channeldb: parse inbound fees
In this commit, the tlv extension of a channel update message is parsed.
If an inbound fee schedule is encountered, it is reported in the
graph rpc calls.
2024-03-31 16:33:26 +02:00
Carla Kirk-Cohen
d67f65212b
routing: fix comment on blinded path cltv delta 2024-03-27 09:39:02 -04:00
Carla Kirk-Cohen
0aeb7c4ba2
multi/refactor: clarify blinded payment fee rate field name 2024-03-27 09:39:00 -04:00
Oliver Gugger
ad9144ffa3
Merge pull request #8273 from guggero/bitcoind-26
GitHub: use bitcoind v26.0 for CI
2024-03-20 01:50:44 -06:00
Oliver Gugger
aa811c784a
lnwallet+routing: use chainntnfs.NewBitcoindBackend
Since we fixed a number of issues in chainntnfs.NewBitcoindBackend that
makes it compatible with bitcoind v26.0, we now want to use that
function in all our unit tests.
2024-03-18 16:13:40 +01:00
Oliver Gugger
d40312c36b
multi: move unit test backend funcs to new package
To avoid circular dependency issues between packages, we move the unit
test backend creation function to a new package in the lntest parent
package.
2024-03-18 16:13:39 +01:00
Oliver Gugger
c170a9830b
multi: use chainntnfs.NewMiner for miners in unit tests
With the chainntnfs.NewMiner now being optimized for not creating
nodes with colliding ports, we use it in all unit tests that spin up
temporary miners.
2024-03-18 16:13:39 +01:00
Sam Korn
11d6442d17
routerrpc: Add detailed info/trace logging during a rescan 2024-03-14 11:23:16 -06:00
Slyghtning
24080c51f9
multi: fee estimation timeout parameters
conf: fee estimation timeout in sample config
2024-03-05 09:24:27 +01:00
ffranr
cd566eb097
multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using
non-wrapping format verbs.
2024-02-27 11:13:40 +00:00
ziggie
4732c09a26
multi: Fix final hop payload size for AMP payments. 2024-02-03 12:16:06 +00:00
ziggie
ff30ff40bf
multi: Fix final hop payload size for blinded rt.
The final hop size is calculated differently therefore we extract
the logic in its own function and also account for the case where
the final hop might be a blinded hop.
2024-02-03 12:11:01 +00:00
ziggie
c1b91fff14
multi: use new AdditionalEdge interface.
In the previous commit the AdditionalEdge interface was introduced
with both of its implementations `BlindedEdge` and `PrivateEdge`.
In both cases where we append a route either by a blinded route
section or private route hints we now use these new types. In
addition the `PayloadSizeFunc` type is introduced in the
`unifiedEdge` struct. This is necessary to have the payload size
function at hand when searching for a route hence not overshooting
the max sphinx package size of 1300 bytes.
2024-02-03 12:10:46 +00:00
ziggie
9d3c0d9e3a
routing: add new interface AdditionalEdge.
A new interface AdditionalEdge is introduced which allows us to
enhance the CachedEdgePolicy with additional information. We
currently only need a PayloadSize function which is then used to
determine the exact payload size when building a route to adhere
to the sphinx package size limit (BOLT04).
2024-02-01 17:37:43 +00:00
Elle Mouton
6c427a6ba9
multi: update FetchChanInfos to take in an optional tx
In this commit, the FetchChanInfos ChannelGraph method is updated to
take in an optional read transaction for the case where it is called
from within another transaction.
2024-01-22 21:07:55 +02:00
Elle
08c18a338b
Merge pull request #8275 from ProofOfKeags/chore/enforce-feature-bits
multi: make legacy feature bits compulsory
2024-01-18 17:26:09 +02:00
Yong
26c466aa80
Merge pull request #8372 from mohamedawnallah/deep-copy-transactions-GetBlock
routing: deep copy any transaction we obtain from `GetBlock` call.
2024-01-15 20:13:00 +08:00
Mohamed Awnallah
99908ed2dc
routing: deep copy any transaciton we obtain from GetBlock call. 2024-01-15 11:35:55 +02:00
Keagan McClelland
239103c2b3 multi: make tlv onion compulsory 2024-01-11 09:43:31 -08:00
Yong
34af399a5b
Merge pull request #8096 from ziggie1984/fix-dip-below-reserve
lnwallet: Introduce a fee buffer.
2024-01-09 01:52:04 +08:00
ziggie
1aa1e18b9f
routing: add log message. 2024-01-08 16:47:48 +01:00
yyforyongyu
58677569b5
routing+routerrpc: remove redudant error check
Since `SendPaymentAsync` now never returns an error, there's no need to
catch it and check it in `SendPaymentV2`.
2024-01-05 18:11:04 +08:00
Olaoluwa Osuntokun
cedbdd8999
Merge pull request #8142 from carlaKC/8137-validateblindedpayload
routing: Add Validation for Decoding Blinded Paths
2024-01-03 12:33:11 -08:00
Carla Kirk-Cohen
4071db77b5
routing: add handling for blinded errors from final node
We do not expect blinding errors from the final node:
1. If the introduction is the recipient, they should use regular errors.
2. Otherwise, nodes have no business sending this error when they are
   not part of a blinded route.
2023-12-18 12:07:56 -05:00
Carla Kirk-Cohen
7ce3a152a1
routing/refactor: add failNode helper to final outcome processing
Note: this refactor updates the inequality used from >= 2 to > 1 to
align with the rest of this file so that we express this concept
consistently throughout the code.
2023-12-18 12:07:47 -05:00
Carla Kirk-Cohen
b82478a7e7
routing: add result interpretation for intermediate invalid blinding
This commit adds handling for route blinding errors that are reported
by the introduction node in a multi-hop blinded route. As the
introduction node is always responsible for handling blinded errors,
it is not penalized - only the final hop is penalized to discourage the
blinded route without filling up mission control with ephemeral
results.

If this error code is reported by a node that is not an introduction
node, we penalize the node because it is returning an error code that
it should not be using.
2023-12-18 12:07:46 -05:00
Carla Kirk-Cohen
f91589bef9
routing: handle introduction node failure to convert error
This commit adds handling for errors that originate after the
introduction node when making payment to a blinded route. This
indicates that the introduction node is not obeying the spec, so
it is punished for the violation.
2023-12-18 12:07:36 -05:00
Carla Kirk-Cohen
69d5496e7c
multi: update payload validation to account for blinded routes 2023-12-18 11:27:55 -05:00
Carla Kirk-Cohen
7db072e020
routing: add additional validation to hop payload creation 2023-12-18 11:27:52 -05:00
Carla Kirk-Cohen
585f28c5f5
multi: explicitly signal final hop in pack hop payload
Previously, we'd use the value of nextChanID to infer whether a payload
was for the final hop in a route. This commit updates our packing logic
to explicitly signal to account for blinded routes, which allow zero
value nextChanID in intermediate hops. This is a preparatory commit
that allows us to more thoroughly validate payloads.
2023-12-18 11:27:52 -05:00
Carla Kirk-Cohen
a75bc13230
routing/test: set outgoing timelock on non-legacy test cases
Provide valid hop payloads for tests cases that use TLV onion format.
2023-12-18 11:27:49 -05:00