implement imputed costs#2
Closed
feelancer21 wants to merge 9 commits intofeelancer-0-19-2-dev-branchfrom
Closed
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.
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 file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.