Summary
Complete the d14n service restructuring by removing all deprecated RPCs and services introduced in Phase 1 (#328). This is the breaking-change phase — it should only land after all consumers have migrated to the new service endpoints.
Parent issue: #327
Prerequisites
Before this work begins, the following must be true:
Scope
All changes are within proto/xmtpv4/.
1. Remove deprecated RPCs from ReplicationApi
File: proto/xmtpv4/message_api/message_api.proto
Remove the following deprecated RPCs from the ReplicationApi service:
SubscribeEnvelopes
SubscribeTopics
QueryEnvelopes
PublishPayerEnvelopes
GetInboxIds
GetNewestEnvelope
After removal, ReplicationApi should contain only:
service ReplicationApi {
rpc SubscribeOriginators(SubscribeOriginatorsRequest)
returns (stream SubscribeOriginatorsResponse) {}
}
2. Clean up orphaned message types
After removing the deprecated RPCs, evaluate whether the following message types are still needed in message_api.proto (they may only be referenced by the new service files via import):
EnvelopesQuery — used by SubscribeEnvelopesRequest and QueryEnvelopesRequest
SubscribeEnvelopesRequest / SubscribeEnvelopesResponse — used by deprecated SubscribeEnvelopes and NotificationApi
Keep any types still referenced by QueryApi, PublishApi, or NotificationApi. Remove types that are no longer imported by any service.
3. Delete payer_api package
Delete: proto/xmtpv4/payer_api/payer_api.proto (and directory)
Prerequisite: gateway_api.GatewayApi currently imports message types from payer_api. Before deletion:
- Move
PublishClientEnvelopesRequest, PublishClientEnvelopesResponse, GetNodesRequest, GetNodesResponse into proto/xmtpv4/gateway_api/gateway_api.proto
- Update
GatewayApi RPC signatures to reference the local types
- Remove the
payer_api import
4. Update buf.yaml
- Remove any
RPC_REQUEST_RESPONSE_UNIQUE ignore entries for files that no longer have shared types after deprecated RPCs are removed
- Remove any
RPC_RESPONSE_STANDARD_NAME ignore entries that are no longer needed
- Verify
buf lint is clean (or only has pre-existing warnings unrelated to xmtpv4)
5. Enforce ReplicationApi auth (proto-side, if applicable)
If node auth token enforcement requires proto-level changes (e.g., metadata annotations or interceptor configuration), add them to ReplicationApi. Otherwise, this is a server-side concern only and can be skipped in the proto repo.
Verification
cd proto && buf lint && buf build
cd proto && buf breaking --against '.git#subdir=proto' # expect breaking changes
grep -r "payer_api" proto/ # should return no results
The buf breaking check will flag breaking changes (removed RPCs, deleted package). This is intentional and expected.
Out of scope
- Server-side implementation changes
- Client SDK migration
- Changes to
metadata_api, misbehavior_api, or envelopes
Summary
Complete the d14n service restructuring by removing all deprecated RPCs and services introduced in Phase 1 (#328). This is the breaking-change phase — it should only land after all consumers have migrated to the new service endpoints.
Parent issue: #327
Prerequisites
Before this work begins, the following must be true:
ReplicationApi.SubscribeOriginatorsinstead ofSubscribeEnvelopesQueryApifor queries/subscriptions instead ofReplicationApiPublishApi.PublishPayerEnvelopesinstead ofReplicationApi.PublishPayerEnvelopesgateway_api.GatewayApiinstead ofpayer_api.PayerApiReplicationApiScope
All changes are within
proto/xmtpv4/.1. Remove deprecated RPCs from
ReplicationApiFile:
proto/xmtpv4/message_api/message_api.protoRemove the following deprecated RPCs from the
ReplicationApiservice:SubscribeEnvelopesSubscribeTopicsQueryEnvelopesPublishPayerEnvelopesGetInboxIdsGetNewestEnvelopeAfter removal,
ReplicationApishould contain only:2. Clean up orphaned message types
After removing the deprecated RPCs, evaluate whether the following message types are still needed in
message_api.proto(they may only be referenced by the new service files via import):EnvelopesQuery— used bySubscribeEnvelopesRequestandQueryEnvelopesRequestSubscribeEnvelopesRequest/SubscribeEnvelopesResponse— used by deprecatedSubscribeEnvelopesandNotificationApiKeep any types still referenced by
QueryApi,PublishApi, orNotificationApi. Remove types that are no longer imported by any service.3. Delete
payer_apipackageDelete:
proto/xmtpv4/payer_api/payer_api.proto(and directory)Prerequisite:
gateway_api.GatewayApicurrently imports message types frompayer_api. Before deletion:PublishClientEnvelopesRequest,PublishClientEnvelopesResponse,GetNodesRequest,GetNodesResponseintoproto/xmtpv4/gateway_api/gateway_api.protoGatewayApiRPC signatures to reference the local typespayer_apiimport4. Update
buf.yamlRPC_REQUEST_RESPONSE_UNIQUEignore entries for files that no longer have shared types after deprecated RPCs are removedRPC_RESPONSE_STANDARD_NAMEignore entries that are no longer neededbuf lintis clean (or only has pre-existing warnings unrelated to xmtpv4)5. Enforce
ReplicationApiauth (proto-side, if applicable)If node auth token enforcement requires proto-level changes (e.g., metadata annotations or interceptor configuration), add them to
ReplicationApi. Otherwise, this is a server-side concern only and can be skipped in the proto repo.Verification
The
buf breakingcheck will flag breaking changes (removed RPCs, deleted package). This is intentional and expected.Out of scope
metadata_api,misbehavior_api, orenvelopes