-
Notifications
You must be signed in to change notification settings - Fork 0
implement imputed costs #2
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
Pull reviewers statsStats of the last 30 days for lnd:
|
75cfcda to
eb30895
Compare
eb30895 to
22d2d95
Compare
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.
Pull Request Overview
This PR implements imputed costs functionality for the Lightning Network Daemon (LND) router service. Imputed costs allow users to apply additional virtual costs to specific node pairs to influence routing decisions, enabling more sophisticated payment routing strategies.
Key changes include:
- Addition of three new experimental RPC methods for managing imputed costs (import, query, delete)
- New protobuf message definitions for imputed cost configurations, policies, and restrictions
- Integration of imputed cost restrictions into existing payment request structures
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lnrpc/routerrpc/router.proto | Defines new RPC methods and message structures for imputed cost management |
| lnrpc/routerrpc/router_grpc.pb.go | Generated gRPC client and server interfaces for imputed cost operations |
| lnrpc/routerrpc/router.yaml | HTTP endpoint mappings for the new imputed cost APIs |
| lnrpc/routerrpc/router.swagger.json | OpenAPI documentation for the new imputed cost endpoints |
| lnrpc/routerrpc/router.pb.json.go | JSON callback registrations for the new RPC methods |
| lnrpc/routerrpc/router.pb.gw.go | HTTP gateway handlers for the new imputed cost endpoints |
| lnrpc/lightning.proto | Integration of imputed cost restrictions into core payment structures |
| lnrpc/lightning.swagger.json | OpenAPI documentation updates for imputed cost restrictions in payments |
22d2d95 to
d007f29
Compare
629c804 to
32bfbba
Compare
5e57a74 to
0c256b5
Compare
- Add experimental imputed costs API to router service with three new RPCs: XImportImputedCosts, XQueryImputedCosts, XDeleteImputedCosts. - Introduces messages for ImputedCostNamespace, ImputedCostPair and ImputedCostParameters with support for success-based and attempt-based cost calculations. - Adds imputed_cost_restrictions field to SendPaymentRequest and QueryRoutesRequest for total routing cost limits. - Compiling of the protos - Update of router.yaml
0c256b5 to
0c482bc
Compare
We added callbacks in SessionSource and paymentSession and fixed the existing utests.
0c482bc to
dea8f85
Compare
We pass getHTLCs from resumePayment to RequestRoute.
This PR is for personal tracking of the imputed cost implementation.
Change Description
Description of change / link to associated issue.
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.