Skip to content

[v0.21.x-branch] Backport #10814: Remove deprecated Send* / TrackPayment RPCs and outgoing_chan_id field#10818

Merged
ziggie1984 merged 6 commits into
v0.21.x-branchfrom
backport-10814-to-v0.21.x-branch
May 19, 2026
Merged

[v0.21.x-branch] Backport #10814: Remove deprecated Send* / TrackPayment RPCs and outgoing_chan_id field#10818
ziggie1984 merged 6 commits into
v0.21.x-branchfrom
backport-10814-to-v0.21.x-branch

Conversation

@github-actions
Copy link
Copy Markdown

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* and TrackPayment surface that was
announced 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 the
multi-channel outgoing_chan_ids field. This PR drops the deprecated
surface they replace.

What changes

RPCs removed

lnrpc

  • SendPayment (bidirectional streaming)
  • SendPaymentSync
  • SendToRoute (bidirectional streaming)
  • SendToRouteSync

routerrpc

  • SendPayment (streaming)
  • SendToRoute
  • TrackPayment (streaming)

The now-orphan routerrpc.SendToRouteResponse message and the
PaymentState enum / PaymentStatus message (only referenced by the
deprecated TrackPayment response) 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 QueryRoutes and ExtractPaymentIntent
that accepted the single-channel field alongside outgoing_chan_ids
is removed; callers must now use outgoing_chan_ids.

Server-side cleanup

  • Handler implementations and macaroon permission entries for the
    deleted lnrpc RPCs are removed from rpcserver.go, along with the
    dead payment infrastructure that was exclusively used by them:
    paymentStream, rpcPaymentRequest, rpcPaymentIntent,
    extractPaymentIntent, dispatchPaymentIntent, sendPayment,
    sendPaymentSync.
  • The routerrpc shim methods in router_server_deprecated.go that
    delegated to V2, the matching macaroon entries, and the
    legacyTrackPaymentServer wrapper are removed.
  • All affected pb.go, pb.gw.go, pb.json.go, _grpc.pb.go, REST
    yaml, and swagger artifacts are regenerated.

Itest migration

  • lnd_routing_test.go: the three SendToRoute test cases (sync,
    stream, v2) are collapsed into a single test using SendToRouteV2;
    testSendToRouteErrorPropagation now asserts on Failure.Code
    instead of the legacy PaymentError string.
  • lnd_channel_policy_test.go: streaming SendToRoute replaced with
    SendToRouteV2, asserting on HTLCAttempt.Failure.
  • SendToRoute / SendToRouteSync helpers are removed from the test
    harness.

Release notes

Breaking Changes entries added to release-notes-0.21.0.md covering
the 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) and SendPayment
    (routerrpc) callers must switch to routerrpc.SendPaymentV2.
  • SendToRoute / SendToRouteSync (lnrpc) and SendToRoute
    (routerrpc) callers must switch to routerrpc.SendToRouteV2. Error
    reporting moves from the string PaymentError field to the
    structured Failure / HTLCAttempt.Failure field.
  • TrackPayment (routerrpc) callers must switch to TrackPaymentV2;
    the PaymentState / PaymentStatus types are gone.
  • Requests setting outgoing_chan_id must populate
    outgoing_chan_ids (a repeated field) instead. The old tag is
    reserved, so stale clients sending it will be rejected by proto
    parsing.

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)
Copy link
Copy Markdown
Collaborator

@ziggie1984 ziggie1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ziggie1984 ziggie1984 merged commit 3b78e0a into v0.21.x-branch May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants