Skip to main content

voteSubscribe

Subscribe to receive notification anytime a new vote is observed in gossip. These votes are pre-consensus therefore there is no guarantee these votes will enter the ledger.

Common use cases
Validator behavior analysisMonitor gossip vote activity to analyze validator voting patterns and detect anomalies in consensus participation. Requires validator started with --rpc-pubsub-enable-vote-subscription flag.
Consensus mechanism researchObserve pre-consensus votes for research into Solana's Tower BFT consensus algorithm. Votes received are not guaranteed to enter the ledger.

Parameters

No parameters required.

Request

wscat -c wss://solana-mainnet.api.syndica.io -x '{
"jsonrpc": "2.0",
"id": 1,
"method": "voteSubscribe"
}'
Network Selection

Replace mainnet with devnet in the URL to query devnet instead.

Response

{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}

Response Fields

Return value: integer

subscription id (needed to unsubscribe)

Notification Format

The notification will be an object with the following fields:

  • hash: <string> - The vote hash
  • slots: <array> - The slots covered by the vote, as an array of u64 integers
  • timestamp: <i64|null> - The timestamp of the vote
  • signature: <string> - The signature of the transaction that contained this vote
  • votePubkey: <string> - The public key of the vote account, as base-58 encoded string
{
"jsonrpc": "2.0",
"method": "voteNotification",
"params": {
"result": {
"hash": "8Rshv2oMkPu5E4opXTRyuyBeZBqQ4S477VG26wUTFxUM",
"slots": [1, 2],
"timestamp": null
},
"subscription": 0
}
}

FAQ and Troubleshooting

Why do I get "Method not found" errors?

This method requires the validator to start with --rpc-pubsub-enable-vote-subscription flag. Most RPC providers don't enable this unstable method.

Can I use this for production vote monitoring?

No. This is an unstable method that may change format. Votes are pre-consensus and may never reach the ledger. Use for research only.

What's the difference between gossip votes and confirmed votes?

Gossip votes are observed before consensus (pre-confirmation). They represent validator intentions but aren't guaranteed to be included in the blockchain.

voteUnsubscribe
Cancels vote subscription. Always paired with voteSubscribe; both are unstable methods requiring same validator flag for proper vote monitoring lifecycle.

slotSubscribe
Subscribe to processed slot updates. More stable alternative for monitoring blockchain progression; use when pre-consensus vote data isn't required.

External Resources