From f6e417250b81f8ae7ddbe957690e90122ec65b59 Mon Sep 17 00:00:00 2001 From: Linus Kendall <5172293+linuskendall@users.noreply.github.com> Date: Mon, 14 Sep 2026 06:20:44 +0000 Subject: [PATCH 1/2] feat(websocket): add slotUnsubscribe specification --- methods/websocket/slotUnsubscribe.md | 7 +++++ methods/websocket/slotUnsubscribe.yaml | 27 ++++++++++++++++++ proposals/0054-slot-unsubscribe.md | 38 ++++++++++++++++++++++++++ spec-info.yaml | 2 +- 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 methods/websocket/slotUnsubscribe.md create mode 100644 methods/websocket/slotUnsubscribe.yaml create mode 100644 proposals/0054-slot-unsubscribe.md diff --git a/methods/websocket/slotUnsubscribe.md b/methods/websocket/slotUnsubscribe.md new file mode 100644 index 0000000..7cd9eb7 --- /dev/null +++ b/methods/websocket/slotUnsubscribe.md @@ -0,0 +1,7 @@ +# slotUnsubscribe + +Cancels a subscription created by `slotSubscribe` on the same WebSocket connection and returns `true`. An id that this connection does not hold returns `InvalidParams` (-32602) with the message `Invalid subscription id.` + +## Implementation notes + +[**Agave**](../../implementations/agave.md) implements this method in the [pinned PubSub trait](https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc_pubsub.rs#L165). Cloudbreak and Superbank do not serve WebSocket subscriptions. diff --git a/methods/websocket/slotUnsubscribe.yaml b/methods/websocket/slotUnsubscribe.yaml new file mode 100644 index 0000000..9d6dc6d --- /dev/null +++ b/methods/websocket/slotUnsubscribe.yaml @@ -0,0 +1,27 @@ +name: slotUnsubscribe +status: standard +summary: Cancel a slotSubscribe subscription. +params: + - name: subscriptionId + required: true + summary: Identifier returned by slotSubscribe on this connection. + schema: { $ref: '#/components/schemas/U64' } +result: + name: success + summary: True when the subscription is cancelled. + schema: { type: boolean } +errors: + - $ref: '#/components/errors/InvalidParams' +examples: + - name: basic + summary: Cancel a subscription. + params: + - name: subscriptionId + value: 1 + result: + name: success + value: true +implementations: + agave: { status: full } + cloudbreak: { status: none } + superbank: { status: none } diff --git a/proposals/0054-slot-unsubscribe.md b/proposals/0054-slot-unsubscribe.md new file mode 100644 index 0000000..a0027c0 --- /dev/null +++ b/proposals/0054-slot-unsubscribe.md @@ -0,0 +1,38 @@ +--- +number: 0054 +title: Add slotUnsubscribe +authors: [rpcpool] +status: draft +created: 2026-09-14 +reference-implementations: [https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc_pubsub.rs#L165] +--- + +# Add slotUnsubscribe + +## Summary + +Add the slotUnsubscribe WebSocket RPC method. + +## Motivation + +Agave exposes this public PubSub lifecycle method. + +## Specification + +Add the paired WebSocket method page. It defines the connection-scoped cancellation request, true result, and invalid-subscription error. + +## Return-type impact + +The method returns true after cancellation. + +## Compatibility + +This is additive. Agave implements it. Cloudbreak and Superbank do not currently implement WebSocket PubSub. + +## Reference implementation + +[Agave pinned handler](https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc_pubsub.rs#L165) + +## Security considerations + +Servers release the subscription resources when this call succeeds. diff --git a/spec-info.yaml b/spec-info.yaml index 892ea85..bca4391 100644 --- a/spec-info.yaml +++ b/spec-info.yaml @@ -1,5 +1,5 @@ title: Solana JSON-RPC API -version: 0.1.0 +version: 0.2.0 license: name: MIT url: https://opensource.org/license/mit/ From 91ac26318a46f37ee16f0727515cea212fa53ab2 Mon Sep 17 00:00:00 2001 From: Linus Kendall <5172293+linuskendall@users.noreply.github.com> Date: Mon, 14 Sep 2026 06:43:41 +0000 Subject: [PATCH 2/2] docs(agave): focus implementation note --- methods/websocket/slotUnsubscribe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/methods/websocket/slotUnsubscribe.md b/methods/websocket/slotUnsubscribe.md index 7cd9eb7..ec53775 100644 --- a/methods/websocket/slotUnsubscribe.md +++ b/methods/websocket/slotUnsubscribe.md @@ -4,4 +4,4 @@ Cancels a subscription created by `slotSubscribe` on the same WebSocket connecti ## Implementation notes -[**Agave**](../../implementations/agave.md) implements this method in the [pinned PubSub trait](https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc_pubsub.rs#L165). Cloudbreak and Superbank do not serve WebSocket subscriptions. +[**Agave**](../../implementations/agave.md) implements this method in the [pinned PubSub trait](https://github.com/anza-xyz/agave/blob/6dd9d38771e46103b9680357a855804165612602/rpc/src/rpc_pubsub.rs#L165).