Skip to content

[Bug] SubscribeSlotInfo issue #472

@NightWuYo

Description

@NightWuYo

I found that Solnet cannot subscribe Quicknode endpoints (cannot detect results), the difference is, in Quicknode endpoints, 'subscription' field comes first in params, but in api.mainnet-beta.solana.com, 'result' field comes first.
I'm wondering if this is because Solnet relies on the order of the params.

Working version:

Data

{"jsonrpc":"2.0","method":"slotNotification","params":{"result":{"slot":303986310,"parent":303986309,"root":303986278},"subscription":4783444}}

Code

var streamingClient = ClientFactory.GetStreamingClient("wss://api.mainnet-beta.solana.com"); await streamingClient.ConnectAsync(); var subscription = await streamingClient.SubscribeSlotInfoAsync( (state, data) => { Log.Information("Slot {Slot} at {Time}", data.Slot, DateTimeOffset.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")); });

Not working with Quicknode endpoints:

Data

{"jsonrpc":"2.0","method":"slotNotification","params":{"subscription":11263,"result":{"slot":343082753,"parent":343082752,"root":343082721}}}

Code

var streamingClient = ClientFactory.GetStreamingClient("wss://tame-cool-borough.solana-devnet.quiknode.pro/ca7e417575b2778a022f76bd72989cba039f2efe/"); await streamingClient.ConnectAsync(); var subscription = await streamingClient.SubscribeSlotInfoAsync( (state, data) => { Log.Information("Slot {Slot} at {Time}", data.Slot, DateTimeOffset.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")); });

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions