-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 client get_program_accounts_with_config calls with context #28772
Fix client get_program_accounts_with_config calls with context #28772
Conversation
@jstarry , I picked you because you had assigned the original issue to yourself, but let me know if you want to pass on review. Thx! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add test coverage to the rpc client for with/without context?
99394e0
to
9b94879
Compare
Done in eb7c89f |
* Move OptionalContext to solana-rpc-client-api * Add helper function * Add failing test * Support OptionalContext in RpcClient::get_program_accounts_with_config (cherry picked from commit b18ef88) # Conflicts: # client/src/nonblocking/rpc_client.rs # client/src/rpc_client.rs # rpc/src/rpc.rs
* Move OptionalContext to solana-rpc-client-api * Add helper function * Add failing test * Support OptionalContext in RpcClient::get_program_accounts_with_config (cherry picked from commit b18ef88) # Conflicts: # rpc/src/rpc.rs
…ort #28772) (#28846) * Fix client get_program_accounts_with_config calls with context (#28772) * Move OptionalContext to solana-rpc-client-api * Add helper function * Add failing test * Support OptionalContext in RpcClient::get_program_accounts_with_config (cherry picked from commit b18ef88) # Conflicts: # client/src/nonblocking/rpc_client.rs # client/src/rpc_client.rs # rpc/src/rpc.rs * Fix conflicts Co-authored-by: Tyera Eulberg <tyera@solana.com>
…ort #28772) (#28847) * Fix client get_program_accounts_with_config calls with context (#28772) * Move OptionalContext to solana-rpc-client-api * Add helper function * Add failing test * Support OptionalContext in RpcClient::get_program_accounts_with_config (cherry picked from commit b18ef88) # Conflicts: # rpc/src/rpc.rs * Fix conflicts Co-authored-by: Tyera Eulberg <tyera@solana.com>
…a-labs#28772) * Move OptionalContext to solana-rpc-client-api * Add helper function * Add failing test * Support OptionalContext in RpcClient::get_program_accounts_with_config
…a-labs#28772) * Move OptionalContext to solana-rpc-client-api * Add helper function * Add failing test * Support OptionalContext in RpcClient::get_program_accounts_with_config
Problem
As per #25869,
RpcClient::get_program_accounts_with_config()
cannot deserialize the responses from all current clusters whenwith_context
is set to true. #17399 added theOptionalContext
wrapper to the response from thegetProgramAccounts
RPC endpoint, but didn't add any handling to client methods. This has been broken in practice since whenever that change was released to public clusters, which unfortunately means all current branches.Summary of Changes
Add support for OptionalContext to
nonblocking::RpcClient::get_program_accounts_with_config()
Fixes #25869