Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return error for malformed program account filters #4599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffhelius
Copy link

Problem

  • The getProgramAccounts RPC endpoint would silently ignore malformed filters and execute an unfiltered query, potentially causing unnecessary load on the node.

Summary of Changes

  • Added error handling to get_spl_token_owner_filter and get_spl_token_mint_filter to return a JSON-RPC error when malformed filters are provided
  • This prevents fallback to unfiltered queries which could be resource-intensive
  • Improves error visibility for API users

Fixes #

@mergify mergify bot requested a review from a team January 23, 2025 17:26
Copy link

mergify bot commented Jan 23, 2025

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/web3.js (example)

Thank you for keeping the RPC clients in sync with the server API @jeffhelius.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant