[v0.21.x-branch] Backport #10814: Remove deprecated Send* / TrackPayment RPCs and outgoing_chan_id field#10818
Merged
Conversation
Remove the compatibility fallback in QueryRoutes and ExtractPaymentIntent that accepted the deprecated single outgoing_chan_id field alongside the replacement outgoing_chan_ids. Callers must now use outgoing_chan_ids. Update TestQueryRoutes and TestExtractPaymentIntent accordingly. (cherry picked from commit d66341f)
Remove SendToRoute and SendToRouteSync helpers from the test harness and update integration tests to use routerrpc.SendToRouteV2: - lnd_routing_test.go: collapse three SendToRoute test cases (sync, stream, v2) into a single test using SendToRouteV2; update testSendToRouteErrorPropagation to assert on Failure.Code instead of PaymentError string - lnd_channel_policy_test.go: replace streaming SendToRoute with SendToRouteV2 and assert on HTLCAttempt.Failure instead of PaymentError string (cherry picked from commit a6c64ab)
Remove handler implementations and macaroon permission entries for the now-deleted lnrpc RPCs: SendPayment, SendPaymentSync, SendToRoute, and SendToRouteSync. Also remove the dead payment infrastructure that was exclusively used by these handlers: paymentStream, rpcPaymentRequest, rpcPaymentIntent, extractPaymentIntent, dispatchPaymentIntent, sendPayment, and sendPaymentSync. (cherry picked from commit 3ff8791)
…mpls Remove the SendPayment, SendToRoute, and TrackPayment shim methods from router_server_deprecated.go that delegated to their V2 counterparts. Remove their macaroon permission entries from router_server.go and the now-unused legacyTrackPaymentServer wrapper. (cherry picked from commit c7dd0a9)
Remove the following deprecated RPC definitions that were announced for removal in 0.21 via the 0.20 release notes: lnrpc: - SendPayment (bidirectional streaming) - SendPaymentSync - SendToRoute (bidirectional streaming) - SendToRouteSync routerrpc: - SendPayment (streaming) - SendToRoute - TrackPayment (streaming) Also remove the now-unused PaymentState enum and PaymentStatus message that were only used by the deprecated TrackPayment response stream, plus the corresponding REST annotations from the yaml files. Drop the now-orphan routerrpc.SendToRouteResponse message that was only referenced by the deleted routerrpc.SendToRoute RPC. Also remove the deprecated outgoing_chan_id field from lnrpc.QueryRoutesRequest (tag 14) and routerrpc.SendPaymentRequest (tag 8); their tag numbers are now reserved. Callers must use the multi-channel outgoing_chan_ids field introduced in 0.20. Drop the compat fallback in router_backend.go that previously consumed the field, and regenerate all protobuf, gRPC, REST gateway, JSON, and swagger files. (cherry picked from commit d0768f0)
Add entries to the Breaking Changes section covering the payment and tracking RPCs and the `outgoing_chan_id` field removed in this branch, all of which were announced for removal in 0.21 via the 0.20 release notes. (cherry picked from commit 05bdb66)
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.
Backport of #10814
Context
This PR is carved out of #10795 ("multi: remove deprecated RPCs and
config flags scheduled for 0.21"), which was split into smaller,
independently-reviewable PRs by topic. This is the payment RPC piece:
removal of the legacy
Send*andTrackPaymentsurface that wasannounced for removal in 0.21 via the 0.20 release notes.
The replacements have shipped since 0.20: callers should be on the V2
variants (
SendPaymentV2,SendToRouteV2,TrackPaymentV2) and themulti-channel
outgoing_chan_idsfield. This PR drops the deprecatedsurface they replace.
What changes
RPCs removed
lnrpc
SendPayment(bidirectional streaming)SendPaymentSyncSendToRoute(bidirectional streaming)SendToRouteSyncrouterrpc
SendPayment(streaming)SendToRouteTrackPayment(streaming)The now-orphan
routerrpc.SendToRouteResponsemessage and thePaymentStateenum /PaymentStatusmessage (only referenced by thedeprecated
TrackPaymentresponse) are dropped as well.Fields removed
lnrpc.QueryRoutesRequest.outgoing_chan_id(tag 14, now reserved)routerrpc.SendPaymentRequest.outgoing_chan_id(tag 8, now reserved)The compatibility fallback in
QueryRoutesandExtractPaymentIntentthat accepted the single-channel field alongside
outgoing_chan_idsis removed; callers must now use
outgoing_chan_ids.Server-side cleanup
deleted lnrpc RPCs are removed from
rpcserver.go, along with thedead payment infrastructure that was exclusively used by them:
paymentStream,rpcPaymentRequest,rpcPaymentIntent,extractPaymentIntent,dispatchPaymentIntent,sendPayment,sendPaymentSync.routerrpcshim methods inrouter_server_deprecated.gothatdelegated to V2, the matching macaroon entries, and the
legacyTrackPaymentServerwrapper are removed.pb.go,pb.gw.go,pb.json.go,_grpc.pb.go, RESTyaml, and swagger artifacts are regenerated.
Itest migration
lnd_routing_test.go: the threeSendToRoutetest cases (sync,stream, v2) are collapsed into a single test using
SendToRouteV2;testSendToRouteErrorPropagationnow asserts onFailure.Codeinstead of the legacy
PaymentErrorstring.lnd_channel_policy_test.go: streamingSendToRoutereplaced withSendToRouteV2, asserting onHTLCAttempt.Failure.SendToRoute/SendToRouteSynchelpers are removed from the testharness.
Release notes
Breaking Changes entries added to
release-notes-0.21.0.mdcoveringthe RPC and field removals.
Breaking changes / caller-facing notes
This is a breaking change for any client still on the legacy surface.
Migration:
SendPayment/SendPaymentSync(lnrpc) andSendPayment(routerrpc) callers must switch to
routerrpc.SendPaymentV2.SendToRoute/SendToRouteSync(lnrpc) andSendToRoute(routerrpc) callers must switch to
routerrpc.SendToRouteV2. Errorreporting moves from the string
PaymentErrorfield to thestructured
Failure/HTLCAttempt.Failurefield.TrackPayment(routerrpc) callers must switch toTrackPaymentV2;the
PaymentState/PaymentStatustypes are gone.outgoing_chan_idmust populateoutgoing_chan_ids(a repeated field) instead. The old tag isreserved, so stale clients sending it will be rejected by proto
parsing.