-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore payment amount fuzzing #3212
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7e4ea52
pay: restore payment value randomization through shadow routing
darosior 247c2c9
common/json: add a helper for json to u16
darosior db00602
pay: add a dev-only parameter to deactivate shadow routing
darosior 608d868
pytest: deactivate shadow routing for some tests that use 'pay'
darosior 216dd35
pytest: test shadow routing in pay plugin
darosior File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,19 +51,19 @@ randomization\. | |
1: Route Randomization | ||
|
||
|
||
2: Shadow Route | ||
|
||
|
||
Route randomization means the payment algorithm does not always use the | ||
lowest-fee or shortest route\. This prevents some highly-connected node | ||
from learning all of the user payments by reducing their fees below the | ||
network average\. | ||
|
||
|
||
Shadow route means the payment algorithm will virtually extend the time | ||
delays along the route, making it appear to intermediate nodes that the | ||
route is longer than it actually is\. This prevents intermediate nodes | ||
from reliably guessing their distance from the payee\. | ||
2: Shadow Route | ||
|
||
|
||
Shadow route means the payment algorithm will virtually extend the route | ||
by adding delays and fees along it, making it appear to intermediate nodes | ||
that the route is longer than it actually is\. This prevents intermediate | ||
nodes from reliably guessing their distance from the payee\. | ||
|
||
|
||
Route randomization will never exceed \fImaxfeepercent\fR of the payment\. | ||
|
@@ -84,6 +84,7 @@ You can monitor the progress and retries of a payment using the | |
|
||
The following error codes may occur: | ||
|
||
.RS | ||
.IP \[bu] | ||
-1: Catchall nonspecific error\. | ||
.IP \[bu] | ||
|
@@ -109,13 +110,15 @@ invoice expiration) as UNIX epoch time in seconds\. | |
.IP \[bu] | ||
210: Payment timed out without a payment in progress\. | ||
|
||
.RE | ||
|
||
Error codes 202 and 204 will only get reported at \fBsendpay\fR; in | ||
\fBpay\fR we will keep retrying if we would have gotten those errors\. | ||
|
||
|
||
A routing failure object has the fields below: | ||
|
||
.RS | ||
.IP \[bu] | ||
\fIerring_index\fR: The index of the node along the route that reported | ||
the error\. 0 for the local node, 1 for the first hop, and so on\. | ||
|
@@ -132,6 +135,7 @@ error, or \fI0:0:0\fR if the destination node raised the error\. | |
received from the remote node\. Only present if error is from the | ||
remote node and the \fIfailcode\fR has the UPDATE bit set, as per BOLT #4\. | ||
|
||
.RE | ||
|
||
The \fIdata\fR field of errors will include statistics \fIgetroute_tries\fR and | ||
\fIsendpay_tries\fR\. It will also contain a \fIfailures\fR field with detailed | ||
|
@@ -150,7 +154,3 @@ Rusty Russell \fI<[email protected]\fR> is mainly responsible\. | |
|
||
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR | ||
|
||
.HL | ||
|
||
Last updated 2019-08-01 14:59:36 CEST | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this dev-only please? I don't want normal people to disable shadow routing, it's a terrible idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do