-
Notifications
You must be signed in to change notification settings - Fork 2.2k
routerrpc: add queryprob rpc #3556
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
Conversation
b1e9859 to
9ec1007
Compare
2ea9411 to
8644ceb
Compare
carlaKC
left a comment
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.
LGTM, a few small nits about naming but overall a pretty straightforward.
routing/missioncontrol.go
Outdated
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.
now that these field are replicated both here and in pairResult, can this struct type be removed now?
lnrpc/routerrpc/router_server.go
Outdated
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.
why don't do Unix() also when zero?
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.
It is a very negative number. The beginning of time.Time is far before 1970.
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.
ouch, TIL
lnrpc/routerrpc/router.proto
Outdated
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.
is the reason for PairData to reuse it here?
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.
yes
8644ceb to
73eba92
Compare
This prepares for decoupling the result interpretation of a single payment attempt from the information stored in mission control memory on the history of a node pair. A planned follow-up where we store both the last success and last failure requires this decoupling.
Prepares for this data structure being accessed in mission control rpc implementations.
With a separate proto message, it becomes possible to also return the pair data for a single pair. This prepares for the new mc probability querying rpc.
Probabilities are no longer returned for querymc calls. To still provide some insight into the mission control internals, this commit adds a new rpc that calculates a success probability estimate for a specific node pair and amount.
73eba92 to
fb57255
Compare
halseth
left a comment
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.
Pretty straightforward diff, only exposing state that already exists within MC. LGTM 🎅
carlaKC
left a comment
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.
Looks good, adding approval post new changes being pushed to see whether my grey tick changes, but I don't think my review will count towards approvals: "At least 2 approving reviews are required by reviewers with write access".
In #3462, we removed probability reporting for
querymc. This PR brings it back as a separate rpc for which a specific amount needs to be given.In addition to the probability, it also returns the raw data for the requested pair. An example use case for this is to get a sense for the freshness of a pair and use this to decide whether to do a prepay probe for a route.