routing: track amt ranges in mission control#3493
routing: track amt ranges in mission control#3493joostjager merged 2 commits intolightningnetwork:masterfrom
Conversation
883f699 to
6846bc7
Compare
fca612e to
a39b10d
Compare
d138b83 to
33c1eaf
Compare
routing/probability_estimator.go
Outdated
There was a problem hiding this comment.
Shouldn't SuccessTIme be used here,, similar to how FailTIme.IsZero is checked below?
There was a problem hiding this comment.
The condition can actually be removed. If there is no success recorded (or pushed down by an amt independent failure), successAmt will be zero and amt is always greater than zero.
3532f2c to
370c5fc
Compare
|
Can be rebased now that the dependent PR is merged. |
370c5fc to
0a17ecd
Compare
routing/missioncontrol.go
Outdated
There was a problem hiding this comment.
Is this the amount that most recently failed, as in attempted to be forwarded= failed? Not clear from the comment what this represents, but I'm lacking a bit of context on this one.
There was a problem hiding this comment.
Not sure what you mean with 'attempted to be forwarded= failed'. But this is (usually) the amount of the last failure.
Comments fixed to explain this better.
There was a problem hiding this comment.
Ah, now seeing that this refers to the first commit. Removed the "(attempted to be)" part. It may not be that helpful, because there is also a success boolean in this struct.
routing/missioncontrol.go
Outdated
There was a problem hiding this comment.
nit: does this need a newline?
There was a problem hiding this comment.
which newline exactly do you mean?
There was a problem hiding this comment.
All the params can fit on one line within 80 char limit
m.setLastPairResult(pair.From, pair.To, result.timeReply, &pairResult)
There was a problem hiding this comment.
Also with our standard tab size 8?
routing/missioncontrol.go
Outdated
There was a problem hiding this comment.
Is there an argument that scaling down the success amount makes sense, since larger success amounts may deplete the outgoing capacity on a channel? As is, a single large payment "vouches" for all amounts below it succeeding, even though we may not necessarily be seeing payments of this magnitude.
There was a problem hiding this comment.
Imo we should stay away from that kind of inference. There may be private channels that shadow a single public channel, which interferes with assumptions of that kind.
0a17ecd to
110c8b4
Compare
b63db30 to
f897cd5
Compare
617d59b to
6f76da1
Compare
carlaKC
left a comment
There was a problem hiding this comment.
Happy with the logic as is, but I think it's worth adding a comment on TimedPairResult's SuccessTime to explicitly indicate that it is not necessarily matched with the SuccessAmount.
halseth
left a comment
There was a problem hiding this comment.
Mostly some questions and nits, nothing really blocking. Agree that adding some comments to TimedPairResult would be useful. Good PR :)
9212050 to
e4b5b16
Compare
e4b5b16 to
cdf1aa5
Compare
Previously we tracked the last result for a node connection only. This could lead to the situation where a meaningful observation would be overwritten by a far less meaningful one. For example: a failure for 100.000 sats is overwritten by a success for 100 sats.
Besides better route selection in general, this also helps with building the bos node score list.
Probing with minimal amounts in particular will likely wipe out useful history for more representative amounts.
This PR changes mission control to track both that the success and the last failure. This creates three amount ranges for which probabilities are calculated differently:
<=successAmt: return a high probability (default 0.95)successAmt+1tofailAmt-1: in this range, we don't have much information. Return the a priori (default 0.6)>=failAmt: penalize the connection and decay over time back to the a priori