BlockReq
Back to all articles

Rpc Tutorials

Solana Changelog subscribe tool: wire RPC filters

Fill SOLANA_HTTPS / SOLANA_WSS when the node is ready and run: wire Changelog subscription-request filters via logsSubscribe / program mentions, upgrade-window signals into an alert panel. Register for 3M free requests monthly.

BlockReq EngineeringSeptember 11, 20265 min read

Solana Changelog subscribe tool: wire RPC filters

Solana Changelog puts RPC spec + subscription-request filters on the upgrade cadence: narrow the subscribe body by mentions / filter keys, and route upgrade-window signals straight into an alert panel. This post pre-wires the logsSubscribe / filtered program subscription recipe—browser keeps SOLANA_HTTPS / SOLANA_WSS placeholders; once the node is ready, fill the endpoint into env and run.

Run on the public endpoint · blockreq.com register for 3M free requests monthly.

UseEndpoint (placeholder)
HTTPSprocess.env.SOLANA_HTTPS (fill when the node is ready)
WSSprocess.env.SOLANA_WSS (fill when the node is ready)
PrivateTrailing public{API_KEY} (keys stay local)

Chain: Solana. Recipe: logsSubscribe (mentions program) → narrow by Changelog filter keys → upgrade-window hit → alert card. Browser demo ships UI + sample rows first; swap the real endpoint when ready and keep listening. Public endpoints · Plans · Register.

Hot source: solana_devs Changelog post. Stack alongside the Pump Custom Pair open line: this post is RPC filter / upgrade-window subscribe; opens live at Pump Custom Pair quote whitelist.

1. Hook: hear Changelog filters

Tape feelOn-chain signalWatch
Filter narrowsubscription-request filter hitmentions / filterKeys
Program log clusterlogsSubscribe mentions programsignature / slot / logs
Upgrade-window alertkey log patterns inside Changelog windowupgradeTag + window
Endpoint swapenv swap → keep listeningfill SOLANA_WSS and run

Feel: Changelog writes filters as wireable subscription requests—pre-wire mentions + filter keys, then push upgrade-window signals into the alert panel.

2. Event: logsSubscribe + subscription filter

Keep SOLANA_HTTPS / SOLANA_WSS / PROGRAM_MENTIONS / FILTER_KEYS / UPGRADE_WINDOW_TAGS in env. When the node is ready, change the endpoint only—the subscribe body and filter stay the same.

Step A · Subscribe program logs (filter narrow)

{
  "jsonrpc": "2.0", "id": 1, "method": "logsSubscribe",
  "params": [
    { "mentions": ["PROGRAM_MENTIONS"] },
    { "commitment": "confirmed" }
  ]
}
  • mentions = process.env.PROGRAM_MENTIONS (editable program-id list; Changelog / official table).
  • Client-scan log lines by FILTER_KEYS: filter-key hit → write filterHit.
  • HTTPS getTransaction (encoding: "jsonParsed") fills signature / slot / key instruction names.

Step B · Upgrade-window alert card

UPGRADE_WINDOW_TAGS = editable tag set (feature-gate / runtime / rpc-spec …)
hit = log matches FILTER_KEYS ∧ tag ∈ UPGRADE_WINDOW_TAGS  →  write alertState

Alert-card fields:

{ pad: "changelog-filter", program, filterKey, upgradeTag, signature, slot, ts }

Dedupe on signature / filterKey; merge repeat pushes inside the same window.

Step C · Optional stack: multi-program parallel mentions

Run several logsSubscribe paths on the same WSS (one program each); alert panel columns by program chip for same-window upgrade compare.

3. Browser demo

Connect the SOLANA_WSS placeholder, fill PROGRAM_MENTIONS + FILTER_KEYS + UPGRADE_WINDOW_TAGS, hit Start: UI streams sample filtered rows and upgrade-window alerts first; once the node is ready, swap the real endpoint and the same filter keeps listening.

:::pages-demo https://blockreq.com/demos1/solana-changelog-subscription-filter/en/ title: Changelog RPC filter subscribe height: 520 :::

env  → SOLANA_HTTPS · SOLANA_WSS · PROGRAM_MENTIONS · FILTER_KEYS · UPGRADE_WINDOW_TAGS
WSS  → process.env.SOLANA_WSS
HTTPS→ process.env.SOLANA_HTTPS

Paths: /demos1/solana-changelog-subscription-filter/zh/ · /demos1/solana-changelog-subscription-filter/en/. For keyed: swap trailing public for {API_KEY}.

Quota: blockreq.com register for 3M free requests monthly.

4. Alert rhythm

  1. logsSubscribe arrives → scan logs by FILTER_KEYS.
  2. Filter hit → outbound Changelog filter · program=… · key=… · slot=….
  3. Upgrade-window tag hit → stack upgradeTag chip on the alert panel.
  4. Dedupe → one push per signature / filterKey.

On disconnect: reconnect and re-logsSubscribe; gap-fill with HTTPS getSignaturesForAddress + getTransaction on the same program. POST → process.env.SOLANA_HTTPS.

5. Summary + CTA

  1. Grain: Changelog subscribe = logsSubscribe + subscription-request filter + upgrade-window tag.
  2. Recipe: SOLANA_WSS + PROGRAM_MENTIONS + FILTER_KEYS + UPGRADE_WINDOW_TAGS → alert card.
  3. Runnable: browser pre-wired with placeholders + sample rows; once the node is ready, fill the endpoint into env and run.
  4. Start: Public endpoints + blockreq.com register for 3M free requests monthly.

Next: pin the filter-key table → webhook → stack beside the Agave six-week compat watch. Docs · Pricing · Register.